]> git.sur5r.net Git - openldap/blob - configure
Add BerkeleyDB 3 DB_THREAD detection
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.303 2000/05/25 19:09:44 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 "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-kbind        enable V2 Kerberos IV bind (auto)"
43 ac_help="$ac_help
44   --enable-cldap        enable connectionless ldap (no)"
45 ac_help="$ac_help
46   --enable-ldapi        enable domain socket (PF_LOCAL) ldap (no)"
47 ac_help="$ac_help
48   --enable-x-compile    enable cross compiling (no)"
49 ac_help="$ac_help
50   --enable-dmalloc      enable debug malloc support (no)"
51 ac_help="$ac_help
52   --with-cyrus-sasl     with Cyrus SASL support (auto)"
53 ac_help="$ac_help
54   --with-fetch          with fetch URL support (auto)"
55 ac_help="$ac_help
56   --with-kerberos       with support (auto)"
57 ac_help="$ac_help
58   --with-readline       with readline support (auto)"
59 ac_help="$ac_help
60   --with-threads        use threads (auto)"
61 ac_help="$ac_help
62   --with-tls            with TLS/SSL support (auto)"
63 ac_help="$ac_help
64   --with-yielding-select        with implicitly yielding select (auto)"
65 ac_help="$ac_help
66 LDAPD (X.500-to-LDAP Gateway) Options:"
67 ac_help="$ac_help
68   --enable-ldapd        enable building ldapd (no)"
69 ac_help="$ac_help
70 SLAPD (Standalone LDAP Daemon) Options:"
71 ac_help="$ac_help
72   --enable-slapd        enable building slapd (yes)"
73 ac_help="$ac_help
74     --enable-cleartext  enable cleartext passwords (yes)"
75 ac_help="$ac_help
76     --enable-crypt      enable crypt(3) passwords (auto)"
77 ac_help="$ac_help
78     --enable-kpasswd    enable kerberos password verification (no)"
79 ac_help="$ac_help
80     --enable-spasswd    enable (Cyrus) SASL password verification (no)"
81 ac_help="$ac_help
82     --enable-modules    enable dynamic module support (no)"
83 ac_help="$ac_help
84     --enable-multimaster        enable multimaster replication (no)"
85 ac_help="$ac_help
86     --enable-phonetic   enable phonetic/soundex (no)"
87 ac_help="$ac_help
88     --enable-quipu      build quipu migration tools (no)"
89 ac_help="$ac_help
90     --enable-rlookups   enable reverse lookups (auto)"
91 ac_help="$ac_help
92     --enable-aci        enable per-object ACIs (no)"
93 ac_help="$ac_help
94     --enable-wrappers   enable tcp wrapper support (no)"
95 ac_help="$ac_help
96     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
97 ac_help="$ac_help
98     --enable-bdb2       enable bdb2 backend (no)"
99 ac_help="$ac_help
100       --with-bdb2-module        module type (static)"
101 ac_help="$ac_help
102     --enable-dnssrv     enable bdb2 backend (no)"
103 ac_help="$ac_help
104       --with-dnssrv-module      module type (static)"
105 ac_help="$ac_help
106     --enable-ldap       enable ldap backend (no)"
107 ac_help="$ac_help
108       --with-ldap-module        module type (static)"
109 ac_help="$ac_help
110     --enable-ldbm       enable ldbm backend (yes)"
111 ac_help="$ac_help
112       --with-ldbm-api   use LDBM API (auto)"
113 ac_help="$ac_help
114       --with-ldbm-module        module type (static)"
115 ac_help="$ac_help
116       --with-ldbm-type  use LDBM type (auto)"
117 ac_help="$ac_help
118     --enable-passwd     enable passwd backend (no)"
119 ac_help="$ac_help
120       --with-passwd-module      module type (static)"
121 ac_help="$ac_help
122     --enable-perl       enable perl backend (no)"
123 ac_help="$ac_help
124       --with-perl-module        module type (static)"
125 ac_help="$ac_help
126     --enable-shell      enable shell backend (no)"
127 ac_help="$ac_help
128       --with-shell-module       module type (static)"
129 ac_help="$ac_help
130     --enable-sql        enable sql backend (no)"
131 ac_help="$ac_help
132       --with-sql-module module type (static)"
133 ac_help="$ac_help
134     --enable-tcl        enable tcl backend (no)"
135 ac_help="$ac_help
136       --with-tcl-module module type (static)"
137 ac_help="$ac_help
138 SLURPD (Replication Daemon) Options:"
139 ac_help="$ac_help
140   --enable-slurpd       enable building slurpd (auto)"
141 ac_help="$ac_help
142 Library Generation & Linking Options"
143 ac_help="$ac_help
144   --enable-static[=PKGS]  build static libraries [default=yes]"
145 ac_help="$ac_help
146   --enable-shared[=PKGS]  build shared libraries [default=yes]"
147 ac_help="$ac_help
148   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
149 ac_help="$ac_help
150   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
151 ac_help="$ac_help
152   --disable-libtool-lock  avoid locking (might break parallel builds)"
153
154 # Initialize some variables set by options.
155 # The variables have the same names as the options, with
156 # dashes changed to underlines.
157 build=NONE
158 cache_file=./config.cache
159 exec_prefix=NONE
160 host=NONE
161 no_create=
162 nonopt=NONE
163 no_recursion=
164 prefix=NONE
165 program_prefix=NONE
166 program_suffix=NONE
167 program_transform_name=s,x,x,
168 silent=
169 site=
170 srcdir=
171 target=NONE
172 verbose=
173 x_includes=NONE
174 x_libraries=NONE
175 bindir='${exec_prefix}/bin'
176 sbindir='${exec_prefix}/sbin'
177 libexecdir='${exec_prefix}/libexec'
178 datadir='${prefix}/share'
179 sysconfdir='${prefix}/etc'
180 sharedstatedir='${prefix}/com'
181 localstatedir='${prefix}/var'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${prefix}/info'
186 mandir='${prefix}/man'
187
188 # Initialize some other variables.
189 subdirs=
190 MFLAGS= MAKEFLAGS=
191 SHELL=${CONFIG_SHELL-/bin/sh}
192 # Maximum number of lines to put in a shell here document.
193 ac_max_here_lines=12
194
195 ac_prev=
196 for ac_option
197 do
198
199   # If the previous option needs an argument, assign it.
200   if test -n "$ac_prev"; then
201     eval "$ac_prev=\$ac_option"
202     ac_prev=
203     continue
204   fi
205
206   case "$ac_option" in
207   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
208   *) ac_optarg= ;;
209   esac
210
211   # Accept the important Cygnus configure options, so we can diagnose typos.
212
213   case "$ac_option" in
214
215   -bindir | --bindir | --bindi | --bind | --bin | --bi)
216     ac_prev=bindir ;;
217   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
218     bindir="$ac_optarg" ;;
219
220   -build | --build | --buil | --bui | --bu)
221     ac_prev=build ;;
222   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
223     build="$ac_optarg" ;;
224
225   -cache-file | --cache-file | --cache-fil | --cache-fi \
226   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
227     ac_prev=cache_file ;;
228   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
229   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
230     cache_file="$ac_optarg" ;;
231
232   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233     ac_prev=datadir ;;
234   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235   | --da=*)
236     datadir="$ac_optarg" ;;
237
238   -disable-* | --disable-*)
239     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
240     # Reject names that are not valid shell variable names.
241     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
242       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
243     fi
244     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
245     eval "enable_${ac_feature}=no" ;;
246
247   -enable-* | --enable-*)
248     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
249     # Reject names that are not valid shell variable names.
250     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
251       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
252     fi
253     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
254     case "$ac_option" in
255       *=*) ;;
256       *) ac_optarg=yes ;;
257     esac
258     eval "enable_${ac_feature}='$ac_optarg'" ;;
259
260   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
261   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
262   | --exec | --exe | --ex)
263     ac_prev=exec_prefix ;;
264   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
265   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
266   | --exec=* | --exe=* | --ex=*)
267     exec_prefix="$ac_optarg" ;;
268
269   -gas | --gas | --ga | --g)
270     # Obsolete; use --with-gas.
271     with_gas=yes ;;
272
273   -help | --help | --hel | --he)
274     # Omit some internal or obsolete options to make the list less imposing.
275     # This message is too long to be a string in the A/UX 3.1 sh.
276     cat << EOF
277 Usage: configure [options] [host]
278 Options: [defaults in brackets after descriptions]
279 Configuration:
280   --cache-file=FILE       cache test results in FILE
281   --help                  print this message
282   --no-create             do not create output files
283   --quiet, --silent       do not print \`checking...' messages
284   --version               print the version of autoconf that created configure
285 Directory and file names:
286   --prefix=PREFIX         install architecture-independent files in PREFIX
287                           [$ac_default_prefix]
288   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
289                           [same as prefix]
290   --bindir=DIR            user executables in DIR [EPREFIX/bin]
291   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
292   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
293   --datadir=DIR           read-only architecture-independent data in DIR
294                           [PREFIX/share]
295   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
296   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
297                           [PREFIX/com]
298   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
299   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
300   --includedir=DIR        C header files in DIR [PREFIX/include]
301   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
302   --infodir=DIR           info documentation in DIR [PREFIX/info]
303   --mandir=DIR            man documentation in DIR [PREFIX/man]
304   --srcdir=DIR            find the sources in DIR [configure dir or ..]
305   --program-prefix=PREFIX prepend PREFIX to installed program names
306   --program-suffix=SUFFIX append SUFFIX to installed program names
307   --program-transform-name=PROGRAM
308                           run sed PROGRAM on installed program names
309 EOF
310     cat << EOF
311 Host type:
312   --build=BUILD           configure for building on BUILD [BUILD=HOST]
313   --host=HOST             configure for HOST [guessed]
314   --target=TARGET         configure for TARGET [TARGET=HOST]
315 Features and packages:
316   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
317   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
318   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
319   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
320   --x-includes=DIR        X include files are in DIR
321   --x-libraries=DIR       X library files are in DIR
322 EOF
323     if test -n "$ac_help"; then
324       echo "--enable and --with options recognized:$ac_help"
325     fi
326     exit 0 ;;
327
328   -host | --host | --hos | --ho)
329     ac_prev=host ;;
330   -host=* | --host=* | --hos=* | --ho=*)
331     host="$ac_optarg" ;;
332
333   -includedir | --includedir | --includedi | --included | --include \
334   | --includ | --inclu | --incl | --inc)
335     ac_prev=includedir ;;
336   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
337   | --includ=* | --inclu=* | --incl=* | --inc=*)
338     includedir="$ac_optarg" ;;
339
340   -infodir | --infodir | --infodi | --infod | --info | --inf)
341     ac_prev=infodir ;;
342   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
343     infodir="$ac_optarg" ;;
344
345   -libdir | --libdir | --libdi | --libd)
346     ac_prev=libdir ;;
347   -libdir=* | --libdir=* | --libdi=* | --libd=*)
348     libdir="$ac_optarg" ;;
349
350   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
351   | --libexe | --libex | --libe)
352     ac_prev=libexecdir ;;
353   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
354   | --libexe=* | --libex=* | --libe=*)
355     libexecdir="$ac_optarg" ;;
356
357   -localstatedir | --localstatedir | --localstatedi | --localstated \
358   | --localstate | --localstat | --localsta | --localst \
359   | --locals | --local | --loca | --loc | --lo)
360     ac_prev=localstatedir ;;
361   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
362   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
363   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
364     localstatedir="$ac_optarg" ;;
365
366   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
367     ac_prev=mandir ;;
368   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
369     mandir="$ac_optarg" ;;
370
371   -nfp | --nfp | --nf)
372     # Obsolete; use --without-fp.
373     with_fp=no ;;
374
375   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
376   | --no-cr | --no-c)
377     no_create=yes ;;
378
379   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
380   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
381     no_recursion=yes ;;
382
383   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
384   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
385   | --oldin | --oldi | --old | --ol | --o)
386     ac_prev=oldincludedir ;;
387   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
388   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
389   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
390     oldincludedir="$ac_optarg" ;;
391
392   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
393     ac_prev=prefix ;;
394   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
395     prefix="$ac_optarg" ;;
396
397   -program-prefix | --program-prefix | --program-prefi | --program-pref \
398   | --program-pre | --program-pr | --program-p)
399     ac_prev=program_prefix ;;
400   -program-prefix=* | --program-prefix=* | --program-prefi=* \
401   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
402     program_prefix="$ac_optarg" ;;
403
404   -program-suffix | --program-suffix | --program-suffi | --program-suff \
405   | --program-suf | --program-su | --program-s)
406     ac_prev=program_suffix ;;
407   -program-suffix=* | --program-suffix=* | --program-suffi=* \
408   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
409     program_suffix="$ac_optarg" ;;
410
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     ac_prev=program_transform_name ;;
419   -program-transform-name=* | --program-transform-name=* \
420   | --program-transform-nam=* | --program-transform-na=* \
421   | --program-transform-n=* | --program-transform-=* \
422   | --program-transform=* | --program-transfor=* \
423   | --program-transfo=* | --program-transf=* \
424   | --program-trans=* | --program-tran=* \
425   | --progr-tra=* | --program-tr=* | --program-t=*)
426     program_transform_name="$ac_optarg" ;;
427
428   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
429   | -silent | --silent | --silen | --sile | --sil)
430     silent=yes ;;
431
432   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
433     ac_prev=sbindir ;;
434   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
435   | --sbi=* | --sb=*)
436     sbindir="$ac_optarg" ;;
437
438   -sharedstatedir | --sharedstatedir | --sharedstatedi \
439   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
440   | --sharedst | --shareds | --shared | --share | --shar \
441   | --sha | --sh)
442     ac_prev=sharedstatedir ;;
443   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
444   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
445   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
446   | --sha=* | --sh=*)
447     sharedstatedir="$ac_optarg" ;;
448
449   -site | --site | --sit)
450     ac_prev=site ;;
451   -site=* | --site=* | --sit=*)
452     site="$ac_optarg" ;;
453
454   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
455     ac_prev=srcdir ;;
456   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
457     srcdir="$ac_optarg" ;;
458
459   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
460   | --syscon | --sysco | --sysc | --sys | --sy)
461     ac_prev=sysconfdir ;;
462   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
463   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
464     sysconfdir="$ac_optarg" ;;
465
466   -target | --target | --targe | --targ | --tar | --ta | --t)
467     ac_prev=target ;;
468   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
469     target="$ac_optarg" ;;
470
471   -v | -verbose | --verbose | --verbos | --verbo | --verb)
472     verbose=yes ;;
473
474   -version | --version | --versio | --versi | --vers)
475     echo "configure generated by autoconf version 2.13.1"
476     exit 0 ;;
477
478   -with-* | --with-*)
479     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
480     # Reject names that are not valid shell variable names.
481     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
482       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
483     fi
484     ac_package=`echo $ac_package| sed 's/-/_/g'`
485     case "$ac_option" in
486       *=*) ;;
487       *) ac_optarg=yes ;;
488     esac
489     eval "with_${ac_package}='$ac_optarg'" ;;
490
491   -without-* | --without-*)
492     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
493     # Reject names that are not valid shell variable names.
494     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
495       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
496     fi
497     ac_package=`echo $ac_package| sed 's/-/_/g'`
498     eval "with_${ac_package}=no" ;;
499
500   --x)
501     # Obsolete; use --with-x.
502     with_x=yes ;;
503
504   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
505   | --x-incl | --x-inc | --x-in | --x-i)
506     ac_prev=x_includes ;;
507   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
508   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
509     x_includes="$ac_optarg" ;;
510
511   -x-libraries | --x-libraries | --x-librarie | --x-librari \
512   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
513     ac_prev=x_libraries ;;
514   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
515   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
516     x_libraries="$ac_optarg" ;;
517
518   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
519     ;;
520
521   *)
522     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
523       echo "configure: warning: $ac_option: invalid host type" 1>&2
524     fi
525     if test "x$nonopt" != xNONE; then
526       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
527     fi
528     nonopt="$ac_option"
529     ;;
530
531   esac
532 done
533
534 if test -n "$ac_prev"; then
535   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
536 fi
537
538 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
539
540 # File descriptor usage:
541 # 0 standard input
542 # 1 file creation
543 # 2 errors and warnings
544 # 3 some systems may open it to /dev/tty
545 # 4 used on the Kubota Titan
546 # 6 checking for... messages and results
547 # 5 compiler messages saved in config.log
548 if test "$silent" = yes; then
549   exec 6>/dev/null
550 else
551   exec 6>&1
552 fi
553 exec 5>./config.log
554
555 echo "\
556 This file contains any messages produced by compilers while
557 running configure, to aid debugging if configure makes a mistake.
558 " 1>&5
559
560 # Strip out --no-create and --no-recursion so they do not pile up.
561 # Also quote any args containing shell metacharacters.
562 ac_configure_args=
563 for ac_arg
564 do
565   case "$ac_arg" in
566   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
567   | --no-cr | --no-c) ;;
568   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
569   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
570   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
571   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
572   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
573   esac
574 done
575
576 # NLS nuisances.
577 # Only set these to C if already set.  These must not be set unconditionally
578 # because not all systems understand e.g. LANG=C (notably SCO).
579 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
580 # Non-C LC_CTYPE values break the ctype check.
581 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
582 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
583 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
584 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
585
586 # confdefs.h avoids OS command line length limits that DEFS can exceed.
587 rm -rf conftest* confdefs.h
588 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
589 echo > confdefs.h
590
591 # A filename unique to this package, relative to the directory that
592 # configure is in, which we can look for to find out if srcdir is correct.
593 ac_unique_file=build/version
594
595 # Find the source files, if location was not specified.
596 if test -z "$srcdir"; then
597   ac_srcdir_defaulted=yes
598   # Try the directory containing this script, then its parent.
599   ac_prog=$0
600   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
601   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
602   srcdir=$ac_confdir
603   if test ! -r $srcdir/$ac_unique_file; then
604     srcdir=..
605   fi
606 else
607   ac_srcdir_defaulted=no
608 fi
609 if test ! -r $srcdir/$ac_unique_file; then
610   if test "$ac_srcdir_defaulted" = yes; then
611     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
612   else
613     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
614   fi
615 fi
616 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
617
618 # Prefer explicitly selected file to automatically selected ones.
619 if test -z "$CONFIG_SITE"; then
620   if test "x$prefix" != xNONE; then
621     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
622   else
623     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
624   fi
625 fi
626 for ac_site_file in $CONFIG_SITE; do
627   if test -r "$ac_site_file"; then
628     echo "loading site script $ac_site_file"
629     . "$ac_site_file"
630   fi
631 done
632
633
634 ac_ext=c
635 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
636 ac_cpp='$CPP $CPPFLAGS'
637 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
638 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
639 cross_compiling=$ac_cv_prog_cc_cross
640
641 ac_exeext=
642 ac_objext=o
643 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
644   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
645   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
646     ac_n= ac_c='
647 ' ac_t='        '
648   else
649     ac_n=-n ac_c= ac_t=
650   fi
651 else
652   ac_n= ac_c='\c' ac_t=
653 fi
654
655 ac_aux_dir=
656 for ac_dir in build $srcdir/build; do
657   if test -f $ac_dir/install-sh; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/install-sh -c"
660     break
661   elif test -f $ac_dir/install.sh; then
662     ac_aux_dir=$ac_dir
663     ac_install_sh="$ac_aux_dir/install.sh -c"
664     break
665   elif test -f $ac_dir/shtool; then
666     ac_aux_dir=$ac_dir
667     ac_install_sh="$ac_aux_dir/shtool install -c"
668     break
669   fi
670 done
671 if test -z "$ac_aux_dir"; then
672   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
673 fi
674 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
675 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
676 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
677
678 OL_VERSION=`cat $ac_aux_dir/version`
679 if test -z "$OL_VERSION"; then
680         { echo "configure: error: could not determine version" 1>&2; exit 1; }
681 fi
682
683 echo "Configuring OpenLDAP $OL_VERSION ..."
684
685
686 echo $ac_n "checking host system type""... $ac_c" 1>&6
687 echo "configure:688: checking host system type" >&5
688 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
689
690 # Make sure we can run config.sub.
691   if $ac_config_sub sun4 >/dev/null 2>&1; then :
692     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
693   fi
694
695   ac_cv_host_alias=$host
696   case "$ac_cv_host_alias" in
697   NONE)
698     case $nonopt in
699     NONE)
700       if ac_cv_host_alias=`$ac_config_guess`; then :
701       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
702       fi ;;
703     *) ac_cv_host_alias=$nonopt ;;
704     esac ;;
705   esac
706
707   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
708   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 else
712   echo $ac_n "(cached) $ac_c" 1>&6
713 fi
714
715 echo "$ac_t""$ac_cv_host" 1>&6
716
717 host=$ac_cv_host
718 host_alias=$ac_cv_host_alias
719 host_cpu=$ac_cv_host_cpu
720 host_vendor=$ac_cv_host_vendor
721 host_os=$ac_cv_host_os
722
723
724
725
726
727 echo $ac_n "checking target system type""... $ac_c" 1>&6
728 echo "configure:729: checking target system type" >&5
729 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
730
731 # Make sure we can run config.sub.
732   if $ac_config_sub sun4 >/dev/null 2>&1; then :
733     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
734   fi
735
736   ac_cv_target_alias=$target
737   case "$ac_cv_target_alias" in
738   NONE)
739     case $nonopt in
740     NONE)
741       ac_cv_target_alias=$host_alias ;;
742
743     *) ac_cv_target_alias=$nonopt ;;
744     esac ;;
745   esac
746
747   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
748   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
749   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
750   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
751 else
752   echo $ac_n "(cached) $ac_c" 1>&6
753 fi
754
755 echo "$ac_t""$ac_cv_target" 1>&6
756
757 target=$ac_cv_target
758 target_alias=$ac_cv_target_alias
759 target_cpu=$ac_cv_target_cpu
760 target_vendor=$ac_cv_target_vendor
761 target_os=$ac_cv_target_os
762
763
764
765
766
767 echo $ac_n "checking build system type""... $ac_c" 1>&6
768 echo "configure:769: checking build system type" >&5
769 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
770
771 # Make sure we can run config.sub.
772   if $ac_config_sub sun4 >/dev/null 2>&1; then :
773     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
774   fi
775
776   ac_cv_build_alias=$build
777   case "$ac_cv_build_alias" in
778   NONE)
779     case $nonopt in
780     NONE)
781       ac_cv_build_alias=$host_alias ;;
782
783     *) ac_cv_build_alias=$nonopt ;;
784     esac ;;
785   esac
786
787   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
788   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
789   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
790   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
791 else
792   echo $ac_n "(cached) $ac_c" 1>&6
793 fi
794
795 echo "$ac_t""$ac_cv_build" 1>&6
796
797 build=$ac_cv_build
798 build_alias=$ac_cv_build_alias
799 build_cpu=$ac_cv_build_cpu
800 build_vendor=$ac_cv_build_vendor
801 build_os=$ac_cv_build_os
802
803
804
805
806
807 # Do some error checking and defaulting for the host and target type.
808 # The inputs are:
809 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
810 #
811 # The rules are:
812 # 1. You are not allowed to specify --host, --target, and nonopt at the
813 #    same time.
814 # 2. Host defaults to nonopt.
815 # 3. If nonopt is not specified, then host defaults to the current host,
816 #    as determined by config.guess.
817 # 4. Target and build default to nonopt.
818 # 5. If nonopt is not specified, then target and build default to host.
819
820 # The aliases save the names the user supplied, while $host etc.
821 # will get canonicalized.
822 case $host---$target---$nonopt in
823 NONE---*---* | *---NONE---* | *---*---NONE) ;;
824 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
825 esac
826
827 test "$host_alias" != "$target_alias" &&
828   test "$program_prefix$program_suffix$program_transform_name" = \
829     NONENONEs,x,x, &&
830   program_prefix=${target_alias}-
831
832
833 # Find a good install program.  We prefer a C program (faster),
834 # so one script is as good as another.  But avoid the broken or
835 # incompatible versions:
836 # SysV /etc/install, /usr/sbin/install
837 # SunOS /usr/etc/install
838 # IRIX /sbin/install
839 # AIX /bin/install
840 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
841 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
842 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
843 # ./install, which can be erroneously created by make from ./install.sh.
844 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
845 echo "configure:846: checking for a BSD compatible install" >&5
846 if test -z "$INSTALL"; then
847 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
848   echo $ac_n "(cached) $ac_c" 1>&6
849 else
850     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
851   for ac_dir in $PATH; do
852     # Account for people who put trailing slashes in PATH elements.
853     case "$ac_dir/" in
854     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
855     *)
856       # OSF1 and SCO ODT 3.0 have their own names for install.
857       # Don't use installbsd from OSF since it installs stuff as root
858       # by default.
859       for ac_prog in ginstall scoinst install; do
860         if test -f $ac_dir/$ac_prog; then
861           if test $ac_prog = install &&
862             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
863             # AIX install.  It has an incompatible calling convention.
864             :
865           elif test $ac_prog = install &&
866             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
867             # program-specific install script used by HP pwplus--don't use.
868             :
869           else
870             ac_cv_path_install="$ac_dir/$ac_prog -c"
871             break 2
872           fi
873         fi
874       done
875       ;;
876     esac
877   done
878   IFS="$ac_save_IFS"
879
880 fi
881   if test "${ac_cv_path_install+set}" = set; then
882     INSTALL="$ac_cv_path_install"
883   else
884     # As a last resort, use the slow shell script.  We don't cache a
885     # path for INSTALL within a source directory, because that will
886     # break other packages using the cache if that directory is
887     # removed, or if the path is relative.
888     INSTALL="$ac_install_sh"
889   fi
890 fi
891 echo "$ac_t""$INSTALL" 1>&6
892
893 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
894 # It thinks the first close brace ends the variable substitution.
895 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
896
897 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
898
899 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
900
901 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
902 echo "configure:903: checking whether build environment is sane" >&5
903 # Just in case
904 sleep 1
905 echo timestamp > conftestfile
906 # Do `set' in a subshell so we don't clobber the current shell's
907 # arguments.  Must try -L first in case configure is actually a
908 # symlink; some systems play weird games with the mod time of symlinks
909 # (eg FreeBSD returns the mod time of the symlink's containing
910 # directory).
911 if (
912    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
913    if test "$*" = "X"; then
914       # -L didn't work.
915       set X `ls -t $srcdir/configure conftestfile`
916    fi
917    if test "$*" != "X $srcdir/configure conftestfile" \
918       && test "$*" != "X conftestfile $srcdir/configure"; then
919
920       # If neither matched, then we have a broken ls.  This can happen
921       # if, for instance, CONFIG_SHELL is bash and it inherits a
922       # broken ls alias from the environment.  This has actually
923       # happened.  Such a system could not be considered "sane".
924       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
925 alias in your environment" 1>&2; exit 1; }
926    fi
927
928    test "$2" = conftestfile
929    )
930 then
931    # Ok.
932    :
933 else
934    { echo "configure: error: newly created file is older than distributed files!
935 Check your system clock" 1>&2; exit 1; }
936 fi
937 rm -f conftest*
938 echo "$ac_t""yes" 1>&6
939 if test "$program_transform_name" = s,x,x,; then
940   program_transform_name=
941 else
942   # Double any \ or $.  echo might interpret backslashes.
943   cat <<\EOF_SED > conftestsed
944 s,\\,\\\\,g; s,\$,$$,g
945 EOF_SED
946   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
947   rm -f conftestsed
948 fi
949 test "$program_prefix" != NONE &&
950   program_transform_name="s,^,${program_prefix},;$program_transform_name"
951 # Use a double $ so make ignores it.
952 test "$program_suffix" != NONE &&
953   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
954
955 # sed with no file args requires a program.
956 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
957
958 for ac_prog in mawk gawk nawk awk
959 do
960 # Extract the first word of "$ac_prog", so it can be a program name with args.
961 set dummy $ac_prog; ac_word=$2
962 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
963 echo "configure:964: checking for $ac_word" >&5
964 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
965   echo $ac_n "(cached) $ac_c" 1>&6
966 else
967   if test -n "$AWK"; then
968   ac_cv_prog_AWK="$AWK" # Let the user override the test.
969 else
970   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
971   ac_dummy="$PATH"
972   for ac_dir in $ac_dummy; do
973     test -z "$ac_dir" && ac_dir=.
974     if test -f $ac_dir/$ac_word; then
975       ac_cv_prog_AWK="$ac_prog"
976       break
977     fi
978   done
979   IFS="$ac_save_ifs"
980 fi
981 fi
982 AWK="$ac_cv_prog_AWK"
983 if test -n "$AWK"; then
984   echo "$ac_t""$AWK" 1>&6
985 else
986   echo "$ac_t""no" 1>&6
987 fi
988
989 test -n "$AWK" && break
990 done
991
992 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
993 echo "configure:994: checking whether ${MAKE-make} sets \${MAKE}" >&5
994 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
995 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
996   echo $ac_n "(cached) $ac_c" 1>&6
997 else
998   cat > conftestmake <<\EOF
999 all:
1000         @echo 'ac_maketemp="${MAKE}"'
1001 EOF
1002 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1003 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1004 if test -n "$ac_maketemp"; then
1005   eval ac_cv_prog_make_${ac_make}_set=yes
1006 else
1007   eval ac_cv_prog_make_${ac_make}_set=no
1008 fi
1009 rm -f conftestmake
1010 fi
1011 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1012   echo "$ac_t""yes" 1>&6
1013   SET_MAKE=
1014 else
1015   echo "$ac_t""no" 1>&6
1016   SET_MAKE="MAKE=${MAKE-make}"
1017 fi
1018
1019
1020
1021 PACKAGE=OpenLDAP
1022
1023 VERSION=$OL_VERSION
1024
1025 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1026   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1027 fi
1028
1029
1030
1031 missing_dir=`cd $ac_aux_dir && pwd`
1032 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1033 echo "configure:1034: checking for working aclocal" >&5
1034 # Run test in a subshell; some versions of sh will print an error if
1035 # an executable is not found, even if stderr is redirected.
1036 # Redirect stdin to placate older versions of autoconf.  Sigh.
1037 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1038    ACLOCAL=aclocal
1039    echo "$ac_t""found" 1>&6
1040 else
1041    ACLOCAL="$missing_dir/missing aclocal"
1042    echo "$ac_t""missing" 1>&6
1043 fi
1044
1045 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1046 echo "configure:1047: checking for working autoconf" >&5
1047 # Run test in a subshell; some versions of sh will print an error if
1048 # an executable is not found, even if stderr is redirected.
1049 # Redirect stdin to placate older versions of autoconf.  Sigh.
1050 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1051    AUTOCONF=autoconf
1052    echo "$ac_t""found" 1>&6
1053 else
1054    AUTOCONF="$missing_dir/missing autoconf"
1055    echo "$ac_t""missing" 1>&6
1056 fi
1057
1058 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1059 echo "configure:1060: checking for working automake" >&5
1060 # Run test in a subshell; some versions of sh will print an error if
1061 # an executable is not found, even if stderr is redirected.
1062 # Redirect stdin to placate older versions of autoconf.  Sigh.
1063 if (automake --version) < /dev/null > /dev/null 2>&1; then
1064    AUTOMAKE=automake
1065    echo "$ac_t""found" 1>&6
1066 else
1067    AUTOMAKE="$missing_dir/missing automake"
1068    echo "$ac_t""missing" 1>&6
1069 fi
1070
1071 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1072 echo "configure:1073: checking for working autoheader" >&5
1073 # Run test in a subshell; some versions of sh will print an error if
1074 # an executable is not found, even if stderr is redirected.
1075 # Redirect stdin to placate older versions of autoconf.  Sigh.
1076 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1077    AUTOHEADER=autoheader
1078    echo "$ac_t""found" 1>&6
1079 else
1080    AUTOHEADER="$missing_dir/missing autoheader"
1081    echo "$ac_t""missing" 1>&6
1082 fi
1083
1084 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1085 echo "configure:1086: checking for working makeinfo" >&5
1086 # Run test in a subshell; some versions of sh will print an error if
1087 # an executable is not found, even if stderr is redirected.
1088 # Redirect stdin to placate older versions of autoconf.  Sigh.
1089 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1090    MAKEINFO=makeinfo
1091    echo "$ac_t""found" 1>&6
1092 else
1093    MAKEINFO="$missing_dir/missing makeinfo"
1094    echo "$ac_t""missing" 1>&6
1095 fi
1096
1097 install_sh="$missing_dir/install-sh"
1098 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1099
1100 for ac_prog in gnutar gtar tar
1101 do
1102 # Extract the first word of "$ac_prog", so it can be a program name with args.
1103 set dummy $ac_prog; ac_word=$2
1104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1105 echo "configure:1106: checking for $ac_word" >&5
1106 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1107   echo $ac_n "(cached) $ac_c" 1>&6
1108 else
1109   if test -n "$AMTAR"; then
1110   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1111 else
1112   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1113   ac_dummy="$PATH"
1114   for ac_dir in $ac_dummy; do
1115     test -z "$ac_dir" && ac_dir=.
1116     if test -f $ac_dir/$ac_word; then
1117       ac_cv_prog_AMTAR="$ac_prog"
1118       break
1119     fi
1120   done
1121   IFS="$ac_save_ifs"
1122 fi
1123 fi
1124 AMTAR="$ac_cv_prog_AMTAR"
1125 if test -n "$AMTAR"; then
1126   echo "$ac_t""$AMTAR" 1>&6
1127 else
1128   echo "$ac_t""no" 1>&6
1129 fi
1130
1131 test -n "$AMTAR" && break
1132 done
1133
1134
1135 AMTARFLAGS=
1136 if test -n "$AMTAR"; then
1137   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1138         AMTARFLAGS=o
1139   fi
1140 fi
1141
1142
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
1154
1155 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1156 echo "configure:1157: checking configure arguments" >&5
1157
1158
1159 top_builddir=`pwd`
1160
1161 ldap_subdir="/openldap"
1162
1163 # Check whether --with-subdir or --without-subdir was given.
1164 if test "${with_subdir+set}" = set; then
1165   withval="$with_subdir"
1166   case "$withval" in
1167         no) ldap_subdir=""
1168                 ;;
1169         yes)
1170                 ;;
1171         /*|\\*)
1172                 ldap_subdir="$withval"
1173                 ;;
1174         *)
1175                 ldap_subdir="/$withval"
1176                 ;;
1177 esac
1178
1179 fi
1180
1181
1182 # OpenLDAP --enable-debug
1183         # Check whether --enable-debug or --disable-debug was given.
1184 if test "${enable_debug+set}" = set; then
1185   enableval="$enable_debug"
1186   
1187         ol_arg=invalid
1188         for ol_val in auto yes no ; do
1189                 if test "$enableval" = "$ol_val" ; then
1190                         ol_arg="$ol_val"
1191                 fi
1192         done
1193         if test "$ol_arg" = "invalid" ; then
1194                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1195         fi
1196         ol_enable_debug="$ol_arg"
1197
1198 else
1199         ol_enable_debug="yes"
1200 fi
1201 # end --enable-debug
1202 # OpenLDAP --enable-syslog
1203         # Check whether --enable-syslog or --disable-syslog was given.
1204 if test "${enable_syslog+set}" = set; then
1205   enableval="$enable_syslog"
1206   
1207         ol_arg=invalid
1208         for ol_val in auto yes no ; do
1209                 if test "$enableval" = "$ol_val" ; then
1210                         ol_arg="$ol_val"
1211                 fi
1212         done
1213         if test "$ol_arg" = "invalid" ; then
1214                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1215         fi
1216         ol_enable_syslog="$ol_arg"
1217
1218 else
1219         ol_enable_syslog="auto"
1220 fi
1221 # end --enable-syslog
1222 # OpenLDAP --enable-proctitle
1223         # Check whether --enable-proctitle or --disable-proctitle was given.
1224 if test "${enable_proctitle+set}" = set; then
1225   enableval="$enable_proctitle"
1226   
1227         ol_arg=invalid
1228         for ol_val in auto yes no ; do
1229                 if test "$enableval" = "$ol_val" ; then
1230                         ol_arg="$ol_val"
1231                 fi
1232         done
1233         if test "$ol_arg" = "invalid" ; then
1234                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1235         fi
1236         ol_enable_proctitle="$ol_arg"
1237
1238 else
1239         ol_enable_proctitle="yes"
1240 fi
1241 # end --enable-proctitle
1242 # OpenLDAP --enable-cache
1243         # Check whether --enable-cache or --disable-cache was given.
1244 if test "${enable_cache+set}" = set; then
1245   enableval="$enable_cache"
1246   
1247         ol_arg=invalid
1248         for ol_val in auto yes no ; do
1249                 if test "$enableval" = "$ol_val" ; then
1250                         ol_arg="$ol_val"
1251                 fi
1252         done
1253         if test "$ol_arg" = "invalid" ; then
1254                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1255         fi
1256         ol_enable_cache="$ol_arg"
1257
1258 else
1259         ol_enable_cache="yes"
1260 fi
1261 # end --enable-cache
1262 # OpenLDAP --enable-dns
1263         # Check whether --enable-dns or --disable-dns was given.
1264 if test "${enable_dns+set}" = set; then
1265   enableval="$enable_dns"
1266   
1267         ol_arg=invalid
1268         for ol_val in auto yes no ; do
1269                 if test "$enableval" = "$ol_val" ; then
1270                         ol_arg="$ol_val"
1271                 fi
1272         done
1273         if test "$ol_arg" = "invalid" ; then
1274                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1275         fi
1276         ol_enable_dns="$ol_arg"
1277
1278 else
1279         ol_enable_dns="no"
1280 fi
1281 # end --enable-dns
1282 # OpenLDAP --enable-referrals
1283         # Check whether --enable-referrals or --disable-referrals was given.
1284 if test "${enable_referrals+set}" = set; then
1285   enableval="$enable_referrals"
1286   
1287         ol_arg=invalid
1288         for ol_val in auto yes no ; do
1289                 if test "$enableval" = "$ol_val" ; then
1290                         ol_arg="$ol_val"
1291                 fi
1292         done
1293         if test "$ol_arg" = "invalid" ; then
1294                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1295         fi
1296         ol_enable_referrals="$ol_arg"
1297
1298 else
1299         ol_enable_referrals="yes"
1300 fi
1301 # end --enable-referrals
1302 # OpenLDAP --enable-kbind
1303         # Check whether --enable-kbind or --disable-kbind was given.
1304 if test "${enable_kbind+set}" = set; then
1305   enableval="$enable_kbind"
1306   
1307         ol_arg=invalid
1308         for ol_val in auto yes no ; do
1309                 if test "$enableval" = "$ol_val" ; then
1310                         ol_arg="$ol_val"
1311                 fi
1312         done
1313         if test "$ol_arg" = "invalid" ; then
1314                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1315         fi
1316         ol_enable_kbind="$ol_arg"
1317
1318 else
1319         ol_enable_kbind="auto"
1320 fi
1321 # end --enable-kbind
1322 # OpenLDAP --enable-cldap
1323         # Check whether --enable-cldap or --disable-cldap was given.
1324 if test "${enable_cldap+set}" = set; then
1325   enableval="$enable_cldap"
1326   
1327         ol_arg=invalid
1328         for ol_val in auto yes no ; do
1329                 if test "$enableval" = "$ol_val" ; then
1330                         ol_arg="$ol_val"
1331                 fi
1332         done
1333         if test "$ol_arg" = "invalid" ; then
1334                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1335         fi
1336         ol_enable_cldap="$ol_arg"
1337
1338 else
1339         ol_enable_cldap="no"
1340 fi
1341 # end --enable-cldap
1342 # OpenLDAP --enable-ldapi
1343         # Check whether --enable-ldapi or --disable-ldapi was given.
1344 if test "${enable_ldapi+set}" = set; then
1345   enableval="$enable_ldapi"
1346   
1347         ol_arg=invalid
1348         for ol_val in auto yes no ; do
1349                 if test "$enableval" = "$ol_val" ; then
1350                         ol_arg="$ol_val"
1351                 fi
1352         done
1353         if test "$ol_arg" = "invalid" ; then
1354                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1355         fi
1356         ol_enable_ldapi="$ol_arg"
1357
1358 else
1359         ol_enable_ldapi="no"
1360 fi
1361 # end --enable-ldapi
1362 # OpenLDAP --enable-x_compile
1363         # Check whether --enable-x_compile or --disable-x_compile was given.
1364 if test "${enable_x_compile+set}" = set; then
1365   enableval="$enable_x_compile"
1366   
1367         ol_arg=invalid
1368         for ol_val in yes no ; do
1369                 if test "$enableval" = "$ol_val" ; then
1370                         ol_arg="$ol_val"
1371                 fi
1372         done
1373         if test "$ol_arg" = "invalid" ; then
1374                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1375         fi
1376         ol_enable_x_compile="$ol_arg"
1377
1378 else
1379         ol_enable_x_compile="no"
1380 fi
1381 # end --enable-x_compile
1382
1383 # OpenLDAP --enable-dmalloc
1384         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1385 if test "${enable_dmalloc+set}" = set; then
1386   enableval="$enable_dmalloc"
1387   
1388         ol_arg=invalid
1389         for ol_val in auto yes no ; do
1390                 if test "$enableval" = "$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 $enableval for --enable-dmalloc" 1>&2; exit 1; }
1396         fi
1397         ol_enable_dmalloc="$ol_arg"
1398
1399 else
1400         ol_enable_dmalloc="no"
1401 fi
1402 # end --enable-dmalloc
1403
1404 # OpenLDAP --with-cyrus_sasl
1405         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1406 if test "${with_cyrus_sasl+set}" = set; then
1407   withval="$with_cyrus_sasl"
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-cyrus_sasl" 1>&2; exit 1; }
1417         fi
1418         ol_with_cyrus_sasl="$ol_arg"
1419
1420 else
1421         ol_with_cyrus_sasl="auto"
1422 fi
1423 # end --with-cyrus_sasl
1424
1425 # OpenLDAP --with-fetch
1426         # Check whether --with-fetch or --without-fetch was given.
1427 if test "${with_fetch+set}" = set; then
1428   withval="$with_fetch"
1429   
1430         ol_arg=invalid
1431         for ol_val in auto 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-fetch" 1>&2; exit 1; }
1438         fi
1439         ol_with_fetch="$ol_arg"
1440
1441 else
1442         ol_with_fetch="auto"
1443 fi
1444 # end --with-fetch
1445
1446 # OpenLDAP --with-kerberos
1447         # Check whether --with-kerberos or --without-kerberos was given.
1448 if test "${with_kerberos+set}" = set; then
1449   withval="$with_kerberos"
1450   
1451         ol_arg=invalid
1452         for ol_val in auto k5 k5only k425 kth k4 afs 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-kerberos" 1>&2; exit 1; }
1459         fi
1460         ol_with_kerberos="$ol_arg"
1461
1462 else
1463         ol_with_kerberos="auto"
1464 fi
1465 # end --with-kerberos
1466
1467 # OpenLDAP --with-readline
1468         # Check whether --with-readline or --without-readline was given.
1469 if test "${with_readline+set}" = set; then
1470   withval="$with_readline"
1471   
1472         ol_arg=invalid
1473         for ol_val in auto yes no  ; 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-readline" 1>&2; exit 1; }
1480         fi
1481         ol_with_readline="$ol_arg"
1482
1483 else
1484         ol_with_readline="auto"
1485 fi
1486 # end --with-readline
1487
1488 # OpenLDAP --with-threads
1489         # Check whether --with-threads or --without-threads was given.
1490 if test "${with_threads+set}" = set; then
1491   withval="$with_threads"
1492   
1493         ol_arg=invalid
1494         for ol_val in auto nt posix mach pth lwp yes no manual  ; 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-threads" 1>&2; exit 1; }
1501         fi
1502         ol_with_threads="$ol_arg"
1503
1504 else
1505         ol_with_threads="auto"
1506 fi
1507 # end --with-threads
1508
1509 # OpenLDAP --with-tls
1510         # Check whether --with-tls or --without-tls was given.
1511 if test "${with_tls+set}" = set; then
1512   withval="$with_tls"
1513   
1514         ol_arg=invalid
1515         for ol_val in auto ssleay openssl yes no  ; 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-tls" 1>&2; exit 1; }
1522         fi
1523         ol_with_tls="$ol_arg"
1524
1525 else
1526         ol_with_tls="auto"
1527 fi
1528 # end --with-tls
1529
1530 # OpenLDAP --with-yielding_select
1531         # Check whether --with-yielding_select or --without-yielding_select was given.
1532 if test "${with_yielding_select+set}" = set; then
1533   withval="$with_yielding_select"
1534   
1535         ol_arg=invalid
1536         for ol_val in auto yes no manual  ; do
1537                 if test "$withval" = "$ol_val" ; then
1538                         ol_arg="$ol_val"
1539                 fi
1540         done
1541         if test "$ol_arg" = "invalid" ; then
1542                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1543         fi
1544         ol_with_yielding_select="$ol_arg"
1545
1546 else
1547         ol_with_yielding_select="auto"
1548 fi
1549 # end --with-yielding_select
1550
1551
1552 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1553 if test "${with_xxldapdoptions+set}" = set; then
1554   withval="$with_xxldapdoptions"
1555   :
1556 fi
1557
1558 # OpenLDAP --enable-ldapd
1559         # Check whether --enable-ldapd or --disable-ldapd was given.
1560 if test "${enable_ldapd+set}" = set; then
1561   enableval="$enable_ldapd"
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-ldapd" 1>&2; exit 1; }
1571         fi
1572         ol_enable_ldapd="$ol_arg"
1573
1574 else
1575         ol_enable_ldapd="no"
1576 fi
1577 # end --enable-ldapd
1578
1579 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1580 if test "${with_xxslapdoptions+set}" = set; then
1581   withval="$with_xxslapdoptions"
1582   :
1583 fi
1584
1585 # OpenLDAP --enable-slapd
1586         # Check whether --enable-slapd or --disable-slapd was given.
1587 if test "${enable_slapd+set}" = set; then
1588   enableval="$enable_slapd"
1589   
1590         ol_arg=invalid
1591         for ol_val in auto yes no ; do
1592                 if test "$enableval" = "$ol_val" ; then
1593                         ol_arg="$ol_val"
1594                 fi
1595         done
1596         if test "$ol_arg" = "invalid" ; then
1597                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1598         fi
1599         ol_enable_slapd="$ol_arg"
1600
1601 else
1602         ol_enable_slapd="yes"
1603 fi
1604 # end --enable-slapd
1605 # OpenLDAP --enable-cleartext
1606         # Check whether --enable-cleartext or --disable-cleartext was given.
1607 if test "${enable_cleartext+set}" = set; then
1608   enableval="$enable_cleartext"
1609   
1610         ol_arg=invalid
1611         for ol_val in auto yes no ; do
1612                 if test "$enableval" = "$ol_val" ; then
1613                         ol_arg="$ol_val"
1614                 fi
1615         done
1616         if test "$ol_arg" = "invalid" ; then
1617                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1618         fi
1619         ol_enable_cleartext="$ol_arg"
1620
1621 else
1622         ol_enable_cleartext="yes"
1623 fi
1624 # end --enable-cleartext
1625 # OpenLDAP --enable-crypt
1626         # Check whether --enable-crypt or --disable-crypt was given.
1627 if test "${enable_crypt+set}" = set; then
1628   enableval="$enable_crypt"
1629   
1630         ol_arg=invalid
1631         for ol_val in auto yes no ; do
1632                 if test "$enableval" = "$ol_val" ; then
1633                         ol_arg="$ol_val"
1634                 fi
1635         done
1636         if test "$ol_arg" = "invalid" ; then
1637                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1638         fi
1639         ol_enable_crypt="$ol_arg"
1640
1641 else
1642         ol_enable_crypt="auto"
1643 fi
1644 # end --enable-crypt
1645 # OpenLDAP --enable-kpasswd
1646         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1647 if test "${enable_kpasswd+set}" = set; then
1648   enableval="$enable_kpasswd"
1649   
1650         ol_arg=invalid
1651         for ol_val in auto yes no ; do
1652                 if test "$enableval" = "$ol_val" ; then
1653                         ol_arg="$ol_val"
1654                 fi
1655         done
1656         if test "$ol_arg" = "invalid" ; then
1657                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1658         fi
1659         ol_enable_kpasswd="$ol_arg"
1660
1661 else
1662         ol_enable_kpasswd="no"
1663 fi
1664 # end --enable-kpasswd
1665 # OpenLDAP --enable-spasswd
1666         # Check whether --enable-spasswd or --disable-spasswd was given.
1667 if test "${enable_spasswd+set}" = set; then
1668   enableval="$enable_spasswd"
1669   
1670         ol_arg=invalid
1671         for ol_val in auto yes no ; do
1672                 if test "$enableval" = "$ol_val" ; then
1673                         ol_arg="$ol_val"
1674                 fi
1675         done
1676         if test "$ol_arg" = "invalid" ; then
1677                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1678         fi
1679         ol_enable_spasswd="$ol_arg"
1680
1681 else
1682         ol_enable_spasswd="no"
1683 fi
1684 # end --enable-spasswd
1685 # OpenLDAP --enable-modules
1686         # Check whether --enable-modules or --disable-modules was given.
1687 if test "${enable_modules+set}" = set; then
1688   enableval="$enable_modules"
1689   
1690         ol_arg=invalid
1691         for ol_val in auto yes no ; do
1692                 if test "$enableval" = "$ol_val" ; then
1693                         ol_arg="$ol_val"
1694                 fi
1695         done
1696         if test "$ol_arg" = "invalid" ; then
1697                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1698         fi
1699         ol_enable_modules="$ol_arg"
1700
1701 else
1702         ol_enable_modules="no"
1703 fi
1704 # end --enable-modules
1705 # OpenLDAP --enable-multimaster
1706         # Check whether --enable-multimaster or --disable-multimaster was given.
1707 if test "${enable_multimaster+set}" = set; then
1708   enableval="$enable_multimaster"
1709   
1710         ol_arg=invalid
1711         for ol_val in auto yes no ; do
1712                 if test "$enableval" = "$ol_val" ; then
1713                         ol_arg="$ol_val"
1714                 fi
1715         done
1716         if test "$ol_arg" = "invalid" ; then
1717                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1718         fi
1719         ol_enable_multimaster="$ol_arg"
1720
1721 else
1722         ol_enable_multimaster="no"
1723 fi
1724 # end --enable-multimaster
1725 # OpenLDAP --enable-phonetic
1726         # Check whether --enable-phonetic or --disable-phonetic was given.
1727 if test "${enable_phonetic+set}" = set; then
1728   enableval="$enable_phonetic"
1729   
1730         ol_arg=invalid
1731         for ol_val in auto yes no ; do
1732                 if test "$enableval" = "$ol_val" ; then
1733                         ol_arg="$ol_val"
1734                 fi
1735         done
1736         if test "$ol_arg" = "invalid" ; then
1737                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1738         fi
1739         ol_enable_phonetic="$ol_arg"
1740
1741 else
1742         ol_enable_phonetic="no"
1743 fi
1744 # end --enable-phonetic
1745 # OpenLDAP --enable-quipu
1746         # Check whether --enable-quipu or --disable-quipu was given.
1747 if test "${enable_quipu+set}" = set; then
1748   enableval="$enable_quipu"
1749   
1750         ol_arg=invalid
1751         for ol_val in auto yes no ; do
1752                 if test "$enableval" = "$ol_val" ; then
1753                         ol_arg="$ol_val"
1754                 fi
1755         done
1756         if test "$ol_arg" = "invalid" ; then
1757                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1758         fi
1759         ol_enable_quipu="$ol_arg"
1760
1761 else
1762         ol_enable_quipu="no"
1763 fi
1764 # end --enable-quipu
1765 # OpenLDAP --enable-rlookups
1766         # Check whether --enable-rlookups or --disable-rlookups was given.
1767 if test "${enable_rlookups+set}" = set; then
1768   enableval="$enable_rlookups"
1769   
1770         ol_arg=invalid
1771         for ol_val in auto yes no ; do
1772                 if test "$enableval" = "$ol_val" ; then
1773                         ol_arg="$ol_val"
1774                 fi
1775         done
1776         if test "$ol_arg" = "invalid" ; then
1777                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1778         fi
1779         ol_enable_rlookups="$ol_arg"
1780
1781 else
1782         ol_enable_rlookups="auto"
1783 fi
1784 # end --enable-rlookups
1785 # OpenLDAP --enable-aci
1786         # Check whether --enable-aci or --disable-aci was given.
1787 if test "${enable_aci+set}" = set; then
1788   enableval="$enable_aci"
1789   
1790         ol_arg=invalid
1791         for ol_val in auto yes no ; do
1792                 if test "$enableval" = "$ol_val" ; then
1793                         ol_arg="$ol_val"
1794                 fi
1795         done
1796         if test "$ol_arg" = "invalid" ; then
1797                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1798         fi
1799         ol_enable_aci="$ol_arg"
1800
1801 else
1802         ol_enable_aci="no"
1803 fi
1804 # end --enable-aci
1805 # OpenLDAP --enable-wrappers
1806         # Check whether --enable-wrappers or --disable-wrappers was given.
1807 if test "${enable_wrappers+set}" = set; then
1808   enableval="$enable_wrappers"
1809   
1810         ol_arg=invalid
1811         for ol_val in auto yes no ; do
1812                 if test "$enableval" = "$ol_val" ; then
1813                         ol_arg="$ol_val"
1814                 fi
1815         done
1816         if test "$ol_arg" = "invalid" ; then
1817                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1818         fi
1819         ol_enable_wrappers="$ol_arg"
1820
1821 else
1822         ol_enable_wrappers="no"
1823 fi
1824 # end --enable-wrappers
1825 # OpenLDAP --enable-dynamic
1826         # Check whether --enable-dynamic or --disable-dynamic was given.
1827 if test "${enable_dynamic+set}" = set; then
1828   enableval="$enable_dynamic"
1829   
1830         ol_arg=invalid
1831         for ol_val in auto yes no ; do
1832                 if test "$enableval" = "$ol_val" ; then
1833                         ol_arg="$ol_val"
1834                 fi
1835         done
1836         if test "$ol_arg" = "invalid" ; then
1837                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1838         fi
1839         ol_enable_dynamic="$ol_arg"
1840
1841 else
1842         ol_enable_dynamic="no"
1843 fi
1844 # end --enable-dynamic
1845
1846 # OpenLDAP --enable-bdb2
1847         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1848 if test "${enable_bdb2+set}" = set; then
1849   enableval="$enable_bdb2"
1850   
1851         ol_arg=invalid
1852         for ol_val in auto yes no ; do
1853                 if test "$enableval" = "$ol_val" ; then
1854                         ol_arg="$ol_val"
1855                 fi
1856         done
1857         if test "$ol_arg" = "invalid" ; then
1858                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1859         fi
1860         ol_enable_bdb2="$ol_arg"
1861
1862 else
1863         ol_enable_bdb2="no"
1864 fi
1865 # end --enable-bdb2
1866 # OpenLDAP --with-bdb2_module
1867         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1868 if test "${with_bdb2_module+set}" = set; then
1869   withval="$with_bdb2_module"
1870   
1871         ol_arg=invalid
1872         for ol_val in static dynamic ; do
1873                 if test "$withval" = "$ol_val" ; then
1874                         ol_arg="$ol_val"
1875                 fi
1876         done
1877         if test "$ol_arg" = "invalid" ; then
1878                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1879         fi
1880         ol_with_bdb2_module="$ol_arg"
1881
1882 else
1883         ol_with_bdb2_module="static"
1884 fi
1885 # end --with-bdb2_module
1886
1887 # OpenLDAP --enable-dnssrv
1888         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1889 if test "${enable_dnssrv+set}" = set; then
1890   enableval="$enable_dnssrv"
1891   
1892         ol_arg=invalid
1893         for ol_val in auto yes no ; do
1894                 if test "$enableval" = "$ol_val" ; then
1895                         ol_arg="$ol_val"
1896                 fi
1897         done
1898         if test "$ol_arg" = "invalid" ; then
1899                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1900         fi
1901         ol_enable_dnssrv="$ol_arg"
1902
1903 else
1904         ol_enable_dnssrv="no"
1905 fi
1906 # end --enable-dnssrv
1907 # OpenLDAP --with-dnssrv_module
1908         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1909 if test "${with_dnssrv_module+set}" = set; then
1910   withval="$with_dnssrv_module"
1911   
1912         ol_arg=invalid
1913         for ol_val in static dynamic ; do
1914                 if test "$withval" = "$ol_val" ; then
1915                         ol_arg="$ol_val"
1916                 fi
1917         done
1918         if test "$ol_arg" = "invalid" ; then
1919                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1920         fi
1921         ol_with_dnssrv_module="$ol_arg"
1922
1923 else
1924         ol_with_dnssrv_module="static"
1925 fi
1926 # end --with-dnssrv_module
1927
1928 # OpenLDAP --enable-ldap
1929         # Check whether --enable-ldap or --disable-ldap was given.
1930 if test "${enable_ldap+set}" = set; then
1931   enableval="$enable_ldap"
1932   
1933         ol_arg=invalid
1934         for ol_val in auto yes no ; do
1935                 if test "$enableval" = "$ol_val" ; then
1936                         ol_arg="$ol_val"
1937                 fi
1938         done
1939         if test "$ol_arg" = "invalid" ; then
1940                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1941         fi
1942         ol_enable_ldap="$ol_arg"
1943
1944 else
1945         ol_enable_ldap="no"
1946 fi
1947 # end --enable-ldap
1948 # OpenLDAP --with-ldap_module
1949         # Check whether --with-ldap_module or --without-ldap_module was given.
1950 if test "${with_ldap_module+set}" = set; then
1951   withval="$with_ldap_module"
1952   
1953         ol_arg=invalid
1954         for ol_val in static dynamic ; do
1955                 if test "$withval" = "$ol_val" ; then
1956                         ol_arg="$ol_val"
1957                 fi
1958         done
1959         if test "$ol_arg" = "invalid" ; then
1960                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1961         fi
1962         ol_with_ldap_module="$ol_arg"
1963
1964 else
1965         ol_with_ldap_module="static"
1966 fi
1967 # end --with-ldap_module
1968
1969 # OpenLDAP --enable-ldbm
1970         # Check whether --enable-ldbm or --disable-ldbm was given.
1971 if test "${enable_ldbm+set}" = set; then
1972   enableval="$enable_ldbm"
1973   
1974         ol_arg=invalid
1975         for ol_val in auto yes no ; do
1976                 if test "$enableval" = "$ol_val" ; then
1977                         ol_arg="$ol_val"
1978                 fi
1979         done
1980         if test "$ol_arg" = "invalid" ; then
1981                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1982         fi
1983         ol_enable_ldbm="$ol_arg"
1984
1985 else
1986         ol_enable_ldbm="yes"
1987 fi
1988 # end --enable-ldbm
1989 # OpenLDAP --with-ldbm_api
1990         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1991 if test "${with_ldbm_api+set}" = set; then
1992   withval="$with_ldbm_api"
1993   
1994         ol_arg=invalid
1995         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1996                 if test "$withval" = "$ol_val" ; then
1997                         ol_arg="$ol_val"
1998                 fi
1999         done
2000         if test "$ol_arg" = "invalid" ; then
2001                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2002         fi
2003         ol_with_ldbm_api="$ol_arg"
2004
2005 else
2006         ol_with_ldbm_api="auto"
2007 fi
2008 # end --with-ldbm_api
2009
2010 # OpenLDAP --with-ldbm_module
2011         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2012 if test "${with_ldbm_module+set}" = set; then
2013   withval="$with_ldbm_module"
2014   
2015         ol_arg=invalid
2016         for ol_val in static dynamic ; do
2017                 if test "$withval" = "$ol_val" ; then
2018                         ol_arg="$ol_val"
2019                 fi
2020         done
2021         if test "$ol_arg" = "invalid" ; then
2022                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2023         fi
2024         ol_with_ldbm_module="$ol_arg"
2025
2026 else
2027         ol_with_ldbm_module="static"
2028 fi
2029 # end --with-ldbm_module
2030
2031 # OpenLDAP --with-ldbm_type
2032         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2033 if test "${with_ldbm_type+set}" = set; then
2034   withval="$with_ldbm_type"
2035   
2036         ol_arg=invalid
2037         for ol_val in auto btree hash ; do
2038                 if test "$withval" = "$ol_val" ; then
2039                         ol_arg="$ol_val"
2040                 fi
2041         done
2042         if test "$ol_arg" = "invalid" ; then
2043                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2044         fi
2045         ol_with_ldbm_type="$ol_arg"
2046
2047 else
2048         ol_with_ldbm_type="auto"
2049 fi
2050 # end --with-ldbm_type
2051
2052 # OpenLDAP --enable-passwd
2053         # Check whether --enable-passwd or --disable-passwd was given.
2054 if test "${enable_passwd+set}" = set; then
2055   enableval="$enable_passwd"
2056   
2057         ol_arg=invalid
2058         for ol_val in auto yes no ; do
2059                 if test "$enableval" = "$ol_val" ; then
2060                         ol_arg="$ol_val"
2061                 fi
2062         done
2063         if test "$ol_arg" = "invalid" ; then
2064                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2065         fi
2066         ol_enable_passwd="$ol_arg"
2067
2068 else
2069         ol_enable_passwd="no"
2070 fi
2071 # end --enable-passwd
2072 # OpenLDAP --with-passwd_module
2073         # Check whether --with-passwd_module or --without-passwd_module was given.
2074 if test "${with_passwd_module+set}" = set; then
2075   withval="$with_passwd_module"
2076   
2077         ol_arg=invalid
2078         for ol_val in static dynamic ; do
2079                 if test "$withval" = "$ol_val" ; then
2080                         ol_arg="$ol_val"
2081                 fi
2082         done
2083         if test "$ol_arg" = "invalid" ; then
2084                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2085         fi
2086         ol_with_passwd_module="$ol_arg"
2087
2088 else
2089         ol_with_passwd_module="static"
2090 fi
2091 # end --with-passwd_module
2092
2093 # OpenLDAP --enable-perl
2094         # Check whether --enable-perl or --disable-perl was given.
2095 if test "${enable_perl+set}" = set; then
2096   enableval="$enable_perl"
2097   
2098         ol_arg=invalid
2099         for ol_val in auto yes no ; do
2100                 if test "$enableval" = "$ol_val" ; then
2101                         ol_arg="$ol_val"
2102                 fi
2103         done
2104         if test "$ol_arg" = "invalid" ; then
2105                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2106         fi
2107         ol_enable_perl="$ol_arg"
2108
2109 else
2110         ol_enable_perl="no"
2111 fi
2112 # end --enable-perl
2113 # OpenLDAP --with-perl_module
2114         # Check whether --with-perl_module or --without-perl_module was given.
2115 if test "${with_perl_module+set}" = set; then
2116   withval="$with_perl_module"
2117   
2118         ol_arg=invalid
2119         for ol_val in static dynamic ; do
2120                 if test "$withval" = "$ol_val" ; then
2121                         ol_arg="$ol_val"
2122                 fi
2123         done
2124         if test "$ol_arg" = "invalid" ; then
2125                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2126         fi
2127         ol_with_perl_module="$ol_arg"
2128
2129 else
2130         ol_with_perl_module="static"
2131 fi
2132 # end --with-perl_module
2133
2134 # OpenLDAP --enable-shell
2135         # Check whether --enable-shell or --disable-shell was given.
2136 if test "${enable_shell+set}" = set; then
2137   enableval="$enable_shell"
2138   
2139         ol_arg=invalid
2140         for ol_val in auto yes no ; do
2141                 if test "$enableval" = "$ol_val" ; then
2142                         ol_arg="$ol_val"
2143                 fi
2144         done
2145         if test "$ol_arg" = "invalid" ; then
2146                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2147         fi
2148         ol_enable_shell="$ol_arg"
2149
2150 else
2151         ol_enable_shell="no"
2152 fi
2153 # end --enable-shell
2154 # OpenLDAP --with-shell_module
2155         # Check whether --with-shell_module or --without-shell_module was given.
2156 if test "${with_shell_module+set}" = set; then
2157   withval="$with_shell_module"
2158   
2159         ol_arg=invalid
2160         for ol_val in static dynamic ; do
2161                 if test "$withval" = "$ol_val" ; then
2162                         ol_arg="$ol_val"
2163                 fi
2164         done
2165         if test "$ol_arg" = "invalid" ; then
2166                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2167         fi
2168         ol_with_shell_module="$ol_arg"
2169
2170 else
2171         ol_with_shell_module="static"
2172 fi
2173 # end --with-shell_module
2174
2175 # OpenLDAP --enable-sql
2176         # Check whether --enable-sql or --disable-sql was given.
2177 if test "${enable_sql+set}" = set; then
2178   enableval="$enable_sql"
2179   
2180         ol_arg=invalid
2181         for ol_val in auto yes no ; do
2182                 if test "$enableval" = "$ol_val" ; then
2183                         ol_arg="$ol_val"
2184                 fi
2185         done
2186         if test "$ol_arg" = "invalid" ; then
2187                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2188         fi
2189         ol_enable_sql="$ol_arg"
2190
2191 else
2192         ol_enable_sql="no"
2193 fi
2194 # end --enable-sql
2195 # OpenLDAP --with-sql_module
2196         # Check whether --with-sql_module or --without-sql_module was given.
2197 if test "${with_sql_module+set}" = set; then
2198   withval="$with_sql_module"
2199   
2200         ol_arg=invalid
2201         for ol_val in static dynamic ; do
2202                 if test "$withval" = "$ol_val" ; then
2203                         ol_arg="$ol_val"
2204                 fi
2205         done
2206         if test "$ol_arg" = "invalid" ; then
2207                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2208         fi
2209         ol_with_sql_module="$ol_arg"
2210
2211 else
2212         ol_with_sql_module="static"
2213 fi
2214 # end --with-sql_module
2215
2216 # OpenLDAP --enable-tcl
2217         # Check whether --enable-tcl or --disable-tcl was given.
2218 if test "${enable_tcl+set}" = set; then
2219   enableval="$enable_tcl"
2220   
2221         ol_arg=invalid
2222         for ol_val in auto yes no ; do
2223                 if test "$enableval" = "$ol_val" ; then
2224                         ol_arg="$ol_val"
2225                 fi
2226         done
2227         if test "$ol_arg" = "invalid" ; then
2228                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2229         fi
2230         ol_enable_tcl="$ol_arg"
2231
2232 else
2233         ol_enable_tcl="no"
2234 fi
2235 # end --enable-tcl
2236 # OpenLDAP --with-tcl_module
2237         # Check whether --with-tcl_module or --without-tcl_module was given.
2238 if test "${with_tcl_module+set}" = set; then
2239   withval="$with_tcl_module"
2240   
2241         ol_arg=invalid
2242         for ol_val in static dynamic ; do
2243                 if test "$withval" = "$ol_val" ; then
2244                         ol_arg="$ol_val"
2245                 fi
2246         done
2247         if test "$ol_arg" = "invalid" ; then
2248                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2249         fi
2250         ol_with_tcl_module="$ol_arg"
2251
2252 else
2253         ol_with_tcl_module="static"
2254 fi
2255 # end --with-tcl_module
2256
2257
2258 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2259 if test "${with_xxslurpdoptions+set}" = set; then
2260   withval="$with_xxslurpdoptions"
2261   :
2262 fi
2263
2264 # OpenLDAP --enable-slurpd
2265         # Check whether --enable-slurpd or --disable-slurpd was given.
2266 if test "${enable_slurpd+set}" = set; then
2267   enableval="$enable_slurpd"
2268   
2269         ol_arg=invalid
2270         for ol_val in auto yes no ; do
2271                 if test "$enableval" = "$ol_val" ; then
2272                         ol_arg="$ol_val"
2273                 fi
2274         done
2275         if test "$ol_arg" = "invalid" ; then
2276                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2277         fi
2278         ol_enable_slurpd="$ol_arg"
2279
2280 else
2281         ol_enable_slurpd="auto"
2282 fi
2283 # end --enable-slurpd
2284
2285 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2286 if test "${with_xxliboptions+set}" = set; then
2287   withval="$with_xxliboptions"
2288   :
2289 fi
2290
2291 # Check whether --enable-static or --disable-static was given.
2292 if test "${enable_static+set}" = set; then
2293   enableval="$enable_static"
2294   p=${PACKAGE-default}
2295 case "$enableval" in
2296 yes) enable_static=yes ;;
2297 no) enable_static=no ;;
2298 *)
2299   enable_static=no
2300   # Look at the argument we got.  We use all the common list separators.
2301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2302   for pkg in $enableval; do
2303     if test "X$pkg" = "X$p"; then
2304       enable_static=yes
2305     fi
2306   done
2307   IFS="$ac_save_ifs"
2308   ;;
2309 esac
2310 else
2311   enable_static=yes
2312 fi
2313
2314 # Check whether --enable-shared or --disable-shared was given.
2315 if test "${enable_shared+set}" = set; then
2316   enableval="$enable_shared"
2317   p=${PACKAGE-default}
2318 case "$enableval" in
2319 yes) enable_shared=yes ;;
2320 no) enable_shared=no ;;
2321 *)
2322   enable_shared=no
2323   # Look at the argument we got.  We use all the common list separators.
2324   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2325   for pkg in $enableval; do
2326     if test "X$pkg" = "X$p"; then
2327       enable_shared=yes
2328     fi
2329   done
2330   IFS="$ac_save_ifs"
2331   ;;
2332 esac
2333 else
2334   enable_shared=yes
2335 fi
2336
2337
2338
2339 # validate options
2340 if test $ol_enable_dns = yes ; then
2341         if test $ol_enable_referrals = no ; then
2342                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2343         fi
2344         if test $ol_enable_referrals = auto ; then
2345                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2346                 ol_enable_referrals=yes
2347         fi
2348 fi
2349
2350 if test $ol_enable_slapd = no ; then
2351                 if test $ol_enable_bdb2 = yes ; then
2352                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2353         fi
2354         if test $ol_enable_dnssrv = yes ; then
2355                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2356         fi
2357         if test $ol_enable_ldap = yes ; then
2358                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2359         fi
2360         if test $ol_enable_ldbm = yes ; then
2361                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2362         fi
2363         if test $ol_enable_passwd = yes ; then
2364                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2365         fi
2366         if test $ol_enable_perl = yes ; then
2367                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2368         fi
2369         if test $ol_enable_shell = yes ; then
2370                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2371         fi
2372         if test $ol_enable_tcl = yes ; then
2373                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2374         fi
2375         if test $ol_enable_sql = yes ; then
2376                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2377         fi
2378         if test $ol_enable_modules = yes ; then
2379                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2380         fi
2381         if test $ol_enable_multimaster = yes ; then
2382                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2383         fi
2384         if test $ol_enable_wrappers = yes ; then
2385                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2386         fi
2387         if test $ol_enable_phonetic = yes ; then
2388                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2389         fi
2390         if test $ol_enable_quipu = yes ; then
2391                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2392         fi
2393         if test $ol_enable_rlookups = yes ; then
2394                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2395         fi
2396         if test $ol_enable_aci = yes ; then
2397                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2398         fi
2399         if test $ol_with_ldbm_api != auto ; then
2400                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2401         fi
2402         if test $ol_with_ldbm_type != auto ; then
2403                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2404         fi
2405         if test $ol_with_bdb2_module != static ; then
2406                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2407         fi
2408         if test $ol_with_dnssrv_module != static ; then
2409                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2410         fi
2411         if test $ol_with_ldap_module != static ; then
2412                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2413         fi
2414         if test $ol_with_ldbm_module != static ; then
2415                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2416         fi
2417         if test $ol_with_passwd_module != static ; then
2418                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2419         fi
2420         if test $ol_with_perl_module != static ; then
2421                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2422         fi
2423         if test $ol_with_shell_module != static ; then
2424                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2425         fi
2426         if test $ol_with_tcl_module != static ; then
2427                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2428         fi
2429         if test $ol_with_sql_module != static ; then
2430                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2431         fi
2432         if test $ol_enable_slurpd = yes ; then
2433                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2434         fi
2435
2436         # force settings to no
2437         ol_enable_bdb2=no
2438         ol_enable_dnssrv=no
2439         ol_enable_ldap=no
2440         ol_enable_ldbm=no
2441         ol_enable_passwd=no
2442         ol_enable_perl=no
2443         ol_enable_shell=no
2444         ol_enable_tcl=no
2445         ol_enable_sql=no
2446
2447         ol_enable_modules=no
2448         ol_enable_multimaster=no
2449         ol_enable_phonetic=no
2450         ol_enable_quipu=no
2451         ol_enable_rlookups=no
2452         ol_enable_aci=no
2453         ol_enable_wrappers=no
2454         ol_enable_dynamic=no
2455
2456         ol_with_ldbm_api=no
2457         ol_with_ldbm_type=no
2458
2459         ol_with_bdb2_module=static
2460         ol_with_dnssrv_module=static
2461         ol_with_ldap_module=static
2462         ol_with_ldbm_module=static
2463         ol_with_passwd_module=static
2464         ol_with_perl_module=static
2465         ol_with_shell_module=static
2466         ol_with_tcl_module=static
2467         ol_with_sql_module=static
2468
2469         ol_enable_slurpd=no
2470
2471 elif test $ol_enable_ldbm = no ; then
2472         
2473         if test $ol_with_ldbm_api != auto ; then
2474                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2475         fi
2476
2477         if test $ol_with_ldbm_type != auto ; then
2478                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2479         fi
2480
2481         if test $ol_with_ldbm_module != static ; then
2482                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2483         fi
2484
2485         if test $ol_enable_bdb2 = yes ; then
2486                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2487         fi
2488
2489         if test $ol_enable_modules != yes -a \
2490                 $ol_enable_dnssrv = no -a \
2491                 $ol_enable_ldap = no -a \
2492                 $ol_enable_passwd = no -a \
2493                 $ol_enable_perl = no -a \
2494                 $ol_enable_shell = no -a \
2495                 $ol_enable_sql = no -a \
2496                 $ol_enable_tcl = no ; then
2497                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2498         fi
2499
2500         ol_with_ldbm_api=no
2501         ol_with_ldbm_type=no
2502         ol_with_ldbm_module=static
2503
2504 elif test $ol_enable_bdb2 = yes ; then
2505         
2506         if test $ol_with_ldbm_api != auto -a \
2507                 $ol_with_ldbm_api != berkeley ; then
2508                 { echo "configure: error: BDB2 requires LDBM API berkeley or auto" 1>&2; exit 1; }
2509         fi
2510
2511         ol_with_ldbm_api=db2
2512
2513 else
2514         
2515         if test $ol_enable_bdb2 != no ; then
2516                 if test $ol_with_ldbm_api != auto -a \
2517                         $ol_with_ldbm_api != berkeley ; then
2518                         echo "configure: warning: BDB2 requires LDBM api berkeley or auto" 1>&2
2519                         ol_enable_bdb2=no
2520                 fi
2521         fi
2522
2523         if test $ol_with_ldbm_api = gdbm -a \
2524                 $ol_with_ldbm_type = btree ; then
2525                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2526         fi
2527         if test $ol_with_ldbm_api = mdbm -a \
2528                 $ol_with_ldbm_type = btree ; then
2529                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2530         fi
2531         if test $ol_with_ldbm_api = ndbm -a \
2532                 $ol_with_ldbm_type = btree ; then
2533                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2534         fi
2535 fi
2536
2537 if test $ol_enable_slurpd = yes ; then
2538                 if test $ol_with_threads = no ; then
2539                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2540         fi
2541 fi
2542
2543 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2544         if test $ol_with_kerberos = no ; then
2545                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2546         fi
2547 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2548         if test $ol_with_kerberos != auto ; then
2549                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2550         else
2551                 ol_with_kerberos=no
2552         fi
2553 fi
2554
2555 if test $ol_enable_spasswd = yes ; then
2556         if test $ol_with_cyrus_sasl = no ; then
2557                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2558         fi
2559         ol_link_spasswd=yes
2560 fi
2561
2562 echo "$ac_t""done" 1>&6
2563
2564 LDAP_LIBS=
2565 LDIF_LIBS=
2566 LDBM_LIBS=
2567 LTHREAD_LIBS=
2568 LUTIL_LIBS=
2569
2570 LDAPD_LIBS=
2571 SLAPD_LIBS=
2572 SLURPD_LIBS=
2573
2574 BUILD_LDAPD=no
2575 BUILD_SLAPD=no
2576 BUILD_SLURPD=no
2577
2578 BUILD_QUIPU=no
2579 BUILD_THREAD=no
2580
2581 BUILD_BDB2=no
2582 BUILD_DNSSRV=no
2583 BUILD_LDAP=no
2584 BUILD_LDBM=no
2585 BUILD_PASSWD=no
2586 BUILD_PERL=no
2587 BUILD_SHELL=no
2588 BUILD_SQL=no
2589 BUILD_TCL=no
2590
2591 BUILD_BDB2_DYNAMIC=static
2592 BUILD_DNSSRV_DYNAMIC=static
2593 BUILD_LDAP_DYNAMIC=static
2594 BUILD_LDBM_DYNAMIC=static
2595 BUILD_PASSWD_DYNAMIC=static
2596 BUILD_PERL_DYNAMIC=static
2597 BUILD_SHELL_DYNAMIC=static
2598 BUILD_TCL_DYNAMIC=static
2599 BUILD_SQL_DYNAMIC=static
2600
2601 SLAPD_MODULES_LDFLAGS=
2602 SLAPD_MODULES_CPPFLAGS=
2603 SLAPD_MODULES_LIST=
2604
2605 SLAPD_PERL_LDFLAGS=
2606 MOD_PERL_LDFLAGS=
2607 PERL_CPPFLAGS=
2608
2609 SLAPD_SQL_LDFLAGS=
2610 SLAPD_SQL_LIBS=
2611 SLAPD_SQL_INCLUDES=
2612
2613 MOD_TCL_LIB=
2614 KRB4_LIBS=
2615 KRB5_LIBS=
2616 READLINE_LIBS=
2617 SASL_LIBS=
2618 TERMCAP_LIBS=
2619 TLS_LIBS=
2620 MODULES_LIBS=
2621 AUTH_LIBS=
2622
2623
2624
2625 cat >> confdefs.h <<\EOF
2626 #define HAVE_MKVERSION 1
2627 EOF
2628
2629
2630
2631
2632 ol_aix_threads=no
2633 case "$target" in
2634 *-*-aix*)       if test -z "$CC" ; then
2635                 case "$ol_with_threads" in
2636                 auto | yes |  posix) ol_aix_threads=yes ;;
2637                 esac
2638         fi
2639 ;;
2640 esac
2641
2642 if test $ol_aix_threads = yes ; then
2643         if test -z "${CC}" ; then
2644                 for ac_prog in cc_r xlc_r cc
2645 do
2646 # Extract the first word of "$ac_prog", so it can be a program name with args.
2647 set dummy $ac_prog; ac_word=$2
2648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2649 echo "configure:2650: checking for $ac_word" >&5
2650 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2651   echo $ac_n "(cached) $ac_c" 1>&6
2652 else
2653   if test -n "$CC"; then
2654   ac_cv_prog_CC="$CC" # Let the user override the test.
2655 else
2656   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2657   ac_dummy="$PATH"
2658   for ac_dir in $ac_dummy; do
2659     test -z "$ac_dir" && ac_dir=.
2660     if test -f $ac_dir/$ac_word; then
2661       ac_cv_prog_CC="$ac_prog"
2662       break
2663     fi
2664   done
2665   IFS="$ac_save_ifs"
2666 fi
2667 fi
2668 CC="$ac_cv_prog_CC"
2669 if test -n "$CC"; then
2670   echo "$ac_t""$CC" 1>&6
2671 else
2672   echo "$ac_t""no" 1>&6
2673 fi
2674
2675 test -n "$CC" && break
2676 done
2677
2678
2679                 if test "$CC" = cc ; then
2680                                                 if test $ol_with_threads != auto ; then
2681                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2682                         else
2683                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2684                         fi
2685                         ol_with_threads=no
2686                 fi
2687         fi
2688
2689         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2690                 ol_with_threads=posix
2691                 ol_cv_pthread_create=yes
2692         fi
2693 fi
2694
2695 if test -z "${CC}"; then
2696         for ac_prog in cc
2697 do
2698 # Extract the first word of "$ac_prog", so it can be a program name with args.
2699 set dummy $ac_prog; ac_word=$2
2700 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2701 echo "configure:2702: checking for $ac_word" >&5
2702 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2703   echo $ac_n "(cached) $ac_c" 1>&6
2704 else
2705   if test -n "$CC"; then
2706   ac_cv_prog_CC="$CC" # Let the user override the test.
2707 else
2708   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2709   ac_dummy="$PATH"
2710   for ac_dir in $ac_dummy; do
2711     test -z "$ac_dir" && ac_dir=.
2712     if test -f $ac_dir/$ac_word; then
2713       ac_cv_prog_CC="$ac_prog"
2714       break
2715     fi
2716   done
2717   IFS="$ac_save_ifs"
2718 fi
2719 fi
2720 CC="$ac_cv_prog_CC"
2721 if test -n "$CC"; then
2722   echo "$ac_t""$CC" 1>&6
2723 else
2724   echo "$ac_t""no" 1>&6
2725 fi
2726
2727 test -n "$CC" && break
2728 done
2729
2730 fi
2731
2732
2733
2734
2735 # Check whether --enable-fast-install or --disable-fast-install was given.
2736 if test "${enable_fast_install+set}" = set; then
2737   enableval="$enable_fast_install"
2738   p=${PACKAGE-default}
2739 case "$enableval" in
2740 yes) enable_fast_install=yes ;;
2741 no) enable_fast_install=no ;;
2742 *)
2743   enable_fast_install=no
2744   # Look at the argument we got.  We use all the common list separators.
2745   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2746   for pkg in $enableval; do
2747     if test "X$pkg" = "X$p"; then
2748       enable_fast_install=yes
2749     fi
2750   done
2751   IFS="$ac_save_ifs"
2752   ;;
2753 esac
2754 else
2755   enable_fast_install=yes
2756 fi
2757
2758 # Extract the first word of "ranlib", so it can be a program name with args.
2759 set dummy ranlib; ac_word=$2
2760 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2761 echo "configure:2762: checking for $ac_word" >&5
2762 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2763   echo $ac_n "(cached) $ac_c" 1>&6
2764 else
2765   if test -n "$RANLIB"; then
2766   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2767 else
2768   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2769   ac_dummy="$PATH"
2770   for ac_dir in $ac_dummy; do
2771     test -z "$ac_dir" && ac_dir=.
2772     if test -f $ac_dir/$ac_word; then
2773       ac_cv_prog_RANLIB="ranlib"
2774       break
2775     fi
2776   done
2777   IFS="$ac_save_ifs"
2778   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2779 fi
2780 fi
2781 RANLIB="$ac_cv_prog_RANLIB"
2782 if test -n "$RANLIB"; then
2783   echo "$ac_t""$RANLIB" 1>&6
2784 else
2785   echo "$ac_t""no" 1>&6
2786 fi
2787
2788 # Extract the first word of "gcc", so it can be a program name with args.
2789 set dummy gcc; 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="gcc"
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 if test -z "$CC"; then
2818   # Extract the first word of "cc", so it can be a program name with args.
2819 set dummy cc; ac_word=$2
2820 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2821 echo "configure:2822: checking for $ac_word" >&5
2822 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2823   echo $ac_n "(cached) $ac_c" 1>&6
2824 else
2825   if test -n "$CC"; then
2826   ac_cv_prog_CC="$CC" # Let the user override the test.
2827 else
2828   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2829   ac_prog_rejected=no
2830   ac_dummy="$PATH"
2831   for ac_dir in $ac_dummy; do
2832     test -z "$ac_dir" && ac_dir=.
2833     if test -f $ac_dir/$ac_word; then
2834       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2835         ac_prog_rejected=yes
2836         continue
2837       fi
2838       ac_cv_prog_CC="cc"
2839       break
2840     fi
2841   done
2842   IFS="$ac_save_ifs"
2843 if test $ac_prog_rejected = yes; then
2844   # We found a bogon in the path, so make sure we never use it.
2845   set dummy $ac_cv_prog_CC
2846   shift
2847   if test $# -gt 0; then
2848     # We chose a different compiler from the bogus one.
2849     # However, it has the same basename, so the bogon will be chosen
2850     # first if we set CC to just the basename; use the full file name.
2851     shift
2852     set dummy "$ac_dir/$ac_word" "$@"
2853     shift
2854     ac_cv_prog_CC="$@"
2855   fi
2856 fi
2857 fi
2858 fi
2859 CC="$ac_cv_prog_CC"
2860 if test -n "$CC"; then
2861   echo "$ac_t""$CC" 1>&6
2862 else
2863   echo "$ac_t""no" 1>&6
2864 fi
2865
2866   if test -z "$CC"; then
2867     case "`uname -s`" in
2868     *win32* | *WIN32* | *CYGWIN*)
2869       # Extract the first word of "cl", so it can be a program name with args.
2870 set dummy cl; ac_word=$2
2871 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2872 echo "configure:2873: checking for $ac_word" >&5
2873 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2874   echo $ac_n "(cached) $ac_c" 1>&6
2875 else
2876   if test -n "$CC"; then
2877   ac_cv_prog_CC="$CC" # Let the user override the test.
2878 else
2879   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2880   ac_dummy="$PATH"
2881   for ac_dir in $ac_dummy; do
2882     test -z "$ac_dir" && ac_dir=.
2883     if test -f $ac_dir/$ac_word; then
2884       ac_cv_prog_CC="cl"
2885       break
2886     fi
2887   done
2888   IFS="$ac_save_ifs"
2889 fi
2890 fi
2891 CC="$ac_cv_prog_CC"
2892 if test -n "$CC"; then
2893   echo "$ac_t""$CC" 1>&6
2894 else
2895   echo "$ac_t""no" 1>&6
2896 fi
2897  ;;
2898     esac
2899   fi
2900   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2901 fi
2902
2903 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2904 echo "configure:2905: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2905
2906 ac_ext=c
2907 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2908 ac_cpp='$CPP $CPPFLAGS'
2909 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2910 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2911 cross_compiling=$ac_cv_prog_cc_cross
2912
2913 cat > conftest.$ac_ext << EOF
2914
2915 #line 2916 "configure"
2916 #include "confdefs.h"
2917
2918 main(){return(0);}
2919 EOF
2920 if { (eval echo configure:2921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2921   ac_cv_prog_cc_works=yes
2922   # If we can't run a trivial program, we are probably using a cross compiler.
2923   if (./conftest; exit) 2>/dev/null; then
2924     ac_cv_prog_cc_cross=no
2925   else
2926     ac_cv_prog_cc_cross=yes
2927   fi
2928 else
2929   echo "configure: failed program was:" >&5
2930   cat conftest.$ac_ext >&5
2931   ac_cv_prog_cc_works=no
2932 fi
2933 rm -fr conftest*
2934 ac_ext=c
2935 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2936 ac_cpp='$CPP $CPPFLAGS'
2937 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2938 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2939 cross_compiling=$ac_cv_prog_cc_cross
2940
2941 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2942 if test $ac_cv_prog_cc_works = no; then
2943   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2944 fi
2945 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2946 echo "configure:2947: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2947 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2948 cross_compiling=$ac_cv_prog_cc_cross
2949
2950 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2951 echo "configure:2952: checking whether we are using GNU C" >&5
2952 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2953   echo $ac_n "(cached) $ac_c" 1>&6
2954 else
2955   cat > conftest.c <<EOF
2956 #ifdef __GNUC__
2957   yes;
2958 #endif
2959 EOF
2960 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2961   ac_cv_prog_gcc=yes
2962 else
2963   ac_cv_prog_gcc=no
2964 fi
2965 fi
2966
2967 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2968
2969 if test $ac_cv_prog_gcc = yes; then
2970   GCC=yes
2971 else
2972   GCC=
2973 fi
2974
2975 ac_test_CFLAGS="${CFLAGS+set}"
2976 ac_save_CFLAGS="$CFLAGS"
2977 CFLAGS=
2978 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2979 echo "configure:2980: checking whether ${CC-cc} accepts -g" >&5
2980 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2981   echo $ac_n "(cached) $ac_c" 1>&6
2982 else
2983   echo 'void f(){}' > conftest.c
2984 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2985   ac_cv_prog_cc_g=yes
2986 else
2987   ac_cv_prog_cc_g=no
2988 fi
2989 rm -f conftest*
2990
2991 fi
2992
2993 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2994 if test "$ac_test_CFLAGS" = set; then
2995   CFLAGS="$ac_save_CFLAGS"
2996 elif test $ac_cv_prog_cc_g = yes; then
2997   if test "$GCC" = yes; then
2998     CFLAGS="-g -O2"
2999   else
3000     CFLAGS="-g"
3001   fi
3002 else
3003   if test "$GCC" = yes; then
3004     CFLAGS="-O2"
3005   else
3006     CFLAGS=
3007   fi
3008 fi
3009
3010 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3011 if test "${with_gnu_ld+set}" = set; then
3012   withval="$with_gnu_ld"
3013   test "$withval" = no || with_gnu_ld=yes
3014 else
3015   with_gnu_ld=no
3016 fi
3017
3018 ac_prog=ld
3019 if test "$ac_cv_prog_gcc" = yes; then
3020   # Check if gcc -print-prog-name=ld gives a path.
3021   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3022 echo "configure:3023: checking for ld used by GCC" >&5
3023   ac_prog=`($CC -print-prog-name=ld) 2>&5`
3024   case "$ac_prog" in
3025     # Accept absolute paths.
3026     [\\/]* | [A-Za-z]:[\\/]*)
3027       re_direlt='/[^/][^/]*/\.\./'
3028       # Canonicalize the path of ld
3029       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3030       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3031         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3032       done
3033       test -z "$LD" && LD="$ac_prog"
3034       ;;
3035   "")
3036     # If it fails, then pretend we aren't using GCC.
3037     ac_prog=ld
3038     ;;
3039   *)
3040     # If it is relative, then search for the first ld in PATH.
3041     with_gnu_ld=unknown
3042     ;;
3043   esac
3044 elif test "$with_gnu_ld" = yes; then
3045   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3046 echo "configure:3047: checking for GNU ld" >&5
3047 else
3048   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3049 echo "configure:3050: checking for non-GNU ld" >&5
3050 fi
3051 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
3052   echo $ac_n "(cached) $ac_c" 1>&6
3053 else
3054   if test -z "$LD"; then
3055   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3056   for ac_dir in $PATH; do
3057     test -z "$ac_dir" && ac_dir=.
3058     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3059       ac_cv_path_LD="$ac_dir/$ac_prog"
3060       # Check to see if the program is GNU ld.  I'd rather use --version,
3061       # but apparently some GNU ld's only accept -v.
3062       # Break only if it was the GNU/non-GNU ld that we prefer.
3063       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3064         test "$with_gnu_ld" != no && break
3065       else
3066         test "$with_gnu_ld" != yes && break
3067       fi
3068     fi
3069   done
3070   IFS="$ac_save_ifs"
3071 else
3072   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3073 fi
3074 fi
3075
3076 LD="$ac_cv_path_LD"
3077 if test -n "$LD"; then
3078   echo "$ac_t""$LD" 1>&6
3079 else
3080   echo "$ac_t""no" 1>&6
3081 fi
3082 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3083 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3084 echo "configure:3085: checking if the linker ($LD) is GNU ld" >&5
3085 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3086   echo $ac_n "(cached) $ac_c" 1>&6
3087 else
3088   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3089 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3090   ac_cv_prog_gnu_ld=yes
3091 else
3092   ac_cv_prog_gnu_ld=no
3093 fi
3094 fi
3095
3096 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3097
3098
3099 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3100 echo "configure:3101: checking for BSD-compatible nm" >&5
3101 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3102   echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104   if test -n "$NM"; then
3105   # Let the user override the test.
3106   ac_cv_path_NM="$NM"
3107 else
3108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3109   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3110     test -z "$ac_dir" && ac_dir=.
3111     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3112       # Check to see if the nm accepts a BSD-compat flag.
3113       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3114       #   nm: unknown option "B" ignored
3115       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3116         ac_cv_path_NM="$ac_dir/nm -B"
3117         break
3118       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3119         ac_cv_path_NM="$ac_dir/nm -p"
3120         break
3121       else
3122         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3123         continue # so that we can try to find one that supports BSD flags
3124       fi
3125     fi
3126   done
3127   IFS="$ac_save_ifs"
3128   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3129 fi
3130 fi
3131
3132 NM="$ac_cv_path_NM"
3133 echo "$ac_t""$NM" 1>&6
3134
3135 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3136 echo "configure:3137: checking whether ln -s works" >&5
3137 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3138   echo $ac_n "(cached) $ac_c" 1>&6
3139 else
3140   rm -f conftestdata
3141 if ln -s X conftestdata 2>/dev/null
3142 then
3143   rm -f conftestdata
3144   ac_cv_prog_LN_S="ln -s"
3145 else
3146   ac_cv_prog_LN_S=ln
3147 fi
3148 fi
3149 LN_S="$ac_cv_prog_LN_S"
3150 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3151   echo "$ac_t""yes" 1>&6
3152 else
3153   echo "$ac_t""no" 1>&6
3154 fi
3155
3156 if test $host != $build; then
3157   ac_tool_prefix=${host_alias}-
3158 else
3159   ac_tool_prefix=
3160 fi
3161
3162
3163 case "$target" in
3164 NONE) lt_target="$host" ;;
3165 *) lt_target="$target" ;;
3166 esac
3167
3168 # Check for any special flags to pass to ltconfig.
3169 libtool_flags="--cache-file=$cache_file"
3170 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3171 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3172 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3173 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3174 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3175 libtool_flags="$libtool_flags --enable-dlopen"
3176 libtool_flags="$libtool_flags --enable-win32-dll"
3177 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3178 if test "${enable_libtool_lock+set}" = set; then
3179   enableval="$enable_libtool_lock"
3180   :
3181 fi
3182
3183 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3184 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3185
3186 # Some flags need to be propagated to the compiler or linker for good
3187 # libtool support.
3188 case "$lt_target" in
3189 *-*-irix6*)
3190   # Find out which ABI we are using.
3191   echo '#line 3192 "configure"' > conftest.$ac_ext
3192   if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3193     case "`/usr/bin/file conftest.o`" in
3194     *32-bit*)
3195       LD="${LD-ld} -32"
3196       ;;
3197     *N32*)
3198       LD="${LD-ld} -n32"
3199       ;;
3200     *64-bit*)
3201       LD="${LD-ld} -64"
3202       ;;
3203     esac
3204   fi
3205   rm -rf conftest*
3206   ;;
3207
3208 *-*-sco3.2v5*)
3209   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3210   SAVE_CFLAGS="$CFLAGS"
3211   CFLAGS="$CFLAGS -belf"
3212   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3213 echo "configure:3214: checking whether the C compiler needs -belf" >&5
3214 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3215   echo $ac_n "(cached) $ac_c" 1>&6
3216 else
3217   cat > conftest.$ac_ext <<EOF
3218 #line 3219 "configure"
3219 #include "confdefs.h"
3220
3221 int main() {
3222
3223 ; return 0; }
3224 EOF
3225 if { (eval echo configure:3226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3226   rm -rf conftest*
3227   lt_cv_cc_needs_belf=yes
3228 else
3229   echo "configure: failed program was:" >&5
3230   cat conftest.$ac_ext >&5
3231   rm -rf conftest*
3232   lt_cv_cc_needs_belf=no
3233 fi
3234 rm -f conftest*
3235 fi
3236
3237 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3238   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3239     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3240     CFLAGS="$SAVE_CFLAGS"
3241   fi
3242   ;;
3243
3244 *-*-cygwin* | *-*-mingw*)
3245   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3246 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3247 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3248 echo "configure:3249: checking for $ac_word" >&5
3249 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3250   echo $ac_n "(cached) $ac_c" 1>&6
3251 else
3252   if test -n "$DLLTOOL"; then
3253   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3254 else
3255   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3256   ac_dummy="$PATH"
3257   for ac_dir in $ac_dummy; do
3258     test -z "$ac_dir" && ac_dir=.
3259     if test -f $ac_dir/$ac_word; then
3260       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3261       break
3262     fi
3263   done
3264   IFS="$ac_save_ifs"
3265 fi
3266 fi
3267 DLLTOOL="$ac_cv_prog_DLLTOOL"
3268 if test -n "$DLLTOOL"; then
3269   echo "$ac_t""$DLLTOOL" 1>&6
3270 else
3271   echo "$ac_t""no" 1>&6
3272 fi
3273
3274
3275 if test -z "$ac_cv_prog_DLLTOOL"; then
3276 if test -n "$ac_tool_prefix"; then
3277   # Extract the first word of "dlltool", so it can be a program name with args.
3278 set dummy dlltool; ac_word=$2
3279 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3280 echo "configure:3281: checking for $ac_word" >&5
3281 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3282   echo $ac_n "(cached) $ac_c" 1>&6
3283 else
3284   if test -n "$DLLTOOL"; then
3285   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3286 else
3287   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3288   ac_dummy="$PATH"
3289   for ac_dir in $ac_dummy; do
3290     test -z "$ac_dir" && ac_dir=.
3291     if test -f $ac_dir/$ac_word; then
3292       ac_cv_prog_DLLTOOL="dlltool"
3293       break
3294     fi
3295   done
3296   IFS="$ac_save_ifs"
3297   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3298 fi
3299 fi
3300 DLLTOOL="$ac_cv_prog_DLLTOOL"
3301 if test -n "$DLLTOOL"; then
3302   echo "$ac_t""$DLLTOOL" 1>&6
3303 else
3304   echo "$ac_t""no" 1>&6
3305 fi
3306
3307 else
3308   DLLTOOL="false"
3309 fi
3310 fi
3311
3312   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3313 set dummy ${ac_tool_prefix}as; ac_word=$2
3314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3315 echo "configure:3316: checking for $ac_word" >&5
3316 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3317   echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319   if test -n "$AS"; then
3320   ac_cv_prog_AS="$AS" # Let the user override the test.
3321 else
3322   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3323   ac_dummy="$PATH"
3324   for ac_dir in $ac_dummy; do
3325     test -z "$ac_dir" && ac_dir=.
3326     if test -f $ac_dir/$ac_word; then
3327       ac_cv_prog_AS="${ac_tool_prefix}as"
3328       break
3329     fi
3330   done
3331   IFS="$ac_save_ifs"
3332 fi
3333 fi
3334 AS="$ac_cv_prog_AS"
3335 if test -n "$AS"; then
3336   echo "$ac_t""$AS" 1>&6
3337 else
3338   echo "$ac_t""no" 1>&6
3339 fi
3340
3341
3342 if test -z "$ac_cv_prog_AS"; then
3343 if test -n "$ac_tool_prefix"; then
3344   # Extract the first word of "as", so it can be a program name with args.
3345 set dummy as; ac_word=$2
3346 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3347 echo "configure:3348: checking for $ac_word" >&5
3348 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3349   echo $ac_n "(cached) $ac_c" 1>&6
3350 else
3351   if test -n "$AS"; then
3352   ac_cv_prog_AS="$AS" # Let the user override the test.
3353 else
3354   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3355   ac_dummy="$PATH"
3356   for ac_dir in $ac_dummy; do
3357     test -z "$ac_dir" && ac_dir=.
3358     if test -f $ac_dir/$ac_word; then
3359       ac_cv_prog_AS="as"
3360       break
3361     fi
3362   done
3363   IFS="$ac_save_ifs"
3364   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3365 fi
3366 fi
3367 AS="$ac_cv_prog_AS"
3368 if test -n "$AS"; then
3369   echo "$ac_t""$AS" 1>&6
3370 else
3371   echo "$ac_t""no" 1>&6
3372 fi
3373
3374 else
3375   AS="false"
3376 fi
3377 fi
3378
3379   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3380 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3381 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3382 echo "configure:3383: checking for $ac_word" >&5
3383 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3384   echo $ac_n "(cached) $ac_c" 1>&6
3385 else
3386   if test -n "$OBJDUMP"; then
3387   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3388 else
3389   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3390   ac_dummy="$PATH"
3391   for ac_dir in $ac_dummy; do
3392     test -z "$ac_dir" && ac_dir=.
3393     if test -f $ac_dir/$ac_word; then
3394       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3395       break
3396     fi
3397   done
3398   IFS="$ac_save_ifs"
3399 fi
3400 fi
3401 OBJDUMP="$ac_cv_prog_OBJDUMP"
3402 if test -n "$OBJDUMP"; then
3403   echo "$ac_t""$OBJDUMP" 1>&6
3404 else
3405   echo "$ac_t""no" 1>&6
3406 fi
3407
3408
3409 if test -z "$ac_cv_prog_OBJDUMP"; then
3410 if test -n "$ac_tool_prefix"; then
3411   # Extract the first word of "objdump", so it can be a program name with args.
3412 set dummy objdump; ac_word=$2
3413 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3414 echo "configure:3415: checking for $ac_word" >&5
3415 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3416   echo $ac_n "(cached) $ac_c" 1>&6
3417 else
3418   if test -n "$OBJDUMP"; then
3419   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3420 else
3421   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3422   ac_dummy="$PATH"
3423   for ac_dir in $ac_dummy; do
3424     test -z "$ac_dir" && ac_dir=.
3425     if test -f $ac_dir/$ac_word; then
3426       ac_cv_prog_OBJDUMP="objdump"
3427       break
3428     fi
3429   done
3430   IFS="$ac_save_ifs"
3431   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3432 fi
3433 fi
3434 OBJDUMP="$ac_cv_prog_OBJDUMP"
3435 if test -n "$OBJDUMP"; then
3436   echo "$ac_t""$OBJDUMP" 1>&6
3437 else
3438   echo "$ac_t""no" 1>&6
3439 fi
3440
3441 else
3442   OBJDUMP="false"
3443 fi
3444 fi
3445
3446   ;;
3447
3448 esac
3449
3450
3451 # Save cache, so that ltconfig can load it
3452
3453
3454 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3455 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3456 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3457 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3458 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3459 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3460 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3461 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3462
3463 # Reload cache, that may have been modified by ltconfig
3464
3465
3466 # This can be used to rebuild libtool when needed
3467 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3468
3469 # Always use our own libtool.
3470 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3471
3472 # Redirect the config.log output again, so that the ltconfig log is not
3473 # clobbered by the next message.
3474 exec 5>>./config.log
3475
3476
3477 for ac_prog in mawk gawk nawk awk
3478 do
3479 # Extract the first word of "$ac_prog", so it can be a program name with args.
3480 set dummy $ac_prog; ac_word=$2
3481 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3482 echo "configure:3483: checking for $ac_word" >&5
3483 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3484   echo $ac_n "(cached) $ac_c" 1>&6
3485 else
3486   if test -n "$AWK"; then
3487   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3488 else
3489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3490   ac_dummy="$PATH"
3491   for ac_dir in $ac_dummy; do
3492     test -z "$ac_dir" && ac_dir=.
3493     if test -f $ac_dir/$ac_word; then
3494       ac_cv_prog_AWK="$ac_prog"
3495       break
3496     fi
3497   done
3498   IFS="$ac_save_ifs"
3499 fi
3500 fi
3501 AWK="$ac_cv_prog_AWK"
3502 if test -n "$AWK"; then
3503   echo "$ac_t""$AWK" 1>&6
3504 else
3505   echo "$ac_t""no" 1>&6
3506 fi
3507
3508 test -n "$AWK" && break
3509 done
3510
3511 # test for ln hardlink support
3512 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3513 echo "configure:3514: checking whether ln works" >&5
3514 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   rm -f conftest.src conftest.dst
3518 echo "conftest" > conftest.src
3519 if ln conftest.src conftest.dst 2>/dev/null
3520 then
3521   ol_cv_prog_LN_H="ln"
3522 else
3523   ol_cv_prog_LN_H="cp"
3524 fi
3525 rm -f conftest.src conftest.dst
3526
3527 fi
3528 LN_H="$ol_cv_prog_LN_H"
3529 if test "$ol_cv_prog_LN_H" = "ln"; then
3530         echo "$ac_t""yes" 1>&6
3531 else
3532         echo "$ac_t""no" 1>&6
3533 fi
3534
3535 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3536 echo "configure:3537: checking whether ln -s works" >&5
3537 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3538   echo $ac_n "(cached) $ac_c" 1>&6
3539 else
3540   rm -f conftestdata
3541 if ln -s X conftestdata 2>/dev/null
3542 then
3543   rm -f conftestdata
3544   ac_cv_prog_LN_S="ln -s"
3545 else
3546   ac_cv_prog_LN_S=ln
3547 fi
3548 fi
3549 LN_S="$ac_cv_prog_LN_S"
3550 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3551   echo "$ac_t""yes" 1>&6
3552 else
3553   echo "$ac_t""no" 1>&6
3554 fi
3555
3556
3557 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3558         LN_S="$LN_H"
3559 fi
3560
3561 # Extract the first word of "sendmail", so it can be a program name with args.
3562 set dummy sendmail; ac_word=$2
3563 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3564 echo "configure:3565: checking for $ac_word" >&5
3565 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3566   echo $ac_n "(cached) $ac_c" 1>&6
3567 else
3568   case "$SENDMAIL" in
3569   /*)
3570   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3571   ;;
3572   ?:/*)
3573   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3574   ;;
3575   *)
3576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3577   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3578   for ac_dir in $ac_dummy; do 
3579     test -z "$ac_dir" && ac_dir=.
3580     if test -f $ac_dir/$ac_word; then
3581       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3582       break
3583     fi
3584   done
3585   IFS="$ac_save_ifs"
3586   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3587   ;;
3588 esac
3589 fi
3590 SENDMAIL="$ac_cv_path_SENDMAIL"
3591 if test -n "$SENDMAIL"; then
3592   echo "$ac_t""$SENDMAIL" 1>&6
3593 else
3594   echo "$ac_t""no" 1>&6
3595 fi
3596
3597 # Extract the first word of "vi", so it can be a program name with args.
3598 set dummy vi; ac_word=$2
3599 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3600 echo "configure:3601: checking for $ac_word" >&5
3601 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3602   echo $ac_n "(cached) $ac_c" 1>&6
3603 else
3604   case "$EDITOR" in
3605   /*)
3606   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3607   ;;
3608   ?:/*)
3609   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3610   ;;
3611   *)
3612   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3613   ac_dummy="$PATH:/usr/ucb"
3614   for ac_dir in $ac_dummy; do 
3615     test -z "$ac_dir" && ac_dir=.
3616     if test -f $ac_dir/$ac_word; then
3617       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3618       break
3619     fi
3620   done
3621   IFS="$ac_save_ifs"
3622   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3623   ;;
3624 esac
3625 fi
3626 EDITOR="$ac_cv_path_EDITOR"
3627 if test -n "$EDITOR"; then
3628   echo "$ac_t""$EDITOR" 1>&6
3629 else
3630   echo "$ac_t""no" 1>&6
3631 fi
3632
3633 # Extract the first word of "finger", so it can be a program name with args.
3634 set dummy finger; ac_word=$2
3635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3636 echo "configure:3637: checking for $ac_word" >&5
3637 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3638   echo $ac_n "(cached) $ac_c" 1>&6
3639 else
3640   case "$FINGER" in
3641   /*)
3642   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3643   ;;
3644   ?:/*)
3645   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3646   ;;
3647   *)
3648   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3649   ac_dummy="$PATH:/usr/ucb"
3650   for ac_dir in $ac_dummy; do 
3651     test -z "$ac_dir" && ac_dir=.
3652     if test -f $ac_dir/$ac_word; then
3653       ac_cv_path_FINGER="$ac_dir/$ac_word"
3654       break
3655     fi
3656   done
3657   IFS="$ac_save_ifs"
3658   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3659   ;;
3660 esac
3661 fi
3662 FINGER="$ac_cv_path_FINGER"
3663 if test -n "$FINGER"; then
3664   echo "$ac_t""$FINGER" 1>&6
3665 else
3666   echo "$ac_t""no" 1>&6
3667 fi
3668
3669
3670 ol_link_perl=no
3671 if test $ol_enable_perl != no ; then
3672         # Extract the first word of "perl", so it can be a program name with args.
3673 set dummy perl; ac_word=$2
3674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3675 echo "configure:3676: checking for $ac_word" >&5
3676 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   case "$PERLBIN" in
3680   /*)
3681   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3682   ;;
3683   ?:/*)
3684   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3685   ;;
3686   *)
3687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3688   ac_dummy="$PATH"
3689   for ac_dir in $ac_dummy; do 
3690     test -z "$ac_dir" && ac_dir=.
3691     if test -f $ac_dir/$ac_word; then
3692       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3693       break
3694     fi
3695   done
3696   IFS="$ac_save_ifs"
3697   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3698   ;;
3699 esac
3700 fi
3701 PERLBIN="$ac_cv_path_PERLBIN"
3702 if test -n "$PERLBIN"; then
3703   echo "$ac_t""$PERLBIN" 1>&6
3704 else
3705   echo "$ac_t""no" 1>&6
3706 fi
3707
3708
3709         if test "no$PERLBIN" = "no" ; then
3710                 if test $ol_enable_perl = yes ; then
3711                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3712                 fi
3713
3714         else
3715                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3716                 if test x"$ol_with_perl_module" = "xstatic" ; then
3717                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3718                 else
3719                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3720                 fi
3721                                 ol_link_perl=yes
3722         fi
3723 fi
3724
3725 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3726 echo "configure:3727: checking how to run the C preprocessor" >&5
3727 # On Suns, sometimes $CPP names a directory.
3728 if test -n "$CPP" && test -d "$CPP"; then
3729   CPP=
3730 fi
3731 if test -z "$CPP"; then
3732 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3733   echo $ac_n "(cached) $ac_c" 1>&6
3734 else
3735     # This must be in double quotes, not single quotes, because CPP may get
3736   # substituted into the Makefile and "${CC-cc}" will confuse make.
3737   CPP="${CC-cc} -E"
3738   # On the NeXT, cc -E runs the code through the compiler's parser,
3739   # not just through cpp.
3740   cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743 #include <assert.h>
3744 Syntax Error
3745 EOF
3746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3747 { (eval echo configure:3748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3749 if test -z "$ac_err"; then
3750   :
3751 else
3752   echo "$ac_err" >&5
3753   echo "configure: failed program was:" >&5
3754   cat conftest.$ac_ext >&5
3755   rm -rf conftest*
3756   CPP="${CC-cc} -E -traditional-cpp"
3757   cat > conftest.$ac_ext <<EOF
3758 #line 3759 "configure"
3759 #include "confdefs.h"
3760 #include <assert.h>
3761 Syntax Error
3762 EOF
3763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3764 { (eval echo configure:3765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3766 if test -z "$ac_err"; then
3767   :
3768 else
3769   echo "$ac_err" >&5
3770   echo "configure: failed program was:" >&5
3771   cat conftest.$ac_ext >&5
3772   rm -rf conftest*
3773   CPP="${CC-cc} -nologo -E"
3774   cat > conftest.$ac_ext <<EOF
3775 #line 3776 "configure"
3776 #include "confdefs.h"
3777 #include <assert.h>
3778 Syntax Error
3779 EOF
3780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3781 { (eval echo configure:3782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3783 if test -z "$ac_err"; then
3784   :
3785 else
3786   echo "$ac_err" >&5
3787   echo "configure: failed program was:" >&5
3788   cat conftest.$ac_ext >&5
3789   rm -rf conftest*
3790   CPP=/lib/cpp
3791 fi
3792 rm -f conftest*
3793 fi
3794 rm -f conftest*
3795 fi
3796 rm -f conftest*
3797   ac_cv_prog_CPP="$CPP"
3798 fi
3799   CPP="$ac_cv_prog_CPP"
3800 else
3801   ac_cv_prog_CPP="$CPP"
3802 fi
3803 echo "$ac_t""$CPP" 1>&6
3804
3805
3806 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3807         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3808
3809 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3810         echo "configure: warning: programs compiled here do run here..." 1>&2
3811         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3812
3813 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3814         echo "configure: warning: programs compiled here do not run here..." 1>&2
3815         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3816 fi
3817
3818 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3819 echo "configure:3820: checking for AIX" >&5
3820 cat > conftest.$ac_ext <<EOF
3821 #line 3822 "configure"
3822 #include "confdefs.h"
3823 #ifdef _AIX
3824   yes
3825 #endif
3826
3827 EOF
3828 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3829   egrep "yes" >/dev/null 2>&1; then
3830   rm -rf conftest*
3831   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3832 #define _ALL_SOURCE 1
3833 EOF
3834
3835 else
3836   rm -rf conftest*
3837   echo "$ac_t""no" 1>&6
3838 fi
3839 rm -f conftest*
3840
3841
3842 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3843 echo "configure:3844: checking for POSIXized ISC" >&5
3844 if test -d /etc/conf/kconfig.d &&
3845   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3846 then
3847   echo "$ac_t""yes" 1>&6
3848   ISC=yes # If later tests want to check for ISC.
3849   cat >> confdefs.h <<\EOF
3850 #define _POSIX_SOURCE 1
3851 EOF
3852
3853   if test "$GCC" = yes; then
3854     CC="$CC -posix"
3855   else
3856     CC="$CC -Xp"
3857   fi
3858 else
3859   echo "$ac_t""no" 1>&6
3860   ISC=
3861 fi
3862
3863 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3864 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3865 echo "configure:3866: checking for minix/config.h" >&5
3866 if eval "test \"\${ac_cv_header_$ac_safe+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 #include <minix/config.h>
3873 EOF
3874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3875 { (eval echo configure:3876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3877 if test -z "$ac_err"; then
3878   rm -rf conftest*
3879   eval "ac_cv_header_$ac_safe=yes"
3880 else
3881   echo "$ac_err" >&5
3882   echo "configure: failed program was:" >&5
3883   cat conftest.$ac_ext >&5
3884   rm -rf conftest*
3885   eval "ac_cv_header_$ac_safe=no"
3886 fi
3887 rm -f conftest*
3888 fi
3889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3890   echo "$ac_t""yes" 1>&6
3891   MINIX=yes
3892 else
3893   echo "$ac_t""no" 1>&6
3894 MINIX=
3895 fi
3896
3897 if test "$MINIX" = yes; then
3898   cat >> confdefs.h <<\EOF
3899 #define _POSIX_SOURCE 1
3900 EOF
3901
3902   cat >> confdefs.h <<\EOF
3903 #define _POSIX_1_SOURCE 2
3904 EOF
3905
3906   cat >> confdefs.h <<\EOF
3907 #define _MINIX 1
3908 EOF
3909
3910 fi
3911
3912
3913 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3914 echo "configure:3915: checking for Cygwin environment" >&5
3915 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3916   echo $ac_n "(cached) $ac_c" 1>&6
3917 else
3918   cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921
3922 int main() {
3923
3924 #ifndef __CYGWIN__
3925 #define __CYGWIN__ __CYGWIN32__
3926 #endif
3927 return __CYGWIN__;
3928 ; return 0; }
3929 EOF
3930 if { (eval echo configure:3931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3931   rm -rf conftest*
3932   ac_cv_cygwin=yes
3933 else
3934   echo "configure: failed program was:" >&5
3935   cat conftest.$ac_ext >&5
3936   rm -rf conftest*
3937   ac_cv_cygwin=no
3938 fi
3939 rm -f conftest*
3940 fi
3941
3942 echo "$ac_t""$ac_cv_cygwin" 1>&6
3943 CYGWIN=
3944 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3945 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3946 echo "configure:3947: checking for mingw32 environment" >&5
3947 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3948   echo $ac_n "(cached) $ac_c" 1>&6
3949 else
3950   cat > conftest.$ac_ext <<EOF
3951 #line 3952 "configure"
3952 #include "confdefs.h"
3953
3954 int main() {
3955 return __MINGW32__;
3956 ; return 0; }
3957 EOF
3958 if { (eval echo configure:3959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3959   rm -rf conftest*
3960   ac_cv_mingw32=yes
3961 else
3962   echo "configure: failed program was:" >&5
3963   cat conftest.$ac_ext >&5
3964   rm -rf conftest*
3965   ac_cv_mingw32=no
3966 fi
3967 rm -f conftest*
3968 fi
3969
3970 echo "$ac_t""$ac_cv_mingw32" 1>&6
3971 MINGW32=
3972 test "$ac_cv_mingw32" = yes && MINGW32=yes
3973 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3974 echo "configure:3975: checking for EMX OS/2 environment" >&5
3975 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3976   echo $ac_n "(cached) $ac_c" 1>&6
3977 else
3978   cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981
3982 int main() {
3983 return __EMX__;
3984 ; return 0; }
3985 EOF
3986 if { (eval echo configure:3987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3987   rm -rf conftest*
3988   ac_cv_emxos2=yes
3989 else
3990   echo "configure: failed program was:" >&5
3991   cat conftest.$ac_ext >&5
3992   rm -rf conftest*
3993   ac_cv_emxos2=no
3994 fi
3995 rm -f conftest*
3996 fi
3997
3998 echo "$ac_t""$ac_cv_emxos2" 1>&6
3999 EMXOS2=
4000 test "$ac_cv_emxos2" = yes && EMXOS2=yes
4001
4002
4003
4004 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4005 echo "configure:4006: checking for executable suffix" >&5
4006 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4007   echo $ac_n "(cached) $ac_c" 1>&6
4008 else
4009   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4010   ac_cv_exeext=.exe
4011 else
4012   rm -f conftest*
4013   echo 'int main () { return 0; }' > conftest.$ac_ext
4014   ac_cv_exeext=
4015   if { (eval echo configure:4016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4016     for file in conftest.*; do
4017       case $file in
4018       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4019       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4020       esac
4021     done
4022   else
4023     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4024   fi
4025   rm -f conftest*
4026   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4027 fi
4028 fi
4029
4030 EXEEXT=""
4031 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4032 echo "$ac_t""${ac_cv_exeext}" 1>&6
4033 ac_exeext=$EXEEXT
4034
4035 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4036 echo "configure:4037: checking for object suffix" >&5
4037 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4038   echo $ac_n "(cached) $ac_c" 1>&6
4039 else
4040   rm -f conftest*
4041 echo 'int i = 1;' > conftest.$ac_ext
4042 if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4043   for ac_file in conftest.*; do
4044     case $ac_file in
4045     *.c) ;;
4046     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4047     esac
4048   done
4049 else
4050   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4051 fi
4052 rm -f conftest*
4053 fi
4054
4055 echo "$ac_t""$ac_cv_objext" 1>&6
4056 OBJEXT=$ac_cv_objext
4057 ac_objext=$ac_cv_objext
4058
4059
4060 cat >> confdefs.h <<EOF
4061 #define EXEEXT "${EXEEXT}"
4062 EOF
4063
4064
4065 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4066 echo "configure:4067: checking for be_app in -lbe" >&5
4067 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4068 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4069   echo $ac_n "(cached) $ac_c" 1>&6
4070 else
4071   ac_save_LIBS="$LIBS"
4072 LIBS="-lbe -lroot -lnet $LIBS"
4073 cat > conftest.$ac_ext <<EOF
4074 #line 4075 "configure"
4075 #include "confdefs.h"
4076 /* Override any gcc2 internal prototype to avoid an error.  */
4077 /* We use char because int might match the return type of a gcc2
4078     builtin and then its argument prototype would still apply.  */
4079 char be_app();
4080
4081 int main() {
4082 be_app()
4083 ; return 0; }
4084 EOF
4085 if { (eval echo configure:4086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4086   rm -rf conftest*
4087   eval "ac_cv_lib_$ac_lib_var=yes"
4088 else
4089   echo "configure: failed program was:" >&5
4090   cat conftest.$ac_ext >&5
4091   rm -rf conftest*
4092   eval "ac_cv_lib_$ac_lib_var=no"
4093 fi
4094 rm -f conftest*
4095 LIBS="$ac_save_LIBS"
4096
4097 fi
4098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4099   echo "$ac_t""yes" 1>&6
4100   LIBS="$LIBS -lbe -lroot -lnet"
4101 else
4102   echo "$ac_t""no" 1>&6
4103 :
4104 fi
4105
4106
4107
4108
4109
4110 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4111 echo "configure:4112: checking for ${CC-cc} option to accept ANSI C" >&5
4112 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4113   echo $ac_n "(cached) $ac_c" 1>&6
4114 else
4115   am_cv_prog_cc_stdc=no
4116 ac_save_CC="$CC"
4117 # Don't try gcc -ansi; that turns off useful extensions and
4118 # breaks some systems' header files.
4119 # AIX                   -qlanglvl=ansi
4120 # Ultrix and OSF/1      -std1
4121 # HP-UX 10.20 and later -Ae
4122 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4123 # SVR4                  -Xc -D__EXTENSIONS__
4124 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4125 do
4126   CC="$ac_save_CC $ac_arg"
4127   cat > conftest.$ac_ext <<EOF
4128 #line 4129 "configure"
4129 #include "confdefs.h"
4130 #include <stdarg.h>
4131 #include <stdio.h>
4132 #include <sys/types.h>
4133 #include <sys/stat.h>
4134 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4135 struct buf { int x; };
4136 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4137 static char *e (p, i)
4138      char **p;
4139      int i;
4140 {
4141   return p[i];
4142 }
4143 static char *f (char * (*g) (char **, int), char **p, ...)
4144 {
4145   char *s;
4146   va_list v;
4147   va_start (v,p);
4148   s = g (p, va_arg (v,int));
4149   va_end (v);
4150   return s;
4151 }
4152 int test (int i, double x);
4153 struct s1 {int (*f) (int a);};
4154 struct s2 {int (*f) (double a);};
4155 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4156 int argc;
4157 char **argv;
4158
4159 int main() {
4160
4161 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4162
4163 ; return 0; }
4164 EOF
4165 if { (eval echo configure:4166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4166   rm -rf conftest*
4167   am_cv_prog_cc_stdc="$ac_arg"; break
4168 else
4169   echo "configure: failed program was:" >&5
4170   cat conftest.$ac_ext >&5
4171 fi
4172 rm -f conftest*
4173 done
4174 CC="$ac_save_CC"
4175
4176 fi
4177
4178 if test -z "$am_cv_prog_cc_stdc"; then
4179   echo "$ac_t""none needed" 1>&6
4180 else
4181   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4182 fi
4183 case "x$am_cv_prog_cc_stdc" in
4184   x|xno) ;;
4185   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4186 esac
4187
4188 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4189         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4190 fi
4191
4192 # test for make depend flag
4193 OL_MKDEP=
4194 OL_MKDEP_FLAGS=
4195 if test -z "${MKDEP}"; then
4196         OL_MKDEP="${CC-cc}"
4197         if test -z "${MKDEP_FLAGS}"; then
4198                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4199 echo "configure:4200: checking for ${OL_MKDEP} depend flag" >&5
4200 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4201   echo $ac_n "(cached) $ac_c" 1>&6
4202 else
4203   
4204                         ol_cv_mkdep=no
4205                         for flag in "-M" "-xM"; do
4206                                 cat > conftest.c <<EOF
4207  noCode;
4208 EOF
4209                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4210                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4211                                 then
4212                                         if test ! -f conftest."${ac_object}" ; then
4213                                                 ol_cv_mkdep=$flag
4214                                                 OL_MKDEP_FLAGS="$flag"
4215                                                 break
4216                                         fi
4217                                 fi
4218                         done
4219                         rm -f conftest*
4220                 
4221 fi
4222
4223 echo "$ac_t""$ol_cv_mkdep" 1>&6
4224         else
4225                 cc_cv_mkdep=yes
4226                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4227         fi
4228 else
4229         cc_cv_mkdep=yes
4230         OL_MKDEP="${MKDEP}"
4231         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4232 fi
4233
4234
4235
4236 if test "${ol_cv_mkdep}" = no ; then
4237         # this will soon become an error
4238         echo "configure: warning: do not know how to generate dependencies" 1>&2
4239 fi
4240
4241 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4242 echo "configure:4243: checking for afopen in -ls" >&5
4243 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4245   echo $ac_n "(cached) $ac_c" 1>&6
4246 else
4247   ac_save_LIBS="$LIBS"
4248 LIBS="-ls  $LIBS"
4249 cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4252 /* Override any gcc2 internal prototype to avoid an error.  */
4253 /* We use char because int might match the return type of a gcc2
4254     builtin and then its argument prototype would still apply.  */
4255 char afopen();
4256
4257 int main() {
4258 afopen()
4259 ; return 0; }
4260 EOF
4261 if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4262   rm -rf conftest*
4263   eval "ac_cv_lib_$ac_lib_var=yes"
4264 else
4265   echo "configure: failed program was:" >&5
4266   cat conftest.$ac_ext >&5
4267   rm -rf conftest*
4268   eval "ac_cv_lib_$ac_lib_var=no"
4269 fi
4270 rm -f conftest*
4271 LIBS="$ac_save_LIBS"
4272
4273 fi
4274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4275   echo "$ac_t""yes" 1>&6
4276   
4277         AUTH_LIBS=-ls
4278         cat >> confdefs.h <<\EOF
4279 #define HAVE_AIX_SECURITY 1
4280 EOF
4281
4282
4283 else
4284   echo "$ac_t""no" 1>&6
4285 fi
4286
4287
4288 ol_link_modules=no
4289 if test $ol_enable_modules != no ; then
4290         for ac_hdr in ltdl.h
4291 do
4292 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4293 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4294 echo "configure:4295: checking for $ac_hdr" >&5
4295 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4296   echo $ac_n "(cached) $ac_c" 1>&6
4297 else
4298   cat > conftest.$ac_ext <<EOF
4299 #line 4300 "configure"
4300 #include "confdefs.h"
4301 #include <$ac_hdr>
4302 EOF
4303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4304 { (eval echo configure:4305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4306 if test -z "$ac_err"; then
4307   rm -rf conftest*
4308   eval "ac_cv_header_$ac_safe=yes"
4309 else
4310   echo "$ac_err" >&5
4311   echo "configure: failed program was:" >&5
4312   cat conftest.$ac_ext >&5
4313   rm -rf conftest*
4314   eval "ac_cv_header_$ac_safe=no"
4315 fi
4316 rm -f conftest*
4317 fi
4318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4319   echo "$ac_t""yes" 1>&6
4320     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4321   cat >> confdefs.h <<EOF
4322 #define $ac_tr_hdr 1
4323 EOF
4324  
4325 else
4326   echo "$ac_t""no" 1>&6
4327 fi
4328 done
4329
4330
4331         if test $ac_cv_header_ltdl_h = no ; then
4332                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4333         fi
4334
4335         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4336 echo "configure:4337: checking for lt_dlinit in -lltdl" >&5
4337 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4338 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4339   echo $ac_n "(cached) $ac_c" 1>&6
4340 else
4341   ac_save_LIBS="$LIBS"
4342 LIBS="-lltdl  $LIBS"
4343 cat > conftest.$ac_ext <<EOF
4344 #line 4345 "configure"
4345 #include "confdefs.h"
4346 /* Override any gcc2 internal prototype to avoid an error.  */
4347 /* We use char because int might match the return type of a gcc2
4348     builtin and then its argument prototype would still apply.  */
4349 char lt_dlinit();
4350
4351 int main() {
4352 lt_dlinit()
4353 ; return 0; }
4354 EOF
4355 if { (eval echo configure:4356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4356   rm -rf conftest*
4357   eval "ac_cv_lib_$ac_lib_var=yes"
4358 else
4359   echo "configure: failed program was:" >&5
4360   cat conftest.$ac_ext >&5
4361   rm -rf conftest*
4362   eval "ac_cv_lib_$ac_lib_var=no"
4363 fi
4364 rm -f conftest*
4365 LIBS="$ac_save_LIBS"
4366
4367 fi
4368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4369   echo "$ac_t""yes" 1>&6
4370   
4371             MODULES_LIBS=-lltdl
4372             cat >> confdefs.h <<\EOF
4373 #define HAVE_LIBLTDL 1
4374 EOF
4375
4376         
4377 else
4378   echo "$ac_t""no" 1>&6
4379 fi
4380
4381
4382         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4383                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4384         fi
4385         ol_link_modules=yes
4386 else
4387         ol_with_bdb2_module=static
4388         ol_with_dnssrv_module=static
4389         ol_with_ldap_module=static
4390         ol_with_ldbm_module=static
4391         ol_with_passwd_module=static
4392         ol_with_perl_module=static
4393         ol_with_shell_module=static
4394         ol_with_tcl_module=static
4395         ol_with_sql_module=static
4396 fi
4397
4398 # test for EBCDIC
4399 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4400 echo "configure:4401: checking for EBCDIC" >&5
4401 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4402   echo $ac_n "(cached) $ac_c" 1>&6
4403 else
4404   
4405         cat > conftest.$ac_ext <<EOF
4406 #line 4407 "configure"
4407 #include "confdefs.h"
4408
4409 #if !('M' == 0xd4)
4410 #include <__ASCII__/generate_error.h>
4411 #endif
4412
4413 EOF
4414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4415 { (eval echo configure:4416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4417 if test -z "$ac_err"; then
4418   rm -rf conftest*
4419   ol_cv_cpp_ebcdic=yes
4420 else
4421   echo "$ac_err" >&5
4422   echo "configure: failed program was:" >&5
4423   cat conftest.$ac_ext >&5
4424   rm -rf conftest*
4425   ol_cv_cpp_ebcdic=no
4426 fi
4427 rm -f conftest*
4428 fi
4429
4430 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4431 if test $ol_cv_cpp_ebcdic = yes ; then
4432         cat >> confdefs.h <<\EOF
4433 #define HAVE_EBCDIC 1
4434 EOF
4435
4436 fi
4437
4438 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4439 echo "configure:4440: checking for ANSI C header files" >&5
4440 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4441   echo $ac_n "(cached) $ac_c" 1>&6
4442 else
4443   cat > conftest.$ac_ext <<EOF
4444 #line 4445 "configure"
4445 #include "confdefs.h"
4446 #include <stdlib.h>
4447 #include <stdarg.h>
4448 #include <string.h>
4449 #include <float.h>
4450 EOF
4451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4452 { (eval echo configure:4453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4454 if test -z "$ac_err"; then
4455   rm -rf conftest*
4456   ol_cv_header_stdc=yes
4457 else
4458   echo "$ac_err" >&5
4459   echo "configure: failed program was:" >&5
4460   cat conftest.$ac_ext >&5
4461   rm -rf conftest*
4462   ol_cv_header_stdc=no
4463 fi
4464 rm -f conftest*
4465
4466 if test $ol_cv_header_stdc = yes; then
4467   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4468 cat > conftest.$ac_ext <<EOF
4469 #line 4470 "configure"
4470 #include "confdefs.h"
4471 #include <string.h>
4472 EOF
4473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4474   egrep "memchr" >/dev/null 2>&1; then
4475   :
4476 else
4477   rm -rf conftest*
4478   ol_cv_header_stdc=no
4479 fi
4480 rm -f conftest*
4481
4482 fi
4483
4484 if test $ol_cv_header_stdc = yes; then
4485   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4486 cat > conftest.$ac_ext <<EOF
4487 #line 4488 "configure"
4488 #include "confdefs.h"
4489 #include <stdlib.h>
4490 EOF
4491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4492   egrep "free" >/dev/null 2>&1; then
4493   :
4494 else
4495   rm -rf conftest*
4496   ol_cv_header_stdc=no
4497 fi
4498 rm -f conftest*
4499
4500 fi
4501
4502 if test $ol_cv_header_stdc = yes; then
4503   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4504 if test "$cross_compiling" = yes; then
4505   :
4506 else
4507   cat > conftest.$ac_ext <<EOF
4508 #line 4509 "configure"
4509 #include "confdefs.h"
4510 #include <ctype.h>
4511 #ifndef HAVE_EBCDIC
4512 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4513 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4514 #else
4515 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4516                 || ('j' <= (c) && (c) <= 'r') \
4517                 || ('s' <= (c) && (c) <= 'z'))
4518 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4519 #endif
4520 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4521 int main () { int i; for (i = 0; i < 256; i++)
4522 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4523 exit (0); }
4524
4525 EOF
4526 if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4527 then
4528   :
4529 else
4530   echo "configure: failed program was:" >&5
4531   cat conftest.$ac_ext >&5
4532   rm -fr conftest*
4533   ol_cv_header_stdc=no
4534 fi
4535 rm -fr conftest*
4536 fi
4537
4538 fi
4539 fi
4540
4541 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4542 if test $ol_cv_header_stdc = yes; then
4543   cat >> confdefs.h <<\EOF
4544 #define STDC_HEADERS 1
4545 EOF
4546
4547 fi
4548 ac_cv_header_stdc=disable
4549
4550
4551 if test $ol_cv_header_stdc != yes; then
4552         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4553 fi
4554
4555 ac_header_dirent=no
4556 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4557 do
4558 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4559 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4560 echo "configure:4561: checking for $ac_hdr that defines DIR" >&5
4561 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4562   echo $ac_n "(cached) $ac_c" 1>&6
4563 else
4564   cat > conftest.$ac_ext <<EOF
4565 #line 4566 "configure"
4566 #include "confdefs.h"
4567 #include <sys/types.h>
4568 #include <$ac_hdr>
4569 int main() {
4570 DIR *dirp = 0;
4571 ; return 0; }
4572 EOF
4573 if { (eval echo configure:4574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4574   rm -rf conftest*
4575   eval "ac_cv_header_dirent_$ac_safe=yes"
4576 else
4577   echo "configure: failed program was:" >&5
4578   cat conftest.$ac_ext >&5
4579   rm -rf conftest*
4580   eval "ac_cv_header_dirent_$ac_safe=no"
4581 fi
4582 rm -f conftest*
4583 fi
4584 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4585   echo "$ac_t""yes" 1>&6
4586     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4587   cat >> confdefs.h <<EOF
4588 #define $ac_tr_hdr 1
4589 EOF
4590  ac_header_dirent=$ac_hdr; break
4591 else
4592   echo "$ac_t""no" 1>&6
4593 fi
4594 done
4595 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4596 if test $ac_header_dirent = dirent.h; then
4597 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4598 echo "configure:4599: checking for opendir in -ldir" >&5
4599 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4600 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4601   echo $ac_n "(cached) $ac_c" 1>&6
4602 else
4603   ac_save_LIBS="$LIBS"
4604 LIBS="-ldir  $LIBS"
4605 cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 /* Override any gcc2 internal prototype to avoid an error.  */
4609 /* We use char because int might match the return type of a gcc2
4610     builtin and then its argument prototype would still apply.  */
4611 char opendir();
4612
4613 int main() {
4614 opendir()
4615 ; return 0; }
4616 EOF
4617 if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4618   rm -rf conftest*
4619   eval "ac_cv_lib_$ac_lib_var=yes"
4620 else
4621   echo "configure: failed program was:" >&5
4622   cat conftest.$ac_ext >&5
4623   rm -rf conftest*
4624   eval "ac_cv_lib_$ac_lib_var=no"
4625 fi
4626 rm -f conftest*
4627 LIBS="$ac_save_LIBS"
4628
4629 fi
4630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4631   echo "$ac_t""yes" 1>&6
4632   LIBS="$LIBS -ldir"
4633 else
4634   echo "$ac_t""no" 1>&6
4635 fi
4636
4637 else
4638 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4639 echo "configure:4640: checking for opendir in -lx" >&5
4640 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4641 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4642   echo $ac_n "(cached) $ac_c" 1>&6
4643 else
4644   ac_save_LIBS="$LIBS"
4645 LIBS="-lx  $LIBS"
4646 cat > conftest.$ac_ext <<EOF
4647 #line 4648 "configure"
4648 #include "confdefs.h"
4649 /* Override any gcc2 internal prototype to avoid an error.  */
4650 /* We use char because int might match the return type of a gcc2
4651     builtin and then its argument prototype would still apply.  */
4652 char opendir();
4653
4654 int main() {
4655 opendir()
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   eval "ac_cv_lib_$ac_lib_var=yes"
4661 else
4662   echo "configure: failed program was:" >&5
4663   cat conftest.$ac_ext >&5
4664   rm -rf conftest*
4665   eval "ac_cv_lib_$ac_lib_var=no"
4666 fi
4667 rm -f conftest*
4668 LIBS="$ac_save_LIBS"
4669
4670 fi
4671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4672   echo "$ac_t""yes" 1>&6
4673   LIBS="$LIBS -lx"
4674 else
4675   echo "$ac_t""no" 1>&6
4676 fi
4677
4678 fi
4679
4680 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4681 echo "configure:4682: checking for sys/wait.h that is POSIX.1 compatible" >&5
4682 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4683   echo $ac_n "(cached) $ac_c" 1>&6
4684 else
4685   cat > conftest.$ac_ext <<EOF
4686 #line 4687 "configure"
4687 #include "confdefs.h"
4688 #include <sys/types.h>
4689 #include <sys/wait.h>
4690 #ifndef WEXITSTATUS
4691 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4692 #endif
4693 #ifndef WIFEXITED
4694 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4695 #endif
4696 int main() {
4697 int s;
4698 wait (&s);
4699 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4700 ; return 0; }
4701 EOF
4702 if { (eval echo configure:4703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4703   rm -rf conftest*
4704   ac_cv_header_sys_wait_h=yes
4705 else
4706   echo "configure: failed program was:" >&5
4707   cat conftest.$ac_ext >&5
4708   rm -rf conftest*
4709   ac_cv_header_sys_wait_h=no
4710 fi
4711 rm -f conftest*
4712 fi
4713
4714 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4715 if test $ac_cv_header_sys_wait_h = yes; then
4716   cat >> confdefs.h <<\EOF
4717 #define HAVE_SYS_WAIT_H 1
4718 EOF
4719
4720 fi
4721
4722 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4723 echo "configure:4724: checking POSIX termios" >&5
4724 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4725   echo $ac_n "(cached) $ac_c" 1>&6
4726 else
4727   cat > conftest.$ac_ext <<EOF
4728 #line 4729 "configure"
4729 #include "confdefs.h"
4730 #include <sys/types.h>
4731 #include <unistd.h>
4732 #include <termios.h>
4733 int main() {
4734 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4735    tcgetattr(0, 0);
4736 ; return 0; }
4737 EOF
4738 if { (eval echo configure:4739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4739   rm -rf conftest*
4740   am_cv_sys_posix_termios=yes
4741 else
4742   echo "configure: failed program was:" >&5
4743   cat conftest.$ac_ext >&5
4744   rm -rf conftest*
4745   am_cv_sys_posix_termios=no
4746 fi
4747 rm -f conftest*
4748 fi
4749
4750 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4751
4752
4753  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4754 echo "configure:4755: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4755 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4756   echo $ac_n "(cached) $ac_c" 1>&6
4757 else
4758   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4759
4760   gwinsz_in_termios_h=no
4761   if test $am_cv_sys_posix_termios = yes; then
4762     cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765 #include <sys/types.h>
4766 #     include <termios.h>
4767 #     ifdef TIOCGWINSZ
4768         yes
4769 #     endif
4770     
4771 EOF
4772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4773   egrep "yes" >/dev/null 2>&1; then
4774   rm -rf conftest*
4775   gwinsz_in_termios_h=yes
4776 fi
4777 rm -f conftest*
4778
4779   fi
4780
4781   if test $gwinsz_in_termios_h = no; then
4782     cat > conftest.$ac_ext <<EOF
4783 #line 4784 "configure"
4784 #include "confdefs.h"
4785 #include <sys/types.h>
4786 #     include <sys/ioctl.h>
4787 #     ifdef TIOCGWINSZ
4788         yes
4789 #     endif
4790     
4791 EOF
4792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4793   egrep "yes" >/dev/null 2>&1; then
4794   rm -rf conftest*
4795   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4796 fi
4797 rm -f conftest*
4798
4799   fi
4800   
4801 fi
4802
4803 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4804   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4805     cat >> confdefs.h <<\EOF
4806 #define GWINSZ_IN_SYS_IOCTL 1
4807 EOF
4808
4809   fi
4810
4811 if test $am_cv_sys_posix_termios = yes ; then
4812         cat >> confdefs.h <<\EOF
4813 #define HAVE_POSIX_TERMIOS 1
4814 EOF
4815
4816 fi
4817
4818 for ac_hdr in \
4819         arpa/inet.h             \
4820         arpa/nameser.h  \
4821         assert.h                \
4822         conio.h                 \
4823         crypt.h                 \
4824         direct.h                \
4825         errno.h                 \
4826         fcntl.h                 \
4827         filio.h                 \
4828         getopt.h                \
4829         grp.h                   \
4830         io.h                    \
4831         libutil.h               \
4832         limits.h                \
4833         locale.h                \
4834         netinet/tcp.h   \
4835         malloc.h                \
4836         memory.h                \
4837         psap.h                  \
4838         pwd.h                   \
4839         process.h               \
4840         resolv.h                \
4841         sgtty.h                 \
4842         shadow.h                \
4843         stddef.h                \
4844         string.h                \
4845         strings.h               \
4846         sysexits.h              \
4847         sys/file.h              \
4848         sys/filio.h             \
4849         sys/errno.h             \
4850         sys/ioctl.h             \
4851         sys/param.h             \
4852         sys/resource.h  \
4853         sys/select.h    \
4854         sys/socket.h    \
4855         sys/syslog.h    \
4856         sys/time.h              \
4857         sys/types.h             \
4858         syslog.h                \
4859         termios.h               \
4860         unistd.h                \
4861         winsock.h               \
4862
4863 do
4864 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4865 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4866 echo "configure:4867: checking for $ac_hdr" >&5
4867 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4868   echo $ac_n "(cached) $ac_c" 1>&6
4869 else
4870   cat > conftest.$ac_ext <<EOF
4871 #line 4872 "configure"
4872 #include "confdefs.h"
4873 #include <$ac_hdr>
4874 EOF
4875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4876 { (eval echo configure:4877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4878 if test -z "$ac_err"; then
4879   rm -rf conftest*
4880   eval "ac_cv_header_$ac_safe=yes"
4881 else
4882   echo "$ac_err" >&5
4883   echo "configure: failed program was:" >&5
4884   cat conftest.$ac_ext >&5
4885   rm -rf conftest*
4886   eval "ac_cv_header_$ac_safe=no"
4887 fi
4888 rm -f conftest*
4889 fi
4890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4891   echo "$ac_t""yes" 1>&6
4892     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4893   cat >> confdefs.h <<EOF
4894 #define $ac_tr_hdr 1
4895 EOF
4896  
4897 else
4898   echo "$ac_t""no" 1>&6
4899 fi
4900 done
4901
4902
4903
4904
4905 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4906 echo "configure:4907: checking for sigset in -lV3" >&5
4907 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4908 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4909   echo $ac_n "(cached) $ac_c" 1>&6
4910 else
4911   ac_save_LIBS="$LIBS"
4912 LIBS="-lV3  $LIBS"
4913 cat > conftest.$ac_ext <<EOF
4914 #line 4915 "configure"
4915 #include "confdefs.h"
4916 /* Override any gcc2 internal prototype to avoid an error.  */
4917 /* We use char because int might match the return type of a gcc2
4918     builtin and then its argument prototype would still apply.  */
4919 char sigset();
4920
4921 int main() {
4922 sigset()
4923 ; return 0; }
4924 EOF
4925 if { (eval echo configure:4926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4926   rm -rf conftest*
4927   eval "ac_cv_lib_$ac_lib_var=yes"
4928 else
4929   echo "configure: failed program was:" >&5
4930   cat conftest.$ac_ext >&5
4931   rm -rf conftest*
4932   eval "ac_cv_lib_$ac_lib_var=no"
4933 fi
4934 rm -f conftest*
4935 LIBS="$ac_save_LIBS"
4936
4937 fi
4938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4939   echo "$ac_t""yes" 1>&6
4940     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4941     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4942   cat >> confdefs.h <<EOF
4943 #define $ac_tr_lib 1
4944 EOF
4945
4946   LIBS="-lV3 $LIBS"
4947
4948 else
4949   echo "$ac_t""no" 1>&6
4950 fi
4951
4952
4953 if test $ac_cv_header_winsock_h = yes; then
4954         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4955 echo "configure:4956: checking for winsock" >&5
4956 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4957   echo $ac_n "(cached) $ac_c" 1>&6
4958 else
4959   cat > conftest.$ac_ext <<EOF
4960 #line 4961 "configure"
4961 #include "confdefs.h"
4962 #include <winsock.h>
4963 int main() {
4964
4965                         socket(0,0,0);
4966                         select(0,NULL,NULL,NULL,NULL);
4967                         closesocket(0);
4968                         gethostname(NULL,0);
4969         
4970 ; return 0; }
4971 EOF
4972 if { (eval echo configure:4973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4973   rm -rf conftest*
4974   ol_cv_winsock=yes
4975 else
4976   echo "configure: failed program was:" >&5
4977   cat conftest.$ac_ext >&5
4978   rm -rf conftest*
4979   ol_cv_winsock=no
4980 fi
4981 rm -f conftest*]
4982 fi
4983
4984 echo "$ac_t""$ol_cv_winsock" 1>&6
4985
4986         if test $ol_cv_winsock = yes ; then
4987                 cat >> confdefs.h <<\EOF
4988 #define HAVE_WINSOCK 1
4989 EOF
4990
4991                 ac_cv_func_socket=yes
4992                 ac_cv_func_select=yes
4993                 ac_cv_func_closesocket=yes
4994                 ac_cv_func_gethostname=yes
4995         fi
4996 fi
4997
4998
4999 echo $ac_n "checking for socket""... $ac_c" 1>&6
5000 echo "configure:5001: checking for socket" >&5
5001 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
5002   echo $ac_n "(cached) $ac_c" 1>&6
5003 else
5004   cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007 /* System header to define __stub macros and hopefully few prototypes,
5008     which can conflict with char socket(); below.  */
5009 #include <assert.h>
5010 /* Override any gcc2 internal prototype to avoid an error.  */
5011 /* We use char because int might match the return type of a gcc2
5012     builtin and then its argument prototype would still apply.  */
5013 char socket();
5014 char (*f)();
5015
5016 int main() {
5017
5018 /* The GNU C library defines this for functions which it implements
5019     to always fail with ENOSYS.  Some functions are actually named
5020     something starting with __ and the normal name is an alias.  */
5021 #if defined (__stub_socket) || defined (__stub___socket)
5022 choke me
5023 #else
5024 f = socket;
5025 #endif
5026
5027 ; return 0; }
5028 EOF
5029 if { (eval echo configure:5030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5030   rm -rf conftest*
5031   eval "ac_cv_func_socket=yes"
5032 else
5033   echo "configure: failed program was:" >&5
5034   cat conftest.$ac_ext >&5
5035   rm -rf conftest*
5036   eval "ac_cv_func_socket=no"
5037 fi
5038 rm -f conftest*
5039 fi
5040
5041 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5042   echo "$ac_t""yes" 1>&6
5043   :
5044 else
5045   echo "$ac_t""no" 1>&6
5046         
5047         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5048 echo "configure:5049: checking for main in -lsocket" >&5
5049 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5051   echo $ac_n "(cached) $ac_c" 1>&6
5052 else
5053   ac_save_LIBS="$LIBS"
5054 LIBS="-lsocket  $LIBS"
5055 cat > conftest.$ac_ext <<EOF
5056 #line 5057 "configure"
5057 #include "confdefs.h"
5058
5059 int main() {
5060 main()
5061 ; return 0; }
5062 EOF
5063 if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5064   rm -rf conftest*
5065   eval "ac_cv_lib_$ac_lib_var=yes"
5066 else
5067   echo "configure: failed program was:" >&5
5068   cat conftest.$ac_ext >&5
5069   rm -rf conftest*
5070   eval "ac_cv_lib_$ac_lib_var=no"
5071 fi
5072 rm -f conftest*
5073 LIBS="$ac_save_LIBS"
5074
5075 fi
5076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5077   echo "$ac_t""yes" 1>&6
5078     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5079     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5080   cat >> confdefs.h <<EOF
5081 #define $ac_tr_lib 1
5082 EOF
5083
5084   LIBS="-lsocket $LIBS"
5085
5086 else
5087   echo "$ac_t""no" 1>&6
5088 fi
5089
5090         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5091 echo "configure:5092: checking for main in -lnet" >&5
5092 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5093 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5094   echo $ac_n "(cached) $ac_c" 1>&6
5095 else
5096   ac_save_LIBS="$LIBS"
5097 LIBS="-lnet  $LIBS"
5098 cat > conftest.$ac_ext <<EOF
5099 #line 5100 "configure"
5100 #include "confdefs.h"
5101
5102 int main() {
5103 main()
5104 ; return 0; }
5105 EOF
5106 if { (eval echo configure:5107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5107   rm -rf conftest*
5108   eval "ac_cv_lib_$ac_lib_var=yes"
5109 else
5110   echo "configure: failed program was:" >&5
5111   cat conftest.$ac_ext >&5
5112   rm -rf conftest*
5113   eval "ac_cv_lib_$ac_lib_var=no"
5114 fi
5115 rm -f conftest*
5116 LIBS="$ac_save_LIBS"
5117
5118 fi
5119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5120   echo "$ac_t""yes" 1>&6
5121     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5122     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5123   cat >> confdefs.h <<EOF
5124 #define $ac_tr_lib 1
5125 EOF
5126
5127   LIBS="-lnet $LIBS"
5128
5129 else
5130   echo "$ac_t""no" 1>&6
5131 fi
5132
5133         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5134 echo "configure:5135: checking for main in -lnsl_s" >&5
5135 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5137   echo $ac_n "(cached) $ac_c" 1>&6
5138 else
5139   ac_save_LIBS="$LIBS"
5140 LIBS="-lnsl_s  $LIBS"
5141 cat > conftest.$ac_ext <<EOF
5142 #line 5143 "configure"
5143 #include "confdefs.h"
5144
5145 int main() {
5146 main()
5147 ; return 0; }
5148 EOF
5149 if { (eval echo configure:5150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5150   rm -rf conftest*
5151   eval "ac_cv_lib_$ac_lib_var=yes"
5152 else
5153   echo "configure: failed program was:" >&5
5154   cat conftest.$ac_ext >&5
5155   rm -rf conftest*
5156   eval "ac_cv_lib_$ac_lib_var=no"
5157 fi
5158 rm -f conftest*
5159 LIBS="$ac_save_LIBS"
5160
5161 fi
5162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5163   echo "$ac_t""yes" 1>&6
5164     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5165     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5166   cat >> confdefs.h <<EOF
5167 #define $ac_tr_lib 1
5168 EOF
5169
5170   LIBS="-lnsl_s $LIBS"
5171
5172 else
5173   echo "$ac_t""no" 1>&6
5174 fi
5175
5176         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5177 echo "configure:5178: checking for main in -lnsl" >&5
5178 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5179 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5180   echo $ac_n "(cached) $ac_c" 1>&6
5181 else
5182   ac_save_LIBS="$LIBS"
5183 LIBS="-lnsl  $LIBS"
5184 cat > conftest.$ac_ext <<EOF
5185 #line 5186 "configure"
5186 #include "confdefs.h"
5187
5188 int main() {
5189 main()
5190 ; return 0; }
5191 EOF
5192 if { (eval echo configure:5193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5193   rm -rf conftest*
5194   eval "ac_cv_lib_$ac_lib_var=yes"
5195 else
5196   echo "configure: failed program was:" >&5
5197   cat conftest.$ac_ext >&5
5198   rm -rf conftest*
5199   eval "ac_cv_lib_$ac_lib_var=no"
5200 fi
5201 rm -f conftest*
5202 LIBS="$ac_save_LIBS"
5203
5204 fi
5205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5206   echo "$ac_t""yes" 1>&6
5207     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5208     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5209   cat >> confdefs.h <<EOF
5210 #define $ac_tr_lib 1
5211 EOF
5212
5213   LIBS="-lnsl $LIBS"
5214
5215 else
5216   echo "$ac_t""no" 1>&6
5217 fi
5218
5219         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5220 echo "configure:5221: checking for socket in -linet" >&5
5221 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5222 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5223   echo $ac_n "(cached) $ac_c" 1>&6
5224 else
5225   ac_save_LIBS="$LIBS"
5226 LIBS="-linet  $LIBS"
5227 cat > conftest.$ac_ext <<EOF
5228 #line 5229 "configure"
5229 #include "confdefs.h"
5230 /* Override any gcc2 internal prototype to avoid an error.  */
5231 /* We use char because int might match the return type of a gcc2
5232     builtin and then its argument prototype would still apply.  */
5233 char socket();
5234
5235 int main() {
5236 socket()
5237 ; return 0; }
5238 EOF
5239 if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5240   rm -rf conftest*
5241   eval "ac_cv_lib_$ac_lib_var=yes"
5242 else
5243   echo "configure: failed program was:" >&5
5244   cat conftest.$ac_ext >&5
5245   rm -rf conftest*
5246   eval "ac_cv_lib_$ac_lib_var=no"
5247 fi
5248 rm -f conftest*
5249 LIBS="$ac_save_LIBS"
5250
5251 fi
5252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5253   echo "$ac_t""yes" 1>&6
5254     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5255     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5256   cat >> confdefs.h <<EOF
5257 #define $ac_tr_lib 1
5258 EOF
5259
5260   LIBS="-linet $LIBS"
5261
5262 else
5263   echo "$ac_t""no" 1>&6
5264 fi
5265
5266         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5267 echo "configure:5268: checking for main in -lgen" >&5
5268 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5269 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5270   echo $ac_n "(cached) $ac_c" 1>&6
5271 else
5272   ac_save_LIBS="$LIBS"
5273 LIBS="-lgen  $LIBS"
5274 cat > conftest.$ac_ext <<EOF
5275 #line 5276 "configure"
5276 #include "confdefs.h"
5277
5278 int main() {
5279 main()
5280 ; return 0; }
5281 EOF
5282 if { (eval echo configure:5283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5283   rm -rf conftest*
5284   eval "ac_cv_lib_$ac_lib_var=yes"
5285 else
5286   echo "configure: failed program was:" >&5
5287   cat conftest.$ac_ext >&5
5288   rm -rf conftest*
5289   eval "ac_cv_lib_$ac_lib_var=no"
5290 fi
5291 rm -f conftest*
5292 LIBS="$ac_save_LIBS"
5293
5294 fi
5295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5296   echo "$ac_t""yes" 1>&6
5297     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5298     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5299   cat >> confdefs.h <<EOF
5300 #define $ac_tr_lib 1
5301 EOF
5302
5303   LIBS="-lgen $LIBS"
5304
5305 else
5306   echo "$ac_t""no" 1>&6
5307 fi
5308
5309
5310 fi
5311
5312
5313 echo $ac_n "checking for select""... $ac_c" 1>&6
5314 echo "configure:5315: checking for select" >&5
5315 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5316   echo $ac_n "(cached) $ac_c" 1>&6
5317 else
5318   cat > conftest.$ac_ext <<EOF
5319 #line 5320 "configure"
5320 #include "confdefs.h"
5321 /* System header to define __stub macros and hopefully few prototypes,
5322     which can conflict with char select(); below.  */
5323 #include <assert.h>
5324 /* Override any gcc2 internal prototype to avoid an error.  */
5325 /* We use char because int might match the return type of a gcc2
5326     builtin and then its argument prototype would still apply.  */
5327 char select();
5328 char (*f)();
5329
5330 int main() {
5331
5332 /* The GNU C library defines this for functions which it implements
5333     to always fail with ENOSYS.  Some functions are actually named
5334     something starting with __ and the normal name is an alias.  */
5335 #if defined (__stub_select) || defined (__stub___select)
5336 choke me
5337 #else
5338 f = select;
5339 #endif
5340
5341 ; return 0; }
5342 EOF
5343 if { (eval echo configure:5344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5344   rm -rf conftest*
5345   eval "ac_cv_func_select=yes"
5346 else
5347   echo "configure: failed program was:" >&5
5348   cat conftest.$ac_ext >&5
5349   rm -rf conftest*
5350   eval "ac_cv_func_select=no"
5351 fi
5352 rm -f conftest*
5353 fi
5354
5355 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5356   echo "$ac_t""yes" 1>&6
5357   :
5358 else
5359   echo "$ac_t""no" 1>&6
5360 { echo "configure: error: select() required." 1>&2; exit 1; }
5361 fi
5362
5363
5364 if test "${ac_cv_header_winsock_h}" != yes; then
5365                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5366 echo "configure:5367: checking types of arguments for select()" >&5
5367  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5368   echo $ac_n "(cached) $ac_c" 1>&6
5369 else
5370    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5371   echo $ac_n "(cached) $ac_c" 1>&6
5372 else
5373     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5374   echo $ac_n "(cached) $ac_c" 1>&6
5375 else
5376      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5377      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5378       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5379        cat > conftest.$ac_ext <<EOF
5380 #line 5381 "configure"
5381 #include "confdefs.h"
5382 #ifdef HAVE_SYS_TYPES_H
5383 #include <sys/types.h>
5384 #endif
5385 #ifdef HAVE_SYS_TIME_H
5386 #include <sys/time.h>
5387 #endif
5388 #ifdef HAVE_SYS_SELECT_H
5389 #include <sys/select.h>
5390 #endif
5391 #ifdef HAVE_SYS_SOCKET_H
5392 #include <sys/socket.h>
5393 #endif
5394 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);
5395 int main() {
5396
5397 ; return 0; }
5398 EOF
5399 if { (eval echo configure:5400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5400   rm -rf conftest*
5401           ac_not_found=no ; break 3
5402 else
5403   echo "configure: failed program was:" >&5
5404   cat conftest.$ac_ext >&5
5405   rm -rf conftest*
5406   ac_not_found=yes
5407 fi
5408 rm -f conftest*
5409       done
5410      done
5411     done
5412    
5413 fi
5414   
5415 fi
5416  
5417 fi
5418  if test "$ac_not_found" = yes; then
5419   ac_cv_func_select_arg1=int 
5420   ac_cv_func_select_arg234='int *' 
5421   ac_cv_func_select_arg5='struct timeval *'
5422  fi
5423  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5424  cat >> confdefs.h <<EOF
5425 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5426 EOF
5427
5428  cat >> confdefs.h <<EOF
5429 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5430 EOF
5431
5432  cat >> confdefs.h <<EOF
5433 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5434 EOF
5435
5436
5437 fi
5438
5439
5440 for ac_hdr in regex.h 
5441 do
5442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5444 echo "configure:5445: checking for $ac_hdr" >&5
5445 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5446   echo $ac_n "(cached) $ac_c" 1>&6
5447 else
5448   cat > conftest.$ac_ext <<EOF
5449 #line 5450 "configure"
5450 #include "confdefs.h"
5451 #include <$ac_hdr>
5452 EOF
5453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5454 { (eval echo configure:5455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5456 if test -z "$ac_err"; then
5457   rm -rf conftest*
5458   eval "ac_cv_header_$ac_safe=yes"
5459 else
5460   echo "$ac_err" >&5
5461   echo "configure: failed program was:" >&5
5462   cat conftest.$ac_ext >&5
5463   rm -rf conftest*
5464   eval "ac_cv_header_$ac_safe=no"
5465 fi
5466 rm -f conftest*
5467 fi
5468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5469   echo "$ac_t""yes" 1>&6
5470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5471   cat >> confdefs.h <<EOF
5472 #define $ac_tr_hdr 1
5473 EOF
5474  
5475 else
5476   echo "$ac_t""no" 1>&6
5477 fi
5478 done
5479
5480 if test "$ac_cv_header_regex_h" != yes ; then
5481         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5482 fi
5483 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5484 echo "configure:5485: checking for regfree" >&5
5485 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5486   echo $ac_n "(cached) $ac_c" 1>&6
5487 else
5488   cat > conftest.$ac_ext <<EOF
5489 #line 5490 "configure"
5490 #include "confdefs.h"
5491 /* System header to define __stub macros and hopefully few prototypes,
5492     which can conflict with char regfree(); below.  */
5493 #include <assert.h>
5494 /* Override any gcc2 internal prototype to avoid an error.  */
5495 /* We use char because int might match the return type of a gcc2
5496     builtin and then its argument prototype would still apply.  */
5497 char regfree();
5498 char (*f)();
5499
5500 int main() {
5501
5502 /* The GNU C library defines this for functions which it implements
5503     to always fail with ENOSYS.  Some functions are actually named
5504     something starting with __ and the normal name is an alias.  */
5505 #if defined (__stub_regfree) || defined (__stub___regfree)
5506 choke me
5507 #else
5508 f = regfree;
5509 #endif
5510
5511 ; return 0; }
5512 EOF
5513 if { (eval echo configure:5514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5514   rm -rf conftest*
5515   eval "ac_cv_func_regfree=yes"
5516 else
5517   echo "configure: failed program was:" >&5
5518   cat conftest.$ac_ext >&5
5519   rm -rf conftest*
5520   eval "ac_cv_func_regfree=no"
5521 fi
5522 rm -f conftest*
5523 fi
5524
5525 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5526   echo "$ac_t""yes" 1>&6
5527   :
5528 else
5529   echo "$ac_t""no" 1>&6
5530 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5531 fi
5532
5533
5534
5535 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5536 echo "configure:5537: checking for compatible POSIX regex" >&5
5537 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5538   echo $ac_n "(cached) $ac_c" 1>&6
5539 else
5540   
5541         if test "$cross_compiling" = yes; then
5542   ol_cv_c_posix_regex=cross
5543 else
5544   cat > conftest.$ac_ext <<EOF
5545 #line 5546 "configure"
5546 #include "confdefs.h"
5547
5548 #include <sys/types.h>
5549 #include <regex.h>
5550 static char *pattern, *string;
5551 main()
5552 {
5553         int rc;
5554         regex_t re;
5555
5556         pattern = "^A";
5557
5558         if(regcomp(&re, pattern, 0)) {
5559                 return -1;
5560         }
5561         
5562         string = "ALL MATCH";
5563         
5564         rc = regexec(&re, string, 0, (void*)0, 0);
5565
5566         regfree(&re);
5567
5568         return rc;
5569 }
5570 EOF
5571 if { (eval echo configure:5572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5572 then
5573   ol_cv_c_posix_regex=yes
5574 else
5575   echo "configure: failed program was:" >&5
5576   cat conftest.$ac_ext >&5
5577   rm -fr conftest*
5578   ol_cv_c_posix_regex=no
5579 fi
5580 rm -fr conftest*
5581 fi
5582
5583 fi
5584
5585 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5586
5587 if test "$ol_cv_c_posix_regex" = no ; then
5588         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5589 fi
5590
5591 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5592 echo "configure:5593: checking for res_search" >&5
5593 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5594   echo $ac_n "(cached) $ac_c" 1>&6
5595 else
5596   cat > conftest.$ac_ext <<EOF
5597 #line 5598 "configure"
5598 #include "confdefs.h"
5599 /* System header to define __stub macros and hopefully few prototypes,
5600     which can conflict with char res_search(); below.  */
5601 #include <assert.h>
5602 /* Override any gcc2 internal prototype to avoid an error.  */
5603 /* We use char because int might match the return type of a gcc2
5604     builtin and then its argument prototype would still apply.  */
5605 char res_search();
5606 char (*f)();
5607
5608 int main() {
5609
5610 /* The GNU C library defines this for functions which it implements
5611     to always fail with ENOSYS.  Some functions are actually named
5612     something starting with __ and the normal name is an alias.  */
5613 #if defined (__stub_res_search) || defined (__stub___res_search)
5614 choke me
5615 #else
5616 f = res_search;
5617 #endif
5618
5619 ; return 0; }
5620 EOF
5621 if { (eval echo configure:5622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5622   rm -rf conftest*
5623   eval "ac_cv_func_res_search=yes"
5624 else
5625   echo "configure: failed program was:" >&5
5626   cat conftest.$ac_ext >&5
5627   rm -rf conftest*
5628   eval "ac_cv_func_res_search=no"
5629 fi
5630 rm -f conftest*
5631 fi
5632
5633 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5634   echo "$ac_t""yes" 1>&6
5635   :
5636 else
5637   echo "$ac_t""no" 1>&6
5638 fi
5639
5640 if test $ac_cv_func_res_search = no ; then 
5641         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5642 echo "configure:5643: checking for res_search in -lbind" >&5
5643 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5645   echo $ac_n "(cached) $ac_c" 1>&6
5646 else
5647   ac_save_LIBS="$LIBS"
5648 LIBS="-lbind  $LIBS"
5649 cat > conftest.$ac_ext <<EOF
5650 #line 5651 "configure"
5651 #include "confdefs.h"
5652 /* Override any gcc2 internal prototype to avoid an error.  */
5653 /* We use char because int might match the return type of a gcc2
5654     builtin and then its argument prototype would still apply.  */
5655 char res_search();
5656
5657 int main() {
5658 res_search()
5659 ; return 0; }
5660 EOF
5661 if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5662   rm -rf conftest*
5663   eval "ac_cv_lib_$ac_lib_var=yes"
5664 else
5665   echo "configure: failed program was:" >&5
5666   cat conftest.$ac_ext >&5
5667   rm -rf conftest*
5668   eval "ac_cv_lib_$ac_lib_var=no"
5669 fi
5670 rm -f conftest*
5671 LIBS="$ac_save_LIBS"
5672
5673 fi
5674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5675   echo "$ac_t""yes" 1>&6
5676     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5677     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5678   cat >> confdefs.h <<EOF
5679 #define $ac_tr_lib 1
5680 EOF
5681
5682   LIBS="-lbind $LIBS"
5683
5684 else
5685   echo "$ac_t""no" 1>&6
5686 fi
5687
5688         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5689 fi
5690
5691 if test $ac_cv_func_res_search = no ; then 
5692         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5693 echo "configure:5694: checking for __res_search in -lbind" >&5
5694 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5695 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5696   echo $ac_n "(cached) $ac_c" 1>&6
5697 else
5698   ac_save_LIBS="$LIBS"
5699 LIBS="-lbind  $LIBS"
5700 cat > conftest.$ac_ext <<EOF
5701 #line 5702 "configure"
5702 #include "confdefs.h"
5703 /* Override any gcc2 internal prototype to avoid an error.  */
5704 /* We use char because int might match the return type of a gcc2
5705     builtin and then its argument prototype would still apply.  */
5706 char __res_search();
5707
5708 int main() {
5709 __res_search()
5710 ; return 0; }
5711 EOF
5712 if { (eval echo configure:5713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5713   rm -rf conftest*
5714   eval "ac_cv_lib_$ac_lib_var=yes"
5715 else
5716   echo "configure: failed program was:" >&5
5717   cat conftest.$ac_ext >&5
5718   rm -rf conftest*
5719   eval "ac_cv_lib_$ac_lib_var=no"
5720 fi
5721 rm -f conftest*
5722 LIBS="$ac_save_LIBS"
5723
5724 fi
5725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5726   echo "$ac_t""yes" 1>&6
5727     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5728     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5729   cat >> confdefs.h <<EOF
5730 #define $ac_tr_lib 1
5731 EOF
5732
5733   LIBS="-lbind $LIBS"
5734
5735 else
5736   echo "$ac_t""no" 1>&6
5737 fi
5738
5739         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5740 fi
5741
5742 if test $ac_cv_func_res_search = no ; then 
5743         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5744 echo "configure:5745: checking for res_search in -lresolv" >&5
5745 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5747   echo $ac_n "(cached) $ac_c" 1>&6
5748 else
5749   ac_save_LIBS="$LIBS"
5750 LIBS="-lresolv  $LIBS"
5751 cat > conftest.$ac_ext <<EOF
5752 #line 5753 "configure"
5753 #include "confdefs.h"
5754 /* Override any gcc2 internal prototype to avoid an error.  */
5755 /* We use char because int might match the return type of a gcc2
5756     builtin and then its argument prototype would still apply.  */
5757 char res_search();
5758
5759 int main() {
5760 res_search()
5761 ; return 0; }
5762 EOF
5763 if { (eval echo configure:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5764   rm -rf conftest*
5765   eval "ac_cv_lib_$ac_lib_var=yes"
5766 else
5767   echo "configure: failed program was:" >&5
5768   cat conftest.$ac_ext >&5
5769   rm -rf conftest*
5770   eval "ac_cv_lib_$ac_lib_var=no"
5771 fi
5772 rm -f conftest*
5773 LIBS="$ac_save_LIBS"
5774
5775 fi
5776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5777   echo "$ac_t""yes" 1>&6
5778     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5779     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5780   cat >> confdefs.h <<EOF
5781 #define $ac_tr_lib 1
5782 EOF
5783
5784   LIBS="-lresolv $LIBS"
5785
5786 else
5787   echo "$ac_t""no" 1>&6
5788 fi
5789
5790         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5791 fi
5792
5793 if test "$ac_cv_func_res_search" = yes ; then
5794         cat >> confdefs.h <<\EOF
5795 #define HAVE_RES_SEARCH 1
5796 EOF
5797
5798 elif test $ol_enable_dns = yes ; then
5799         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5800 elif test $ol_enable_dns != no ; then
5801         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5802 fi
5803
5804
5805 ol_link_isode=no
5806 if test $ol_enable_ldapd != no ; then
5807         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5808
5809                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5810 echo "configure:5811: checking for main in -lxtpp" >&5
5811 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5812 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5813   echo $ac_n "(cached) $ac_c" 1>&6
5814 else
5815   ac_save_LIBS="$LIBS"
5816 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5817 cat > conftest.$ac_ext <<EOF
5818 #line 5819 "configure"
5819 #include "confdefs.h"
5820
5821 int main() {
5822 main()
5823 ; return 0; }
5824 EOF
5825 if { (eval echo configure:5826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5826   rm -rf conftest*
5827   eval "ac_cv_lib_$ac_lib_var=yes"
5828 else
5829   echo "configure: failed program was:" >&5
5830   cat conftest.$ac_ext >&5
5831   rm -rf conftest*
5832   eval "ac_cv_lib_$ac_lib_var=no"
5833 fi
5834 rm -f conftest*
5835 LIBS="$ac_save_LIBS"
5836
5837 fi
5838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5839   echo "$ac_t""yes" 1>&6
5840   
5841                 ol_link_isode=yes
5842                 cat >> confdefs.h <<\EOF
5843 #define HAVE_XTPP 1
5844 EOF
5845
5846                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5847                 
5848 else
5849   echo "$ac_t""no" 1>&6
5850 :
5851 fi
5852
5853         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5854 echo "configure:5855: checking for main in -ldsap" >&5
5855 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5856 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5857   echo $ac_n "(cached) $ac_c" 1>&6
5858 else
5859   ac_save_LIBS="$LIBS"
5860 LIBS="-ldsap -lisode $LIBS"
5861 cat > conftest.$ac_ext <<EOF
5862 #line 5863 "configure"
5863 #include "confdefs.h"
5864
5865 int main() {
5866 main()
5867 ; return 0; }
5868 EOF
5869 if { (eval echo configure:5870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5870   rm -rf conftest*
5871   eval "ac_cv_lib_$ac_lib_var=yes"
5872 else
5873   echo "configure: failed program was:" >&5
5874   cat conftest.$ac_ext >&5
5875   rm -rf conftest*
5876   eval "ac_cv_lib_$ac_lib_var=no"
5877 fi
5878 rm -f conftest*
5879 LIBS="$ac_save_LIBS"
5880
5881 fi
5882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5883   echo "$ac_t""yes" 1>&6
5884   
5885                 ol_link_isode=yes
5886                 cat >> confdefs.h <<\EOF
5887 #define HAVE_DSAP 1
5888 EOF
5889
5890                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5891                 
5892 else
5893   echo "$ac_t""no" 1>&6
5894 :
5895 fi
5896
5897         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5898 echo "configure:5899: checking for main in -lisode" >&5
5899 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5900 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5901   echo $ac_n "(cached) $ac_c" 1>&6
5902 else
5903   ac_save_LIBS="$LIBS"
5904 LIBS="-lisode  $LIBS"
5905 cat > conftest.$ac_ext <<EOF
5906 #line 5907 "configure"
5907 #include "confdefs.h"
5908
5909 int main() {
5910 main()
5911 ; return 0; }
5912 EOF
5913 if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5914   rm -rf conftest*
5915   eval "ac_cv_lib_$ac_lib_var=yes"
5916 else
5917   echo "configure: failed program was:" >&5
5918   cat conftest.$ac_ext >&5
5919   rm -rf conftest*
5920   eval "ac_cv_lib_$ac_lib_var=no"
5921 fi
5922 rm -f conftest*
5923 LIBS="$ac_save_LIBS"
5924
5925 fi
5926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5927   echo "$ac_t""yes" 1>&6
5928   
5929                 ol_link_isode=yes
5930                 cat >> confdefs.h <<\EOF
5931 #define HAVE_ISODE 1
5932 EOF
5933
5934                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5935                 
5936 else
5937   echo "$ac_t""no" 1>&6
5938 :
5939 fi
5940
5941 fi
5942
5943 if test $ol_link_isode != no; then
5944         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5945 echo "configure:5946: checking for main in -lpp" >&5
5946 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5947 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5948   echo $ac_n "(cached) $ac_c" 1>&6
5949 else
5950   ac_save_LIBS="$LIBS"
5951 LIBS="-lpp  $LIBS"
5952 cat > conftest.$ac_ext <<EOF
5953 #line 5954 "configure"
5954 #include "confdefs.h"
5955
5956 int main() {
5957 main()
5958 ; return 0; }
5959 EOF
5960 if { (eval echo configure:5961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5961   rm -rf conftest*
5962   eval "ac_cv_lib_$ac_lib_var=yes"
5963 else
5964   echo "configure: failed program was:" >&5
5965   cat conftest.$ac_ext >&5
5966   rm -rf conftest*
5967   eval "ac_cv_lib_$ac_lib_var=no"
5968 fi
5969 rm -f conftest*
5970 LIBS="$ac_save_LIBS"
5971
5972 fi
5973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5974   echo "$ac_t""yes" 1>&6
5975   
5976                 cat >> confdefs.h <<\EOF
5977 #define HAVE_PP 1
5978 EOF
5979
5980                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5981                 
5982 else
5983   echo "$ac_t""no" 1>&6
5984 :
5985 fi
5986
5987
5988         # Extract the first word of "pepsy", so it can be a program name with args.
5989 set dummy pepsy; ac_word=$2
5990 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5991 echo "configure:5992: checking for $ac_word" >&5
5992 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5993   echo $ac_n "(cached) $ac_c" 1>&6
5994 else
5995   case "$PEPSY" in
5996   /*)
5997   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5998   ;;
5999   ?:/*)
6000   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
6001   ;;
6002   *)
6003   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6004   ac_dummy="$PATH"
6005   for ac_dir in $ac_dummy; do 
6006     test -z "$ac_dir" && ac_dir=.
6007     if test -f $ac_dir/$ac_word; then
6008       ac_cv_path_PEPSY="$ac_dir/$ac_word"
6009       break
6010     fi
6011   done
6012   IFS="$ac_save_ifs"
6013   ;;
6014 esac
6015 fi
6016 PEPSY="$ac_cv_path_PEPSY"
6017 if test -n "$PEPSY"; then
6018   echo "$ac_t""$PEPSY" 1>&6
6019 else
6020   echo "$ac_t""no" 1>&6
6021 fi
6022
6023 fi
6024
6025 if test $ol_enable_quipu != no ; then
6026         for ac_hdr in quipu/commonarg.h
6027 do
6028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6030 echo "configure:6031: checking for $ac_hdr" >&5
6031 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6032   echo $ac_n "(cached) $ac_c" 1>&6
6033 else
6034   cat > conftest.$ac_ext <<EOF
6035 #line 6036 "configure"
6036 #include "confdefs.h"
6037 #include <$ac_hdr>
6038 EOF
6039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6040 { (eval echo configure:6041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6042 if test -z "$ac_err"; then
6043   rm -rf conftest*
6044   eval "ac_cv_header_$ac_safe=yes"
6045 else
6046   echo "$ac_err" >&5
6047   echo "configure: failed program was:" >&5
6048   cat conftest.$ac_ext >&5
6049   rm -rf conftest*
6050   eval "ac_cv_header_$ac_safe=no"
6051 fi
6052 rm -f conftest*
6053 fi
6054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6055   echo "$ac_t""yes" 1>&6
6056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6057   cat >> confdefs.h <<EOF
6058 #define $ac_tr_hdr 1
6059 EOF
6060  
6061 else
6062   echo "$ac_t""no" 1>&6
6063 fi
6064 done
6065
6066
6067         if test $ac_cv_header_quipu_commonarg_h = yes ; then
6068                 BUILD_QUIPU=yes
6069         elif test $ol_enable_quipu = auto ; then
6070                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
6071         else
6072                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
6073         fi
6074 fi
6075
6076 ol_link_kbind=no
6077 ol_link_kpasswd=no
6078 ol_link_krb5=no
6079 ol_link_krb4=no
6080
6081 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
6082         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
6083
6084         for ac_hdr in krb5.h
6085 do
6086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6088 echo "configure:6089: checking for $ac_hdr" >&5
6089 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6090   echo $ac_n "(cached) $ac_c" 1>&6
6091 else
6092   cat > conftest.$ac_ext <<EOF
6093 #line 6094 "configure"
6094 #include "confdefs.h"
6095 #include <$ac_hdr>
6096 EOF
6097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6098 { (eval echo configure:6099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6100 if test -z "$ac_err"; then
6101   rm -rf conftest*
6102   eval "ac_cv_header_$ac_safe=yes"
6103 else
6104   echo "$ac_err" >&5
6105   echo "configure: failed program was:" >&5
6106   cat conftest.$ac_ext >&5
6107   rm -rf conftest*
6108   eval "ac_cv_header_$ac_safe=no"
6109 fi
6110 rm -f conftest*
6111 fi
6112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6113   echo "$ac_t""yes" 1>&6
6114     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6115   cat >> confdefs.h <<EOF
6116 #define $ac_tr_hdr 1
6117 EOF
6118  
6119 else
6120   echo "$ac_t""no" 1>&6
6121 fi
6122 done
6123
6124
6125         if test $ac_cv_header_krb5_h = yes ; then
6126                                 for ac_hdr in heim_err.h
6127 do
6128 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6129 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6130 echo "configure:6131: checking for $ac_hdr" >&5
6131 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6132   echo $ac_n "(cached) $ac_c" 1>&6
6133 else
6134   cat > conftest.$ac_ext <<EOF
6135 #line 6136 "configure"
6136 #include "confdefs.h"
6137 #include <$ac_hdr>
6138 EOF
6139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6140 { (eval echo configure:6141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6142 if test -z "$ac_err"; then
6143   rm -rf conftest*
6144   eval "ac_cv_header_$ac_safe=yes"
6145 else
6146   echo "$ac_err" >&5
6147   echo "configure: failed program was:" >&5
6148   cat conftest.$ac_ext >&5
6149   rm -rf conftest*
6150   eval "ac_cv_header_$ac_safe=no"
6151 fi
6152 rm -f conftest*
6153 fi
6154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6155   echo "$ac_t""yes" 1>&6
6156     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6157   cat >> confdefs.h <<EOF
6158 #define $ac_tr_hdr 1
6159 EOF
6160  
6161 else
6162   echo "$ac_t""no" 1>&6
6163 fi
6164 done
6165
6166                 if test $ac_cv_header_heim_err_h = yes ; then
6167                         krb5_impl=heimdal
6168                 else
6169                         krb5_impl=mit
6170                 fi
6171
6172                 if test $krb5_impl = mit; then
6173                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6174 echo "configure:6175: checking for main in -lkrb5" >&5
6175 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6177   echo $ac_n "(cached) $ac_c" 1>&6
6178 else
6179   ac_save_LIBS="$LIBS"
6180 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6181 cat > conftest.$ac_ext <<EOF
6182 #line 6183 "configure"
6183 #include "confdefs.h"
6184
6185 int main() {
6186 main()
6187 ; return 0; }
6188 EOF
6189 if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6190   rm -rf conftest*
6191   eval "ac_cv_lib_$ac_lib_var=yes"
6192 else
6193   echo "configure: failed program was:" >&5
6194   cat conftest.$ac_ext >&5
6195   rm -rf conftest*
6196   eval "ac_cv_lib_$ac_lib_var=no"
6197 fi
6198 rm -f conftest*
6199 LIBS="$ac_save_LIBS"
6200
6201 fi
6202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6203   echo "$ac_t""yes" 1>&6
6204   have_krb5=yes
6205                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6206 else
6207   echo "$ac_t""no" 1>&6
6208 have_krb5=no
6209 fi
6210
6211
6212                 elif test $krb5_impl = heimdal; then
6213                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6214 echo "configure:6215: checking for main in -lkrb5" >&5
6215 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6216 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6217   echo $ac_n "(cached) $ac_c" 1>&6
6218 else
6219   ac_save_LIBS="$LIBS"
6220 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6221 cat > conftest.$ac_ext <<EOF
6222 #line 6223 "configure"
6223 #include "confdefs.h"
6224
6225 int main() {
6226 main()
6227 ; return 0; }
6228 EOF
6229 if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6230   rm -rf conftest*
6231   eval "ac_cv_lib_$ac_lib_var=yes"
6232 else
6233   echo "configure: failed program was:" >&5
6234   cat conftest.$ac_ext >&5
6235   rm -rf conftest*
6236   eval "ac_cv_lib_$ac_lib_var=no"
6237 fi
6238 rm -f conftest*
6239 LIBS="$ac_save_LIBS"
6240
6241 fi
6242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6243   echo "$ac_t""yes" 1>&6
6244   have_krb5=yes
6245                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6246 else
6247   echo "$ac_t""no" 1>&6
6248 have_krb5=no
6249 fi
6250
6251
6252                         cat >> confdefs.h <<\EOF
6253 #define HAVE_HEIMDAL_KERBEROS 1
6254 EOF
6255
6256                 else
6257                         have_krb5=no
6258                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6259                 fi
6260
6261                 if test $have_krb5 = yes ; then
6262                         ol_link_krb5=yes
6263
6264                         cat >> confdefs.h <<\EOF
6265 #define HAVE_KRB5 1
6266 EOF
6267
6268
6269                         if test $ol_enable_kpasswd != no ; then
6270                                 ol_link_kpasswd=yes;
6271                         fi
6272
6273                         if test $ol_with_kerberos = k5only ; then
6274                                 ol_with_kerberos=found
6275                         fi
6276
6277                 elif test $ol_with_kerberos != auto ; then
6278                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6279                 fi
6280
6281         fi
6282 fi
6283
6284 if test $ol_link_krb5 = yes -a \
6285         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6286
6287         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6288 do
6289 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6290 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6291 echo "configure:6292: checking for $ac_hdr" >&5
6292 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6293   echo $ac_n "(cached) $ac_c" 1>&6
6294 else
6295   cat > conftest.$ac_ext <<EOF
6296 #line 6297 "configure"
6297 #include "confdefs.h"
6298 #include <$ac_hdr>
6299 EOF
6300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6301 { (eval echo configure:6302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6303 if test -z "$ac_err"; then
6304   rm -rf conftest*
6305   eval "ac_cv_header_$ac_safe=yes"
6306 else
6307   echo "$ac_err" >&5
6308   echo "configure: failed program was:" >&5
6309   cat conftest.$ac_ext >&5
6310   rm -rf conftest*
6311   eval "ac_cv_header_$ac_safe=no"
6312 fi
6313 rm -f conftest*
6314 fi
6315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6316   echo "$ac_t""yes" 1>&6
6317     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6318   cat >> confdefs.h <<EOF
6319 #define $ac_tr_hdr 1
6320 EOF
6321  
6322 else
6323   echo "$ac_t""no" 1>&6
6324 fi
6325 done
6326
6327
6328         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6329                 if test $krb5_impl = mit; then
6330                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6331 echo "configure:6332: checking for main in -lkrb4" >&5
6332 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6333 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6334   echo $ac_n "(cached) $ac_c" 1>&6
6335 else
6336   ac_save_LIBS="$LIBS"
6337 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6338 cat > conftest.$ac_ext <<EOF
6339 #line 6340 "configure"
6340 #include "confdefs.h"
6341
6342 int main() {
6343 main()
6344 ; return 0; }
6345 EOF
6346 if { (eval echo configure:6347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6347   rm -rf conftest*
6348   eval "ac_cv_lib_$ac_lib_var=yes"
6349 else
6350   echo "configure: failed program was:" >&5
6351   cat conftest.$ac_ext >&5
6352   rm -rf conftest*
6353   eval "ac_cv_lib_$ac_lib_var=no"
6354 fi
6355 rm -f conftest*
6356 LIBS="$ac_save_LIBS"
6357
6358 fi
6359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6360   echo "$ac_t""yes" 1>&6
6361   have_k425=yes
6362                                 KRB4_LIBS="-lkrb4 -ldes425"
6363 else
6364   echo "$ac_t""no" 1>&6
6365 have_k425=no
6366 fi
6367
6368
6369                 elif test $krb5_impl = heimdal; then
6370                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6371 echo "configure:6372: checking for main in -lkrb4" >&5
6372 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6373 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6374   echo $ac_n "(cached) $ac_c" 1>&6
6375 else
6376   ac_save_LIBS="$LIBS"
6377 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6378 cat > conftest.$ac_ext <<EOF
6379 #line 6380 "configure"
6380 #include "confdefs.h"
6381
6382 int main() {
6383 main()
6384 ; return 0; }
6385 EOF
6386 if { (eval echo configure:6387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6387   rm -rf conftest*
6388   eval "ac_cv_lib_$ac_lib_var=yes"
6389 else
6390   echo "configure: failed program was:" >&5
6391   cat conftest.$ac_ext >&5
6392   rm -rf conftest*
6393   eval "ac_cv_lib_$ac_lib_var=no"
6394 fi
6395 rm -f conftest*
6396 LIBS="$ac_save_LIBS"
6397
6398 fi
6399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6400   echo "$ac_t""yes" 1>&6
6401   have_k425=yes
6402                                 KRB4_LIBS="-lkrb4"
6403 else
6404   echo "$ac_t""no" 1>&6
6405 have_k425=no
6406 fi
6407
6408
6409                 else
6410                         have_425=no
6411                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6412                 fi
6413
6414                 if test $have_k425 = yes ; then
6415                         ol_with_kerberos=found
6416                         ol_link_krb4=yes
6417
6418                         cat >> confdefs.h <<\EOF
6419 #define HAVE_KRB425 1
6420 EOF
6421
6422                         cat >> confdefs.h <<\EOF
6423 #define HAVE_KRB4 1
6424 EOF
6425
6426
6427                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6428 echo "configure:6429: checking for des_debug in Kerberos libraries" >&5
6429 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6430   echo $ac_n "(cached) $ac_c" 1>&6
6431 else
6432   
6433                                                                 save_LIBS="$LIBS"
6434                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6435                                 cat > conftest.$ac_ext <<EOF
6436 #line 6437 "configure"
6437 #include "confdefs.h"
6438
6439 #include <kerberosIV/krb.h>
6440 #include <kerberosIV/des.h>
6441 extern int des_debug;
6442
6443 int main() {
6444
6445 des_debug = 1;
6446
6447 ; return 0; }
6448 EOF
6449 if { (eval echo configure:6450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6450   rm -rf conftest*
6451   ol_cv_var_des_debug=yes
6452 else
6453   echo "configure: failed program was:" >&5
6454   cat conftest.$ac_ext >&5
6455   rm -rf conftest*
6456   ol_cv_var_des_debug=no
6457 fi
6458 rm -f conftest*
6459                                                                 LIBS="$save_LIBS"
6460                         
6461 fi
6462
6463 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6464
6465                         if test $ol_cv_var_des_debug = yes ; then
6466                                 cat >> confdefs.h <<\EOF
6467 #define HAVE_DES_DEBUG 1
6468 EOF
6469
6470                         fi
6471
6472                         LIBS="$save_LIBS"
6473                 fi
6474         fi
6475 fi
6476
6477 if test $ol_link_krb5 = yes ; then
6478         ol_with_kerberos=found
6479 fi
6480
6481 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6482         -o $ol_with_kerberos = kth ; then
6483
6484         for ac_hdr in krb.h des.h krb-archaeology.h 
6485 do
6486 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6487 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6488 echo "configure:6489: checking for $ac_hdr" >&5
6489 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6490   echo $ac_n "(cached) $ac_c" 1>&6
6491 else
6492   cat > conftest.$ac_ext <<EOF
6493 #line 6494 "configure"
6494 #include "confdefs.h"
6495 #include <$ac_hdr>
6496 EOF
6497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6498 { (eval echo configure:6499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6500 if test -z "$ac_err"; then
6501   rm -rf conftest*
6502   eval "ac_cv_header_$ac_safe=yes"
6503 else
6504   echo "$ac_err" >&5
6505   echo "configure: failed program was:" >&5
6506   cat conftest.$ac_ext >&5
6507   rm -rf conftest*
6508   eval "ac_cv_header_$ac_safe=no"
6509 fi
6510 rm -f conftest*
6511 fi
6512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6513   echo "$ac_t""yes" 1>&6
6514     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6515   cat >> confdefs.h <<EOF
6516 #define $ac_tr_hdr 1
6517 EOF
6518  
6519 else
6520   echo "$ac_t""no" 1>&6
6521 fi
6522 done
6523
6524
6525         if test $ac_cv_header_krb_h = yes ; then
6526                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6527 echo "configure:6528: checking for main in -lkrb" >&5
6528 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6530   echo $ac_n "(cached) $ac_c" 1>&6
6531 else
6532   ac_save_LIBS="$LIBS"
6533 LIBS="-lkrb -ldes $LIBS"
6534 cat > conftest.$ac_ext <<EOF
6535 #line 6536 "configure"
6536 #include "confdefs.h"
6537
6538 int main() {
6539 main()
6540 ; return 0; }
6541 EOF
6542 if { (eval echo configure:6543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6543   rm -rf conftest*
6544   eval "ac_cv_lib_$ac_lib_var=yes"
6545 else
6546   echo "configure: failed program was:" >&5
6547   cat conftest.$ac_ext >&5
6548   rm -rf conftest*
6549   eval "ac_cv_lib_$ac_lib_var=no"
6550 fi
6551 rm -f conftest*
6552 LIBS="$ac_save_LIBS"
6553
6554 fi
6555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6556   echo "$ac_t""yes" 1>&6
6557   have_k4=yes
6558 else
6559   echo "$ac_t""no" 1>&6
6560 have_k4=no
6561 fi
6562
6563
6564                 if test $have_k4 = yes ; then
6565                         ol_with_kerberos=found
6566                         ol_link_krb4=yes
6567
6568                         cat >> confdefs.h <<\EOF
6569 #define HAVE_KRB4 1
6570 EOF
6571
6572
6573                         KRB4_LIBS="-lkrb -ldes"
6574
6575                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6576                                 cat >> confdefs.h <<\EOF
6577 #define HAVE_KTH_KERBEROS 1
6578 EOF
6579
6580                         fi
6581                 fi
6582         fi
6583 fi
6584
6585 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6586         ol_link_kpasswd=yes;
6587 fi
6588
6589 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6590         cat >> confdefs.h <<\EOF
6591 #define HAVE_KERBEROS 1
6592 EOF
6593
6594
6595 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6596         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6597 fi
6598
6599 ol_link_tls=no
6600 if test $ol_with_tls != no ; then
6601         
6602         for ac_hdr in openssl/ssl.h ssl.h
6603 do
6604 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6605 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6606 echo "configure:6607: checking for $ac_hdr" >&5
6607 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6608   echo $ac_n "(cached) $ac_c" 1>&6
6609 else
6610   cat > conftest.$ac_ext <<EOF
6611 #line 6612 "configure"
6612 #include "confdefs.h"
6613 #include <$ac_hdr>
6614 EOF
6615 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6616 { (eval echo configure:6617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6617 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6618 if test -z "$ac_err"; then
6619   rm -rf conftest*
6620   eval "ac_cv_header_$ac_safe=yes"
6621 else
6622   echo "$ac_err" >&5
6623   echo "configure: failed program was:" >&5
6624   cat conftest.$ac_ext >&5
6625   rm -rf conftest*
6626   eval "ac_cv_header_$ac_safe=no"
6627 fi
6628 rm -f conftest*
6629 fi
6630 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6631   echo "$ac_t""yes" 1>&6
6632     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6633   cat >> confdefs.h <<EOF
6634 #define $ac_tr_hdr 1
6635 EOF
6636  
6637 else
6638   echo "$ac_t""no" 1>&6
6639 fi
6640 done
6641
6642         
6643         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6644                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6645 echo "configure:6646: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6646 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6647 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6648   echo $ac_n "(cached) $ac_c" 1>&6
6649 else
6650   ac_save_LIBS="$LIBS"
6651 LIBS="-lssl -lcrypto $LIBS"
6652 cat > conftest.$ac_ext <<EOF
6653 #line 6654 "configure"
6654 #include "confdefs.h"
6655 /* Override any gcc2 internal prototype to avoid an error.  */
6656 /* We use char because int might match the return type of a gcc2
6657     builtin and then its argument prototype would still apply.  */
6658 char SSLeay_add_ssl_algorithms();
6659
6660 int main() {
6661 SSLeay_add_ssl_algorithms()
6662 ; return 0; }
6663 EOF
6664 if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6665   rm -rf conftest*
6666   eval "ac_cv_lib_$ac_lib_var=yes"
6667 else
6668   echo "configure: failed program was:" >&5
6669   cat conftest.$ac_ext >&5
6670   rm -rf conftest*
6671   eval "ac_cv_lib_$ac_lib_var=no"
6672 fi
6673 rm -f conftest*
6674 LIBS="$ac_save_LIBS"
6675
6676 fi
6677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6678   echo "$ac_t""yes" 1>&6
6679   have_ssleay=yes
6680                         need_rsaref=no
6681 else
6682   echo "$ac_t""no" 1>&6
6683 have_ssleay=no
6684 fi
6685
6686                         
6687                 if test $have_ssleay = no ; then
6688                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6689 echo "configure:6690: checking for SSL_library_init in -lssl" >&5
6690 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6691 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6692   echo $ac_n "(cached) $ac_c" 1>&6
6693 else
6694   ac_save_LIBS="$LIBS"
6695 LIBS="-lssl -lcrypto $LIBS"
6696 cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 /* Override any gcc2 internal prototype to avoid an error.  */
6700 /* We use char because int might match the return type of a gcc2
6701     builtin and then its argument prototype would still apply.  */
6702 char SSL_library_init();
6703
6704 int main() {
6705 SSL_library_init()
6706 ; return 0; }
6707 EOF
6708 if { (eval echo configure:6709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6709   rm -rf conftest*
6710   eval "ac_cv_lib_$ac_lib_var=yes"
6711 else
6712   echo "configure: failed program was:" >&5
6713   cat conftest.$ac_ext >&5
6714   rm -rf conftest*
6715   eval "ac_cv_lib_$ac_lib_var=no"
6716 fi
6717 rm -f conftest*
6718 LIBS="$ac_save_LIBS"
6719
6720 fi
6721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6722   echo "$ac_t""yes" 1>&6
6723   have_ssleay=yes
6724                                 need_rsaref=no
6725 else
6726   echo "$ac_t""no" 1>&6
6727 have_ssleay=no
6728 fi
6729
6730                 fi
6731
6732                 if test $have_ssleay = no ; then
6733                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6734 echo "configure:6735: checking for ssl3_accept in -lssl" >&5
6735 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6736 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6737   echo $ac_n "(cached) $ac_c" 1>&6
6738 else
6739   ac_save_LIBS="$LIBS"
6740 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6741 cat > conftest.$ac_ext <<EOF
6742 #line 6743 "configure"
6743 #include "confdefs.h"
6744 /* Override any gcc2 internal prototype to avoid an error.  */
6745 /* We use char because int might match the return type of a gcc2
6746     builtin and then its argument prototype would still apply.  */
6747 char ssl3_accept();
6748
6749 int main() {
6750 ssl3_accept()
6751 ; return 0; }
6752 EOF
6753 if { (eval echo configure:6754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6754   rm -rf conftest*
6755   eval "ac_cv_lib_$ac_lib_var=yes"
6756 else
6757   echo "configure: failed program was:" >&5
6758   cat conftest.$ac_ext >&5
6759   rm -rf conftest*
6760   eval "ac_cv_lib_$ac_lib_var=no"
6761 fi
6762 rm -f conftest*
6763 LIBS="$ac_save_LIBS"
6764
6765 fi
6766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6767   echo "$ac_t""yes" 1>&6
6768   have_ssleay=yes
6769                                 need_rsaref=yes
6770 else
6771   echo "$ac_t""no" 1>&6
6772 have_ssleay=no
6773 fi
6774
6775                 fi
6776
6777                 if test $have_ssleay = yes ; then
6778                         ol_with_tls=found
6779                         ol_link_tls=yes
6780
6781                         cat >> confdefs.h <<\EOF
6782 #define HAVE_SSLEAY 1
6783 EOF
6784
6785
6786                         if test $need_rsaref = yes; then
6787                                 cat >> confdefs.h <<\EOF
6788 #define HAVE_RSAREF 1
6789 EOF
6790
6791
6792                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6793                         else
6794                                 TLS_LIBS="-lssl -lcrypto"
6795                         fi
6796                 fi
6797         fi
6798 fi
6799
6800 if test $ol_link_tls = yes ; then
6801         cat >> confdefs.h <<\EOF
6802 #define HAVE_TLS 1
6803 EOF
6804
6805 fi      
6806
6807 for ac_func in \
6808         ctime_r                 \
6809         gethostbyname_r gethostbyaddr_r \
6810
6811 do
6812 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6813 echo "configure:6814: checking for $ac_func" >&5
6814 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6815   echo $ac_n "(cached) $ac_c" 1>&6
6816 else
6817   cat > conftest.$ac_ext <<EOF
6818 #line 6819 "configure"
6819 #include "confdefs.h"
6820 /* System header to define __stub macros and hopefully few prototypes,
6821     which can conflict with char $ac_func(); below.  */
6822 #include <assert.h>
6823 /* Override any gcc2 internal prototype to avoid an error.  */
6824 /* We use char because int might match the return type of a gcc2
6825     builtin and then its argument prototype would still apply.  */
6826 char $ac_func();
6827 char (*f)();
6828
6829 int main() {
6830
6831 /* The GNU C library defines this for functions which it implements
6832     to always fail with ENOSYS.  Some functions are actually named
6833     something starting with __ and the normal name is an alias.  */
6834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6835 choke me
6836 #else
6837 f = $ac_func;
6838 #endif
6839
6840 ; return 0; }
6841 EOF
6842 if { (eval echo configure:6843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6843   rm -rf conftest*
6844   eval "ac_cv_func_$ac_func=yes"
6845 else
6846   echo "configure: failed program was:" >&5
6847   cat conftest.$ac_ext >&5
6848   rm -rf conftest*
6849   eval "ac_cv_func_$ac_func=no"
6850 fi
6851 rm -f conftest*
6852 fi
6853
6854 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6855   echo "$ac_t""yes" 1>&6
6856     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6857   cat >> confdefs.h <<EOF
6858 #define $ac_tr_func 1
6859 EOF
6860  
6861 else
6862   echo "$ac_t""no" 1>&6
6863 fi
6864 done
6865
6866
6867 if test "$ac_cv_func_ctime_r" = no ; then
6868         ol_cv_func_ctime_r_nargs=0
6869 else
6870         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6871 echo "configure:6872: checking number of arguments of ctime_r" >&5
6872 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6873   echo $ac_n "(cached) $ac_c" 1>&6
6874 else
6875   cat > conftest.$ac_ext <<EOF
6876 #line 6877 "configure"
6877 #include "confdefs.h"
6878 #include <time.h>
6879 int main() {
6880 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6881 ; return 0; }
6882 EOF
6883 if { (eval echo configure:6884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6884   rm -rf conftest*
6885   ol_cv_func_ctime_r_nargs3=yes
6886 else
6887   echo "configure: failed program was:" >&5
6888   cat conftest.$ac_ext >&5
6889   rm -rf conftest*
6890   ol_cv_func_ctime_r_nargs3=no
6891 fi
6892 rm -f conftest*
6893
6894         cat > conftest.$ac_ext <<EOF
6895 #line 6896 "configure"
6896 #include "confdefs.h"
6897 #include <time.h>
6898 int main() {
6899 time_t ti; char *buffer; ctime_r(&ti,buffer);
6900 ; return 0; }
6901 EOF
6902 if { (eval echo configure:6903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6903   rm -rf conftest*
6904   ol_cv_func_ctime_r_nargs2=yes
6905 else
6906   echo "configure: failed program was:" >&5
6907   cat conftest.$ac_ext >&5
6908   rm -rf conftest*
6909   ol_cv_func_ctime_r_nargs2=no
6910 fi
6911 rm -f conftest*
6912
6913         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6914                 $ol_cv_func_ctime_r_nargs2 = no ; then
6915
6916                 ol_cv_func_ctime_r_nargs=3
6917
6918         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6919                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6920
6921                 ol_cv_func_ctime_r_nargs=2
6922
6923         else
6924                 ol_cv_func_ctime_r_nargs=0
6925         fi
6926   
6927 fi
6928
6929 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6930
6931   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6932         cat >> confdefs.h <<EOF
6933 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6934 EOF
6935
6936   fi
6937
6938 fi
6939
6940 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6941         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6942 echo "configure:6943: checking number of arguments of gethostbyname_r" >&5
6943 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6944   echo $ac_n "(cached) $ac_c" 1>&6
6945 else
6946   cat > conftest.$ac_ext <<EOF
6947 #line 6948 "configure"
6948 #include "confdefs.h"
6949 #include <sys/types.h>
6950 #include <sys/socket.h>
6951 #include <netinet/in.h>
6952 #include <netdb.h>
6953 #define BUFSIZE (sizeof(struct hostent)+10)
6954 int main() {
6955 struct hostent hent; char buffer[BUFSIZE];
6956                 int bufsize=BUFSIZE;int h_errno;
6957                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6958                         buffer, bufsize, &h_errno);
6959 ; return 0; }
6960 EOF
6961 if { (eval echo configure:6962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6962   rm -rf conftest*
6963   ol_cv_func_gethostbyname_r_nargs5=yes
6964 else
6965   echo "configure: failed program was:" >&5
6966   cat conftest.$ac_ext >&5
6967   rm -rf conftest*
6968   ol_cv_func_gethostbyname_r_nargs5=no
6969 fi
6970 rm -f conftest*
6971
6972         cat > conftest.$ac_ext <<EOF
6973 #line 6974 "configure"
6974 #include "confdefs.h"
6975 #include <sys/types.h>
6976 #include <sys/socket.h>
6977 #include <netinet/in.h>
6978 #include <netdb.h>
6979 #define BUFSIZE (sizeof(struct hostent)+10)
6980 int main() {
6981 struct hostent hent;struct hostent *rhent;
6982                 char buffer[BUFSIZE];
6983                 int bufsize=BUFSIZE;int h_errno;
6984                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6985                         &rhent, &h_errno);
6986 ; return 0; }
6987 EOF
6988 if { (eval echo configure:6989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6989   rm -rf conftest*
6990   ol_cv_func_gethostbyname_r_nargs6=yes
6991 else
6992   echo "configure: failed program was:" >&5
6993   cat conftest.$ac_ext >&5
6994   rm -rf conftest*
6995   ol_cv_func_gethostbyname_r_nargs6=no
6996 fi
6997 rm -f conftest*
6998
6999         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
7000                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
7001
7002                 ol_cv_func_gethostbyname_r_nargs=5
7003
7004         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
7005                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
7006
7007                 ol_cv_func_gethostbyname_r_nargs=6
7008
7009         else
7010                 ol_cv_func_gethostbyname_r_nargs=0
7011         fi
7012   
7013 fi
7014
7015 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
7016   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
7017         cat >> confdefs.h <<EOF
7018 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
7019 EOF
7020
7021   fi
7022
7023 else
7024         ol_cv_func_gethostbyname_r_nargs=0
7025 fi
7026  
7027 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
7028         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
7029 echo "configure:7030: checking number of arguments of gethostbyaddr_r" >&5
7030 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
7031   echo $ac_n "(cached) $ac_c" 1>&6
7032 else
7033   cat > conftest.$ac_ext <<EOF
7034 #line 7035 "configure"
7035 #include "confdefs.h"
7036 #include <sys/types.h>
7037 #include <sys/socket.h>
7038 #include <netinet/in.h>
7039 #include <netdb.h>
7040 #define BUFSIZE (sizeof(struct hostent)+10)
7041 int main() {
7042 struct hostent hent; char buffer[BUFSIZE]; 
7043             struct in_addr add;
7044             size_t alen=sizeof(struct in_addr);
7045             int bufsize=BUFSIZE;int h_errno;
7046                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7047                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
7048 ; return 0; }
7049 EOF
7050 if { (eval echo configure:7051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7051   rm -rf conftest*
7052   ol_cv_func_gethostbyaddr_r_nargs7=yes
7053 else
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   ol_cv_func_gethostbyaddr_r_nargs7=no
7058 fi
7059 rm -f conftest*
7060
7061         cat > conftest.$ac_ext <<EOF
7062 #line 7063 "configure"
7063 #include "confdefs.h"
7064 #include <sys/types.h>
7065 #include <sys/socket.h>
7066 #include <netinet/in.h>
7067 #include <netdb.h>
7068 #define BUFSIZE (sizeof(struct hostent)+10)
7069 int main() {
7070 struct hostent hent;
7071                 struct hostent *rhent; char buffer[BUFSIZE]; 
7072                 struct in_addr add;
7073                 size_t alen=sizeof(struct in_addr);
7074                 int bufsize=BUFSIZE;int h_errno;
7075                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7076                         alen, AF_INET, &hent, buffer, bufsize, 
7077                         &rhent, &h_errno);
7078 ; return 0; }
7079 EOF
7080 if { (eval echo configure:7081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7081   rm -rf conftest*
7082   ol_cv_func_gethostbyaddr_r_nargs8=yes
7083 else
7084   echo "configure: failed program was:" >&5
7085   cat conftest.$ac_ext >&5
7086   rm -rf conftest*
7087   ol_cv_func_gethostbyaddr_r_nargs8=no
7088 fi
7089 rm -f conftest*
7090
7091         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7092                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7093
7094                 ol_cv_func_gethostbyaddr_r_nargs=7
7095
7096         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7097                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7098
7099                 ol_cv_func_gethostbyaddr_r_nargs=8
7100
7101         else
7102                 ol_cv_func_gethostbyaddr_r_nargs=0
7103         fi
7104   
7105 fi
7106
7107 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7108   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7109     cat >> confdefs.h <<EOF
7110 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7111 EOF
7112
7113   fi
7114
7115 else
7116         ol_cv_func_gethostbyaddr_r_nargs=0
7117 fi
7118
7119 if test "$ac_cv_func_ctime_r" = yes \
7120         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7121         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7122         -a "$ac_cv_func_gethostbyname_r" = yes \
7123         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7124         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7125         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7126         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7127         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7128         ; then
7129  
7130         cat >> confdefs.h <<\EOF
7131 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7132 EOF
7133
7134 fi
7135
7136 ol_link_threads=no
7137
7138 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7139         -o $ol_with_threads = nt ; then
7140
7141         
7142         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
7143 echo "configure:7144: checking for NT Threads" >&5
7144 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
7145   echo $ac_n "(cached) $ac_c" 1>&6
7146 else
7147   
7148                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7149 echo "configure:7150: checking for _beginthread" >&5
7150 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7151   echo $ac_n "(cached) $ac_c" 1>&6
7152 else
7153   cat > conftest.$ac_ext <<EOF
7154 #line 7155 "configure"
7155 #include "confdefs.h"
7156 /* System header to define __stub macros and hopefully few prototypes,
7157     which can conflict with char _beginthread(); below.  */
7158 #include <assert.h>
7159 /* Override any gcc2 internal prototype to avoid an error.  */
7160 /* We use char because int might match the return type of a gcc2
7161     builtin and then its argument prototype would still apply.  */
7162 char _beginthread();
7163 char (*f)();
7164
7165 int main() {
7166
7167 /* The GNU C library defines this for functions which it implements
7168     to always fail with ENOSYS.  Some functions are actually named
7169     something starting with __ and the normal name is an alias.  */
7170 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7171 choke me
7172 #else
7173 f = _beginthread;
7174 #endif
7175
7176 ; return 0; }
7177 EOF
7178 if { (eval echo configure:7179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7179   rm -rf conftest*
7180   eval "ac_cv_func__beginthread=yes"
7181 else
7182   echo "configure: failed program was:" >&5
7183   cat conftest.$ac_ext >&5
7184   rm -rf conftest*
7185   eval "ac_cv_func__beginthread=no"
7186 fi
7187 rm -f conftest*
7188 fi
7189
7190 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7191   echo "$ac_t""yes" 1>&6
7192   ol_cv_nt_threads=yes
7193 else
7194   echo "$ac_t""no" 1>&6
7195 ol_cv_nt_threads=no
7196 fi
7197
7198         
7199 fi
7200
7201 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7202
7203         if test $ol_cv_nt_threads = yes ; then
7204                 cat >> confdefs.h <<\EOF
7205 #define HAVE_NT_THREADS 1
7206 EOF
7207
7208         fi
7209
7210
7211         if test "$ol_cv_nt_threads" = yes ; then
7212         ol_link_threads=nt
7213         ol_with_threads=found
7214         ol_with_yielding_select=yes
7215
7216                 cat >> confdefs.h <<\EOF
7217 #define HAVE_NT_SERVICE_MANAGER 1
7218 EOF
7219
7220                 cat >> confdefs.h <<\EOF
7221 #define HAVE_NT_EVENT_LOG 1
7222 EOF
7223
7224         fi
7225
7226         if test $ol_with_threads = nt ; then
7227                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7228         fi
7229 fi
7230
7231 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7232         -o $ol_with_threads = posix ; then
7233
7234         for ac_hdr in pthread.h
7235 do
7236 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7237 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7238 echo "configure:7239: checking for $ac_hdr" >&5
7239 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7240   echo $ac_n "(cached) $ac_c" 1>&6
7241 else
7242   cat > conftest.$ac_ext <<EOF
7243 #line 7244 "configure"
7244 #include "confdefs.h"
7245 #include <$ac_hdr>
7246 EOF
7247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7248 { (eval echo configure:7249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7250 if test -z "$ac_err"; then
7251   rm -rf conftest*
7252   eval "ac_cv_header_$ac_safe=yes"
7253 else
7254   echo "$ac_err" >&5
7255   echo "configure: failed program was:" >&5
7256   cat conftest.$ac_ext >&5
7257   rm -rf conftest*
7258   eval "ac_cv_header_$ac_safe=no"
7259 fi
7260 rm -f conftest*
7261 fi
7262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7263   echo "$ac_t""yes" 1>&6
7264     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7265   cat >> confdefs.h <<EOF
7266 #define $ac_tr_hdr 1
7267 EOF
7268  
7269 else
7270   echo "$ac_t""no" 1>&6
7271 fi
7272 done
7273
7274
7275         if test $ac_cv_header_pthread_h = yes ; then
7276                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7277 echo "configure:7278: checking POSIX thread version" >&5
7278 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7279   echo $ac_n "(cached) $ac_c" 1>&6
7280 else
7281   
7282         cat > conftest.$ac_ext <<EOF
7283 #line 7284 "configure"
7284 #include "confdefs.h"
7285
7286 #               include <pthread.h>
7287                 /* this check could be improved */
7288 #               ifdef PTHREAD_ONCE_INIT
7289                         pthread_version_final;
7290 #               endif
7291         
7292 EOF
7293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7294   egrep "pthread_version_final" >/dev/null 2>&1; then
7295   rm -rf conftest*
7296   ol_pthread_final=yes
7297 else
7298   rm -rf conftest*
7299   ol_pthread_final=no
7300 fi
7301 rm -f conftest*
7302
7303
7304         cat > conftest.$ac_ext <<EOF
7305 #line 7306 "configure"
7306 #include "confdefs.h"
7307
7308 #               include <pthread.h>
7309                 /* this check could be improved */
7310 #               ifdef pthread_once_init
7311                         pthread_version_draft4;
7312 #               endif
7313         
7314 EOF
7315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7316   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7317   rm -rf conftest*
7318   ol_pthread_draft4=yes
7319 else
7320   rm -rf conftest*
7321   ol_pthread_draft4=no
7322 fi
7323 rm -f conftest*
7324
7325
7326         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7327                 ol_cv_pthread_version=final
7328         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7329                 ol_cv_pthread_version=draft4
7330         else
7331                 ol_cv_pthread_version=unknown
7332         fi
7333
7334 fi
7335
7336 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7337
7338
7339                 if test $ol_cv_pthread_version = final ; then
7340                         cat >> confdefs.h <<\EOF
7341 #define HAVE_PTHREADS_FINAL 1
7342 EOF
7343
7344                 elif test $ol_cv_pthread_version = draft4 ; then
7345                         cat >> confdefs.h <<\EOF
7346 #define HAVE_PTHREADS_D4 1
7347 EOF
7348
7349                 else
7350                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7351                 fi
7352
7353                 # consider threads found
7354                 ol_with_threads=found
7355
7356                 
7357         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7358 echo "configure:7359: checking for LinuxThreads pthread.h" >&5
7359 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7360   echo $ac_n "(cached) $ac_c" 1>&6
7361 else
7362   cat > conftest.$ac_ext <<EOF
7363 #line 7364 "configure"
7364 #include "confdefs.h"
7365 #include <pthread.h>
7366 EOF
7367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7368   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7369   rm -rf conftest*
7370   ol_cv_header_linux_threads=yes
7371 else
7372   rm -rf conftest*
7373   ol_cv_header_linux_threads=no
7374 fi
7375 rm -f conftest*
7376
7377                 
7378 fi
7379
7380 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7381         if test $ol_cv_header_linux_threads = yes; then
7382                 cat >> confdefs.h <<\EOF
7383 #define HAVE_LINUX_THREADS 1
7384 EOF
7385
7386         fi
7387
7388                 
7389         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7390 echo "configure:7391: checking for GNU Pth pthread.h" >&5
7391 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7392   echo $ac_n "(cached) $ac_c" 1>&6
7393 else
7394   cat > conftest.$ac_ext <<EOF
7395 #line 7396 "configure"
7396 #include "confdefs.h"
7397 #include <pthread.h>
7398 #ifdef _POSIX_THREAD_IS_GNU_PTH
7399         __gnu_pth__;
7400 #endif
7401
7402 EOF
7403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7404   egrep "__gnu_pth__" >/dev/null 2>&1; then
7405   rm -rf conftest*
7406   ol_cv_header_gnu_pth_pthread_h=yes
7407 else
7408   rm -rf conftest*
7409   ol_cv_header_gnu_pth_pthread_h=no
7410 fi
7411 rm -f conftest*
7412
7413                 
7414 fi
7415
7416 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7417
7418
7419                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7420                         for ac_hdr in sched.h
7421 do
7422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7424 echo "configure:7425: checking for $ac_hdr" >&5
7425 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7426   echo $ac_n "(cached) $ac_c" 1>&6
7427 else
7428   cat > conftest.$ac_ext <<EOF
7429 #line 7430 "configure"
7430 #include "confdefs.h"
7431 #include <$ac_hdr>
7432 EOF
7433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7434 { (eval echo configure:7435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7436 if test -z "$ac_err"; then
7437   rm -rf conftest*
7438   eval "ac_cv_header_$ac_safe=yes"
7439 else
7440   echo "$ac_err" >&5
7441   echo "configure: failed program was:" >&5
7442   cat conftest.$ac_ext >&5
7443   rm -rf conftest*
7444   eval "ac_cv_header_$ac_safe=no"
7445 fi
7446 rm -f conftest*
7447 fi
7448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7449   echo "$ac_t""yes" 1>&6
7450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7451   cat >> confdefs.h <<EOF
7452 #define $ac_tr_hdr 1
7453 EOF
7454  
7455 else
7456   echo "$ac_t""no" 1>&6
7457 fi
7458 done
7459
7460                 fi
7461
7462                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7463                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7464 echo "configure:7465: checking for pthread_create in default libraries" >&5
7465 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7466   echo $ac_n "(cached) $ac_c" 1>&6
7467 else
7468   
7469                 if test "$cross_compiling" = yes; then
7470   cat > conftest.$ac_ext <<EOF
7471 #line 7472 "configure"
7472 #include "confdefs.h"
7473 /* pthread test headers */
7474 #include <pthread.h>
7475 #ifndef NULL
7476 #define NULL (void*)0
7477 #endif
7478
7479 static void *task(p)
7480         void *p;
7481 {
7482         return (void *) (p == NULL);
7483 }
7484
7485 int main() {
7486
7487         /* pthread test function */
7488         pthread_t t;
7489         int status;
7490 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7491         /* This system (e.g. AIX) defaults detached; must override */
7492         pthread_attr_t attr;
7493
7494         status = pthread_attr_init(&attr);
7495         if( status ) exit( status );
7496
7497         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7498         if( status ) exit( status );
7499
7500 #define ATTR    &attr
7501 #else
7502 #if HAVE_PTHREADS_D4
7503 #define ATTR    pthread_attr_default
7504 #else
7505 #define ATTR    NULL
7506 #endif
7507 #endif
7508         /* make sure pthread_create() isn't just a stub */
7509         status = pthread_create(&t, ATTR, task, NULL);
7510         if( status ) exit( status );
7511
7512         /* make sure pthread_detach() isn't just a stub */
7513 #if HAVE_PTHREADS_D4
7514         status = pthread_detach( &t );
7515 #else
7516         status = pthread_detach( t );
7517 #endif
7518
7519 #ifdef HAVE_LINUX_THREADS
7520         pthread_kill_other_threads_np();
7521 #endif
7522
7523         exit( status );
7524
7525 ; return 0; }
7526 EOF
7527 if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7528   rm -rf conftest*
7529   ol_cv_pthread_create=yes
7530 else
7531   echo "configure: failed program was:" >&5
7532   cat conftest.$ac_ext >&5
7533   rm -rf conftest*
7534   ol_cv_pthread_create=no
7535 fi
7536 rm -f conftest*
7537 else
7538   cat > conftest.$ac_ext <<EOF
7539 #line 7540 "configure"
7540 #include "confdefs.h"
7541 /* pthread test headers */
7542 #include <pthread.h>
7543 #ifndef NULL
7544 #define NULL (void*)0
7545 #endif
7546
7547 static void *task(p)
7548         void *p;
7549 {
7550         return (void *) (p == NULL);
7551 }
7552
7553
7554 int main(argc, argv)
7555         int argc;
7556         char **argv;
7557 {
7558
7559         /* pthread test function */
7560         pthread_t t;
7561         int status;
7562 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7563         /* This system (e.g. AIX) defaults detached; must override */
7564         pthread_attr_t attr;
7565
7566         status = pthread_attr_init(&attr);
7567         if( status ) exit( status );
7568
7569         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7570         if( status ) exit( status );
7571
7572 #define ATTR    &attr
7573 #else
7574 #if HAVE_PTHREADS_D4
7575 #define ATTR    pthread_attr_default
7576 #else
7577 #define ATTR    NULL
7578 #endif
7579 #endif
7580         /* make sure pthread_create() isn't just a stub */
7581         status = pthread_create(&t, ATTR, task, NULL);
7582         if( status ) exit( status );
7583
7584         /* make sure pthread_detach() isn't just a stub */
7585 #if HAVE_PTHREADS_D4
7586         status = pthread_detach( &t );
7587 #else
7588         status = pthread_detach( t );
7589 #endif
7590
7591 #ifdef HAVE_LINUX_THREADS
7592         pthread_kill_other_threads_np();
7593 #endif
7594
7595         exit( status );
7596
7597 }
7598
7599 EOF
7600 if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7601 then
7602   ol_cv_pthread_create=yes
7603 else
7604   echo "configure: failed program was:" >&5
7605   cat conftest.$ac_ext >&5
7606   rm -fr conftest*
7607   ol_cv_pthread_create=no
7608 fi
7609 rm -fr conftest*
7610 fi
7611
7612 fi
7613
7614 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7615
7616                 if test $ol_cv_pthread_create != no ; then
7617                         ol_link_threads=posix
7618                         ol_link_pthreads=""
7619                 fi
7620                 
7621                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7622 if test "$ol_link_threads" = no ; then
7623         # try -kthread
7624         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7625 echo "configure:7626: checking for pthread link with -kthread" >&5
7626 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7627   echo $ac_n "(cached) $ac_c" 1>&6
7628 else
7629   
7630                 # save the flags
7631                 ol_LIBS="$LIBS"
7632                 LIBS="-kthread $LIBS"
7633
7634                 if test "$cross_compiling" = yes; then
7635   cat > conftest.$ac_ext <<EOF
7636 #line 7637 "configure"
7637 #include "confdefs.h"
7638 /* pthread test headers */
7639 #include <pthread.h>
7640 #ifndef NULL
7641 #define NULL (void*)0
7642 #endif
7643
7644 static void *task(p)
7645         void *p;
7646 {
7647         return (void *) (p == NULL);
7648 }
7649
7650 int main() {
7651
7652         /* pthread test function */
7653         pthread_t t;
7654         int status;
7655 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7656         /* This system (e.g. AIX) defaults detached; must override */
7657         pthread_attr_t attr;
7658
7659         status = pthread_attr_init(&attr);
7660         if( status ) exit( status );
7661
7662         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7663         if( status ) exit( status );
7664
7665 #define ATTR    &attr
7666 #else
7667 #if HAVE_PTHREADS_D4
7668 #define ATTR    pthread_attr_default
7669 #else
7670 #define ATTR    NULL
7671 #endif
7672 #endif
7673         /* make sure pthread_create() isn't just a stub */
7674         status = pthread_create(&t, ATTR, task, NULL);
7675         if( status ) exit( status );
7676
7677         /* make sure pthread_detach() isn't just a stub */
7678 #if HAVE_PTHREADS_D4
7679         status = pthread_detach( &t );
7680 #else
7681         status = pthread_detach( t );
7682 #endif
7683
7684 #ifdef HAVE_LINUX_THREADS
7685         pthread_kill_other_threads_np();
7686 #endif
7687
7688         exit( status );
7689
7690 ; return 0; }
7691 EOF
7692 if { (eval echo configure:7693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7693   rm -rf conftest*
7694   ol_cv_pthread_kthread=yes
7695 else
7696   echo "configure: failed program was:" >&5
7697   cat conftest.$ac_ext >&5
7698   rm -rf conftest*
7699   ol_cv_pthread_kthread=no
7700 fi
7701 rm -f conftest*
7702 else
7703   cat > conftest.$ac_ext <<EOF
7704 #line 7705 "configure"
7705 #include "confdefs.h"
7706 /* pthread test headers */
7707 #include <pthread.h>
7708 #ifndef NULL
7709 #define NULL (void*)0
7710 #endif
7711
7712 static void *task(p)
7713         void *p;
7714 {
7715         return (void *) (p == NULL);
7716 }
7717
7718
7719 int main(argc, argv)
7720         int argc;
7721         char **argv;
7722 {
7723
7724         /* pthread test function */
7725         pthread_t t;
7726         int status;
7727 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7728         /* This system (e.g. AIX) defaults detached; must override */
7729         pthread_attr_t attr;
7730
7731         status = pthread_attr_init(&attr);
7732         if( status ) exit( status );
7733
7734         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7735         if( status ) exit( status );
7736
7737 #define ATTR    &attr
7738 #else
7739 #if HAVE_PTHREADS_D4
7740 #define ATTR    pthread_attr_default
7741 #else
7742 #define ATTR    NULL
7743 #endif
7744 #endif
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         /* make sure pthread_detach() isn't just a stub */
7750 #if HAVE_PTHREADS_D4
7751         status = pthread_detach( &t );
7752 #else
7753         status = pthread_detach( t );
7754 #endif
7755
7756 #ifdef HAVE_LINUX_THREADS
7757         pthread_kill_other_threads_np();
7758 #endif
7759
7760         exit( status );
7761
7762 }
7763
7764 EOF
7765 if { (eval echo configure:7766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7766 then
7767   ol_cv_pthread_kthread=yes
7768 else
7769   echo "configure: failed program was:" >&5
7770   cat conftest.$ac_ext >&5
7771   rm -fr conftest*
7772   ol_cv_pthread_kthread=no
7773 fi
7774 rm -fr conftest*
7775 fi
7776
7777
7778                 # restore the LIBS
7779                 LIBS="$ol_LIBS"
7780         
7781 fi
7782
7783 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7784
7785         if test $ol_cv_pthread_kthread = yes ; then
7786                 ol_link_pthreads="-kthread"
7787                 ol_link_threads=posix
7788         fi
7789 fi
7790
7791                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7792 if test "$ol_link_threads" = no ; then
7793         # try -pthread
7794         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7795 echo "configure:7796: checking for pthread link with -pthread" >&5
7796 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7797   echo $ac_n "(cached) $ac_c" 1>&6
7798 else
7799   
7800                 # save the flags
7801                 ol_LIBS="$LIBS"
7802                 LIBS="-pthread $LIBS"
7803
7804                 if test "$cross_compiling" = yes; then
7805   cat > conftest.$ac_ext <<EOF
7806 #line 7807 "configure"
7807 #include "confdefs.h"
7808 /* pthread test headers */
7809 #include <pthread.h>
7810 #ifndef NULL
7811 #define NULL (void*)0
7812 #endif
7813
7814 static void *task(p)
7815         void *p;
7816 {
7817         return (void *) (p == NULL);
7818 }
7819
7820 int main() {
7821
7822         /* pthread test function */
7823         pthread_t t;
7824         int status;
7825 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7826         /* This system (e.g. AIX) defaults detached; must override */
7827         pthread_attr_t attr;
7828
7829         status = pthread_attr_init(&attr);
7830         if( status ) exit( status );
7831
7832         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7833         if( status ) exit( status );
7834
7835 #define ATTR    &attr
7836 #else
7837 #if HAVE_PTHREADS_D4
7838 #define ATTR    pthread_attr_default
7839 #else
7840 #define ATTR    NULL
7841 #endif
7842 #endif
7843         /* make sure pthread_create() isn't just a stub */
7844         status = pthread_create(&t, ATTR, task, NULL);
7845         if( status ) exit( status );
7846
7847         /* make sure pthread_detach() isn't just a stub */
7848 #if HAVE_PTHREADS_D4
7849         status = pthread_detach( &t );
7850 #else
7851         status = pthread_detach( t );
7852 #endif
7853
7854 #ifdef HAVE_LINUX_THREADS
7855         pthread_kill_other_threads_np();
7856 #endif
7857
7858         exit( status );
7859
7860 ; return 0; }
7861 EOF
7862 if { (eval echo configure:7863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7863   rm -rf conftest*
7864   ol_cv_pthread_pthread=yes
7865 else
7866   echo "configure: failed program was:" >&5
7867   cat conftest.$ac_ext >&5
7868   rm -rf conftest*
7869   ol_cv_pthread_pthread=no
7870 fi
7871 rm -f conftest*
7872 else
7873   cat > conftest.$ac_ext <<EOF
7874 #line 7875 "configure"
7875 #include "confdefs.h"
7876 /* pthread test headers */
7877 #include <pthread.h>
7878 #ifndef NULL
7879 #define NULL (void*)0
7880 #endif
7881
7882 static void *task(p)
7883         void *p;
7884 {
7885         return (void *) (p == NULL);
7886 }
7887
7888
7889 int main(argc, argv)
7890         int argc;
7891         char **argv;
7892 {
7893
7894         /* pthread test function */
7895         pthread_t t;
7896         int status;
7897 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7898         /* This system (e.g. AIX) defaults detached; must override */
7899         pthread_attr_t attr;
7900
7901         status = pthread_attr_init(&attr);
7902         if( status ) exit( status );
7903
7904         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7905         if( status ) exit( status );
7906
7907 #define ATTR    &attr
7908 #else
7909 #if HAVE_PTHREADS_D4
7910 #define ATTR    pthread_attr_default
7911 #else
7912 #define ATTR    NULL
7913 #endif
7914 #endif
7915         /* make sure pthread_create() isn't just a stub */
7916         status = pthread_create(&t, ATTR, task, NULL);
7917         if( status ) exit( status );
7918
7919         /* make sure pthread_detach() isn't just a stub */
7920 #if HAVE_PTHREADS_D4
7921         status = pthread_detach( &t );
7922 #else
7923         status = pthread_detach( t );
7924 #endif
7925
7926 #ifdef HAVE_LINUX_THREADS
7927         pthread_kill_other_threads_np();
7928 #endif
7929
7930         exit( status );
7931
7932 }
7933
7934 EOF
7935 if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7936 then
7937   ol_cv_pthread_pthread=yes
7938 else
7939   echo "configure: failed program was:" >&5
7940   cat conftest.$ac_ext >&5
7941   rm -fr conftest*
7942   ol_cv_pthread_pthread=no
7943 fi
7944 rm -fr conftest*
7945 fi
7946
7947
7948                 # restore the LIBS
7949                 LIBS="$ol_LIBS"
7950         
7951 fi
7952
7953 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7954
7955         if test $ol_cv_pthread_pthread = yes ; then
7956                 ol_link_pthreads="-pthread"
7957                 ol_link_threads=posix
7958         fi
7959 fi
7960
7961                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7962 if test "$ol_link_threads" = no ; then
7963         # try -pthreads
7964         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7965 echo "configure:7966: checking for pthread link with -pthreads" >&5
7966 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7967   echo $ac_n "(cached) $ac_c" 1>&6
7968 else
7969   
7970                 # save the flags
7971                 ol_LIBS="$LIBS"
7972                 LIBS="-pthreads $LIBS"
7973
7974                 if test "$cross_compiling" = yes; then
7975   cat > conftest.$ac_ext <<EOF
7976 #line 7977 "configure"
7977 #include "confdefs.h"
7978 /* pthread test headers */
7979 #include <pthread.h>
7980 #ifndef NULL
7981 #define NULL (void*)0
7982 #endif
7983
7984 static void *task(p)
7985         void *p;
7986 {
7987         return (void *) (p == NULL);
7988 }
7989
7990 int main() {
7991
7992         /* pthread test function */
7993         pthread_t t;
7994         int status;
7995 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7996         /* This system (e.g. AIX) defaults detached; must override */
7997         pthread_attr_t attr;
7998
7999         status = pthread_attr_init(&attr);
8000         if( status ) exit( status );
8001
8002         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8003         if( status ) exit( status );
8004
8005 #define ATTR    &attr
8006 #else
8007 #if HAVE_PTHREADS_D4
8008 #define ATTR    pthread_attr_default
8009 #else
8010 #define ATTR    NULL
8011 #endif
8012 #endif
8013         /* make sure pthread_create() isn't just a stub */
8014         status = pthread_create(&t, ATTR, task, NULL);
8015         if( status ) exit( status );
8016
8017         /* make sure pthread_detach() isn't just a stub */
8018 #if HAVE_PTHREADS_D4
8019         status = pthread_detach( &t );
8020 #else
8021         status = pthread_detach( t );
8022 #endif
8023
8024 #ifdef HAVE_LINUX_THREADS
8025         pthread_kill_other_threads_np();
8026 #endif
8027
8028         exit( status );
8029
8030 ; return 0; }
8031 EOF
8032 if { (eval echo configure:8033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8033   rm -rf conftest*
8034   ol_cv_pthread_pthreads=yes
8035 else
8036   echo "configure: failed program was:" >&5
8037   cat conftest.$ac_ext >&5
8038   rm -rf conftest*
8039   ol_cv_pthread_pthreads=no
8040 fi
8041 rm -f conftest*
8042 else
8043   cat > conftest.$ac_ext <<EOF
8044 #line 8045 "configure"
8045 #include "confdefs.h"
8046 /* pthread test headers */
8047 #include <pthread.h>
8048 #ifndef NULL
8049 #define NULL (void*)0
8050 #endif
8051
8052 static void *task(p)
8053         void *p;
8054 {
8055         return (void *) (p == NULL);
8056 }
8057
8058
8059 int main(argc, argv)
8060         int argc;
8061         char **argv;
8062 {
8063
8064         /* pthread test function */
8065         pthread_t t;
8066         int status;
8067 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8068         /* This system (e.g. AIX) defaults detached; must override */
8069         pthread_attr_t attr;
8070
8071         status = pthread_attr_init(&attr);
8072         if( status ) exit( status );
8073
8074         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8075         if( status ) exit( status );
8076
8077 #define ATTR    &attr
8078 #else
8079 #if HAVE_PTHREADS_D4
8080 #define ATTR    pthread_attr_default
8081 #else
8082 #define ATTR    NULL
8083 #endif
8084 #endif
8085         /* make sure pthread_create() isn't just a stub */
8086         status = pthread_create(&t, ATTR, task, NULL);
8087         if( status ) exit( status );
8088
8089         /* make sure pthread_detach() isn't just a stub */
8090 #if HAVE_PTHREADS_D4
8091         status = pthread_detach( &t );
8092 #else
8093         status = pthread_detach( t );
8094 #endif
8095
8096 #ifdef HAVE_LINUX_THREADS
8097         pthread_kill_other_threads_np();
8098 #endif
8099
8100         exit( status );
8101
8102 }
8103
8104 EOF
8105 if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8106 then
8107   ol_cv_pthread_pthreads=yes
8108 else
8109   echo "configure: failed program was:" >&5
8110   cat conftest.$ac_ext >&5
8111   rm -fr conftest*
8112   ol_cv_pthread_pthreads=no
8113 fi
8114 rm -fr conftest*
8115 fi
8116
8117
8118                 # restore the LIBS
8119                 LIBS="$ol_LIBS"
8120         
8121 fi
8122
8123 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8124
8125         if test $ol_cv_pthread_pthreads = yes ; then
8126                 ol_link_pthreads="-pthreads"
8127                 ol_link_threads=posix
8128         fi
8129 fi
8130
8131                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8132 if test "$ol_link_threads" = no ; then
8133         # try -mthreads
8134         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8135 echo "configure:8136: checking for pthread link with -mthreads" >&5
8136 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8137   echo $ac_n "(cached) $ac_c" 1>&6
8138 else
8139   
8140                 # save the flags
8141                 ol_LIBS="$LIBS"
8142                 LIBS="-mthreads $LIBS"
8143
8144                 if test "$cross_compiling" = yes; then
8145   cat > conftest.$ac_ext <<EOF
8146 #line 8147 "configure"
8147 #include "confdefs.h"
8148 /* pthread test headers */
8149 #include <pthread.h>
8150 #ifndef NULL
8151 #define NULL (void*)0
8152 #endif
8153
8154 static void *task(p)
8155         void *p;
8156 {
8157         return (void *) (p == NULL);
8158 }
8159
8160 int main() {
8161
8162         /* pthread test function */
8163         pthread_t t;
8164         int status;
8165 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8166         /* This system (e.g. AIX) defaults detached; must override */
8167         pthread_attr_t attr;
8168
8169         status = pthread_attr_init(&attr);
8170         if( status ) exit( status );
8171
8172         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8173         if( status ) exit( status );
8174
8175 #define ATTR    &attr
8176 #else
8177 #if HAVE_PTHREADS_D4
8178 #define ATTR    pthread_attr_default
8179 #else
8180 #define ATTR    NULL
8181 #endif
8182 #endif
8183         /* make sure pthread_create() isn't just a stub */
8184         status = pthread_create(&t, ATTR, task, NULL);
8185         if( status ) exit( status );
8186
8187         /* make sure pthread_detach() isn't just a stub */
8188 #if HAVE_PTHREADS_D4
8189         status = pthread_detach( &t );
8190 #else
8191         status = pthread_detach( t );
8192 #endif
8193
8194 #ifdef HAVE_LINUX_THREADS
8195         pthread_kill_other_threads_np();
8196 #endif
8197
8198         exit( status );
8199
8200 ; return 0; }
8201 EOF
8202 if { (eval echo configure:8203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8203   rm -rf conftest*
8204   ol_cv_pthread_mthreads=yes
8205 else
8206   echo "configure: failed program was:" >&5
8207   cat conftest.$ac_ext >&5
8208   rm -rf conftest*
8209   ol_cv_pthread_mthreads=no
8210 fi
8211 rm -f conftest*
8212 else
8213   cat > conftest.$ac_ext <<EOF
8214 #line 8215 "configure"
8215 #include "confdefs.h"
8216 /* pthread test headers */
8217 #include <pthread.h>
8218 #ifndef NULL
8219 #define NULL (void*)0
8220 #endif
8221
8222 static void *task(p)
8223         void *p;
8224 {
8225         return (void *) (p == NULL);
8226 }
8227
8228
8229 int main(argc, argv)
8230         int argc;
8231         char **argv;
8232 {
8233
8234         /* pthread test function */
8235         pthread_t t;
8236         int status;
8237 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8238         /* This system (e.g. AIX) defaults detached; must override */
8239         pthread_attr_t attr;
8240
8241         status = pthread_attr_init(&attr);
8242         if( status ) exit( status );
8243
8244         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8245         if( status ) exit( status );
8246
8247 #define ATTR    &attr
8248 #else
8249 #if HAVE_PTHREADS_D4
8250 #define ATTR    pthread_attr_default
8251 #else
8252 #define ATTR    NULL
8253 #endif
8254 #endif
8255         /* make sure pthread_create() isn't just a stub */
8256         status = pthread_create(&t, ATTR, task, NULL);
8257         if( status ) exit( status );
8258
8259         /* make sure pthread_detach() isn't just a stub */
8260 #if HAVE_PTHREADS_D4
8261         status = pthread_detach( &t );
8262 #else
8263         status = pthread_detach( t );
8264 #endif
8265
8266 #ifdef HAVE_LINUX_THREADS
8267         pthread_kill_other_threads_np();
8268 #endif
8269
8270         exit( status );
8271
8272 }
8273
8274 EOF
8275 if { (eval echo configure:8276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8276 then
8277   ol_cv_pthread_mthreads=yes
8278 else
8279   echo "configure: failed program was:" >&5
8280   cat conftest.$ac_ext >&5
8281   rm -fr conftest*
8282   ol_cv_pthread_mthreads=no
8283 fi
8284 rm -fr conftest*
8285 fi
8286
8287
8288                 # restore the LIBS
8289                 LIBS="$ol_LIBS"
8290         
8291 fi
8292
8293 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8294
8295         if test $ol_cv_pthread_mthreads = yes ; then
8296                 ol_link_pthreads="-mthreads"
8297                 ol_link_threads=posix
8298         fi
8299 fi
8300
8301                 # Pthread try link: -thread (ol_cv_pthread_thread)
8302 if test "$ol_link_threads" = no ; then
8303         # try -thread
8304         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8305 echo "configure:8306: checking for pthread link with -thread" >&5
8306 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8307   echo $ac_n "(cached) $ac_c" 1>&6
8308 else
8309   
8310                 # save the flags
8311                 ol_LIBS="$LIBS"
8312                 LIBS="-thread $LIBS"
8313
8314                 if test "$cross_compiling" = yes; then
8315   cat > conftest.$ac_ext <<EOF
8316 #line 8317 "configure"
8317 #include "confdefs.h"
8318 /* pthread test headers */
8319 #include <pthread.h>
8320 #ifndef NULL
8321 #define NULL (void*)0
8322 #endif
8323
8324 static void *task(p)
8325         void *p;
8326 {
8327         return (void *) (p == NULL);
8328 }
8329
8330 int main() {
8331
8332         /* pthread test function */
8333         pthread_t t;
8334         int status;
8335 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8336         /* This system (e.g. AIX) defaults detached; must override */
8337         pthread_attr_t attr;
8338
8339         status = pthread_attr_init(&attr);
8340         if( status ) exit( status );
8341
8342         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8343         if( status ) exit( status );
8344
8345 #define ATTR    &attr
8346 #else
8347 #if HAVE_PTHREADS_D4
8348 #define ATTR    pthread_attr_default
8349 #else
8350 #define ATTR    NULL
8351 #endif
8352 #endif
8353         /* make sure pthread_create() isn't just a stub */
8354         status = pthread_create(&t, ATTR, task, NULL);
8355         if( status ) exit( status );
8356
8357         /* make sure pthread_detach() isn't just a stub */
8358 #if HAVE_PTHREADS_D4
8359         status = pthread_detach( &t );
8360 #else
8361         status = pthread_detach( t );
8362 #endif
8363
8364 #ifdef HAVE_LINUX_THREADS
8365         pthread_kill_other_threads_np();
8366 #endif
8367
8368         exit( status );
8369
8370 ; return 0; }
8371 EOF
8372 if { (eval echo configure:8373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8373   rm -rf conftest*
8374   ol_cv_pthread_thread=yes
8375 else
8376   echo "configure: failed program was:" >&5
8377   cat conftest.$ac_ext >&5
8378   rm -rf conftest*
8379   ol_cv_pthread_thread=no
8380 fi
8381 rm -f conftest*
8382 else
8383   cat > conftest.$ac_ext <<EOF
8384 #line 8385 "configure"
8385 #include "confdefs.h"
8386 /* pthread test headers */
8387 #include <pthread.h>
8388 #ifndef NULL
8389 #define NULL (void*)0
8390 #endif
8391
8392 static void *task(p)
8393         void *p;
8394 {
8395         return (void *) (p == NULL);
8396 }
8397
8398
8399 int main(argc, argv)
8400         int argc;
8401         char **argv;
8402 {
8403
8404         /* pthread test function */
8405         pthread_t t;
8406         int status;
8407 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8408         /* This system (e.g. AIX) defaults detached; must override */
8409         pthread_attr_t attr;
8410
8411         status = pthread_attr_init(&attr);
8412         if( status ) exit( status );
8413
8414         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8415         if( status ) exit( status );
8416
8417 #define ATTR    &attr
8418 #else
8419 #if HAVE_PTHREADS_D4
8420 #define ATTR    pthread_attr_default
8421 #else
8422 #define ATTR    NULL
8423 #endif
8424 #endif
8425         /* make sure pthread_create() isn't just a stub */
8426         status = pthread_create(&t, ATTR, task, NULL);
8427         if( status ) exit( status );
8428
8429         /* make sure pthread_detach() isn't just a stub */
8430 #if HAVE_PTHREADS_D4
8431         status = pthread_detach( &t );
8432 #else
8433         status = pthread_detach( t );
8434 #endif
8435
8436 #ifdef HAVE_LINUX_THREADS
8437         pthread_kill_other_threads_np();
8438 #endif
8439
8440         exit( status );
8441
8442 }
8443
8444 EOF
8445 if { (eval echo configure:8446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8446 then
8447   ol_cv_pthread_thread=yes
8448 else
8449   echo "configure: failed program was:" >&5
8450   cat conftest.$ac_ext >&5
8451   rm -fr conftest*
8452   ol_cv_pthread_thread=no
8453 fi
8454 rm -fr conftest*
8455 fi
8456
8457
8458                 # restore the LIBS
8459                 LIBS="$ol_LIBS"
8460         
8461 fi
8462
8463 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8464
8465         if test $ol_cv_pthread_thread = yes ; then
8466                 ol_link_pthreads="-thread"
8467                 ol_link_threads=posix
8468         fi
8469 fi
8470
8471
8472                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8473 if test "$ol_link_threads" = no ; then
8474         # try -lpthread -lmach -lexc -lc_r
8475         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8476 echo "configure:8477: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8477 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8478   echo $ac_n "(cached) $ac_c" 1>&6
8479 else
8480   
8481                 # save the flags
8482                 ol_LIBS="$LIBS"
8483                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8484
8485                 if test "$cross_compiling" = yes; then
8486   cat > conftest.$ac_ext <<EOF
8487 #line 8488 "configure"
8488 #include "confdefs.h"
8489 /* pthread test headers */
8490 #include <pthread.h>
8491 #ifndef NULL
8492 #define NULL (void*)0
8493 #endif
8494
8495 static void *task(p)
8496         void *p;
8497 {
8498         return (void *) (p == NULL);
8499 }
8500
8501 int main() {
8502
8503         /* pthread test function */
8504         pthread_t t;
8505         int status;
8506 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8507         /* This system (e.g. AIX) defaults detached; must override */
8508         pthread_attr_t attr;
8509
8510         status = pthread_attr_init(&attr);
8511         if( status ) exit( status );
8512
8513         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8514         if( status ) exit( status );
8515
8516 #define ATTR    &attr
8517 #else
8518 #if HAVE_PTHREADS_D4
8519 #define ATTR    pthread_attr_default
8520 #else
8521 #define ATTR    NULL
8522 #endif
8523 #endif
8524         /* make sure pthread_create() isn't just a stub */
8525         status = pthread_create(&t, ATTR, task, NULL);
8526         if( status ) exit( status );
8527
8528         /* make sure pthread_detach() isn't just a stub */
8529 #if HAVE_PTHREADS_D4
8530         status = pthread_detach( &t );
8531 #else
8532         status = pthread_detach( t );
8533 #endif
8534
8535 #ifdef HAVE_LINUX_THREADS
8536         pthread_kill_other_threads_np();
8537 #endif
8538
8539         exit( status );
8540
8541 ; return 0; }
8542 EOF
8543 if { (eval echo configure:8544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8544   rm -rf conftest*
8545   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8546 else
8547   echo "configure: failed program was:" >&5
8548   cat conftest.$ac_ext >&5
8549   rm -rf conftest*
8550   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8551 fi
8552 rm -f conftest*
8553 else
8554   cat > conftest.$ac_ext <<EOF
8555 #line 8556 "configure"
8556 #include "confdefs.h"
8557 /* pthread test headers */
8558 #include <pthread.h>
8559 #ifndef NULL
8560 #define NULL (void*)0
8561 #endif
8562
8563 static void *task(p)
8564         void *p;
8565 {
8566         return (void *) (p == NULL);
8567 }
8568
8569
8570 int main(argc, argv)
8571         int argc;
8572         char **argv;
8573 {
8574
8575         /* pthread test function */
8576         pthread_t t;
8577         int status;
8578 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8579         /* This system (e.g. AIX) defaults detached; must override */
8580         pthread_attr_t attr;
8581
8582         status = pthread_attr_init(&attr);
8583         if( status ) exit( status );
8584
8585         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8586         if( status ) exit( status );
8587
8588 #define ATTR    &attr
8589 #else
8590 #if HAVE_PTHREADS_D4
8591 #define ATTR    pthread_attr_default
8592 #else
8593 #define ATTR    NULL
8594 #endif
8595 #endif
8596         /* make sure pthread_create() isn't just a stub */
8597         status = pthread_create(&t, ATTR, task, NULL);
8598         if( status ) exit( status );
8599
8600         /* make sure pthread_detach() isn't just a stub */
8601 #if HAVE_PTHREADS_D4
8602         status = pthread_detach( &t );
8603 #else
8604         status = pthread_detach( t );
8605 #endif
8606
8607 #ifdef HAVE_LINUX_THREADS
8608         pthread_kill_other_threads_np();
8609 #endif
8610
8611         exit( status );
8612
8613 }
8614
8615 EOF
8616 if { (eval echo configure:8617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8617 then
8618   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8619 else
8620   echo "configure: failed program was:" >&5
8621   cat conftest.$ac_ext >&5
8622   rm -fr conftest*
8623   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8624 fi
8625 rm -fr conftest*
8626 fi
8627
8628
8629                 # restore the LIBS
8630                 LIBS="$ol_LIBS"
8631         
8632 fi
8633
8634 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8635
8636         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8637                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8638                 ol_link_threads=posix
8639         fi
8640 fi
8641
8642                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8643 if test "$ol_link_threads" = no ; then
8644         # try -lpthread -lmach -lexc
8645         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8646 echo "configure:8647: checking for pthread link with -lpthread -lmach -lexc" >&5
8647 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8648   echo $ac_n "(cached) $ac_c" 1>&6
8649 else
8650   
8651                 # save the flags
8652                 ol_LIBS="$LIBS"
8653                 LIBS="-lpthread -lmach -lexc $LIBS"
8654
8655                 if test "$cross_compiling" = yes; then
8656   cat > conftest.$ac_ext <<EOF
8657 #line 8658 "configure"
8658 #include "confdefs.h"
8659 /* pthread test headers */
8660 #include <pthread.h>
8661 #ifndef NULL
8662 #define NULL (void*)0
8663 #endif
8664
8665 static void *task(p)
8666         void *p;
8667 {
8668         return (void *) (p == NULL);
8669 }
8670
8671 int main() {
8672
8673         /* pthread test function */
8674         pthread_t t;
8675         int status;
8676 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8677         /* This system (e.g. AIX) defaults detached; must override */
8678         pthread_attr_t attr;
8679
8680         status = pthread_attr_init(&attr);
8681         if( status ) exit( status );
8682
8683         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8684         if( status ) exit( status );
8685
8686 #define ATTR    &attr
8687 #else
8688 #if HAVE_PTHREADS_D4
8689 #define ATTR    pthread_attr_default
8690 #else
8691 #define ATTR    NULL
8692 #endif
8693 #endif
8694         /* make sure pthread_create() isn't just a stub */
8695         status = pthread_create(&t, ATTR, task, NULL);
8696         if( status ) exit( status );
8697
8698         /* make sure pthread_detach() isn't just a stub */
8699 #if HAVE_PTHREADS_D4
8700         status = pthread_detach( &t );
8701 #else
8702         status = pthread_detach( t );
8703 #endif
8704
8705 #ifdef HAVE_LINUX_THREADS
8706         pthread_kill_other_threads_np();
8707 #endif
8708
8709         exit( status );
8710
8711 ; return 0; }
8712 EOF
8713 if { (eval echo configure:8714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8714   rm -rf conftest*
8715   ol_cv_pthread_lpthread_lmach_lexc=yes
8716 else
8717   echo "configure: failed program was:" >&5
8718   cat conftest.$ac_ext >&5
8719   rm -rf conftest*
8720   ol_cv_pthread_lpthread_lmach_lexc=no
8721 fi
8722 rm -f conftest*
8723 else
8724   cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727 /* pthread test headers */
8728 #include <pthread.h>
8729 #ifndef NULL
8730 #define NULL (void*)0
8731 #endif
8732
8733 static void *task(p)
8734         void *p;
8735 {
8736         return (void *) (p == NULL);
8737 }
8738
8739
8740 int main(argc, argv)
8741         int argc;
8742         char **argv;
8743 {
8744
8745         /* pthread test function */
8746         pthread_t t;
8747         int status;
8748 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8749         /* This system (e.g. AIX) defaults detached; must override */
8750         pthread_attr_t attr;
8751
8752         status = pthread_attr_init(&attr);
8753         if( status ) exit( status );
8754
8755         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8756         if( status ) exit( status );
8757
8758 #define ATTR    &attr
8759 #else
8760 #if HAVE_PTHREADS_D4
8761 #define ATTR    pthread_attr_default
8762 #else
8763 #define ATTR    NULL
8764 #endif
8765 #endif
8766         /* make sure pthread_create() isn't just a stub */
8767         status = pthread_create(&t, ATTR, task, NULL);
8768         if( status ) exit( status );
8769
8770         /* make sure pthread_detach() isn't just a stub */
8771 #if HAVE_PTHREADS_D4
8772         status = pthread_detach( &t );
8773 #else
8774         status = pthread_detach( t );
8775 #endif
8776
8777 #ifdef HAVE_LINUX_THREADS
8778         pthread_kill_other_threads_np();
8779 #endif
8780
8781         exit( status );
8782
8783 }
8784
8785 EOF
8786 if { (eval echo configure:8787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8787 then
8788   ol_cv_pthread_lpthread_lmach_lexc=yes
8789 else
8790   echo "configure: failed program was:" >&5
8791   cat conftest.$ac_ext >&5
8792   rm -fr conftest*
8793   ol_cv_pthread_lpthread_lmach_lexc=no
8794 fi
8795 rm -fr conftest*
8796 fi
8797
8798
8799                 # restore the LIBS
8800                 LIBS="$ol_LIBS"
8801         
8802 fi
8803
8804 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8805
8806         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8807                 ol_link_pthreads="-lpthread -lmach -lexc"
8808                 ol_link_threads=posix
8809         fi
8810 fi
8811
8812
8813                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8814 if test "$ol_link_threads" = no ; then
8815         # try -lpthread -Wl,-woff,85
8816         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8817 echo "configure:8818: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8818 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8819   echo $ac_n "(cached) $ac_c" 1>&6
8820 else
8821   
8822                 # save the flags
8823                 ol_LIBS="$LIBS"
8824                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8825
8826                 if test "$cross_compiling" = yes; then
8827   cat > conftest.$ac_ext <<EOF
8828 #line 8829 "configure"
8829 #include "confdefs.h"
8830 /* pthread test headers */
8831 #include <pthread.h>
8832 #ifndef NULL
8833 #define NULL (void*)0
8834 #endif
8835
8836 static void *task(p)
8837         void *p;
8838 {
8839         return (void *) (p == NULL);
8840 }
8841
8842 int main() {
8843
8844         /* pthread test function */
8845         pthread_t t;
8846         int status;
8847 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8848         /* This system (e.g. AIX) defaults detached; must override */
8849         pthread_attr_t attr;
8850
8851         status = pthread_attr_init(&attr);
8852         if( status ) exit( status );
8853
8854         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8855         if( status ) exit( status );
8856
8857 #define ATTR    &attr
8858 #else
8859 #if HAVE_PTHREADS_D4
8860 #define ATTR    pthread_attr_default
8861 #else
8862 #define ATTR    NULL
8863 #endif
8864 #endif
8865         /* make sure pthread_create() isn't just a stub */
8866         status = pthread_create(&t, ATTR, task, NULL);
8867         if( status ) exit( status );
8868
8869         /* make sure pthread_detach() isn't just a stub */
8870 #if HAVE_PTHREADS_D4
8871         status = pthread_detach( &t );
8872 #else
8873         status = pthread_detach( t );
8874 #endif
8875
8876 #ifdef HAVE_LINUX_THREADS
8877         pthread_kill_other_threads_np();
8878 #endif
8879
8880         exit( status );
8881
8882 ; return 0; }
8883 EOF
8884 if { (eval echo configure:8885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8885   rm -rf conftest*
8886   ol_cv_pthread_lib_lpthread_woff=yes
8887 else
8888   echo "configure: failed program was:" >&5
8889   cat conftest.$ac_ext >&5
8890   rm -rf conftest*
8891   ol_cv_pthread_lib_lpthread_woff=no
8892 fi
8893 rm -f conftest*
8894 else
8895   cat > conftest.$ac_ext <<EOF
8896 #line 8897 "configure"
8897 #include "confdefs.h"
8898 /* pthread test headers */
8899 #include <pthread.h>
8900 #ifndef NULL
8901 #define NULL (void*)0
8902 #endif
8903
8904 static void *task(p)
8905         void *p;
8906 {
8907         return (void *) (p == NULL);
8908 }
8909
8910
8911 int main(argc, argv)
8912         int argc;
8913         char **argv;
8914 {
8915
8916         /* pthread test function */
8917         pthread_t t;
8918         int status;
8919 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8920         /* This system (e.g. AIX) defaults detached; must override */
8921         pthread_attr_t attr;
8922
8923         status = pthread_attr_init(&attr);
8924         if( status ) exit( status );
8925
8926         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8927         if( status ) exit( status );
8928
8929 #define ATTR    &attr
8930 #else
8931 #if HAVE_PTHREADS_D4
8932 #define ATTR    pthread_attr_default
8933 #else
8934 #define ATTR    NULL
8935 #endif
8936 #endif
8937         /* make sure pthread_create() isn't just a stub */
8938         status = pthread_create(&t, ATTR, task, NULL);
8939         if( status ) exit( status );
8940
8941         /* make sure pthread_detach() isn't just a stub */
8942 #if HAVE_PTHREADS_D4
8943         status = pthread_detach( &t );
8944 #else
8945         status = pthread_detach( t );
8946 #endif
8947
8948 #ifdef HAVE_LINUX_THREADS
8949         pthread_kill_other_threads_np();
8950 #endif
8951
8952         exit( status );
8953
8954 }
8955
8956 EOF
8957 if { (eval echo configure:8958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8958 then
8959   ol_cv_pthread_lib_lpthread_woff=yes
8960 else
8961   echo "configure: failed program was:" >&5
8962   cat conftest.$ac_ext >&5
8963   rm -fr conftest*
8964   ol_cv_pthread_lib_lpthread_woff=no
8965 fi
8966 rm -fr conftest*
8967 fi
8968
8969
8970                 # restore the LIBS
8971                 LIBS="$ol_LIBS"
8972         
8973 fi
8974
8975 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8976
8977         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8978                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8979                 ol_link_threads=posix
8980         fi
8981 fi
8982
8983
8984                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8985 if test "$ol_link_threads" = no ; then
8986         # try -lpthread
8987         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8988 echo "configure:8989: checking for pthread link with -lpthread" >&5
8989 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8990   echo $ac_n "(cached) $ac_c" 1>&6
8991 else
8992   
8993                 # save the flags
8994                 ol_LIBS="$LIBS"
8995                 LIBS="-lpthread $LIBS"
8996
8997                 if test "$cross_compiling" = yes; then
8998   cat > conftest.$ac_ext <<EOF
8999 #line 9000 "configure"
9000 #include "confdefs.h"
9001 /* pthread test headers */
9002 #include <pthread.h>
9003 #ifndef NULL
9004 #define NULL (void*)0
9005 #endif
9006
9007 static void *task(p)
9008         void *p;
9009 {
9010         return (void *) (p == NULL);
9011 }
9012
9013 int main() {
9014
9015         /* pthread test function */
9016         pthread_t t;
9017         int status;
9018 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9019         /* This system (e.g. AIX) defaults detached; must override */
9020         pthread_attr_t attr;
9021
9022         status = pthread_attr_init(&attr);
9023         if( status ) exit( status );
9024
9025         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9026         if( status ) exit( status );
9027
9028 #define ATTR    &attr
9029 #else
9030 #if HAVE_PTHREADS_D4
9031 #define ATTR    pthread_attr_default
9032 #else
9033 #define ATTR    NULL
9034 #endif
9035 #endif
9036         /* make sure pthread_create() isn't just a stub */
9037         status = pthread_create(&t, ATTR, task, NULL);
9038         if( status ) exit( status );
9039
9040         /* make sure pthread_detach() isn't just a stub */
9041 #if HAVE_PTHREADS_D4
9042         status = pthread_detach( &t );
9043 #else
9044         status = pthread_detach( t );
9045 #endif
9046
9047 #ifdef HAVE_LINUX_THREADS
9048         pthread_kill_other_threads_np();
9049 #endif
9050
9051         exit( status );
9052
9053 ; return 0; }
9054 EOF
9055 if { (eval echo configure:9056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9056   rm -rf conftest*
9057   ol_cv_pthread_lpthread=yes
9058 else
9059   echo "configure: failed program was:" >&5
9060   cat conftest.$ac_ext >&5
9061   rm -rf conftest*
9062   ol_cv_pthread_lpthread=no
9063 fi
9064 rm -f conftest*
9065 else
9066   cat > conftest.$ac_ext <<EOF
9067 #line 9068 "configure"
9068 #include "confdefs.h"
9069 /* pthread test headers */
9070 #include <pthread.h>
9071 #ifndef NULL
9072 #define NULL (void*)0
9073 #endif
9074
9075 static void *task(p)
9076         void *p;
9077 {
9078         return (void *) (p == NULL);
9079 }
9080
9081
9082 int main(argc, argv)
9083         int argc;
9084         char **argv;
9085 {
9086
9087         /* pthread test function */
9088         pthread_t t;
9089         int status;
9090 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9091         /* This system (e.g. AIX) defaults detached; must override */
9092         pthread_attr_t attr;
9093
9094         status = pthread_attr_init(&attr);
9095         if( status ) exit( status );
9096
9097         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9098         if( status ) exit( status );
9099
9100 #define ATTR    &attr
9101 #else
9102 #if HAVE_PTHREADS_D4
9103 #define ATTR    pthread_attr_default
9104 #else
9105 #define ATTR    NULL
9106 #endif
9107 #endif
9108         /* make sure pthread_create() isn't just a stub */
9109         status = pthread_create(&t, ATTR, task, NULL);
9110         if( status ) exit( status );
9111
9112         /* make sure pthread_detach() isn't just a stub */
9113 #if HAVE_PTHREADS_D4
9114         status = pthread_detach( &t );
9115 #else
9116         status = pthread_detach( t );
9117 #endif
9118
9119 #ifdef HAVE_LINUX_THREADS
9120         pthread_kill_other_threads_np();
9121 #endif
9122
9123         exit( status );
9124
9125 }
9126
9127 EOF
9128 if { (eval echo configure:9129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9129 then
9130   ol_cv_pthread_lpthread=yes
9131 else
9132   echo "configure: failed program was:" >&5
9133   cat conftest.$ac_ext >&5
9134   rm -fr conftest*
9135   ol_cv_pthread_lpthread=no
9136 fi
9137 rm -fr conftest*
9138 fi
9139
9140
9141                 # restore the LIBS
9142                 LIBS="$ol_LIBS"
9143         
9144 fi
9145
9146 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9147
9148         if test $ol_cv_pthread_lpthread = yes ; then
9149                 ol_link_pthreads="-lpthread"
9150                 ol_link_threads=posix
9151         fi
9152 fi
9153
9154                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9155 if test "$ol_link_threads" = no ; then
9156         # try -lc_r
9157         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9158 echo "configure:9159: checking for pthread link with -lc_r" >&5
9159 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9160   echo $ac_n "(cached) $ac_c" 1>&6
9161 else
9162   
9163                 # save the flags
9164                 ol_LIBS="$LIBS"
9165                 LIBS="-lc_r $LIBS"
9166
9167                 if test "$cross_compiling" = yes; then
9168   cat > conftest.$ac_ext <<EOF
9169 #line 9170 "configure"
9170 #include "confdefs.h"
9171 /* pthread test headers */
9172 #include <pthread.h>
9173 #ifndef NULL
9174 #define NULL (void*)0
9175 #endif
9176
9177 static void *task(p)
9178         void *p;
9179 {
9180         return (void *) (p == NULL);
9181 }
9182
9183 int main() {
9184
9185         /* pthread test function */
9186         pthread_t t;
9187         int status;
9188 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9189         /* This system (e.g. AIX) defaults detached; must override */
9190         pthread_attr_t attr;
9191
9192         status = pthread_attr_init(&attr);
9193         if( status ) exit( status );
9194
9195         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9196         if( status ) exit( status );
9197
9198 #define ATTR    &attr
9199 #else
9200 #if HAVE_PTHREADS_D4
9201 #define ATTR    pthread_attr_default
9202 #else
9203 #define ATTR    NULL
9204 #endif
9205 #endif
9206         /* make sure pthread_create() isn't just a stub */
9207         status = pthread_create(&t, ATTR, task, NULL);
9208         if( status ) exit( status );
9209
9210         /* make sure pthread_detach() isn't just a stub */
9211 #if HAVE_PTHREADS_D4
9212         status = pthread_detach( &t );
9213 #else
9214         status = pthread_detach( t );
9215 #endif
9216
9217 #ifdef HAVE_LINUX_THREADS
9218         pthread_kill_other_threads_np();
9219 #endif
9220
9221         exit( status );
9222
9223 ; return 0; }
9224 EOF
9225 if { (eval echo configure:9226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9226   rm -rf conftest*
9227   ol_cv_pthread_lc_r=yes
9228 else
9229   echo "configure: failed program was:" >&5
9230   cat conftest.$ac_ext >&5
9231   rm -rf conftest*
9232   ol_cv_pthread_lc_r=no
9233 fi
9234 rm -f conftest*
9235 else
9236   cat > conftest.$ac_ext <<EOF
9237 #line 9238 "configure"
9238 #include "confdefs.h"
9239 /* pthread test headers */
9240 #include <pthread.h>
9241 #ifndef NULL
9242 #define NULL (void*)0
9243 #endif
9244
9245 static void *task(p)
9246         void *p;
9247 {
9248         return (void *) (p == NULL);
9249 }
9250
9251
9252 int main(argc, argv)
9253         int argc;
9254         char **argv;
9255 {
9256
9257         /* pthread test function */
9258         pthread_t t;
9259         int status;
9260 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9261         /* This system (e.g. AIX) defaults detached; must override */
9262         pthread_attr_t attr;
9263
9264         status = pthread_attr_init(&attr);
9265         if( status ) exit( status );
9266
9267         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9268         if( status ) exit( status );
9269
9270 #define ATTR    &attr
9271 #else
9272 #if HAVE_PTHREADS_D4
9273 #define ATTR    pthread_attr_default
9274 #else
9275 #define ATTR    NULL
9276 #endif
9277 #endif
9278         /* make sure pthread_create() isn't just a stub */
9279         status = pthread_create(&t, ATTR, task, NULL);
9280         if( status ) exit( status );
9281
9282         /* make sure pthread_detach() isn't just a stub */
9283 #if HAVE_PTHREADS_D4
9284         status = pthread_detach( &t );
9285 #else
9286         status = pthread_detach( t );
9287 #endif
9288
9289 #ifdef HAVE_LINUX_THREADS
9290         pthread_kill_other_threads_np();
9291 #endif
9292
9293         exit( status );
9294
9295 }
9296
9297 EOF
9298 if { (eval echo configure:9299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9299 then
9300   ol_cv_pthread_lc_r=yes
9301 else
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -fr conftest*
9305   ol_cv_pthread_lc_r=no
9306 fi
9307 rm -fr conftest*
9308 fi
9309
9310
9311                 # restore the LIBS
9312                 LIBS="$ol_LIBS"
9313         
9314 fi
9315
9316 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9317
9318         if test $ol_cv_pthread_lc_r = yes ; then
9319                 ol_link_pthreads="-lc_r"
9320                 ol_link_threads=posix
9321         fi
9322 fi
9323
9324
9325                 # Pthread try link: -threads (ol_cv_pthread_threads)
9326 if test "$ol_link_threads" = no ; then
9327         # try -threads
9328         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9329 echo "configure:9330: checking for pthread link with -threads" >&5
9330 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9331   echo $ac_n "(cached) $ac_c" 1>&6
9332 else
9333   
9334                 # save the flags
9335                 ol_LIBS="$LIBS"
9336                 LIBS="-threads $LIBS"
9337
9338                 if test "$cross_compiling" = yes; then
9339   cat > conftest.$ac_ext <<EOF
9340 #line 9341 "configure"
9341 #include "confdefs.h"
9342 /* pthread test headers */
9343 #include <pthread.h>
9344 #ifndef NULL
9345 #define NULL (void*)0
9346 #endif
9347
9348 static void *task(p)
9349         void *p;
9350 {
9351         return (void *) (p == NULL);
9352 }
9353
9354 int main() {
9355
9356         /* pthread test function */
9357         pthread_t t;
9358         int status;
9359 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9360         /* This system (e.g. AIX) defaults detached; must override */
9361         pthread_attr_t attr;
9362
9363         status = pthread_attr_init(&attr);
9364         if( status ) exit( status );
9365
9366         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9367         if( status ) exit( status );
9368
9369 #define ATTR    &attr
9370 #else
9371 #if HAVE_PTHREADS_D4
9372 #define ATTR    pthread_attr_default
9373 #else
9374 #define ATTR    NULL
9375 #endif
9376 #endif
9377         /* make sure pthread_create() isn't just a stub */
9378         status = pthread_create(&t, ATTR, task, NULL);
9379         if( status ) exit( status );
9380
9381         /* make sure pthread_detach() isn't just a stub */
9382 #if HAVE_PTHREADS_D4
9383         status = pthread_detach( &t );
9384 #else
9385         status = pthread_detach( t );
9386 #endif
9387
9388 #ifdef HAVE_LINUX_THREADS
9389         pthread_kill_other_threads_np();
9390 #endif
9391
9392         exit( status );
9393
9394 ; return 0; }
9395 EOF
9396 if { (eval echo configure:9397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9397   rm -rf conftest*
9398   ol_cv_pthread_threads=yes
9399 else
9400   echo "configure: failed program was:" >&5
9401   cat conftest.$ac_ext >&5
9402   rm -rf conftest*
9403   ol_cv_pthread_threads=no
9404 fi
9405 rm -f conftest*
9406 else
9407   cat > conftest.$ac_ext <<EOF
9408 #line 9409 "configure"
9409 #include "confdefs.h"
9410 /* pthread test headers */
9411 #include <pthread.h>
9412 #ifndef NULL
9413 #define NULL (void*)0
9414 #endif
9415
9416 static void *task(p)
9417         void *p;
9418 {
9419         return (void *) (p == NULL);
9420 }
9421
9422
9423 int main(argc, argv)
9424         int argc;
9425         char **argv;
9426 {
9427
9428         /* pthread test function */
9429         pthread_t t;
9430         int status;
9431 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9432         /* This system (e.g. AIX) defaults detached; must override */
9433         pthread_attr_t attr;
9434
9435         status = pthread_attr_init(&attr);
9436         if( status ) exit( status );
9437
9438         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9439         if( status ) exit( status );
9440
9441 #define ATTR    &attr
9442 #else
9443 #if HAVE_PTHREADS_D4
9444 #define ATTR    pthread_attr_default
9445 #else
9446 #define ATTR    NULL
9447 #endif
9448 #endif
9449         /* make sure pthread_create() isn't just a stub */
9450         status = pthread_create(&t, ATTR, task, NULL);
9451         if( status ) exit( status );
9452
9453         /* make sure pthread_detach() isn't just a stub */
9454 #if HAVE_PTHREADS_D4
9455         status = pthread_detach( &t );
9456 #else
9457         status = pthread_detach( t );
9458 #endif
9459
9460 #ifdef HAVE_LINUX_THREADS
9461         pthread_kill_other_threads_np();
9462 #endif
9463
9464         exit( status );
9465
9466 }
9467
9468 EOF
9469 if { (eval echo configure:9470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9470 then
9471   ol_cv_pthread_threads=yes
9472 else
9473   echo "configure: failed program was:" >&5
9474   cat conftest.$ac_ext >&5
9475   rm -fr conftest*
9476   ol_cv_pthread_threads=no
9477 fi
9478 rm -fr conftest*
9479 fi
9480
9481
9482                 # restore the LIBS
9483                 LIBS="$ol_LIBS"
9484         
9485 fi
9486
9487 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9488
9489         if test $ol_cv_pthread_threads = yes ; then
9490                 ol_link_pthreads="-threads"
9491                 ol_link_threads=posix
9492         fi
9493 fi
9494
9495
9496                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9497 if test "$ol_link_threads" = no ; then
9498         # try -lpthreads -lmach -lexc -lc_r
9499         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9500 echo "configure:9501: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9501 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9502   echo $ac_n "(cached) $ac_c" 1>&6
9503 else
9504   
9505                 # save the flags
9506                 ol_LIBS="$LIBS"
9507                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9508
9509                 if test "$cross_compiling" = yes; then
9510   cat > conftest.$ac_ext <<EOF
9511 #line 9512 "configure"
9512 #include "confdefs.h"
9513 /* pthread test headers */
9514 #include <pthread.h>
9515 #ifndef NULL
9516 #define NULL (void*)0
9517 #endif
9518
9519 static void *task(p)
9520         void *p;
9521 {
9522         return (void *) (p == NULL);
9523 }
9524
9525 int main() {
9526
9527         /* pthread test function */
9528         pthread_t t;
9529         int status;
9530 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9531         /* This system (e.g. AIX) defaults detached; must override */
9532         pthread_attr_t attr;
9533
9534         status = pthread_attr_init(&attr);
9535         if( status ) exit( status );
9536
9537         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9538         if( status ) exit( status );
9539
9540 #define ATTR    &attr
9541 #else
9542 #if HAVE_PTHREADS_D4
9543 #define ATTR    pthread_attr_default
9544 #else
9545 #define ATTR    NULL
9546 #endif
9547 #endif
9548         /* make sure pthread_create() isn't just a stub */
9549         status = pthread_create(&t, ATTR, task, NULL);
9550         if( status ) exit( status );
9551
9552         /* make sure pthread_detach() isn't just a stub */
9553 #if HAVE_PTHREADS_D4
9554         status = pthread_detach( &t );
9555 #else
9556         status = pthread_detach( t );
9557 #endif
9558
9559 #ifdef HAVE_LINUX_THREADS
9560         pthread_kill_other_threads_np();
9561 #endif
9562
9563         exit( status );
9564
9565 ; return 0; }
9566 EOF
9567 if { (eval echo configure:9568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9568   rm -rf conftest*
9569   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9570 else
9571   echo "configure: failed program was:" >&5
9572   cat conftest.$ac_ext >&5
9573   rm -rf conftest*
9574   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9575 fi
9576 rm -f conftest*
9577 else
9578   cat > conftest.$ac_ext <<EOF
9579 #line 9580 "configure"
9580 #include "confdefs.h"
9581 /* pthread test headers */
9582 #include <pthread.h>
9583 #ifndef NULL
9584 #define NULL (void*)0
9585 #endif
9586
9587 static void *task(p)
9588         void *p;
9589 {
9590         return (void *) (p == NULL);
9591 }
9592
9593
9594 int main(argc, argv)
9595         int argc;
9596         char **argv;
9597 {
9598
9599         /* pthread test function */
9600         pthread_t t;
9601         int status;
9602 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9603         /* This system (e.g. AIX) defaults detached; must override */
9604         pthread_attr_t attr;
9605
9606         status = pthread_attr_init(&attr);
9607         if( status ) exit( status );
9608
9609         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9610         if( status ) exit( status );
9611
9612 #define ATTR    &attr
9613 #else
9614 #if HAVE_PTHREADS_D4
9615 #define ATTR    pthread_attr_default
9616 #else
9617 #define ATTR    NULL
9618 #endif
9619 #endif
9620         /* make sure pthread_create() isn't just a stub */
9621         status = pthread_create(&t, ATTR, task, NULL);
9622         if( status ) exit( status );
9623
9624         /* make sure pthread_detach() isn't just a stub */
9625 #if HAVE_PTHREADS_D4
9626         status = pthread_detach( &t );
9627 #else
9628         status = pthread_detach( t );
9629 #endif
9630
9631 #ifdef HAVE_LINUX_THREADS
9632         pthread_kill_other_threads_np();
9633 #endif
9634
9635         exit( status );
9636
9637 }
9638
9639 EOF
9640 if { (eval echo configure:9641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9641 then
9642   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9643 else
9644   echo "configure: failed program was:" >&5
9645   cat conftest.$ac_ext >&5
9646   rm -fr conftest*
9647   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9648 fi
9649 rm -fr conftest*
9650 fi
9651
9652
9653                 # restore the LIBS
9654                 LIBS="$ol_LIBS"
9655         
9656 fi
9657
9658 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9659
9660         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9661                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9662                 ol_link_threads=posix
9663         fi
9664 fi
9665
9666                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9667 if test "$ol_link_threads" = no ; then
9668         # try -lpthreads -lmach -lexc
9669         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9670 echo "configure:9671: checking for pthread link with -lpthreads -lmach -lexc" >&5
9671 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9672   echo $ac_n "(cached) $ac_c" 1>&6
9673 else
9674   
9675                 # save the flags
9676                 ol_LIBS="$LIBS"
9677                 LIBS="-lpthreads -lmach -lexc $LIBS"
9678
9679                 if test "$cross_compiling" = yes; then
9680   cat > conftest.$ac_ext <<EOF
9681 #line 9682 "configure"
9682 #include "confdefs.h"
9683 /* pthread test headers */
9684 #include <pthread.h>
9685 #ifndef NULL
9686 #define NULL (void*)0
9687 #endif
9688
9689 static void *task(p)
9690         void *p;
9691 {
9692         return (void *) (p == NULL);
9693 }
9694
9695 int main() {
9696
9697         /* pthread test function */
9698         pthread_t t;
9699         int status;
9700 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9701         /* This system (e.g. AIX) defaults detached; must override */
9702         pthread_attr_t attr;
9703
9704         status = pthread_attr_init(&attr);
9705         if( status ) exit( status );
9706
9707         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9708         if( status ) exit( status );
9709
9710 #define ATTR    &attr
9711 #else
9712 #if HAVE_PTHREADS_D4
9713 #define ATTR    pthread_attr_default
9714 #else
9715 #define ATTR    NULL
9716 #endif
9717 #endif
9718         /* make sure pthread_create() isn't just a stub */
9719         status = pthread_create(&t, ATTR, task, NULL);
9720         if( status ) exit( status );
9721
9722         /* make sure pthread_detach() isn't just a stub */
9723 #if HAVE_PTHREADS_D4
9724         status = pthread_detach( &t );
9725 #else
9726         status = pthread_detach( t );
9727 #endif
9728
9729 #ifdef HAVE_LINUX_THREADS
9730         pthread_kill_other_threads_np();
9731 #endif
9732
9733         exit( status );
9734
9735 ; return 0; }
9736 EOF
9737 if { (eval echo configure:9738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9738   rm -rf conftest*
9739   ol_cv_pthread_lpthreads_lmach_lexc=yes
9740 else
9741   echo "configure: failed program was:" >&5
9742   cat conftest.$ac_ext >&5
9743   rm -rf conftest*
9744   ol_cv_pthread_lpthreads_lmach_lexc=no
9745 fi
9746 rm -f conftest*
9747 else
9748   cat > conftest.$ac_ext <<EOF
9749 #line 9750 "configure"
9750 #include "confdefs.h"
9751 /* pthread test headers */
9752 #include <pthread.h>
9753 #ifndef NULL
9754 #define NULL (void*)0
9755 #endif
9756
9757 static void *task(p)
9758         void *p;
9759 {
9760         return (void *) (p == NULL);
9761 }
9762
9763
9764 int main(argc, argv)
9765         int argc;
9766         char **argv;
9767 {
9768
9769         /* pthread test function */
9770         pthread_t t;
9771         int status;
9772 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9773         /* This system (e.g. AIX) defaults detached; must override */
9774         pthread_attr_t attr;
9775
9776         status = pthread_attr_init(&attr);
9777         if( status ) exit( status );
9778
9779         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9780         if( status ) exit( status );
9781
9782 #define ATTR    &attr
9783 #else
9784 #if HAVE_PTHREADS_D4
9785 #define ATTR    pthread_attr_default
9786 #else
9787 #define ATTR    NULL
9788 #endif
9789 #endif
9790         /* make sure pthread_create() isn't just a stub */
9791         status = pthread_create(&t, ATTR, task, NULL);
9792         if( status ) exit( status );
9793
9794         /* make sure pthread_detach() isn't just a stub */
9795 #if HAVE_PTHREADS_D4
9796         status = pthread_detach( &t );
9797 #else
9798         status = pthread_detach( t );
9799 #endif
9800
9801 #ifdef HAVE_LINUX_THREADS
9802         pthread_kill_other_threads_np();
9803 #endif
9804
9805         exit( status );
9806
9807 }
9808
9809 EOF
9810 if { (eval echo configure:9811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9811 then
9812   ol_cv_pthread_lpthreads_lmach_lexc=yes
9813 else
9814   echo "configure: failed program was:" >&5
9815   cat conftest.$ac_ext >&5
9816   rm -fr conftest*
9817   ol_cv_pthread_lpthreads_lmach_lexc=no
9818 fi
9819 rm -fr conftest*
9820 fi
9821
9822
9823                 # restore the LIBS
9824                 LIBS="$ol_LIBS"
9825         
9826 fi
9827
9828 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9829
9830         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9831                 ol_link_pthreads="-lpthreads -lmach -lexc"
9832                 ol_link_threads=posix
9833         fi
9834 fi
9835
9836                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9837 if test "$ol_link_threads" = no ; then
9838         # try -lpthreads -lexc
9839         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9840 echo "configure:9841: checking for pthread link with -lpthreads -lexc" >&5
9841 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9842   echo $ac_n "(cached) $ac_c" 1>&6
9843 else
9844   
9845                 # save the flags
9846                 ol_LIBS="$LIBS"
9847                 LIBS="-lpthreads -lexc $LIBS"
9848
9849                 if test "$cross_compiling" = yes; then
9850   cat > conftest.$ac_ext <<EOF
9851 #line 9852 "configure"
9852 #include "confdefs.h"
9853 /* pthread test headers */
9854 #include <pthread.h>
9855 #ifndef NULL
9856 #define NULL (void*)0
9857 #endif
9858
9859 static void *task(p)
9860         void *p;
9861 {
9862         return (void *) (p == NULL);
9863 }
9864
9865 int main() {
9866
9867         /* pthread test function */
9868         pthread_t t;
9869         int status;
9870 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9871         /* This system (e.g. AIX) defaults detached; must override */
9872         pthread_attr_t attr;
9873
9874         status = pthread_attr_init(&attr);
9875         if( status ) exit( status );
9876
9877         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9878         if( status ) exit( status );
9879
9880 #define ATTR    &attr
9881 #else
9882 #if HAVE_PTHREADS_D4
9883 #define ATTR    pthread_attr_default
9884 #else
9885 #define ATTR    NULL
9886 #endif
9887 #endif
9888         /* make sure pthread_create() isn't just a stub */
9889         status = pthread_create(&t, ATTR, task, NULL);
9890         if( status ) exit( status );
9891
9892         /* make sure pthread_detach() isn't just a stub */
9893 #if HAVE_PTHREADS_D4
9894         status = pthread_detach( &t );
9895 #else
9896         status = pthread_detach( t );
9897 #endif
9898
9899 #ifdef HAVE_LINUX_THREADS
9900         pthread_kill_other_threads_np();
9901 #endif
9902
9903         exit( status );
9904
9905 ; return 0; }
9906 EOF
9907 if { (eval echo configure:9908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9908   rm -rf conftest*
9909   ol_cv_pthread_lpthreads_lexc=yes
9910 else
9911   echo "configure: failed program was:" >&5
9912   cat conftest.$ac_ext >&5
9913   rm -rf conftest*
9914   ol_cv_pthread_lpthreads_lexc=no
9915 fi
9916 rm -f conftest*
9917 else
9918   cat > conftest.$ac_ext <<EOF
9919 #line 9920 "configure"
9920 #include "confdefs.h"
9921 /* pthread test headers */
9922 #include <pthread.h>
9923 #ifndef NULL
9924 #define NULL (void*)0
9925 #endif
9926
9927 static void *task(p)
9928         void *p;
9929 {
9930         return (void *) (p == NULL);
9931 }
9932
9933
9934 int main(argc, argv)
9935         int argc;
9936         char **argv;
9937 {
9938
9939         /* pthread test function */
9940         pthread_t t;
9941         int status;
9942 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9943         /* This system (e.g. AIX) defaults detached; must override */
9944         pthread_attr_t attr;
9945
9946         status = pthread_attr_init(&attr);
9947         if( status ) exit( status );
9948
9949         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9950         if( status ) exit( status );
9951
9952 #define ATTR    &attr
9953 #else
9954 #if HAVE_PTHREADS_D4
9955 #define ATTR    pthread_attr_default
9956 #else
9957 #define ATTR    NULL
9958 #endif
9959 #endif
9960         /* make sure pthread_create() isn't just a stub */
9961         status = pthread_create(&t, ATTR, task, NULL);
9962         if( status ) exit( status );
9963
9964         /* make sure pthread_detach() isn't just a stub */
9965 #if HAVE_PTHREADS_D4
9966         status = pthread_detach( &t );
9967 #else
9968         status = pthread_detach( t );
9969 #endif
9970
9971 #ifdef HAVE_LINUX_THREADS
9972         pthread_kill_other_threads_np();
9973 #endif
9974
9975         exit( status );
9976
9977 }
9978
9979 EOF
9980 if { (eval echo configure:9981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9981 then
9982   ol_cv_pthread_lpthreads_lexc=yes
9983 else
9984   echo "configure: failed program was:" >&5
9985   cat conftest.$ac_ext >&5
9986   rm -fr conftest*
9987   ol_cv_pthread_lpthreads_lexc=no
9988 fi
9989 rm -fr conftest*
9990 fi
9991
9992
9993                 # restore the LIBS
9994                 LIBS="$ol_LIBS"
9995         
9996 fi
9997
9998 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9999
10000         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
10001                 ol_link_pthreads="-lpthreads -lexc"
10002                 ol_link_threads=posix
10003         fi
10004 fi
10005
10006
10007                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
10008 if test "$ol_link_threads" = no ; then
10009         # try -lpthreads
10010         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
10011 echo "configure:10012: checking for pthread link with -lpthreads" >&5
10012 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
10013   echo $ac_n "(cached) $ac_c" 1>&6
10014 else
10015   
10016                 # save the flags
10017                 ol_LIBS="$LIBS"
10018                 LIBS="-lpthreads $LIBS"
10019
10020                 if test "$cross_compiling" = yes; then
10021   cat > conftest.$ac_ext <<EOF
10022 #line 10023 "configure"
10023 #include "confdefs.h"
10024 /* pthread test headers */
10025 #include <pthread.h>
10026 #ifndef NULL
10027 #define NULL (void*)0
10028 #endif
10029
10030 static void *task(p)
10031         void *p;
10032 {
10033         return (void *) (p == NULL);
10034 }
10035
10036 int main() {
10037
10038         /* pthread test function */
10039         pthread_t t;
10040         int status;
10041 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10042         /* This system (e.g. AIX) defaults detached; must override */
10043         pthread_attr_t attr;
10044
10045         status = pthread_attr_init(&attr);
10046         if( status ) exit( status );
10047
10048         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10049         if( status ) exit( status );
10050
10051 #define ATTR    &attr
10052 #else
10053 #if HAVE_PTHREADS_D4
10054 #define ATTR    pthread_attr_default
10055 #else
10056 #define ATTR    NULL
10057 #endif
10058 #endif
10059         /* make sure pthread_create() isn't just a stub */
10060         status = pthread_create(&t, ATTR, task, NULL);
10061         if( status ) exit( status );
10062
10063         /* make sure pthread_detach() isn't just a stub */
10064 #if HAVE_PTHREADS_D4
10065         status = pthread_detach( &t );
10066 #else
10067         status = pthread_detach( t );
10068 #endif
10069
10070 #ifdef HAVE_LINUX_THREADS
10071         pthread_kill_other_threads_np();
10072 #endif
10073
10074         exit( status );
10075
10076 ; return 0; }
10077 EOF
10078 if { (eval echo configure:10079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10079   rm -rf conftest*
10080   ol_cv_pthread_lib_lpthreads=yes
10081 else
10082   echo "configure: failed program was:" >&5
10083   cat conftest.$ac_ext >&5
10084   rm -rf conftest*
10085   ol_cv_pthread_lib_lpthreads=no
10086 fi
10087 rm -f conftest*
10088 else
10089   cat > conftest.$ac_ext <<EOF
10090 #line 10091 "configure"
10091 #include "confdefs.h"
10092 /* pthread test headers */
10093 #include <pthread.h>
10094 #ifndef NULL
10095 #define NULL (void*)0
10096 #endif
10097
10098 static void *task(p)
10099         void *p;
10100 {
10101         return (void *) (p == NULL);
10102 }
10103
10104
10105 int main(argc, argv)
10106         int argc;
10107         char **argv;
10108 {
10109
10110         /* pthread test function */
10111         pthread_t t;
10112         int status;
10113 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10114         /* This system (e.g. AIX) defaults detached; must override */
10115         pthread_attr_t attr;
10116
10117         status = pthread_attr_init(&attr);
10118         if( status ) exit( status );
10119
10120         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10121         if( status ) exit( status );
10122
10123 #define ATTR    &attr
10124 #else
10125 #if HAVE_PTHREADS_D4
10126 #define ATTR    pthread_attr_default
10127 #else
10128 #define ATTR    NULL
10129 #endif
10130 #endif
10131         /* make sure pthread_create() isn't just a stub */
10132         status = pthread_create(&t, ATTR, task, NULL);
10133         if( status ) exit( status );
10134
10135         /* make sure pthread_detach() isn't just a stub */
10136 #if HAVE_PTHREADS_D4
10137         status = pthread_detach( &t );
10138 #else
10139         status = pthread_detach( t );
10140 #endif
10141
10142 #ifdef HAVE_LINUX_THREADS
10143         pthread_kill_other_threads_np();
10144 #endif
10145
10146         exit( status );
10147
10148 }
10149
10150 EOF
10151 if { (eval echo configure:10152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10152 then
10153   ol_cv_pthread_lib_lpthreads=yes
10154 else
10155   echo "configure: failed program was:" >&5
10156   cat conftest.$ac_ext >&5
10157   rm -fr conftest*
10158   ol_cv_pthread_lib_lpthreads=no
10159 fi
10160 rm -fr conftest*
10161 fi
10162
10163
10164                 # restore the LIBS
10165                 LIBS="$ol_LIBS"
10166         
10167 fi
10168
10169 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10170
10171         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10172                 ol_link_pthreads="-lpthreads"
10173                 ol_link_threads=posix
10174         fi
10175 fi
10176
10177
10178                 if test $ol_link_threads != no ; then
10179                         cat >> confdefs.h <<\EOF
10180 #define HAVE_PTHREADS 1
10181 EOF
10182
10183
10184                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10185
10186                                                 save_CPPFLAGS="$CPPFLAGS"
10187                         save_LIBS="$LIBS"
10188                         LIBS="$LTHREAD_LIBS $LIBS"
10189
10190                                                                                                 for ac_func in sched_yield pthread_yield
10191 do
10192 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10193 echo "configure:10194: checking for $ac_func" >&5
10194 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10195   echo $ac_n "(cached) $ac_c" 1>&6
10196 else
10197   cat > conftest.$ac_ext <<EOF
10198 #line 10199 "configure"
10199 #include "confdefs.h"
10200 /* System header to define __stub macros and hopefully few prototypes,
10201     which can conflict with char $ac_func(); below.  */
10202 #include <assert.h>
10203 /* Override any gcc2 internal prototype to avoid an error.  */
10204 /* We use char because int might match the return type of a gcc2
10205     builtin and then its argument prototype would still apply.  */
10206 char $ac_func();
10207 char (*f)();
10208
10209 int main() {
10210
10211 /* The GNU C library defines this for functions which it implements
10212     to always fail with ENOSYS.  Some functions are actually named
10213     something starting with __ and the normal name is an alias.  */
10214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10215 choke me
10216 #else
10217 f = $ac_func;
10218 #endif
10219
10220 ; return 0; }
10221 EOF
10222 if { (eval echo configure:10223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10223   rm -rf conftest*
10224   eval "ac_cv_func_$ac_func=yes"
10225 else
10226   echo "configure: failed program was:" >&5
10227   cat conftest.$ac_ext >&5
10228   rm -rf conftest*
10229   eval "ac_cv_func_$ac_func=no"
10230 fi
10231 rm -f conftest*
10232 fi
10233
10234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10235   echo "$ac_t""yes" 1>&6
10236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10237   cat >> confdefs.h <<EOF
10238 #define $ac_tr_func 1
10239 EOF
10240  
10241 else
10242   echo "$ac_t""no" 1>&6
10243 fi
10244 done
10245
10246
10247                         if test $ac_cv_func_sched_yield = no -a \
10248                                 $ac_cv_func_pthread_yield = no ; then
10249                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10250 echo "configure:10251: checking for sched_yield in -lrt" >&5
10251 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10253   echo $ac_n "(cached) $ac_c" 1>&6
10254 else
10255   ac_save_LIBS="$LIBS"
10256 LIBS="-lrt  $LIBS"
10257 cat > conftest.$ac_ext <<EOF
10258 #line 10259 "configure"
10259 #include "confdefs.h"
10260 /* Override any gcc2 internal prototype to avoid an error.  */
10261 /* We use char because int might match the return type of a gcc2
10262     builtin and then its argument prototype would still apply.  */
10263 char sched_yield();
10264
10265 int main() {
10266 sched_yield()
10267 ; return 0; }
10268 EOF
10269 if { (eval echo configure:10270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10270   rm -rf conftest*
10271   eval "ac_cv_lib_$ac_lib_var=yes"
10272 else
10273   echo "configure: failed program was:" >&5
10274   cat conftest.$ac_ext >&5
10275   rm -rf conftest*
10276   eval "ac_cv_lib_$ac_lib_var=no"
10277 fi
10278 rm -f conftest*
10279 LIBS="$ac_save_LIBS"
10280
10281 fi
10282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10283   echo "$ac_t""yes" 1>&6
10284   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10285                                         cat >> confdefs.h <<\EOF
10286 #define HAVE_SCHED_YIELD 1
10287 EOF
10288
10289                                         ac_cv_func_sched_yield=yes
10290 else
10291   echo "$ac_t""no" 1>&6
10292 ac_cv_func_sched_yield=no
10293 fi
10294
10295                         fi
10296                         if test $ac_cv_func_sched_yield = no -a \
10297                                 $ac_cv_func_pthread_yield = no ; then
10298                                                                                                 for ac_func in thr_yield
10299 do
10300 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10301 echo "configure:10302: checking for $ac_func" >&5
10302 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10303   echo $ac_n "(cached) $ac_c" 1>&6
10304 else
10305   cat > conftest.$ac_ext <<EOF
10306 #line 10307 "configure"
10307 #include "confdefs.h"
10308 /* System header to define __stub macros and hopefully few prototypes,
10309     which can conflict with char $ac_func(); below.  */
10310 #include <assert.h>
10311 /* Override any gcc2 internal prototype to avoid an error.  */
10312 /* We use char because int might match the return type of a gcc2
10313     builtin and then its argument prototype would still apply.  */
10314 char $ac_func();
10315 char (*f)();
10316
10317 int main() {
10318
10319 /* The GNU C library defines this for functions which it implements
10320     to always fail with ENOSYS.  Some functions are actually named
10321     something starting with __ and the normal name is an alias.  */
10322 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10323 choke me
10324 #else
10325 f = $ac_func;
10326 #endif
10327
10328 ; return 0; }
10329 EOF
10330 if { (eval echo configure:10331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10331   rm -rf conftest*
10332   eval "ac_cv_func_$ac_func=yes"
10333 else
10334   echo "configure: failed program was:" >&5
10335   cat conftest.$ac_ext >&5
10336   rm -rf conftest*
10337   eval "ac_cv_func_$ac_func=no"
10338 fi
10339 rm -f conftest*
10340 fi
10341
10342 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10343   echo "$ac_t""yes" 1>&6
10344     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10345   cat >> confdefs.h <<EOF
10346 #define $ac_tr_func 1
10347 EOF
10348  
10349 else
10350   echo "$ac_t""no" 1>&6
10351 fi
10352 done
10353
10354                         fi
10355                         if test $ac_cv_func_sched_yield = no -a \
10356                                 $ac_cv_func_pthread_yield = no -a \
10357                                 "$ac_cv_func_thr_yield" = no ; then
10358                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10359                         fi
10360
10361                                                 for ac_func in pthread_kill
10362 do
10363 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10364 echo "configure:10365: checking for $ac_func" >&5
10365 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10366   echo $ac_n "(cached) $ac_c" 1>&6
10367 else
10368   cat > conftest.$ac_ext <<EOF
10369 #line 10370 "configure"
10370 #include "confdefs.h"
10371 /* System header to define __stub macros and hopefully few prototypes,
10372     which can conflict with char $ac_func(); below.  */
10373 #include <assert.h>
10374 /* Override any gcc2 internal prototype to avoid an error.  */
10375 /* We use char because int might match the return type of a gcc2
10376     builtin and then its argument prototype would still apply.  */
10377 char $ac_func();
10378 char (*f)();
10379
10380 int main() {
10381
10382 /* The GNU C library defines this for functions which it implements
10383     to always fail with ENOSYS.  Some functions are actually named
10384     something starting with __ and the normal name is an alias.  */
10385 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10386 choke me
10387 #else
10388 f = $ac_func;
10389 #endif
10390
10391 ; return 0; }
10392 EOF
10393 if { (eval echo configure:10394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10394   rm -rf conftest*
10395   eval "ac_cv_func_$ac_func=yes"
10396 else
10397   echo "configure: failed program was:" >&5
10398   cat conftest.$ac_ext >&5
10399   rm -rf conftest*
10400   eval "ac_cv_func_$ac_func=no"
10401 fi
10402 rm -f conftest*
10403 fi
10404
10405 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10406   echo "$ac_t""yes" 1>&6
10407     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10408   cat >> confdefs.h <<EOF
10409 #define $ac_tr_func 1
10410 EOF
10411  
10412 else
10413   echo "$ac_t""no" 1>&6
10414 fi
10415 done
10416
10417
10418                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10419 echo "configure:10420: checking for pthread_detach with <pthread.h>" >&5
10420 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10421   echo $ac_n "(cached) $ac_c" 1>&6
10422 else
10423   
10424                                                                 cat > conftest.$ac_ext <<EOF
10425 #line 10426 "configure"
10426 #include "confdefs.h"
10427
10428 #include <pthread.h>
10429 #ifndef NULL
10430 #define NULL (void*)0
10431 #endif
10432
10433 int main() {
10434 pthread_detach(NULL);
10435 ; return 0; }
10436 EOF
10437 if { (eval echo configure:10438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10438   rm -rf conftest*
10439   ol_cv_func_pthread_detach=yes
10440 else
10441   echo "configure: failed program was:" >&5
10442   cat conftest.$ac_ext >&5
10443   rm -rf conftest*
10444   ol_cv_func_pthread_detach=no
10445 fi
10446 rm -f conftest*
10447                         
10448 fi
10449
10450 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10451
10452                         if test $ol_cv_func_pthread_detach = no ; then
10453                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10454                         fi
10455
10456                         cat >> confdefs.h <<\EOF
10457 #define HAVE_PTHREAD_DETACH 1
10458 EOF
10459
10460
10461                                                 for ac_func in \
10462                                 pthread_setconcurrency \
10463                                 pthread_getconcurrency \
10464                                 thr_setconcurrency \
10465                                 thr_getconcurrency \
10466                         
10467 do
10468 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10469 echo "configure:10470: checking for $ac_func" >&5
10470 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10471   echo $ac_n "(cached) $ac_c" 1>&6
10472 else
10473   cat > conftest.$ac_ext <<EOF
10474 #line 10475 "configure"
10475 #include "confdefs.h"
10476 /* System header to define __stub macros and hopefully few prototypes,
10477     which can conflict with char $ac_func(); below.  */
10478 #include <assert.h>
10479 /* Override any gcc2 internal prototype to avoid an error.  */
10480 /* We use char because int might match the return type of a gcc2
10481     builtin and then its argument prototype would still apply.  */
10482 char $ac_func();
10483 char (*f)();
10484
10485 int main() {
10486
10487 /* The GNU C library defines this for functions which it implements
10488     to always fail with ENOSYS.  Some functions are actually named
10489     something starting with __ and the normal name is an alias.  */
10490 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10491 choke me
10492 #else
10493 f = $ac_func;
10494 #endif
10495
10496 ; return 0; }
10497 EOF
10498 if { (eval echo configure:10499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10499   rm -rf conftest*
10500   eval "ac_cv_func_$ac_func=yes"
10501 else
10502   echo "configure: failed program was:" >&5
10503   cat conftest.$ac_ext >&5
10504   rm -rf conftest*
10505   eval "ac_cv_func_$ac_func=no"
10506 fi
10507 rm -f conftest*
10508 fi
10509
10510 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10511   echo "$ac_t""yes" 1>&6
10512     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10513   cat >> confdefs.h <<EOF
10514 #define $ac_tr_func 1
10515 EOF
10516  
10517 else
10518   echo "$ac_t""no" 1>&6
10519 fi
10520 done
10521
10522
10523                         
10524         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10525 echo "configure:10526: checking for pthread_kill_other_threads_np" >&5
10526 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10527   echo $ac_n "(cached) $ac_c" 1>&6
10528 else
10529   cat > conftest.$ac_ext <<EOF
10530 #line 10531 "configure"
10531 #include "confdefs.h"
10532 /* System header to define __stub macros and hopefully few prototypes,
10533     which can conflict with char pthread_kill_other_threads_np(); below.  */
10534 #include <assert.h>
10535 /* Override any gcc2 internal prototype to avoid an error.  */
10536 /* We use char because int might match the return type of a gcc2
10537     builtin and then its argument prototype would still apply.  */
10538 char pthread_kill_other_threads_np();
10539 char (*f)();
10540
10541 int main() {
10542
10543 /* The GNU C library defines this for functions which it implements
10544     to always fail with ENOSYS.  Some functions are actually named
10545     something starting with __ and the normal name is an alias.  */
10546 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10547 choke me
10548 #else
10549 f = pthread_kill_other_threads_np;
10550 #endif
10551
10552 ; return 0; }
10553 EOF
10554 if { (eval echo configure:10555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10555   rm -rf conftest*
10556   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10557 else
10558   echo "configure: failed program was:" >&5
10559   cat conftest.$ac_ext >&5
10560   rm -rf conftest*
10561   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10562 fi
10563 rm -f conftest*
10564 fi
10565
10566 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10567   echo "$ac_t""yes" 1>&6
10568   :
10569 else
10570   echo "$ac_t""no" 1>&6
10571 fi
10572
10573         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10574 echo "configure:10575: checking for LinuxThreads implementation" >&5
10575 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10576   echo $ac_n "(cached) $ac_c" 1>&6
10577 else
10578   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10579 fi
10580
10581 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10582
10583                         
10584         
10585         
10586         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10587 echo "configure:10588: checking for LinuxThreads consistency" >&5
10588 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10589   echo $ac_n "(cached) $ac_c" 1>&6
10590 else
10591   
10592                 if test $ol_cv_header_linux_threads = yes -a \
10593                         $ol_cv_sys_linux_threads = yes; then
10594                         ol_cv_linux_threads=yes
10595                 elif test $ol_cv_header_linux_threads = no -a \
10596                         $ol_cv_sys_linux_threads = no; then
10597                         ol_cv_linux_threads=no
10598                 else
10599                         ol_cv_linux_threads=error
10600                 fi
10601         
10602 fi
10603
10604 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10605
10606
10607                         if test $ol_cv_linux_threads = error; then
10608                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10609                         fi
10610
10611                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10612 echo "configure:10613: checking if pthread_create() works" >&5
10613 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10614   echo $ac_n "(cached) $ac_c" 1>&6
10615 else
10616   
10617                         if test "$cross_compiling" = yes; then
10618                                 ol_cv_pthread_create_works=yes
10619 else
10620   cat > conftest.$ac_ext <<EOF
10621 #line 10622 "configure"
10622 #include "confdefs.h"
10623 /* pthread test headers */
10624 #include <pthread.h>
10625 #ifndef NULL
10626 #define NULL (void*)0
10627 #endif
10628
10629 static void *task(p)
10630         void *p;
10631 {
10632         return (void *) (p == NULL);
10633 }
10634
10635
10636 int main(argc, argv)
10637         int argc;
10638         char **argv;
10639 {
10640
10641         /* pthread test function */
10642         pthread_t t;
10643         int status;
10644 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10645         /* This system (e.g. AIX) defaults detached; must override */
10646         pthread_attr_t attr;
10647
10648         status = pthread_attr_init(&attr);
10649         if( status ) exit( status );
10650
10651         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10652         if( status ) exit( status );
10653
10654 #define ATTR    &attr
10655 #else
10656 #if HAVE_PTHREADS_D4
10657 #define ATTR    pthread_attr_default
10658 #else
10659 #define ATTR    NULL
10660 #endif
10661 #endif
10662         /* make sure pthread_create() isn't just a stub */
10663         status = pthread_create(&t, ATTR, task, NULL);
10664         if( status ) exit( status );
10665
10666         /* make sure pthread_detach() isn't just a stub */
10667 #if HAVE_PTHREADS_D4
10668         status = pthread_detach( &t );
10669 #else
10670         status = pthread_detach( t );
10671 #endif
10672
10673 #ifdef HAVE_LINUX_THREADS
10674         pthread_kill_other_threads_np();
10675 #endif
10676
10677         exit( status );
10678
10679 }
10680
10681 EOF
10682 if { (eval echo configure:10683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10683 then
10684   ol_cv_pthread_create_works=yes
10685 else
10686   echo "configure: failed program was:" >&5
10687   cat conftest.$ac_ext >&5
10688   rm -fr conftest*
10689   ol_cv_pthread_create_works=no
10690 fi
10691 rm -fr conftest*
10692 fi
10693
10694 fi
10695
10696 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10697
10698                         if test $ol_cv_pthread_create_works = no ; then
10699                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10700                         fi
10701
10702                                                 if test $ol_with_yielding_select = auto ; then
10703                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10704 echo "configure:10705: checking if select yields when using pthreads" >&5
10705 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10706   echo $ac_n "(cached) $ac_c" 1>&6
10707 else
10708   
10709                                 if test "$cross_compiling" = yes; then
10710   ol_cv_pthread_select_yields=cross
10711 else
10712   cat > conftest.$ac_ext <<EOF
10713 #line 10714 "configure"
10714 #include "confdefs.h"
10715
10716 #include <sys/types.h>
10717 #include <sys/time.h>
10718 #include <unistd.h>
10719 #include <pthread.h>
10720 #ifndef NULL
10721 #define NULL (void*) 0
10722 #endif
10723
10724 static int fildes[2];
10725
10726 static void *task(p)
10727         void *p;
10728 {
10729         int i;
10730         struct timeval tv;
10731
10732         fd_set rfds;
10733
10734         tv.tv_sec=10;
10735         tv.tv_usec=0;
10736
10737         FD_ZERO(&rfds);
10738         FD_SET(fildes[0], &rfds);
10739
10740         /* we're not interested in any fds */
10741         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10742
10743         if(i < 0) {
10744                 perror("select");
10745                 exit(10);
10746         }
10747
10748         exit(0); /* if we exit here, the select blocked the whole process */
10749 }
10750
10751 int main(argc, argv)
10752         int argc;
10753         char **argv;
10754 {
10755         pthread_t t;
10756
10757         /* create a pipe to select */
10758         if(pipe(&fildes[0])) {
10759                 perror("select");
10760                 exit(1);
10761         }
10762
10763 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10764         (void) pthread_setconcurrency(2);
10765 #else
10766 #ifdef HAVE_THR_SETCONCURRENCY
10767         /* Set Solaris LWP concurrency to 2 */
10768         thr_setconcurrency(2);
10769 #endif
10770 #endif
10771
10772 #if HAVE_PTHREADS_D4
10773         pthread_create(&t, pthread_attr_default, task, NULL);
10774 #else
10775         pthread_create(&t, NULL, task, NULL);
10776 #endif
10777
10778 #if HAVE_SCHED_YIELD
10779         sched_yield();  /* make sure task runs first */
10780 #else
10781 #ifdef HAVE_PTHREAD_YIELD
10782         pthread_yield();        /* make sure task runs first */
10783 #endif
10784 #endif
10785
10786         exit(2);
10787 }
10788 EOF
10789 if { (eval echo configure:10790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10790 then
10791   ol_cv_pthread_select_yields=no
10792 else
10793   echo "configure: failed program was:" >&5
10794   cat conftest.$ac_ext >&5
10795   rm -fr conftest*
10796   ol_cv_pthread_select_yields=yes
10797 fi
10798 rm -fr conftest*
10799 fi
10800
10801 fi
10802
10803 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10804
10805                                 if test $ol_cv_pthread_select_yields = cross ; then
10806                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10807                                 fi
10808
10809                                 if test $ol_cv_pthread_select_yields = yes ; then
10810                                         ol_with_yielding_select=yes
10811                                 fi
10812                         fi
10813
10814                                                 CPPFLAGS="$save_CPPFLAGS"
10815                         LIBS="$save_LIBS"
10816                 else
10817                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10818                 fi
10819         fi
10820
10821         if test $ol_with_threads = posix ; then
10822                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10823         fi
10824 fi
10825
10826 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10827         -o $ol_with_threads = mach ; then
10828
10829                 for ac_hdr in mach/cthreads.h
10830 do
10831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10833 echo "configure:10834: checking for $ac_hdr" >&5
10834 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10835   echo $ac_n "(cached) $ac_c" 1>&6
10836 else
10837   cat > conftest.$ac_ext <<EOF
10838 #line 10839 "configure"
10839 #include "confdefs.h"
10840 #include <$ac_hdr>
10841 EOF
10842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10843 { (eval echo configure:10844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10845 if test -z "$ac_err"; then
10846   rm -rf conftest*
10847   eval "ac_cv_header_$ac_safe=yes"
10848 else
10849   echo "$ac_err" >&5
10850   echo "configure: failed program was:" >&5
10851   cat conftest.$ac_ext >&5
10852   rm -rf conftest*
10853   eval "ac_cv_header_$ac_safe=no"
10854 fi
10855 rm -f conftest*
10856 fi
10857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10858   echo "$ac_t""yes" 1>&6
10859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10860   cat >> confdefs.h <<EOF
10861 #define $ac_tr_hdr 1
10862 EOF
10863  
10864 else
10865   echo "$ac_t""no" 1>&6
10866 fi
10867 done
10868
10869         if test $ac_cv_header_mach_cthreads_h = yes ; then
10870                 ol_with_threads=found
10871
10872                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10873 echo "configure:10874: checking for cthread_fork" >&5
10874 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10875   echo $ac_n "(cached) $ac_c" 1>&6
10876 else
10877   cat > conftest.$ac_ext <<EOF
10878 #line 10879 "configure"
10879 #include "confdefs.h"
10880 /* System header to define __stub macros and hopefully few prototypes,
10881     which can conflict with char cthread_fork(); below.  */
10882 #include <assert.h>
10883 /* Override any gcc2 internal prototype to avoid an error.  */
10884 /* We use char because int might match the return type of a gcc2
10885     builtin and then its argument prototype would still apply.  */
10886 char cthread_fork();
10887 char (*f)();
10888
10889 int main() {
10890
10891 /* The GNU C library defines this for functions which it implements
10892     to always fail with ENOSYS.  Some functions are actually named
10893     something starting with __ and the normal name is an alias.  */
10894 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10895 choke me
10896 #else
10897 f = cthread_fork;
10898 #endif
10899
10900 ; return 0; }
10901 EOF
10902 if { (eval echo configure:10903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10903   rm -rf conftest*
10904   eval "ac_cv_func_cthread_fork=yes"
10905 else
10906   echo "configure: failed program was:" >&5
10907   cat conftest.$ac_ext >&5
10908   rm -rf conftest*
10909   eval "ac_cv_func_cthread_fork=no"
10910 fi
10911 rm -f conftest*
10912 fi
10913
10914 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10915   echo "$ac_t""yes" 1>&6
10916   ol_link_threads=yes
10917 else
10918   echo "$ac_t""no" 1>&6
10919 fi
10920
10921
10922                 if test $ol_link_threads = no ; then
10923                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10924 echo "configure:10925: checking for cthread_fork with -all_load" >&5
10925 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10926   echo $ac_n "(cached) $ac_c" 1>&6
10927 else
10928   
10929                                                                 save_LIBS="$LIBS"
10930                                 LIBS="-all_load $LIBS"
10931                                 cat > conftest.$ac_ext <<EOF
10932 #line 10933 "configure"
10933 #include "confdefs.h"
10934 #include <mach/cthreads.h>
10935 int main() {
10936
10937                                         cthread_fork((void *)0, (void *)0);
10938                                         
10939 ; return 0; }
10940 EOF
10941 if { (eval echo configure:10942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10942   rm -rf conftest*
10943   ol_cv_cthread_all_load=yes
10944 else
10945   echo "configure: failed program was:" >&5
10946   cat conftest.$ac_ext >&5
10947   rm -rf conftest*
10948   ol_cv_cthread_all_load=no
10949 fi
10950 rm -f conftest*
10951                                                                 LIBS="$save_LIBS"
10952                         
10953 fi
10954
10955 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10956
10957                         if test $ol_cv_cthread_all_load = yes ; then
10958                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10959                                 ol_link_threads=mach
10960                         fi
10961                 fi
10962
10963                 if test $ol_link_threads != no ; then
10964                         : check for cthread specific functionality here
10965                         cat >> confdefs.h <<\EOF
10966 #define HAVE_MACH_CTHREADS 1
10967 EOF
10968
10969                 else
10970                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10971                 fi
10972         fi
10973
10974         if test $ol_with_threads = mach ; then
10975                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10976         fi
10977 fi
10978
10979 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10980         -o $ol_with_threads = pth ; then
10981
10982         for ac_hdr in pth.h
10983 do
10984 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10985 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10986 echo "configure:10987: checking for $ac_hdr" >&5
10987 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   cat > conftest.$ac_ext <<EOF
10991 #line 10992 "configure"
10992 #include "confdefs.h"
10993 #include <$ac_hdr>
10994 EOF
10995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10996 { (eval echo configure:10997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10998 if test -z "$ac_err"; then
10999   rm -rf conftest*
11000   eval "ac_cv_header_$ac_safe=yes"
11001 else
11002   echo "$ac_err" >&5
11003   echo "configure: failed program was:" >&5
11004   cat conftest.$ac_ext >&5
11005   rm -rf conftest*
11006   eval "ac_cv_header_$ac_safe=no"
11007 fi
11008 rm -f conftest*
11009 fi
11010 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11011   echo "$ac_t""yes" 1>&6
11012     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11013   cat >> confdefs.h <<EOF
11014 #define $ac_tr_hdr 1
11015 EOF
11016  
11017 else
11018   echo "$ac_t""no" 1>&6
11019 fi
11020 done
11021
11022
11023         if test $ac_cv_header_pth_h = yes ; then
11024                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
11025 echo "configure:11026: checking for pth_version in -lpth" >&5
11026 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
11027 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11028   echo $ac_n "(cached) $ac_c" 1>&6
11029 else
11030   ac_save_LIBS="$LIBS"
11031 LIBS="-lpth  $LIBS"
11032 cat > conftest.$ac_ext <<EOF
11033 #line 11034 "configure"
11034 #include "confdefs.h"
11035 /* Override any gcc2 internal prototype to avoid an error.  */
11036 /* We use char because int might match the return type of a gcc2
11037     builtin and then its argument prototype would still apply.  */
11038 char pth_version();
11039
11040 int main() {
11041 pth_version()
11042 ; return 0; }
11043 EOF
11044 if { (eval echo configure:11045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11045   rm -rf conftest*
11046   eval "ac_cv_lib_$ac_lib_var=yes"
11047 else
11048   echo "configure: failed program was:" >&5
11049   cat conftest.$ac_ext >&5
11050   rm -rf conftest*
11051   eval "ac_cv_lib_$ac_lib_var=no"
11052 fi
11053 rm -f conftest*
11054 LIBS="$ac_save_LIBS"
11055
11056 fi
11057 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11058   echo "$ac_t""yes" 1>&6
11059   have_pth=yes
11060 else
11061   echo "$ac_t""no" 1>&6
11062 have_pth=no
11063 fi
11064
11065
11066                 if test $have_pth = yes ; then
11067                         cat >> confdefs.h <<\EOF
11068 #define HAVE_GNU_PTH 1
11069 EOF
11070
11071                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
11072                         ol_link_threads=pth
11073
11074                         if test $ol_with_yielding_select = auto ; then
11075                                 ol_with_yielding_select=yes
11076                         fi
11077                 fi
11078         fi
11079 fi
11080
11081 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11082         -o $ol_with_threads = lwp ; then
11083
11084                 for ac_hdr in thread.h synch.h
11085 do
11086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11088 echo "configure:11089: checking for $ac_hdr" >&5
11089 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11090   echo $ac_n "(cached) $ac_c" 1>&6
11091 else
11092   cat > conftest.$ac_ext <<EOF
11093 #line 11094 "configure"
11094 #include "confdefs.h"
11095 #include <$ac_hdr>
11096 EOF
11097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11098 { (eval echo configure:11099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11100 if test -z "$ac_err"; then
11101   rm -rf conftest*
11102   eval "ac_cv_header_$ac_safe=yes"
11103 else
11104   echo "$ac_err" >&5
11105   echo "configure: failed program was:" >&5
11106   cat conftest.$ac_ext >&5
11107   rm -rf conftest*
11108   eval "ac_cv_header_$ac_safe=no"
11109 fi
11110 rm -f conftest*
11111 fi
11112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11113   echo "$ac_t""yes" 1>&6
11114     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11115   cat >> confdefs.h <<EOF
11116 #define $ac_tr_hdr 1
11117 EOF
11118  
11119 else
11120   echo "$ac_t""no" 1>&6
11121 fi
11122 done
11123
11124         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
11125                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
11126 echo "configure:11127: checking for thr_create in -lthread" >&5
11127 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
11128 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11129   echo $ac_n "(cached) $ac_c" 1>&6
11130 else
11131   ac_save_LIBS="$LIBS"
11132 LIBS="-lthread  $LIBS"
11133 cat > conftest.$ac_ext <<EOF
11134 #line 11135 "configure"
11135 #include "confdefs.h"
11136 /* Override any gcc2 internal prototype to avoid an error.  */
11137 /* We use char because int might match the return type of a gcc2
11138     builtin and then its argument prototype would still apply.  */
11139 char thr_create();
11140
11141 int main() {
11142 thr_create()
11143 ; return 0; }
11144 EOF
11145 if { (eval echo configure:11146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11146   rm -rf conftest*
11147   eval "ac_cv_lib_$ac_lib_var=yes"
11148 else
11149   echo "configure: failed program was:" >&5
11150   cat conftest.$ac_ext >&5
11151   rm -rf conftest*
11152   eval "ac_cv_lib_$ac_lib_var=no"
11153 fi
11154 rm -f conftest*
11155 LIBS="$ac_save_LIBS"
11156
11157 fi
11158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11159   echo "$ac_t""yes" 1>&6
11160   have_thr=yes
11161 else
11162   echo "$ac_t""no" 1>&6
11163 have_thr=no
11164 fi
11165
11166
11167                 if test $have_thr = yes ; then
11168                         cat >> confdefs.h <<\EOF
11169 #define HAVE_THR 1
11170 EOF
11171
11172                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11173                         ol_link_threads=thr
11174
11175                         if test $ol_with_yielding_select = auto ; then
11176                                 ol_with_yielding_select=yes
11177                         fi
11178
11179                                                 for ac_func in \
11180                                 thr_setconcurrency \
11181                                 thr_getconcurrency \
11182                         
11183 do
11184 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11185 echo "configure:11186: checking for $ac_func" >&5
11186 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11187   echo $ac_n "(cached) $ac_c" 1>&6
11188 else
11189   cat > conftest.$ac_ext <<EOF
11190 #line 11191 "configure"
11191 #include "confdefs.h"
11192 /* System header to define __stub macros and hopefully few prototypes,
11193     which can conflict with char $ac_func(); below.  */
11194 #include <assert.h>
11195 /* Override any gcc2 internal prototype to avoid an error.  */
11196 /* We use char because int might match the return type of a gcc2
11197     builtin and then its argument prototype would still apply.  */
11198 char $ac_func();
11199 char (*f)();
11200
11201 int main() {
11202
11203 /* The GNU C library defines this for functions which it implements
11204     to always fail with ENOSYS.  Some functions are actually named
11205     something starting with __ and the normal name is an alias.  */
11206 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11207 choke me
11208 #else
11209 f = $ac_func;
11210 #endif
11211
11212 ; return 0; }
11213 EOF
11214 if { (eval echo configure:11215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11215   rm -rf conftest*
11216   eval "ac_cv_func_$ac_func=yes"
11217 else
11218   echo "configure: failed program was:" >&5
11219   cat conftest.$ac_ext >&5
11220   rm -rf conftest*
11221   eval "ac_cv_func_$ac_func=no"
11222 fi
11223 rm -f conftest*
11224 fi
11225
11226 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11227   echo "$ac_t""yes" 1>&6
11228     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11229   cat >> confdefs.h <<EOF
11230 #define $ac_tr_func 1
11231 EOF
11232  
11233 else
11234   echo "$ac_t""no" 1>&6
11235 fi
11236 done
11237
11238                 fi
11239         fi
11240
11241                 for ac_hdr in lwp/lwp.h
11242 do
11243 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11244 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11245 echo "configure:11246: checking for $ac_hdr" >&5
11246 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11247   echo $ac_n "(cached) $ac_c" 1>&6
11248 else
11249   cat > conftest.$ac_ext <<EOF
11250 #line 11251 "configure"
11251 #include "confdefs.h"
11252 #include <$ac_hdr>
11253 EOF
11254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11255 { (eval echo configure:11256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11257 if test -z "$ac_err"; then
11258   rm -rf conftest*
11259   eval "ac_cv_header_$ac_safe=yes"
11260 else
11261   echo "$ac_err" >&5
11262   echo "configure: failed program was:" >&5
11263   cat conftest.$ac_ext >&5
11264   rm -rf conftest*
11265   eval "ac_cv_header_$ac_safe=no"
11266 fi
11267 rm -f conftest*
11268 fi
11269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11270   echo "$ac_t""yes" 1>&6
11271     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11272   cat >> confdefs.h <<EOF
11273 #define $ac_tr_hdr 1
11274 EOF
11275  
11276 else
11277   echo "$ac_t""no" 1>&6
11278 fi
11279 done
11280
11281         if test $ac_cv_header_lwp_lwp_h = yes ; then
11282                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11283 echo "configure:11284: checking for lwp_create in -llwp" >&5
11284 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11285 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11286   echo $ac_n "(cached) $ac_c" 1>&6
11287 else
11288   ac_save_LIBS="$LIBS"
11289 LIBS="-llwp  $LIBS"
11290 cat > conftest.$ac_ext <<EOF
11291 #line 11292 "configure"
11292 #include "confdefs.h"
11293 /* Override any gcc2 internal prototype to avoid an error.  */
11294 /* We use char because int might match the return type of a gcc2
11295     builtin and then its argument prototype would still apply.  */
11296 char lwp_create();
11297
11298 int main() {
11299 lwp_create()
11300 ; return 0; }
11301 EOF
11302 if { (eval echo configure:11303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11303   rm -rf conftest*
11304   eval "ac_cv_lib_$ac_lib_var=yes"
11305 else
11306   echo "configure: failed program was:" >&5
11307   cat conftest.$ac_ext >&5
11308   rm -rf conftest*
11309   eval "ac_cv_lib_$ac_lib_var=no"
11310 fi
11311 rm -f conftest*
11312 LIBS="$ac_save_LIBS"
11313
11314 fi
11315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11316   echo "$ac_t""yes" 1>&6
11317   have_lwp=yes
11318 else
11319   echo "$ac_t""no" 1>&6
11320 have_lwp=no
11321 fi
11322
11323
11324                 if test $have_lwp = yes ; then
11325                         cat >> confdefs.h <<\EOF
11326 #define HAVE_LWP 1
11327 EOF
11328
11329                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11330                         ol_link_threads=lwp
11331
11332                         if test $ol_with_yielding_select = auto ; then
11333                                 ol_with_yielding_select=no
11334                         fi
11335                 fi
11336         fi
11337 fi
11338
11339 if test $ol_with_yielding_select = yes ; then
11340         cat >> confdefs.h <<\EOF
11341 #define HAVE_YIELDING_SELECT 1
11342 EOF
11343
11344 fi
11345
11346 if test $ol_with_threads = manual ; then
11347                 ol_link_threads=yes
11348
11349         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11350
11351         for ac_hdr in pthread.h sched.h
11352 do
11353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11355 echo "configure:11356: checking for $ac_hdr" >&5
11356 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11357   echo $ac_n "(cached) $ac_c" 1>&6
11358 else
11359   cat > conftest.$ac_ext <<EOF
11360 #line 11361 "configure"
11361 #include "confdefs.h"
11362 #include <$ac_hdr>
11363 EOF
11364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11365 { (eval echo configure:11366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11367 if test -z "$ac_err"; then
11368   rm -rf conftest*
11369   eval "ac_cv_header_$ac_safe=yes"
11370 else
11371   echo "$ac_err" >&5
11372   echo "configure: failed program was:" >&5
11373   cat conftest.$ac_ext >&5
11374   rm -rf conftest*
11375   eval "ac_cv_header_$ac_safe=no"
11376 fi
11377 rm -f conftest*
11378 fi
11379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11380   echo "$ac_t""yes" 1>&6
11381     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11382   cat >> confdefs.h <<EOF
11383 #define $ac_tr_hdr 1
11384 EOF
11385  
11386 else
11387   echo "$ac_t""no" 1>&6
11388 fi
11389 done
11390
11391         for ac_func in sched_yield pthread_yield
11392 do
11393 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11394 echo "configure:11395: checking for $ac_func" >&5
11395 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11396   echo $ac_n "(cached) $ac_c" 1>&6
11397 else
11398   cat > conftest.$ac_ext <<EOF
11399 #line 11400 "configure"
11400 #include "confdefs.h"
11401 /* System header to define __stub macros and hopefully few prototypes,
11402     which can conflict with char $ac_func(); below.  */
11403 #include <assert.h>
11404 /* Override any gcc2 internal prototype to avoid an error.  */
11405 /* We use char because int might match the return type of a gcc2
11406     builtin and then its argument prototype would still apply.  */
11407 char $ac_func();
11408 char (*f)();
11409
11410 int main() {
11411
11412 /* The GNU C library defines this for functions which it implements
11413     to always fail with ENOSYS.  Some functions are actually named
11414     something starting with __ and the normal name is an alias.  */
11415 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11416 choke me
11417 #else
11418 f = $ac_func;
11419 #endif
11420
11421 ; return 0; }
11422 EOF
11423 if { (eval echo configure:11424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11424   rm -rf conftest*
11425   eval "ac_cv_func_$ac_func=yes"
11426 else
11427   echo "configure: failed program was:" >&5
11428   cat conftest.$ac_ext >&5
11429   rm -rf conftest*
11430   eval "ac_cv_func_$ac_func=no"
11431 fi
11432 rm -f conftest*
11433 fi
11434
11435 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11436   echo "$ac_t""yes" 1>&6
11437     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11438   cat >> confdefs.h <<EOF
11439 #define $ac_tr_func 1
11440 EOF
11441  
11442 else
11443   echo "$ac_t""no" 1>&6
11444 fi
11445 done
11446
11447         
11448         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11449 echo "configure:11450: checking for LinuxThreads pthread.h" >&5
11450 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11451   echo $ac_n "(cached) $ac_c" 1>&6
11452 else
11453   cat > conftest.$ac_ext <<EOF
11454 #line 11455 "configure"
11455 #include "confdefs.h"
11456 #include <pthread.h>
11457 EOF
11458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11459   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11460   rm -rf conftest*
11461   ol_cv_header_linux_threads=yes
11462 else
11463   rm -rf conftest*
11464   ol_cv_header_linux_threads=no
11465 fi
11466 rm -f conftest*
11467
11468                 
11469 fi
11470
11471 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11472         if test $ol_cv_header_linux_threads = yes; then
11473                 cat >> confdefs.h <<\EOF
11474 #define HAVE_LINUX_THREADS 1
11475 EOF
11476
11477         fi
11478
11479
11480         for ac_hdr in mach/cthreads.h
11481 do
11482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11484 echo "configure:11485: checking for $ac_hdr" >&5
11485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11486   echo $ac_n "(cached) $ac_c" 1>&6
11487 else
11488   cat > conftest.$ac_ext <<EOF
11489 #line 11490 "configure"
11490 #include "confdefs.h"
11491 #include <$ac_hdr>
11492 EOF
11493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11494 { (eval echo configure:11495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11496 if test -z "$ac_err"; then
11497   rm -rf conftest*
11498   eval "ac_cv_header_$ac_safe=yes"
11499 else
11500   echo "$ac_err" >&5
11501   echo "configure: failed program was:" >&5
11502   cat conftest.$ac_ext >&5
11503   rm -rf conftest*
11504   eval "ac_cv_header_$ac_safe=no"
11505 fi
11506 rm -f conftest*
11507 fi
11508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11509   echo "$ac_t""yes" 1>&6
11510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11511   cat >> confdefs.h <<EOF
11512 #define $ac_tr_hdr 1
11513 EOF
11514  
11515 else
11516   echo "$ac_t""no" 1>&6
11517 fi
11518 done
11519
11520         for ac_hdr in lwp/lwp.h
11521 do
11522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11524 echo "configure:11525: checking for $ac_hdr" >&5
11525 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11526   echo $ac_n "(cached) $ac_c" 1>&6
11527 else
11528   cat > conftest.$ac_ext <<EOF
11529 #line 11530 "configure"
11530 #include "confdefs.h"
11531 #include <$ac_hdr>
11532 EOF
11533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11534 { (eval echo configure:11535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11536 if test -z "$ac_err"; then
11537   rm -rf conftest*
11538   eval "ac_cv_header_$ac_safe=yes"
11539 else
11540   echo "$ac_err" >&5
11541   echo "configure: failed program was:" >&5
11542   cat conftest.$ac_ext >&5
11543   rm -rf conftest*
11544   eval "ac_cv_header_$ac_safe=no"
11545 fi
11546 rm -f conftest*
11547 fi
11548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11549   echo "$ac_t""yes" 1>&6
11550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11551   cat >> confdefs.h <<EOF
11552 #define $ac_tr_hdr 1
11553 EOF
11554  
11555 else
11556   echo "$ac_t""no" 1>&6
11557 fi
11558 done
11559
11560         for ac_hdr in thread.h synch.h
11561 do
11562 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11563 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11564 echo "configure:11565: checking for $ac_hdr" >&5
11565 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11566   echo $ac_n "(cached) $ac_c" 1>&6
11567 else
11568   cat > conftest.$ac_ext <<EOF
11569 #line 11570 "configure"
11570 #include "confdefs.h"
11571 #include <$ac_hdr>
11572 EOF
11573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11574 { (eval echo configure:11575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11576 if test -z "$ac_err"; then
11577   rm -rf conftest*
11578   eval "ac_cv_header_$ac_safe=yes"
11579 else
11580   echo "$ac_err" >&5
11581   echo "configure: failed program was:" >&5
11582   cat conftest.$ac_ext >&5
11583   rm -rf conftest*
11584   eval "ac_cv_header_$ac_safe=no"
11585 fi
11586 rm -f conftest*
11587 fi
11588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11589   echo "$ac_t""yes" 1>&6
11590     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11591   cat >> confdefs.h <<EOF
11592 #define $ac_tr_hdr 1
11593 EOF
11594  
11595 else
11596   echo "$ac_t""no" 1>&6
11597 fi
11598 done
11599
11600 fi
11601
11602 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11603                         cat >> confdefs.h <<\EOF
11604 #define REENTRANT 1
11605 EOF
11606
11607         cat >> confdefs.h <<\EOF
11608 #define _REENTRANT 1
11609 EOF
11610
11611         cat >> confdefs.h <<\EOF
11612 #define THREAD_SAFE 1
11613 EOF
11614
11615         cat >> confdefs.h <<\EOF
11616 #define _THREAD_SAFE 1
11617 EOF
11618
11619         cat >> confdefs.h <<\EOF
11620 #define THREADSAFE 1
11621 EOF
11622
11623         cat >> confdefs.h <<\EOF
11624 #define _THREADSAFE 1
11625 EOF
11626
11627         cat >> confdefs.h <<\EOF
11628 #define _SGI_MP_SOURCE 1
11629 EOF
11630
11631
11632                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11633 echo "configure:11634: checking for thread specific errno" >&5
11634 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11635   echo $ac_n "(cached) $ac_c" 1>&6
11636 else
11637   
11638                 cat > conftest.$ac_ext <<EOF
11639 #line 11640 "configure"
11640 #include "confdefs.h"
11641 #include <errno.h>
11642 int main() {
11643 errno = 0;
11644 ; return 0; }
11645 EOF
11646 if { (eval echo configure:11647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11647   rm -rf conftest*
11648   ol_cv_errno_thread_specific=yes
11649 else
11650   echo "configure: failed program was:" >&5
11651   cat conftest.$ac_ext >&5
11652   rm -rf conftest*
11653   ol_cv_errno_thread_specific=no
11654 fi
11655 rm -f conftest*
11656         
11657 fi
11658
11659 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11660
11661                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11662 echo "configure:11663: checking for thread specific h_errno" >&5
11663 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11664   echo $ac_n "(cached) $ac_c" 1>&6
11665 else
11666   
11667                 cat > conftest.$ac_ext <<EOF
11668 #line 11669 "configure"
11669 #include "confdefs.h"
11670 #include <netdb.h>
11671 int main() {
11672 h_errno = 0;
11673 ; return 0; }
11674 EOF
11675 if { (eval echo configure:11676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11676   rm -rf conftest*
11677   ol_cv_h_errno_thread_specific=yes
11678 else
11679   echo "configure: failed program was:" >&5
11680   cat conftest.$ac_ext >&5
11681   rm -rf conftest*
11682   ol_cv_h_errno_thread_specific=no
11683 fi
11684 rm -f conftest*
11685         
11686 fi
11687
11688 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11689
11690         if test $ol_cv_errno_thread_specific != yes \
11691                 -o $ol_cv_h_errno_thread_specific != yes ; then
11692                 LIBS="$LTHREAD_LIBS $LIBS"
11693                 LTHREAD_LIBS=""
11694         fi
11695
11696 fi  
11697
11698 if test $ol_link_threads = no ; then
11699         if test $ol_with_threads = yes ; then
11700                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11701         fi
11702
11703         if test $ol_with_threads = auto ; then
11704                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11705                 ol_with_threads=no
11706         fi
11707
11708         cat >> confdefs.h <<\EOF
11709 #define NO_THREADS 1
11710 EOF
11711
11712         LTHREAD_LIBS=""
11713 fi
11714
11715 if test $ol_link_threads != no ; then
11716         cat >> confdefs.h <<\EOF
11717 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11718 EOF
11719
11720 fi
11721
11722 ol_link_ldbm=no 
11723
11724 if test $ol_with_ldbm_api = auto \
11725         -o $ol_with_ldbm_api = berkeley \
11726         -o $ol_with_ldbm_api = bcompat ; then
11727
11728         if test $ol_with_ldbm_api = bcompat; then \
11729                 ol_cv_berkeley_db=no
11730 for ac_hdr in db_185.h db.h
11731 do
11732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11734 echo "configure:11735: checking for $ac_hdr" >&5
11735 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11736   echo $ac_n "(cached) $ac_c" 1>&6
11737 else
11738   cat > conftest.$ac_ext <<EOF
11739 #line 11740 "configure"
11740 #include "confdefs.h"
11741 #include <$ac_hdr>
11742 EOF
11743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11744 { (eval echo configure:11745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11746 if test -z "$ac_err"; then
11747   rm -rf conftest*
11748   eval "ac_cv_header_$ac_safe=yes"
11749 else
11750   echo "$ac_err" >&5
11751   echo "configure: failed program was:" >&5
11752   cat conftest.$ac_ext >&5
11753   rm -rf conftest*
11754   eval "ac_cv_header_$ac_safe=no"
11755 fi
11756 rm -f conftest*
11757 fi
11758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11759   echo "$ac_t""yes" 1>&6
11760     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11761   cat >> confdefs.h <<EOF
11762 #define $ac_tr_hdr 1
11763 EOF
11764  
11765 else
11766   echo "$ac_t""no" 1>&6
11767 fi
11768 done
11769
11770 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11771         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11772 echo "configure:11773: checking if Berkeley DB header compatibility" >&5
11773 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11774   echo $ac_n "(cached) $ac_c" 1>&6
11775 else
11776   
11777                 cat > conftest.$ac_ext <<EOF
11778 #line 11779 "configure"
11779 #include "confdefs.h"
11780
11781 #if HAVE_DB_185_H
11782 #       include <db_185.h>
11783 #else
11784 #       include <db.h>
11785 #endif
11786
11787  /* this check could be improved */
11788 #ifndef DB_VERSION_MAJOR
11789 #       define DB_VERSION_MAJOR 1
11790 #endif
11791
11792 #if DB_VERSION_MAJOR == 1 
11793         __db_version_1
11794 #endif
11795
11796 EOF
11797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11798   egrep "__db_version_1" >/dev/null 2>&1; then
11799   rm -rf conftest*
11800   ol_cv_header_db1=yes
11801 else
11802   rm -rf conftest*
11803   ol_cv_header_db1=no
11804 fi
11805 rm -f conftest*
11806
11807 fi
11808
11809 echo "$ac_t""$ol_cv_header_db1" 1>&6
11810
11811         if test ol_cv_header_db1=yes ; then
11812                 ol_cv_lib_db=no
11813 if test $ol_cv_lib_db = no ; then
11814         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11815 echo "configure:11816: checking for Berkeley DB link (default)" >&5
11816 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11817   echo $ac_n "(cached) $ac_c" 1>&6
11818 else
11819   
11820         ol_DB_LIB=
11821         ol_LIBS=$LIBS
11822         LIBS="$ol_DB_LIB $LIBS"
11823
11824         cat > conftest.$ac_ext <<EOF
11825 #line 11826 "configure"
11826 #include "confdefs.h"
11827
11828 #ifdef HAVE_DB_185_H
11829 # include <db_185.h>
11830 #else
11831 # include <db.h>
11832 #endif
11833
11834 #ifndef DB_VERSION_MAJOR
11835 # define DB_VERSION_MAJOR 1
11836 #endif
11837
11838 #ifndef NULL
11839 #define NULL ((void*)0)
11840 #endif
11841
11842 int main() {
11843
11844 #if DB_VERSION_MAJOR > 2
11845         db_env_create( NULL, 0 );
11846 #elif DB_VERSION_MAJOR > 1
11847         db_appexit( NULL );
11848 #else
11849         (void) dbopen( NULL, 0, 0, 0, NULL);
11850 #endif
11851
11852 ; return 0; }
11853 EOF
11854 if { (eval echo configure:11855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11855   rm -rf conftest*
11856   ol_cv_db_none=yes
11857 else
11858   echo "configure: failed program was:" >&5
11859   cat conftest.$ac_ext >&5
11860   rm -rf conftest*
11861   ol_cv_db_none=no
11862 fi
11863 rm -f conftest*
11864
11865         LIBS="$ol_LIBS"
11866
11867 fi
11868
11869 echo "$ac_t""$ol_cv_db_none" 1>&6
11870
11871         if test $ol_cv_db_none = yes ; then
11872                 ol_cv_lib_db=yes
11873         fi
11874 fi
11875
11876 if test $ol_cv_lib_db = no ; then
11877         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11878 echo "configure:11879: checking for Berkeley DB link (-ldb)" >&5
11879 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11880   echo $ac_n "(cached) $ac_c" 1>&6
11881 else
11882   
11883         ol_DB_LIB=-ldb
11884         ol_LIBS=$LIBS
11885         LIBS="$ol_DB_LIB $LIBS"
11886
11887         cat > conftest.$ac_ext <<EOF
11888 #line 11889 "configure"
11889 #include "confdefs.h"
11890
11891 #ifdef HAVE_DB_185_H
11892 # include <db_185.h>
11893 #else
11894 # include <db.h>
11895 #endif
11896
11897 #ifndef DB_VERSION_MAJOR
11898 # define DB_VERSION_MAJOR 1
11899 #endif
11900
11901 #ifndef NULL
11902 #define NULL ((void*)0)
11903 #endif
11904
11905 int main() {
11906
11907 #if DB_VERSION_MAJOR > 2
11908         db_env_create( NULL, 0 );
11909 #elif DB_VERSION_MAJOR > 1
11910         db_appexit( NULL );
11911 #else
11912         (void) dbopen( NULL, 0, 0, 0, NULL);
11913 #endif
11914
11915 ; return 0; }
11916 EOF
11917 if { (eval echo configure:11918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11918   rm -rf conftest*
11919   ol_cv_db_db=yes
11920 else
11921   echo "configure: failed program was:" >&5
11922   cat conftest.$ac_ext >&5
11923   rm -rf conftest*
11924   ol_cv_db_db=no
11925 fi
11926 rm -f conftest*
11927
11928         LIBS="$ol_LIBS"
11929
11930 fi
11931
11932 echo "$ac_t""$ol_cv_db_db" 1>&6
11933
11934         if test $ol_cv_db_db = yes ; then
11935                 ol_cv_lib_db=-ldb
11936         fi
11937 fi
11938
11939 if test $ol_cv_lib_db = no ; then
11940         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11941 echo "configure:11942: checking for Berkeley DB link (-ldb3)" >&5
11942 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11943   echo $ac_n "(cached) $ac_c" 1>&6
11944 else
11945   
11946         ol_DB_LIB=-ldb3
11947         ol_LIBS=$LIBS
11948         LIBS="$ol_DB_LIB $LIBS"
11949
11950         cat > conftest.$ac_ext <<EOF
11951 #line 11952 "configure"
11952 #include "confdefs.h"
11953
11954 #ifdef HAVE_DB_185_H
11955 # include <db_185.h>
11956 #else
11957 # include <db.h>
11958 #endif
11959
11960 #ifndef DB_VERSION_MAJOR
11961 # define DB_VERSION_MAJOR 1
11962 #endif
11963
11964 #ifndef NULL
11965 #define NULL ((void*)0)
11966 #endif
11967
11968 int main() {
11969
11970 #if DB_VERSION_MAJOR > 2
11971         db_env_create( NULL, 0 );
11972 #elif DB_VERSION_MAJOR > 1
11973         db_appexit( NULL );
11974 #else
11975         (void) dbopen( NULL, 0, 0, 0, NULL);
11976 #endif
11977
11978 ; return 0; }
11979 EOF
11980 if { (eval echo configure:11981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11981   rm -rf conftest*
11982   ol_cv_db_db3=yes
11983 else
11984   echo "configure: failed program was:" >&5
11985   cat conftest.$ac_ext >&5
11986   rm -rf conftest*
11987   ol_cv_db_db3=no
11988 fi
11989 rm -f conftest*
11990
11991         LIBS="$ol_LIBS"
11992
11993 fi
11994
11995 echo "$ac_t""$ol_cv_db_db3" 1>&6
11996
11997         if test $ol_cv_db_db3 = yes ; then
11998                 ol_cv_lib_db=-ldb3
11999         fi
12000 fi
12001
12002 if test $ol_cv_lib_db = no ; then
12003         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12004 echo "configure:12005: checking for Berkeley DB link (-ldb2)" >&5
12005 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12006   echo $ac_n "(cached) $ac_c" 1>&6
12007 else
12008   
12009         ol_DB_LIB=-ldb2
12010         ol_LIBS=$LIBS
12011         LIBS="$ol_DB_LIB $LIBS"
12012
12013         cat > conftest.$ac_ext <<EOF
12014 #line 12015 "configure"
12015 #include "confdefs.h"
12016
12017 #ifdef HAVE_DB_185_H
12018 # include <db_185.h>
12019 #else
12020 # include <db.h>
12021 #endif
12022
12023 #ifndef DB_VERSION_MAJOR
12024 # define DB_VERSION_MAJOR 1
12025 #endif
12026
12027 #ifndef NULL
12028 #define NULL ((void*)0)
12029 #endif
12030
12031 int main() {
12032
12033 #if DB_VERSION_MAJOR > 2
12034         db_env_create( NULL, 0 );
12035 #elif DB_VERSION_MAJOR > 1
12036         db_appexit( NULL );
12037 #else
12038         (void) dbopen( NULL, 0, 0, 0, NULL);
12039 #endif
12040
12041 ; return 0; }
12042 EOF
12043 if { (eval echo configure:12044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12044   rm -rf conftest*
12045   ol_cv_db_db2=yes
12046 else
12047   echo "configure: failed program was:" >&5
12048   cat conftest.$ac_ext >&5
12049   rm -rf conftest*
12050   ol_cv_db_db2=no
12051 fi
12052 rm -f conftest*
12053
12054         LIBS="$ol_LIBS"
12055
12056 fi
12057
12058 echo "$ac_t""$ol_cv_db_db2" 1>&6
12059
12060         if test $ol_cv_db_db2 = yes ; then
12061                 ol_cv_lib_db=-ldb2
12062         fi
12063 fi
12064
12065 if test $ol_cv_lib_db = no ; then
12066         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12067 echo "configure:12068: checking for Berkeley DB link (-ldb1)" >&5
12068 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12069   echo $ac_n "(cached) $ac_c" 1>&6
12070 else
12071   
12072         ol_DB_LIB=-ldb1
12073         ol_LIBS=$LIBS
12074         LIBS="$ol_DB_LIB $LIBS"
12075
12076         cat > conftest.$ac_ext <<EOF
12077 #line 12078 "configure"
12078 #include "confdefs.h"
12079
12080 #ifdef HAVE_DB_185_H
12081 # include <db_185.h>
12082 #else
12083 # include <db.h>
12084 #endif
12085
12086 #ifndef DB_VERSION_MAJOR
12087 # define DB_VERSION_MAJOR 1
12088 #endif
12089
12090 #ifndef NULL
12091 #define NULL ((void*)0)
12092 #endif
12093
12094 int main() {
12095
12096 #if DB_VERSION_MAJOR > 2
12097         db_env_create( NULL, 0 );
12098 #elif DB_VERSION_MAJOR > 1
12099         db_appexit( NULL );
12100 #else
12101         (void) dbopen( NULL, 0, 0, 0, NULL);
12102 #endif
12103
12104 ; return 0; }
12105 EOF
12106 if { (eval echo configure:12107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12107   rm -rf conftest*
12108   ol_cv_db_db1=yes
12109 else
12110   echo "configure: failed program was:" >&5
12111   cat conftest.$ac_ext >&5
12112   rm -rf conftest*
12113   ol_cv_db_db1=no
12114 fi
12115 rm -f conftest*
12116
12117         LIBS="$ol_LIBS"
12118
12119 fi
12120
12121 echo "$ac_t""$ol_cv_db_db1" 1>&6
12122
12123         if test $ol_cv_db_db1 = yes ; then
12124                 ol_cv_lib_db=-ldb1
12125         fi
12126 fi
12127
12128
12129                 if test "$ol_cv_lib_db" != no ; then
12130                         ol_cv_berkeley_db=yes
12131                 fi
12132         fi
12133 fi
12134
12135         else
12136                 ol_cv_berkeley_db=no
12137 for ac_hdr in db.h
12138 do
12139 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12140 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12141 echo "configure:12142: checking for $ac_hdr" >&5
12142 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12143   echo $ac_n "(cached) $ac_c" 1>&6
12144 else
12145   cat > conftest.$ac_ext <<EOF
12146 #line 12147 "configure"
12147 #include "confdefs.h"
12148 #include <$ac_hdr>
12149 EOF
12150 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12151 { (eval echo configure:12152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12152 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12153 if test -z "$ac_err"; then
12154   rm -rf conftest*
12155   eval "ac_cv_header_$ac_safe=yes"
12156 else
12157   echo "$ac_err" >&5
12158   echo "configure: failed program was:" >&5
12159   cat conftest.$ac_ext >&5
12160   rm -rf conftest*
12161   eval "ac_cv_header_$ac_safe=no"
12162 fi
12163 rm -f conftest*
12164 fi
12165 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12166   echo "$ac_t""yes" 1>&6
12167     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12168   cat >> confdefs.h <<EOF
12169 #define $ac_tr_hdr 1
12170 EOF
12171  
12172 else
12173   echo "$ac_t""no" 1>&6
12174 fi
12175 done
12176
12177 if test $ac_cv_header_db_h = yes; then
12178         ol_cv_lib_db=no
12179 if test $ol_cv_lib_db = no ; then
12180         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12181 echo "configure:12182: checking for Berkeley DB link (default)" >&5
12182 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12183   echo $ac_n "(cached) $ac_c" 1>&6
12184 else
12185   
12186         ol_DB_LIB=
12187         ol_LIBS=$LIBS
12188         LIBS="$ol_DB_LIB $LIBS"
12189
12190         cat > conftest.$ac_ext <<EOF
12191 #line 12192 "configure"
12192 #include "confdefs.h"
12193
12194 #ifdef HAVE_DB_185_H
12195 # include <db_185.h>
12196 #else
12197 # include <db.h>
12198 #endif
12199
12200 #ifndef DB_VERSION_MAJOR
12201 # define DB_VERSION_MAJOR 1
12202 #endif
12203
12204 #ifndef NULL
12205 #define NULL ((void*)0)
12206 #endif
12207
12208 int main() {
12209
12210 #if DB_VERSION_MAJOR > 2
12211         db_env_create( NULL, 0 );
12212 #elif DB_VERSION_MAJOR > 1
12213         db_appexit( NULL );
12214 #else
12215         (void) dbopen( NULL, 0, 0, 0, NULL);
12216 #endif
12217
12218 ; return 0; }
12219 EOF
12220 if { (eval echo configure:12221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12221   rm -rf conftest*
12222   ol_cv_db_none=yes
12223 else
12224   echo "configure: failed program was:" >&5
12225   cat conftest.$ac_ext >&5
12226   rm -rf conftest*
12227   ol_cv_db_none=no
12228 fi
12229 rm -f conftest*
12230
12231         LIBS="$ol_LIBS"
12232
12233 fi
12234
12235 echo "$ac_t""$ol_cv_db_none" 1>&6
12236
12237         if test $ol_cv_db_none = yes ; then
12238                 ol_cv_lib_db=yes
12239         fi
12240 fi
12241
12242 if test $ol_cv_lib_db = no ; then
12243         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12244 echo "configure:12245: checking for Berkeley DB link (-ldb)" >&5
12245 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12246   echo $ac_n "(cached) $ac_c" 1>&6
12247 else
12248   
12249         ol_DB_LIB=-ldb
12250         ol_LIBS=$LIBS
12251         LIBS="$ol_DB_LIB $LIBS"
12252
12253         cat > conftest.$ac_ext <<EOF
12254 #line 12255 "configure"
12255 #include "confdefs.h"
12256
12257 #ifdef HAVE_DB_185_H
12258 # include <db_185.h>
12259 #else
12260 # include <db.h>
12261 #endif
12262
12263 #ifndef DB_VERSION_MAJOR
12264 # define DB_VERSION_MAJOR 1
12265 #endif
12266
12267 #ifndef NULL
12268 #define NULL ((void*)0)
12269 #endif
12270
12271 int main() {
12272
12273 #if DB_VERSION_MAJOR > 2
12274         db_env_create( NULL, 0 );
12275 #elif DB_VERSION_MAJOR > 1
12276         db_appexit( NULL );
12277 #else
12278         (void) dbopen( NULL, 0, 0, 0, NULL);
12279 #endif
12280
12281 ; return 0; }
12282 EOF
12283 if { (eval echo configure:12284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12284   rm -rf conftest*
12285   ol_cv_db_db=yes
12286 else
12287   echo "configure: failed program was:" >&5
12288   cat conftest.$ac_ext >&5
12289   rm -rf conftest*
12290   ol_cv_db_db=no
12291 fi
12292 rm -f conftest*
12293
12294         LIBS="$ol_LIBS"
12295
12296 fi
12297
12298 echo "$ac_t""$ol_cv_db_db" 1>&6
12299
12300         if test $ol_cv_db_db = yes ; then
12301                 ol_cv_lib_db=-ldb
12302         fi
12303 fi
12304
12305 if test $ol_cv_lib_db = no ; then
12306         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12307 echo "configure:12308: checking for Berkeley DB link (-ldb3)" >&5
12308 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12309   echo $ac_n "(cached) $ac_c" 1>&6
12310 else
12311   
12312         ol_DB_LIB=-ldb3
12313         ol_LIBS=$LIBS
12314         LIBS="$ol_DB_LIB $LIBS"
12315
12316         cat > conftest.$ac_ext <<EOF
12317 #line 12318 "configure"
12318 #include "confdefs.h"
12319
12320 #ifdef HAVE_DB_185_H
12321 # include <db_185.h>
12322 #else
12323 # include <db.h>
12324 #endif
12325
12326 #ifndef DB_VERSION_MAJOR
12327 # define DB_VERSION_MAJOR 1
12328 #endif
12329
12330 #ifndef NULL
12331 #define NULL ((void*)0)
12332 #endif
12333
12334 int main() {
12335
12336 #if DB_VERSION_MAJOR > 2
12337         db_env_create( NULL, 0 );
12338 #elif DB_VERSION_MAJOR > 1
12339         db_appexit( NULL );
12340 #else
12341         (void) dbopen( NULL, 0, 0, 0, NULL);
12342 #endif
12343
12344 ; return 0; }
12345 EOF
12346 if { (eval echo configure:12347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12347   rm -rf conftest*
12348   ol_cv_db_db3=yes
12349 else
12350   echo "configure: failed program was:" >&5
12351   cat conftest.$ac_ext >&5
12352   rm -rf conftest*
12353   ol_cv_db_db3=no
12354 fi
12355 rm -f conftest*
12356
12357         LIBS="$ol_LIBS"
12358
12359 fi
12360
12361 echo "$ac_t""$ol_cv_db_db3" 1>&6
12362
12363         if test $ol_cv_db_db3 = yes ; then
12364                 ol_cv_lib_db=-ldb3
12365         fi
12366 fi
12367
12368 if test $ol_cv_lib_db = no ; then
12369         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12370 echo "configure:12371: checking for Berkeley DB link (-ldb2)" >&5
12371 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12372   echo $ac_n "(cached) $ac_c" 1>&6
12373 else
12374   
12375         ol_DB_LIB=-ldb2
12376         ol_LIBS=$LIBS
12377         LIBS="$ol_DB_LIB $LIBS"
12378
12379         cat > conftest.$ac_ext <<EOF
12380 #line 12381 "configure"
12381 #include "confdefs.h"
12382
12383 #ifdef HAVE_DB_185_H
12384 # include <db_185.h>
12385 #else
12386 # include <db.h>
12387 #endif
12388
12389 #ifndef DB_VERSION_MAJOR
12390 # define DB_VERSION_MAJOR 1
12391 #endif
12392
12393 #ifndef NULL
12394 #define NULL ((void*)0)
12395 #endif
12396
12397 int main() {
12398
12399 #if DB_VERSION_MAJOR > 2
12400         db_env_create( NULL, 0 );
12401 #elif DB_VERSION_MAJOR > 1
12402         db_appexit( NULL );
12403 #else
12404         (void) dbopen( NULL, 0, 0, 0, NULL);
12405 #endif
12406
12407 ; return 0; }
12408 EOF
12409 if { (eval echo configure:12410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12410   rm -rf conftest*
12411   ol_cv_db_db2=yes
12412 else
12413   echo "configure: failed program was:" >&5
12414   cat conftest.$ac_ext >&5
12415   rm -rf conftest*
12416   ol_cv_db_db2=no
12417 fi
12418 rm -f conftest*
12419
12420         LIBS="$ol_LIBS"
12421
12422 fi
12423
12424 echo "$ac_t""$ol_cv_db_db2" 1>&6
12425
12426         if test $ol_cv_db_db2 = yes ; then
12427                 ol_cv_lib_db=-ldb2
12428         fi
12429 fi
12430
12431 if test $ol_cv_lib_db = no ; then
12432         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12433 echo "configure:12434: checking for Berkeley DB link (-ldb1)" >&5
12434 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12435   echo $ac_n "(cached) $ac_c" 1>&6
12436 else
12437   
12438         ol_DB_LIB=-ldb1
12439         ol_LIBS=$LIBS
12440         LIBS="$ol_DB_LIB $LIBS"
12441
12442         cat > conftest.$ac_ext <<EOF
12443 #line 12444 "configure"
12444 #include "confdefs.h"
12445
12446 #ifdef HAVE_DB_185_H
12447 # include <db_185.h>
12448 #else
12449 # include <db.h>
12450 #endif
12451
12452 #ifndef DB_VERSION_MAJOR
12453 # define DB_VERSION_MAJOR 1
12454 #endif
12455
12456 #ifndef NULL
12457 #define NULL ((void*)0)
12458 #endif
12459
12460 int main() {
12461
12462 #if DB_VERSION_MAJOR > 2
12463         db_env_create( NULL, 0 );
12464 #elif DB_VERSION_MAJOR > 1
12465         db_appexit( NULL );
12466 #else
12467         (void) dbopen( NULL, 0, 0, 0, NULL);
12468 #endif
12469
12470 ; return 0; }
12471 EOF
12472 if { (eval echo configure:12473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12473   rm -rf conftest*
12474   ol_cv_db_db1=yes
12475 else
12476   echo "configure: failed program was:" >&5
12477   cat conftest.$ac_ext >&5
12478   rm -rf conftest*
12479   ol_cv_db_db1=no
12480 fi
12481 rm -f conftest*
12482
12483         LIBS="$ol_LIBS"
12484
12485 fi
12486
12487 echo "$ac_t""$ol_cv_db_db1" 1>&6
12488
12489         if test $ol_cv_db_db1 = yes ; then
12490                 ol_cv_lib_db=-ldb1
12491         fi
12492 fi
12493
12494
12495         if test "$ol_cv_lib_db" != no ; then
12496                 ol_cv_berkeley_db=yes
12497                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12498 echo "configure:12499: checking for Berkeley DB thread support" >&5
12499 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12500   echo $ac_n "(cached) $ac_c" 1>&6
12501 else
12502   
12503         ol_LIBS="$LIBS"
12504         if test $ol_cv_lib_db != yes ; then
12505                 LIBS="$ol_cv_lib_db"
12506         fi
12507
12508         if test "$cross_compiling" = yes; then
12509   ol_cv_berkeley_db_thread=cross
12510 else
12511   cat > conftest.$ac_ext <<EOF
12512 #line 12513 "configure"
12513 #include "confdefs.h"
12514
12515 #ifdef HAVE_DB_185_H
12516         choke me;
12517 #else
12518 #include <db.h>
12519 #endif
12520 #ifndef NULL
12521 #define NULL ((void *)0)
12522 #endif
12523 main()
12524 {
12525         int rc;
12526         u_int32_t flags = DB_CREATE | DB_THREAD;
12527
12528
12529 #if DB_VERSION_MAJOR > 2
12530         DB_ENV *env = NULL;
12531
12532         rc = db_env_create( &env, 0 );
12533
12534         if( rc == 0 ) {
12535                 rc = env->open( env, NULL, NULL, flags, 0 );
12536         }
12537
12538 #else
12539         DB_ENV env;
12540         memset( &env, '\0', sizeof(env) );
12541
12542         rc = db_appinit( NULL, NULL, &env, flags );
12543
12544         if( rc == 0 ) {
12545                 db_appexit( &env );
12546         }
12547 #endif
12548
12549         return rc;
12550 }
12551 EOF
12552 if { (eval echo configure:12553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12553 then
12554   ol_cv_berkeley_db_thread=yes
12555 else
12556   echo "configure: failed program was:" >&5
12557   cat conftest.$ac_ext >&5
12558   rm -fr conftest*
12559   ol_cv_berkeley_db_thread=no
12560 fi
12561 rm -fr conftest*
12562 fi
12563
12564
12565         LIBS="$ol_LIBS"
12566
12567         if test $ol_cv_berkeley_db_thread != no ; then
12568                 cat >> confdefs.h <<\EOF
12569 #define HAVE_BERKELEY_DB_THREAD 1
12570 EOF
12571
12572         fi
12573
12574 fi
12575
12576 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12577         fi
12578 fi
12579
12580         fi
12581
12582         if test $ol_cv_berkeley_db != no ; then
12583                 cat >> confdefs.h <<\EOF
12584 #define HAVE_BERKELEY_DB 1
12585 EOF
12586
12587
12588                 ol_link_ldbm=berkeley
12589                 ol_with_ldbm_api=db
12590
12591                 if test $ol_with_ldbm_type = hash ; then
12592                         cat >> confdefs.h <<\EOF
12593 #define LDBM_USE_DBHASH 1
12594 EOF
12595
12596                 else
12597                         cat >> confdefs.h <<\EOF
12598 #define LDBM_USE_DBBTREE 1
12599 EOF
12600
12601                 fi
12602
12603                                                 if test $ol_cv_lib_db != yes ; then
12604                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12605                 fi
12606         fi
12607 fi
12608
12609 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12610         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12611         ol_with_ldbm_api=none
12612 fi
12613
12614 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12615         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12616 echo "configure:12617: checking for MDBM library" >&5
12617 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12618   echo $ac_n "(cached) $ac_c" 1>&6
12619 else
12620         ol_LIBS="$LIBS"
12621         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12622 echo "configure:12623: checking for mdbm_set_chain" >&5
12623 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12624   echo $ac_n "(cached) $ac_c" 1>&6
12625 else
12626   cat > conftest.$ac_ext <<EOF
12627 #line 12628 "configure"
12628 #include "confdefs.h"
12629 /* System header to define __stub macros and hopefully few prototypes,
12630     which can conflict with char mdbm_set_chain(); below.  */
12631 #include <assert.h>
12632 /* Override any gcc2 internal prototype to avoid an error.  */
12633 /* We use char because int might match the return type of a gcc2
12634     builtin and then its argument prototype would still apply.  */
12635 char mdbm_set_chain();
12636 char (*f)();
12637
12638 int main() {
12639
12640 /* The GNU C library defines this for functions which it implements
12641     to always fail with ENOSYS.  Some functions are actually named
12642     something starting with __ and the normal name is an alias.  */
12643 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12644 choke me
12645 #else
12646 f = mdbm_set_chain;
12647 #endif
12648
12649 ; return 0; }
12650 EOF
12651 if { (eval echo configure:12652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12652   rm -rf conftest*
12653   eval "ac_cv_func_mdbm_set_chain=yes"
12654 else
12655   echo "configure: failed program was:" >&5
12656   cat conftest.$ac_ext >&5
12657   rm -rf conftest*
12658   eval "ac_cv_func_mdbm_set_chain=no"
12659 fi
12660 rm -f conftest*
12661 fi
12662
12663 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12664   echo "$ac_t""yes" 1>&6
12665   ol_cv_lib_mdbm=yes
12666 else
12667   echo "$ac_t""no" 1>&6
12668
12669                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12670 echo "configure:12671: checking for mdbm_set_chain in -lmdbm" >&5
12671 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12672 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12673   echo $ac_n "(cached) $ac_c" 1>&6
12674 else
12675   ac_save_LIBS="$LIBS"
12676 LIBS="-lmdbm  $LIBS"
12677 cat > conftest.$ac_ext <<EOF
12678 #line 12679 "configure"
12679 #include "confdefs.h"
12680 /* Override any gcc2 internal prototype to avoid an error.  */
12681 /* We use char because int might match the return type of a gcc2
12682     builtin and then its argument prototype would still apply.  */
12683 char mdbm_set_chain();
12684
12685 int main() {
12686 mdbm_set_chain()
12687 ; return 0; }
12688 EOF
12689 if { (eval echo configure:12690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12690   rm -rf conftest*
12691   eval "ac_cv_lib_$ac_lib_var=yes"
12692 else
12693   echo "configure: failed program was:" >&5
12694   cat conftest.$ac_ext >&5
12695   rm -rf conftest*
12696   eval "ac_cv_lib_$ac_lib_var=no"
12697 fi
12698 rm -f conftest*
12699 LIBS="$ac_save_LIBS"
12700
12701 fi
12702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12703   echo "$ac_t""yes" 1>&6
12704   ol_cv_lib_mdbm=-lmdbm
12705 else
12706   echo "$ac_t""no" 1>&6
12707 ol_cv_lib_mdbm=no
12708 fi
12709
12710         
12711 fi
12712
12713         LIBS="$ol_LIBS"
12714
12715 fi
12716
12717 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12718
12719
12720  for ac_hdr in mdbm.h
12721 do
12722 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12723 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12724 echo "configure:12725: checking for $ac_hdr" >&5
12725 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12726   echo $ac_n "(cached) $ac_c" 1>&6
12727 else
12728   cat > conftest.$ac_ext <<EOF
12729 #line 12730 "configure"
12730 #include "confdefs.h"
12731 #include <$ac_hdr>
12732 EOF
12733 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12734 { (eval echo configure:12735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12735 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12736 if test -z "$ac_err"; then
12737   rm -rf conftest*
12738   eval "ac_cv_header_$ac_safe=yes"
12739 else
12740   echo "$ac_err" >&5
12741   echo "configure: failed program was:" >&5
12742   cat conftest.$ac_ext >&5
12743   rm -rf conftest*
12744   eval "ac_cv_header_$ac_safe=no"
12745 fi
12746 rm -f conftest*
12747 fi
12748 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12749   echo "$ac_t""yes" 1>&6
12750     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12751   cat >> confdefs.h <<EOF
12752 #define $ac_tr_hdr 1
12753 EOF
12754  
12755 else
12756   echo "$ac_t""no" 1>&6
12757 fi
12758 done
12759
12760  echo $ac_n "checking for db""... $ac_c" 1>&6
12761 echo "configure:12762: checking for db" >&5
12762 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12763   echo $ac_n "(cached) $ac_c" 1>&6
12764 else
12765   
12766         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12767                 ol_cv_mdbm=no
12768         else
12769                 ol_cv_mdbm=yes
12770         fi
12771
12772 fi
12773
12774 echo "$ac_t""$ol_cv_mdbm" 1>&6
12775  if test $ol_cv_mdbm = yes ; then
12776         cat >> confdefs.h <<\EOF
12777 #define HAVE_MDBM 1
12778 EOF
12779
12780  fi
12781
12782
12783         if test $ol_cv_mdbm = yes ; then
12784                 ol_link_ldbm=mdbm
12785                 ol_with_ldbm_api=mdbm
12786                 if test $ol_cv_lib_mdbm != yes ; then
12787                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12788                 fi
12789         fi
12790 fi
12791
12792 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12793         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12794 echo "configure:12795: checking for GDBM library" >&5
12795 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12796   echo $ac_n "(cached) $ac_c" 1>&6
12797 else
12798         ol_LIBS="$LIBS"
12799         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12800 echo "configure:12801: checking for gdbm_open" >&5
12801 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12802   echo $ac_n "(cached) $ac_c" 1>&6
12803 else
12804   cat > conftest.$ac_ext <<EOF
12805 #line 12806 "configure"
12806 #include "confdefs.h"
12807 /* System header to define __stub macros and hopefully few prototypes,
12808     which can conflict with char gdbm_open(); below.  */
12809 #include <assert.h>
12810 /* Override any gcc2 internal prototype to avoid an error.  */
12811 /* We use char because int might match the return type of a gcc2
12812     builtin and then its argument prototype would still apply.  */
12813 char gdbm_open();
12814 char (*f)();
12815
12816 int main() {
12817
12818 /* The GNU C library defines this for functions which it implements
12819     to always fail with ENOSYS.  Some functions are actually named
12820     something starting with __ and the normal name is an alias.  */
12821 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12822 choke me
12823 #else
12824 f = gdbm_open;
12825 #endif
12826
12827 ; return 0; }
12828 EOF
12829 if { (eval echo configure:12830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12830   rm -rf conftest*
12831   eval "ac_cv_func_gdbm_open=yes"
12832 else
12833   echo "configure: failed program was:" >&5
12834   cat conftest.$ac_ext >&5
12835   rm -rf conftest*
12836   eval "ac_cv_func_gdbm_open=no"
12837 fi
12838 rm -f conftest*
12839 fi
12840
12841 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12842   echo "$ac_t""yes" 1>&6
12843   ol_cv_lib_gdbm=yes
12844 else
12845   echo "$ac_t""no" 1>&6
12846
12847                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12848 echo "configure:12849: checking for gdbm_open in -lgdbm" >&5
12849 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12850 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12851   echo $ac_n "(cached) $ac_c" 1>&6
12852 else
12853   ac_save_LIBS="$LIBS"
12854 LIBS="-lgdbm  $LIBS"
12855 cat > conftest.$ac_ext <<EOF
12856 #line 12857 "configure"
12857 #include "confdefs.h"
12858 /* Override any gcc2 internal prototype to avoid an error.  */
12859 /* We use char because int might match the return type of a gcc2
12860     builtin and then its argument prototype would still apply.  */
12861 char gdbm_open();
12862
12863 int main() {
12864 gdbm_open()
12865 ; return 0; }
12866 EOF
12867 if { (eval echo configure:12868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12868   rm -rf conftest*
12869   eval "ac_cv_lib_$ac_lib_var=yes"
12870 else
12871   echo "configure: failed program was:" >&5
12872   cat conftest.$ac_ext >&5
12873   rm -rf conftest*
12874   eval "ac_cv_lib_$ac_lib_var=no"
12875 fi
12876 rm -f conftest*
12877 LIBS="$ac_save_LIBS"
12878
12879 fi
12880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12881   echo "$ac_t""yes" 1>&6
12882   ol_cv_lib_gdbm=-lgdbm
12883 else
12884   echo "$ac_t""no" 1>&6
12885 ol_cv_lib_gdbm=no
12886 fi
12887
12888         
12889 fi
12890
12891         LIBS="$ol_LIBS"
12892
12893 fi
12894
12895 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12896
12897
12898  for ac_hdr in gdbm.h
12899 do
12900 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12901 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12902 echo "configure:12903: checking for $ac_hdr" >&5
12903 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12904   echo $ac_n "(cached) $ac_c" 1>&6
12905 else
12906   cat > conftest.$ac_ext <<EOF
12907 #line 12908 "configure"
12908 #include "confdefs.h"
12909 #include <$ac_hdr>
12910 EOF
12911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12912 { (eval echo configure:12913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12914 if test -z "$ac_err"; then
12915   rm -rf conftest*
12916   eval "ac_cv_header_$ac_safe=yes"
12917 else
12918   echo "$ac_err" >&5
12919   echo "configure: failed program was:" >&5
12920   cat conftest.$ac_ext >&5
12921   rm -rf conftest*
12922   eval "ac_cv_header_$ac_safe=no"
12923 fi
12924 rm -f conftest*
12925 fi
12926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12927   echo "$ac_t""yes" 1>&6
12928     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12929   cat >> confdefs.h <<EOF
12930 #define $ac_tr_hdr 1
12931 EOF
12932  
12933 else
12934   echo "$ac_t""no" 1>&6
12935 fi
12936 done
12937
12938  echo $ac_n "checking for db""... $ac_c" 1>&6
12939 echo "configure:12940: checking for db" >&5
12940 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12941   echo $ac_n "(cached) $ac_c" 1>&6
12942 else
12943   
12944         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12945                 ol_cv_gdbm=no
12946         else
12947                 ol_cv_gdbm=yes
12948         fi
12949
12950 fi
12951
12952 echo "$ac_t""$ol_cv_gdbm" 1>&6
12953  if test $ol_cv_gdbm = yes ; then
12954         cat >> confdefs.h <<\EOF
12955 #define HAVE_GDBM 1
12956 EOF
12957
12958  fi
12959
12960
12961         if test $ol_cv_gdbm = yes ; then
12962                 ol_link_ldbm=gdbm
12963                 ol_with_ldbm_api=gdbm
12964
12965                 if test $ol_cv_lib_gdbm != yes ; then
12966                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12967                 fi
12968         fi
12969 fi
12970
12971 if test $ol_with_ldbm_api = ndbm ; then
12972         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12973 echo "configure:12974: checking for NDBM library" >&5
12974 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12975   echo $ac_n "(cached) $ac_c" 1>&6
12976 else
12977         ol_LIBS="$LIBS"
12978         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12979 echo "configure:12980: checking for dbm_open" >&5
12980 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12981   echo $ac_n "(cached) $ac_c" 1>&6
12982 else
12983   cat > conftest.$ac_ext <<EOF
12984 #line 12985 "configure"
12985 #include "confdefs.h"
12986 /* System header to define __stub macros and hopefully few prototypes,
12987     which can conflict with char dbm_open(); below.  */
12988 #include <assert.h>
12989 /* Override any gcc2 internal prototype to avoid an error.  */
12990 /* We use char because int might match the return type of a gcc2
12991     builtin and then its argument prototype would still apply.  */
12992 char dbm_open();
12993 char (*f)();
12994
12995 int main() {
12996
12997 /* The GNU C library defines this for functions which it implements
12998     to always fail with ENOSYS.  Some functions are actually named
12999     something starting with __ and the normal name is an alias.  */
13000 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13001 choke me
13002 #else
13003 f = dbm_open;
13004 #endif
13005
13006 ; return 0; }
13007 EOF
13008 if { (eval echo configure:13009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13009   rm -rf conftest*
13010   eval "ac_cv_func_dbm_open=yes"
13011 else
13012   echo "configure: failed program was:" >&5
13013   cat conftest.$ac_ext >&5
13014   rm -rf conftest*
13015   eval "ac_cv_func_dbm_open=no"
13016 fi
13017 rm -f conftest*
13018 fi
13019
13020 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13021   echo "$ac_t""yes" 1>&6
13022   ol_cv_lib_ndbm=yes
13023 else
13024   echo "$ac_t""no" 1>&6
13025
13026                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
13027 echo "configure:13028: checking for dbm_open in -lndbm" >&5
13028 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13029 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13030   echo $ac_n "(cached) $ac_c" 1>&6
13031 else
13032   ac_save_LIBS="$LIBS"
13033 LIBS="-lndbm  $LIBS"
13034 cat > conftest.$ac_ext <<EOF
13035 #line 13036 "configure"
13036 #include "confdefs.h"
13037 /* Override any gcc2 internal prototype to avoid an error.  */
13038 /* We use char because int might match the return type of a gcc2
13039     builtin and then its argument prototype would still apply.  */
13040 char dbm_open();
13041
13042 int main() {
13043 dbm_open()
13044 ; return 0; }
13045 EOF
13046 if { (eval echo configure:13047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13047   rm -rf conftest*
13048   eval "ac_cv_lib_$ac_lib_var=yes"
13049 else
13050   echo "configure: failed program was:" >&5
13051   cat conftest.$ac_ext >&5
13052   rm -rf conftest*
13053   eval "ac_cv_lib_$ac_lib_var=no"
13054 fi
13055 rm -f conftest*
13056 LIBS="$ac_save_LIBS"
13057
13058 fi
13059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13060   echo "$ac_t""yes" 1>&6
13061   ol_cv_lib_ndbm=-lndbm
13062 else
13063   echo "$ac_t""no" 1>&6
13064
13065                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13066 echo "configure:13067: checking for dbm_open in -ldbm" >&5
13067 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13068 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13069   echo $ac_n "(cached) $ac_c" 1>&6
13070 else
13071   ac_save_LIBS="$LIBS"
13072 LIBS="-ldbm  $LIBS"
13073 cat > conftest.$ac_ext <<EOF
13074 #line 13075 "configure"
13075 #include "confdefs.h"
13076 /* Override any gcc2 internal prototype to avoid an error.  */
13077 /* We use char because int might match the return type of a gcc2
13078     builtin and then its argument prototype would still apply.  */
13079 char dbm_open();
13080
13081 int main() {
13082 dbm_open()
13083 ; return 0; }
13084 EOF
13085 if { (eval echo configure:13086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13086   rm -rf conftest*
13087   eval "ac_cv_lib_$ac_lib_var=yes"
13088 else
13089   echo "configure: failed program was:" >&5
13090   cat conftest.$ac_ext >&5
13091   rm -rf conftest*
13092   eval "ac_cv_lib_$ac_lib_var=no"
13093 fi
13094 rm -f conftest*
13095 LIBS="$ac_save_LIBS"
13096
13097 fi
13098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13099   echo "$ac_t""yes" 1>&6
13100   ol_cv_lib_ndbm=-ldbm
13101 else
13102   echo "$ac_t""no" 1>&6
13103 ol_cv_lib_ndbm=no
13104 fi
13105                 
13106 fi
13107
13108         
13109 fi
13110
13111         LIBS="$ol_LIBS"
13112
13113 fi
13114
13115 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
13116
13117
13118  for ac_hdr in ndbm.h
13119 do
13120 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13121 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13122 echo "configure:13123: checking for $ac_hdr" >&5
13123 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13124   echo $ac_n "(cached) $ac_c" 1>&6
13125 else
13126   cat > conftest.$ac_ext <<EOF
13127 #line 13128 "configure"
13128 #include "confdefs.h"
13129 #include <$ac_hdr>
13130 EOF
13131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13132 { (eval echo configure:13133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13134 if test -z "$ac_err"; then
13135   rm -rf conftest*
13136   eval "ac_cv_header_$ac_safe=yes"
13137 else
13138   echo "$ac_err" >&5
13139   echo "configure: failed program was:" >&5
13140   cat conftest.$ac_ext >&5
13141   rm -rf conftest*
13142   eval "ac_cv_header_$ac_safe=no"
13143 fi
13144 rm -f conftest*
13145 fi
13146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13147   echo "$ac_t""yes" 1>&6
13148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13149   cat >> confdefs.h <<EOF
13150 #define $ac_tr_hdr 1
13151 EOF
13152  
13153 else
13154   echo "$ac_t""no" 1>&6
13155 fi
13156 done
13157
13158  echo $ac_n "checking for db""... $ac_c" 1>&6
13159 echo "configure:13160: checking for db" >&5
13160 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13161   echo $ac_n "(cached) $ac_c" 1>&6
13162 else
13163   
13164         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13165                 ol_cv_ndbm=no
13166         else
13167                 ol_cv_ndbm=yes
13168         fi
13169
13170 fi
13171
13172 echo "$ac_t""$ol_cv_ndbm" 1>&6
13173  if test $ol_cv_ndbm = yes ; then
13174         cat >> confdefs.h <<\EOF
13175 #define HAVE_NDBM 1
13176 EOF
13177
13178  fi
13179
13180
13181         if test $ol_cv_ndbm = yes ; then
13182                 ol_link_ldbm=ndbm
13183                 ol_with_ldbm_api=ndbm
13184
13185                 if test $ol_cv_lib_ndbm != yes ; then
13186                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13187                 fi
13188         fi
13189 fi
13190
13191 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13192         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13193         if test $ol_enable_ldbm = yes ; then
13194                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13195         fi
13196
13197         echo "configure: warning: disabling LDBM" 1>&2
13198         ol_enable_ldbm=no
13199 fi
13200
13201 ol_link_bdb2=no
13202 if test $ol_enable_bdb2 != no ; then
13203         if test $ol_enable_bdb2 = yes -a $ol_link_ldbm != berkeley ; then
13204                 { echo "configure: error: BDB2 requires LDBM BerkeleyDB 2" 1>&2; exit 1; }
13205         elif test $ol_link_ldbm = berkeley ; then
13206                 ol_link_bdb2=$ol_link_ldbm
13207         fi
13208 fi
13209
13210 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13211         LINK_BINS_DYNAMIC="yes"
13212 else
13213         LINK_BINS_DYNAMIC="no"
13214 fi
13215
13216 if test $ol_enable_wrappers != no ; then
13217         for ac_hdr in tcpd.h
13218 do
13219 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13220 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13221 echo "configure:13222: checking for $ac_hdr" >&5
13222 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13223   echo $ac_n "(cached) $ac_c" 1>&6
13224 else
13225   cat > conftest.$ac_ext <<EOF
13226 #line 13227 "configure"
13227 #include "confdefs.h"
13228 #include <$ac_hdr>
13229 EOF
13230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13231 { (eval echo configure:13232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13233 if test -z "$ac_err"; then
13234   rm -rf conftest*
13235   eval "ac_cv_header_$ac_safe=yes"
13236 else
13237   echo "$ac_err" >&5
13238   echo "configure: failed program was:" >&5
13239   cat conftest.$ac_ext >&5
13240   rm -rf conftest*
13241   eval "ac_cv_header_$ac_safe=no"
13242 fi
13243 rm -f conftest*
13244 fi
13245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13246   echo "$ac_t""yes" 1>&6
13247     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13248   cat >> confdefs.h <<EOF
13249 #define $ac_tr_hdr 1
13250 EOF
13251  
13252 else
13253   echo "$ac_t""no" 1>&6
13254 fi
13255 done
13256
13257
13258         if test $ac_cv_header_tcpd_h != yes ; then
13259                 have_wrappers=no
13260         else
13261                 cat > conftest.$ac_ext <<EOF
13262 #line 13263 "configure"
13263 #include "confdefs.h"
13264
13265 int allow_severity = 0;
13266 int deny_severity  = 0;
13267                 
13268 int main() {
13269 hosts_access()
13270 ; return 0; }
13271 EOF
13272 if { (eval echo configure:13273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13273   rm -rf conftest*
13274   have_wrappers=yes
13275 else
13276   echo "configure: failed program was:" >&5
13277   cat conftest.$ac_ext >&5
13278   rm -rf conftest*
13279   have_wrappers=no
13280 fi
13281 rm -f conftest*
13282         fi
13283
13284         if test $have_wrappers = yes ; then
13285                 cat >> confdefs.h <<\EOF
13286 #define HAVE_TCPD 1
13287 EOF
13288
13289                 WRAP_LIBS="-lwrap"
13290
13291                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13292 echo "configure:13293: checking for main in -lnsl" >&5
13293 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13294 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13295   echo $ac_n "(cached) $ac_c" 1>&6
13296 else
13297   ac_save_LIBS="$LIBS"
13298 LIBS="-lnsl  $LIBS"
13299 cat > conftest.$ac_ext <<EOF
13300 #line 13301 "configure"
13301 #include "confdefs.h"
13302
13303 int main() {
13304 main()
13305 ; return 0; }
13306 EOF
13307 if { (eval echo configure:13308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13308   rm -rf conftest*
13309   eval "ac_cv_lib_$ac_lib_var=yes"
13310 else
13311   echo "configure: failed program was:" >&5
13312   cat conftest.$ac_ext >&5
13313   rm -rf conftest*
13314   eval "ac_cv_lib_$ac_lib_var=no"
13315 fi
13316 rm -f conftest*
13317 LIBS="$ac_save_LIBS"
13318
13319 fi
13320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13321   echo "$ac_t""yes" 1>&6
13322     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13323     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13324   cat >> confdefs.h <<EOF
13325 #define $ac_tr_lib 1
13326 EOF
13327
13328   LIBS="-lnsl $LIBS"
13329
13330 else
13331   echo "$ac_t""no" 1>&6
13332 fi
13333
13334         else
13335                 echo "configure: warning: could not find -lwrap" 1>&2
13336                 if test $ol_enable_wrappers = yes ; then
13337                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13338                 fi
13339
13340                 echo "configure: warning: disabling wrappers support" 1>&2
13341                 ol_enable_wrappers=no
13342                 WRAP_LIBS=""
13343         fi
13344 fi
13345
13346 if test $ol_enable_syslog != no ; then
13347         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13348 echo "configure:13349: checking for openlog" >&5
13349 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13350   echo $ac_n "(cached) $ac_c" 1>&6
13351 else
13352   cat > conftest.$ac_ext <<EOF
13353 #line 13354 "configure"
13354 #include "confdefs.h"
13355 /* System header to define __stub macros and hopefully few prototypes,
13356     which can conflict with char openlog(); below.  */
13357 #include <assert.h>
13358 /* Override any gcc2 internal prototype to avoid an error.  */
13359 /* We use char because int might match the return type of a gcc2
13360     builtin and then its argument prototype would still apply.  */
13361 char openlog();
13362 char (*f)();
13363
13364 int main() {
13365
13366 /* The GNU C library defines this for functions which it implements
13367     to always fail with ENOSYS.  Some functions are actually named
13368     something starting with __ and the normal name is an alias.  */
13369 #if defined (__stub_openlog) || defined (__stub___openlog)
13370 choke me
13371 #else
13372 f = openlog;
13373 #endif
13374
13375 ; return 0; }
13376 EOF
13377 if { (eval echo configure:13378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13378   rm -rf conftest*
13379   eval "ac_cv_func_openlog=yes"
13380 else
13381   echo "configure: failed program was:" >&5
13382   cat conftest.$ac_ext >&5
13383   rm -rf conftest*
13384   eval "ac_cv_func_openlog=no"
13385 fi
13386 rm -f conftest*
13387 fi
13388
13389 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13390   echo "$ac_t""yes" 1>&6
13391   :
13392 else
13393   echo "$ac_t""no" 1>&6
13394 fi
13395
13396         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13397                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13398         fi
13399         ol_enable_syslog=$ac_cv_func_openlog
13400 fi
13401
13402 if test $ol_enable_dmalloc != no ; then
13403         for ac_hdr in dmalloc.h
13404 do
13405 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13406 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13407 echo "configure:13408: checking for $ac_hdr" >&5
13408 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13409   echo $ac_n "(cached) $ac_c" 1>&6
13410 else
13411   cat > conftest.$ac_ext <<EOF
13412 #line 13413 "configure"
13413 #include "confdefs.h"
13414 #include <$ac_hdr>
13415 EOF
13416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13417 { (eval echo configure:13418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13419 if test -z "$ac_err"; then
13420   rm -rf conftest*
13421   eval "ac_cv_header_$ac_safe=yes"
13422 else
13423   echo "$ac_err" >&5
13424   echo "configure: failed program was:" >&5
13425   cat conftest.$ac_ext >&5
13426   rm -rf conftest*
13427   eval "ac_cv_header_$ac_safe=no"
13428 fi
13429 rm -f conftest*
13430 fi
13431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13432   echo "$ac_t""yes" 1>&6
13433     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13434   cat >> confdefs.h <<EOF
13435 #define $ac_tr_hdr 1
13436 EOF
13437  
13438 else
13439   echo "$ac_t""no" 1>&6
13440 fi
13441 done
13442
13443         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
13444 echo "configure:13445: checking for dmalloc_shutdown in -ldmalloc" >&5
13445 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
13446 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13447   echo $ac_n "(cached) $ac_c" 1>&6
13448 else
13449   ac_save_LIBS="$LIBS"
13450 LIBS="-ldmalloc  $LIBS"
13451 cat > conftest.$ac_ext <<EOF
13452 #line 13453 "configure"
13453 #include "confdefs.h"
13454 /* Override any gcc2 internal prototype to avoid an error.  */
13455 /* We use char because int might match the return type of a gcc2
13456     builtin and then its argument prototype would still apply.  */
13457 char dmalloc_shutdown();
13458
13459 int main() {
13460 dmalloc_shutdown()
13461 ; return 0; }
13462 EOF
13463 if { (eval echo configure:13464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13464   rm -rf conftest*
13465   eval "ac_cv_lib_$ac_lib_var=yes"
13466 else
13467   echo "configure: failed program was:" >&5
13468   cat conftest.$ac_ext >&5
13469   rm -rf conftest*
13470   eval "ac_cv_lib_$ac_lib_var=no"
13471 fi
13472 rm -f conftest*
13473 LIBS="$ac_save_LIBS"
13474
13475 fi
13476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13477   echo "$ac_t""yes" 1>&6
13478     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13479     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13480   cat >> confdefs.h <<EOF
13481 #define $ac_tr_lib 1
13482 EOF
13483
13484   LIBS="-ldmalloc $LIBS"
13485
13486 else
13487   echo "$ac_t""no" 1>&6
13488 fi
13489
13490 fi
13491
13492 if test $ol_enable_tcl != no ; then
13493         for ac_hdr in tcl.h
13494 do
13495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13496 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13497 echo "configure:13498: checking for $ac_hdr" >&5
13498 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13499   echo $ac_n "(cached) $ac_c" 1>&6
13500 else
13501   cat > conftest.$ac_ext <<EOF
13502 #line 13503 "configure"
13503 #include "confdefs.h"
13504 #include <$ac_hdr>
13505 EOF
13506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13507 { (eval echo configure:13508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13509 if test -z "$ac_err"; then
13510   rm -rf conftest*
13511   eval "ac_cv_header_$ac_safe=yes"
13512 else
13513   echo "$ac_err" >&5
13514   echo "configure: failed program was:" >&5
13515   cat conftest.$ac_ext >&5
13516   rm -rf conftest*
13517   eval "ac_cv_header_$ac_safe=no"
13518 fi
13519 rm -f conftest*
13520 fi
13521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13522   echo "$ac_t""yes" 1>&6
13523     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13524   cat >> confdefs.h <<EOF
13525 #define $ac_tr_hdr 1
13526 EOF
13527  
13528 else
13529   echo "$ac_t""no" 1>&6
13530 fi
13531 done
13532
13533
13534         if test $ac_cv_header_tcl_h != yes ; then
13535                 have_tcl=no
13536         else
13537                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13538                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13539 echo "configure:13540: checking for main in -l$lib" >&5
13540 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13541 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13542   echo $ac_n "(cached) $ac_c" 1>&6
13543 else
13544   ac_save_LIBS="$LIBS"
13545 LIBS="-l$lib  $LIBS"
13546 cat > conftest.$ac_ext <<EOF
13547 #line 13548 "configure"
13548 #include "confdefs.h"
13549
13550 int main() {
13551 main()
13552 ; return 0; }
13553 EOF
13554 if { (eval echo configure:13555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13555   rm -rf conftest*
13556   eval "ac_cv_lib_$ac_lib_var=yes"
13557 else
13558   echo "configure: failed program was:" >&5
13559   cat conftest.$ac_ext >&5
13560   rm -rf conftest*
13561   eval "ac_cv_lib_$ac_lib_var=no"
13562 fi
13563 rm -f conftest*
13564 LIBS="$ac_save_LIBS"
13565
13566 fi
13567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13568   echo "$ac_t""yes" 1>&6
13569   have_tcl=yes
13570                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13571                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13572                            else
13573                                MOD_TCL_LIB="-l${lib}"
13574                            fi;break
13575 else
13576   echo "$ac_t""no" 1>&6
13577 have_tcl=no
13578 fi
13579
13580                 done
13581         fi
13582
13583         if test $have_tcl != yes ; then
13584                 echo "configure: warning: could not find -ltcl" 1>&2
13585                 if test $ol_enable_tcl = yes ; then
13586                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13587                 fi
13588
13589                 ol_enable_tcl=no
13590         fi
13591 fi
13592
13593 ol_link_termcap=no
13594 for ac_hdr in termcap.h ncurses.h
13595 do
13596 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13597 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13598 echo "configure:13599: checking for $ac_hdr" >&5
13599 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13600   echo $ac_n "(cached) $ac_c" 1>&6
13601 else
13602   cat > conftest.$ac_ext <<EOF
13603 #line 13604 "configure"
13604 #include "confdefs.h"
13605 #include <$ac_hdr>
13606 EOF
13607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13608 { (eval echo configure:13609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13610 if test -z "$ac_err"; then
13611   rm -rf conftest*
13612   eval "ac_cv_header_$ac_safe=yes"
13613 else
13614   echo "$ac_err" >&5
13615   echo "configure: failed program was:" >&5
13616   cat conftest.$ac_ext >&5
13617   rm -rf conftest*
13618   eval "ac_cv_header_$ac_safe=no"
13619 fi
13620 rm -f conftest*
13621 fi
13622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13623   echo "$ac_t""yes" 1>&6
13624     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13625   cat >> confdefs.h <<EOF
13626 #define $ac_tr_hdr 1
13627 EOF
13628  
13629 else
13630   echo "$ac_t""no" 1>&6
13631 fi
13632 done
13633
13634
13635 if test $ol_link_termcap = no ; then
13636         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13637 echo "configure:13638: checking for tputs in -ltermcap" >&5
13638 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13639 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13640   echo $ac_n "(cached) $ac_c" 1>&6
13641 else
13642   ac_save_LIBS="$LIBS"
13643 LIBS="-ltermcap  $LIBS"
13644 cat > conftest.$ac_ext <<EOF
13645 #line 13646 "configure"
13646 #include "confdefs.h"
13647 /* Override any gcc2 internal prototype to avoid an error.  */
13648 /* We use char because int might match the return type of a gcc2
13649     builtin and then its argument prototype would still apply.  */
13650 char tputs();
13651
13652 int main() {
13653 tputs()
13654 ; return 0; }
13655 EOF
13656 if { (eval echo configure:13657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13657   rm -rf conftest*
13658   eval "ac_cv_lib_$ac_lib_var=yes"
13659 else
13660   echo "configure: failed program was:" >&5
13661   cat conftest.$ac_ext >&5
13662   rm -rf conftest*
13663   eval "ac_cv_lib_$ac_lib_var=no"
13664 fi
13665 rm -f conftest*
13666 LIBS="$ac_save_LIBS"
13667
13668 fi
13669 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13670   echo "$ac_t""yes" 1>&6
13671   have_termcap=yes
13672 else
13673   echo "$ac_t""no" 1>&6
13674 have_termcap=no
13675 fi
13676
13677         if test $have_termcap = yes ; then
13678                 cat >> confdefs.h <<\EOF
13679 #define HAVE_TERMCAP 1
13680 EOF
13681
13682                 ol_link_termcap=yes
13683                 TERMCAP_LIBS=-ltermcap
13684         fi
13685 fi
13686
13687 if test $ol_link_termcap = no ; then
13688         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13689 echo "configure:13690: checking for initscr in -lncurses" >&5
13690 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13691 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13692   echo $ac_n "(cached) $ac_c" 1>&6
13693 else
13694   ac_save_LIBS="$LIBS"
13695 LIBS="-lncurses  $LIBS"
13696 cat > conftest.$ac_ext <<EOF
13697 #line 13698 "configure"
13698 #include "confdefs.h"
13699 /* Override any gcc2 internal prototype to avoid an error.  */
13700 /* We use char because int might match the return type of a gcc2
13701     builtin and then its argument prototype would still apply.  */
13702 char initscr();
13703
13704 int main() {
13705 initscr()
13706 ; return 0; }
13707 EOF
13708 if { (eval echo configure:13709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13709   rm -rf conftest*
13710   eval "ac_cv_lib_$ac_lib_var=yes"
13711 else
13712   echo "configure: failed program was:" >&5
13713   cat conftest.$ac_ext >&5
13714   rm -rf conftest*
13715   eval "ac_cv_lib_$ac_lib_var=no"
13716 fi
13717 rm -f conftest*
13718 LIBS="$ac_save_LIBS"
13719
13720 fi
13721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13722   echo "$ac_t""yes" 1>&6
13723   have_ncurses=yes
13724 else
13725   echo "$ac_t""no" 1>&6
13726 have_ncurses=no
13727 fi
13728
13729         if test $have_ncurses = yes ; then
13730                 cat >> confdefs.h <<\EOF
13731 #define HAVE_NCURSES 1
13732 EOF
13733
13734                 ol_link_termcap=yes
13735                 TERMCAP_LIBS=-lncurses
13736         fi
13737 fi
13738
13739 if test $ol_link_termcap = no ; then
13740         cat >> confdefs.h <<\EOF
13741 #define NO_TERMCAP 1
13742 EOF
13743
13744         TERMCAP_LIBS=
13745 fi
13746
13747 ol_link_sasl=no
13748 ol_link_spasswd=no
13749 if test $ol_with_cyrus_sasl != no ; then
13750         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13751 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13752 echo "configure:13753: checking for sasl.h" >&5
13753 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13754   echo $ac_n "(cached) $ac_c" 1>&6
13755 else
13756   cat > conftest.$ac_ext <<EOF
13757 #line 13758 "configure"
13758 #include "confdefs.h"
13759 #include <sasl.h>
13760 EOF
13761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13762 { (eval echo configure:13763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13764 if test -z "$ac_err"; then
13765   rm -rf conftest*
13766   eval "ac_cv_header_$ac_safe=yes"
13767 else
13768   echo "$ac_err" >&5
13769   echo "configure: failed program was:" >&5
13770   cat conftest.$ac_ext >&5
13771   rm -rf conftest*
13772   eval "ac_cv_header_$ac_safe=no"
13773 fi
13774 rm -f conftest*
13775 fi
13776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13777   echo "$ac_t""yes" 1>&6
13778   :
13779 else
13780   echo "$ac_t""no" 1>&6
13781 fi
13782
13783
13784         if test $ac_cv_header_sasl_h = yes ; then
13785                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13786 echo "configure:13787: checking for sasl_client_init in -lsasl" >&5
13787 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13788 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13789   echo $ac_n "(cached) $ac_c" 1>&6
13790 else
13791   ac_save_LIBS="$LIBS"
13792 LIBS="-lsasl  $LIBS"
13793 cat > conftest.$ac_ext <<EOF
13794 #line 13795 "configure"
13795 #include "confdefs.h"
13796 /* Override any gcc2 internal prototype to avoid an error.  */
13797 /* We use char because int might match the return type of a gcc2
13798     builtin and then its argument prototype would still apply.  */
13799 char sasl_client_init();
13800
13801 int main() {
13802 sasl_client_init()
13803 ; return 0; }
13804 EOF
13805 if { (eval echo configure:13806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13806   rm -rf conftest*
13807   eval "ac_cv_lib_$ac_lib_var=yes"
13808 else
13809   echo "configure: failed program was:" >&5
13810   cat conftest.$ac_ext >&5
13811   rm -rf conftest*
13812   eval "ac_cv_lib_$ac_lib_var=no"
13813 fi
13814 rm -f conftest*
13815 LIBS="$ac_save_LIBS"
13816
13817 fi
13818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13819   echo "$ac_t""yes" 1>&6
13820   have_cyrus_sasl=yes
13821 else
13822   echo "$ac_t""no" 1>&6
13823 have_cyrus_sasl=no
13824 fi
13825
13826
13827                 if test $have_cyrus_sasl != no ; then
13828                         SASL_LIBS="-lsasl"
13829                         cat >> confdefs.h <<\EOF
13830 #define HAVE_CYRUS_SASL 1
13831 EOF
13832
13833                         ol_link_sasl=yes
13834                 fi
13835         fi
13836
13837         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13838                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13839         fi
13840 fi
13841
13842 if test $cross_compiling != yes ; then
13843         dev=no
13844         if test -r /dev/urandom ; then
13845                 dev="/dev/urandom";
13846         elif test -r /idev/urandom ; then
13847                 dev="/idev/urandom";
13848         elif test -r /dev/srandom ; then
13849                 dev="/dev/srandom";
13850         elif test -r /dev/random ; then
13851                 dev="/dev/random";
13852         elif test -r /idev/random ; then
13853                 dev="/idev/random";
13854         fi
13855
13856         if test $dev != no ; then
13857                 cat >> confdefs.h <<EOF
13858 #define URANDOM_DEVICE "$dev"
13859 EOF
13860
13861         fi
13862 fi
13863
13864 ol_link_fetch=no
13865 if test $ol_with_fetch != no ; then
13866         ol_LIBS=$LIBS
13867 LIBS="-lfetch -lcom_err $LIBS"
13868 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13869 echo "configure:13870: checking fetch(3) library" >&5
13870 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13871   echo $ac_n "(cached) $ac_c" 1>&6
13872 else
13873   
13874         cat > conftest.$ac_ext <<EOF
13875 #line 13876 "configure"
13876 #include "confdefs.h"
13877
13878 #include <sys/param.h>
13879 #include <stdio.h>
13880 #include <fetch.h>
13881 int main() {
13882 struct url *u = fetchParseURL("file:///"); 
13883 ; return 0; }
13884 EOF
13885 if { (eval echo configure:13886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13886   rm -rf conftest*
13887   ol_cv_lib_fetch=yes
13888 else
13889   echo "configure: failed program was:" >&5
13890   cat conftest.$ac_ext >&5
13891   rm -rf conftest*
13892   ol_cv_lib_fetch=no
13893 fi
13894 rm -f conftest*
13895 fi
13896
13897 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13898 LIBS=$ol_LIBS
13899 if test $ol_cv_lib_fetch != no ; then
13900         ol_link_fetch="-lfetch -lcom_err"
13901         cat >> confdefs.h <<\EOF
13902 #define HAVE_FETCH 1
13903 EOF
13904
13905 fi
13906
13907
13908         if test $ol_cv_lib_fetch != no ; then
13909                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13910                 ol_link_fetch=freebsd
13911
13912         elif test $ol_with_fetch != auto ; then
13913                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13914         fi 
13915 fi
13916
13917 ol_link_readline=no
13918 if test $ol_with_readline != no ; then
13919         for ac_hdr in readline/readline.h readline/history.h
13920 do
13921 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13922 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13923 echo "configure:13924: checking for $ac_hdr" >&5
13924 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13925   echo $ac_n "(cached) $ac_c" 1>&6
13926 else
13927   cat > conftest.$ac_ext <<EOF
13928 #line 13929 "configure"
13929 #include "confdefs.h"
13930 #include <$ac_hdr>
13931 EOF
13932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13933 { (eval echo configure:13934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13935 if test -z "$ac_err"; then
13936   rm -rf conftest*
13937   eval "ac_cv_header_$ac_safe=yes"
13938 else
13939   echo "$ac_err" >&5
13940   echo "configure: failed program was:" >&5
13941   cat conftest.$ac_ext >&5
13942   rm -rf conftest*
13943   eval "ac_cv_header_$ac_safe=no"
13944 fi
13945 rm -f conftest*
13946 fi
13947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13948   echo "$ac_t""yes" 1>&6
13949     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13950   cat >> confdefs.h <<EOF
13951 #define $ac_tr_hdr 1
13952 EOF
13953  
13954 else
13955   echo "$ac_t""no" 1>&6
13956 fi
13957 done
13958
13959
13960         if test $ac_cv_header_readline_readline_h = yes ; then
13961                 save_LIBS="$LIBS"
13962                 LIBS="$TERMCAP_LIBS $LIBS"
13963                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13964 echo "configure:13965: checking for readline in -lreadline" >&5
13965 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13966 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13967   echo $ac_n "(cached) $ac_c" 1>&6
13968 else
13969   ac_save_LIBS="$LIBS"
13970 LIBS="-lreadline  $LIBS"
13971 cat > conftest.$ac_ext <<EOF
13972 #line 13973 "configure"
13973 #include "confdefs.h"
13974 /* Override any gcc2 internal prototype to avoid an error.  */
13975 /* We use char because int might match the return type of a gcc2
13976     builtin and then its argument prototype would still apply.  */
13977 char readline();
13978
13979 int main() {
13980 readline()
13981 ; return 0; }
13982 EOF
13983 if { (eval echo configure:13984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13984   rm -rf conftest*
13985   eval "ac_cv_lib_$ac_lib_var=yes"
13986 else
13987   echo "configure: failed program was:" >&5
13988   cat conftest.$ac_ext >&5
13989   rm -rf conftest*
13990   eval "ac_cv_lib_$ac_lib_var=no"
13991 fi
13992 rm -f conftest*
13993 LIBS="$ac_save_LIBS"
13994
13995 fi
13996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13997   echo "$ac_t""yes" 1>&6
13998   have_readline=yes
13999 else
14000   echo "$ac_t""no" 1>&6
14001 have_readline=no
14002 fi
14003
14004                 LIBS="$save_LIBS"
14005                         
14006                 if test $have_readline = yes ; then
14007                         ol_with_readline=found
14008                         ol_link_readline=yes
14009
14010                         READLINE_LIBS="-lreadline"
14011                 fi
14012         fi
14013 fi
14014
14015 if test $ol_link_readline = yes ; then
14016         cat >> confdefs.h <<\EOF
14017 #define HAVE_READLINE 1
14018 EOF
14019
14020 fi
14021
14022
14023 if test $ol_enable_crypt != no ; then
14024         echo $ac_n "checking for crypt""... $ac_c" 1>&6
14025 echo "configure:14026: checking for crypt" >&5
14026 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
14027   echo $ac_n "(cached) $ac_c" 1>&6
14028 else
14029   cat > conftest.$ac_ext <<EOF
14030 #line 14031 "configure"
14031 #include "confdefs.h"
14032 /* System header to define __stub macros and hopefully few prototypes,
14033     which can conflict with char crypt(); below.  */
14034 #include <assert.h>
14035 /* Override any gcc2 internal prototype to avoid an error.  */
14036 /* We use char because int might match the return type of a gcc2
14037     builtin and then its argument prototype would still apply.  */
14038 char crypt();
14039 char (*f)();
14040
14041 int main() {
14042
14043 /* The GNU C library defines this for functions which it implements
14044     to always fail with ENOSYS.  Some functions are actually named
14045     something starting with __ and the normal name is an alias.  */
14046 #if defined (__stub_crypt) || defined (__stub___crypt)
14047 choke me
14048 #else
14049 f = crypt;
14050 #endif
14051
14052 ; return 0; }
14053 EOF
14054 if { (eval echo configure:14055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14055   rm -rf conftest*
14056   eval "ac_cv_func_crypt=yes"
14057 else
14058   echo "configure: failed program was:" >&5
14059   cat conftest.$ac_ext >&5
14060   rm -rf conftest*
14061   eval "ac_cv_func_crypt=no"
14062 fi
14063 rm -f conftest*
14064 fi
14065
14066 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
14067   echo "$ac_t""yes" 1>&6
14068   have_crypt=yes
14069 else
14070   echo "$ac_t""no" 1>&6
14071
14072                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
14073 echo "configure:14074: checking for crypt in -lcrypt" >&5
14074 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
14075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14076   echo $ac_n "(cached) $ac_c" 1>&6
14077 else
14078   ac_save_LIBS="$LIBS"
14079 LIBS="-lcrypt  $LIBS"
14080 cat > conftest.$ac_ext <<EOF
14081 #line 14082 "configure"
14082 #include "confdefs.h"
14083 /* Override any gcc2 internal prototype to avoid an error.  */
14084 /* We use char because int might match the return type of a gcc2
14085     builtin and then its argument prototype would still apply.  */
14086 char crypt();
14087
14088 int main() {
14089 crypt()
14090 ; return 0; }
14091 EOF
14092 if { (eval echo configure:14093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14093   rm -rf conftest*
14094   eval "ac_cv_lib_$ac_lib_var=yes"
14095 else
14096   echo "configure: failed program was:" >&5
14097   cat conftest.$ac_ext >&5
14098   rm -rf conftest*
14099   eval "ac_cv_lib_$ac_lib_var=no"
14100 fi
14101 rm -f conftest*
14102 LIBS="$ac_save_LIBS"
14103
14104 fi
14105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14106   echo "$ac_t""yes" 1>&6
14107   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
14108                         have_crypt=yes
14109 else
14110   echo "$ac_t""no" 1>&6
14111 have_crypt=no
14112 fi
14113
14114 fi
14115
14116
14117         if test $have_crypt = yes ; then
14118                 cat >> confdefs.h <<\EOF
14119 #define HAVE_CRYPT 1
14120 EOF
14121
14122         else
14123                 echo "configure: warning: could not find crypt" 1>&2
14124                 if test $ol_enable_crypt = yes ; then
14125                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14126                 fi
14127
14128                 echo "configure: warning: disabling crypt support" 1>&2
14129                 ol_enable_crypt=no
14130         fi
14131 fi
14132
14133 if test $ol_enable_proctitle != no ; then
14134         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14135 echo "configure:14136: checking for setproctitle" >&5
14136 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14137   echo $ac_n "(cached) $ac_c" 1>&6
14138 else
14139   cat > conftest.$ac_ext <<EOF
14140 #line 14141 "configure"
14141 #include "confdefs.h"
14142 /* System header to define __stub macros and hopefully few prototypes,
14143     which can conflict with char setproctitle(); below.  */
14144 #include <assert.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 setproctitle();
14149 char (*f)();
14150
14151 int main() {
14152
14153 /* The GNU C library defines this for functions which it implements
14154     to always fail with ENOSYS.  Some functions are actually named
14155     something starting with __ and the normal name is an alias.  */
14156 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14157 choke me
14158 #else
14159 f = setproctitle;
14160 #endif
14161
14162 ; return 0; }
14163 EOF
14164 if { (eval echo configure:14165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14165   rm -rf conftest*
14166   eval "ac_cv_func_setproctitle=yes"
14167 else
14168   echo "configure: failed program was:" >&5
14169   cat conftest.$ac_ext >&5
14170   rm -rf conftest*
14171   eval "ac_cv_func_setproctitle=no"
14172 fi
14173 rm -f conftest*
14174 fi
14175
14176 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14177   echo "$ac_t""yes" 1>&6
14178   have_setproctitle=yes
14179 else
14180   echo "$ac_t""no" 1>&6
14181
14182                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14183 echo "configure:14184: checking for setproctitle in -lutil" >&5
14184 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14185 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14186   echo $ac_n "(cached) $ac_c" 1>&6
14187 else
14188   ac_save_LIBS="$LIBS"
14189 LIBS="-lutil  $LIBS"
14190 cat > conftest.$ac_ext <<EOF
14191 #line 14192 "configure"
14192 #include "confdefs.h"
14193 /* Override any gcc2 internal prototype to avoid an error.  */
14194 /* We use char because int might match the return type of a gcc2
14195     builtin and then its argument prototype would still apply.  */
14196 char setproctitle();
14197
14198 int main() {
14199 setproctitle()
14200 ; return 0; }
14201 EOF
14202 if { (eval echo configure:14203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14203   rm -rf conftest*
14204   eval "ac_cv_lib_$ac_lib_var=yes"
14205 else
14206   echo "configure: failed program was:" >&5
14207   cat conftest.$ac_ext >&5
14208   rm -rf conftest*
14209   eval "ac_cv_lib_$ac_lib_var=no"
14210 fi
14211 rm -f conftest*
14212 LIBS="$ac_save_LIBS"
14213
14214 fi
14215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14216   echo "$ac_t""yes" 1>&6
14217   have_setproctitle=yes
14218                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14219 else
14220   echo "$ac_t""no" 1>&6
14221 have_setproctitle=no
14222                         LIBOBJS="$LIBOBJS setproctitle.o"
14223                         LIBSRCS="$LIBSRCS setproctitle.c"
14224 fi
14225
14226 fi
14227
14228
14229         if test $have_setproctitle = yes ; then
14230                 cat >> confdefs.h <<\EOF
14231 #define HAVE_SETPROCTITLE 1
14232 EOF
14233
14234         fi
14235 fi
14236
14237 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14238 echo "configure:14239: checking for ANSI C header files" >&5
14239 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14240   echo $ac_n "(cached) $ac_c" 1>&6
14241 else
14242   cat > conftest.$ac_ext <<EOF
14243 #line 14244 "configure"
14244 #include "confdefs.h"
14245 #include <stdlib.h>
14246 #include <stdarg.h>
14247 #include <string.h>
14248 #include <float.h>
14249 EOF
14250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14251 { (eval echo configure:14252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14253 if test -z "$ac_err"; then
14254   rm -rf conftest*
14255   ac_cv_header_stdc=yes
14256 else
14257   echo "$ac_err" >&5
14258   echo "configure: failed program was:" >&5
14259   cat conftest.$ac_ext >&5
14260   rm -rf conftest*
14261   ac_cv_header_stdc=no
14262 fi
14263 rm -f conftest*
14264
14265 if test $ac_cv_header_stdc = yes; then
14266   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14267 cat > conftest.$ac_ext <<EOF
14268 #line 14269 "configure"
14269 #include "confdefs.h"
14270 #include <string.h>
14271 EOF
14272 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14273   egrep "memchr" >/dev/null 2>&1; then
14274   :
14275 else
14276   rm -rf conftest*
14277   ac_cv_header_stdc=no
14278 fi
14279 rm -f conftest*
14280
14281 fi
14282
14283 if test $ac_cv_header_stdc = yes; then
14284   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14285 cat > conftest.$ac_ext <<EOF
14286 #line 14287 "configure"
14287 #include "confdefs.h"
14288 #include <stdlib.h>
14289 EOF
14290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14291   egrep "free" >/dev/null 2>&1; then
14292   :
14293 else
14294   rm -rf conftest*
14295   ac_cv_header_stdc=no
14296 fi
14297 rm -f conftest*
14298
14299 fi
14300
14301 if test $ac_cv_header_stdc = yes; then
14302   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14303 if test "$cross_compiling" = yes; then
14304   :
14305 else
14306   cat > conftest.$ac_ext <<EOF
14307 #line 14308 "configure"
14308 #include "confdefs.h"
14309 #include <ctype.h>
14310 #if ((' ' & 0x0FF) == 0x020)
14311 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14312 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14313 #else
14314 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14315  || ('j' <= (c) && (c) <= 'r') \
14316  || ('s' <= (c) && (c) <= 'z'))
14317 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14318 #endif
14319 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14320 int main () { int i; for (i = 0; i < 256; i++)
14321 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14322 exit (0); }
14323
14324 EOF
14325 if { (eval echo configure:14326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14326 then
14327   :
14328 else
14329   echo "configure: failed program was:" >&5
14330   cat conftest.$ac_ext >&5
14331   rm -fr conftest*
14332   ac_cv_header_stdc=no
14333 fi
14334 rm -fr conftest*
14335 fi
14336
14337 fi
14338 fi
14339
14340 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14341 if test $ac_cv_header_stdc = yes; then
14342   cat >> confdefs.h <<\EOF
14343 #define STDC_HEADERS 1
14344 EOF
14345
14346 fi
14347
14348 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14349 echo "configure:14350: checking for mode_t" >&5
14350 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14351   echo $ac_n "(cached) $ac_c" 1>&6
14352 else
14353   cat > conftest.$ac_ext <<EOF
14354 #line 14355 "configure"
14355 #include "confdefs.h"
14356 #include <sys/types.h>
14357 #if STDC_HEADERS
14358 #include <stdlib.h>
14359 #include <stddef.h>
14360 #endif
14361
14362 EOF
14363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14364   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14365   rm -rf conftest*
14366   eval "ac_cv_type_mode_t=yes"
14367 else
14368   rm -rf conftest*
14369   eval "ac_cv_type_mode_t=no"
14370 fi
14371 rm -f conftest*
14372
14373 fi
14374 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14375   echo "$ac_t""yes" 1>&6
14376 else
14377   echo "$ac_t""no" 1>&6
14378   cat >> confdefs.h <<EOF
14379 #define mode_t int
14380 EOF
14381
14382 fi
14383
14384 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14385 echo "configure:14386: checking for off_t" >&5
14386 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14387   echo $ac_n "(cached) $ac_c" 1>&6
14388 else
14389   cat > conftest.$ac_ext <<EOF
14390 #line 14391 "configure"
14391 #include "confdefs.h"
14392 #include <sys/types.h>
14393 #if STDC_HEADERS
14394 #include <stdlib.h>
14395 #include <stddef.h>
14396 #endif
14397
14398 EOF
14399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14400   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14401   rm -rf conftest*
14402   eval "ac_cv_type_off_t=yes"
14403 else
14404   rm -rf conftest*
14405   eval "ac_cv_type_off_t=no"
14406 fi
14407 rm -f conftest*
14408
14409 fi
14410 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14411   echo "$ac_t""yes" 1>&6
14412 else
14413   echo "$ac_t""no" 1>&6
14414   cat >> confdefs.h <<EOF
14415 #define off_t long
14416 EOF
14417
14418 fi
14419
14420 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14421 echo "configure:14422: checking for pid_t" >&5
14422 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14423   echo $ac_n "(cached) $ac_c" 1>&6
14424 else
14425   cat > conftest.$ac_ext <<EOF
14426 #line 14427 "configure"
14427 #include "confdefs.h"
14428 #include <sys/types.h>
14429 #if STDC_HEADERS
14430 #include <stdlib.h>
14431 #include <stddef.h>
14432 #endif
14433
14434 EOF
14435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14436   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14437   rm -rf conftest*
14438   eval "ac_cv_type_pid_t=yes"
14439 else
14440   rm -rf conftest*
14441   eval "ac_cv_type_pid_t=no"
14442 fi
14443 rm -f conftest*
14444
14445 fi
14446 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14447   echo "$ac_t""yes" 1>&6
14448 else
14449   echo "$ac_t""no" 1>&6
14450   cat >> confdefs.h <<EOF
14451 #define pid_t int
14452 EOF
14453
14454 fi
14455
14456 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14457 echo "configure:14458: checking for ptrdiff_t" >&5
14458 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14459   echo $ac_n "(cached) $ac_c" 1>&6
14460 else
14461   cat > conftest.$ac_ext <<EOF
14462 #line 14463 "configure"
14463 #include "confdefs.h"
14464 #include <stddef.h>
14465 int main() {
14466 ptrdiff_t p
14467 ; return 0; }
14468 EOF
14469 if { (eval echo configure:14470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14470   rm -rf conftest*
14471   am_cv_type_ptrdiff_t=yes
14472 else
14473   echo "configure: failed program was:" >&5
14474   cat conftest.$ac_ext >&5
14475   rm -rf conftest*
14476   am_cv_type_ptrdiff_t=no
14477 fi
14478 rm -f conftest*
14479 fi
14480
14481 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14482    if test $am_cv_type_ptrdiff_t = yes; then
14483      cat >> confdefs.h <<\EOF
14484 #define HAVE_PTRDIFF_T 1
14485 EOF
14486
14487    fi
14488
14489 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14490 echo "configure:14491: checking return type of signal handlers" >&5
14491 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14492   echo $ac_n "(cached) $ac_c" 1>&6
14493 else
14494   cat > conftest.$ac_ext <<EOF
14495 #line 14496 "configure"
14496 #include "confdefs.h"
14497 #include <sys/types.h>
14498 #include <signal.h>
14499 #ifdef signal
14500 #undef signal
14501 #endif
14502 #ifdef __cplusplus
14503 extern "C" void (*signal (int, void (*)(int)))(int);
14504 #else
14505 void (*signal ()) ();
14506 #endif
14507
14508 int main() {
14509 int i;
14510 ; return 0; }
14511 EOF
14512 if { (eval echo configure:14513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14513   rm -rf conftest*
14514   ac_cv_type_signal=void
14515 else
14516   echo "configure: failed program was:" >&5
14517   cat conftest.$ac_ext >&5
14518   rm -rf conftest*
14519   ac_cv_type_signal=int
14520 fi
14521 rm -f conftest*
14522 fi
14523
14524 echo "$ac_t""$ac_cv_type_signal" 1>&6
14525 cat >> confdefs.h <<EOF
14526 #define RETSIGTYPE $ac_cv_type_signal
14527 EOF
14528
14529
14530 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14531 echo "configure:14532: checking for size_t" >&5
14532 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14533   echo $ac_n "(cached) $ac_c" 1>&6
14534 else
14535   cat > conftest.$ac_ext <<EOF
14536 #line 14537 "configure"
14537 #include "confdefs.h"
14538 #include <sys/types.h>
14539 #if STDC_HEADERS
14540 #include <stdlib.h>
14541 #include <stddef.h>
14542 #endif
14543
14544 EOF
14545 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14546   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14547   rm -rf conftest*
14548   eval "ac_cv_type_size_t=yes"
14549 else
14550   rm -rf conftest*
14551   eval "ac_cv_type_size_t=no"
14552 fi
14553 rm -f conftest*
14554
14555 fi
14556 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14557   echo "$ac_t""yes" 1>&6
14558 else
14559   echo "$ac_t""no" 1>&6
14560   cat >> confdefs.h <<EOF
14561 #define size_t unsigned
14562 EOF
14563
14564 fi
14565
14566
14567 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14568 echo "configure:14569: checking for ssize_t" >&5
14569 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14570   echo $ac_n "(cached) $ac_c" 1>&6
14571 else
14572   cat > conftest.$ac_ext <<EOF
14573 #line 14574 "configure"
14574 #include "confdefs.h"
14575 #include <sys/types.h>
14576 #if STDC_HEADERS
14577 #include <stdlib.h>
14578 #include <stddef.h>
14579 #endif
14580
14581 EOF
14582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14583   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14584   rm -rf conftest*
14585   eval "ac_cv_type_ssize_t=yes"
14586 else
14587   rm -rf conftest*
14588   eval "ac_cv_type_ssize_t=no"
14589 fi
14590 rm -f conftest*
14591
14592 fi
14593 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14594   echo "$ac_t""yes" 1>&6
14595 else
14596   echo "$ac_t""no" 1>&6
14597   cat >> confdefs.h <<EOF
14598 #define ssize_t signed int
14599 EOF
14600
14601 fi
14602
14603 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14604 echo "configure:14605: checking for caddr_t" >&5
14605 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14606   echo $ac_n "(cached) $ac_c" 1>&6
14607 else
14608   cat > conftest.$ac_ext <<EOF
14609 #line 14610 "configure"
14610 #include "confdefs.h"
14611 #include <sys/types.h>
14612 #if STDC_HEADERS
14613 #include <stdlib.h>
14614 #include <stddef.h>
14615 #endif
14616
14617 EOF
14618 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14619   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14620   rm -rf conftest*
14621   eval "ac_cv_type_caddr_t=yes"
14622 else
14623   rm -rf conftest*
14624   eval "ac_cv_type_caddr_t=no"
14625 fi
14626 rm -f conftest*
14627
14628 fi
14629 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14630   echo "$ac_t""yes" 1>&6
14631 else
14632   echo "$ac_t""no" 1>&6
14633   cat >> confdefs.h <<EOF
14634 #define caddr_t char *
14635 EOF
14636
14637 fi
14638
14639
14640 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14641 echo "configure:14642: checking for socklen_t" >&5
14642 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14643   echo $ac_n "(cached) $ac_c" 1>&6
14644 else
14645   cat > conftest.$ac_ext <<EOF
14646 #line 14647 "configure"
14647 #include "confdefs.h"
14648
14649 #ifdef HAVE_SYS_TYPES_H
14650 #include <sys/types.h>
14651 #endif
14652 #ifdef HAVE_SYS_SOCKET_H
14653 #include <sys/socket.h>
14654 #endif
14655
14656 int main() {
14657 socklen_t len;
14658 ; return 0; }
14659 EOF
14660 if { (eval echo configure:14661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14661   rm -rf conftest*
14662   ol_cv_type_socklen_t=yes
14663 else
14664   echo "configure: failed program was:" >&5
14665   cat conftest.$ac_ext >&5
14666   rm -rf conftest*
14667   ol_cv_type_socklen_t=no
14668 fi
14669 rm -f conftest*
14670 fi
14671
14672 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14673   if test $ol_cv_type_socklen_t = no; then
14674     cat >> confdefs.h <<\EOF
14675 #define socklen_t int
14676 EOF
14677
14678   fi
14679  
14680 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14681 echo "configure:14682: checking for member st_blksize in aggregate type struct stat" >&5
14682 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14683   echo $ac_n "(cached) $ac_c" 1>&6
14684 else
14685   cat > conftest.$ac_ext <<EOF
14686 #line 14687 "configure"
14687 #include "confdefs.h"
14688 #include <sys/types.h>
14689 #include <sys/stat.h>
14690 int main() {
14691 struct stat foo; foo.st_blksize;
14692 ; return 0; }
14693 EOF
14694 if { (eval echo configure:14695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14695   rm -rf conftest*
14696   ac_cv_c_struct_member_st_blksize=yes
14697 else
14698   echo "configure: failed program was:" >&5
14699   cat conftest.$ac_ext >&5
14700   rm -rf conftest*
14701   ac_cv_c_struct_member_st_blksize=no
14702 fi
14703 rm -f conftest*
14704 fi
14705
14706 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14707 st_blksize="$ac_cv_c_struct_member_st_blksize"
14708 if test $ac_cv_c_struct_member_st_blksize = yes; then
14709   cat >> confdefs.h <<\EOF
14710 #define HAVE_ST_BLKSIZE 1
14711 EOF
14712
14713 fi
14714
14715 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14716 echo "configure:14717: checking whether time.h and sys/time.h may both be included" >&5
14717 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14718   echo $ac_n "(cached) $ac_c" 1>&6
14719 else
14720   cat > conftest.$ac_ext <<EOF
14721 #line 14722 "configure"
14722 #include "confdefs.h"
14723 #include <sys/types.h>
14724 #include <sys/time.h>
14725 #include <time.h>
14726 int main() {
14727 struct tm *tp;
14728 ; return 0; }
14729 EOF
14730 if { (eval echo configure:14731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14731   rm -rf conftest*
14732   ac_cv_header_time=yes
14733 else
14734   echo "configure: failed program was:" >&5
14735   cat conftest.$ac_ext >&5
14736   rm -rf conftest*
14737   ac_cv_header_time=no
14738 fi
14739 rm -f conftest*
14740 fi
14741
14742 echo "$ac_t""$ac_cv_header_time" 1>&6
14743 if test $ac_cv_header_time = yes; then
14744   cat >> confdefs.h <<\EOF
14745 #define TIME_WITH_SYS_TIME 1
14746 EOF
14747
14748 fi
14749
14750 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14751 echo "configure:14752: checking whether struct tm is in sys/time.h or time.h" >&5
14752 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14753   echo $ac_n "(cached) $ac_c" 1>&6
14754 else
14755   cat > conftest.$ac_ext <<EOF
14756 #line 14757 "configure"
14757 #include "confdefs.h"
14758 #include <sys/types.h>
14759 #include <time.h>
14760 int main() {
14761 struct tm *tp; tp->tm_sec;
14762 ; return 0; }
14763 EOF
14764 if { (eval echo configure:14765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14765   rm -rf conftest*
14766   ac_cv_struct_tm=time.h
14767 else
14768   echo "configure: failed program was:" >&5
14769   cat conftest.$ac_ext >&5
14770   rm -rf conftest*
14771   ac_cv_struct_tm=sys/time.h
14772 fi
14773 rm -f conftest*
14774 fi
14775
14776 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14777 if test $ac_cv_struct_tm = sys/time.h; then
14778   cat >> confdefs.h <<\EOF
14779 #define TM_IN_SYS_TIME 1
14780 EOF
14781
14782 fi
14783
14784 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14785 echo "configure:14786: checking for uid_t in sys/types.h" >&5
14786 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14787   echo $ac_n "(cached) $ac_c" 1>&6
14788 else
14789   cat > conftest.$ac_ext <<EOF
14790 #line 14791 "configure"
14791 #include "confdefs.h"
14792 #include <sys/types.h>
14793 EOF
14794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14795   egrep "uid_t" >/dev/null 2>&1; then
14796   rm -rf conftest*
14797   ac_cv_type_uid_t=yes
14798 else
14799   rm -rf conftest*
14800   ac_cv_type_uid_t=no
14801 fi
14802 rm -f conftest*
14803
14804 fi
14805
14806 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14807 if test $ac_cv_type_uid_t = no; then
14808   cat >> confdefs.h <<\EOF
14809 #define uid_t int
14810 EOF
14811
14812   cat >> confdefs.h <<\EOF
14813 #define gid_t int
14814 EOF
14815
14816 fi
14817
14818 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14819 echo "configure:14820: checking for sig_atomic_t" >&5
14820 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14821   echo $ac_n "(cached) $ac_c" 1>&6
14822 else
14823   cat > conftest.$ac_ext <<EOF
14824 #line 14825 "configure"
14825 #include "confdefs.h"
14826 #include <signal.h>
14827 int main() {
14828 sig_atomic_t atomic;
14829 ; return 0; }
14830 EOF
14831 if { (eval echo configure:14832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14832   rm -rf conftest*
14833   ol_cv_type_sig_atomic_t=yes
14834 else
14835   echo "configure: failed program was:" >&5
14836   cat conftest.$ac_ext >&5
14837   rm -rf conftest*
14838   ol_cv_type_sig_atomic_t=no
14839 fi
14840 rm -f conftest*
14841 fi
14842
14843 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14844   if test $ol_cv_type_sig_atomic_t = no; then
14845     cat >> confdefs.h <<\EOF
14846 #define sig_atomic_t int
14847 EOF
14848
14849   fi
14850  
14851
14852
14853 # test for pw_gecos in struct passwd
14854 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14855 echo "configure:14856: checking struct passwd for pw_gecos" >&5
14856 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14857   echo $ac_n "(cached) $ac_c" 1>&6
14858 else
14859   
14860         cat > conftest.$ac_ext <<EOF
14861 #line 14862 "configure"
14862 #include "confdefs.h"
14863 #include <pwd.h>
14864 int main() {
14865
14866         struct passwd pwd;
14867         pwd.pw_gecos = pwd.pw_name;
14868
14869 ; return 0; }
14870 EOF
14871 if { (eval echo configure:14872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14872   rm -rf conftest*
14873   ol_cv_struct_passwd_pw_gecos=yes
14874 else
14875   echo "configure: failed program was:" >&5
14876   cat conftest.$ac_ext >&5
14877   rm -rf conftest*
14878   ol_cv_struct_passwd_pw_gecos=no
14879 fi
14880 rm -f conftest*
14881 fi
14882
14883 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14884 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14885         cat >> confdefs.h <<\EOF
14886 #define HAVE_PW_GECOS 1
14887 EOF
14888
14889 fi
14890
14891 # test for pw_passwd in struct passwd
14892 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14893 echo "configure:14894: checking struct passwd for pw_passwd" >&5
14894 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14895   echo $ac_n "(cached) $ac_c" 1>&6
14896 else
14897   
14898         cat > conftest.$ac_ext <<EOF
14899 #line 14900 "configure"
14900 #include "confdefs.h"
14901 #include <pwd.h>
14902 int main() {
14903
14904         struct passwd pwd;
14905         pwd.pw_passwd = pwd.pw_name;
14906
14907 ; return 0; }
14908 EOF
14909 if { (eval echo configure:14910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14910   rm -rf conftest*
14911   ol_cv_struct_passwd_pw_passwd=yes
14912 else
14913   echo "configure: failed program was:" >&5
14914   cat conftest.$ac_ext >&5
14915   rm -rf conftest*
14916   ol_cv_struct_passwd_pw_passwd=no
14917 fi
14918 rm -f conftest*
14919 fi
14920
14921 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14922 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14923         cat >> confdefs.h <<\EOF
14924 #define HAVE_PW_PASSWD 1
14925 EOF
14926
14927 fi
14928
14929
14930 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14931 echo "configure:14932: checking if toupper() requires islower()" >&5
14932 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14933   echo $ac_n "(cached) $ac_c" 1>&6
14934 else
14935   
14936         if test "$cross_compiling" = yes; then
14937   ol_cv_c_upper_lower=safe
14938 else
14939   cat > conftest.$ac_ext <<EOF
14940 #line 14941 "configure"
14941 #include "confdefs.h"
14942
14943 #include <ctype.h>
14944 main()
14945 {
14946         if ('C' == toupper('C'))
14947                 exit(0);
14948         else
14949                 exit(1);
14950 }
14951 EOF
14952 if { (eval echo configure:14953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14953 then
14954   ol_cv_c_upper_lower=no
14955 else
14956   echo "configure: failed program was:" >&5
14957   cat conftest.$ac_ext >&5
14958   rm -fr conftest*
14959   ol_cv_c_upper_lower=yes
14960 fi
14961 rm -fr conftest*
14962 fi
14963
14964 fi
14965
14966 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14967 if test $ol_cv_c_upper_lower != no ; then
14968         cat >> confdefs.h <<\EOF
14969 #define C_UPPER_LOWER 1
14970 EOF
14971
14972 fi
14973
14974 echo $ac_n "checking for working const""... $ac_c" 1>&6
14975 echo "configure:14976: checking for working const" >&5
14976 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14977   echo $ac_n "(cached) $ac_c" 1>&6
14978 else
14979   cat > conftest.$ac_ext <<EOF
14980 #line 14981 "configure"
14981 #include "confdefs.h"
14982
14983 int main() {
14984
14985 /* Ultrix mips cc rejects this.  */
14986 typedef int charset[2]; const charset x;
14987 /* SunOS 4.1.1 cc rejects this.  */
14988 char const *const *ccp;
14989 char **p;
14990 /* NEC SVR4.0.2 mips cc rejects this.  */
14991 struct point {int x, y;};
14992 static struct point const zero = {0,0};
14993 /* AIX XL C 1.02.0.0 rejects this.
14994    It does not let you subtract one const X* pointer from another in an arm
14995    of an if-expression whose if-part is not a constant expression */
14996 const char *g = "string";
14997 ccp = &g + (g ? g-g : 0);
14998 /* HPUX 7.0 cc rejects these. */
14999 ++ccp;
15000 p = (char**) ccp;
15001 ccp = (char const *const *) p;
15002 { /* SCO 3.2v4 cc rejects this.  */
15003   char *t;
15004   char const *s = 0 ? (char *) 0 : (char const *) 0;
15005
15006   *t++ = 0;
15007 }
15008 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15009   int x[] = {25, 17};
15010   const int *foo = &x[0];
15011   ++foo;
15012 }
15013 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15014   typedef const int *iptr;
15015   iptr p = 0;
15016   ++p;
15017 }
15018 { /* AIX XL C 1.02.0.0 rejects this saying
15019      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15020   struct s { int j; const int *ap[3]; };
15021   struct s *b; b->j = 5;
15022 }
15023 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15024   const int foo = 10;
15025 }
15026
15027 ; return 0; }
15028 EOF
15029 if { (eval echo configure:15030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15030   rm -rf conftest*
15031   ac_cv_c_const=yes
15032 else
15033   echo "configure: failed program was:" >&5
15034   cat conftest.$ac_ext >&5
15035   rm -rf conftest*
15036   ac_cv_c_const=no
15037 fi
15038 rm -f conftest*
15039 fi
15040
15041 echo "$ac_t""$ac_cv_c_const" 1>&6
15042 if test $ac_cv_c_const = no; then
15043   cat >> confdefs.h <<\EOF
15044 #define const 
15045 EOF
15046
15047 fi
15048
15049 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
15050 echo "configure:15051: checking if compiler understands volatile" >&5
15051 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
15052   echo $ac_n "(cached) $ac_c" 1>&6
15053 else
15054   cat > conftest.$ac_ext <<EOF
15055 #line 15056 "configure"
15056 #include "confdefs.h"
15057 int x, y, z;
15058 int main() {
15059 volatile int a; int * volatile b = x ? &y : &z;
15060       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
15061       *b = 0;
15062 ; return 0; }
15063 EOF
15064 if { (eval echo configure:15065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15065   rm -rf conftest*
15066   ol_cv_c_volatile=yes
15067 else
15068   echo "configure: failed program was:" >&5
15069   cat conftest.$ac_ext >&5
15070   rm -rf conftest*
15071   ol_cv_c_volatile=no
15072 fi
15073 rm -f conftest*
15074 fi
15075
15076 echo "$ac_t""$ol_cv_c_volatile" 1>&6
15077   if test $ol_cv_c_volatile = yes; then
15078     : 
15079   else
15080     cat >> confdefs.h <<\EOF
15081 #define volatile 
15082 EOF
15083
15084   fi
15085  
15086
15087 if test $cross_compiling = yes ; then
15088         cat >> confdefs.h <<\EOF
15089 #define CROSS_COMPILING 1
15090 EOF
15091
15092 else
15093         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
15094 echo "configure:15095: checking whether byte ordering is bigendian" >&5
15095 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
15096   echo $ac_n "(cached) $ac_c" 1>&6
15097 else
15098   ac_cv_c_bigendian=unknown
15099 # See if sys/param.h defines the BYTE_ORDER macro.
15100 cat > conftest.$ac_ext <<EOF
15101 #line 15102 "configure"
15102 #include "confdefs.h"
15103 #include <sys/types.h>
15104 #include <sys/param.h>
15105 int main() {
15106
15107 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15108  bogus endian macros
15109 #endif
15110 ; return 0; }
15111 EOF
15112 if { (eval echo configure:15113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15113   rm -rf conftest*
15114   # It does; now see whether it defined to BIG_ENDIAN or not.
15115 cat > conftest.$ac_ext <<EOF
15116 #line 15117 "configure"
15117 #include "confdefs.h"
15118 #include <sys/types.h>
15119 #include <sys/param.h>
15120 int main() {
15121
15122 #if BYTE_ORDER != BIG_ENDIAN
15123  not big endian
15124 #endif
15125 ; return 0; }
15126 EOF
15127 if { (eval echo configure:15128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15128   rm -rf conftest*
15129   ac_cv_c_bigendian=yes
15130 else
15131   echo "configure: failed program was:" >&5
15132   cat conftest.$ac_ext >&5
15133   rm -rf conftest*
15134   ac_cv_c_bigendian=no
15135 fi
15136 rm -f conftest*
15137 else
15138   echo "configure: failed program was:" >&5
15139   cat conftest.$ac_ext >&5
15140 fi
15141 rm -f conftest*
15142 if test $ac_cv_c_bigendian = unknown; then
15143 if test "$cross_compiling" = yes; then
15144     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15145 else
15146   cat > conftest.$ac_ext <<EOF
15147 #line 15148 "configure"
15148 #include "confdefs.h"
15149 main () {
15150   /* Are we little or big endian?  From Harbison&Steele.  */
15151   union
15152   {
15153     long l;
15154     char c[sizeof (long)];
15155   } u;
15156   u.l = 1;
15157   exit (u.c[sizeof (long) - 1] == 1);
15158 }
15159 EOF
15160 if { (eval echo configure:15161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15161 then
15162   ac_cv_c_bigendian=no
15163 else
15164   echo "configure: failed program was:" >&5
15165   cat conftest.$ac_ext >&5
15166   rm -fr conftest*
15167   ac_cv_c_bigendian=yes
15168 fi
15169 rm -fr conftest*
15170 fi
15171
15172 fi
15173 fi
15174
15175 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15176 if test $ac_cv_c_bigendian = yes; then
15177   cat >> confdefs.h <<\EOF
15178 #define WORDS_BIGENDIAN 1
15179 EOF
15180
15181 fi
15182
15183 fi
15184
15185 echo $ac_n "checking size of short""... $ac_c" 1>&6
15186 echo "configure:15187: checking size of short" >&5 
15187 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15188   echo $ac_n "(cached) $ac_c" 1>&6
15189 else
15190   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15191   cat > conftest.$ac_ext <<EOF
15192 #line 15193 "configure"
15193 #include "confdefs.h"
15194 #include "confdefs.h" 
15195 #include <sys/types.h> 
15196  
15197
15198 int main() {
15199 switch (0) case 0: case (sizeof (short) == $ac_size):;
15200 ; return 0; }
15201 EOF
15202 if { (eval echo configure:15203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15203   rm -rf conftest*
15204   ac_cv_sizeof_short=$ac_size
15205 else
15206   echo "configure: failed program was:" >&5
15207   cat conftest.$ac_ext >&5
15208 fi
15209 rm -f conftest* 
15210   if test x$ac_cv_sizeof_short != x ; then break; fi 
15211 done 
15212
15213 fi
15214  
15215 if test x$ac_cv_sizeof_short = x ; then 
15216   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15217 fi 
15218 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15219 cat >> confdefs.h <<EOF
15220 #define SIZEOF_SHORT $ac_cv_sizeof_short
15221 EOF
15222  
15223  
15224 echo $ac_n "checking size of int""... $ac_c" 1>&6
15225 echo "configure:15226: checking size of int" >&5 
15226 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15227   echo $ac_n "(cached) $ac_c" 1>&6
15228 else
15229   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15230   cat > conftest.$ac_ext <<EOF
15231 #line 15232 "configure"
15232 #include "confdefs.h"
15233 #include "confdefs.h" 
15234 #include <sys/types.h> 
15235  
15236
15237 int main() {
15238 switch (0) case 0: case (sizeof (int) == $ac_size):;
15239 ; return 0; }
15240 EOF
15241 if { (eval echo configure:15242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15242   rm -rf conftest*
15243   ac_cv_sizeof_int=$ac_size
15244 else
15245   echo "configure: failed program was:" >&5
15246   cat conftest.$ac_ext >&5
15247 fi
15248 rm -f conftest* 
15249   if test x$ac_cv_sizeof_int != x ; then break; fi 
15250 done 
15251
15252 fi
15253  
15254 if test x$ac_cv_sizeof_int = x ; then 
15255   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15256 fi 
15257 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15258 cat >> confdefs.h <<EOF
15259 #define SIZEOF_INT $ac_cv_sizeof_int
15260 EOF
15261  
15262  
15263 echo $ac_n "checking size of long""... $ac_c" 1>&6
15264 echo "configure:15265: checking size of long" >&5 
15265 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15266   echo $ac_n "(cached) $ac_c" 1>&6
15267 else
15268   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15269   cat > conftest.$ac_ext <<EOF
15270 #line 15271 "configure"
15271 #include "confdefs.h"
15272 #include "confdefs.h" 
15273 #include <sys/types.h> 
15274  
15275
15276 int main() {
15277 switch (0) case 0: case (sizeof (long) == $ac_size):;
15278 ; return 0; }
15279 EOF
15280 if { (eval echo configure:15281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15281   rm -rf conftest*
15282   ac_cv_sizeof_long=$ac_size
15283 else
15284   echo "configure: failed program was:" >&5
15285   cat conftest.$ac_ext >&5
15286 fi
15287 rm -f conftest* 
15288   if test x$ac_cv_sizeof_long != x ; then break; fi 
15289 done 
15290
15291 fi
15292  
15293 if test x$ac_cv_sizeof_long = x ; then 
15294   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15295 fi 
15296 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15297 cat >> confdefs.h <<EOF
15298 #define SIZEOF_LONG $ac_cv_sizeof_long
15299 EOF
15300  
15301
15302
15303 if test "$ac_cv_sizeof_int" -lt 4 ; then
15304         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15305
15306         cat >> confdefs.h <<\EOF
15307 #define LBER_INT_T long
15308 EOF
15309
15310 else
15311         cat >> confdefs.h <<\EOF
15312 #define LBER_INT_T int
15313 EOF
15314
15315 fi
15316
15317 cat >> confdefs.h <<\EOF
15318 #define LBER_LEN_T long
15319 EOF
15320
15321 cat >> confdefs.h <<\EOF
15322 #define LBER_SOCKET_T int
15323 EOF
15324
15325 cat >> confdefs.h <<\EOF
15326 #define LBER_TAG_T long
15327 EOF
15328
15329
15330 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15331 echo "configure:15332: checking for 8-bit clean memcmp" >&5
15332 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15333   echo $ac_n "(cached) $ac_c" 1>&6
15334 else
15335   if test "$cross_compiling" = yes; then
15336   ac_cv_func_memcmp_clean=no
15337 else
15338   cat > conftest.$ac_ext <<EOF
15339 #line 15340 "configure"
15340 #include "confdefs.h"
15341
15342 main()
15343 {
15344   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15345   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15346 }
15347
15348 EOF
15349 if { (eval echo configure:15350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15350 then
15351   ac_cv_func_memcmp_clean=yes
15352 else
15353   echo "configure: failed program was:" >&5
15354   cat conftest.$ac_ext >&5
15355   rm -fr conftest*
15356   ac_cv_func_memcmp_clean=no
15357 fi
15358 rm -fr conftest*
15359 fi
15360
15361 fi
15362
15363 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15364 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15365
15366 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15367 echo "configure:15368: checking for strftime" >&5
15368 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15369   echo $ac_n "(cached) $ac_c" 1>&6
15370 else
15371   cat > conftest.$ac_ext <<EOF
15372 #line 15373 "configure"
15373 #include "confdefs.h"
15374 /* System header to define __stub macros and hopefully few prototypes,
15375     which can conflict with char strftime(); below.  */
15376 #include <assert.h>
15377 /* Override any gcc2 internal prototype to avoid an error.  */
15378 /* We use char because int might match the return type of a gcc2
15379     builtin and then its argument prototype would still apply.  */
15380 char strftime();
15381 char (*f)();
15382
15383 int main() {
15384
15385 /* The GNU C library defines this for functions which it implements
15386     to always fail with ENOSYS.  Some functions are actually named
15387     something starting with __ and the normal name is an alias.  */
15388 #if defined (__stub_strftime) || defined (__stub___strftime)
15389 choke me
15390 #else
15391 f = strftime;
15392 #endif
15393
15394 ; return 0; }
15395 EOF
15396 if { (eval echo configure:15397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15397   rm -rf conftest*
15398   eval "ac_cv_func_strftime=yes"
15399 else
15400   echo "configure: failed program was:" >&5
15401   cat conftest.$ac_ext >&5
15402   rm -rf conftest*
15403   eval "ac_cv_func_strftime=no"
15404 fi
15405 rm -f conftest*
15406 fi
15407
15408 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15409   echo "$ac_t""yes" 1>&6
15410   cat >> confdefs.h <<\EOF
15411 #define HAVE_STRFTIME 1
15412 EOF
15413
15414 else
15415   echo "$ac_t""no" 1>&6
15416 # strftime is in -lintl on SCO UNIX.
15417 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15418 echo "configure:15419: checking for strftime in -lintl" >&5
15419 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15420 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15421   echo $ac_n "(cached) $ac_c" 1>&6
15422 else
15423   ac_save_LIBS="$LIBS"
15424 LIBS="-lintl  $LIBS"
15425 cat > conftest.$ac_ext <<EOF
15426 #line 15427 "configure"
15427 #include "confdefs.h"
15428 /* Override any gcc2 internal prototype to avoid an error.  */
15429 /* We use char because int might match the return type of a gcc2
15430     builtin and then its argument prototype would still apply.  */
15431 char strftime();
15432
15433 int main() {
15434 strftime()
15435 ; return 0; }
15436 EOF
15437 if { (eval echo configure:15438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15438   rm -rf conftest*
15439   eval "ac_cv_lib_$ac_lib_var=yes"
15440 else
15441   echo "configure: failed program was:" >&5
15442   cat conftest.$ac_ext >&5
15443   rm -rf conftest*
15444   eval "ac_cv_lib_$ac_lib_var=no"
15445 fi
15446 rm -f conftest*
15447 LIBS="$ac_save_LIBS"
15448
15449 fi
15450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15451   echo "$ac_t""yes" 1>&6
15452   cat >> confdefs.h <<\EOF
15453 #define HAVE_STRFTIME 1
15454 EOF
15455
15456 LIBS="-lintl $LIBS"
15457 else
15458   echo "$ac_t""no" 1>&6
15459 fi
15460
15461 fi
15462
15463
15464 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15465 echo "configure:15466: checking for inet_aton()" >&5
15466 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15467   echo $ac_n "(cached) $ac_c" 1>&6
15468 else
15469   cat > conftest.$ac_ext <<EOF
15470 #line 15471 "configure"
15471 #include "confdefs.h"
15472
15473 #ifdef HAVE_SYS_TYPES_H
15474 #       include <sys/types.h>
15475 #endif
15476 #ifdef HAVE_SYS_SOCKET_H
15477 #       include <sys/socket.h>
15478 #       ifdef HAVE_SYS_SELECT_H
15479 #               include <sys/select.h>
15480 #       endif
15481 #       include <netinet/in.h>
15482 #       ifdef HAVE_ARPA_INET_H
15483 #               include <arpa/inet.h>
15484 #       endif
15485 #endif
15486
15487 int main() {
15488 struct in_addr in;
15489 int rc = inet_aton( "255.255.255.255", &in );
15490 ; return 0; }
15491 EOF
15492 if { (eval echo configure:15493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15493   rm -rf conftest*
15494   ol_cv_func_inet_aton=yes
15495 else
15496   echo "configure: failed program was:" >&5
15497   cat conftest.$ac_ext >&5
15498   rm -rf conftest*
15499   ol_cv_func_inet_aton=no
15500 fi
15501 rm -f conftest*
15502 fi
15503
15504 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15505   if test $ol_cv_func_inet_aton != no; then
15506     cat >> confdefs.h <<\EOF
15507 #define HAVE_INET_ATON 1
15508 EOF
15509
15510   fi
15511  
15512
15513 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15514 echo "configure:15515: checking for _spawnlp" >&5
15515 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15516   echo $ac_n "(cached) $ac_c" 1>&6
15517 else
15518   cat > conftest.$ac_ext <<EOF
15519 #line 15520 "configure"
15520 #include "confdefs.h"
15521 /* System header to define __stub macros and hopefully few prototypes,
15522     which can conflict with char _spawnlp(); below.  */
15523 #include <assert.h>
15524 /* Override any gcc2 internal prototype to avoid an error.  */
15525 /* We use char because int might match the return type of a gcc2
15526     builtin and then its argument prototype would still apply.  */
15527 char _spawnlp();
15528 char (*f)();
15529
15530 int main() {
15531
15532 /* The GNU C library defines this for functions which it implements
15533     to always fail with ENOSYS.  Some functions are actually named
15534     something starting with __ and the normal name is an alias.  */
15535 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15536 choke me
15537 #else
15538 f = _spawnlp;
15539 #endif
15540
15541 ; return 0; }
15542 EOF
15543 if { (eval echo configure:15544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15544   rm -rf conftest*
15545   eval "ac_cv_func__spawnlp=yes"
15546 else
15547   echo "configure: failed program was:" >&5
15548   cat conftest.$ac_ext >&5
15549   rm -rf conftest*
15550   eval "ac_cv_func__spawnlp=no"
15551 fi
15552 rm -f conftest*
15553 fi
15554
15555 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15556   echo "$ac_t""yes" 1>&6
15557   cat >> confdefs.h <<\EOF
15558 #define HAVE_SPAWNLP 1
15559 EOF
15560
15561 else
15562   echo "$ac_t""no" 1>&6
15563 fi
15564
15565
15566 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15567 echo "configure:15568: checking for _snprintf" >&5
15568 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15569   echo $ac_n "(cached) $ac_c" 1>&6
15570 else
15571   cat > conftest.$ac_ext <<EOF
15572 #line 15573 "configure"
15573 #include "confdefs.h"
15574 /* System header to define __stub macros and hopefully few prototypes,
15575     which can conflict with char _snprintf(); below.  */
15576 #include <assert.h>
15577 /* Override any gcc2 internal prototype to avoid an error.  */
15578 /* We use char because int might match the return type of a gcc2
15579     builtin and then its argument prototype would still apply.  */
15580 char _snprintf();
15581 char (*f)();
15582
15583 int main() {
15584
15585 /* The GNU C library defines this for functions which it implements
15586     to always fail with ENOSYS.  Some functions are actually named
15587     something starting with __ and the normal name is an alias.  */
15588 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15589 choke me
15590 #else
15591 f = _snprintf;
15592 #endif
15593
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_func__snprintf=yes"
15599 else
15600   echo "configure: failed program was:" >&5
15601   cat conftest.$ac_ext >&5
15602   rm -rf conftest*
15603   eval "ac_cv_func__snprintf=no"
15604 fi
15605 rm -f conftest*
15606 fi
15607
15608 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15609   echo "$ac_t""yes" 1>&6
15610   ac_cv_func_snprintf=yes
15611         cat >> confdefs.h <<\EOF
15612 #define snprintf _snprintf
15613 EOF
15614
15615
15616 else
15617   echo "$ac_t""no" 1>&6
15618 fi
15619
15620
15621 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15622 echo "configure:15623: checking for _vsnprintf" >&5
15623 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15624   echo $ac_n "(cached) $ac_c" 1>&6
15625 else
15626   cat > conftest.$ac_ext <<EOF
15627 #line 15628 "configure"
15628 #include "confdefs.h"
15629 /* System header to define __stub macros and hopefully few prototypes,
15630     which can conflict with char _vsnprintf(); below.  */
15631 #include <assert.h>
15632 /* Override any gcc2 internal prototype to avoid an error.  */
15633 /* We use char because int might match the return type of a gcc2
15634     builtin and then its argument prototype would still apply.  */
15635 char _vsnprintf();
15636 char (*f)();
15637
15638 int main() {
15639
15640 /* The GNU C library defines this for functions which it implements
15641     to always fail with ENOSYS.  Some functions are actually named
15642     something starting with __ and the normal name is an alias.  */
15643 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15644 choke me
15645 #else
15646 f = _vsnprintf;
15647 #endif
15648
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   eval "ac_cv_func__vsnprintf=yes"
15654 else
15655   echo "configure: failed program was:" >&5
15656   cat conftest.$ac_ext >&5
15657   rm -rf conftest*
15658   eval "ac_cv_func__vsnprintf=no"
15659 fi
15660 rm -f conftest*
15661 fi
15662
15663 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15664   echo "$ac_t""yes" 1>&6
15665   ac_cv_func_vsnprintf=yes
15666         cat >> confdefs.h <<\EOF
15667 #define vsnprintf _vsnprintf
15668 EOF
15669
15670
15671 else
15672   echo "$ac_t""no" 1>&6
15673 fi
15674
15675
15676 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15677 echo "configure:15678: checking for vprintf" >&5
15678 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15679   echo $ac_n "(cached) $ac_c" 1>&6
15680 else
15681   cat > conftest.$ac_ext <<EOF
15682 #line 15683 "configure"
15683 #include "confdefs.h"
15684 /* System header to define __stub macros and hopefully few prototypes,
15685     which can conflict with char vprintf(); below.  */
15686 #include <assert.h>
15687 /* Override any gcc2 internal prototype to avoid an error.  */
15688 /* We use char because int might match the return type of a gcc2
15689     builtin and then its argument prototype would still apply.  */
15690 char vprintf();
15691 char (*f)();
15692
15693 int main() {
15694
15695 /* The GNU C library defines this for functions which it implements
15696     to always fail with ENOSYS.  Some functions are actually named
15697     something starting with __ and the normal name is an alias.  */
15698 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15699 choke me
15700 #else
15701 f = vprintf;
15702 #endif
15703
15704 ; return 0; }
15705 EOF
15706 if { (eval echo configure:15707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15707   rm -rf conftest*
15708   eval "ac_cv_func_vprintf=yes"
15709 else
15710   echo "configure: failed program was:" >&5
15711   cat conftest.$ac_ext >&5
15712   rm -rf conftest*
15713   eval "ac_cv_func_vprintf=no"
15714 fi
15715 rm -f conftest*
15716 fi
15717
15718 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15719   echo "$ac_t""yes" 1>&6
15720   cat >> confdefs.h <<\EOF
15721 #define HAVE_VPRINTF 1
15722 EOF
15723
15724 else
15725   echo "$ac_t""no" 1>&6
15726 fi
15727
15728 if test "$ac_cv_func_vprintf" != yes; then
15729 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15730 echo "configure:15731: checking for _doprnt" >&5
15731 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15732   echo $ac_n "(cached) $ac_c" 1>&6
15733 else
15734   cat > conftest.$ac_ext <<EOF
15735 #line 15736 "configure"
15736 #include "confdefs.h"
15737 /* System header to define __stub macros and hopefully few prototypes,
15738     which can conflict with char _doprnt(); below.  */
15739 #include <assert.h>
15740 /* Override any gcc2 internal prototype to avoid an error.  */
15741 /* We use char because int might match the return type of a gcc2
15742     builtin and then its argument prototype would still apply.  */
15743 char _doprnt();
15744 char (*f)();
15745
15746 int main() {
15747
15748 /* The GNU C library defines this for functions which it implements
15749     to always fail with ENOSYS.  Some functions are actually named
15750     something starting with __ and the normal name is an alias.  */
15751 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15752 choke me
15753 #else
15754 f = _doprnt;
15755 #endif
15756
15757 ; return 0; }
15758 EOF
15759 if { (eval echo configure:15760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15760   rm -rf conftest*
15761   eval "ac_cv_func__doprnt=yes"
15762 else
15763   echo "configure: failed program was:" >&5
15764   cat conftest.$ac_ext >&5
15765   rm -rf conftest*
15766   eval "ac_cv_func__doprnt=no"
15767 fi
15768 rm -f conftest*
15769 fi
15770
15771 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15772   echo "$ac_t""yes" 1>&6
15773   cat >> confdefs.h <<\EOF
15774 #define HAVE_DOPRNT 1
15775 EOF
15776
15777 else
15778   echo "$ac_t""no" 1>&6
15779 fi
15780
15781 fi
15782
15783
15784 if test $ac_cv_func_vprintf = yes ; then
15785                 for ac_func in vsnprintf vsprintf
15786 do
15787 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15788 echo "configure:15789: checking for $ac_func" >&5
15789 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15790   echo $ac_n "(cached) $ac_c" 1>&6
15791 else
15792   cat > conftest.$ac_ext <<EOF
15793 #line 15794 "configure"
15794 #include "confdefs.h"
15795 /* System header to define __stub macros and hopefully few prototypes,
15796     which can conflict with char $ac_func(); below.  */
15797 #include <assert.h>
15798 /* Override any gcc2 internal prototype to avoid an error.  */
15799 /* We use char because int might match the return type of a gcc2
15800     builtin and then its argument prototype would still apply.  */
15801 char $ac_func();
15802 char (*f)();
15803
15804 int main() {
15805
15806 /* The GNU C library defines this for functions which it implements
15807     to always fail with ENOSYS.  Some functions are actually named
15808     something starting with __ and the normal name is an alias.  */
15809 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15810 choke me
15811 #else
15812 f = $ac_func;
15813 #endif
15814
15815 ; return 0; }
15816 EOF
15817 if { (eval echo configure:15818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15818   rm -rf conftest*
15819   eval "ac_cv_func_$ac_func=yes"
15820 else
15821   echo "configure: failed program was:" >&5
15822   cat conftest.$ac_ext >&5
15823   rm -rf conftest*
15824   eval "ac_cv_func_$ac_func=no"
15825 fi
15826 rm -f conftest*
15827 fi
15828
15829 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15830   echo "$ac_t""yes" 1>&6
15831     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15832   cat >> confdefs.h <<EOF
15833 #define $ac_tr_func 1
15834 EOF
15835  
15836 else
15837   echo "$ac_t""no" 1>&6
15838 fi
15839 done
15840
15841 fi
15842
15843 for ac_func in \
15844         bcopy                   \
15845         closesocket             \
15846         chroot                  \
15847         endgrent                \
15848         endpwent                \
15849         flock                   \
15850         getdtablesize   \
15851         getgrgid                \
15852         gethostname             \
15853         getpass                 \
15854         getpassphrase   \
15855         getpwuid                \
15856         getpwnam                \
15857         getspnam                \
15858         gettimeofday    \
15859         initgroups              \
15860         lockf                   \
15861         memcpy                  \
15862         memmove                 \
15863         mkstemp                 \
15864         pipe                    \
15865         read                    \
15866         recv                    \
15867         recvfrom                \
15868         setpwfile               \
15869         setgid                  \
15870         setegid                 \
15871         setsid                  \
15872         setuid                  \
15873         seteuid                 \
15874         sigaction               \
15875         signal                  \
15876         sigset                  \
15877         snprintf                \
15878         strdup                  \
15879         strerror                \
15880         strpbrk                 \
15881         strrchr                 \
15882         strsep                  \
15883         strstr                  \
15884         strtol                  \
15885         strtoul                 \
15886         strspn                  \
15887         sysconf                 \
15888         waitpid                 \
15889         wait4                   \
15890         write                   \
15891         send                    \
15892         sendto                  \
15893
15894 do
15895 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15896 echo "configure:15897: checking for $ac_func" >&5
15897 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15898   echo $ac_n "(cached) $ac_c" 1>&6
15899 else
15900   cat > conftest.$ac_ext <<EOF
15901 #line 15902 "configure"
15902 #include "confdefs.h"
15903 /* System header to define __stub macros and hopefully few prototypes,
15904     which can conflict with char $ac_func(); below.  */
15905 #include <assert.h>
15906 /* Override any gcc2 internal prototype to avoid an error.  */
15907 /* We use char because int might match the return type of a gcc2
15908     builtin and then its argument prototype would still apply.  */
15909 char $ac_func();
15910 char (*f)();
15911
15912 int main() {
15913
15914 /* The GNU C library defines this for functions which it implements
15915     to always fail with ENOSYS.  Some functions are actually named
15916     something starting with __ and the normal name is an alias.  */
15917 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15918 choke me
15919 #else
15920 f = $ac_func;
15921 #endif
15922
15923 ; return 0; }
15924 EOF
15925 if { (eval echo configure:15926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15926   rm -rf conftest*
15927   eval "ac_cv_func_$ac_func=yes"
15928 else
15929   echo "configure: failed program was:" >&5
15930   cat conftest.$ac_ext >&5
15931   rm -rf conftest*
15932   eval "ac_cv_func_$ac_func=no"
15933 fi
15934 rm -f conftest*
15935 fi
15936
15937 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15938   echo "$ac_t""yes" 1>&6
15939     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15940   cat >> confdefs.h <<EOF
15941 #define $ac_tr_func 1
15942 EOF
15943  
15944 else
15945   echo "$ac_t""no" 1>&6
15946 fi
15947 done
15948
15949
15950 for ac_func in getopt tempnam
15951 do
15952 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15953 echo "configure:15954: checking for $ac_func" >&5
15954 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15955   echo $ac_n "(cached) $ac_c" 1>&6
15956 else
15957   cat > conftest.$ac_ext <<EOF
15958 #line 15959 "configure"
15959 #include "confdefs.h"
15960 /* System header to define __stub macros and hopefully few prototypes,
15961     which can conflict with char $ac_func(); below.  */
15962 #include <assert.h>
15963 /* Override any gcc2 internal prototype to avoid an error.  */
15964 /* We use char because int might match the return type of a gcc2
15965     builtin and then its argument prototype would still apply.  */
15966 char $ac_func();
15967 char (*f)();
15968
15969 int main() {
15970
15971 /* The GNU C library defines this for functions which it implements
15972     to always fail with ENOSYS.  Some functions are actually named
15973     something starting with __ and the normal name is an alias.  */
15974 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15975 choke me
15976 #else
15977 f = $ac_func;
15978 #endif
15979
15980 ; return 0; }
15981 EOF
15982 if { (eval echo configure:15983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15983   rm -rf conftest*
15984   eval "ac_cv_func_$ac_func=yes"
15985 else
15986   echo "configure: failed program was:" >&5
15987   cat conftest.$ac_ext >&5
15988   rm -rf conftest*
15989   eval "ac_cv_func_$ac_func=no"
15990 fi
15991 rm -f conftest*
15992 fi
15993
15994 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15995   echo "$ac_t""yes" 1>&6
15996     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15997   cat >> confdefs.h <<EOF
15998 #define $ac_tr_func 1
15999 EOF
16000  
16001 else
16002   echo "$ac_t""no" 1>&6
16003 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
16004 fi
16005 done
16006
16007
16008
16009 if test "$ac_cv_func_getopt" != yes; then
16010     LIBSRCS="$LIBSRCS getopt.c"
16011 fi
16012
16013 if test "$ac_cv_func_tempnam" != yes; then
16014     LIBSRCS="$LIBSRCS tempnam.c"
16015 fi
16016
16017 # Check Configuration
16018 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
16019 echo "configure:16020: checking declaration of sys_errlist" >&5
16020 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
16021   echo $ac_n "(cached) $ac_c" 1>&6
16022 else
16023   
16024         cat > conftest.$ac_ext <<EOF
16025 #line 16026 "configure"
16026 #include "confdefs.h"
16027
16028 #include <stdio.h>
16029 #include <sys/types.h>
16030 #include <errno.h>
16031 #ifdef WINNT
16032 #include <stdlib.h>
16033 #endif 
16034 int main() {
16035 char *c = (char *) *sys_errlist
16036 ; return 0; }
16037 EOF
16038 if { (eval echo configure:16039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16039   rm -rf conftest*
16040   ol_cv_dcl_sys_errlist=yes
16041         ol_cv_have_sys_errlist=yes
16042 else
16043   echo "configure: failed program was:" >&5
16044   cat conftest.$ac_ext >&5
16045   rm -rf conftest*
16046   ol_cv_dcl_sys_errlist=no
16047 fi
16048 rm -f conftest*
16049 fi
16050
16051 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
16052 #
16053 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16054 if test $ol_cv_dcl_sys_errlist = no ; then
16055         cat >> confdefs.h <<\EOF
16056 #define DECL_SYS_ERRLIST 1
16057 EOF
16058
16059
16060         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
16061 echo "configure:16062: checking existence of sys_errlist" >&5
16062 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
16063   echo $ac_n "(cached) $ac_c" 1>&6
16064 else
16065   
16066                 cat > conftest.$ac_ext <<EOF
16067 #line 16068 "configure"
16068 #include "confdefs.h"
16069 #include <errno.h>
16070 int main() {
16071 char *c = (char *) *sys_errlist
16072 ; return 0; }
16073 EOF
16074 if { (eval echo configure:16075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16075   rm -rf conftest*
16076   ol_cv_have_sys_errlist=yes
16077 else
16078   echo "configure: failed program was:" >&5
16079   cat conftest.$ac_ext >&5
16080   rm -rf conftest*
16081   ol_cv_have_sys_errlist=no
16082 fi
16083 rm -f conftest*
16084 fi
16085
16086 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
16087 fi
16088 if test $ol_cv_have_sys_errlist = yes ; then
16089         cat >> confdefs.h <<\EOF
16090 #define HAVE_SYS_ERRLIST 1
16091 EOF
16092
16093 fi
16094
16095
16096
16097 if test "$ol_enable_debug" != no ; then
16098         cat >> confdefs.h <<\EOF
16099 #define LDAP_DEBUG 1
16100 EOF
16101
16102 fi
16103 if test "$ol_enable_syslog" = yes ; then
16104         cat >> confdefs.h <<\EOF
16105 #define LDAP_SYSLOG 1
16106 EOF
16107
16108 fi
16109 if test "$ol_enable_libui" = yes ; then
16110         cat >> confdefs.h <<\EOF
16111 #define LDAP_LIBUI 1
16112 EOF
16113
16114 fi
16115 if test "$ol_enable_cache" = no ; then
16116         cat >> confdefs.h <<\EOF
16117 #define LDAP_NOCACHE 1
16118 EOF
16119
16120 fi
16121 if test "$ol_link_kbind" != no ; then
16122         cat >> confdefs.h <<\EOF
16123 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16124 EOF
16125
16126 fi
16127 if test "$ol_enable_dns" != no ; then
16128         cat >> confdefs.h <<\EOF
16129 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
16130 EOF
16131
16132 fi
16133 if test "$ol_enable_proctitle" != no ; then
16134         cat >> confdefs.h <<\EOF
16135 #define LDAP_PROCTITLE 1
16136 EOF
16137
16138 fi
16139 if test "$ol_enable_referrals" != no ; then
16140         cat >> confdefs.h <<\EOF
16141 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16142 EOF
16143
16144 fi
16145 if test "$ol_enable_cldap" != no ; then
16146         cat >> confdefs.h <<\EOF
16147 #define LDAP_CONNECTIONLESS 1
16148 EOF
16149
16150 fi
16151 if test "$ol_enable_ldapi" != no; then
16152         cat >> confdefs.h <<\EOF
16153 #define USE_PF_LOCAL 1
16154 EOF
16155
16156 fi
16157
16158 if test "$ol_enable_cleartext" != no ; then
16159         cat >> confdefs.h <<\EOF
16160 #define SLAPD_CLEARTEXT 1
16161 EOF
16162
16163 fi
16164 if test "$ol_enable_crypt" != no ; then
16165         cat >> confdefs.h <<\EOF
16166 #define SLAPD_CRYPT 1
16167 EOF
16168
16169 fi
16170 if test "$ol_link_kpasswd" != no ; then
16171         cat >> confdefs.h <<\EOF
16172 #define SLAPD_KPASSWD 1
16173 EOF
16174
16175 fi
16176 if test "$ol_link_spasswd" != no ; then
16177         cat >> confdefs.h <<\EOF
16178 #define SLAPD_SPASSWD 1
16179 EOF
16180
16181 fi
16182 if test "$ol_enable_multimaster" != no ; then
16183         cat >> confdefs.h <<\EOF
16184 #define SLAPD_MULTIMASTER 1
16185 EOF
16186
16187 fi
16188 if test "$ol_enable_phonetic" != no ; then
16189         cat >> confdefs.h <<\EOF
16190 #define SLAPD_PHONETIC 1
16191 EOF
16192
16193 fi
16194 if test "$ol_enable_rlookups" != no ; then
16195         cat >> confdefs.h <<\EOF
16196 #define SLAPD_RLOOKUPS 1
16197 EOF
16198
16199 fi
16200 if test "$ol_enable_aci" != no ; then
16201         cat >> confdefs.h <<\EOF
16202 #define SLAPD_ACI_ENABLED 1
16203 EOF
16204
16205 fi
16206
16207 if test "$ol_link_modules" != no ; then
16208         cat >> confdefs.h <<\EOF
16209 #define SLAPD_MODULES 1
16210 EOF
16211
16212         BUILD_SLAPD=yes
16213         SLAPD_MODULES_LDFLAGS="-dlopen self"
16214 fi
16215
16216 if test "$ol_link_bdb2" != no ; then
16217         cat >> confdefs.h <<\EOF
16218 #define SLAPD_BDB2 1
16219 EOF
16220
16221         BUILD_SLAPD=yes
16222         BUILD_BDB2=yes
16223         if test "$ol_with_bdb2_module" != static ; then
16224                 cat >> confdefs.h <<\EOF
16225 #define SLAPD_BDB2_DYNAMIC 1
16226 EOF
16227
16228                 BUILD_BDB2=mod
16229                 BUILD_BDB2_DYNAMIC=shared
16230                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
16231         fi
16232 fi
16233
16234 if test "$ol_enable_dnssrv" != no ; then
16235         cat >> confdefs.h <<\EOF
16236 #define SLAPD_DNSSRV 1
16237 EOF
16238
16239         BUILD_SLAPD=yes
16240         BUILD_DNSSRV=yes
16241         if test "$ol_with_dnssrv_module" != static ; then
16242                 cat >> confdefs.h <<\EOF
16243 #define SLAPD_DNSSRV_DYNAMIC 1
16244 EOF
16245
16246                 BUILD_DNSSRV=mod
16247                 BUILD_DNSSRV_DYNAMIC=shared
16248                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16249         fi
16250 fi
16251
16252 if test "$ol_enable_ldap" != no ; then
16253         cat >> confdefs.h <<\EOF
16254 #define SLAPD_LDAP 1
16255 EOF
16256
16257         BUILD_SLAPD=yes
16258         BUILD_LDAP=yes
16259         if test "$ol_with_ldap_module" != static ; then
16260                 cat >> confdefs.h <<\EOF
16261 #define SLAPD_LDAP_DYNAMIC 1
16262 EOF
16263
16264                 BUILD_LDAP=mod
16265                 BUILD_LDAP_DYNAMIC=shared
16266                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16267         fi
16268 fi
16269
16270 if test "$ol_link_ldbm" != no ; then
16271         cat >> confdefs.h <<\EOF
16272 #define SLAPD_LDBM 1
16273 EOF
16274
16275         BUILD_SLAPD=yes
16276         BUILD_LDBM=yes
16277         if test "$ol_with_ldbm_module" != static ; then
16278                 cat >> confdefs.h <<\EOF
16279 #define SLAPD_LDBM_DYNAMIC 1
16280 EOF
16281
16282                 BUILD_LDBM=mod
16283                 BUILD_LDBM_DYNAMIC=shared
16284                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16285         fi
16286 fi
16287
16288 if test "$ol_enable_passwd" != no ; then
16289         cat >> confdefs.h <<\EOF
16290 #define SLAPD_PASSWD 1
16291 EOF
16292
16293         BUILD_SLAPD=yes
16294         BUILD_PASSWD=yes
16295         if test "$ol_with_passwd_module" != static ; then
16296                 cat >> confdefs.h <<\EOF
16297 #define SLAPD_PASSWD_DYNAMIC 1
16298 EOF
16299
16300                 BUILD_PASSWD=mod
16301                 BUILD_PASSWD_DYNAMIC=shared
16302                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16303         fi
16304 fi
16305
16306 if test "$ol_link_perl" != no ; then
16307         cat >> confdefs.h <<\EOF
16308 #define SLAPD_PERL 1
16309 EOF
16310
16311         BUILD_SLAPD=yes
16312         BUILD_PERL=yes
16313         if test "$ol_with_perl_module" != static ; then
16314                 cat >> confdefs.h <<\EOF
16315 #define SLAPD_PERL_DYNAMIC 1
16316 EOF
16317
16318                 BUILD_PERL=mod
16319                 BUILD_PERL_DYNAMIC=shared
16320                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16321         fi
16322 fi
16323
16324 if test "$ol_enable_shell" != no ; then
16325         cat >> confdefs.h <<\EOF
16326 #define SLAPD_SHELL 1
16327 EOF
16328
16329         BUILD_SLAPD=yes
16330         BUILD_SHELL=yes
16331         if test "$ol_with_shell_module" != static ; then
16332                 cat >> confdefs.h <<\EOF
16333 #define SLAPD_SHELL_DYNAMIC 1
16334 EOF
16335
16336                 BUILD_SHELL=mod
16337                 BUILD_SHELL_DYNAMIC=shared
16338                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16339         fi
16340 fi
16341
16342 if test "$ol_enable_tcl" != no ; then
16343         cat >> confdefs.h <<\EOF
16344 #define SLAPD_TCL 1
16345 EOF
16346
16347         BUILD_SLAPD=yes
16348         BUILD_TCL=yes
16349         if test "$ol_with_tcl_module" != static; then
16350                 cat >> confdefs.h <<\EOF
16351 #define SLAPD_TCL_DYNAMIC 1
16352 EOF
16353
16354                 BUILD_TCL=mod
16355                 BUILD_TCL_DYNAMIC=shared
16356                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16357         fi
16358 fi
16359
16360 if test "$ol_enable_sql" != no ; then
16361         cat >> confdefs.h <<\EOF
16362 #define SLAPD_SQL 1
16363 EOF
16364
16365         BUILD_SLAPD=yes
16366         BUILD_SQL=yes
16367         SLAPD_SQL_LIBS=-liodbc
16368         if test "$ol_with_sql_module" != static; then
16369                 cat >> confdefs.h <<\EOF
16370 #define SLAPD_SQL_DYNAMIC 1
16371 EOF
16372
16373                 BUILD_SQL=mod
16374                 BUILD_SQL_DYNAMIC=shared
16375                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16376         fi
16377 fi
16378
16379 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16380         $BUILD_SLAPD = yes ; then
16381         BUILD_SLURPD=yes
16382 fi
16383
16384 if test "$ol_link_isode" != no ; then
16385         BUILD_LDAPD=yes
16386 fi
16387
16388
16389 if test "$LINK_BINS_DYNAMIC" = yes; then
16390     LIB_LINKAGE=DYN
16391     LT_LIB_LINKAGE=shared
16392 else
16393     LIB_LINKAGE=STAT
16394     LT_LIB_LINKAGE=static
16395 fi
16396
16397 if test "$ac_cv_mingw32" = yes ; then
16398     PLAT=NT
16399     DYN_EXT=dll
16400 else
16401     PLAT=UNIX
16402     DYN_EXT=so
16403 fi
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414   
16415   
16416   
16417   
16418   
16419   
16420   
16421   
16422   
16423   
16424   
16425   
16426   
16427   
16428   
16429   
16430   
16431   
16432   
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469 trap '' 1 2 15
16470
16471 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16472
16473 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16474 # Let make expand exec_prefix.
16475 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16476
16477 # Any assignment to VPATH causes Sun make to only execute
16478 # the first set of double-colon rules, so remove it if not needed.
16479 # If there is a colon in the path, we need to keep it.
16480 if test "x$srcdir" = x.; then
16481   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16482 fi
16483
16484 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16485
16486 DEFS=-DHAVE_CONFIG_H
16487
16488 # Without the "./", some shells look in PATH for config.status.
16489 : ${CONFIG_STATUS=./config.status}
16490
16491 echo creating $CONFIG_STATUS
16492 rm -f $CONFIG_STATUS
16493 cat > $CONFIG_STATUS <<EOF
16494 #! /bin/sh
16495 # Generated automatically by configure.
16496 # Run this file to recreate the current configuration.
16497 # This directory was configured as follows,
16498 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16499 #
16500 # $0 $ac_configure_args
16501 #
16502 # Compiler output produced by configure, useful for debugging
16503 # configure, is in ./config.log if it exists.
16504
16505 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16506 for ac_option
16507 do
16508   case "\$ac_option" in
16509   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16510     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16511     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16512   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16513     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16514     exit 0 ;;
16515   -help | --help | --hel | --he | --h)
16516     echo "\$ac_cs_usage"; exit 0 ;;
16517   *) echo "\$ac_cs_usage"; exit 1 ;;
16518   esac
16519 done
16520
16521 ac_given_srcdir=$srcdir
16522 ac_given_INSTALL="$INSTALL"
16523
16524 trap 'rm -fr `echo "\
16525 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16526 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16527 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16528 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16529 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16530 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16531 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16532 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16533 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16534 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16535 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16536 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16537 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16538 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16539 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16540 include/Makefile:build/top.mk:include/Makefile.in \
16541 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16542 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16543 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16544 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16545 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16546 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16547 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16548 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16549 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16550 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16551 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
16552 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16553 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16554 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16555 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16556 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16557 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16558 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16559 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16560 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16561 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16562 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16563 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16564 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16565 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16566 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16567 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16568 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16569 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16570  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16571 EOF
16572 cat >> $CONFIG_STATUS <<EOF
16573
16574 # Protect against being on the right side of a sed subst in config.status.
16575 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16576  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16577 $ac_vpsub
16578 $extrasub
16579 s%@SHELL@%$SHELL%g
16580 s%@CFLAGS@%$CFLAGS%g
16581 s%@CPPFLAGS@%$CPPFLAGS%g
16582 s%@CXXFLAGS@%$CXXFLAGS%g
16583 s%@FFLAGS@%$FFLAGS%g
16584 s%@DEFS@%$DEFS%g
16585 s%@LDFLAGS@%$LDFLAGS%g
16586 s%@LIBS@%$LIBS%g
16587 s%@exec_prefix@%$exec_prefix%g
16588 s%@prefix@%$prefix%g
16589 s%@program_transform_name@%$program_transform_name%g
16590 s%@bindir@%$bindir%g
16591 s%@sbindir@%$sbindir%g
16592 s%@libexecdir@%$libexecdir%g
16593 s%@datadir@%$datadir%g
16594 s%@sysconfdir@%$sysconfdir%g
16595 s%@sharedstatedir@%$sharedstatedir%g
16596 s%@localstatedir@%$localstatedir%g
16597 s%@libdir@%$libdir%g
16598 s%@includedir@%$includedir%g
16599 s%@oldincludedir@%$oldincludedir%g
16600 s%@infodir@%$infodir%g
16601 s%@mandir@%$mandir%g
16602 s%@host@%$host%g
16603 s%@host_alias@%$host_alias%g
16604 s%@host_cpu@%$host_cpu%g
16605 s%@host_vendor@%$host_vendor%g
16606 s%@host_os@%$host_os%g
16607 s%@target@%$target%g
16608 s%@target_alias@%$target_alias%g
16609 s%@target_cpu@%$target_cpu%g
16610 s%@target_vendor@%$target_vendor%g
16611 s%@target_os@%$target_os%g
16612 s%@build@%$build%g
16613 s%@build_alias@%$build_alias%g
16614 s%@build_cpu@%$build_cpu%g
16615 s%@build_vendor@%$build_vendor%g
16616 s%@build_os@%$build_os%g
16617 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16618 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16619 s%@INSTALL_DATA@%$INSTALL_DATA%g
16620 s%@PACKAGE@%$PACKAGE%g
16621 s%@VERSION@%$VERSION%g
16622 s%@ACLOCAL@%$ACLOCAL%g
16623 s%@AUTOCONF@%$AUTOCONF%g
16624 s%@AUTOMAKE@%$AUTOMAKE%g
16625 s%@AUTOHEADER@%$AUTOHEADER%g
16626 s%@MAKEINFO@%$MAKEINFO%g
16627 s%@install_sh@%$install_sh%g
16628 s%@AMTAR@%$AMTAR%g
16629 s%@AWK@%$AWK%g
16630 s%@AMTARFLAGS@%$AMTARFLAGS%g
16631 s%@SET_MAKE@%$SET_MAKE%g
16632 s%@top_builddir@%$top_builddir%g
16633 s%@ldap_subdir@%$ldap_subdir%g
16634 s%@CC@%$CC%g
16635 s%@RANLIB@%$RANLIB%g
16636 s%@LN_S@%$LN_S%g
16637 s%@DLLTOOL@%$DLLTOOL%g
16638 s%@AS@%$AS%g
16639 s%@OBJDUMP@%$OBJDUMP%g
16640 s%@LIBTOOL@%$LIBTOOL%g
16641 s%@LN_H@%$LN_H%g
16642 s%@SENDMAIL@%$SENDMAIL%g
16643 s%@EDITOR@%$EDITOR%g
16644 s%@FINGER@%$FINGER%g
16645 s%@PERLBIN@%$PERLBIN%g
16646 s%@CPP@%$CPP%g
16647 s%@EXEEXT@%$EXEEXT%g
16648 s%@OBJEXT@%$OBJEXT%g
16649 s%@OL_MKDEP@%$OL_MKDEP%g
16650 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16651 s%@PEPSY@%$PEPSY%g
16652 s%@LIBOBJS@%$LIBOBJS%g
16653 s%@LIBSRCS@%$LIBSRCS%g
16654 s%@PLAT@%$PLAT%g
16655 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16656 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16657 s%@DYN_EXT@%$DYN_EXT%g
16658 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
16659 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16660 s%@BUILD_BDB2@%$BUILD_BDB2%g
16661 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16662 s%@BUILD_LDAP@%$BUILD_LDAP%g
16663 s%@BUILD_LDBM@%$BUILD_LDBM%g
16664 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16665 s%@BUILD_PERL@%$BUILD_PERL%g
16666 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16667 s%@BUILD_SHELL@%$BUILD_SHELL%g
16668 s%@BUILD_SQL@%$BUILD_SQL%g
16669 s%@BUILD_TCL@%$BUILD_TCL%g
16670 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
16671 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16672 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16673 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16674 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16675 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16676 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16677 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16678 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16679 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16680 s%@LDAP_LIBS@%$LDAP_LIBS%g
16681 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
16682 s%@LDIF_LIBS@%$LDIF_LIBS%g
16683 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16684 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16685 s%@LDBM_LIBS@%$LDBM_LIBS%g
16686 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16687 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16688 s%@WRAP_LIBS@%$WRAP_LIBS%g
16689 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16690 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16691 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16692 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16693 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16694 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16695 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16696 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16697 s%@KRB4_LIBS@%$KRB4_LIBS%g
16698 s%@KRB5_LIBS@%$KRB5_LIBS%g
16699 s%@READLINE_LIBS@%$READLINE_LIBS%g
16700 s%@SASL_LIBS@%$SASL_LIBS%g
16701 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16702 s%@TLS_LIBS@%$TLS_LIBS%g
16703 s%@MODULES_LIBS@%$MODULES_LIBS%g
16704 s%@AUTH_LIBS@%$AUTH_LIBS%g
16705 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16706 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16707 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16708
16709 CEOF
16710 EOF
16711
16712 cat >> $CONFIG_STATUS <<\EOF
16713
16714 # Split the substitutions into bite-sized pieces for seds with
16715 # small command number limits, like on Digital OSF/1 and HP-UX.
16716 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16717 ac_file=1 # Number of current file.
16718 ac_beg=1 # First line for current file.
16719 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16720 ac_more_lines=:
16721 ac_sed_cmds=""
16722 while $ac_more_lines; do
16723   if test $ac_beg -gt 1; then
16724     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16725   else
16726     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16727   fi
16728   if test ! -s conftest.s$ac_file; then
16729     ac_more_lines=false
16730     rm -f conftest.s$ac_file
16731   else
16732     if test -z "$ac_sed_cmds"; then
16733       ac_sed_cmds="sed -f conftest.s$ac_file"
16734     else
16735       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16736     fi
16737     ac_file=`expr $ac_file + 1`
16738     ac_beg=$ac_end
16739     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16740   fi
16741 done
16742 if test -z "$ac_sed_cmds"; then
16743   ac_sed_cmds=cat
16744 fi
16745 EOF
16746
16747 cat >> $CONFIG_STATUS <<EOF
16748
16749 CONFIG_FILES=\${CONFIG_FILES-"\
16750 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16751 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16752 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16753 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16754 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16755 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16756 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16757 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16758 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16759 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16760 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16761 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16762 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16763 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16764 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16765 include/Makefile:build/top.mk:include/Makefile.in \
16766 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16767 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16768 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16769 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16770 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16771 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16772 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16773 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16774 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16775 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16776 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
16777 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16778 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16779 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16780 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16781 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16782 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16783 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16784 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16785 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16786 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16787 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16788 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16789 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16790 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16791 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16792 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16793 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16794 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16795 "}
16796 EOF
16797 cat >> $CONFIG_STATUS <<\EOF
16798 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16799   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16800   case "$ac_file" in
16801   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16802        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16803   *) ac_file_in="${ac_file}.in" ;;
16804   esac
16805
16806   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16807
16808   # Remove last slash and all that follows it.  Not all systems have dirname.
16809   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16810   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16811     # The file is in a subdirectory.
16812     test ! -d "$ac_dir" && mkdir "$ac_dir"
16813     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16814     # A "../" for each directory in $ac_dir_suffix.
16815     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16816   else
16817     ac_dir_suffix= ac_dots=
16818   fi
16819
16820   case "$ac_given_srcdir" in
16821   .)  srcdir=.
16822       if test -z "$ac_dots"; then top_srcdir=.
16823       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16824   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16825   *) # Relative path.
16826     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16827     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16828   esac
16829
16830   case "$ac_given_INSTALL" in
16831   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16832   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16833   esac
16834
16835   echo creating "$ac_file"
16836   rm -f "$ac_file"
16837   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16838   case "$ac_file" in
16839   *[Mm]akefile*) ac_comsub="1i\\
16840 # $configure_input" ;;
16841   *) ac_comsub= ;;
16842   esac
16843
16844   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16845   sed -e "$ac_comsub
16846 s%@configure_input@%$configure_input%g
16847 s%@srcdir@%$srcdir%g
16848 s%@top_srcdir@%$top_srcdir%g
16849 s%@INSTALL@%$INSTALL%g
16850 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16851 fi; done
16852 rm -f conftest.s*
16853
16854 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16855 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16856 #
16857 # ac_d sets the value in "#define NAME VALUE" lines.
16858 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16859 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16860 ac_dC='\3'
16861 ac_dD='%g'
16862 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16863 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16864 ac_uB='\([      ]\)%\1#\2define\3'
16865 ac_uC=' '
16866 ac_uD='\4%g'
16867 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16868 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16869 ac_eB='$%\1#\2define\3'
16870 ac_eC=' '
16871 ac_eD='%g'
16872
16873 if test "${CONFIG_HEADERS+set}" != set; then
16874 EOF
16875 cat >> $CONFIG_STATUS <<EOF
16876   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16877 EOF
16878 cat >> $CONFIG_STATUS <<\EOF
16879 fi
16880 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16881   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16882   case "$ac_file" in
16883   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16884        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16885   *) ac_file_in="${ac_file}.in" ;;
16886   esac
16887
16888   echo creating $ac_file
16889
16890   rm -f conftest.frag conftest.in conftest.out
16891   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16892   cat $ac_file_inputs > conftest.in
16893
16894 EOF
16895
16896 # Transform confdefs.h into a sed script conftest.vals that substitutes
16897 # the proper values into config.h.in to produce config.h.  And first:
16898 # Protect against being on the right side of a sed subst in config.status.
16899 # Protect against being in an unquoted here document in config.status.
16900 rm -f conftest.vals
16901 cat > conftest.hdr <<\EOF
16902 s/[\\&%]/\\&/g
16903 s%[\\$`]%\\&%g
16904 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16905 s%ac_d%ac_u%gp
16906 s%ac_u%ac_e%gp
16907 EOF
16908 sed -n -f conftest.hdr confdefs.h > conftest.vals
16909 rm -f conftest.hdr
16910
16911 # This sed command replaces #undef with comments.  This is necessary, for
16912 # example, in the case of _POSIX_SOURCE, which is predefined and required
16913 # on some systems where configure will not decide to define it.
16914 cat >> conftest.vals <<\EOF
16915 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16916 EOF
16917
16918 # Break up conftest.vals because some shells have a limit on
16919 # the size of here documents, and old seds have small limits too.
16920
16921 rm -f conftest.tail
16922 while :
16923 do
16924   ac_lines=`grep -c . conftest.vals`
16925   # grep -c gives empty output for an empty file on some AIX systems.
16926   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16927   # Write a limited-size here document to conftest.frag.
16928   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16929   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16930   echo 'CEOF
16931   sed -f conftest.frag conftest.in > conftest.out
16932   rm -f conftest.in
16933   mv conftest.out conftest.in
16934 ' >> $CONFIG_STATUS
16935   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16936   rm -f conftest.vals
16937   mv conftest.tail conftest.vals
16938 done
16939 rm -f conftest.vals
16940
16941 cat >> $CONFIG_STATUS <<\EOF
16942   rm -f conftest.frag conftest.h
16943   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16944   cat conftest.in >> conftest.h
16945   rm -f conftest.in
16946   if cmp -s $ac_file conftest.h 2>/dev/null; then
16947     echo "$ac_file is unchanged"
16948     rm -f conftest.h
16949   else
16950     # Remove last slash and all that follows it.  Not all systems have dirname.
16951       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16952       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16953       # The file is in a subdirectory.
16954       test ! -d "$ac_dir" && mkdir "$ac_dir"
16955     fi
16956     rm -f $ac_file
16957     mv conftest.h $ac_file
16958   fi
16959 fi; done
16960
16961 EOF
16962 cat >> $CONFIG_STATUS <<EOF
16963
16964 EOF
16965 cat >> $CONFIG_STATUS <<\EOF
16966
16967 date > stamp-h
16968 echo Please \"make depend\" to build dependencies
16969
16970 exit 0
16971 EOF
16972 chmod +x $CONFIG_STATUS
16973 rm -fr confdefs* $ac_clean_files
16974 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16975