]> git.sur5r.net Git - openldap/blob - configure
76f76d02a0573e154b5ff500cb64c25d6f8cc013
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.304 2000/05/30 18:15:54 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   --with-cyrus-sasl     with Cyrus SASL support (auto)"
51 ac_help="$ac_help
52   --with-fetch          with fetch URL support (auto)"
53 ac_help="$ac_help
54   --with-kerberos       with support (auto)"
55 ac_help="$ac_help
56   --with-readline       with readline support (auto)"
57 ac_help="$ac_help
58   --with-threads        use threads (auto)"
59 ac_help="$ac_help
60   --with-tls            with TLS/SSL support (auto)"
61 ac_help="$ac_help
62   --with-yielding-select        with implicitly yielding select (auto)"
63 ac_help="$ac_help
64 LDAPD (X.500-to-LDAP Gateway) Options:"
65 ac_help="$ac_help
66   --enable-ldapd        enable building ldapd (no)"
67 ac_help="$ac_help
68 SLAPD (Standalone LDAP Daemon) Options:"
69 ac_help="$ac_help
70   --enable-slapd        enable building slapd (yes)"
71 ac_help="$ac_help
72     --enable-cleartext  enable cleartext passwords (yes)"
73 ac_help="$ac_help
74     --enable-crypt      enable crypt(3) passwords (auto)"
75 ac_help="$ac_help
76     --enable-kpasswd    enable kerberos password verification (no)"
77 ac_help="$ac_help
78     --enable-spasswd    enable (Cyrus) SASL password verification (no)"
79 ac_help="$ac_help
80     --enable-modules    enable dynamic module support (no)"
81 ac_help="$ac_help
82     --enable-multimaster        enable multimaster replication (no)"
83 ac_help="$ac_help
84     --enable-phonetic   enable phonetic/soundex (no)"
85 ac_help="$ac_help
86     --enable-quipu      build quipu migration tools (no)"
87 ac_help="$ac_help
88     --enable-rlookups   enable reverse lookups (auto)"
89 ac_help="$ac_help
90     --enable-aci        enable per-object ACIs (no)"
91 ac_help="$ac_help
92     --enable-wrappers   enable tcp wrapper support (no)"
93 ac_help="$ac_help
94     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
95 ac_help="$ac_help
96     --enable-bdb2       enable bdb2 backend (no)"
97 ac_help="$ac_help
98       --with-bdb2-module        module type (static)"
99 ac_help="$ac_help
100     --enable-dnssrv     enable bdb2 backend (no)"
101 ac_help="$ac_help
102       --with-dnssrv-module      module type (static)"
103 ac_help="$ac_help
104     --enable-ldap       enable ldap backend (no)"
105 ac_help="$ac_help
106       --with-ldap-module        module type (static)"
107 ac_help="$ac_help
108     --enable-ldbm       enable ldbm backend (yes)"
109 ac_help="$ac_help
110       --with-ldbm-api   use LDBM API (auto)"
111 ac_help="$ac_help
112       --with-ldbm-module        module type (static)"
113 ac_help="$ac_help
114       --with-ldbm-type  use LDBM type (auto)"
115 ac_help="$ac_help
116     --enable-passwd     enable passwd backend (no)"
117 ac_help="$ac_help
118       --with-passwd-module      module type (static)"
119 ac_help="$ac_help
120     --enable-perl       enable perl backend (no)"
121 ac_help="$ac_help
122       --with-perl-module        module type (static)"
123 ac_help="$ac_help
124     --enable-shell      enable shell backend (no)"
125 ac_help="$ac_help
126       --with-shell-module       module type (static)"
127 ac_help="$ac_help
128     --enable-sql        enable sql backend (no)"
129 ac_help="$ac_help
130       --with-sql-module module type (static)"
131 ac_help="$ac_help
132     --enable-tcl        enable tcl backend (no)"
133 ac_help="$ac_help
134       --with-tcl-module module type (static)"
135 ac_help="$ac_help
136 SLURPD (Replication Daemon) Options:"
137 ac_help="$ac_help
138   --enable-slurpd       enable building slurpd (auto)"
139 ac_help="$ac_help
140 Library Generation & Linking Options"
141 ac_help="$ac_help
142   --enable-static[=PKGS]  build static libraries [default=yes]"
143 ac_help="$ac_help
144   --enable-shared[=PKGS]  build shared libraries [default=yes]"
145 ac_help="$ac_help
146   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
147 ac_help="$ac_help
148   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
149 ac_help="$ac_help
150   --disable-libtool-lock  avoid locking (might break parallel builds)"
151
152 # Initialize some variables set by options.
153 # The variables have the same names as the options, with
154 # dashes changed to underlines.
155 build=NONE
156 cache_file=./config.cache
157 exec_prefix=NONE
158 host=NONE
159 no_create=
160 nonopt=NONE
161 no_recursion=
162 prefix=NONE
163 program_prefix=NONE
164 program_suffix=NONE
165 program_transform_name=s,x,x,
166 silent=
167 site=
168 srcdir=
169 target=NONE
170 verbose=
171 x_includes=NONE
172 x_libraries=NONE
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datadir='${prefix}/share'
177 sysconfdir='${prefix}/etc'
178 sharedstatedir='${prefix}/com'
179 localstatedir='${prefix}/var'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${prefix}/info'
184 mandir='${prefix}/man'
185
186 # Initialize some other variables.
187 subdirs=
188 MFLAGS= MAKEFLAGS=
189 SHELL=${CONFIG_SHELL-/bin/sh}
190 # Maximum number of lines to put in a shell here document.
191 ac_max_here_lines=12
192
193 ac_prev=
194 for ac_option
195 do
196
197   # If the previous option needs an argument, assign it.
198   if test -n "$ac_prev"; then
199     eval "$ac_prev=\$ac_option"
200     ac_prev=
201     continue
202   fi
203
204   case "$ac_option" in
205   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
206   *) ac_optarg= ;;
207   esac
208
209   # Accept the important Cygnus configure options, so we can diagnose typos.
210
211   case "$ac_option" in
212
213   -bindir | --bindir | --bindi | --bind | --bin | --bi)
214     ac_prev=bindir ;;
215   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216     bindir="$ac_optarg" ;;
217
218   -build | --build | --buil | --bui | --bu)
219     ac_prev=build ;;
220   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
221     build="$ac_optarg" ;;
222
223   -cache-file | --cache-file | --cache-fil | --cache-fi \
224   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
225     ac_prev=cache_file ;;
226   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
227   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
228     cache_file="$ac_optarg" ;;
229
230   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231     ac_prev=datadir ;;
232   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233   | --da=*)
234     datadir="$ac_optarg" ;;
235
236   -disable-* | --disable-*)
237     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
238     # Reject names that are not valid shell variable names.
239     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
240       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
241     fi
242     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
243     eval "enable_${ac_feature}=no" ;;
244
245   -enable-* | --enable-*)
246     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
247     # Reject names that are not valid shell variable names.
248     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
249       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
250     fi
251     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
252     case "$ac_option" in
253       *=*) ;;
254       *) ac_optarg=yes ;;
255     esac
256     eval "enable_${ac_feature}='$ac_optarg'" ;;
257
258   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
259   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
260   | --exec | --exe | --ex)
261     ac_prev=exec_prefix ;;
262   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
263   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
264   | --exec=* | --exe=* | --ex=*)
265     exec_prefix="$ac_optarg" ;;
266
267   -gas | --gas | --ga | --g)
268     # Obsolete; use --with-gas.
269     with_gas=yes ;;
270
271   -help | --help | --hel | --he)
272     # Omit some internal or obsolete options to make the list less imposing.
273     # This message is too long to be a string in the A/UX 3.1 sh.
274     cat << EOF
275 Usage: configure [options] [host]
276 Options: [defaults in brackets after descriptions]
277 Configuration:
278   --cache-file=FILE       cache test results in FILE
279   --help                  print this message
280   --no-create             do not create output files
281   --quiet, --silent       do not print \`checking...' messages
282   --version               print the version of autoconf that created configure
283 Directory and file names:
284   --prefix=PREFIX         install architecture-independent files in PREFIX
285                           [$ac_default_prefix]
286   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
287                           [same as prefix]
288   --bindir=DIR            user executables in DIR [EPREFIX/bin]
289   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
290   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
291   --datadir=DIR           read-only architecture-independent data in DIR
292                           [PREFIX/share]
293   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
294   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
295                           [PREFIX/com]
296   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
297   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
298   --includedir=DIR        C header files in DIR [PREFIX/include]
299   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
300   --infodir=DIR           info documentation in DIR [PREFIX/info]
301   --mandir=DIR            man documentation in DIR [PREFIX/man]
302   --srcdir=DIR            find the sources in DIR [configure dir or ..]
303   --program-prefix=PREFIX prepend PREFIX to installed program names
304   --program-suffix=SUFFIX append SUFFIX to installed program names
305   --program-transform-name=PROGRAM
306                           run sed PROGRAM on installed program names
307 EOF
308     cat << EOF
309 Host type:
310   --build=BUILD           configure for building on BUILD [BUILD=HOST]
311   --host=HOST             configure for HOST [guessed]
312   --target=TARGET         configure for TARGET [TARGET=HOST]
313 Features and packages:
314   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
315   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
316   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
317   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
318   --x-includes=DIR        X include files are in DIR
319   --x-libraries=DIR       X library files are in DIR
320 EOF
321     if test -n "$ac_help"; then
322       echo "--enable and --with options recognized:$ac_help"
323     fi
324     exit 0 ;;
325
326   -host | --host | --hos | --ho)
327     ac_prev=host ;;
328   -host=* | --host=* | --hos=* | --ho=*)
329     host="$ac_optarg" ;;
330
331   -includedir | --includedir | --includedi | --included | --include \
332   | --includ | --inclu | --incl | --inc)
333     ac_prev=includedir ;;
334   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
335   | --includ=* | --inclu=* | --incl=* | --inc=*)
336     includedir="$ac_optarg" ;;
337
338   -infodir | --infodir | --infodi | --infod | --info | --inf)
339     ac_prev=infodir ;;
340   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
341     infodir="$ac_optarg" ;;
342
343   -libdir | --libdir | --libdi | --libd)
344     ac_prev=libdir ;;
345   -libdir=* | --libdir=* | --libdi=* | --libd=*)
346     libdir="$ac_optarg" ;;
347
348   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
349   | --libexe | --libex | --libe)
350     ac_prev=libexecdir ;;
351   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
352   | --libexe=* | --libex=* | --libe=*)
353     libexecdir="$ac_optarg" ;;
354
355   -localstatedir | --localstatedir | --localstatedi | --localstated \
356   | --localstate | --localstat | --localsta | --localst \
357   | --locals | --local | --loca | --loc | --lo)
358     ac_prev=localstatedir ;;
359   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
360   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
361   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
362     localstatedir="$ac_optarg" ;;
363
364   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
365     ac_prev=mandir ;;
366   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
367     mandir="$ac_optarg" ;;
368
369   -nfp | --nfp | --nf)
370     # Obsolete; use --without-fp.
371     with_fp=no ;;
372
373   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
374   | --no-cr | --no-c)
375     no_create=yes ;;
376
377   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
378   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
379     no_recursion=yes ;;
380
381   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
382   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
383   | --oldin | --oldi | --old | --ol | --o)
384     ac_prev=oldincludedir ;;
385   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
386   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
387   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
388     oldincludedir="$ac_optarg" ;;
389
390   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
391     ac_prev=prefix ;;
392   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
393     prefix="$ac_optarg" ;;
394
395   -program-prefix | --program-prefix | --program-prefi | --program-pref \
396   | --program-pre | --program-pr | --program-p)
397     ac_prev=program_prefix ;;
398   -program-prefix=* | --program-prefix=* | --program-prefi=* \
399   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
400     program_prefix="$ac_optarg" ;;
401
402   -program-suffix | --program-suffix | --program-suffi | --program-suff \
403   | --program-suf | --program-su | --program-s)
404     ac_prev=program_suffix ;;
405   -program-suffix=* | --program-suffix=* | --program-suffi=* \
406   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
407     program_suffix="$ac_optarg" ;;
408
409   -program-transform-name | --program-transform-name \
410   | --program-transform-nam | --program-transform-na \
411   | --program-transform-n | --program-transform- \
412   | --program-transform | --program-transfor \
413   | --program-transfo | --program-transf \
414   | --program-trans | --program-tran \
415   | --progr-tra | --program-tr | --program-t)
416     ac_prev=program_transform_name ;;
417   -program-transform-name=* | --program-transform-name=* \
418   | --program-transform-nam=* | --program-transform-na=* \
419   | --program-transform-n=* | --program-transform-=* \
420   | --program-transform=* | --program-transfor=* \
421   | --program-transfo=* | --program-transf=* \
422   | --program-trans=* | --program-tran=* \
423   | --progr-tra=* | --program-tr=* | --program-t=*)
424     program_transform_name="$ac_optarg" ;;
425
426   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
427   | -silent | --silent | --silen | --sile | --sil)
428     silent=yes ;;
429
430   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
431     ac_prev=sbindir ;;
432   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
433   | --sbi=* | --sb=*)
434     sbindir="$ac_optarg" ;;
435
436   -sharedstatedir | --sharedstatedir | --sharedstatedi \
437   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
438   | --sharedst | --shareds | --shared | --share | --shar \
439   | --sha | --sh)
440     ac_prev=sharedstatedir ;;
441   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
442   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
443   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
444   | --sha=* | --sh=*)
445     sharedstatedir="$ac_optarg" ;;
446
447   -site | --site | --sit)
448     ac_prev=site ;;
449   -site=* | --site=* | --sit=*)
450     site="$ac_optarg" ;;
451
452   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
453     ac_prev=srcdir ;;
454   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
455     srcdir="$ac_optarg" ;;
456
457   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
458   | --syscon | --sysco | --sysc | --sys | --sy)
459     ac_prev=sysconfdir ;;
460   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
461   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
462     sysconfdir="$ac_optarg" ;;
463
464   -target | --target | --targe | --targ | --tar | --ta | --t)
465     ac_prev=target ;;
466   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
467     target="$ac_optarg" ;;
468
469   -v | -verbose | --verbose | --verbos | --verbo | --verb)
470     verbose=yes ;;
471
472   -version | --version | --versio | --versi | --vers)
473     echo "configure generated by autoconf version 2.13.1"
474     exit 0 ;;
475
476   -with-* | --with-*)
477     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
478     # Reject names that are not valid shell variable names.
479     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
480       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
481     fi
482     ac_package=`echo $ac_package| sed 's/-/_/g'`
483     case "$ac_option" in
484       *=*) ;;
485       *) ac_optarg=yes ;;
486     esac
487     eval "with_${ac_package}='$ac_optarg'" ;;
488
489   -without-* | --without-*)
490     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
491     # Reject names that are not valid shell variable names.
492     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
493       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
494     fi
495     ac_package=`echo $ac_package| sed 's/-/_/g'`
496     eval "with_${ac_package}=no" ;;
497
498   --x)
499     # Obsolete; use --with-x.
500     with_x=yes ;;
501
502   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
503   | --x-incl | --x-inc | --x-in | --x-i)
504     ac_prev=x_includes ;;
505   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
506   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
507     x_includes="$ac_optarg" ;;
508
509   -x-libraries | --x-libraries | --x-librarie | --x-librari \
510   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
511     ac_prev=x_libraries ;;
512   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
513   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
514     x_libraries="$ac_optarg" ;;
515
516   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
517     ;;
518
519   *)
520     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
521       echo "configure: warning: $ac_option: invalid host type" 1>&2
522     fi
523     if test "x$nonopt" != xNONE; then
524       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
525     fi
526     nonopt="$ac_option"
527     ;;
528
529   esac
530 done
531
532 if test -n "$ac_prev"; then
533   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
534 fi
535
536 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
537
538 # File descriptor usage:
539 # 0 standard input
540 # 1 file creation
541 # 2 errors and warnings
542 # 3 some systems may open it to /dev/tty
543 # 4 used on the Kubota Titan
544 # 6 checking for... messages and results
545 # 5 compiler messages saved in config.log
546 if test "$silent" = yes; then
547   exec 6>/dev/null
548 else
549   exec 6>&1
550 fi
551 exec 5>./config.log
552
553 echo "\
554 This file contains any messages produced by compilers while
555 running configure, to aid debugging if configure makes a mistake.
556 " 1>&5
557
558 # Strip out --no-create and --no-recursion so they do not pile up.
559 # Also quote any args containing shell metacharacters.
560 ac_configure_args=
561 for ac_arg
562 do
563   case "$ac_arg" in
564   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
565   | --no-cr | --no-c) ;;
566   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
567   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
568   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
569   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
570   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
571   esac
572 done
573
574 # NLS nuisances.
575 # Only set these to C if already set.  These must not be set unconditionally
576 # because not all systems understand e.g. LANG=C (notably SCO).
577 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
578 # Non-C LC_CTYPE values break the ctype check.
579 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
580 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
581 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
582 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
583
584 # confdefs.h avoids OS command line length limits that DEFS can exceed.
585 rm -rf conftest* confdefs.h
586 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
587 echo > confdefs.h
588
589 # A filename unique to this package, relative to the directory that
590 # configure is in, which we can look for to find out if srcdir is correct.
591 ac_unique_file=build/version
592
593 # Find the source files, if location was not specified.
594 if test -z "$srcdir"; then
595   ac_srcdir_defaulted=yes
596   # Try the directory containing this script, then its parent.
597   ac_prog=$0
598   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
599   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
600   srcdir=$ac_confdir
601   if test ! -r $srcdir/$ac_unique_file; then
602     srcdir=..
603   fi
604 else
605   ac_srcdir_defaulted=no
606 fi
607 if test ! -r $srcdir/$ac_unique_file; then
608   if test "$ac_srcdir_defaulted" = yes; then
609     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
610   else
611     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
612   fi
613 fi
614 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
615
616 # Prefer explicitly selected file to automatically selected ones.
617 if test -z "$CONFIG_SITE"; then
618   if test "x$prefix" != xNONE; then
619     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
620   else
621     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
622   fi
623 fi
624 for ac_site_file in $CONFIG_SITE; do
625   if test -r "$ac_site_file"; then
626     echo "loading site script $ac_site_file"
627     . "$ac_site_file"
628   fi
629 done
630
631
632 ac_ext=c
633 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
634 ac_cpp='$CPP $CPPFLAGS'
635 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
636 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
637 cross_compiling=$ac_cv_prog_cc_cross
638
639 ac_exeext=
640 ac_objext=o
641 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
642   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
643   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
644     ac_n= ac_c='
645 ' ac_t='        '
646   else
647     ac_n=-n ac_c= ac_t=
648   fi
649 else
650   ac_n= ac_c='\c' ac_t=
651 fi
652
653 ac_aux_dir=
654 for ac_dir in build $srcdir/build; do
655   if test -f $ac_dir/install-sh; then
656     ac_aux_dir=$ac_dir
657     ac_install_sh="$ac_aux_dir/install-sh -c"
658     break
659   elif test -f $ac_dir/install.sh; then
660     ac_aux_dir=$ac_dir
661     ac_install_sh="$ac_aux_dir/install.sh -c"
662     break
663   elif test -f $ac_dir/shtool; then
664     ac_aux_dir=$ac_dir
665     ac_install_sh="$ac_aux_dir/shtool install -c"
666     break
667   fi
668 done
669 if test -z "$ac_aux_dir"; then
670   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
671 fi
672 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
673 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
674 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
675
676 OL_VERSION=`cat $ac_aux_dir/version`
677 if test -z "$OL_VERSION"; then
678         { echo "configure: error: could not determine version" 1>&2; exit 1; }
679 fi
680
681 echo "Configuring OpenLDAP $OL_VERSION ..."
682
683
684 echo $ac_n "checking host system type""... $ac_c" 1>&6
685 echo "configure:686: checking host system type" >&5
686 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
687
688 # Make sure we can run config.sub.
689   if $ac_config_sub sun4 >/dev/null 2>&1; then :
690     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
691   fi
692
693   ac_cv_host_alias=$host
694   case "$ac_cv_host_alias" in
695   NONE)
696     case $nonopt in
697     NONE)
698       if ac_cv_host_alias=`$ac_config_guess`; then :
699       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
700       fi ;;
701     *) ac_cv_host_alias=$nonopt ;;
702     esac ;;
703   esac
704
705   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
706   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
707   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
708   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
709 else
710   echo $ac_n "(cached) $ac_c" 1>&6
711 fi
712
713 echo "$ac_t""$ac_cv_host" 1>&6
714
715 host=$ac_cv_host
716 host_alias=$ac_cv_host_alias
717 host_cpu=$ac_cv_host_cpu
718 host_vendor=$ac_cv_host_vendor
719 host_os=$ac_cv_host_os
720
721
722
723
724
725 echo $ac_n "checking target system type""... $ac_c" 1>&6
726 echo "configure:727: checking target system type" >&5
727 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
728
729 # Make sure we can run config.sub.
730   if $ac_config_sub sun4 >/dev/null 2>&1; then :
731     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
732   fi
733
734   ac_cv_target_alias=$target
735   case "$ac_cv_target_alias" in
736   NONE)
737     case $nonopt in
738     NONE)
739       ac_cv_target_alias=$host_alias ;;
740
741     *) ac_cv_target_alias=$nonopt ;;
742     esac ;;
743   esac
744
745   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
746   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
747   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
748   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
749 else
750   echo $ac_n "(cached) $ac_c" 1>&6
751 fi
752
753 echo "$ac_t""$ac_cv_target" 1>&6
754
755 target=$ac_cv_target
756 target_alias=$ac_cv_target_alias
757 target_cpu=$ac_cv_target_cpu
758 target_vendor=$ac_cv_target_vendor
759 target_os=$ac_cv_target_os
760
761
762
763
764
765 echo $ac_n "checking build system type""... $ac_c" 1>&6
766 echo "configure:767: checking build system type" >&5
767 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
768
769 # Make sure we can run config.sub.
770   if $ac_config_sub sun4 >/dev/null 2>&1; then :
771     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
772   fi
773
774   ac_cv_build_alias=$build
775   case "$ac_cv_build_alias" in
776   NONE)
777     case $nonopt in
778     NONE)
779       ac_cv_build_alias=$host_alias ;;
780
781     *) ac_cv_build_alias=$nonopt ;;
782     esac ;;
783   esac
784
785   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
786   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
787   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
788   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
789 else
790   echo $ac_n "(cached) $ac_c" 1>&6
791 fi
792
793 echo "$ac_t""$ac_cv_build" 1>&6
794
795 build=$ac_cv_build
796 build_alias=$ac_cv_build_alias
797 build_cpu=$ac_cv_build_cpu
798 build_vendor=$ac_cv_build_vendor
799 build_os=$ac_cv_build_os
800
801
802
803
804
805 # Do some error checking and defaulting for the host and target type.
806 # The inputs are:
807 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
808 #
809 # The rules are:
810 # 1. You are not allowed to specify --host, --target, and nonopt at the
811 #    same time.
812 # 2. Host defaults to nonopt.
813 # 3. If nonopt is not specified, then host defaults to the current host,
814 #    as determined by config.guess.
815 # 4. Target and build default to nonopt.
816 # 5. If nonopt is not specified, then target and build default to host.
817
818 # The aliases save the names the user supplied, while $host etc.
819 # will get canonicalized.
820 case $host---$target---$nonopt in
821 NONE---*---* | *---NONE---* | *---*---NONE) ;;
822 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
823 esac
824
825 test "$host_alias" != "$target_alias" &&
826   test "$program_prefix$program_suffix$program_transform_name" = \
827     NONENONEs,x,x, &&
828   program_prefix=${target_alias}-
829
830
831 # Find a good install program.  We prefer a C program (faster),
832 # so one script is as good as another.  But avoid the broken or
833 # incompatible versions:
834 # SysV /etc/install, /usr/sbin/install
835 # SunOS /usr/etc/install
836 # IRIX /sbin/install
837 # AIX /bin/install
838 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
839 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
840 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
841 # ./install, which can be erroneously created by make from ./install.sh.
842 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
843 echo "configure:844: checking for a BSD compatible install" >&5
844 if test -z "$INSTALL"; then
845 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
846   echo $ac_n "(cached) $ac_c" 1>&6
847 else
848     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
849   for ac_dir in $PATH; do
850     # Account for people who put trailing slashes in PATH elements.
851     case "$ac_dir/" in
852     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
853     *)
854       # OSF1 and SCO ODT 3.0 have their own names for install.
855       # Don't use installbsd from OSF since it installs stuff as root
856       # by default.
857       for ac_prog in ginstall scoinst install; do
858         if test -f $ac_dir/$ac_prog; then
859           if test $ac_prog = install &&
860             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
861             # AIX install.  It has an incompatible calling convention.
862             :
863           elif test $ac_prog = install &&
864             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
865             # program-specific install script used by HP pwplus--don't use.
866             :
867           else
868             ac_cv_path_install="$ac_dir/$ac_prog -c"
869             break 2
870           fi
871         fi
872       done
873       ;;
874     esac
875   done
876   IFS="$ac_save_IFS"
877
878 fi
879   if test "${ac_cv_path_install+set}" = set; then
880     INSTALL="$ac_cv_path_install"
881   else
882     # As a last resort, use the slow shell script.  We don't cache a
883     # path for INSTALL within a source directory, because that will
884     # break other packages using the cache if that directory is
885     # removed, or if the path is relative.
886     INSTALL="$ac_install_sh"
887   fi
888 fi
889 echo "$ac_t""$INSTALL" 1>&6
890
891 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
892 # It thinks the first close brace ends the variable substitution.
893 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
894
895 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
896
897 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
898
899 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
900 echo "configure:901: checking whether build environment is sane" >&5
901 # Just in case
902 sleep 1
903 echo timestamp > conftestfile
904 # Do `set' in a subshell so we don't clobber the current shell's
905 # arguments.  Must try -L first in case configure is actually a
906 # symlink; some systems play weird games with the mod time of symlinks
907 # (eg FreeBSD returns the mod time of the symlink's containing
908 # directory).
909 if (
910    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
911    if test "$*" = "X"; then
912       # -L didn't work.
913       set X `ls -t $srcdir/configure conftestfile`
914    fi
915    if test "$*" != "X $srcdir/configure conftestfile" \
916       && test "$*" != "X conftestfile $srcdir/configure"; then
917
918       # If neither matched, then we have a broken ls.  This can happen
919       # if, for instance, CONFIG_SHELL is bash and it inherits a
920       # broken ls alias from the environment.  This has actually
921       # happened.  Such a system could not be considered "sane".
922       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
923 alias in your environment" 1>&2; exit 1; }
924    fi
925
926    test "$2" = conftestfile
927    )
928 then
929    # Ok.
930    :
931 else
932    { echo "configure: error: newly created file is older than distributed files!
933 Check your system clock" 1>&2; exit 1; }
934 fi
935 rm -f conftest*
936 echo "$ac_t""yes" 1>&6
937 if test "$program_transform_name" = s,x,x,; then
938   program_transform_name=
939 else
940   # Double any \ or $.  echo might interpret backslashes.
941   cat <<\EOF_SED > conftestsed
942 s,\\,\\\\,g; s,\$,$$,g
943 EOF_SED
944   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
945   rm -f conftestsed
946 fi
947 test "$program_prefix" != NONE &&
948   program_transform_name="s,^,${program_prefix},;$program_transform_name"
949 # Use a double $ so make ignores it.
950 test "$program_suffix" != NONE &&
951   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
952
953 # sed with no file args requires a program.
954 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
955
956 for ac_prog in mawk gawk nawk awk
957 do
958 # Extract the first word of "$ac_prog", so it can be a program name with args.
959 set dummy $ac_prog; ac_word=$2
960 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
961 echo "configure:962: checking for $ac_word" >&5
962 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
963   echo $ac_n "(cached) $ac_c" 1>&6
964 else
965   if test -n "$AWK"; then
966   ac_cv_prog_AWK="$AWK" # Let the user override the test.
967 else
968   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
969   ac_dummy="$PATH"
970   for ac_dir in $ac_dummy; do
971     test -z "$ac_dir" && ac_dir=.
972     if test -f $ac_dir/$ac_word; then
973       ac_cv_prog_AWK="$ac_prog"
974       break
975     fi
976   done
977   IFS="$ac_save_ifs"
978 fi
979 fi
980 AWK="$ac_cv_prog_AWK"
981 if test -n "$AWK"; then
982   echo "$ac_t""$AWK" 1>&6
983 else
984   echo "$ac_t""no" 1>&6
985 fi
986
987 test -n "$AWK" && break
988 done
989
990 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
991 echo "configure:992: checking whether ${MAKE-make} sets \${MAKE}" >&5
992 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
993 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
994   echo $ac_n "(cached) $ac_c" 1>&6
995 else
996   cat > conftestmake <<\EOF
997 all:
998         @echo 'ac_maketemp="${MAKE}"'
999 EOF
1000 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1001 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1002 if test -n "$ac_maketemp"; then
1003   eval ac_cv_prog_make_${ac_make}_set=yes
1004 else
1005   eval ac_cv_prog_make_${ac_make}_set=no
1006 fi
1007 rm -f conftestmake
1008 fi
1009 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1010   echo "$ac_t""yes" 1>&6
1011   SET_MAKE=
1012 else
1013   echo "$ac_t""no" 1>&6
1014   SET_MAKE="MAKE=${MAKE-make}"
1015 fi
1016
1017
1018
1019 PACKAGE=OpenLDAP
1020
1021 VERSION=$OL_VERSION
1022
1023 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1024   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1025 fi
1026
1027
1028
1029 missing_dir=`cd $ac_aux_dir && pwd`
1030 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1031 echo "configure:1032: checking for working aclocal" >&5
1032 # Run test in a subshell; some versions of sh will print an error if
1033 # an executable is not found, even if stderr is redirected.
1034 # Redirect stdin to placate older versions of autoconf.  Sigh.
1035 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1036    ACLOCAL=aclocal
1037    echo "$ac_t""found" 1>&6
1038 else
1039    ACLOCAL="$missing_dir/missing aclocal"
1040    echo "$ac_t""missing" 1>&6
1041 fi
1042
1043 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1044 echo "configure:1045: checking for working autoconf" >&5
1045 # Run test in a subshell; some versions of sh will print an error if
1046 # an executable is not found, even if stderr is redirected.
1047 # Redirect stdin to placate older versions of autoconf.  Sigh.
1048 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1049    AUTOCONF=autoconf
1050    echo "$ac_t""found" 1>&6
1051 else
1052    AUTOCONF="$missing_dir/missing autoconf"
1053    echo "$ac_t""missing" 1>&6
1054 fi
1055
1056 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1057 echo "configure:1058: checking for working automake" >&5
1058 # Run test in a subshell; some versions of sh will print an error if
1059 # an executable is not found, even if stderr is redirected.
1060 # Redirect stdin to placate older versions of autoconf.  Sigh.
1061 if (automake --version) < /dev/null > /dev/null 2>&1; then
1062    AUTOMAKE=automake
1063    echo "$ac_t""found" 1>&6
1064 else
1065    AUTOMAKE="$missing_dir/missing automake"
1066    echo "$ac_t""missing" 1>&6
1067 fi
1068
1069 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1070 echo "configure:1071: checking for working autoheader" >&5
1071 # Run test in a subshell; some versions of sh will print an error if
1072 # an executable is not found, even if stderr is redirected.
1073 # Redirect stdin to placate older versions of autoconf.  Sigh.
1074 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1075    AUTOHEADER=autoheader
1076    echo "$ac_t""found" 1>&6
1077 else
1078    AUTOHEADER="$missing_dir/missing autoheader"
1079    echo "$ac_t""missing" 1>&6
1080 fi
1081
1082 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1083 echo "configure:1084: checking for working makeinfo" >&5
1084 # Run test in a subshell; some versions of sh will print an error if
1085 # an executable is not found, even if stderr is redirected.
1086 # Redirect stdin to placate older versions of autoconf.  Sigh.
1087 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1088    MAKEINFO=makeinfo
1089    echo "$ac_t""found" 1>&6
1090 else
1091    MAKEINFO="$missing_dir/missing makeinfo"
1092    echo "$ac_t""missing" 1>&6
1093 fi
1094
1095 install_sh="$missing_dir/install-sh"
1096 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1097
1098 for ac_prog in gnutar gtar tar
1099 do
1100 # Extract the first word of "$ac_prog", so it can be a program name with args.
1101 set dummy $ac_prog; ac_word=$2
1102 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1103 echo "configure:1104: checking for $ac_word" >&5
1104 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1105   echo $ac_n "(cached) $ac_c" 1>&6
1106 else
1107   if test -n "$AMTAR"; then
1108   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1109 else
1110   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1111   ac_dummy="$PATH"
1112   for ac_dir in $ac_dummy; do
1113     test -z "$ac_dir" && ac_dir=.
1114     if test -f $ac_dir/$ac_word; then
1115       ac_cv_prog_AMTAR="$ac_prog"
1116       break
1117     fi
1118   done
1119   IFS="$ac_save_ifs"
1120 fi
1121 fi
1122 AMTAR="$ac_cv_prog_AMTAR"
1123 if test -n "$AMTAR"; then
1124   echo "$ac_t""$AMTAR" 1>&6
1125 else
1126   echo "$ac_t""no" 1>&6
1127 fi
1128
1129 test -n "$AMTAR" && break
1130 done
1131
1132
1133 AMTARFLAGS=
1134 if test -n "$AMTAR"; then
1135   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1136         AMTARFLAGS=o
1137   fi
1138 fi
1139
1140
1141
1142 cat >> confdefs.h <<EOF
1143 #define OPENLDAP_PACKAGE "$PACKAGE"
1144 EOF
1145
1146 cat >> confdefs.h <<EOF
1147 #define OPENLDAP_VERSION "$VERSION"
1148 EOF
1149
1150
1151
1152
1153 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1154 echo "configure:1155: checking configure arguments" >&5
1155
1156
1157 top_builddir=`pwd`
1158
1159 ldap_subdir="/openldap"
1160
1161 # Check whether --with-subdir or --without-subdir was given.
1162 if test "${with_subdir+set}" = set; then
1163   withval="$with_subdir"
1164   case "$withval" in
1165         no) ldap_subdir=""
1166                 ;;
1167         yes)
1168                 ;;
1169         /*|\\*)
1170                 ldap_subdir="$withval"
1171                 ;;
1172         *)
1173                 ldap_subdir="/$withval"
1174                 ;;
1175 esac
1176
1177 fi
1178
1179
1180 # OpenLDAP --enable-debug
1181         # Check whether --enable-debug or --disable-debug was given.
1182 if test "${enable_debug+set}" = set; then
1183   enableval="$enable_debug"
1184   
1185         ol_arg=invalid
1186         for ol_val in auto yes no ; do
1187                 if test "$enableval" = "$ol_val" ; then
1188                         ol_arg="$ol_val"
1189                 fi
1190         done
1191         if test "$ol_arg" = "invalid" ; then
1192                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1193         fi
1194         ol_enable_debug="$ol_arg"
1195
1196 else
1197         ol_enable_debug="yes"
1198 fi
1199 # end --enable-debug
1200 # OpenLDAP --enable-syslog
1201         # Check whether --enable-syslog or --disable-syslog was given.
1202 if test "${enable_syslog+set}" = set; then
1203   enableval="$enable_syslog"
1204   
1205         ol_arg=invalid
1206         for ol_val in auto yes no ; do
1207                 if test "$enableval" = "$ol_val" ; then
1208                         ol_arg="$ol_val"
1209                 fi
1210         done
1211         if test "$ol_arg" = "invalid" ; then
1212                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1213         fi
1214         ol_enable_syslog="$ol_arg"
1215
1216 else
1217         ol_enable_syslog="auto"
1218 fi
1219 # end --enable-syslog
1220 # OpenLDAP --enable-proctitle
1221         # Check whether --enable-proctitle or --disable-proctitle was given.
1222 if test "${enable_proctitle+set}" = set; then
1223   enableval="$enable_proctitle"
1224   
1225         ol_arg=invalid
1226         for ol_val in auto yes no ; do
1227                 if test "$enableval" = "$ol_val" ; then
1228                         ol_arg="$ol_val"
1229                 fi
1230         done
1231         if test "$ol_arg" = "invalid" ; then
1232                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1233         fi
1234         ol_enable_proctitle="$ol_arg"
1235
1236 else
1237         ol_enable_proctitle="yes"
1238 fi
1239 # end --enable-proctitle
1240 # OpenLDAP --enable-cache
1241         # Check whether --enable-cache or --disable-cache was given.
1242 if test "${enable_cache+set}" = set; then
1243   enableval="$enable_cache"
1244   
1245         ol_arg=invalid
1246         for ol_val in auto yes no ; do
1247                 if test "$enableval" = "$ol_val" ; then
1248                         ol_arg="$ol_val"
1249                 fi
1250         done
1251         if test "$ol_arg" = "invalid" ; then
1252                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1253         fi
1254         ol_enable_cache="$ol_arg"
1255
1256 else
1257         ol_enable_cache="yes"
1258 fi
1259 # end --enable-cache
1260 # OpenLDAP --enable-dns
1261         # Check whether --enable-dns or --disable-dns was given.
1262 if test "${enable_dns+set}" = set; then
1263   enableval="$enable_dns"
1264   
1265         ol_arg=invalid
1266         for ol_val in auto yes no ; do
1267                 if test "$enableval" = "$ol_val" ; then
1268                         ol_arg="$ol_val"
1269                 fi
1270         done
1271         if test "$ol_arg" = "invalid" ; then
1272                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1273         fi
1274         ol_enable_dns="$ol_arg"
1275
1276 else
1277         ol_enable_dns="no"
1278 fi
1279 # end --enable-dns
1280 # OpenLDAP --enable-referrals
1281         # Check whether --enable-referrals or --disable-referrals was given.
1282 if test "${enable_referrals+set}" = set; then
1283   enableval="$enable_referrals"
1284   
1285         ol_arg=invalid
1286         for ol_val in auto yes no ; do
1287                 if test "$enableval" = "$ol_val" ; then
1288                         ol_arg="$ol_val"
1289                 fi
1290         done
1291         if test "$ol_arg" = "invalid" ; then
1292                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1293         fi
1294         ol_enable_referrals="$ol_arg"
1295
1296 else
1297         ol_enable_referrals="yes"
1298 fi
1299 # end --enable-referrals
1300 # OpenLDAP --enable-kbind
1301         # Check whether --enable-kbind or --disable-kbind was given.
1302 if test "${enable_kbind+set}" = set; then
1303   enableval="$enable_kbind"
1304   
1305         ol_arg=invalid
1306         for ol_val in auto yes no ; do
1307                 if test "$enableval" = "$ol_val" ; then
1308                         ol_arg="$ol_val"
1309                 fi
1310         done
1311         if test "$ol_arg" = "invalid" ; then
1312                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1313         fi
1314         ol_enable_kbind="$ol_arg"
1315
1316 else
1317         ol_enable_kbind="auto"
1318 fi
1319 # end --enable-kbind
1320 # OpenLDAP --enable-cldap
1321         # Check whether --enable-cldap or --disable-cldap was given.
1322 if test "${enable_cldap+set}" = set; then
1323   enableval="$enable_cldap"
1324   
1325         ol_arg=invalid
1326         for ol_val in auto yes no ; do
1327                 if test "$enableval" = "$ol_val" ; then
1328                         ol_arg="$ol_val"
1329                 fi
1330         done
1331         if test "$ol_arg" = "invalid" ; then
1332                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1333         fi
1334         ol_enable_cldap="$ol_arg"
1335
1336 else
1337         ol_enable_cldap="no"
1338 fi
1339 # end --enable-cldap
1340 # OpenLDAP --enable-ldapi
1341         # Check whether --enable-ldapi or --disable-ldapi was given.
1342 if test "${enable_ldapi+set}" = set; then
1343   enableval="$enable_ldapi"
1344   
1345         ol_arg=invalid
1346         for ol_val in auto yes no ; do
1347                 if test "$enableval" = "$ol_val" ; then
1348                         ol_arg="$ol_val"
1349                 fi
1350         done
1351         if test "$ol_arg" = "invalid" ; then
1352                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1353         fi
1354         ol_enable_ldapi="$ol_arg"
1355
1356 else
1357         ol_enable_ldapi="no"
1358 fi
1359 # end --enable-ldapi
1360 # OpenLDAP --enable-x_compile
1361         # Check whether --enable-x_compile or --disable-x_compile was given.
1362 if test "${enable_x_compile+set}" = set; then
1363   enableval="$enable_x_compile"
1364   
1365         ol_arg=invalid
1366         for ol_val in yes no ; do
1367                 if test "$enableval" = "$ol_val" ; then
1368                         ol_arg="$ol_val"
1369                 fi
1370         done
1371         if test "$ol_arg" = "invalid" ; then
1372                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1373         fi
1374         ol_enable_x_compile="$ol_arg"
1375
1376 else
1377         ol_enable_x_compile="no"
1378 fi
1379 # end --enable-x_compile
1380
1381
1382 # OpenLDAP --with-cyrus_sasl
1383         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1384 if test "${with_cyrus_sasl+set}" = set; then
1385   withval="$with_cyrus_sasl"
1386   
1387         ol_arg=invalid
1388         for ol_val in auto yes no  ; do
1389                 if test "$withval" = "$ol_val" ; then
1390                         ol_arg="$ol_val"
1391                 fi
1392         done
1393         if test "$ol_arg" = "invalid" ; then
1394                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1395         fi
1396         ol_with_cyrus_sasl="$ol_arg"
1397
1398 else
1399         ol_with_cyrus_sasl="auto"
1400 fi
1401 # end --with-cyrus_sasl
1402
1403 # OpenLDAP --with-fetch
1404         # Check whether --with-fetch or --without-fetch was given.
1405 if test "${with_fetch+set}" = set; then
1406   withval="$with_fetch"
1407   
1408         ol_arg=invalid
1409         for ol_val in auto yes no  ; do
1410                 if test "$withval" = "$ol_val" ; then
1411                         ol_arg="$ol_val"
1412                 fi
1413         done
1414         if test "$ol_arg" = "invalid" ; then
1415                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1416         fi
1417         ol_with_fetch="$ol_arg"
1418
1419 else
1420         ol_with_fetch="auto"
1421 fi
1422 # end --with-fetch
1423
1424 # OpenLDAP --with-kerberos
1425         # Check whether --with-kerberos or --without-kerberos was given.
1426 if test "${with_kerberos+set}" = set; then
1427   withval="$with_kerberos"
1428   
1429         ol_arg=invalid
1430         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1431                 if test "$withval" = "$ol_val" ; then
1432                         ol_arg="$ol_val"
1433                 fi
1434         done
1435         if test "$ol_arg" = "invalid" ; then
1436                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1437         fi
1438         ol_with_kerberos="$ol_arg"
1439
1440 else
1441         ol_with_kerberos="auto"
1442 fi
1443 # end --with-kerberos
1444
1445 # OpenLDAP --with-readline
1446         # Check whether --with-readline or --without-readline was given.
1447 if test "${with_readline+set}" = set; then
1448   withval="$with_readline"
1449   
1450         ol_arg=invalid
1451         for ol_val in auto yes no  ; do
1452                 if test "$withval" = "$ol_val" ; then
1453                         ol_arg="$ol_val"
1454                 fi
1455         done
1456         if test "$ol_arg" = "invalid" ; then
1457                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1458         fi
1459         ol_with_readline="$ol_arg"
1460
1461 else
1462         ol_with_readline="auto"
1463 fi
1464 # end --with-readline
1465
1466 # OpenLDAP --with-threads
1467         # Check whether --with-threads or --without-threads was given.
1468 if test "${with_threads+set}" = set; then
1469   withval="$with_threads"
1470   
1471         ol_arg=invalid
1472         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1473                 if test "$withval" = "$ol_val" ; then
1474                         ol_arg="$ol_val"
1475                 fi
1476         done
1477         if test "$ol_arg" = "invalid" ; then
1478                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1479         fi
1480         ol_with_threads="$ol_arg"
1481
1482 else
1483         ol_with_threads="auto"
1484 fi
1485 # end --with-threads
1486
1487 # OpenLDAP --with-tls
1488         # Check whether --with-tls or --without-tls was given.
1489 if test "${with_tls+set}" = set; then
1490   withval="$with_tls"
1491   
1492         ol_arg=invalid
1493         for ol_val in auto ssleay openssl yes no  ; do
1494                 if test "$withval" = "$ol_val" ; then
1495                         ol_arg="$ol_val"
1496                 fi
1497         done
1498         if test "$ol_arg" = "invalid" ; then
1499                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1500         fi
1501         ol_with_tls="$ol_arg"
1502
1503 else
1504         ol_with_tls="auto"
1505 fi
1506 # end --with-tls
1507
1508 # OpenLDAP --with-yielding_select
1509         # Check whether --with-yielding_select or --without-yielding_select was given.
1510 if test "${with_yielding_select+set}" = set; then
1511   withval="$with_yielding_select"
1512   
1513         ol_arg=invalid
1514         for ol_val in auto yes no manual  ; do
1515                 if test "$withval" = "$ol_val" ; then
1516                         ol_arg="$ol_val"
1517                 fi
1518         done
1519         if test "$ol_arg" = "invalid" ; then
1520                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1521         fi
1522         ol_with_yielding_select="$ol_arg"
1523
1524 else
1525         ol_with_yielding_select="auto"
1526 fi
1527 # end --with-yielding_select
1528
1529
1530 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1531 if test "${with_xxldapdoptions+set}" = set; then
1532   withval="$with_xxldapdoptions"
1533   :
1534 fi
1535
1536 # OpenLDAP --enable-ldapd
1537         # Check whether --enable-ldapd or --disable-ldapd was given.
1538 if test "${enable_ldapd+set}" = set; then
1539   enableval="$enable_ldapd"
1540   
1541         ol_arg=invalid
1542         for ol_val in auto yes no ; do
1543                 if test "$enableval" = "$ol_val" ; then
1544                         ol_arg="$ol_val"
1545                 fi
1546         done
1547         if test "$ol_arg" = "invalid" ; then
1548                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1549         fi
1550         ol_enable_ldapd="$ol_arg"
1551
1552 else
1553         ol_enable_ldapd="no"
1554 fi
1555 # end --enable-ldapd
1556
1557 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1558 if test "${with_xxslapdoptions+set}" = set; then
1559   withval="$with_xxslapdoptions"
1560   :
1561 fi
1562
1563 # OpenLDAP --enable-slapd
1564         # Check whether --enable-slapd or --disable-slapd was given.
1565 if test "${enable_slapd+set}" = set; then
1566   enableval="$enable_slapd"
1567   
1568         ol_arg=invalid
1569         for ol_val in auto yes no ; do
1570                 if test "$enableval" = "$ol_val" ; then
1571                         ol_arg="$ol_val"
1572                 fi
1573         done
1574         if test "$ol_arg" = "invalid" ; then
1575                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1576         fi
1577         ol_enable_slapd="$ol_arg"
1578
1579 else
1580         ol_enable_slapd="yes"
1581 fi
1582 # end --enable-slapd
1583 # OpenLDAP --enable-cleartext
1584         # Check whether --enable-cleartext or --disable-cleartext was given.
1585 if test "${enable_cleartext+set}" = set; then
1586   enableval="$enable_cleartext"
1587   
1588         ol_arg=invalid
1589         for ol_val in auto yes no ; do
1590                 if test "$enableval" = "$ol_val" ; then
1591                         ol_arg="$ol_val"
1592                 fi
1593         done
1594         if test "$ol_arg" = "invalid" ; then
1595                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1596         fi
1597         ol_enable_cleartext="$ol_arg"
1598
1599 else
1600         ol_enable_cleartext="yes"
1601 fi
1602 # end --enable-cleartext
1603 # OpenLDAP --enable-crypt
1604         # Check whether --enable-crypt or --disable-crypt was given.
1605 if test "${enable_crypt+set}" = set; then
1606   enableval="$enable_crypt"
1607   
1608         ol_arg=invalid
1609         for ol_val in auto yes no ; do
1610                 if test "$enableval" = "$ol_val" ; then
1611                         ol_arg="$ol_val"
1612                 fi
1613         done
1614         if test "$ol_arg" = "invalid" ; then
1615                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1616         fi
1617         ol_enable_crypt="$ol_arg"
1618
1619 else
1620         ol_enable_crypt="auto"
1621 fi
1622 # end --enable-crypt
1623 # OpenLDAP --enable-kpasswd
1624         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1625 if test "${enable_kpasswd+set}" = set; then
1626   enableval="$enable_kpasswd"
1627   
1628         ol_arg=invalid
1629         for ol_val in auto yes no ; do
1630                 if test "$enableval" = "$ol_val" ; then
1631                         ol_arg="$ol_val"
1632                 fi
1633         done
1634         if test "$ol_arg" = "invalid" ; then
1635                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1636         fi
1637         ol_enable_kpasswd="$ol_arg"
1638
1639 else
1640         ol_enable_kpasswd="no"
1641 fi
1642 # end --enable-kpasswd
1643 # OpenLDAP --enable-spasswd
1644         # Check whether --enable-spasswd or --disable-spasswd was given.
1645 if test "${enable_spasswd+set}" = set; then
1646   enableval="$enable_spasswd"
1647   
1648         ol_arg=invalid
1649         for ol_val in auto yes no ; do
1650                 if test "$enableval" = "$ol_val" ; then
1651                         ol_arg="$ol_val"
1652                 fi
1653         done
1654         if test "$ol_arg" = "invalid" ; then
1655                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1656         fi
1657         ol_enable_spasswd="$ol_arg"
1658
1659 else
1660         ol_enable_spasswd="no"
1661 fi
1662 # end --enable-spasswd
1663 # OpenLDAP --enable-modules
1664         # Check whether --enable-modules or --disable-modules was given.
1665 if test "${enable_modules+set}" = set; then
1666   enableval="$enable_modules"
1667   
1668         ol_arg=invalid
1669         for ol_val in auto yes no ; do
1670                 if test "$enableval" = "$ol_val" ; then
1671                         ol_arg="$ol_val"
1672                 fi
1673         done
1674         if test "$ol_arg" = "invalid" ; then
1675                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1676         fi
1677         ol_enable_modules="$ol_arg"
1678
1679 else
1680         ol_enable_modules="no"
1681 fi
1682 # end --enable-modules
1683 # OpenLDAP --enable-multimaster
1684         # Check whether --enable-multimaster or --disable-multimaster was given.
1685 if test "${enable_multimaster+set}" = set; then
1686   enableval="$enable_multimaster"
1687   
1688         ol_arg=invalid
1689         for ol_val in auto yes no ; do
1690                 if test "$enableval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1696         fi
1697         ol_enable_multimaster="$ol_arg"
1698
1699 else
1700         ol_enable_multimaster="no"
1701 fi
1702 # end --enable-multimaster
1703 # OpenLDAP --enable-phonetic
1704         # Check whether --enable-phonetic or --disable-phonetic was given.
1705 if test "${enable_phonetic+set}" = set; then
1706   enableval="$enable_phonetic"
1707   
1708         ol_arg=invalid
1709         for ol_val in auto yes no ; do
1710                 if test "$enableval" = "$ol_val" ; then
1711                         ol_arg="$ol_val"
1712                 fi
1713         done
1714         if test "$ol_arg" = "invalid" ; then
1715                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1716         fi
1717         ol_enable_phonetic="$ol_arg"
1718
1719 else
1720         ol_enable_phonetic="no"
1721 fi
1722 # end --enable-phonetic
1723 # OpenLDAP --enable-quipu
1724         # Check whether --enable-quipu or --disable-quipu was given.
1725 if test "${enable_quipu+set}" = set; then
1726   enableval="$enable_quipu"
1727   
1728         ol_arg=invalid
1729         for ol_val in auto yes no ; do
1730                 if test "$enableval" = "$ol_val" ; then
1731                         ol_arg="$ol_val"
1732                 fi
1733         done
1734         if test "$ol_arg" = "invalid" ; then
1735                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1736         fi
1737         ol_enable_quipu="$ol_arg"
1738
1739 else
1740         ol_enable_quipu="no"
1741 fi
1742 # end --enable-quipu
1743 # OpenLDAP --enable-rlookups
1744         # Check whether --enable-rlookups or --disable-rlookups was given.
1745 if test "${enable_rlookups+set}" = set; then
1746   enableval="$enable_rlookups"
1747   
1748         ol_arg=invalid
1749         for ol_val in auto yes no ; do
1750                 if test "$enableval" = "$ol_val" ; then
1751                         ol_arg="$ol_val"
1752                 fi
1753         done
1754         if test "$ol_arg" = "invalid" ; then
1755                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1756         fi
1757         ol_enable_rlookups="$ol_arg"
1758
1759 else
1760         ol_enable_rlookups="auto"
1761 fi
1762 # end --enable-rlookups
1763 # OpenLDAP --enable-aci
1764         # Check whether --enable-aci or --disable-aci was given.
1765 if test "${enable_aci+set}" = set; then
1766   enableval="$enable_aci"
1767   
1768         ol_arg=invalid
1769         for ol_val in auto yes no ; do
1770                 if test "$enableval" = "$ol_val" ; then
1771                         ol_arg="$ol_val"
1772                 fi
1773         done
1774         if test "$ol_arg" = "invalid" ; then
1775                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1776         fi
1777         ol_enable_aci="$ol_arg"
1778
1779 else
1780         ol_enable_aci="no"
1781 fi
1782 # end --enable-aci
1783 # OpenLDAP --enable-wrappers
1784         # Check whether --enable-wrappers or --disable-wrappers was given.
1785 if test "${enable_wrappers+set}" = set; then
1786   enableval="$enable_wrappers"
1787   
1788         ol_arg=invalid
1789         for ol_val in auto yes no ; do
1790                 if test "$enableval" = "$ol_val" ; then
1791                         ol_arg="$ol_val"
1792                 fi
1793         done
1794         if test "$ol_arg" = "invalid" ; then
1795                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1796         fi
1797         ol_enable_wrappers="$ol_arg"
1798
1799 else
1800         ol_enable_wrappers="no"
1801 fi
1802 # end --enable-wrappers
1803 # OpenLDAP --enable-dynamic
1804         # Check whether --enable-dynamic or --disable-dynamic was given.
1805 if test "${enable_dynamic+set}" = set; then
1806   enableval="$enable_dynamic"
1807   
1808         ol_arg=invalid
1809         for ol_val in auto yes no ; do
1810                 if test "$enableval" = "$ol_val" ; then
1811                         ol_arg="$ol_val"
1812                 fi
1813         done
1814         if test "$ol_arg" = "invalid" ; then
1815                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1816         fi
1817         ol_enable_dynamic="$ol_arg"
1818
1819 else
1820         ol_enable_dynamic="no"
1821 fi
1822 # end --enable-dynamic
1823
1824 # OpenLDAP --enable-bdb2
1825         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1826 if test "${enable_bdb2+set}" = set; then
1827   enableval="$enable_bdb2"
1828   
1829         ol_arg=invalid
1830         for ol_val in auto yes no ; do
1831                 if test "$enableval" = "$ol_val" ; then
1832                         ol_arg="$ol_val"
1833                 fi
1834         done
1835         if test "$ol_arg" = "invalid" ; then
1836                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1837         fi
1838         ol_enable_bdb2="$ol_arg"
1839
1840 else
1841         ol_enable_bdb2="no"
1842 fi
1843 # end --enable-bdb2
1844 # OpenLDAP --with-bdb2_module
1845         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1846 if test "${with_bdb2_module+set}" = set; then
1847   withval="$with_bdb2_module"
1848   
1849         ol_arg=invalid
1850         for ol_val in static dynamic ; do
1851                 if test "$withval" = "$ol_val" ; then
1852                         ol_arg="$ol_val"
1853                 fi
1854         done
1855         if test "$ol_arg" = "invalid" ; then
1856                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1857         fi
1858         ol_with_bdb2_module="$ol_arg"
1859
1860 else
1861         ol_with_bdb2_module="static"
1862 fi
1863 # end --with-bdb2_module
1864
1865 # OpenLDAP --enable-dnssrv
1866         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1867 if test "${enable_dnssrv+set}" = set; then
1868   enableval="$enable_dnssrv"
1869   
1870         ol_arg=invalid
1871         for ol_val in auto yes no ; do
1872                 if test "$enableval" = "$ol_val" ; then
1873                         ol_arg="$ol_val"
1874                 fi
1875         done
1876         if test "$ol_arg" = "invalid" ; then
1877                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1878         fi
1879         ol_enable_dnssrv="$ol_arg"
1880
1881 else
1882         ol_enable_dnssrv="no"
1883 fi
1884 # end --enable-dnssrv
1885 # OpenLDAP --with-dnssrv_module
1886         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1887 if test "${with_dnssrv_module+set}" = set; then
1888   withval="$with_dnssrv_module"
1889   
1890         ol_arg=invalid
1891         for ol_val in static dynamic ; do
1892                 if test "$withval" = "$ol_val" ; then
1893                         ol_arg="$ol_val"
1894                 fi
1895         done
1896         if test "$ol_arg" = "invalid" ; then
1897                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1898         fi
1899         ol_with_dnssrv_module="$ol_arg"
1900
1901 else
1902         ol_with_dnssrv_module="static"
1903 fi
1904 # end --with-dnssrv_module
1905
1906 # OpenLDAP --enable-ldap
1907         # Check whether --enable-ldap or --disable-ldap was given.
1908 if test "${enable_ldap+set}" = set; then
1909   enableval="$enable_ldap"
1910   
1911         ol_arg=invalid
1912         for ol_val in auto yes no ; do
1913                 if test "$enableval" = "$ol_val" ; then
1914                         ol_arg="$ol_val"
1915                 fi
1916         done
1917         if test "$ol_arg" = "invalid" ; then
1918                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1919         fi
1920         ol_enable_ldap="$ol_arg"
1921
1922 else
1923         ol_enable_ldap="no"
1924 fi
1925 # end --enable-ldap
1926 # OpenLDAP --with-ldap_module
1927         # Check whether --with-ldap_module or --without-ldap_module was given.
1928 if test "${with_ldap_module+set}" = set; then
1929   withval="$with_ldap_module"
1930   
1931         ol_arg=invalid
1932         for ol_val in static dynamic ; do
1933                 if test "$withval" = "$ol_val" ; then
1934                         ol_arg="$ol_val"
1935                 fi
1936         done
1937         if test "$ol_arg" = "invalid" ; then
1938                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1939         fi
1940         ol_with_ldap_module="$ol_arg"
1941
1942 else
1943         ol_with_ldap_module="static"
1944 fi
1945 # end --with-ldap_module
1946
1947 # OpenLDAP --enable-ldbm
1948         # Check whether --enable-ldbm or --disable-ldbm was given.
1949 if test "${enable_ldbm+set}" = set; then
1950   enableval="$enable_ldbm"
1951   
1952         ol_arg=invalid
1953         for ol_val in auto yes no ; do
1954                 if test "$enableval" = "$ol_val" ; then
1955                         ol_arg="$ol_val"
1956                 fi
1957         done
1958         if test "$ol_arg" = "invalid" ; then
1959                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1960         fi
1961         ol_enable_ldbm="$ol_arg"
1962
1963 else
1964         ol_enable_ldbm="yes"
1965 fi
1966 # end --enable-ldbm
1967 # OpenLDAP --with-ldbm_api
1968         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1969 if test "${with_ldbm_api+set}" = set; then
1970   withval="$with_ldbm_api"
1971   
1972         ol_arg=invalid
1973         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1974                 if test "$withval" = "$ol_val" ; then
1975                         ol_arg="$ol_val"
1976                 fi
1977         done
1978         if test "$ol_arg" = "invalid" ; then
1979                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1980         fi
1981         ol_with_ldbm_api="$ol_arg"
1982
1983 else
1984         ol_with_ldbm_api="auto"
1985 fi
1986 # end --with-ldbm_api
1987
1988 # OpenLDAP --with-ldbm_module
1989         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1990 if test "${with_ldbm_module+set}" = set; then
1991   withval="$with_ldbm_module"
1992   
1993         ol_arg=invalid
1994         for ol_val in static dynamic ; do
1995                 if test "$withval" = "$ol_val" ; then
1996                         ol_arg="$ol_val"
1997                 fi
1998         done
1999         if test "$ol_arg" = "invalid" ; then
2000                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2001         fi
2002         ol_with_ldbm_module="$ol_arg"
2003
2004 else
2005         ol_with_ldbm_module="static"
2006 fi
2007 # end --with-ldbm_module
2008
2009 # OpenLDAP --with-ldbm_type
2010         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2011 if test "${with_ldbm_type+set}" = set; then
2012   withval="$with_ldbm_type"
2013   
2014         ol_arg=invalid
2015         for ol_val in auto btree hash ; do
2016                 if test "$withval" = "$ol_val" ; then
2017                         ol_arg="$ol_val"
2018                 fi
2019         done
2020         if test "$ol_arg" = "invalid" ; then
2021                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2022         fi
2023         ol_with_ldbm_type="$ol_arg"
2024
2025 else
2026         ol_with_ldbm_type="auto"
2027 fi
2028 # end --with-ldbm_type
2029
2030 # OpenLDAP --enable-passwd
2031         # Check whether --enable-passwd or --disable-passwd was given.
2032 if test "${enable_passwd+set}" = set; then
2033   enableval="$enable_passwd"
2034   
2035         ol_arg=invalid
2036         for ol_val in auto yes no ; do
2037                 if test "$enableval" = "$ol_val" ; then
2038                         ol_arg="$ol_val"
2039                 fi
2040         done
2041         if test "$ol_arg" = "invalid" ; then
2042                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2043         fi
2044         ol_enable_passwd="$ol_arg"
2045
2046 else
2047         ol_enable_passwd="no"
2048 fi
2049 # end --enable-passwd
2050 # OpenLDAP --with-passwd_module
2051         # Check whether --with-passwd_module or --without-passwd_module was given.
2052 if test "${with_passwd_module+set}" = set; then
2053   withval="$with_passwd_module"
2054   
2055         ol_arg=invalid
2056         for ol_val in static dynamic ; do
2057                 if test "$withval" = "$ol_val" ; then
2058                         ol_arg="$ol_val"
2059                 fi
2060         done
2061         if test "$ol_arg" = "invalid" ; then
2062                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2063         fi
2064         ol_with_passwd_module="$ol_arg"
2065
2066 else
2067         ol_with_passwd_module="static"
2068 fi
2069 # end --with-passwd_module
2070
2071 # OpenLDAP --enable-perl
2072         # Check whether --enable-perl or --disable-perl was given.
2073 if test "${enable_perl+set}" = set; then
2074   enableval="$enable_perl"
2075   
2076         ol_arg=invalid
2077         for ol_val in auto yes no ; do
2078                 if test "$enableval" = "$ol_val" ; then
2079                         ol_arg="$ol_val"
2080                 fi
2081         done
2082         if test "$ol_arg" = "invalid" ; then
2083                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2084         fi
2085         ol_enable_perl="$ol_arg"
2086
2087 else
2088         ol_enable_perl="no"
2089 fi
2090 # end --enable-perl
2091 # OpenLDAP --with-perl_module
2092         # Check whether --with-perl_module or --without-perl_module was given.
2093 if test "${with_perl_module+set}" = set; then
2094   withval="$with_perl_module"
2095   
2096         ol_arg=invalid
2097         for ol_val in static dynamic ; do
2098                 if test "$withval" = "$ol_val" ; then
2099                         ol_arg="$ol_val"
2100                 fi
2101         done
2102         if test "$ol_arg" = "invalid" ; then
2103                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2104         fi
2105         ol_with_perl_module="$ol_arg"
2106
2107 else
2108         ol_with_perl_module="static"
2109 fi
2110 # end --with-perl_module
2111
2112 # OpenLDAP --enable-shell
2113         # Check whether --enable-shell or --disable-shell was given.
2114 if test "${enable_shell+set}" = set; then
2115   enableval="$enable_shell"
2116   
2117         ol_arg=invalid
2118         for ol_val in auto yes no ; do
2119                 if test "$enableval" = "$ol_val" ; then
2120                         ol_arg="$ol_val"
2121                 fi
2122         done
2123         if test "$ol_arg" = "invalid" ; then
2124                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2125         fi
2126         ol_enable_shell="$ol_arg"
2127
2128 else
2129         ol_enable_shell="no"
2130 fi
2131 # end --enable-shell
2132 # OpenLDAP --with-shell_module
2133         # Check whether --with-shell_module or --without-shell_module was given.
2134 if test "${with_shell_module+set}" = set; then
2135   withval="$with_shell_module"
2136   
2137         ol_arg=invalid
2138         for ol_val in static dynamic ; do
2139                 if test "$withval" = "$ol_val" ; then
2140                         ol_arg="$ol_val"
2141                 fi
2142         done
2143         if test "$ol_arg" = "invalid" ; then
2144                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2145         fi
2146         ol_with_shell_module="$ol_arg"
2147
2148 else
2149         ol_with_shell_module="static"
2150 fi
2151 # end --with-shell_module
2152
2153 # OpenLDAP --enable-sql
2154         # Check whether --enable-sql or --disable-sql was given.
2155 if test "${enable_sql+set}" = set; then
2156   enableval="$enable_sql"
2157   
2158         ol_arg=invalid
2159         for ol_val in auto yes no ; do
2160                 if test "$enableval" = "$ol_val" ; then
2161                         ol_arg="$ol_val"
2162                 fi
2163         done
2164         if test "$ol_arg" = "invalid" ; then
2165                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2166         fi
2167         ol_enable_sql="$ol_arg"
2168
2169 else
2170         ol_enable_sql="no"
2171 fi
2172 # end --enable-sql
2173 # OpenLDAP --with-sql_module
2174         # Check whether --with-sql_module or --without-sql_module was given.
2175 if test "${with_sql_module+set}" = set; then
2176   withval="$with_sql_module"
2177   
2178         ol_arg=invalid
2179         for ol_val in static dynamic ; do
2180                 if test "$withval" = "$ol_val" ; then
2181                         ol_arg="$ol_val"
2182                 fi
2183         done
2184         if test "$ol_arg" = "invalid" ; then
2185                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2186         fi
2187         ol_with_sql_module="$ol_arg"
2188
2189 else
2190         ol_with_sql_module="static"
2191 fi
2192 # end --with-sql_module
2193
2194 # OpenLDAP --enable-tcl
2195         # Check whether --enable-tcl or --disable-tcl was given.
2196 if test "${enable_tcl+set}" = set; then
2197   enableval="$enable_tcl"
2198   
2199         ol_arg=invalid
2200         for ol_val in auto yes no ; do
2201                 if test "$enableval" = "$ol_val" ; then
2202                         ol_arg="$ol_val"
2203                 fi
2204         done
2205         if test "$ol_arg" = "invalid" ; then
2206                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2207         fi
2208         ol_enable_tcl="$ol_arg"
2209
2210 else
2211         ol_enable_tcl="no"
2212 fi
2213 # end --enable-tcl
2214 # OpenLDAP --with-tcl_module
2215         # Check whether --with-tcl_module or --without-tcl_module was given.
2216 if test "${with_tcl_module+set}" = set; then
2217   withval="$with_tcl_module"
2218   
2219         ol_arg=invalid
2220         for ol_val in static dynamic ; do
2221                 if test "$withval" = "$ol_val" ; then
2222                         ol_arg="$ol_val"
2223                 fi
2224         done
2225         if test "$ol_arg" = "invalid" ; then
2226                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2227         fi
2228         ol_with_tcl_module="$ol_arg"
2229
2230 else
2231         ol_with_tcl_module="static"
2232 fi
2233 # end --with-tcl_module
2234
2235
2236 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2237 if test "${with_xxslurpdoptions+set}" = set; then
2238   withval="$with_xxslurpdoptions"
2239   :
2240 fi
2241
2242 # OpenLDAP --enable-slurpd
2243         # Check whether --enable-slurpd or --disable-slurpd was given.
2244 if test "${enable_slurpd+set}" = set; then
2245   enableval="$enable_slurpd"
2246   
2247         ol_arg=invalid
2248         for ol_val in auto yes no ; do
2249                 if test "$enableval" = "$ol_val" ; then
2250                         ol_arg="$ol_val"
2251                 fi
2252         done
2253         if test "$ol_arg" = "invalid" ; then
2254                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2255         fi
2256         ol_enable_slurpd="$ol_arg"
2257
2258 else
2259         ol_enable_slurpd="auto"
2260 fi
2261 # end --enable-slurpd
2262
2263 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2264 if test "${with_xxliboptions+set}" = set; then
2265   withval="$with_xxliboptions"
2266   :
2267 fi
2268
2269 # Check whether --enable-static or --disable-static was given.
2270 if test "${enable_static+set}" = set; then
2271   enableval="$enable_static"
2272   p=${PACKAGE-default}
2273 case "$enableval" in
2274 yes) enable_static=yes ;;
2275 no) enable_static=no ;;
2276 *)
2277   enable_static=no
2278   # Look at the argument we got.  We use all the common list separators.
2279   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2280   for pkg in $enableval; do
2281     if test "X$pkg" = "X$p"; then
2282       enable_static=yes
2283     fi
2284   done
2285   IFS="$ac_save_ifs"
2286   ;;
2287 esac
2288 else
2289   enable_static=yes
2290 fi
2291
2292 # Check whether --enable-shared or --disable-shared was given.
2293 if test "${enable_shared+set}" = set; then
2294   enableval="$enable_shared"
2295   p=${PACKAGE-default}
2296 case "$enableval" in
2297 yes) enable_shared=yes ;;
2298 no) enable_shared=no ;;
2299 *)
2300   enable_shared=no
2301   # Look at the argument we got.  We use all the common list separators.
2302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2303   for pkg in $enableval; do
2304     if test "X$pkg" = "X$p"; then
2305       enable_shared=yes
2306     fi
2307   done
2308   IFS="$ac_save_ifs"
2309   ;;
2310 esac
2311 else
2312   enable_shared=yes
2313 fi
2314
2315
2316
2317 # validate options
2318 if test $ol_enable_dns = yes ; then
2319         if test $ol_enable_referrals = no ; then
2320                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2321         fi
2322         if test $ol_enable_referrals = auto ; then
2323                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2324                 ol_enable_referrals=yes
2325         fi
2326 fi
2327
2328 if test $ol_enable_slapd = no ; then
2329                 if test $ol_enable_bdb2 = yes ; then
2330                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2331         fi
2332         if test $ol_enable_dnssrv = yes ; then
2333                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2334         fi
2335         if test $ol_enable_ldap = yes ; then
2336                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2337         fi
2338         if test $ol_enable_ldbm = yes ; then
2339                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2340         fi
2341         if test $ol_enable_passwd = yes ; then
2342                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2343         fi
2344         if test $ol_enable_perl = yes ; then
2345                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2346         fi
2347         if test $ol_enable_shell = yes ; then
2348                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2349         fi
2350         if test $ol_enable_tcl = yes ; then
2351                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2352         fi
2353         if test $ol_enable_sql = yes ; then
2354                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2355         fi
2356         if test $ol_enable_modules = yes ; then
2357                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2358         fi
2359         if test $ol_enable_multimaster = yes ; then
2360                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2361         fi
2362         if test $ol_enable_wrappers = yes ; then
2363                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2364         fi
2365         if test $ol_enable_phonetic = yes ; then
2366                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2367         fi
2368         if test $ol_enable_quipu = yes ; then
2369                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2370         fi
2371         if test $ol_enable_rlookups = yes ; then
2372                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2373         fi
2374         if test $ol_enable_aci = yes ; then
2375                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2376         fi
2377         if test $ol_with_ldbm_api != auto ; then
2378                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2379         fi
2380         if test $ol_with_ldbm_type != auto ; then
2381                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2382         fi
2383         if test $ol_with_bdb2_module != static ; then
2384                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2385         fi
2386         if test $ol_with_dnssrv_module != static ; then
2387                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2388         fi
2389         if test $ol_with_ldap_module != static ; then
2390                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2391         fi
2392         if test $ol_with_ldbm_module != static ; then
2393                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2394         fi
2395         if test $ol_with_passwd_module != static ; then
2396                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2397         fi
2398         if test $ol_with_perl_module != static ; then
2399                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2400         fi
2401         if test $ol_with_shell_module != static ; then
2402                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2403         fi
2404         if test $ol_with_tcl_module != static ; then
2405                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2406         fi
2407         if test $ol_with_sql_module != static ; then
2408                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2409         fi
2410         if test $ol_enable_slurpd = yes ; then
2411                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2412         fi
2413
2414         # force settings to no
2415         ol_enable_bdb2=no
2416         ol_enable_dnssrv=no
2417         ol_enable_ldap=no
2418         ol_enable_ldbm=no
2419         ol_enable_passwd=no
2420         ol_enable_perl=no
2421         ol_enable_shell=no
2422         ol_enable_tcl=no
2423         ol_enable_sql=no
2424
2425         ol_enable_modules=no
2426         ol_enable_multimaster=no
2427         ol_enable_phonetic=no
2428         ol_enable_quipu=no
2429         ol_enable_rlookups=no
2430         ol_enable_aci=no
2431         ol_enable_wrappers=no
2432         ol_enable_dynamic=no
2433
2434         ol_with_ldbm_api=no
2435         ol_with_ldbm_type=no
2436
2437         ol_with_bdb2_module=static
2438         ol_with_dnssrv_module=static
2439         ol_with_ldap_module=static
2440         ol_with_ldbm_module=static
2441         ol_with_passwd_module=static
2442         ol_with_perl_module=static
2443         ol_with_shell_module=static
2444         ol_with_tcl_module=static
2445         ol_with_sql_module=static
2446
2447         ol_enable_slurpd=no
2448
2449 elif test $ol_enable_ldbm = no ; then
2450         
2451         if test $ol_with_ldbm_api != auto ; then
2452                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2453         fi
2454
2455         if test $ol_with_ldbm_type != auto ; then
2456                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2457         fi
2458
2459         if test $ol_with_ldbm_module != static ; then
2460                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2461         fi
2462
2463         if test $ol_enable_bdb2 = yes ; then
2464                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2465         fi
2466
2467         if test $ol_enable_modules != yes -a \
2468                 $ol_enable_dnssrv = no -a \
2469                 $ol_enable_ldap = no -a \
2470                 $ol_enable_passwd = no -a \
2471                 $ol_enable_perl = no -a \
2472                 $ol_enable_shell = no -a \
2473                 $ol_enable_sql = no -a \
2474                 $ol_enable_tcl = no ; then
2475                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2476         fi
2477
2478         ol_with_ldbm_api=no
2479         ol_with_ldbm_type=no
2480         ol_with_ldbm_module=static
2481
2482 elif test $ol_enable_bdb2 = yes ; then
2483         
2484         if test $ol_with_ldbm_api != auto -a \
2485                 $ol_with_ldbm_api != berkeley ; then
2486                 { echo "configure: error: BDB2 requires LDBM API berkeley or auto" 1>&2; exit 1; }
2487         fi
2488
2489         ol_with_ldbm_api=db2
2490
2491 else
2492         
2493         if test $ol_enable_bdb2 != no ; then
2494                 if test $ol_with_ldbm_api != auto -a \
2495                         $ol_with_ldbm_api != berkeley ; then
2496                         echo "configure: warning: BDB2 requires LDBM api berkeley or auto" 1>&2
2497                         ol_enable_bdb2=no
2498                 fi
2499         fi
2500
2501         if test $ol_with_ldbm_api = gdbm -a \
2502                 $ol_with_ldbm_type = btree ; then
2503                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2504         fi
2505         if test $ol_with_ldbm_api = mdbm -a \
2506                 $ol_with_ldbm_type = btree ; then
2507                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2508         fi
2509         if test $ol_with_ldbm_api = ndbm -a \
2510                 $ol_with_ldbm_type = btree ; then
2511                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2512         fi
2513 fi
2514
2515 if test $ol_enable_slurpd = yes ; then
2516                 if test $ol_with_threads = no ; then
2517                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2518         fi
2519 fi
2520
2521 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2522         if test $ol_with_kerberos = no ; then
2523                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2524         fi
2525 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2526         if test $ol_with_kerberos != auto ; then
2527                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2528         else
2529                 ol_with_kerberos=no
2530         fi
2531 fi
2532
2533 if test $ol_enable_spasswd = yes ; then
2534         if test $ol_with_cyrus_sasl = no ; then
2535                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2536         fi
2537         ol_link_spasswd=yes
2538 fi
2539
2540 echo "$ac_t""done" 1>&6
2541
2542 LDAP_LIBS=
2543 LDIF_LIBS=
2544 LDBM_LIBS=
2545 LTHREAD_LIBS=
2546 LUTIL_LIBS=
2547
2548 LDAPD_LIBS=
2549 SLAPD_LIBS=
2550 SLURPD_LIBS=
2551
2552 BUILD_LDAPD=no
2553 BUILD_SLAPD=no
2554 BUILD_SLURPD=no
2555
2556 BUILD_QUIPU=no
2557 BUILD_THREAD=no
2558
2559 BUILD_BDB2=no
2560 BUILD_DNSSRV=no
2561 BUILD_LDAP=no
2562 BUILD_LDBM=no
2563 BUILD_PASSWD=no
2564 BUILD_PERL=no
2565 BUILD_SHELL=no
2566 BUILD_SQL=no
2567 BUILD_TCL=no
2568
2569 BUILD_BDB2_DYNAMIC=static
2570 BUILD_DNSSRV_DYNAMIC=static
2571 BUILD_LDAP_DYNAMIC=static
2572 BUILD_LDBM_DYNAMIC=static
2573 BUILD_PASSWD_DYNAMIC=static
2574 BUILD_PERL_DYNAMIC=static
2575 BUILD_SHELL_DYNAMIC=static
2576 BUILD_TCL_DYNAMIC=static
2577 BUILD_SQL_DYNAMIC=static
2578
2579 SLAPD_MODULES_LDFLAGS=
2580 SLAPD_MODULES_CPPFLAGS=
2581 SLAPD_MODULES_LIST=
2582
2583 SLAPD_PERL_LDFLAGS=
2584 MOD_PERL_LDFLAGS=
2585 PERL_CPPFLAGS=
2586
2587 SLAPD_SQL_LDFLAGS=
2588 SLAPD_SQL_LIBS=
2589 SLAPD_SQL_INCLUDES=
2590
2591 MOD_TCL_LIB=
2592 KRB4_LIBS=
2593 KRB5_LIBS=
2594 READLINE_LIBS=
2595 SASL_LIBS=
2596 TERMCAP_LIBS=
2597 TLS_LIBS=
2598 MODULES_LIBS=
2599 AUTH_LIBS=
2600
2601
2602
2603 cat >> confdefs.h <<\EOF
2604 #define HAVE_MKVERSION 1
2605 EOF
2606
2607
2608
2609
2610 ol_aix_threads=no
2611 case "$target" in
2612 *-*-aix*)       if test -z "$CC" ; then
2613                 case "$ol_with_threads" in
2614                 auto | yes |  posix) ol_aix_threads=yes ;;
2615                 esac
2616         fi
2617 ;;
2618 esac
2619
2620 if test $ol_aix_threads = yes ; then
2621         if test -z "${CC}" ; then
2622                 for ac_prog in cc_r xlc_r cc
2623 do
2624 # Extract the first word of "$ac_prog", so it can be a program name with args.
2625 set dummy $ac_prog; ac_word=$2
2626 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2627 echo "configure:2628: checking for $ac_word" >&5
2628 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2629   echo $ac_n "(cached) $ac_c" 1>&6
2630 else
2631   if test -n "$CC"; then
2632   ac_cv_prog_CC="$CC" # Let the user override the test.
2633 else
2634   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2635   ac_dummy="$PATH"
2636   for ac_dir in $ac_dummy; do
2637     test -z "$ac_dir" && ac_dir=.
2638     if test -f $ac_dir/$ac_word; then
2639       ac_cv_prog_CC="$ac_prog"
2640       break
2641     fi
2642   done
2643   IFS="$ac_save_ifs"
2644 fi
2645 fi
2646 CC="$ac_cv_prog_CC"
2647 if test -n "$CC"; then
2648   echo "$ac_t""$CC" 1>&6
2649 else
2650   echo "$ac_t""no" 1>&6
2651 fi
2652
2653 test -n "$CC" && break
2654 done
2655
2656
2657                 if test "$CC" = cc ; then
2658                                                 if test $ol_with_threads != auto ; then
2659                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2660                         else
2661                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2662                         fi
2663                         ol_with_threads=no
2664                 fi
2665         fi
2666
2667         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2668                 ol_with_threads=posix
2669                 ol_cv_pthread_create=yes
2670         fi
2671 fi
2672
2673 if test -z "${CC}"; then
2674         for ac_prog in cc
2675 do
2676 # Extract the first word of "$ac_prog", so it can be a program name with args.
2677 set dummy $ac_prog; ac_word=$2
2678 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2679 echo "configure:2680: checking for $ac_word" >&5
2680 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2681   echo $ac_n "(cached) $ac_c" 1>&6
2682 else
2683   if test -n "$CC"; then
2684   ac_cv_prog_CC="$CC" # Let the user override the test.
2685 else
2686   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2687   ac_dummy="$PATH"
2688   for ac_dir in $ac_dummy; do
2689     test -z "$ac_dir" && ac_dir=.
2690     if test -f $ac_dir/$ac_word; then
2691       ac_cv_prog_CC="$ac_prog"
2692       break
2693     fi
2694   done
2695   IFS="$ac_save_ifs"
2696 fi
2697 fi
2698 CC="$ac_cv_prog_CC"
2699 if test -n "$CC"; then
2700   echo "$ac_t""$CC" 1>&6
2701 else
2702   echo "$ac_t""no" 1>&6
2703 fi
2704
2705 test -n "$CC" && break
2706 done
2707
2708 fi
2709
2710
2711
2712
2713 # Check whether --enable-fast-install or --disable-fast-install was given.
2714 if test "${enable_fast_install+set}" = set; then
2715   enableval="$enable_fast_install"
2716   p=${PACKAGE-default}
2717 case "$enableval" in
2718 yes) enable_fast_install=yes ;;
2719 no) enable_fast_install=no ;;
2720 *)
2721   enable_fast_install=no
2722   # Look at the argument we got.  We use all the common list separators.
2723   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2724   for pkg in $enableval; do
2725     if test "X$pkg" = "X$p"; then
2726       enable_fast_install=yes
2727     fi
2728   done
2729   IFS="$ac_save_ifs"
2730   ;;
2731 esac
2732 else
2733   enable_fast_install=yes
2734 fi
2735
2736 # Extract the first word of "ranlib", so it can be a program name with args.
2737 set dummy ranlib; ac_word=$2
2738 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2739 echo "configure:2740: checking for $ac_word" >&5
2740 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2741   echo $ac_n "(cached) $ac_c" 1>&6
2742 else
2743   if test -n "$RANLIB"; then
2744   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2745 else
2746   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2747   ac_dummy="$PATH"
2748   for ac_dir in $ac_dummy; do
2749     test -z "$ac_dir" && ac_dir=.
2750     if test -f $ac_dir/$ac_word; then
2751       ac_cv_prog_RANLIB="ranlib"
2752       break
2753     fi
2754   done
2755   IFS="$ac_save_ifs"
2756   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2757 fi
2758 fi
2759 RANLIB="$ac_cv_prog_RANLIB"
2760 if test -n "$RANLIB"; then
2761   echo "$ac_t""$RANLIB" 1>&6
2762 else
2763   echo "$ac_t""no" 1>&6
2764 fi
2765
2766 # Extract the first word of "gcc", so it can be a program name with args.
2767 set dummy gcc; ac_word=$2
2768 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2769 echo "configure:2770: checking for $ac_word" >&5
2770 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2771   echo $ac_n "(cached) $ac_c" 1>&6
2772 else
2773   if test -n "$CC"; then
2774   ac_cv_prog_CC="$CC" # Let the user override the test.
2775 else
2776   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2777   ac_dummy="$PATH"
2778   for ac_dir in $ac_dummy; do
2779     test -z "$ac_dir" && ac_dir=.
2780     if test -f $ac_dir/$ac_word; then
2781       ac_cv_prog_CC="gcc"
2782       break
2783     fi
2784   done
2785   IFS="$ac_save_ifs"
2786 fi
2787 fi
2788 CC="$ac_cv_prog_CC"
2789 if test -n "$CC"; then
2790   echo "$ac_t""$CC" 1>&6
2791 else
2792   echo "$ac_t""no" 1>&6
2793 fi
2794
2795 if test -z "$CC"; then
2796   # Extract the first word of "cc", so it can be a program name with args.
2797 set dummy cc; ac_word=$2
2798 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2799 echo "configure:2800: checking for $ac_word" >&5
2800 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2801   echo $ac_n "(cached) $ac_c" 1>&6
2802 else
2803   if test -n "$CC"; then
2804   ac_cv_prog_CC="$CC" # Let the user override the test.
2805 else
2806   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2807   ac_prog_rejected=no
2808   ac_dummy="$PATH"
2809   for ac_dir in $ac_dummy; do
2810     test -z "$ac_dir" && ac_dir=.
2811     if test -f $ac_dir/$ac_word; then
2812       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2813         ac_prog_rejected=yes
2814         continue
2815       fi
2816       ac_cv_prog_CC="cc"
2817       break
2818     fi
2819   done
2820   IFS="$ac_save_ifs"
2821 if test $ac_prog_rejected = yes; then
2822   # We found a bogon in the path, so make sure we never use it.
2823   set dummy $ac_cv_prog_CC
2824   shift
2825   if test $# -gt 0; then
2826     # We chose a different compiler from the bogus one.
2827     # However, it has the same basename, so the bogon will be chosen
2828     # first if we set CC to just the basename; use the full file name.
2829     shift
2830     set dummy "$ac_dir/$ac_word" "$@"
2831     shift
2832     ac_cv_prog_CC="$@"
2833   fi
2834 fi
2835 fi
2836 fi
2837 CC="$ac_cv_prog_CC"
2838 if test -n "$CC"; then
2839   echo "$ac_t""$CC" 1>&6
2840 else
2841   echo "$ac_t""no" 1>&6
2842 fi
2843
2844   if test -z "$CC"; then
2845     case "`uname -s`" in
2846     *win32* | *WIN32* | *CYGWIN*)
2847       # Extract the first word of "cl", so it can be a program name with args.
2848 set dummy cl; ac_word=$2
2849 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2850 echo "configure:2851: checking for $ac_word" >&5
2851 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2852   echo $ac_n "(cached) $ac_c" 1>&6
2853 else
2854   if test -n "$CC"; then
2855   ac_cv_prog_CC="$CC" # Let the user override the test.
2856 else
2857   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2858   ac_dummy="$PATH"
2859   for ac_dir in $ac_dummy; do
2860     test -z "$ac_dir" && ac_dir=.
2861     if test -f $ac_dir/$ac_word; then
2862       ac_cv_prog_CC="cl"
2863       break
2864     fi
2865   done
2866   IFS="$ac_save_ifs"
2867 fi
2868 fi
2869 CC="$ac_cv_prog_CC"
2870 if test -n "$CC"; then
2871   echo "$ac_t""$CC" 1>&6
2872 else
2873   echo "$ac_t""no" 1>&6
2874 fi
2875  ;;
2876     esac
2877   fi
2878   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2879 fi
2880
2881 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2882 echo "configure:2883: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2883
2884 ac_ext=c
2885 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2886 ac_cpp='$CPP $CPPFLAGS'
2887 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2888 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2889 cross_compiling=$ac_cv_prog_cc_cross
2890
2891 cat > conftest.$ac_ext << EOF
2892
2893 #line 2894 "configure"
2894 #include "confdefs.h"
2895
2896 main(){return(0);}
2897 EOF
2898 if { (eval echo configure:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2899   ac_cv_prog_cc_works=yes
2900   # If we can't run a trivial program, we are probably using a cross compiler.
2901   if (./conftest; exit) 2>/dev/null; then
2902     ac_cv_prog_cc_cross=no
2903   else
2904     ac_cv_prog_cc_cross=yes
2905   fi
2906 else
2907   echo "configure: failed program was:" >&5
2908   cat conftest.$ac_ext >&5
2909   ac_cv_prog_cc_works=no
2910 fi
2911 rm -fr conftest*
2912 ac_ext=c
2913 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2914 ac_cpp='$CPP $CPPFLAGS'
2915 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2916 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2917 cross_compiling=$ac_cv_prog_cc_cross
2918
2919 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2920 if test $ac_cv_prog_cc_works = no; then
2921   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2922 fi
2923 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2924 echo "configure:2925: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2925 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2926 cross_compiling=$ac_cv_prog_cc_cross
2927
2928 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2929 echo "configure:2930: checking whether we are using GNU C" >&5
2930 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2931   echo $ac_n "(cached) $ac_c" 1>&6
2932 else
2933   cat > conftest.c <<EOF
2934 #ifdef __GNUC__
2935   yes;
2936 #endif
2937 EOF
2938 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2939   ac_cv_prog_gcc=yes
2940 else
2941   ac_cv_prog_gcc=no
2942 fi
2943 fi
2944
2945 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2946
2947 if test $ac_cv_prog_gcc = yes; then
2948   GCC=yes
2949 else
2950   GCC=
2951 fi
2952
2953 ac_test_CFLAGS="${CFLAGS+set}"
2954 ac_save_CFLAGS="$CFLAGS"
2955 CFLAGS=
2956 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2957 echo "configure:2958: checking whether ${CC-cc} accepts -g" >&5
2958 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2959   echo $ac_n "(cached) $ac_c" 1>&6
2960 else
2961   echo 'void f(){}' > conftest.c
2962 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2963   ac_cv_prog_cc_g=yes
2964 else
2965   ac_cv_prog_cc_g=no
2966 fi
2967 rm -f conftest*
2968
2969 fi
2970
2971 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2972 if test "$ac_test_CFLAGS" = set; then
2973   CFLAGS="$ac_save_CFLAGS"
2974 elif test $ac_cv_prog_cc_g = yes; then
2975   if test "$GCC" = yes; then
2976     CFLAGS="-g -O2"
2977   else
2978     CFLAGS="-g"
2979   fi
2980 else
2981   if test "$GCC" = yes; then
2982     CFLAGS="-O2"
2983   else
2984     CFLAGS=
2985   fi
2986 fi
2987
2988 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2989 if test "${with_gnu_ld+set}" = set; then
2990   withval="$with_gnu_ld"
2991   test "$withval" = no || with_gnu_ld=yes
2992 else
2993   with_gnu_ld=no
2994 fi
2995
2996 ac_prog=ld
2997 if test "$ac_cv_prog_gcc" = yes; then
2998   # Check if gcc -print-prog-name=ld gives a path.
2999   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3000 echo "configure:3001: checking for ld used by GCC" >&5
3001   ac_prog=`($CC -print-prog-name=ld) 2>&5`
3002   case "$ac_prog" in
3003     # Accept absolute paths.
3004     [\\/]* | [A-Za-z]:[\\/]*)
3005       re_direlt='/[^/][^/]*/\.\./'
3006       # Canonicalize the path of ld
3007       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3008       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3009         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3010       done
3011       test -z "$LD" && LD="$ac_prog"
3012       ;;
3013   "")
3014     # If it fails, then pretend we aren't using GCC.
3015     ac_prog=ld
3016     ;;
3017   *)
3018     # If it is relative, then search for the first ld in PATH.
3019     with_gnu_ld=unknown
3020     ;;
3021   esac
3022 elif test "$with_gnu_ld" = yes; then
3023   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3024 echo "configure:3025: checking for GNU ld" >&5
3025 else
3026   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3027 echo "configure:3028: checking for non-GNU ld" >&5
3028 fi
3029 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   if test -z "$LD"; then
3033   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3034   for ac_dir in $PATH; do
3035     test -z "$ac_dir" && ac_dir=.
3036     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3037       ac_cv_path_LD="$ac_dir/$ac_prog"
3038       # Check to see if the program is GNU ld.  I'd rather use --version,
3039       # but apparently some GNU ld's only accept -v.
3040       # Break only if it was the GNU/non-GNU ld that we prefer.
3041       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3042         test "$with_gnu_ld" != no && break
3043       else
3044         test "$with_gnu_ld" != yes && break
3045       fi
3046     fi
3047   done
3048   IFS="$ac_save_ifs"
3049 else
3050   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3051 fi
3052 fi
3053
3054 LD="$ac_cv_path_LD"
3055 if test -n "$LD"; then
3056   echo "$ac_t""$LD" 1>&6
3057 else
3058   echo "$ac_t""no" 1>&6
3059 fi
3060 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3061 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3062 echo "configure:3063: checking if the linker ($LD) is GNU ld" >&5
3063 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3064   echo $ac_n "(cached) $ac_c" 1>&6
3065 else
3066   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3067 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3068   ac_cv_prog_gnu_ld=yes
3069 else
3070   ac_cv_prog_gnu_ld=no
3071 fi
3072 fi
3073
3074 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3075
3076
3077 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3078 echo "configure:3079: checking for BSD-compatible nm" >&5
3079 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3080   echo $ac_n "(cached) $ac_c" 1>&6
3081 else
3082   if test -n "$NM"; then
3083   # Let the user override the test.
3084   ac_cv_path_NM="$NM"
3085 else
3086   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3087   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3088     test -z "$ac_dir" && ac_dir=.
3089     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3090       # Check to see if the nm accepts a BSD-compat flag.
3091       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3092       #   nm: unknown option "B" ignored
3093       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3094         ac_cv_path_NM="$ac_dir/nm -B"
3095         break
3096       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3097         ac_cv_path_NM="$ac_dir/nm -p"
3098         break
3099       else
3100         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3101         continue # so that we can try to find one that supports BSD flags
3102       fi
3103     fi
3104   done
3105   IFS="$ac_save_ifs"
3106   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3107 fi
3108 fi
3109
3110 NM="$ac_cv_path_NM"
3111 echo "$ac_t""$NM" 1>&6
3112
3113 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3114 echo "configure:3115: checking whether ln -s works" >&5
3115 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3116   echo $ac_n "(cached) $ac_c" 1>&6
3117 else
3118   rm -f conftestdata
3119 if ln -s X conftestdata 2>/dev/null
3120 then
3121   rm -f conftestdata
3122   ac_cv_prog_LN_S="ln -s"
3123 else
3124   ac_cv_prog_LN_S=ln
3125 fi
3126 fi
3127 LN_S="$ac_cv_prog_LN_S"
3128 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3129   echo "$ac_t""yes" 1>&6
3130 else
3131   echo "$ac_t""no" 1>&6
3132 fi
3133
3134 if test $host != $build; then
3135   ac_tool_prefix=${host_alias}-
3136 else
3137   ac_tool_prefix=
3138 fi
3139
3140
3141 case "$target" in
3142 NONE) lt_target="$host" ;;
3143 *) lt_target="$target" ;;
3144 esac
3145
3146 # Check for any special flags to pass to ltconfig.
3147 libtool_flags="--cache-file=$cache_file"
3148 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3149 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3150 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3151 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3152 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3153 libtool_flags="$libtool_flags --enable-dlopen"
3154 libtool_flags="$libtool_flags --enable-win32-dll"
3155 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3156 if test "${enable_libtool_lock+set}" = set; then
3157   enableval="$enable_libtool_lock"
3158   :
3159 fi
3160
3161 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3162 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3163
3164 # Some flags need to be propagated to the compiler or linker for good
3165 # libtool support.
3166 case "$lt_target" in
3167 *-*-irix6*)
3168   # Find out which ABI we are using.
3169   echo '#line 3170 "configure"' > conftest.$ac_ext
3170   if { (eval echo configure:3171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3171     case "`/usr/bin/file conftest.o`" in
3172     *32-bit*)
3173       LD="${LD-ld} -32"
3174       ;;
3175     *N32*)
3176       LD="${LD-ld} -n32"
3177       ;;
3178     *64-bit*)
3179       LD="${LD-ld} -64"
3180       ;;
3181     esac
3182   fi
3183   rm -rf conftest*
3184   ;;
3185
3186 *-*-sco3.2v5*)
3187   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3188   SAVE_CFLAGS="$CFLAGS"
3189   CFLAGS="$CFLAGS -belf"
3190   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3191 echo "configure:3192: checking whether the C compiler needs -belf" >&5
3192 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3193   echo $ac_n "(cached) $ac_c" 1>&6
3194 else
3195   cat > conftest.$ac_ext <<EOF
3196 #line 3197 "configure"
3197 #include "confdefs.h"
3198
3199 int main() {
3200
3201 ; return 0; }
3202 EOF
3203 if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3204   rm -rf conftest*
3205   lt_cv_cc_needs_belf=yes
3206 else
3207   echo "configure: failed program was:" >&5
3208   cat conftest.$ac_ext >&5
3209   rm -rf conftest*
3210   lt_cv_cc_needs_belf=no
3211 fi
3212 rm -f conftest*
3213 fi
3214
3215 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3216   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3217     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3218     CFLAGS="$SAVE_CFLAGS"
3219   fi
3220   ;;
3221
3222 *-*-cygwin* | *-*-mingw*)
3223   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3224 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3225 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3226 echo "configure:3227: checking for $ac_word" >&5
3227 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3228   echo $ac_n "(cached) $ac_c" 1>&6
3229 else
3230   if test -n "$DLLTOOL"; then
3231   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3232 else
3233   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3234   ac_dummy="$PATH"
3235   for ac_dir in $ac_dummy; do
3236     test -z "$ac_dir" && ac_dir=.
3237     if test -f $ac_dir/$ac_word; then
3238       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3239       break
3240     fi
3241   done
3242   IFS="$ac_save_ifs"
3243 fi
3244 fi
3245 DLLTOOL="$ac_cv_prog_DLLTOOL"
3246 if test -n "$DLLTOOL"; then
3247   echo "$ac_t""$DLLTOOL" 1>&6
3248 else
3249   echo "$ac_t""no" 1>&6
3250 fi
3251
3252
3253 if test -z "$ac_cv_prog_DLLTOOL"; then
3254 if test -n "$ac_tool_prefix"; then
3255   # Extract the first word of "dlltool", so it can be a program name with args.
3256 set dummy dlltool; ac_word=$2
3257 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3258 echo "configure:3259: checking for $ac_word" >&5
3259 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3260   echo $ac_n "(cached) $ac_c" 1>&6
3261 else
3262   if test -n "$DLLTOOL"; then
3263   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3264 else
3265   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3266   ac_dummy="$PATH"
3267   for ac_dir in $ac_dummy; do
3268     test -z "$ac_dir" && ac_dir=.
3269     if test -f $ac_dir/$ac_word; then
3270       ac_cv_prog_DLLTOOL="dlltool"
3271       break
3272     fi
3273   done
3274   IFS="$ac_save_ifs"
3275   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3276 fi
3277 fi
3278 DLLTOOL="$ac_cv_prog_DLLTOOL"
3279 if test -n "$DLLTOOL"; then
3280   echo "$ac_t""$DLLTOOL" 1>&6
3281 else
3282   echo "$ac_t""no" 1>&6
3283 fi
3284
3285 else
3286   DLLTOOL="false"
3287 fi
3288 fi
3289
3290   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3291 set dummy ${ac_tool_prefix}as; ac_word=$2
3292 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3293 echo "configure:3294: checking for $ac_word" >&5
3294 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3295   echo $ac_n "(cached) $ac_c" 1>&6
3296 else
3297   if test -n "$AS"; then
3298   ac_cv_prog_AS="$AS" # Let the user override the test.
3299 else
3300   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3301   ac_dummy="$PATH"
3302   for ac_dir in $ac_dummy; do
3303     test -z "$ac_dir" && ac_dir=.
3304     if test -f $ac_dir/$ac_word; then
3305       ac_cv_prog_AS="${ac_tool_prefix}as"
3306       break
3307     fi
3308   done
3309   IFS="$ac_save_ifs"
3310 fi
3311 fi
3312 AS="$ac_cv_prog_AS"
3313 if test -n "$AS"; then
3314   echo "$ac_t""$AS" 1>&6
3315 else
3316   echo "$ac_t""no" 1>&6
3317 fi
3318
3319
3320 if test -z "$ac_cv_prog_AS"; then
3321 if test -n "$ac_tool_prefix"; then
3322   # Extract the first word of "as", so it can be a program name with args.
3323 set dummy as; ac_word=$2
3324 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3325 echo "configure:3326: checking for $ac_word" >&5
3326 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3327   echo $ac_n "(cached) $ac_c" 1>&6
3328 else
3329   if test -n "$AS"; then
3330   ac_cv_prog_AS="$AS" # Let the user override the test.
3331 else
3332   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3333   ac_dummy="$PATH"
3334   for ac_dir in $ac_dummy; do
3335     test -z "$ac_dir" && ac_dir=.
3336     if test -f $ac_dir/$ac_word; then
3337       ac_cv_prog_AS="as"
3338       break
3339     fi
3340   done
3341   IFS="$ac_save_ifs"
3342   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3343 fi
3344 fi
3345 AS="$ac_cv_prog_AS"
3346 if test -n "$AS"; then
3347   echo "$ac_t""$AS" 1>&6
3348 else
3349   echo "$ac_t""no" 1>&6
3350 fi
3351
3352 else
3353   AS="false"
3354 fi
3355 fi
3356
3357   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3358 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3359 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3360 echo "configure:3361: checking for $ac_word" >&5
3361 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3362   echo $ac_n "(cached) $ac_c" 1>&6
3363 else
3364   if test -n "$OBJDUMP"; then
3365   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3366 else
3367   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3368   ac_dummy="$PATH"
3369   for ac_dir in $ac_dummy; do
3370     test -z "$ac_dir" && ac_dir=.
3371     if test -f $ac_dir/$ac_word; then
3372       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3373       break
3374     fi
3375   done
3376   IFS="$ac_save_ifs"
3377 fi
3378 fi
3379 OBJDUMP="$ac_cv_prog_OBJDUMP"
3380 if test -n "$OBJDUMP"; then
3381   echo "$ac_t""$OBJDUMP" 1>&6
3382 else
3383   echo "$ac_t""no" 1>&6
3384 fi
3385
3386
3387 if test -z "$ac_cv_prog_OBJDUMP"; then
3388 if test -n "$ac_tool_prefix"; then
3389   # Extract the first word of "objdump", so it can be a program name with args.
3390 set dummy objdump; ac_word=$2
3391 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3392 echo "configure:3393: checking for $ac_word" >&5
3393 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3394   echo $ac_n "(cached) $ac_c" 1>&6
3395 else
3396   if test -n "$OBJDUMP"; then
3397   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3398 else
3399   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3400   ac_dummy="$PATH"
3401   for ac_dir in $ac_dummy; do
3402     test -z "$ac_dir" && ac_dir=.
3403     if test -f $ac_dir/$ac_word; then
3404       ac_cv_prog_OBJDUMP="objdump"
3405       break
3406     fi
3407   done
3408   IFS="$ac_save_ifs"
3409   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3410 fi
3411 fi
3412 OBJDUMP="$ac_cv_prog_OBJDUMP"
3413 if test -n "$OBJDUMP"; then
3414   echo "$ac_t""$OBJDUMP" 1>&6
3415 else
3416   echo "$ac_t""no" 1>&6
3417 fi
3418
3419 else
3420   OBJDUMP="false"
3421 fi
3422 fi
3423
3424   ;;
3425
3426 esac
3427
3428
3429 # Save cache, so that ltconfig can load it
3430
3431
3432 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3433 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3434 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3435 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3436 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3437 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3438 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3439 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3440
3441 # Reload cache, that may have been modified by ltconfig
3442
3443
3444 # This can be used to rebuild libtool when needed
3445 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3446
3447 # Always use our own libtool.
3448 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3449
3450 # Redirect the config.log output again, so that the ltconfig log is not
3451 # clobbered by the next message.
3452 exec 5>>./config.log
3453
3454
3455 for ac_prog in mawk gawk nawk awk
3456 do
3457 # Extract the first word of "$ac_prog", so it can be a program name with args.
3458 set dummy $ac_prog; ac_word=$2
3459 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3460 echo "configure:3461: checking for $ac_word" >&5
3461 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3462   echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464   if test -n "$AWK"; then
3465   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3466 else
3467   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3468   ac_dummy="$PATH"
3469   for ac_dir in $ac_dummy; do
3470     test -z "$ac_dir" && ac_dir=.
3471     if test -f $ac_dir/$ac_word; then
3472       ac_cv_prog_AWK="$ac_prog"
3473       break
3474     fi
3475   done
3476   IFS="$ac_save_ifs"
3477 fi
3478 fi
3479 AWK="$ac_cv_prog_AWK"
3480 if test -n "$AWK"; then
3481   echo "$ac_t""$AWK" 1>&6
3482 else
3483   echo "$ac_t""no" 1>&6
3484 fi
3485
3486 test -n "$AWK" && break
3487 done
3488
3489 # test for ln hardlink support
3490 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3491 echo "configure:3492: checking whether ln works" >&5
3492 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3493   echo $ac_n "(cached) $ac_c" 1>&6
3494 else
3495   rm -f conftest.src conftest.dst
3496 echo "conftest" > conftest.src
3497 if ln conftest.src conftest.dst 2>/dev/null
3498 then
3499   ol_cv_prog_LN_H="ln"
3500 else
3501   ol_cv_prog_LN_H="cp"
3502 fi
3503 rm -f conftest.src conftest.dst
3504
3505 fi
3506 LN_H="$ol_cv_prog_LN_H"
3507 if test "$ol_cv_prog_LN_H" = "ln"; then
3508         echo "$ac_t""yes" 1>&6
3509 else
3510         echo "$ac_t""no" 1>&6
3511 fi
3512
3513 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3514 echo "configure:3515: checking whether ln -s works" >&5
3515 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3516   echo $ac_n "(cached) $ac_c" 1>&6
3517 else
3518   rm -f conftestdata
3519 if ln -s X conftestdata 2>/dev/null
3520 then
3521   rm -f conftestdata
3522   ac_cv_prog_LN_S="ln -s"
3523 else
3524   ac_cv_prog_LN_S=ln
3525 fi
3526 fi
3527 LN_S="$ac_cv_prog_LN_S"
3528 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3529   echo "$ac_t""yes" 1>&6
3530 else
3531   echo "$ac_t""no" 1>&6
3532 fi
3533
3534
3535 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3536         LN_S="$LN_H"
3537 fi
3538
3539 # Extract the first word of "sendmail", so it can be a program name with args.
3540 set dummy sendmail; ac_word=$2
3541 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3542 echo "configure:3543: checking for $ac_word" >&5
3543 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3544   echo $ac_n "(cached) $ac_c" 1>&6
3545 else
3546   case "$SENDMAIL" in
3547   /*)
3548   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3549   ;;
3550   ?:/*)
3551   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3552   ;;
3553   *)
3554   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3555   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3556   for ac_dir in $ac_dummy; do 
3557     test -z "$ac_dir" && ac_dir=.
3558     if test -f $ac_dir/$ac_word; then
3559       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3560       break
3561     fi
3562   done
3563   IFS="$ac_save_ifs"
3564   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3565   ;;
3566 esac
3567 fi
3568 SENDMAIL="$ac_cv_path_SENDMAIL"
3569 if test -n "$SENDMAIL"; then
3570   echo "$ac_t""$SENDMAIL" 1>&6
3571 else
3572   echo "$ac_t""no" 1>&6
3573 fi
3574
3575 # Extract the first word of "vi", so it can be a program name with args.
3576 set dummy vi; ac_word=$2
3577 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3578 echo "configure:3579: checking for $ac_word" >&5
3579 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3580   echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582   case "$EDITOR" in
3583   /*)
3584   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3585   ;;
3586   ?:/*)
3587   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3588   ;;
3589   *)
3590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3591   ac_dummy="$PATH:/usr/ucb"
3592   for ac_dir in $ac_dummy; do 
3593     test -z "$ac_dir" && ac_dir=.
3594     if test -f $ac_dir/$ac_word; then
3595       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3596       break
3597     fi
3598   done
3599   IFS="$ac_save_ifs"
3600   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3601   ;;
3602 esac
3603 fi
3604 EDITOR="$ac_cv_path_EDITOR"
3605 if test -n "$EDITOR"; then
3606   echo "$ac_t""$EDITOR" 1>&6
3607 else
3608   echo "$ac_t""no" 1>&6
3609 fi
3610
3611 # Extract the first word of "finger", so it can be a program name with args.
3612 set dummy finger; ac_word=$2
3613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3614 echo "configure:3615: checking for $ac_word" >&5
3615 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3616   echo $ac_n "(cached) $ac_c" 1>&6
3617 else
3618   case "$FINGER" in
3619   /*)
3620   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3621   ;;
3622   ?:/*)
3623   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3624   ;;
3625   *)
3626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3627   ac_dummy="$PATH:/usr/ucb"
3628   for ac_dir in $ac_dummy; do 
3629     test -z "$ac_dir" && ac_dir=.
3630     if test -f $ac_dir/$ac_word; then
3631       ac_cv_path_FINGER="$ac_dir/$ac_word"
3632       break
3633     fi
3634   done
3635   IFS="$ac_save_ifs"
3636   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3637   ;;
3638 esac
3639 fi
3640 FINGER="$ac_cv_path_FINGER"
3641 if test -n "$FINGER"; then
3642   echo "$ac_t""$FINGER" 1>&6
3643 else
3644   echo "$ac_t""no" 1>&6
3645 fi
3646
3647
3648 ol_link_perl=no
3649 if test $ol_enable_perl != no ; then
3650         # Extract the first word of "perl", so it can be a program name with args.
3651 set dummy perl; ac_word=$2
3652 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3653 echo "configure:3654: checking for $ac_word" >&5
3654 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3655   echo $ac_n "(cached) $ac_c" 1>&6
3656 else
3657   case "$PERLBIN" in
3658   /*)
3659   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3660   ;;
3661   ?:/*)
3662   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3663   ;;
3664   *)
3665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3666   ac_dummy="$PATH"
3667   for ac_dir in $ac_dummy; do 
3668     test -z "$ac_dir" && ac_dir=.
3669     if test -f $ac_dir/$ac_word; then
3670       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3671       break
3672     fi
3673   done
3674   IFS="$ac_save_ifs"
3675   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3676   ;;
3677 esac
3678 fi
3679 PERLBIN="$ac_cv_path_PERLBIN"
3680 if test -n "$PERLBIN"; then
3681   echo "$ac_t""$PERLBIN" 1>&6
3682 else
3683   echo "$ac_t""no" 1>&6
3684 fi
3685
3686
3687         if test "no$PERLBIN" = "no" ; then
3688                 if test $ol_enable_perl = yes ; then
3689                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3690                 fi
3691
3692         else
3693                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3694                 if test x"$ol_with_perl_module" = "xstatic" ; then
3695                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3696                 else
3697                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3698                 fi
3699                                 ol_link_perl=yes
3700         fi
3701 fi
3702
3703 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3704 echo "configure:3705: checking how to run the C preprocessor" >&5
3705 # On Suns, sometimes $CPP names a directory.
3706 if test -n "$CPP" && test -d "$CPP"; then
3707   CPP=
3708 fi
3709 if test -z "$CPP"; then
3710 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3711   echo $ac_n "(cached) $ac_c" 1>&6
3712 else
3713     # This must be in double quotes, not single quotes, because CPP may get
3714   # substituted into the Makefile and "${CC-cc}" will confuse make.
3715   CPP="${CC-cc} -E"
3716   # On the NeXT, cc -E runs the code through the compiler's parser,
3717   # not just through cpp.
3718   cat > conftest.$ac_ext <<EOF
3719 #line 3720 "configure"
3720 #include "confdefs.h"
3721 #include <assert.h>
3722 Syntax Error
3723 EOF
3724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3725 { (eval echo configure:3726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3727 if test -z "$ac_err"; then
3728   :
3729 else
3730   echo "$ac_err" >&5
3731   echo "configure: failed program was:" >&5
3732   cat conftest.$ac_ext >&5
3733   rm -rf conftest*
3734   CPP="${CC-cc} -E -traditional-cpp"
3735   cat > conftest.$ac_ext <<EOF
3736 #line 3737 "configure"
3737 #include "confdefs.h"
3738 #include <assert.h>
3739 Syntax Error
3740 EOF
3741 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3742 { (eval echo configure:3743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3743 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3744 if test -z "$ac_err"; then
3745   :
3746 else
3747   echo "$ac_err" >&5
3748   echo "configure: failed program was:" >&5
3749   cat conftest.$ac_ext >&5
3750   rm -rf conftest*
3751   CPP="${CC-cc} -nologo -E"
3752   cat > conftest.$ac_ext <<EOF
3753 #line 3754 "configure"
3754 #include "confdefs.h"
3755 #include <assert.h>
3756 Syntax Error
3757 EOF
3758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3759 { (eval echo configure:3760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3761 if test -z "$ac_err"; then
3762   :
3763 else
3764   echo "$ac_err" >&5
3765   echo "configure: failed program was:" >&5
3766   cat conftest.$ac_ext >&5
3767   rm -rf conftest*
3768   CPP=/lib/cpp
3769 fi
3770 rm -f conftest*
3771 fi
3772 rm -f conftest*
3773 fi
3774 rm -f conftest*
3775   ac_cv_prog_CPP="$CPP"
3776 fi
3777   CPP="$ac_cv_prog_CPP"
3778 else
3779   ac_cv_prog_CPP="$CPP"
3780 fi
3781 echo "$ac_t""$CPP" 1>&6
3782
3783
3784 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3785         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3786
3787 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3788         echo "configure: warning: programs compiled here do run here..." 1>&2
3789         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3790
3791 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3792         echo "configure: warning: programs compiled here do not run here..." 1>&2
3793         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3794 fi
3795
3796 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3797 echo "configure:3798: checking for AIX" >&5
3798 cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801 #ifdef _AIX
3802   yes
3803 #endif
3804
3805 EOF
3806 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3807   egrep "yes" >/dev/null 2>&1; then
3808   rm -rf conftest*
3809   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3810 #define _ALL_SOURCE 1
3811 EOF
3812
3813 else
3814   rm -rf conftest*
3815   echo "$ac_t""no" 1>&6
3816 fi
3817 rm -f conftest*
3818
3819
3820 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3821 echo "configure:3822: checking for POSIXized ISC" >&5
3822 if test -d /etc/conf/kconfig.d &&
3823   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3824 then
3825   echo "$ac_t""yes" 1>&6
3826   ISC=yes # If later tests want to check for ISC.
3827   cat >> confdefs.h <<\EOF
3828 #define _POSIX_SOURCE 1
3829 EOF
3830
3831   if test "$GCC" = yes; then
3832     CC="$CC -posix"
3833   else
3834     CC="$CC -Xp"
3835   fi
3836 else
3837   echo "$ac_t""no" 1>&6
3838   ISC=
3839 fi
3840
3841 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3842 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3843 echo "configure:3844: checking for minix/config.h" >&5
3844 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3845   echo $ac_n "(cached) $ac_c" 1>&6
3846 else
3847   cat > conftest.$ac_ext <<EOF
3848 #line 3849 "configure"
3849 #include "confdefs.h"
3850 #include <minix/config.h>
3851 EOF
3852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3853 { (eval echo configure:3854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3855 if test -z "$ac_err"; then
3856   rm -rf conftest*
3857   eval "ac_cv_header_$ac_safe=yes"
3858 else
3859   echo "$ac_err" >&5
3860   echo "configure: failed program was:" >&5
3861   cat conftest.$ac_ext >&5
3862   rm -rf conftest*
3863   eval "ac_cv_header_$ac_safe=no"
3864 fi
3865 rm -f conftest*
3866 fi
3867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3868   echo "$ac_t""yes" 1>&6
3869   MINIX=yes
3870 else
3871   echo "$ac_t""no" 1>&6
3872 MINIX=
3873 fi
3874
3875 if test "$MINIX" = yes; then
3876   cat >> confdefs.h <<\EOF
3877 #define _POSIX_SOURCE 1
3878 EOF
3879
3880   cat >> confdefs.h <<\EOF
3881 #define _POSIX_1_SOURCE 2
3882 EOF
3883
3884   cat >> confdefs.h <<\EOF
3885 #define _MINIX 1
3886 EOF
3887
3888 fi
3889
3890
3891 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3892 echo "configure:3893: checking for Cygwin environment" >&5
3893 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3894   echo $ac_n "(cached) $ac_c" 1>&6
3895 else
3896   cat > conftest.$ac_ext <<EOF
3897 #line 3898 "configure"
3898 #include "confdefs.h"
3899
3900 int main() {
3901
3902 #ifndef __CYGWIN__
3903 #define __CYGWIN__ __CYGWIN32__
3904 #endif
3905 return __CYGWIN__;
3906 ; return 0; }
3907 EOF
3908 if { (eval echo configure:3909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3909   rm -rf conftest*
3910   ac_cv_cygwin=yes
3911 else
3912   echo "configure: failed program was:" >&5
3913   cat conftest.$ac_ext >&5
3914   rm -rf conftest*
3915   ac_cv_cygwin=no
3916 fi
3917 rm -f conftest*
3918 fi
3919
3920 echo "$ac_t""$ac_cv_cygwin" 1>&6
3921 CYGWIN=
3922 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3923 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3924 echo "configure:3925: checking for mingw32 environment" >&5
3925 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3926   echo $ac_n "(cached) $ac_c" 1>&6
3927 else
3928   cat > conftest.$ac_ext <<EOF
3929 #line 3930 "configure"
3930 #include "confdefs.h"
3931
3932 int main() {
3933 return __MINGW32__;
3934 ; return 0; }
3935 EOF
3936 if { (eval echo configure:3937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3937   rm -rf conftest*
3938   ac_cv_mingw32=yes
3939 else
3940   echo "configure: failed program was:" >&5
3941   cat conftest.$ac_ext >&5
3942   rm -rf conftest*
3943   ac_cv_mingw32=no
3944 fi
3945 rm -f conftest*
3946 fi
3947
3948 echo "$ac_t""$ac_cv_mingw32" 1>&6
3949 MINGW32=
3950 test "$ac_cv_mingw32" = yes && MINGW32=yes
3951 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3952 echo "configure:3953: checking for EMX OS/2 environment" >&5
3953 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3954   echo $ac_n "(cached) $ac_c" 1>&6
3955 else
3956   cat > conftest.$ac_ext <<EOF
3957 #line 3958 "configure"
3958 #include "confdefs.h"
3959
3960 int main() {
3961 return __EMX__;
3962 ; return 0; }
3963 EOF
3964 if { (eval echo configure:3965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3965   rm -rf conftest*
3966   ac_cv_emxos2=yes
3967 else
3968   echo "configure: failed program was:" >&5
3969   cat conftest.$ac_ext >&5
3970   rm -rf conftest*
3971   ac_cv_emxos2=no
3972 fi
3973 rm -f conftest*
3974 fi
3975
3976 echo "$ac_t""$ac_cv_emxos2" 1>&6
3977 EMXOS2=
3978 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3979
3980
3981
3982 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3983 echo "configure:3984: checking for executable suffix" >&5
3984 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3985   echo $ac_n "(cached) $ac_c" 1>&6
3986 else
3987   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3988   ac_cv_exeext=.exe
3989 else
3990   rm -f conftest*
3991   echo 'int main () { return 0; }' > conftest.$ac_ext
3992   ac_cv_exeext=
3993   if { (eval echo configure:3994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3994     for file in conftest.*; do
3995       case $file in
3996       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3997       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3998       esac
3999     done
4000   else
4001     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4002   fi
4003   rm -f conftest*
4004   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4005 fi
4006 fi
4007
4008 EXEEXT=""
4009 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4010 echo "$ac_t""${ac_cv_exeext}" 1>&6
4011 ac_exeext=$EXEEXT
4012
4013 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4014 echo "configure:4015: checking for object suffix" >&5
4015 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4016   echo $ac_n "(cached) $ac_c" 1>&6
4017 else
4018   rm -f conftest*
4019 echo 'int i = 1;' > conftest.$ac_ext
4020 if { (eval echo configure:4021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4021   for ac_file in conftest.*; do
4022     case $ac_file in
4023     *.c) ;;
4024     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4025     esac
4026   done
4027 else
4028   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4029 fi
4030 rm -f conftest*
4031 fi
4032
4033 echo "$ac_t""$ac_cv_objext" 1>&6
4034 OBJEXT=$ac_cv_objext
4035 ac_objext=$ac_cv_objext
4036
4037
4038 cat >> confdefs.h <<EOF
4039 #define EXEEXT "${EXEEXT}"
4040 EOF
4041
4042
4043 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4044 echo "configure:4045: checking for be_app in -lbe" >&5
4045 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4046 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4047   echo $ac_n "(cached) $ac_c" 1>&6
4048 else
4049   ac_save_LIBS="$LIBS"
4050 LIBS="-lbe -lroot -lnet $LIBS"
4051 cat > conftest.$ac_ext <<EOF
4052 #line 4053 "configure"
4053 #include "confdefs.h"
4054 /* Override any gcc2 internal prototype to avoid an error.  */
4055 /* We use char because int might match the return type of a gcc2
4056     builtin and then its argument prototype would still apply.  */
4057 char be_app();
4058
4059 int main() {
4060 be_app()
4061 ; return 0; }
4062 EOF
4063 if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4064   rm -rf conftest*
4065   eval "ac_cv_lib_$ac_lib_var=yes"
4066 else
4067   echo "configure: failed program was:" >&5
4068   cat conftest.$ac_ext >&5
4069   rm -rf conftest*
4070   eval "ac_cv_lib_$ac_lib_var=no"
4071 fi
4072 rm -f conftest*
4073 LIBS="$ac_save_LIBS"
4074
4075 fi
4076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4077   echo "$ac_t""yes" 1>&6
4078   LIBS="$LIBS -lbe -lroot -lnet"
4079 else
4080   echo "$ac_t""no" 1>&6
4081 :
4082 fi
4083
4084
4085
4086
4087
4088 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4089 echo "configure:4090: checking for ${CC-cc} option to accept ANSI C" >&5
4090 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4091   echo $ac_n "(cached) $ac_c" 1>&6
4092 else
4093   am_cv_prog_cc_stdc=no
4094 ac_save_CC="$CC"
4095 # Don't try gcc -ansi; that turns off useful extensions and
4096 # breaks some systems' header files.
4097 # AIX                   -qlanglvl=ansi
4098 # Ultrix and OSF/1      -std1
4099 # HP-UX 10.20 and later -Ae
4100 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4101 # SVR4                  -Xc -D__EXTENSIONS__
4102 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4103 do
4104   CC="$ac_save_CC $ac_arg"
4105   cat > conftest.$ac_ext <<EOF
4106 #line 4107 "configure"
4107 #include "confdefs.h"
4108 #include <stdarg.h>
4109 #include <stdio.h>
4110 #include <sys/types.h>
4111 #include <sys/stat.h>
4112 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4113 struct buf { int x; };
4114 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4115 static char *e (p, i)
4116      char **p;
4117      int i;
4118 {
4119   return p[i];
4120 }
4121 static char *f (char * (*g) (char **, int), char **p, ...)
4122 {
4123   char *s;
4124   va_list v;
4125   va_start (v,p);
4126   s = g (p, va_arg (v,int));
4127   va_end (v);
4128   return s;
4129 }
4130 int test (int i, double x);
4131 struct s1 {int (*f) (int a);};
4132 struct s2 {int (*f) (double a);};
4133 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4134 int argc;
4135 char **argv;
4136
4137 int main() {
4138
4139 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4140
4141 ; return 0; }
4142 EOF
4143 if { (eval echo configure:4144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4144   rm -rf conftest*
4145   am_cv_prog_cc_stdc="$ac_arg"; break
4146 else
4147   echo "configure: failed program was:" >&5
4148   cat conftest.$ac_ext >&5
4149 fi
4150 rm -f conftest*
4151 done
4152 CC="$ac_save_CC"
4153
4154 fi
4155
4156 if test -z "$am_cv_prog_cc_stdc"; then
4157   echo "$ac_t""none needed" 1>&6
4158 else
4159   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4160 fi
4161 case "x$am_cv_prog_cc_stdc" in
4162   x|xno) ;;
4163   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4164 esac
4165
4166 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4167         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4168 fi
4169
4170 # test for make depend flag
4171 OL_MKDEP=
4172 OL_MKDEP_FLAGS=
4173 if test -z "${MKDEP}"; then
4174         OL_MKDEP="${CC-cc}"
4175         if test -z "${MKDEP_FLAGS}"; then
4176                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4177 echo "configure:4178: checking for ${OL_MKDEP} depend flag" >&5
4178 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4179   echo $ac_n "(cached) $ac_c" 1>&6
4180 else
4181   
4182                         ol_cv_mkdep=no
4183                         for flag in "-M" "-xM"; do
4184                                 cat > conftest.c <<EOF
4185  noCode;
4186 EOF
4187                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4188                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4189                                 then
4190                                         if test ! -f conftest."${ac_object}" ; then
4191                                                 ol_cv_mkdep=$flag
4192                                                 OL_MKDEP_FLAGS="$flag"
4193                                                 break
4194                                         fi
4195                                 fi
4196                         done
4197                         rm -f conftest*
4198                 
4199 fi
4200
4201 echo "$ac_t""$ol_cv_mkdep" 1>&6
4202         else
4203                 cc_cv_mkdep=yes
4204                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4205         fi
4206 else
4207         cc_cv_mkdep=yes
4208         OL_MKDEP="${MKDEP}"
4209         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4210 fi
4211
4212
4213
4214 if test "${ol_cv_mkdep}" = no ; then
4215         # this will soon become an error
4216         echo "configure: warning: do not know how to generate dependencies" 1>&2
4217 fi
4218
4219 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4220 echo "configure:4221: checking for afopen in -ls" >&5
4221 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4222 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4223   echo $ac_n "(cached) $ac_c" 1>&6
4224 else
4225   ac_save_LIBS="$LIBS"
4226 LIBS="-ls  $LIBS"
4227 cat > conftest.$ac_ext <<EOF
4228 #line 4229 "configure"
4229 #include "confdefs.h"
4230 /* Override any gcc2 internal prototype to avoid an error.  */
4231 /* We use char because int might match the return type of a gcc2
4232     builtin and then its argument prototype would still apply.  */
4233 char afopen();
4234
4235 int main() {
4236 afopen()
4237 ; return 0; }
4238 EOF
4239 if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4240   rm -rf conftest*
4241   eval "ac_cv_lib_$ac_lib_var=yes"
4242 else
4243   echo "configure: failed program was:" >&5
4244   cat conftest.$ac_ext >&5
4245   rm -rf conftest*
4246   eval "ac_cv_lib_$ac_lib_var=no"
4247 fi
4248 rm -f conftest*
4249 LIBS="$ac_save_LIBS"
4250
4251 fi
4252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4253   echo "$ac_t""yes" 1>&6
4254   
4255         AUTH_LIBS=-ls
4256         cat >> confdefs.h <<\EOF
4257 #define HAVE_AIX_SECURITY 1
4258 EOF
4259
4260
4261 else
4262   echo "$ac_t""no" 1>&6
4263 fi
4264
4265
4266 ol_link_modules=no
4267 if test $ol_enable_modules != no ; then
4268         for ac_hdr in ltdl.h
4269 do
4270 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4271 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4272 echo "configure:4273: checking for $ac_hdr" >&5
4273 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4274   echo $ac_n "(cached) $ac_c" 1>&6
4275 else
4276   cat > conftest.$ac_ext <<EOF
4277 #line 4278 "configure"
4278 #include "confdefs.h"
4279 #include <$ac_hdr>
4280 EOF
4281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4282 { (eval echo configure:4283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4284 if test -z "$ac_err"; then
4285   rm -rf conftest*
4286   eval "ac_cv_header_$ac_safe=yes"
4287 else
4288   echo "$ac_err" >&5
4289   echo "configure: failed program was:" >&5
4290   cat conftest.$ac_ext >&5
4291   rm -rf conftest*
4292   eval "ac_cv_header_$ac_safe=no"
4293 fi
4294 rm -f conftest*
4295 fi
4296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4297   echo "$ac_t""yes" 1>&6
4298     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4299   cat >> confdefs.h <<EOF
4300 #define $ac_tr_hdr 1
4301 EOF
4302  
4303 else
4304   echo "$ac_t""no" 1>&6
4305 fi
4306 done
4307
4308
4309         if test $ac_cv_header_ltdl_h = no ; then
4310                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4311         fi
4312
4313         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4314 echo "configure:4315: checking for lt_dlinit in -lltdl" >&5
4315 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4316 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4317   echo $ac_n "(cached) $ac_c" 1>&6
4318 else
4319   ac_save_LIBS="$LIBS"
4320 LIBS="-lltdl  $LIBS"
4321 cat > conftest.$ac_ext <<EOF
4322 #line 4323 "configure"
4323 #include "confdefs.h"
4324 /* Override any gcc2 internal prototype to avoid an error.  */
4325 /* We use char because int might match the return type of a gcc2
4326     builtin and then its argument prototype would still apply.  */
4327 char lt_dlinit();
4328
4329 int main() {
4330 lt_dlinit()
4331 ; return 0; }
4332 EOF
4333 if { (eval echo configure:4334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4334   rm -rf conftest*
4335   eval "ac_cv_lib_$ac_lib_var=yes"
4336 else
4337   echo "configure: failed program was:" >&5
4338   cat conftest.$ac_ext >&5
4339   rm -rf conftest*
4340   eval "ac_cv_lib_$ac_lib_var=no"
4341 fi
4342 rm -f conftest*
4343 LIBS="$ac_save_LIBS"
4344
4345 fi
4346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4347   echo "$ac_t""yes" 1>&6
4348   
4349             MODULES_LIBS=-lltdl
4350             cat >> confdefs.h <<\EOF
4351 #define HAVE_LIBLTDL 1
4352 EOF
4353
4354         
4355 else
4356   echo "$ac_t""no" 1>&6
4357 fi
4358
4359
4360         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4361                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4362         fi
4363         ol_link_modules=yes
4364 else
4365         ol_with_bdb2_module=static
4366         ol_with_dnssrv_module=static
4367         ol_with_ldap_module=static
4368         ol_with_ldbm_module=static
4369         ol_with_passwd_module=static
4370         ol_with_perl_module=static
4371         ol_with_shell_module=static
4372         ol_with_tcl_module=static
4373         ol_with_sql_module=static
4374 fi
4375
4376 # test for EBCDIC
4377 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4378 echo "configure:4379: checking for EBCDIC" >&5
4379 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4380   echo $ac_n "(cached) $ac_c" 1>&6
4381 else
4382   
4383         cat > conftest.$ac_ext <<EOF
4384 #line 4385 "configure"
4385 #include "confdefs.h"
4386
4387 #if !('M' == 0xd4)
4388 #include <__ASCII__/generate_error.h>
4389 #endif
4390
4391 EOF
4392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4393 { (eval echo configure:4394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4395 if test -z "$ac_err"; then
4396   rm -rf conftest*
4397   ol_cv_cpp_ebcdic=yes
4398 else
4399   echo "$ac_err" >&5
4400   echo "configure: failed program was:" >&5
4401   cat conftest.$ac_ext >&5
4402   rm -rf conftest*
4403   ol_cv_cpp_ebcdic=no
4404 fi
4405 rm -f conftest*
4406 fi
4407
4408 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4409 if test $ol_cv_cpp_ebcdic = yes ; then
4410         cat >> confdefs.h <<\EOF
4411 #define HAVE_EBCDIC 1
4412 EOF
4413
4414 fi
4415
4416 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4417 echo "configure:4418: checking for ANSI C header files" >&5
4418 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4419   echo $ac_n "(cached) $ac_c" 1>&6
4420 else
4421   cat > conftest.$ac_ext <<EOF
4422 #line 4423 "configure"
4423 #include "confdefs.h"
4424 #include <stdlib.h>
4425 #include <stdarg.h>
4426 #include <string.h>
4427 #include <float.h>
4428 EOF
4429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4430 { (eval echo configure:4431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4432 if test -z "$ac_err"; then
4433   rm -rf conftest*
4434   ol_cv_header_stdc=yes
4435 else
4436   echo "$ac_err" >&5
4437   echo "configure: failed program was:" >&5
4438   cat conftest.$ac_ext >&5
4439   rm -rf conftest*
4440   ol_cv_header_stdc=no
4441 fi
4442 rm -f conftest*
4443
4444 if test $ol_cv_header_stdc = yes; then
4445   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4446 cat > conftest.$ac_ext <<EOF
4447 #line 4448 "configure"
4448 #include "confdefs.h"
4449 #include <string.h>
4450 EOF
4451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4452   egrep "memchr" >/dev/null 2>&1; then
4453   :
4454 else
4455   rm -rf conftest*
4456   ol_cv_header_stdc=no
4457 fi
4458 rm -f conftest*
4459
4460 fi
4461
4462 if test $ol_cv_header_stdc = yes; then
4463   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4464 cat > conftest.$ac_ext <<EOF
4465 #line 4466 "configure"
4466 #include "confdefs.h"
4467 #include <stdlib.h>
4468 EOF
4469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4470   egrep "free" >/dev/null 2>&1; then
4471   :
4472 else
4473   rm -rf conftest*
4474   ol_cv_header_stdc=no
4475 fi
4476 rm -f conftest*
4477
4478 fi
4479
4480 if test $ol_cv_header_stdc = yes; then
4481   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4482 if test "$cross_compiling" = yes; then
4483   :
4484 else
4485   cat > conftest.$ac_ext <<EOF
4486 #line 4487 "configure"
4487 #include "confdefs.h"
4488 #include <ctype.h>
4489 #ifndef HAVE_EBCDIC
4490 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4491 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4492 #else
4493 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4494                 || ('j' <= (c) && (c) <= 'r') \
4495                 || ('s' <= (c) && (c) <= 'z'))
4496 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4497 #endif
4498 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4499 int main () { int i; for (i = 0; i < 256; i++)
4500 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4501 exit (0); }
4502
4503 EOF
4504 if { (eval echo configure:4505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4505 then
4506   :
4507 else
4508   echo "configure: failed program was:" >&5
4509   cat conftest.$ac_ext >&5
4510   rm -fr conftest*
4511   ol_cv_header_stdc=no
4512 fi
4513 rm -fr conftest*
4514 fi
4515
4516 fi
4517 fi
4518
4519 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4520 if test $ol_cv_header_stdc = yes; then
4521   cat >> confdefs.h <<\EOF
4522 #define STDC_HEADERS 1
4523 EOF
4524
4525 fi
4526 ac_cv_header_stdc=disable
4527
4528
4529 if test $ol_cv_header_stdc != yes; then
4530         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4531 fi
4532
4533 ac_header_dirent=no
4534 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4535 do
4536 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4537 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4538 echo "configure:4539: checking for $ac_hdr that defines DIR" >&5
4539 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4540   echo $ac_n "(cached) $ac_c" 1>&6
4541 else
4542   cat > conftest.$ac_ext <<EOF
4543 #line 4544 "configure"
4544 #include "confdefs.h"
4545 #include <sys/types.h>
4546 #include <$ac_hdr>
4547 int main() {
4548 DIR *dirp = 0;
4549 ; return 0; }
4550 EOF
4551 if { (eval echo configure:4552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4552   rm -rf conftest*
4553   eval "ac_cv_header_dirent_$ac_safe=yes"
4554 else
4555   echo "configure: failed program was:" >&5
4556   cat conftest.$ac_ext >&5
4557   rm -rf conftest*
4558   eval "ac_cv_header_dirent_$ac_safe=no"
4559 fi
4560 rm -f conftest*
4561 fi
4562 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4563   echo "$ac_t""yes" 1>&6
4564     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4565   cat >> confdefs.h <<EOF
4566 #define $ac_tr_hdr 1
4567 EOF
4568  ac_header_dirent=$ac_hdr; break
4569 else
4570   echo "$ac_t""no" 1>&6
4571 fi
4572 done
4573 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4574 if test $ac_header_dirent = dirent.h; then
4575 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4576 echo "configure:4577: checking for opendir in -ldir" >&5
4577 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4578 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4579   echo $ac_n "(cached) $ac_c" 1>&6
4580 else
4581   ac_save_LIBS="$LIBS"
4582 LIBS="-ldir  $LIBS"
4583 cat > conftest.$ac_ext <<EOF
4584 #line 4585 "configure"
4585 #include "confdefs.h"
4586 /* Override any gcc2 internal prototype to avoid an error.  */
4587 /* We use char because int might match the return type of a gcc2
4588     builtin and then its argument prototype would still apply.  */
4589 char opendir();
4590
4591 int main() {
4592 opendir()
4593 ; return 0; }
4594 EOF
4595 if { (eval echo configure:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4596   rm -rf conftest*
4597   eval "ac_cv_lib_$ac_lib_var=yes"
4598 else
4599   echo "configure: failed program was:" >&5
4600   cat conftest.$ac_ext >&5
4601   rm -rf conftest*
4602   eval "ac_cv_lib_$ac_lib_var=no"
4603 fi
4604 rm -f conftest*
4605 LIBS="$ac_save_LIBS"
4606
4607 fi
4608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4609   echo "$ac_t""yes" 1>&6
4610   LIBS="$LIBS -ldir"
4611 else
4612   echo "$ac_t""no" 1>&6
4613 fi
4614
4615 else
4616 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4617 echo "configure:4618: checking for opendir in -lx" >&5
4618 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4619 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4620   echo $ac_n "(cached) $ac_c" 1>&6
4621 else
4622   ac_save_LIBS="$LIBS"
4623 LIBS="-lx  $LIBS"
4624 cat > conftest.$ac_ext <<EOF
4625 #line 4626 "configure"
4626 #include "confdefs.h"
4627 /* Override any gcc2 internal prototype to avoid an error.  */
4628 /* We use char because int might match the return type of a gcc2
4629     builtin and then its argument prototype would still apply.  */
4630 char opendir();
4631
4632 int main() {
4633 opendir()
4634 ; return 0; }
4635 EOF
4636 if { (eval echo configure:4637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4637   rm -rf conftest*
4638   eval "ac_cv_lib_$ac_lib_var=yes"
4639 else
4640   echo "configure: failed program was:" >&5
4641   cat conftest.$ac_ext >&5
4642   rm -rf conftest*
4643   eval "ac_cv_lib_$ac_lib_var=no"
4644 fi
4645 rm -f conftest*
4646 LIBS="$ac_save_LIBS"
4647
4648 fi
4649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4650   echo "$ac_t""yes" 1>&6
4651   LIBS="$LIBS -lx"
4652 else
4653   echo "$ac_t""no" 1>&6
4654 fi
4655
4656 fi
4657
4658 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4659 echo "configure:4660: checking for sys/wait.h that is POSIX.1 compatible" >&5
4660 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4661   echo $ac_n "(cached) $ac_c" 1>&6
4662 else
4663   cat > conftest.$ac_ext <<EOF
4664 #line 4665 "configure"
4665 #include "confdefs.h"
4666 #include <sys/types.h>
4667 #include <sys/wait.h>
4668 #ifndef WEXITSTATUS
4669 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4670 #endif
4671 #ifndef WIFEXITED
4672 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4673 #endif
4674 int main() {
4675 int s;
4676 wait (&s);
4677 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4678 ; return 0; }
4679 EOF
4680 if { (eval echo configure:4681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4681   rm -rf conftest*
4682   ac_cv_header_sys_wait_h=yes
4683 else
4684   echo "configure: failed program was:" >&5
4685   cat conftest.$ac_ext >&5
4686   rm -rf conftest*
4687   ac_cv_header_sys_wait_h=no
4688 fi
4689 rm -f conftest*
4690 fi
4691
4692 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4693 if test $ac_cv_header_sys_wait_h = yes; then
4694   cat >> confdefs.h <<\EOF
4695 #define HAVE_SYS_WAIT_H 1
4696 EOF
4697
4698 fi
4699
4700 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4701 echo "configure:4702: checking POSIX termios" >&5
4702 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4703   echo $ac_n "(cached) $ac_c" 1>&6
4704 else
4705   cat > conftest.$ac_ext <<EOF
4706 #line 4707 "configure"
4707 #include "confdefs.h"
4708 #include <sys/types.h>
4709 #include <unistd.h>
4710 #include <termios.h>
4711 int main() {
4712 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4713    tcgetattr(0, 0);
4714 ; return 0; }
4715 EOF
4716 if { (eval echo configure:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4717   rm -rf conftest*
4718   am_cv_sys_posix_termios=yes
4719 else
4720   echo "configure: failed program was:" >&5
4721   cat conftest.$ac_ext >&5
4722   rm -rf conftest*
4723   am_cv_sys_posix_termios=no
4724 fi
4725 rm -f conftest*
4726 fi
4727
4728 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4729
4730
4731  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4732 echo "configure:4733: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4733 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4734   echo $ac_n "(cached) $ac_c" 1>&6
4735 else
4736   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4737
4738   gwinsz_in_termios_h=no
4739   if test $am_cv_sys_posix_termios = yes; then
4740     cat > conftest.$ac_ext <<EOF
4741 #line 4742 "configure"
4742 #include "confdefs.h"
4743 #include <sys/types.h>
4744 #     include <termios.h>
4745 #     ifdef TIOCGWINSZ
4746         yes
4747 #     endif
4748     
4749 EOF
4750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4751   egrep "yes" >/dev/null 2>&1; then
4752   rm -rf conftest*
4753   gwinsz_in_termios_h=yes
4754 fi
4755 rm -f conftest*
4756
4757   fi
4758
4759   if test $gwinsz_in_termios_h = no; then
4760     cat > conftest.$ac_ext <<EOF
4761 #line 4762 "configure"
4762 #include "confdefs.h"
4763 #include <sys/types.h>
4764 #     include <sys/ioctl.h>
4765 #     ifdef TIOCGWINSZ
4766         yes
4767 #     endif
4768     
4769 EOF
4770 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4771   egrep "yes" >/dev/null 2>&1; then
4772   rm -rf conftest*
4773   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4774 fi
4775 rm -f conftest*
4776
4777   fi
4778   
4779 fi
4780
4781 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4782   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4783     cat >> confdefs.h <<\EOF
4784 #define GWINSZ_IN_SYS_IOCTL 1
4785 EOF
4786
4787   fi
4788
4789 if test $am_cv_sys_posix_termios = yes ; then
4790         cat >> confdefs.h <<\EOF
4791 #define HAVE_POSIX_TERMIOS 1
4792 EOF
4793
4794 fi
4795
4796 for ac_hdr in \
4797         arpa/inet.h             \
4798         arpa/nameser.h  \
4799         assert.h                \
4800         conio.h                 \
4801         crypt.h                 \
4802         direct.h                \
4803         errno.h                 \
4804         fcntl.h                 \
4805         filio.h                 \
4806         getopt.h                \
4807         grp.h                   \
4808         io.h                    \
4809         libutil.h               \
4810         limits.h                \
4811         locale.h                \
4812         netinet/tcp.h   \
4813         malloc.h                \
4814         memory.h                \
4815         psap.h                  \
4816         pwd.h                   \
4817         process.h               \
4818         resolv.h                \
4819         sgtty.h                 \
4820         shadow.h                \
4821         stddef.h                \
4822         string.h                \
4823         strings.h               \
4824         sysexits.h              \
4825         sys/file.h              \
4826         sys/filio.h             \
4827         sys/errno.h             \
4828         sys/ioctl.h             \
4829         sys/param.h             \
4830         sys/resource.h  \
4831         sys/select.h    \
4832         sys/socket.h    \
4833         sys/syslog.h    \
4834         sys/time.h              \
4835         sys/types.h             \
4836         syslog.h                \
4837         termios.h               \
4838         unistd.h                \
4839         winsock.h               \
4840
4841 do
4842 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4843 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4844 echo "configure:4845: checking for $ac_hdr" >&5
4845 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4846   echo $ac_n "(cached) $ac_c" 1>&6
4847 else
4848   cat > conftest.$ac_ext <<EOF
4849 #line 4850 "configure"
4850 #include "confdefs.h"
4851 #include <$ac_hdr>
4852 EOF
4853 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4854 { (eval echo configure:4855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4855 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4856 if test -z "$ac_err"; then
4857   rm -rf conftest*
4858   eval "ac_cv_header_$ac_safe=yes"
4859 else
4860   echo "$ac_err" >&5
4861   echo "configure: failed program was:" >&5
4862   cat conftest.$ac_ext >&5
4863   rm -rf conftest*
4864   eval "ac_cv_header_$ac_safe=no"
4865 fi
4866 rm -f conftest*
4867 fi
4868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4869   echo "$ac_t""yes" 1>&6
4870     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4871   cat >> confdefs.h <<EOF
4872 #define $ac_tr_hdr 1
4873 EOF
4874  
4875 else
4876   echo "$ac_t""no" 1>&6
4877 fi
4878 done
4879
4880
4881
4882
4883 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4884 echo "configure:4885: checking for sigset in -lV3" >&5
4885 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4886 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4887   echo $ac_n "(cached) $ac_c" 1>&6
4888 else
4889   ac_save_LIBS="$LIBS"
4890 LIBS="-lV3  $LIBS"
4891 cat > conftest.$ac_ext <<EOF
4892 #line 4893 "configure"
4893 #include "confdefs.h"
4894 /* Override any gcc2 internal prototype to avoid an error.  */
4895 /* We use char because int might match the return type of a gcc2
4896     builtin and then its argument prototype would still apply.  */
4897 char sigset();
4898
4899 int main() {
4900 sigset()
4901 ; return 0; }
4902 EOF
4903 if { (eval echo configure:4904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4904   rm -rf conftest*
4905   eval "ac_cv_lib_$ac_lib_var=yes"
4906 else
4907   echo "configure: failed program was:" >&5
4908   cat conftest.$ac_ext >&5
4909   rm -rf conftest*
4910   eval "ac_cv_lib_$ac_lib_var=no"
4911 fi
4912 rm -f conftest*
4913 LIBS="$ac_save_LIBS"
4914
4915 fi
4916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4917   echo "$ac_t""yes" 1>&6
4918     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4919     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4920   cat >> confdefs.h <<EOF
4921 #define $ac_tr_lib 1
4922 EOF
4923
4924   LIBS="-lV3 $LIBS"
4925
4926 else
4927   echo "$ac_t""no" 1>&6
4928 fi
4929
4930
4931 if test $ac_cv_header_winsock_h = yes; then
4932         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4933 echo "configure:4934: checking for winsock" >&5
4934 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4935   echo $ac_n "(cached) $ac_c" 1>&6
4936 else
4937   cat > conftest.$ac_ext <<EOF
4938 #line 4939 "configure"
4939 #include "confdefs.h"
4940 #include <winsock.h>
4941 int main() {
4942
4943                         socket(0,0,0);
4944                         select(0,NULL,NULL,NULL,NULL);
4945                         closesocket(0);
4946                         gethostname(NULL,0);
4947         
4948 ; return 0; }
4949 EOF
4950 if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4951   rm -rf conftest*
4952   ol_cv_winsock=yes
4953 else
4954   echo "configure: failed program was:" >&5
4955   cat conftest.$ac_ext >&5
4956   rm -rf conftest*
4957   ol_cv_winsock=no
4958 fi
4959 rm -f conftest*]
4960 fi
4961
4962 echo "$ac_t""$ol_cv_winsock" 1>&6
4963
4964         if test $ol_cv_winsock = yes ; then
4965                 cat >> confdefs.h <<\EOF
4966 #define HAVE_WINSOCK 1
4967 EOF
4968
4969                 ac_cv_func_socket=yes
4970                 ac_cv_func_select=yes
4971                 ac_cv_func_closesocket=yes
4972                 ac_cv_func_gethostname=yes
4973         fi
4974 fi
4975
4976
4977 echo $ac_n "checking for socket""... $ac_c" 1>&6
4978 echo "configure:4979: checking for socket" >&5
4979 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4980   echo $ac_n "(cached) $ac_c" 1>&6
4981 else
4982   cat > conftest.$ac_ext <<EOF
4983 #line 4984 "configure"
4984 #include "confdefs.h"
4985 /* System header to define __stub macros and hopefully few prototypes,
4986     which can conflict with char socket(); below.  */
4987 #include <assert.h>
4988 /* Override any gcc2 internal prototype to avoid an error.  */
4989 /* We use char because int might match the return type of a gcc2
4990     builtin and then its argument prototype would still apply.  */
4991 char socket();
4992 char (*f)();
4993
4994 int main() {
4995
4996 /* The GNU C library defines this for functions which it implements
4997     to always fail with ENOSYS.  Some functions are actually named
4998     something starting with __ and the normal name is an alias.  */
4999 #if defined (__stub_socket) || defined (__stub___socket)
5000 choke me
5001 #else
5002 f = socket;
5003 #endif
5004
5005 ; return 0; }
5006 EOF
5007 if { (eval echo configure:5008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5008   rm -rf conftest*
5009   eval "ac_cv_func_socket=yes"
5010 else
5011   echo "configure: failed program was:" >&5
5012   cat conftest.$ac_ext >&5
5013   rm -rf conftest*
5014   eval "ac_cv_func_socket=no"
5015 fi
5016 rm -f conftest*
5017 fi
5018
5019 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5020   echo "$ac_t""yes" 1>&6
5021   :
5022 else
5023   echo "$ac_t""no" 1>&6
5024         
5025         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5026 echo "configure:5027: checking for main in -lsocket" >&5
5027 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5028 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5029   echo $ac_n "(cached) $ac_c" 1>&6
5030 else
5031   ac_save_LIBS="$LIBS"
5032 LIBS="-lsocket  $LIBS"
5033 cat > conftest.$ac_ext <<EOF
5034 #line 5035 "configure"
5035 #include "confdefs.h"
5036
5037 int main() {
5038 main()
5039 ; return 0; }
5040 EOF
5041 if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5042   rm -rf conftest*
5043   eval "ac_cv_lib_$ac_lib_var=yes"
5044 else
5045   echo "configure: failed program was:" >&5
5046   cat conftest.$ac_ext >&5
5047   rm -rf conftest*
5048   eval "ac_cv_lib_$ac_lib_var=no"
5049 fi
5050 rm -f conftest*
5051 LIBS="$ac_save_LIBS"
5052
5053 fi
5054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5055   echo "$ac_t""yes" 1>&6
5056     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5057     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5058   cat >> confdefs.h <<EOF
5059 #define $ac_tr_lib 1
5060 EOF
5061
5062   LIBS="-lsocket $LIBS"
5063
5064 else
5065   echo "$ac_t""no" 1>&6
5066 fi
5067
5068         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5069 echo "configure:5070: checking for main in -lnet" >&5
5070 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5071 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5072   echo $ac_n "(cached) $ac_c" 1>&6
5073 else
5074   ac_save_LIBS="$LIBS"
5075 LIBS="-lnet  $LIBS"
5076 cat > conftest.$ac_ext <<EOF
5077 #line 5078 "configure"
5078 #include "confdefs.h"
5079
5080 int main() {
5081 main()
5082 ; return 0; }
5083 EOF
5084 if { (eval echo configure:5085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5085   rm -rf conftest*
5086   eval "ac_cv_lib_$ac_lib_var=yes"
5087 else
5088   echo "configure: failed program was:" >&5
5089   cat conftest.$ac_ext >&5
5090   rm -rf conftest*
5091   eval "ac_cv_lib_$ac_lib_var=no"
5092 fi
5093 rm -f conftest*
5094 LIBS="$ac_save_LIBS"
5095
5096 fi
5097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5098   echo "$ac_t""yes" 1>&6
5099     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5100     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5101   cat >> confdefs.h <<EOF
5102 #define $ac_tr_lib 1
5103 EOF
5104
5105   LIBS="-lnet $LIBS"
5106
5107 else
5108   echo "$ac_t""no" 1>&6
5109 fi
5110
5111         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5112 echo "configure:5113: checking for main in -lnsl_s" >&5
5113 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5114 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5115   echo $ac_n "(cached) $ac_c" 1>&6
5116 else
5117   ac_save_LIBS="$LIBS"
5118 LIBS="-lnsl_s  $LIBS"
5119 cat > conftest.$ac_ext <<EOF
5120 #line 5121 "configure"
5121 #include "confdefs.h"
5122
5123 int main() {
5124 main()
5125 ; return 0; }
5126 EOF
5127 if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5128   rm -rf conftest*
5129   eval "ac_cv_lib_$ac_lib_var=yes"
5130 else
5131   echo "configure: failed program was:" >&5
5132   cat conftest.$ac_ext >&5
5133   rm -rf conftest*
5134   eval "ac_cv_lib_$ac_lib_var=no"
5135 fi
5136 rm -f conftest*
5137 LIBS="$ac_save_LIBS"
5138
5139 fi
5140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5141   echo "$ac_t""yes" 1>&6
5142     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5143     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5144   cat >> confdefs.h <<EOF
5145 #define $ac_tr_lib 1
5146 EOF
5147
5148   LIBS="-lnsl_s $LIBS"
5149
5150 else
5151   echo "$ac_t""no" 1>&6
5152 fi
5153
5154         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5155 echo "configure:5156: checking for main in -lnsl" >&5
5156 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5157 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5158   echo $ac_n "(cached) $ac_c" 1>&6
5159 else
5160   ac_save_LIBS="$LIBS"
5161 LIBS="-lnsl  $LIBS"
5162 cat > conftest.$ac_ext <<EOF
5163 #line 5164 "configure"
5164 #include "confdefs.h"
5165
5166 int main() {
5167 main()
5168 ; return 0; }
5169 EOF
5170 if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5171   rm -rf conftest*
5172   eval "ac_cv_lib_$ac_lib_var=yes"
5173 else
5174   echo "configure: failed program was:" >&5
5175   cat conftest.$ac_ext >&5
5176   rm -rf conftest*
5177   eval "ac_cv_lib_$ac_lib_var=no"
5178 fi
5179 rm -f conftest*
5180 LIBS="$ac_save_LIBS"
5181
5182 fi
5183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5184   echo "$ac_t""yes" 1>&6
5185     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5186     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5187   cat >> confdefs.h <<EOF
5188 #define $ac_tr_lib 1
5189 EOF
5190
5191   LIBS="-lnsl $LIBS"
5192
5193 else
5194   echo "$ac_t""no" 1>&6
5195 fi
5196
5197         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5198 echo "configure:5199: checking for socket in -linet" >&5
5199 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5200 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5201   echo $ac_n "(cached) $ac_c" 1>&6
5202 else
5203   ac_save_LIBS="$LIBS"
5204 LIBS="-linet  $LIBS"
5205 cat > conftest.$ac_ext <<EOF
5206 #line 5207 "configure"
5207 #include "confdefs.h"
5208 /* Override any gcc2 internal prototype to avoid an error.  */
5209 /* We use char because int might match the return type of a gcc2
5210     builtin and then its argument prototype would still apply.  */
5211 char socket();
5212
5213 int main() {
5214 socket()
5215 ; return 0; }
5216 EOF
5217 if { (eval echo configure:5218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5218   rm -rf conftest*
5219   eval "ac_cv_lib_$ac_lib_var=yes"
5220 else
5221   echo "configure: failed program was:" >&5
5222   cat conftest.$ac_ext >&5
5223   rm -rf conftest*
5224   eval "ac_cv_lib_$ac_lib_var=no"
5225 fi
5226 rm -f conftest*
5227 LIBS="$ac_save_LIBS"
5228
5229 fi
5230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5231   echo "$ac_t""yes" 1>&6
5232     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5233     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5234   cat >> confdefs.h <<EOF
5235 #define $ac_tr_lib 1
5236 EOF
5237
5238   LIBS="-linet $LIBS"
5239
5240 else
5241   echo "$ac_t""no" 1>&6
5242 fi
5243
5244         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5245 echo "configure:5246: checking for main in -lgen" >&5
5246 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5247 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5248   echo $ac_n "(cached) $ac_c" 1>&6
5249 else
5250   ac_save_LIBS="$LIBS"
5251 LIBS="-lgen  $LIBS"
5252 cat > conftest.$ac_ext <<EOF
5253 #line 5254 "configure"
5254 #include "confdefs.h"
5255
5256 int main() {
5257 main()
5258 ; return 0; }
5259 EOF
5260 if { (eval echo configure:5261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5261   rm -rf conftest*
5262   eval "ac_cv_lib_$ac_lib_var=yes"
5263 else
5264   echo "configure: failed program was:" >&5
5265   cat conftest.$ac_ext >&5
5266   rm -rf conftest*
5267   eval "ac_cv_lib_$ac_lib_var=no"
5268 fi
5269 rm -f conftest*
5270 LIBS="$ac_save_LIBS"
5271
5272 fi
5273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5274   echo "$ac_t""yes" 1>&6
5275     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5276     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5277   cat >> confdefs.h <<EOF
5278 #define $ac_tr_lib 1
5279 EOF
5280
5281   LIBS="-lgen $LIBS"
5282
5283 else
5284   echo "$ac_t""no" 1>&6
5285 fi
5286
5287
5288 fi
5289
5290
5291 echo $ac_n "checking for select""... $ac_c" 1>&6
5292 echo "configure:5293: checking for select" >&5
5293 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5294   echo $ac_n "(cached) $ac_c" 1>&6
5295 else
5296   cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299 /* System header to define __stub macros and hopefully few prototypes,
5300     which can conflict with char select(); below.  */
5301 #include <assert.h>
5302 /* Override any gcc2 internal prototype to avoid an error.  */
5303 /* We use char because int might match the return type of a gcc2
5304     builtin and then its argument prototype would still apply.  */
5305 char select();
5306 char (*f)();
5307
5308 int main() {
5309
5310 /* The GNU C library defines this for functions which it implements
5311     to always fail with ENOSYS.  Some functions are actually named
5312     something starting with __ and the normal name is an alias.  */
5313 #if defined (__stub_select) || defined (__stub___select)
5314 choke me
5315 #else
5316 f = select;
5317 #endif
5318
5319 ; return 0; }
5320 EOF
5321 if { (eval echo configure:5322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5322   rm -rf conftest*
5323   eval "ac_cv_func_select=yes"
5324 else
5325   echo "configure: failed program was:" >&5
5326   cat conftest.$ac_ext >&5
5327   rm -rf conftest*
5328   eval "ac_cv_func_select=no"
5329 fi
5330 rm -f conftest*
5331 fi
5332
5333 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5334   echo "$ac_t""yes" 1>&6
5335   :
5336 else
5337   echo "$ac_t""no" 1>&6
5338 { echo "configure: error: select() required." 1>&2; exit 1; }
5339 fi
5340
5341
5342 if test "${ac_cv_header_winsock_h}" != yes; then
5343                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5344 echo "configure:5345: checking types of arguments for select()" >&5
5345  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5346   echo $ac_n "(cached) $ac_c" 1>&6
5347 else
5348    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5349   echo $ac_n "(cached) $ac_c" 1>&6
5350 else
5351     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5352   echo $ac_n "(cached) $ac_c" 1>&6
5353 else
5354      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5355      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5356       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5357        cat > conftest.$ac_ext <<EOF
5358 #line 5359 "configure"
5359 #include "confdefs.h"
5360 #ifdef HAVE_SYS_TYPES_H
5361 #include <sys/types.h>
5362 #endif
5363 #ifdef HAVE_SYS_TIME_H
5364 #include <sys/time.h>
5365 #endif
5366 #ifdef HAVE_SYS_SELECT_H
5367 #include <sys/select.h>
5368 #endif
5369 #ifdef HAVE_SYS_SOCKET_H
5370 #include <sys/socket.h>
5371 #endif
5372 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);
5373 int main() {
5374
5375 ; return 0; }
5376 EOF
5377 if { (eval echo configure:5378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5378   rm -rf conftest*
5379           ac_not_found=no ; break 3
5380 else
5381   echo "configure: failed program was:" >&5
5382   cat conftest.$ac_ext >&5
5383   rm -rf conftest*
5384   ac_not_found=yes
5385 fi
5386 rm -f conftest*
5387       done
5388      done
5389     done
5390    
5391 fi
5392   
5393 fi
5394  
5395 fi
5396  if test "$ac_not_found" = yes; then
5397   ac_cv_func_select_arg1=int 
5398   ac_cv_func_select_arg234='int *' 
5399   ac_cv_func_select_arg5='struct timeval *'
5400  fi
5401  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5402  cat >> confdefs.h <<EOF
5403 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5404 EOF
5405
5406  cat >> confdefs.h <<EOF
5407 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5408 EOF
5409
5410  cat >> confdefs.h <<EOF
5411 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5412 EOF
5413
5414
5415 fi
5416
5417
5418 for ac_hdr in regex.h 
5419 do
5420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5422 echo "configure:5423: checking for $ac_hdr" >&5
5423 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5424   echo $ac_n "(cached) $ac_c" 1>&6
5425 else
5426   cat > conftest.$ac_ext <<EOF
5427 #line 5428 "configure"
5428 #include "confdefs.h"
5429 #include <$ac_hdr>
5430 EOF
5431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5432 { (eval echo configure:5433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5434 if test -z "$ac_err"; then
5435   rm -rf conftest*
5436   eval "ac_cv_header_$ac_safe=yes"
5437 else
5438   echo "$ac_err" >&5
5439   echo "configure: failed program was:" >&5
5440   cat conftest.$ac_ext >&5
5441   rm -rf conftest*
5442   eval "ac_cv_header_$ac_safe=no"
5443 fi
5444 rm -f conftest*
5445 fi
5446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5447   echo "$ac_t""yes" 1>&6
5448     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5449   cat >> confdefs.h <<EOF
5450 #define $ac_tr_hdr 1
5451 EOF
5452  
5453 else
5454   echo "$ac_t""no" 1>&6
5455 fi
5456 done
5457
5458 if test "$ac_cv_header_regex_h" != yes ; then
5459         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5460 fi
5461 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5462 echo "configure:5463: checking for regfree" >&5
5463 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5464   echo $ac_n "(cached) $ac_c" 1>&6
5465 else
5466   cat > conftest.$ac_ext <<EOF
5467 #line 5468 "configure"
5468 #include "confdefs.h"
5469 /* System header to define __stub macros and hopefully few prototypes,
5470     which can conflict with char regfree(); below.  */
5471 #include <assert.h>
5472 /* Override any gcc2 internal prototype to avoid an error.  */
5473 /* We use char because int might match the return type of a gcc2
5474     builtin and then its argument prototype would still apply.  */
5475 char regfree();
5476 char (*f)();
5477
5478 int main() {
5479
5480 /* The GNU C library defines this for functions which it implements
5481     to always fail with ENOSYS.  Some functions are actually named
5482     something starting with __ and the normal name is an alias.  */
5483 #if defined (__stub_regfree) || defined (__stub___regfree)
5484 choke me
5485 #else
5486 f = regfree;
5487 #endif
5488
5489 ; return 0; }
5490 EOF
5491 if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5492   rm -rf conftest*
5493   eval "ac_cv_func_regfree=yes"
5494 else
5495   echo "configure: failed program was:" >&5
5496   cat conftest.$ac_ext >&5
5497   rm -rf conftest*
5498   eval "ac_cv_func_regfree=no"
5499 fi
5500 rm -f conftest*
5501 fi
5502
5503 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5504   echo "$ac_t""yes" 1>&6
5505   :
5506 else
5507   echo "$ac_t""no" 1>&6
5508 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5509 fi
5510
5511
5512
5513 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5514 echo "configure:5515: checking for compatible POSIX regex" >&5
5515 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5516   echo $ac_n "(cached) $ac_c" 1>&6
5517 else
5518   
5519         if test "$cross_compiling" = yes; then
5520   ol_cv_c_posix_regex=cross
5521 else
5522   cat > conftest.$ac_ext <<EOF
5523 #line 5524 "configure"
5524 #include "confdefs.h"
5525
5526 #include <sys/types.h>
5527 #include <regex.h>
5528 static char *pattern, *string;
5529 main()
5530 {
5531         int rc;
5532         regex_t re;
5533
5534         pattern = "^A";
5535
5536         if(regcomp(&re, pattern, 0)) {
5537                 return -1;
5538         }
5539         
5540         string = "ALL MATCH";
5541         
5542         rc = regexec(&re, string, 0, (void*)0, 0);
5543
5544         regfree(&re);
5545
5546         return rc;
5547 }
5548 EOF
5549 if { (eval echo configure:5550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5550 then
5551   ol_cv_c_posix_regex=yes
5552 else
5553   echo "configure: failed program was:" >&5
5554   cat conftest.$ac_ext >&5
5555   rm -fr conftest*
5556   ol_cv_c_posix_regex=no
5557 fi
5558 rm -fr conftest*
5559 fi
5560
5561 fi
5562
5563 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5564
5565 if test "$ol_cv_c_posix_regex" = no ; then
5566         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5567 fi
5568
5569 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5570 echo "configure:5571: checking for res_search" >&5
5571 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5572   echo $ac_n "(cached) $ac_c" 1>&6
5573 else
5574   cat > conftest.$ac_ext <<EOF
5575 #line 5576 "configure"
5576 #include "confdefs.h"
5577 /* System header to define __stub macros and hopefully few prototypes,
5578     which can conflict with char res_search(); below.  */
5579 #include <assert.h>
5580 /* Override any gcc2 internal prototype to avoid an error.  */
5581 /* We use char because int might match the return type of a gcc2
5582     builtin and then its argument prototype would still apply.  */
5583 char res_search();
5584 char (*f)();
5585
5586 int main() {
5587
5588 /* The GNU C library defines this for functions which it implements
5589     to always fail with ENOSYS.  Some functions are actually named
5590     something starting with __ and the normal name is an alias.  */
5591 #if defined (__stub_res_search) || defined (__stub___res_search)
5592 choke me
5593 #else
5594 f = res_search;
5595 #endif
5596
5597 ; return 0; }
5598 EOF
5599 if { (eval echo configure:5600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5600   rm -rf conftest*
5601   eval "ac_cv_func_res_search=yes"
5602 else
5603   echo "configure: failed program was:" >&5
5604   cat conftest.$ac_ext >&5
5605   rm -rf conftest*
5606   eval "ac_cv_func_res_search=no"
5607 fi
5608 rm -f conftest*
5609 fi
5610
5611 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5612   echo "$ac_t""yes" 1>&6
5613   :
5614 else
5615   echo "$ac_t""no" 1>&6
5616 fi
5617
5618 if test $ac_cv_func_res_search = no ; then 
5619         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5620 echo "configure:5621: checking for res_search in -lbind" >&5
5621 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5622 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5623   echo $ac_n "(cached) $ac_c" 1>&6
5624 else
5625   ac_save_LIBS="$LIBS"
5626 LIBS="-lbind  $LIBS"
5627 cat > conftest.$ac_ext <<EOF
5628 #line 5629 "configure"
5629 #include "confdefs.h"
5630 /* Override any gcc2 internal prototype to avoid an error.  */
5631 /* We use char because int might match the return type of a gcc2
5632     builtin and then its argument prototype would still apply.  */
5633 char res_search();
5634
5635 int main() {
5636 res_search()
5637 ; return 0; }
5638 EOF
5639 if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5640   rm -rf conftest*
5641   eval "ac_cv_lib_$ac_lib_var=yes"
5642 else
5643   echo "configure: failed program was:" >&5
5644   cat conftest.$ac_ext >&5
5645   rm -rf conftest*
5646   eval "ac_cv_lib_$ac_lib_var=no"
5647 fi
5648 rm -f conftest*
5649 LIBS="$ac_save_LIBS"
5650
5651 fi
5652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5653   echo "$ac_t""yes" 1>&6
5654     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5655     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5656   cat >> confdefs.h <<EOF
5657 #define $ac_tr_lib 1
5658 EOF
5659
5660   LIBS="-lbind $LIBS"
5661
5662 else
5663   echo "$ac_t""no" 1>&6
5664 fi
5665
5666         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5667 fi
5668
5669 if test $ac_cv_func_res_search = no ; then 
5670         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5671 echo "configure:5672: checking for __res_search in -lbind" >&5
5672 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5673 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5674   echo $ac_n "(cached) $ac_c" 1>&6
5675 else
5676   ac_save_LIBS="$LIBS"
5677 LIBS="-lbind  $LIBS"
5678 cat > conftest.$ac_ext <<EOF
5679 #line 5680 "configure"
5680 #include "confdefs.h"
5681 /* Override any gcc2 internal prototype to avoid an error.  */
5682 /* We use char because int might match the return type of a gcc2
5683     builtin and then its argument prototype would still apply.  */
5684 char __res_search();
5685
5686 int main() {
5687 __res_search()
5688 ; return 0; }
5689 EOF
5690 if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5691   rm -rf conftest*
5692   eval "ac_cv_lib_$ac_lib_var=yes"
5693 else
5694   echo "configure: failed program was:" >&5
5695   cat conftest.$ac_ext >&5
5696   rm -rf conftest*
5697   eval "ac_cv_lib_$ac_lib_var=no"
5698 fi
5699 rm -f conftest*
5700 LIBS="$ac_save_LIBS"
5701
5702 fi
5703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5704   echo "$ac_t""yes" 1>&6
5705     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5706     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5707   cat >> confdefs.h <<EOF
5708 #define $ac_tr_lib 1
5709 EOF
5710
5711   LIBS="-lbind $LIBS"
5712
5713 else
5714   echo "$ac_t""no" 1>&6
5715 fi
5716
5717         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5718 fi
5719
5720 if test $ac_cv_func_res_search = no ; then 
5721         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5722 echo "configure:5723: checking for res_search in -lresolv" >&5
5723 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5724 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5725   echo $ac_n "(cached) $ac_c" 1>&6
5726 else
5727   ac_save_LIBS="$LIBS"
5728 LIBS="-lresolv  $LIBS"
5729 cat > conftest.$ac_ext <<EOF
5730 #line 5731 "configure"
5731 #include "confdefs.h"
5732 /* Override any gcc2 internal prototype to avoid an error.  */
5733 /* We use char because int might match the return type of a gcc2
5734     builtin and then its argument prototype would still apply.  */
5735 char res_search();
5736
5737 int main() {
5738 res_search()
5739 ; return 0; }
5740 EOF
5741 if { (eval echo configure:5742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5742   rm -rf conftest*
5743   eval "ac_cv_lib_$ac_lib_var=yes"
5744 else
5745   echo "configure: failed program was:" >&5
5746   cat conftest.$ac_ext >&5
5747   rm -rf conftest*
5748   eval "ac_cv_lib_$ac_lib_var=no"
5749 fi
5750 rm -f conftest*
5751 LIBS="$ac_save_LIBS"
5752
5753 fi
5754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5755   echo "$ac_t""yes" 1>&6
5756     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5757     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5758   cat >> confdefs.h <<EOF
5759 #define $ac_tr_lib 1
5760 EOF
5761
5762   LIBS="-lresolv $LIBS"
5763
5764 else
5765   echo "$ac_t""no" 1>&6
5766 fi
5767
5768         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5769 fi
5770
5771 if test "$ac_cv_func_res_search" = yes ; then
5772         cat >> confdefs.h <<\EOF
5773 #define HAVE_RES_SEARCH 1
5774 EOF
5775
5776 elif test $ol_enable_dns = yes ; then
5777         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5778 elif test $ol_enable_dns != no ; then
5779         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5780 fi
5781
5782
5783 ol_link_isode=no
5784 if test $ol_enable_ldapd != no ; then
5785         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5786
5787                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5788 echo "configure:5789: checking for main in -lxtpp" >&5
5789 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5790 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5791   echo $ac_n "(cached) $ac_c" 1>&6
5792 else
5793   ac_save_LIBS="$LIBS"
5794 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5795 cat > conftest.$ac_ext <<EOF
5796 #line 5797 "configure"
5797 #include "confdefs.h"
5798
5799 int main() {
5800 main()
5801 ; return 0; }
5802 EOF
5803 if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5804   rm -rf conftest*
5805   eval "ac_cv_lib_$ac_lib_var=yes"
5806 else
5807   echo "configure: failed program was:" >&5
5808   cat conftest.$ac_ext >&5
5809   rm -rf conftest*
5810   eval "ac_cv_lib_$ac_lib_var=no"
5811 fi
5812 rm -f conftest*
5813 LIBS="$ac_save_LIBS"
5814
5815 fi
5816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5817   echo "$ac_t""yes" 1>&6
5818   
5819                 ol_link_isode=yes
5820                 cat >> confdefs.h <<\EOF
5821 #define HAVE_XTPP 1
5822 EOF
5823
5824                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5825                 
5826 else
5827   echo "$ac_t""no" 1>&6
5828 :
5829 fi
5830
5831         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5832 echo "configure:5833: checking for main in -ldsap" >&5
5833 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5834 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5835   echo $ac_n "(cached) $ac_c" 1>&6
5836 else
5837   ac_save_LIBS="$LIBS"
5838 LIBS="-ldsap -lisode $LIBS"
5839 cat > conftest.$ac_ext <<EOF
5840 #line 5841 "configure"
5841 #include "confdefs.h"
5842
5843 int main() {
5844 main()
5845 ; return 0; }
5846 EOF
5847 if { (eval echo configure:5848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5848   rm -rf conftest*
5849   eval "ac_cv_lib_$ac_lib_var=yes"
5850 else
5851   echo "configure: failed program was:" >&5
5852   cat conftest.$ac_ext >&5
5853   rm -rf conftest*
5854   eval "ac_cv_lib_$ac_lib_var=no"
5855 fi
5856 rm -f conftest*
5857 LIBS="$ac_save_LIBS"
5858
5859 fi
5860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5861   echo "$ac_t""yes" 1>&6
5862   
5863                 ol_link_isode=yes
5864                 cat >> confdefs.h <<\EOF
5865 #define HAVE_DSAP 1
5866 EOF
5867
5868                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5869                 
5870 else
5871   echo "$ac_t""no" 1>&6
5872 :
5873 fi
5874
5875         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5876 echo "configure:5877: checking for main in -lisode" >&5
5877 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5878 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5879   echo $ac_n "(cached) $ac_c" 1>&6
5880 else
5881   ac_save_LIBS="$LIBS"
5882 LIBS="-lisode  $LIBS"
5883 cat > conftest.$ac_ext <<EOF
5884 #line 5885 "configure"
5885 #include "confdefs.h"
5886
5887 int main() {
5888 main()
5889 ; return 0; }
5890 EOF
5891 if { (eval echo configure:5892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5892   rm -rf conftest*
5893   eval "ac_cv_lib_$ac_lib_var=yes"
5894 else
5895   echo "configure: failed program was:" >&5
5896   cat conftest.$ac_ext >&5
5897   rm -rf conftest*
5898   eval "ac_cv_lib_$ac_lib_var=no"
5899 fi
5900 rm -f conftest*
5901 LIBS="$ac_save_LIBS"
5902
5903 fi
5904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5905   echo "$ac_t""yes" 1>&6
5906   
5907                 ol_link_isode=yes
5908                 cat >> confdefs.h <<\EOF
5909 #define HAVE_ISODE 1
5910 EOF
5911
5912                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5913                 
5914 else
5915   echo "$ac_t""no" 1>&6
5916 :
5917 fi
5918
5919 fi
5920
5921 if test $ol_link_isode != no; then
5922         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5923 echo "configure:5924: checking for main in -lpp" >&5
5924 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5925 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5926   echo $ac_n "(cached) $ac_c" 1>&6
5927 else
5928   ac_save_LIBS="$LIBS"
5929 LIBS="-lpp  $LIBS"
5930 cat > conftest.$ac_ext <<EOF
5931 #line 5932 "configure"
5932 #include "confdefs.h"
5933
5934 int main() {
5935 main()
5936 ; return 0; }
5937 EOF
5938 if { (eval echo configure:5939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5939   rm -rf conftest*
5940   eval "ac_cv_lib_$ac_lib_var=yes"
5941 else
5942   echo "configure: failed program was:" >&5
5943   cat conftest.$ac_ext >&5
5944   rm -rf conftest*
5945   eval "ac_cv_lib_$ac_lib_var=no"
5946 fi
5947 rm -f conftest*
5948 LIBS="$ac_save_LIBS"
5949
5950 fi
5951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5952   echo "$ac_t""yes" 1>&6
5953   
5954                 cat >> confdefs.h <<\EOF
5955 #define HAVE_PP 1
5956 EOF
5957
5958                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5959                 
5960 else
5961   echo "$ac_t""no" 1>&6
5962 :
5963 fi
5964
5965
5966         # Extract the first word of "pepsy", so it can be a program name with args.
5967 set dummy pepsy; ac_word=$2
5968 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5969 echo "configure:5970: checking for $ac_word" >&5
5970 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5971   echo $ac_n "(cached) $ac_c" 1>&6
5972 else
5973   case "$PEPSY" in
5974   /*)
5975   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5976   ;;
5977   ?:/*)
5978   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5979   ;;
5980   *)
5981   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5982   ac_dummy="$PATH"
5983   for ac_dir in $ac_dummy; do 
5984     test -z "$ac_dir" && ac_dir=.
5985     if test -f $ac_dir/$ac_word; then
5986       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5987       break
5988     fi
5989   done
5990   IFS="$ac_save_ifs"
5991   ;;
5992 esac
5993 fi
5994 PEPSY="$ac_cv_path_PEPSY"
5995 if test -n "$PEPSY"; then
5996   echo "$ac_t""$PEPSY" 1>&6
5997 else
5998   echo "$ac_t""no" 1>&6
5999 fi
6000
6001 fi
6002
6003 if test $ol_enable_quipu != no ; then
6004         for ac_hdr in quipu/commonarg.h
6005 do
6006 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6007 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6008 echo "configure:6009: checking for $ac_hdr" >&5
6009 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6010   echo $ac_n "(cached) $ac_c" 1>&6
6011 else
6012   cat > conftest.$ac_ext <<EOF
6013 #line 6014 "configure"
6014 #include "confdefs.h"
6015 #include <$ac_hdr>
6016 EOF
6017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6018 { (eval echo configure:6019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6020 if test -z "$ac_err"; then
6021   rm -rf conftest*
6022   eval "ac_cv_header_$ac_safe=yes"
6023 else
6024   echo "$ac_err" >&5
6025   echo "configure: failed program was:" >&5
6026   cat conftest.$ac_ext >&5
6027   rm -rf conftest*
6028   eval "ac_cv_header_$ac_safe=no"
6029 fi
6030 rm -f conftest*
6031 fi
6032 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6033   echo "$ac_t""yes" 1>&6
6034     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6035   cat >> confdefs.h <<EOF
6036 #define $ac_tr_hdr 1
6037 EOF
6038  
6039 else
6040   echo "$ac_t""no" 1>&6
6041 fi
6042 done
6043
6044
6045         if test $ac_cv_header_quipu_commonarg_h = yes ; then
6046                 BUILD_QUIPU=yes
6047         elif test $ol_enable_quipu = auto ; then
6048                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
6049         else
6050                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
6051         fi
6052 fi
6053
6054 ol_link_kbind=no
6055 ol_link_kpasswd=no
6056 ol_link_krb5=no
6057 ol_link_krb4=no
6058
6059 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
6060         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
6061
6062         for ac_hdr in krb5.h
6063 do
6064 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6065 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6066 echo "configure:6067: checking for $ac_hdr" >&5
6067 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6068   echo $ac_n "(cached) $ac_c" 1>&6
6069 else
6070   cat > conftest.$ac_ext <<EOF
6071 #line 6072 "configure"
6072 #include "confdefs.h"
6073 #include <$ac_hdr>
6074 EOF
6075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6076 { (eval echo configure:6077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6078 if test -z "$ac_err"; then
6079   rm -rf conftest*
6080   eval "ac_cv_header_$ac_safe=yes"
6081 else
6082   echo "$ac_err" >&5
6083   echo "configure: failed program was:" >&5
6084   cat conftest.$ac_ext >&5
6085   rm -rf conftest*
6086   eval "ac_cv_header_$ac_safe=no"
6087 fi
6088 rm -f conftest*
6089 fi
6090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6091   echo "$ac_t""yes" 1>&6
6092     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6093   cat >> confdefs.h <<EOF
6094 #define $ac_tr_hdr 1
6095 EOF
6096  
6097 else
6098   echo "$ac_t""no" 1>&6
6099 fi
6100 done
6101
6102
6103         if test $ac_cv_header_krb5_h = yes ; then
6104                                 for ac_hdr in heim_err.h
6105 do
6106 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6107 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6108 echo "configure:6109: checking for $ac_hdr" >&5
6109 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6110   echo $ac_n "(cached) $ac_c" 1>&6
6111 else
6112   cat > conftest.$ac_ext <<EOF
6113 #line 6114 "configure"
6114 #include "confdefs.h"
6115 #include <$ac_hdr>
6116 EOF
6117 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6118 { (eval echo configure:6119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6119 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6120 if test -z "$ac_err"; then
6121   rm -rf conftest*
6122   eval "ac_cv_header_$ac_safe=yes"
6123 else
6124   echo "$ac_err" >&5
6125   echo "configure: failed program was:" >&5
6126   cat conftest.$ac_ext >&5
6127   rm -rf conftest*
6128   eval "ac_cv_header_$ac_safe=no"
6129 fi
6130 rm -f conftest*
6131 fi
6132 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6133   echo "$ac_t""yes" 1>&6
6134     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6135   cat >> confdefs.h <<EOF
6136 #define $ac_tr_hdr 1
6137 EOF
6138  
6139 else
6140   echo "$ac_t""no" 1>&6
6141 fi
6142 done
6143
6144                 if test $ac_cv_header_heim_err_h = yes ; then
6145                         krb5_impl=heimdal
6146                 else
6147                         krb5_impl=mit
6148                 fi
6149
6150                 if test $krb5_impl = mit; then
6151                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6152 echo "configure:6153: checking for main in -lkrb5" >&5
6153 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6154 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6155   echo $ac_n "(cached) $ac_c" 1>&6
6156 else
6157   ac_save_LIBS="$LIBS"
6158 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6159 cat > conftest.$ac_ext <<EOF
6160 #line 6161 "configure"
6161 #include "confdefs.h"
6162
6163 int main() {
6164 main()
6165 ; return 0; }
6166 EOF
6167 if { (eval echo configure:6168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6168   rm -rf conftest*
6169   eval "ac_cv_lib_$ac_lib_var=yes"
6170 else
6171   echo "configure: failed program was:" >&5
6172   cat conftest.$ac_ext >&5
6173   rm -rf conftest*
6174   eval "ac_cv_lib_$ac_lib_var=no"
6175 fi
6176 rm -f conftest*
6177 LIBS="$ac_save_LIBS"
6178
6179 fi
6180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6181   echo "$ac_t""yes" 1>&6
6182   have_krb5=yes
6183                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6184 else
6185   echo "$ac_t""no" 1>&6
6186 have_krb5=no
6187 fi
6188
6189
6190                 elif test $krb5_impl = heimdal; then
6191                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6192 echo "configure:6193: checking for main in -lkrb5" >&5
6193 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6194 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6195   echo $ac_n "(cached) $ac_c" 1>&6
6196 else
6197   ac_save_LIBS="$LIBS"
6198 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6199 cat > conftest.$ac_ext <<EOF
6200 #line 6201 "configure"
6201 #include "confdefs.h"
6202
6203 int main() {
6204 main()
6205 ; return 0; }
6206 EOF
6207 if { (eval echo configure:6208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6208   rm -rf conftest*
6209   eval "ac_cv_lib_$ac_lib_var=yes"
6210 else
6211   echo "configure: failed program was:" >&5
6212   cat conftest.$ac_ext >&5
6213   rm -rf conftest*
6214   eval "ac_cv_lib_$ac_lib_var=no"
6215 fi
6216 rm -f conftest*
6217 LIBS="$ac_save_LIBS"
6218
6219 fi
6220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6221   echo "$ac_t""yes" 1>&6
6222   have_krb5=yes
6223                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6224 else
6225   echo "$ac_t""no" 1>&6
6226 have_krb5=no
6227 fi
6228
6229
6230                         cat >> confdefs.h <<\EOF
6231 #define HAVE_HEIMDAL_KERBEROS 1
6232 EOF
6233
6234                 else
6235                         have_krb5=no
6236                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6237                 fi
6238
6239                 if test $have_krb5 = yes ; then
6240                         ol_link_krb5=yes
6241
6242                         cat >> confdefs.h <<\EOF
6243 #define HAVE_KRB5 1
6244 EOF
6245
6246
6247                         if test $ol_enable_kpasswd != no ; then
6248                                 ol_link_kpasswd=yes;
6249                         fi
6250
6251                         if test $ol_with_kerberos = k5only ; then
6252                                 ol_with_kerberos=found
6253                         fi
6254
6255                 elif test $ol_with_kerberos != auto ; then
6256                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6257                 fi
6258
6259         fi
6260 fi
6261
6262 if test $ol_link_krb5 = yes -a \
6263         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6264
6265         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6266 do
6267 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6268 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6269 echo "configure:6270: checking for $ac_hdr" >&5
6270 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6271   echo $ac_n "(cached) $ac_c" 1>&6
6272 else
6273   cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276 #include <$ac_hdr>
6277 EOF
6278 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6279 { (eval echo configure:6280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6280 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6281 if test -z "$ac_err"; then
6282   rm -rf conftest*
6283   eval "ac_cv_header_$ac_safe=yes"
6284 else
6285   echo "$ac_err" >&5
6286   echo "configure: failed program was:" >&5
6287   cat conftest.$ac_ext >&5
6288   rm -rf conftest*
6289   eval "ac_cv_header_$ac_safe=no"
6290 fi
6291 rm -f conftest*
6292 fi
6293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6294   echo "$ac_t""yes" 1>&6
6295     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6296   cat >> confdefs.h <<EOF
6297 #define $ac_tr_hdr 1
6298 EOF
6299  
6300 else
6301   echo "$ac_t""no" 1>&6
6302 fi
6303 done
6304
6305
6306         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6307                 if test $krb5_impl = mit; then
6308                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6309 echo "configure:6310: checking for main in -lkrb4" >&5
6310 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6311 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6312   echo $ac_n "(cached) $ac_c" 1>&6
6313 else
6314   ac_save_LIBS="$LIBS"
6315 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6316 cat > conftest.$ac_ext <<EOF
6317 #line 6318 "configure"
6318 #include "confdefs.h"
6319
6320 int main() {
6321 main()
6322 ; return 0; }
6323 EOF
6324 if { (eval echo configure:6325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6325   rm -rf conftest*
6326   eval "ac_cv_lib_$ac_lib_var=yes"
6327 else
6328   echo "configure: failed program was:" >&5
6329   cat conftest.$ac_ext >&5
6330   rm -rf conftest*
6331   eval "ac_cv_lib_$ac_lib_var=no"
6332 fi
6333 rm -f conftest*
6334 LIBS="$ac_save_LIBS"
6335
6336 fi
6337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6338   echo "$ac_t""yes" 1>&6
6339   have_k425=yes
6340                                 KRB4_LIBS="-lkrb4 -ldes425"
6341 else
6342   echo "$ac_t""no" 1>&6
6343 have_k425=no
6344 fi
6345
6346
6347                 elif test $krb5_impl = heimdal; then
6348                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6349 echo "configure:6350: checking for main in -lkrb4" >&5
6350 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6351 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6352   echo $ac_n "(cached) $ac_c" 1>&6
6353 else
6354   ac_save_LIBS="$LIBS"
6355 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6356 cat > conftest.$ac_ext <<EOF
6357 #line 6358 "configure"
6358 #include "confdefs.h"
6359
6360 int main() {
6361 main()
6362 ; return 0; }
6363 EOF
6364 if { (eval echo configure:6365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6365   rm -rf conftest*
6366   eval "ac_cv_lib_$ac_lib_var=yes"
6367 else
6368   echo "configure: failed program was:" >&5
6369   cat conftest.$ac_ext >&5
6370   rm -rf conftest*
6371   eval "ac_cv_lib_$ac_lib_var=no"
6372 fi
6373 rm -f conftest*
6374 LIBS="$ac_save_LIBS"
6375
6376 fi
6377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6378   echo "$ac_t""yes" 1>&6
6379   have_k425=yes
6380                                 KRB4_LIBS="-lkrb4"
6381 else
6382   echo "$ac_t""no" 1>&6
6383 have_k425=no
6384 fi
6385
6386
6387                 else
6388                         have_425=no
6389                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6390                 fi
6391
6392                 if test $have_k425 = yes ; then
6393                         ol_with_kerberos=found
6394                         ol_link_krb4=yes
6395
6396                         cat >> confdefs.h <<\EOF
6397 #define HAVE_KRB425 1
6398 EOF
6399
6400                         cat >> confdefs.h <<\EOF
6401 #define HAVE_KRB4 1
6402 EOF
6403
6404
6405                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6406 echo "configure:6407: checking for des_debug in Kerberos libraries" >&5
6407 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6408   echo $ac_n "(cached) $ac_c" 1>&6
6409 else
6410   
6411                                                                 save_LIBS="$LIBS"
6412                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6413                                 cat > conftest.$ac_ext <<EOF
6414 #line 6415 "configure"
6415 #include "confdefs.h"
6416
6417 #include <kerberosIV/krb.h>
6418 #include <kerberosIV/des.h>
6419 extern int des_debug;
6420
6421 int main() {
6422
6423 des_debug = 1;
6424
6425 ; return 0; }
6426 EOF
6427 if { (eval echo configure:6428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6428   rm -rf conftest*
6429   ol_cv_var_des_debug=yes
6430 else
6431   echo "configure: failed program was:" >&5
6432   cat conftest.$ac_ext >&5
6433   rm -rf conftest*
6434   ol_cv_var_des_debug=no
6435 fi
6436 rm -f conftest*
6437                                                                 LIBS="$save_LIBS"
6438                         
6439 fi
6440
6441 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6442
6443                         if test $ol_cv_var_des_debug = yes ; then
6444                                 cat >> confdefs.h <<\EOF
6445 #define HAVE_DES_DEBUG 1
6446 EOF
6447
6448                         fi
6449
6450                         LIBS="$save_LIBS"
6451                 fi
6452         fi
6453 fi
6454
6455 if test $ol_link_krb5 = yes ; then
6456         ol_with_kerberos=found
6457 fi
6458
6459 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6460         -o $ol_with_kerberos = kth ; then
6461
6462         for ac_hdr in krb.h des.h krb-archaeology.h 
6463 do
6464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6466 echo "configure:6467: checking for $ac_hdr" >&5
6467 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6468   echo $ac_n "(cached) $ac_c" 1>&6
6469 else
6470   cat > conftest.$ac_ext <<EOF
6471 #line 6472 "configure"
6472 #include "confdefs.h"
6473 #include <$ac_hdr>
6474 EOF
6475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6476 { (eval echo configure:6477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6478 if test -z "$ac_err"; then
6479   rm -rf conftest*
6480   eval "ac_cv_header_$ac_safe=yes"
6481 else
6482   echo "$ac_err" >&5
6483   echo "configure: failed program was:" >&5
6484   cat conftest.$ac_ext >&5
6485   rm -rf conftest*
6486   eval "ac_cv_header_$ac_safe=no"
6487 fi
6488 rm -f conftest*
6489 fi
6490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6491   echo "$ac_t""yes" 1>&6
6492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6493   cat >> confdefs.h <<EOF
6494 #define $ac_tr_hdr 1
6495 EOF
6496  
6497 else
6498   echo "$ac_t""no" 1>&6
6499 fi
6500 done
6501
6502
6503         if test $ac_cv_header_krb_h = yes ; then
6504                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6505 echo "configure:6506: checking for main in -lkrb" >&5
6506 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6507 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6508   echo $ac_n "(cached) $ac_c" 1>&6
6509 else
6510   ac_save_LIBS="$LIBS"
6511 LIBS="-lkrb -ldes $LIBS"
6512 cat > conftest.$ac_ext <<EOF
6513 #line 6514 "configure"
6514 #include "confdefs.h"
6515
6516 int main() {
6517 main()
6518 ; return 0; }
6519 EOF
6520 if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6521   rm -rf conftest*
6522   eval "ac_cv_lib_$ac_lib_var=yes"
6523 else
6524   echo "configure: failed program was:" >&5
6525   cat conftest.$ac_ext >&5
6526   rm -rf conftest*
6527   eval "ac_cv_lib_$ac_lib_var=no"
6528 fi
6529 rm -f conftest*
6530 LIBS="$ac_save_LIBS"
6531
6532 fi
6533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6534   echo "$ac_t""yes" 1>&6
6535   have_k4=yes
6536 else
6537   echo "$ac_t""no" 1>&6
6538 have_k4=no
6539 fi
6540
6541
6542                 if test $have_k4 = yes ; then
6543                         ol_with_kerberos=found
6544                         ol_link_krb4=yes
6545
6546                         cat >> confdefs.h <<\EOF
6547 #define HAVE_KRB4 1
6548 EOF
6549
6550
6551                         KRB4_LIBS="-lkrb -ldes"
6552
6553                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6554                                 cat >> confdefs.h <<\EOF
6555 #define HAVE_KTH_KERBEROS 1
6556 EOF
6557
6558                         fi
6559                 fi
6560         fi
6561 fi
6562
6563 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6564         ol_link_kpasswd=yes;
6565 fi
6566
6567 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6568         cat >> confdefs.h <<\EOF
6569 #define HAVE_KERBEROS 1
6570 EOF
6571
6572
6573 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6574         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6575 fi
6576
6577 ol_link_tls=no
6578 if test $ol_with_tls != no ; then
6579         
6580         for ac_hdr in openssl/ssl.h ssl.h
6581 do
6582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6583 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6584 echo "configure:6585: checking for $ac_hdr" >&5
6585 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6586   echo $ac_n "(cached) $ac_c" 1>&6
6587 else
6588   cat > conftest.$ac_ext <<EOF
6589 #line 6590 "configure"
6590 #include "confdefs.h"
6591 #include <$ac_hdr>
6592 EOF
6593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6594 { (eval echo configure:6595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6596 if test -z "$ac_err"; then
6597   rm -rf conftest*
6598   eval "ac_cv_header_$ac_safe=yes"
6599 else
6600   echo "$ac_err" >&5
6601   echo "configure: failed program was:" >&5
6602   cat conftest.$ac_ext >&5
6603   rm -rf conftest*
6604   eval "ac_cv_header_$ac_safe=no"
6605 fi
6606 rm -f conftest*
6607 fi
6608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6609   echo "$ac_t""yes" 1>&6
6610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6611   cat >> confdefs.h <<EOF
6612 #define $ac_tr_hdr 1
6613 EOF
6614  
6615 else
6616   echo "$ac_t""no" 1>&6
6617 fi
6618 done
6619
6620         
6621         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6622                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6623 echo "configure:6624: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6624 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6625 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6626   echo $ac_n "(cached) $ac_c" 1>&6
6627 else
6628   ac_save_LIBS="$LIBS"
6629 LIBS="-lssl -lcrypto $LIBS"
6630 cat > conftest.$ac_ext <<EOF
6631 #line 6632 "configure"
6632 #include "confdefs.h"
6633 /* Override any gcc2 internal prototype to avoid an error.  */
6634 /* We use char because int might match the return type of a gcc2
6635     builtin and then its argument prototype would still apply.  */
6636 char SSLeay_add_ssl_algorithms();
6637
6638 int main() {
6639 SSLeay_add_ssl_algorithms()
6640 ; return 0; }
6641 EOF
6642 if { (eval echo configure:6643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6643   rm -rf conftest*
6644   eval "ac_cv_lib_$ac_lib_var=yes"
6645 else
6646   echo "configure: failed program was:" >&5
6647   cat conftest.$ac_ext >&5
6648   rm -rf conftest*
6649   eval "ac_cv_lib_$ac_lib_var=no"
6650 fi
6651 rm -f conftest*
6652 LIBS="$ac_save_LIBS"
6653
6654 fi
6655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6656   echo "$ac_t""yes" 1>&6
6657   have_ssleay=yes
6658                         need_rsaref=no
6659 else
6660   echo "$ac_t""no" 1>&6
6661 have_ssleay=no
6662 fi
6663
6664                         
6665                 if test $have_ssleay = no ; then
6666                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6667 echo "configure:6668: checking for SSL_library_init in -lssl" >&5
6668 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6670   echo $ac_n "(cached) $ac_c" 1>&6
6671 else
6672   ac_save_LIBS="$LIBS"
6673 LIBS="-lssl -lcrypto $LIBS"
6674 cat > conftest.$ac_ext <<EOF
6675 #line 6676 "configure"
6676 #include "confdefs.h"
6677 /* Override any gcc2 internal prototype to avoid an error.  */
6678 /* We use char because int might match the return type of a gcc2
6679     builtin and then its argument prototype would still apply.  */
6680 char SSL_library_init();
6681
6682 int main() {
6683 SSL_library_init()
6684 ; return 0; }
6685 EOF
6686 if { (eval echo configure:6687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6687   rm -rf conftest*
6688   eval "ac_cv_lib_$ac_lib_var=yes"
6689 else
6690   echo "configure: failed program was:" >&5
6691   cat conftest.$ac_ext >&5
6692   rm -rf conftest*
6693   eval "ac_cv_lib_$ac_lib_var=no"
6694 fi
6695 rm -f conftest*
6696 LIBS="$ac_save_LIBS"
6697
6698 fi
6699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6700   echo "$ac_t""yes" 1>&6
6701   have_ssleay=yes
6702                                 need_rsaref=no
6703 else
6704   echo "$ac_t""no" 1>&6
6705 have_ssleay=no
6706 fi
6707
6708                 fi
6709
6710                 if test $have_ssleay = no ; then
6711                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6712 echo "configure:6713: checking for ssl3_accept in -lssl" >&5
6713 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6714 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6715   echo $ac_n "(cached) $ac_c" 1>&6
6716 else
6717   ac_save_LIBS="$LIBS"
6718 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6719 cat > conftest.$ac_ext <<EOF
6720 #line 6721 "configure"
6721 #include "confdefs.h"
6722 /* Override any gcc2 internal prototype to avoid an error.  */
6723 /* We use char because int might match the return type of a gcc2
6724     builtin and then its argument prototype would still apply.  */
6725 char ssl3_accept();
6726
6727 int main() {
6728 ssl3_accept()
6729 ; return 0; }
6730 EOF
6731 if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6732   rm -rf conftest*
6733   eval "ac_cv_lib_$ac_lib_var=yes"
6734 else
6735   echo "configure: failed program was:" >&5
6736   cat conftest.$ac_ext >&5
6737   rm -rf conftest*
6738   eval "ac_cv_lib_$ac_lib_var=no"
6739 fi
6740 rm -f conftest*
6741 LIBS="$ac_save_LIBS"
6742
6743 fi
6744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6745   echo "$ac_t""yes" 1>&6
6746   have_ssleay=yes
6747                                 need_rsaref=yes
6748 else
6749   echo "$ac_t""no" 1>&6
6750 have_ssleay=no
6751 fi
6752
6753                 fi
6754
6755                 if test $have_ssleay = yes ; then
6756                         ol_with_tls=found
6757                         ol_link_tls=yes
6758
6759                         cat >> confdefs.h <<\EOF
6760 #define HAVE_SSLEAY 1
6761 EOF
6762
6763
6764                         if test $need_rsaref = yes; then
6765                                 cat >> confdefs.h <<\EOF
6766 #define HAVE_RSAREF 1
6767 EOF
6768
6769
6770                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6771                         else
6772                                 TLS_LIBS="-lssl -lcrypto"
6773                         fi
6774                 fi
6775         fi
6776 fi
6777
6778 if test $ol_link_tls = yes ; then
6779         cat >> confdefs.h <<\EOF
6780 #define HAVE_TLS 1
6781 EOF
6782
6783 fi      
6784
6785 for ac_func in \
6786         ctime_r                 \
6787         gethostbyname_r gethostbyaddr_r \
6788
6789 do
6790 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6791 echo "configure:6792: checking for $ac_func" >&5
6792 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6793   echo $ac_n "(cached) $ac_c" 1>&6
6794 else
6795   cat > conftest.$ac_ext <<EOF
6796 #line 6797 "configure"
6797 #include "confdefs.h"
6798 /* System header to define __stub macros and hopefully few prototypes,
6799     which can conflict with char $ac_func(); below.  */
6800 #include <assert.h>
6801 /* Override any gcc2 internal prototype to avoid an error.  */
6802 /* We use char because int might match the return type of a gcc2
6803     builtin and then its argument prototype would still apply.  */
6804 char $ac_func();
6805 char (*f)();
6806
6807 int main() {
6808
6809 /* The GNU C library defines this for functions which it implements
6810     to always fail with ENOSYS.  Some functions are actually named
6811     something starting with __ and the normal name is an alias.  */
6812 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6813 choke me
6814 #else
6815 f = $ac_func;
6816 #endif
6817
6818 ; return 0; }
6819 EOF
6820 if { (eval echo configure:6821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6821   rm -rf conftest*
6822   eval "ac_cv_func_$ac_func=yes"
6823 else
6824   echo "configure: failed program was:" >&5
6825   cat conftest.$ac_ext >&5
6826   rm -rf conftest*
6827   eval "ac_cv_func_$ac_func=no"
6828 fi
6829 rm -f conftest*
6830 fi
6831
6832 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6833   echo "$ac_t""yes" 1>&6
6834     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6835   cat >> confdefs.h <<EOF
6836 #define $ac_tr_func 1
6837 EOF
6838  
6839 else
6840   echo "$ac_t""no" 1>&6
6841 fi
6842 done
6843
6844
6845 if test "$ac_cv_func_ctime_r" = no ; then
6846         ol_cv_func_ctime_r_nargs=0
6847 else
6848         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6849 echo "configure:6850: checking number of arguments of ctime_r" >&5
6850 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6851   echo $ac_n "(cached) $ac_c" 1>&6
6852 else
6853   cat > conftest.$ac_ext <<EOF
6854 #line 6855 "configure"
6855 #include "confdefs.h"
6856 #include <time.h>
6857 int main() {
6858 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6859 ; return 0; }
6860 EOF
6861 if { (eval echo configure:6862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6862   rm -rf conftest*
6863   ol_cv_func_ctime_r_nargs3=yes
6864 else
6865   echo "configure: failed program was:" >&5
6866   cat conftest.$ac_ext >&5
6867   rm -rf conftest*
6868   ol_cv_func_ctime_r_nargs3=no
6869 fi
6870 rm -f conftest*
6871
6872         cat > conftest.$ac_ext <<EOF
6873 #line 6874 "configure"
6874 #include "confdefs.h"
6875 #include <time.h>
6876 int main() {
6877 time_t ti; char *buffer; ctime_r(&ti,buffer);
6878 ; return 0; }
6879 EOF
6880 if { (eval echo configure:6881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6881   rm -rf conftest*
6882   ol_cv_func_ctime_r_nargs2=yes
6883 else
6884   echo "configure: failed program was:" >&5
6885   cat conftest.$ac_ext >&5
6886   rm -rf conftest*
6887   ol_cv_func_ctime_r_nargs2=no
6888 fi
6889 rm -f conftest*
6890
6891         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6892                 $ol_cv_func_ctime_r_nargs2 = no ; then
6893
6894                 ol_cv_func_ctime_r_nargs=3
6895
6896         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6897                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6898
6899                 ol_cv_func_ctime_r_nargs=2
6900
6901         else
6902                 ol_cv_func_ctime_r_nargs=0
6903         fi
6904   
6905 fi
6906
6907 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6908
6909   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6910         cat >> confdefs.h <<EOF
6911 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6912 EOF
6913
6914   fi
6915
6916 fi
6917
6918 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6919         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6920 echo "configure:6921: checking number of arguments of gethostbyname_r" >&5
6921 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6922   echo $ac_n "(cached) $ac_c" 1>&6
6923 else
6924   cat > conftest.$ac_ext <<EOF
6925 #line 6926 "configure"
6926 #include "confdefs.h"
6927 #include <sys/types.h>
6928 #include <sys/socket.h>
6929 #include <netinet/in.h>
6930 #include <netdb.h>
6931 #define BUFSIZE (sizeof(struct hostent)+10)
6932 int main() {
6933 struct hostent hent; char buffer[BUFSIZE];
6934                 int bufsize=BUFSIZE;int h_errno;
6935                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6936                         buffer, bufsize, &h_errno);
6937 ; return 0; }
6938 EOF
6939 if { (eval echo configure:6940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6940   rm -rf conftest*
6941   ol_cv_func_gethostbyname_r_nargs5=yes
6942 else
6943   echo "configure: failed program was:" >&5
6944   cat conftest.$ac_ext >&5
6945   rm -rf conftest*
6946   ol_cv_func_gethostbyname_r_nargs5=no
6947 fi
6948 rm -f conftest*
6949
6950         cat > conftest.$ac_ext <<EOF
6951 #line 6952 "configure"
6952 #include "confdefs.h"
6953 #include <sys/types.h>
6954 #include <sys/socket.h>
6955 #include <netinet/in.h>
6956 #include <netdb.h>
6957 #define BUFSIZE (sizeof(struct hostent)+10)
6958 int main() {
6959 struct hostent hent;struct hostent *rhent;
6960                 char buffer[BUFSIZE];
6961                 int bufsize=BUFSIZE;int h_errno;
6962                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6963                         &rhent, &h_errno);
6964 ; return 0; }
6965 EOF
6966 if { (eval echo configure:6967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6967   rm -rf conftest*
6968   ol_cv_func_gethostbyname_r_nargs6=yes
6969 else
6970   echo "configure: failed program was:" >&5
6971   cat conftest.$ac_ext >&5
6972   rm -rf conftest*
6973   ol_cv_func_gethostbyname_r_nargs6=no
6974 fi
6975 rm -f conftest*
6976
6977         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6978                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6979
6980                 ol_cv_func_gethostbyname_r_nargs=5
6981
6982         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6983                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6984
6985                 ol_cv_func_gethostbyname_r_nargs=6
6986
6987         else
6988                 ol_cv_func_gethostbyname_r_nargs=0
6989         fi
6990   
6991 fi
6992
6993 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6994   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6995         cat >> confdefs.h <<EOF
6996 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6997 EOF
6998
6999   fi
7000
7001 else
7002         ol_cv_func_gethostbyname_r_nargs=0
7003 fi
7004  
7005 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
7006         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
7007 echo "configure:7008: checking number of arguments of gethostbyaddr_r" >&5
7008 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
7009   echo $ac_n "(cached) $ac_c" 1>&6
7010 else
7011   cat > conftest.$ac_ext <<EOF
7012 #line 7013 "configure"
7013 #include "confdefs.h"
7014 #include <sys/types.h>
7015 #include <sys/socket.h>
7016 #include <netinet/in.h>
7017 #include <netdb.h>
7018 #define BUFSIZE (sizeof(struct hostent)+10)
7019 int main() {
7020 struct hostent hent; char buffer[BUFSIZE]; 
7021             struct in_addr add;
7022             size_t alen=sizeof(struct in_addr);
7023             int bufsize=BUFSIZE;int h_errno;
7024                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7025                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
7026 ; return 0; }
7027 EOF
7028 if { (eval echo configure:7029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7029   rm -rf conftest*
7030   ol_cv_func_gethostbyaddr_r_nargs7=yes
7031 else
7032   echo "configure: failed program was:" >&5
7033   cat conftest.$ac_ext >&5
7034   rm -rf conftest*
7035   ol_cv_func_gethostbyaddr_r_nargs7=no
7036 fi
7037 rm -f conftest*
7038
7039         cat > conftest.$ac_ext <<EOF
7040 #line 7041 "configure"
7041 #include "confdefs.h"
7042 #include <sys/types.h>
7043 #include <sys/socket.h>
7044 #include <netinet/in.h>
7045 #include <netdb.h>
7046 #define BUFSIZE (sizeof(struct hostent)+10)
7047 int main() {
7048 struct hostent hent;
7049                 struct hostent *rhent; char buffer[BUFSIZE]; 
7050                 struct in_addr add;
7051                 size_t alen=sizeof(struct in_addr);
7052                 int bufsize=BUFSIZE;int h_errno;
7053                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7054                         alen, AF_INET, &hent, buffer, bufsize, 
7055                         &rhent, &h_errno);
7056 ; return 0; }
7057 EOF
7058 if { (eval echo configure:7059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7059   rm -rf conftest*
7060   ol_cv_func_gethostbyaddr_r_nargs8=yes
7061 else
7062   echo "configure: failed program was:" >&5
7063   cat conftest.$ac_ext >&5
7064   rm -rf conftest*
7065   ol_cv_func_gethostbyaddr_r_nargs8=no
7066 fi
7067 rm -f conftest*
7068
7069         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7070                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7071
7072                 ol_cv_func_gethostbyaddr_r_nargs=7
7073
7074         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7075                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7076
7077                 ol_cv_func_gethostbyaddr_r_nargs=8
7078
7079         else
7080                 ol_cv_func_gethostbyaddr_r_nargs=0
7081         fi
7082   
7083 fi
7084
7085 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7086   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7087     cat >> confdefs.h <<EOF
7088 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7089 EOF
7090
7091   fi
7092
7093 else
7094         ol_cv_func_gethostbyaddr_r_nargs=0
7095 fi
7096
7097 if test "$ac_cv_func_ctime_r" = yes \
7098         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7099         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7100         -a "$ac_cv_func_gethostbyname_r" = yes \
7101         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7102         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7103         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7104         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7105         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7106         ; then
7107  
7108         cat >> confdefs.h <<\EOF
7109 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7110 EOF
7111
7112 fi
7113
7114 ol_link_threads=no
7115
7116 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7117         -o $ol_with_threads = nt ; then
7118
7119         
7120         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
7121 echo "configure:7122: checking for NT Threads" >&5
7122 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
7123   echo $ac_n "(cached) $ac_c" 1>&6
7124 else
7125   
7126                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7127 echo "configure:7128: checking for _beginthread" >&5
7128 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7129   echo $ac_n "(cached) $ac_c" 1>&6
7130 else
7131   cat > conftest.$ac_ext <<EOF
7132 #line 7133 "configure"
7133 #include "confdefs.h"
7134 /* System header to define __stub macros and hopefully few prototypes,
7135     which can conflict with char _beginthread(); below.  */
7136 #include <assert.h>
7137 /* Override any gcc2 internal prototype to avoid an error.  */
7138 /* We use char because int might match the return type of a gcc2
7139     builtin and then its argument prototype would still apply.  */
7140 char _beginthread();
7141 char (*f)();
7142
7143 int main() {
7144
7145 /* The GNU C library defines this for functions which it implements
7146     to always fail with ENOSYS.  Some functions are actually named
7147     something starting with __ and the normal name is an alias.  */
7148 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7149 choke me
7150 #else
7151 f = _beginthread;
7152 #endif
7153
7154 ; return 0; }
7155 EOF
7156 if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7157   rm -rf conftest*
7158   eval "ac_cv_func__beginthread=yes"
7159 else
7160   echo "configure: failed program was:" >&5
7161   cat conftest.$ac_ext >&5
7162   rm -rf conftest*
7163   eval "ac_cv_func__beginthread=no"
7164 fi
7165 rm -f conftest*
7166 fi
7167
7168 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7169   echo "$ac_t""yes" 1>&6
7170   ol_cv_nt_threads=yes
7171 else
7172   echo "$ac_t""no" 1>&6
7173 ol_cv_nt_threads=no
7174 fi
7175
7176         
7177 fi
7178
7179 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7180
7181         if test $ol_cv_nt_threads = yes ; then
7182                 cat >> confdefs.h <<\EOF
7183 #define HAVE_NT_THREADS 1
7184 EOF
7185
7186         fi
7187
7188
7189         if test "$ol_cv_nt_threads" = yes ; then
7190         ol_link_threads=nt
7191         ol_with_threads=found
7192         ol_with_yielding_select=yes
7193
7194                 cat >> confdefs.h <<\EOF
7195 #define HAVE_NT_SERVICE_MANAGER 1
7196 EOF
7197
7198                 cat >> confdefs.h <<\EOF
7199 #define HAVE_NT_EVENT_LOG 1
7200 EOF
7201
7202         fi
7203
7204         if test $ol_with_threads = nt ; then
7205                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7206         fi
7207 fi
7208
7209 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7210         -o $ol_with_threads = posix ; then
7211
7212         for ac_hdr in pthread.h
7213 do
7214 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7215 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7216 echo "configure:7217: checking for $ac_hdr" >&5
7217 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7218   echo $ac_n "(cached) $ac_c" 1>&6
7219 else
7220   cat > conftest.$ac_ext <<EOF
7221 #line 7222 "configure"
7222 #include "confdefs.h"
7223 #include <$ac_hdr>
7224 EOF
7225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7226 { (eval echo configure:7227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7228 if test -z "$ac_err"; then
7229   rm -rf conftest*
7230   eval "ac_cv_header_$ac_safe=yes"
7231 else
7232   echo "$ac_err" >&5
7233   echo "configure: failed program was:" >&5
7234   cat conftest.$ac_ext >&5
7235   rm -rf conftest*
7236   eval "ac_cv_header_$ac_safe=no"
7237 fi
7238 rm -f conftest*
7239 fi
7240 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7241   echo "$ac_t""yes" 1>&6
7242     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7243   cat >> confdefs.h <<EOF
7244 #define $ac_tr_hdr 1
7245 EOF
7246  
7247 else
7248   echo "$ac_t""no" 1>&6
7249 fi
7250 done
7251
7252
7253         if test $ac_cv_header_pthread_h = yes ; then
7254                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7255 echo "configure:7256: checking POSIX thread version" >&5
7256 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7257   echo $ac_n "(cached) $ac_c" 1>&6
7258 else
7259   
7260         cat > conftest.$ac_ext <<EOF
7261 #line 7262 "configure"
7262 #include "confdefs.h"
7263
7264 #               include <pthread.h>
7265                 /* this check could be improved */
7266 #               ifdef PTHREAD_ONCE_INIT
7267                         pthread_version_final;
7268 #               endif
7269         
7270 EOF
7271 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7272   egrep "pthread_version_final" >/dev/null 2>&1; then
7273   rm -rf conftest*
7274   ol_pthread_final=yes
7275 else
7276   rm -rf conftest*
7277   ol_pthread_final=no
7278 fi
7279 rm -f conftest*
7280
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_draft4;
7290 #               endif
7291         
7292 EOF
7293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7294   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7295   rm -rf conftest*
7296   ol_pthread_draft4=yes
7297 else
7298   rm -rf conftest*
7299   ol_pthread_draft4=no
7300 fi
7301 rm -f conftest*
7302
7303
7304         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7305                 ol_cv_pthread_version=final
7306         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7307                 ol_cv_pthread_version=draft4
7308         else
7309                 ol_cv_pthread_version=unknown
7310         fi
7311
7312 fi
7313
7314 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7315
7316
7317                 if test $ol_cv_pthread_version = final ; then
7318                         cat >> confdefs.h <<\EOF
7319 #define HAVE_PTHREADS_FINAL 1
7320 EOF
7321
7322                 elif test $ol_cv_pthread_version = draft4 ; then
7323                         cat >> confdefs.h <<\EOF
7324 #define HAVE_PTHREADS_D4 1
7325 EOF
7326
7327                 else
7328                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7329                 fi
7330
7331                 # consider threads found
7332                 ol_with_threads=found
7333
7334                 
7335         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7336 echo "configure:7337: checking for LinuxThreads pthread.h" >&5
7337 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7338   echo $ac_n "(cached) $ac_c" 1>&6
7339 else
7340   cat > conftest.$ac_ext <<EOF
7341 #line 7342 "configure"
7342 #include "confdefs.h"
7343 #include <pthread.h>
7344 EOF
7345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7346   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7347   rm -rf conftest*
7348   ol_cv_header_linux_threads=yes
7349 else
7350   rm -rf conftest*
7351   ol_cv_header_linux_threads=no
7352 fi
7353 rm -f conftest*
7354
7355                 
7356 fi
7357
7358 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7359         if test $ol_cv_header_linux_threads = yes; then
7360                 cat >> confdefs.h <<\EOF
7361 #define HAVE_LINUX_THREADS 1
7362 EOF
7363
7364         fi
7365
7366                 
7367         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7368 echo "configure:7369: checking for GNU Pth pthread.h" >&5
7369 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7370   echo $ac_n "(cached) $ac_c" 1>&6
7371 else
7372   cat > conftest.$ac_ext <<EOF
7373 #line 7374 "configure"
7374 #include "confdefs.h"
7375 #include <pthread.h>
7376 #ifdef _POSIX_THREAD_IS_GNU_PTH
7377         __gnu_pth__;
7378 #endif
7379
7380 EOF
7381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7382   egrep "__gnu_pth__" >/dev/null 2>&1; then
7383   rm -rf conftest*
7384   ol_cv_header_gnu_pth_pthread_h=yes
7385 else
7386   rm -rf conftest*
7387   ol_cv_header_gnu_pth_pthread_h=no
7388 fi
7389 rm -f conftest*
7390
7391                 
7392 fi
7393
7394 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7395
7396
7397                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7398                         for ac_hdr in sched.h
7399 do
7400 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7401 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7402 echo "configure:7403: checking for $ac_hdr" >&5
7403 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7404   echo $ac_n "(cached) $ac_c" 1>&6
7405 else
7406   cat > conftest.$ac_ext <<EOF
7407 #line 7408 "configure"
7408 #include "confdefs.h"
7409 #include <$ac_hdr>
7410 EOF
7411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7412 { (eval echo configure:7413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7414 if test -z "$ac_err"; then
7415   rm -rf conftest*
7416   eval "ac_cv_header_$ac_safe=yes"
7417 else
7418   echo "$ac_err" >&5
7419   echo "configure: failed program was:" >&5
7420   cat conftest.$ac_ext >&5
7421   rm -rf conftest*
7422   eval "ac_cv_header_$ac_safe=no"
7423 fi
7424 rm -f conftest*
7425 fi
7426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7427   echo "$ac_t""yes" 1>&6
7428     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7429   cat >> confdefs.h <<EOF
7430 #define $ac_tr_hdr 1
7431 EOF
7432  
7433 else
7434   echo "$ac_t""no" 1>&6
7435 fi
7436 done
7437
7438                 fi
7439
7440                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7441                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7442 echo "configure:7443: checking for pthread_create in default libraries" >&5
7443 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7444   echo $ac_n "(cached) $ac_c" 1>&6
7445 else
7446   
7447                 if test "$cross_compiling" = yes; then
7448   cat > conftest.$ac_ext <<EOF
7449 #line 7450 "configure"
7450 #include "confdefs.h"
7451 /* pthread test headers */
7452 #include <pthread.h>
7453 #ifndef NULL
7454 #define NULL (void*)0
7455 #endif
7456
7457 static void *task(p)
7458         void *p;
7459 {
7460         return (void *) (p == NULL);
7461 }
7462
7463 int main() {
7464
7465         /* pthread test function */
7466         pthread_t t;
7467         int status;
7468 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7469         /* This system (e.g. AIX) defaults detached; must override */
7470         pthread_attr_t attr;
7471
7472         status = pthread_attr_init(&attr);
7473         if( status ) exit( status );
7474
7475         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7476         if( status ) exit( status );
7477
7478 #define ATTR    &attr
7479 #else
7480 #if HAVE_PTHREADS_D4
7481 #define ATTR    pthread_attr_default
7482 #else
7483 #define ATTR    NULL
7484 #endif
7485 #endif
7486         /* make sure pthread_create() isn't just a stub */
7487         status = pthread_create(&t, ATTR, task, NULL);
7488         if( status ) exit( status );
7489
7490         /* make sure pthread_detach() isn't just a stub */
7491 #if HAVE_PTHREADS_D4
7492         status = pthread_detach( &t );
7493 #else
7494         status = pthread_detach( t );
7495 #endif
7496
7497 #ifdef HAVE_LINUX_THREADS
7498         pthread_kill_other_threads_np();
7499 #endif
7500
7501         exit( status );
7502
7503 ; return 0; }
7504 EOF
7505 if { (eval echo configure:7506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7506   rm -rf conftest*
7507   ol_cv_pthread_create=yes
7508 else
7509   echo "configure: failed program was:" >&5
7510   cat conftest.$ac_ext >&5
7511   rm -rf conftest*
7512   ol_cv_pthread_create=no
7513 fi
7514 rm -f conftest*
7515 else
7516   cat > conftest.$ac_ext <<EOF
7517 #line 7518 "configure"
7518 #include "confdefs.h"
7519 /* pthread test headers */
7520 #include <pthread.h>
7521 #ifndef NULL
7522 #define NULL (void*)0
7523 #endif
7524
7525 static void *task(p)
7526         void *p;
7527 {
7528         return (void *) (p == NULL);
7529 }
7530
7531
7532 int main(argc, argv)
7533         int argc;
7534         char **argv;
7535 {
7536
7537         /* pthread test function */
7538         pthread_t t;
7539         int status;
7540 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7541         /* This system (e.g. AIX) defaults detached; must override */
7542         pthread_attr_t attr;
7543
7544         status = pthread_attr_init(&attr);
7545         if( status ) exit( status );
7546
7547         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7548         if( status ) exit( status );
7549
7550 #define ATTR    &attr
7551 #else
7552 #if HAVE_PTHREADS_D4
7553 #define ATTR    pthread_attr_default
7554 #else
7555 #define ATTR    NULL
7556 #endif
7557 #endif
7558         /* make sure pthread_create() isn't just a stub */
7559         status = pthread_create(&t, ATTR, task, NULL);
7560         if( status ) exit( status );
7561
7562         /* make sure pthread_detach() isn't just a stub */
7563 #if HAVE_PTHREADS_D4
7564         status = pthread_detach( &t );
7565 #else
7566         status = pthread_detach( t );
7567 #endif
7568
7569 #ifdef HAVE_LINUX_THREADS
7570         pthread_kill_other_threads_np();
7571 #endif
7572
7573         exit( status );
7574
7575 }
7576
7577 EOF
7578 if { (eval echo configure:7579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7579 then
7580   ol_cv_pthread_create=yes
7581 else
7582   echo "configure: failed program was:" >&5
7583   cat conftest.$ac_ext >&5
7584   rm -fr conftest*
7585   ol_cv_pthread_create=no
7586 fi
7587 rm -fr conftest*
7588 fi
7589
7590 fi
7591
7592 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7593
7594                 if test $ol_cv_pthread_create != no ; then
7595                         ol_link_threads=posix
7596                         ol_link_pthreads=""
7597                 fi
7598                 
7599                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7600 if test "$ol_link_threads" = no ; then
7601         # try -kthread
7602         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7603 echo "configure:7604: checking for pthread link with -kthread" >&5
7604 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7605   echo $ac_n "(cached) $ac_c" 1>&6
7606 else
7607   
7608                 # save the flags
7609                 ol_LIBS="$LIBS"
7610                 LIBS="-kthread $LIBS"
7611
7612                 if test "$cross_compiling" = yes; then
7613   cat > conftest.$ac_ext <<EOF
7614 #line 7615 "configure"
7615 #include "confdefs.h"
7616 /* pthread test headers */
7617 #include <pthread.h>
7618 #ifndef NULL
7619 #define NULL (void*)0
7620 #endif
7621
7622 static void *task(p)
7623         void *p;
7624 {
7625         return (void *) (p == NULL);
7626 }
7627
7628 int main() {
7629
7630         /* pthread test function */
7631         pthread_t t;
7632         int status;
7633 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7634         /* This system (e.g. AIX) defaults detached; must override */
7635         pthread_attr_t attr;
7636
7637         status = pthread_attr_init(&attr);
7638         if( status ) exit( status );
7639
7640         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7641         if( status ) exit( status );
7642
7643 #define ATTR    &attr
7644 #else
7645 #if HAVE_PTHREADS_D4
7646 #define ATTR    pthread_attr_default
7647 #else
7648 #define ATTR    NULL
7649 #endif
7650 #endif
7651         /* make sure pthread_create() isn't just a stub */
7652         status = pthread_create(&t, ATTR, task, NULL);
7653         if( status ) exit( status );
7654
7655         /* make sure pthread_detach() isn't just a stub */
7656 #if HAVE_PTHREADS_D4
7657         status = pthread_detach( &t );
7658 #else
7659         status = pthread_detach( t );
7660 #endif
7661
7662 #ifdef HAVE_LINUX_THREADS
7663         pthread_kill_other_threads_np();
7664 #endif
7665
7666         exit( status );
7667
7668 ; return 0; }
7669 EOF
7670 if { (eval echo configure:7671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7671   rm -rf conftest*
7672   ol_cv_pthread_kthread=yes
7673 else
7674   echo "configure: failed program was:" >&5
7675   cat conftest.$ac_ext >&5
7676   rm -rf conftest*
7677   ol_cv_pthread_kthread=no
7678 fi
7679 rm -f conftest*
7680 else
7681   cat > conftest.$ac_ext <<EOF
7682 #line 7683 "configure"
7683 #include "confdefs.h"
7684 /* pthread test headers */
7685 #include <pthread.h>
7686 #ifndef NULL
7687 #define NULL (void*)0
7688 #endif
7689
7690 static void *task(p)
7691         void *p;
7692 {
7693         return (void *) (p == NULL);
7694 }
7695
7696
7697 int main(argc, argv)
7698         int argc;
7699         char **argv;
7700 {
7701
7702         /* pthread test function */
7703         pthread_t t;
7704         int status;
7705 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7706         /* This system (e.g. AIX) defaults detached; must override */
7707         pthread_attr_t attr;
7708
7709         status = pthread_attr_init(&attr);
7710         if( status ) exit( status );
7711
7712         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7713         if( status ) exit( status );
7714
7715 #define ATTR    &attr
7716 #else
7717 #if HAVE_PTHREADS_D4
7718 #define ATTR    pthread_attr_default
7719 #else
7720 #define ATTR    NULL
7721 #endif
7722 #endif
7723         /* make sure pthread_create() isn't just a stub */
7724         status = pthread_create(&t, ATTR, task, NULL);
7725         if( status ) exit( status );
7726
7727         /* make sure pthread_detach() isn't just a stub */
7728 #if HAVE_PTHREADS_D4
7729         status = pthread_detach( &t );
7730 #else
7731         status = pthread_detach( t );
7732 #endif
7733
7734 #ifdef HAVE_LINUX_THREADS
7735         pthread_kill_other_threads_np();
7736 #endif
7737
7738         exit( status );
7739
7740 }
7741
7742 EOF
7743 if { (eval echo configure:7744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7744 then
7745   ol_cv_pthread_kthread=yes
7746 else
7747   echo "configure: failed program was:" >&5
7748   cat conftest.$ac_ext >&5
7749   rm -fr conftest*
7750   ol_cv_pthread_kthread=no
7751 fi
7752 rm -fr conftest*
7753 fi
7754
7755
7756                 # restore the LIBS
7757                 LIBS="$ol_LIBS"
7758         
7759 fi
7760
7761 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7762
7763         if test $ol_cv_pthread_kthread = yes ; then
7764                 ol_link_pthreads="-kthread"
7765                 ol_link_threads=posix
7766         fi
7767 fi
7768
7769                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7770 if test "$ol_link_threads" = no ; then
7771         # try -pthread
7772         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7773 echo "configure:7774: checking for pthread link with -pthread" >&5
7774 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7775   echo $ac_n "(cached) $ac_c" 1>&6
7776 else
7777   
7778                 # save the flags
7779                 ol_LIBS="$LIBS"
7780                 LIBS="-pthread $LIBS"
7781
7782                 if test "$cross_compiling" = yes; then
7783   cat > conftest.$ac_ext <<EOF
7784 #line 7785 "configure"
7785 #include "confdefs.h"
7786 /* pthread test headers */
7787 #include <pthread.h>
7788 #ifndef NULL
7789 #define NULL (void*)0
7790 #endif
7791
7792 static void *task(p)
7793         void *p;
7794 {
7795         return (void *) (p == NULL);
7796 }
7797
7798 int main() {
7799
7800         /* pthread test function */
7801         pthread_t t;
7802         int status;
7803 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7804         /* This system (e.g. AIX) defaults detached; must override */
7805         pthread_attr_t attr;
7806
7807         status = pthread_attr_init(&attr);
7808         if( status ) exit( status );
7809
7810         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7811         if( status ) exit( status );
7812
7813 #define ATTR    &attr
7814 #else
7815 #if HAVE_PTHREADS_D4
7816 #define ATTR    pthread_attr_default
7817 #else
7818 #define ATTR    NULL
7819 #endif
7820 #endif
7821         /* make sure pthread_create() isn't just a stub */
7822         status = pthread_create(&t, ATTR, task, NULL);
7823         if( status ) exit( status );
7824
7825         /* make sure pthread_detach() isn't just a stub */
7826 #if HAVE_PTHREADS_D4
7827         status = pthread_detach( &t );
7828 #else
7829         status = pthread_detach( t );
7830 #endif
7831
7832 #ifdef HAVE_LINUX_THREADS
7833         pthread_kill_other_threads_np();
7834 #endif
7835
7836         exit( status );
7837
7838 ; return 0; }
7839 EOF
7840 if { (eval echo configure:7841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7841   rm -rf conftest*
7842   ol_cv_pthread_pthread=yes
7843 else
7844   echo "configure: failed program was:" >&5
7845   cat conftest.$ac_ext >&5
7846   rm -rf conftest*
7847   ol_cv_pthread_pthread=no
7848 fi
7849 rm -f conftest*
7850 else
7851   cat > conftest.$ac_ext <<EOF
7852 #line 7853 "configure"
7853 #include "confdefs.h"
7854 /* pthread test headers */
7855 #include <pthread.h>
7856 #ifndef NULL
7857 #define NULL (void*)0
7858 #endif
7859
7860 static void *task(p)
7861         void *p;
7862 {
7863         return (void *) (p == NULL);
7864 }
7865
7866
7867 int main(argc, argv)
7868         int argc;
7869         char **argv;
7870 {
7871
7872         /* pthread test function */
7873         pthread_t t;
7874         int status;
7875 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7876         /* This system (e.g. AIX) defaults detached; must override */
7877         pthread_attr_t attr;
7878
7879         status = pthread_attr_init(&attr);
7880         if( status ) exit( status );
7881
7882         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7883         if( status ) exit( status );
7884
7885 #define ATTR    &attr
7886 #else
7887 #if HAVE_PTHREADS_D4
7888 #define ATTR    pthread_attr_default
7889 #else
7890 #define ATTR    NULL
7891 #endif
7892 #endif
7893         /* make sure pthread_create() isn't just a stub */
7894         status = pthread_create(&t, ATTR, task, NULL);
7895         if( status ) exit( status );
7896
7897         /* make sure pthread_detach() isn't just a stub */
7898 #if HAVE_PTHREADS_D4
7899         status = pthread_detach( &t );
7900 #else
7901         status = pthread_detach( t );
7902 #endif
7903
7904 #ifdef HAVE_LINUX_THREADS
7905         pthread_kill_other_threads_np();
7906 #endif
7907
7908         exit( status );
7909
7910 }
7911
7912 EOF
7913 if { (eval echo configure:7914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7914 then
7915   ol_cv_pthread_pthread=yes
7916 else
7917   echo "configure: failed program was:" >&5
7918   cat conftest.$ac_ext >&5
7919   rm -fr conftest*
7920   ol_cv_pthread_pthread=no
7921 fi
7922 rm -fr conftest*
7923 fi
7924
7925
7926                 # restore the LIBS
7927                 LIBS="$ol_LIBS"
7928         
7929 fi
7930
7931 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7932
7933         if test $ol_cv_pthread_pthread = yes ; then
7934                 ol_link_pthreads="-pthread"
7935                 ol_link_threads=posix
7936         fi
7937 fi
7938
7939                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7940 if test "$ol_link_threads" = no ; then
7941         # try -pthreads
7942         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7943 echo "configure:7944: checking for pthread link with -pthreads" >&5
7944 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7945   echo $ac_n "(cached) $ac_c" 1>&6
7946 else
7947   
7948                 # save the flags
7949                 ol_LIBS="$LIBS"
7950                 LIBS="-pthreads $LIBS"
7951
7952                 if test "$cross_compiling" = yes; then
7953   cat > conftest.$ac_ext <<EOF
7954 #line 7955 "configure"
7955 #include "confdefs.h"
7956 /* pthread test headers */
7957 #include <pthread.h>
7958 #ifndef NULL
7959 #define NULL (void*)0
7960 #endif
7961
7962 static void *task(p)
7963         void *p;
7964 {
7965         return (void *) (p == NULL);
7966 }
7967
7968 int main() {
7969
7970         /* pthread test function */
7971         pthread_t t;
7972         int status;
7973 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7974         /* This system (e.g. AIX) defaults detached; must override */
7975         pthread_attr_t attr;
7976
7977         status = pthread_attr_init(&attr);
7978         if( status ) exit( status );
7979
7980         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7981         if( status ) exit( status );
7982
7983 #define ATTR    &attr
7984 #else
7985 #if HAVE_PTHREADS_D4
7986 #define ATTR    pthread_attr_default
7987 #else
7988 #define ATTR    NULL
7989 #endif
7990 #endif
7991         /* make sure pthread_create() isn't just a stub */
7992         status = pthread_create(&t, ATTR, task, NULL);
7993         if( status ) exit( status );
7994
7995         /* make sure pthread_detach() isn't just a stub */
7996 #if HAVE_PTHREADS_D4
7997         status = pthread_detach( &t );
7998 #else
7999         status = pthread_detach( t );
8000 #endif
8001
8002 #ifdef HAVE_LINUX_THREADS
8003         pthread_kill_other_threads_np();
8004 #endif
8005
8006         exit( status );
8007
8008 ; return 0; }
8009 EOF
8010 if { (eval echo configure:8011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8011   rm -rf conftest*
8012   ol_cv_pthread_pthreads=yes
8013 else
8014   echo "configure: failed program was:" >&5
8015   cat conftest.$ac_ext >&5
8016   rm -rf conftest*
8017   ol_cv_pthread_pthreads=no
8018 fi
8019 rm -f conftest*
8020 else
8021   cat > conftest.$ac_ext <<EOF
8022 #line 8023 "configure"
8023 #include "confdefs.h"
8024 /* pthread test headers */
8025 #include <pthread.h>
8026 #ifndef NULL
8027 #define NULL (void*)0
8028 #endif
8029
8030 static void *task(p)
8031         void *p;
8032 {
8033         return (void *) (p == NULL);
8034 }
8035
8036
8037 int main(argc, argv)
8038         int argc;
8039         char **argv;
8040 {
8041
8042         /* pthread test function */
8043         pthread_t t;
8044         int status;
8045 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8046         /* This system (e.g. AIX) defaults detached; must override */
8047         pthread_attr_t attr;
8048
8049         status = pthread_attr_init(&attr);
8050         if( status ) exit( status );
8051
8052         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8053         if( status ) exit( status );
8054
8055 #define ATTR    &attr
8056 #else
8057 #if HAVE_PTHREADS_D4
8058 #define ATTR    pthread_attr_default
8059 #else
8060 #define ATTR    NULL
8061 #endif
8062 #endif
8063         /* make sure pthread_create() isn't just a stub */
8064         status = pthread_create(&t, ATTR, task, NULL);
8065         if( status ) exit( status );
8066
8067         /* make sure pthread_detach() isn't just a stub */
8068 #if HAVE_PTHREADS_D4
8069         status = pthread_detach( &t );
8070 #else
8071         status = pthread_detach( t );
8072 #endif
8073
8074 #ifdef HAVE_LINUX_THREADS
8075         pthread_kill_other_threads_np();
8076 #endif
8077
8078         exit( status );
8079
8080 }
8081
8082 EOF
8083 if { (eval echo configure:8084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8084 then
8085   ol_cv_pthread_pthreads=yes
8086 else
8087   echo "configure: failed program was:" >&5
8088   cat conftest.$ac_ext >&5
8089   rm -fr conftest*
8090   ol_cv_pthread_pthreads=no
8091 fi
8092 rm -fr conftest*
8093 fi
8094
8095
8096                 # restore the LIBS
8097                 LIBS="$ol_LIBS"
8098         
8099 fi
8100
8101 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8102
8103         if test $ol_cv_pthread_pthreads = yes ; then
8104                 ol_link_pthreads="-pthreads"
8105                 ol_link_threads=posix
8106         fi
8107 fi
8108
8109                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8110 if test "$ol_link_threads" = no ; then
8111         # try -mthreads
8112         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8113 echo "configure:8114: checking for pthread link with -mthreads" >&5
8114 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8115   echo $ac_n "(cached) $ac_c" 1>&6
8116 else
8117   
8118                 # save the flags
8119                 ol_LIBS="$LIBS"
8120                 LIBS="-mthreads $LIBS"
8121
8122                 if test "$cross_compiling" = yes; then
8123   cat > conftest.$ac_ext <<EOF
8124 #line 8125 "configure"
8125 #include "confdefs.h"
8126 /* pthread test headers */
8127 #include <pthread.h>
8128 #ifndef NULL
8129 #define NULL (void*)0
8130 #endif
8131
8132 static void *task(p)
8133         void *p;
8134 {
8135         return (void *) (p == NULL);
8136 }
8137
8138 int main() {
8139
8140         /* pthread test function */
8141         pthread_t t;
8142         int status;
8143 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8144         /* This system (e.g. AIX) defaults detached; must override */
8145         pthread_attr_t attr;
8146
8147         status = pthread_attr_init(&attr);
8148         if( status ) exit( status );
8149
8150         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8151         if( status ) exit( status );
8152
8153 #define ATTR    &attr
8154 #else
8155 #if HAVE_PTHREADS_D4
8156 #define ATTR    pthread_attr_default
8157 #else
8158 #define ATTR    NULL
8159 #endif
8160 #endif
8161         /* make sure pthread_create() isn't just a stub */
8162         status = pthread_create(&t, ATTR, task, NULL);
8163         if( status ) exit( status );
8164
8165         /* make sure pthread_detach() isn't just a stub */
8166 #if HAVE_PTHREADS_D4
8167         status = pthread_detach( &t );
8168 #else
8169         status = pthread_detach( t );
8170 #endif
8171
8172 #ifdef HAVE_LINUX_THREADS
8173         pthread_kill_other_threads_np();
8174 #endif
8175
8176         exit( status );
8177
8178 ; return 0; }
8179 EOF
8180 if { (eval echo configure:8181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8181   rm -rf conftest*
8182   ol_cv_pthread_mthreads=yes
8183 else
8184   echo "configure: failed program was:" >&5
8185   cat conftest.$ac_ext >&5
8186   rm -rf conftest*
8187   ol_cv_pthread_mthreads=no
8188 fi
8189 rm -f conftest*
8190 else
8191   cat > conftest.$ac_ext <<EOF
8192 #line 8193 "configure"
8193 #include "confdefs.h"
8194 /* pthread test headers */
8195 #include <pthread.h>
8196 #ifndef NULL
8197 #define NULL (void*)0
8198 #endif
8199
8200 static void *task(p)
8201         void *p;
8202 {
8203         return (void *) (p == NULL);
8204 }
8205
8206
8207 int main(argc, argv)
8208         int argc;
8209         char **argv;
8210 {
8211
8212         /* pthread test function */
8213         pthread_t t;
8214         int status;
8215 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8216         /* This system (e.g. AIX) defaults detached; must override */
8217         pthread_attr_t attr;
8218
8219         status = pthread_attr_init(&attr);
8220         if( status ) exit( status );
8221
8222         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8223         if( status ) exit( status );
8224
8225 #define ATTR    &attr
8226 #else
8227 #if HAVE_PTHREADS_D4
8228 #define ATTR    pthread_attr_default
8229 #else
8230 #define ATTR    NULL
8231 #endif
8232 #endif
8233         /* make sure pthread_create() isn't just a stub */
8234         status = pthread_create(&t, ATTR, task, NULL);
8235         if( status ) exit( status );
8236
8237         /* make sure pthread_detach() isn't just a stub */
8238 #if HAVE_PTHREADS_D4
8239         status = pthread_detach( &t );
8240 #else
8241         status = pthread_detach( t );
8242 #endif
8243
8244 #ifdef HAVE_LINUX_THREADS
8245         pthread_kill_other_threads_np();
8246 #endif
8247
8248         exit( status );
8249
8250 }
8251
8252 EOF
8253 if { (eval echo configure:8254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8254 then
8255   ol_cv_pthread_mthreads=yes
8256 else
8257   echo "configure: failed program was:" >&5
8258   cat conftest.$ac_ext >&5
8259   rm -fr conftest*
8260   ol_cv_pthread_mthreads=no
8261 fi
8262 rm -fr conftest*
8263 fi
8264
8265
8266                 # restore the LIBS
8267                 LIBS="$ol_LIBS"
8268         
8269 fi
8270
8271 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8272
8273         if test $ol_cv_pthread_mthreads = yes ; then
8274                 ol_link_pthreads="-mthreads"
8275                 ol_link_threads=posix
8276         fi
8277 fi
8278
8279                 # Pthread try link: -thread (ol_cv_pthread_thread)
8280 if test "$ol_link_threads" = no ; then
8281         # try -thread
8282         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8283 echo "configure:8284: checking for pthread link with -thread" >&5
8284 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8285   echo $ac_n "(cached) $ac_c" 1>&6
8286 else
8287   
8288                 # save the flags
8289                 ol_LIBS="$LIBS"
8290                 LIBS="-thread $LIBS"
8291
8292                 if test "$cross_compiling" = yes; then
8293   cat > conftest.$ac_ext <<EOF
8294 #line 8295 "configure"
8295 #include "confdefs.h"
8296 /* pthread test headers */
8297 #include <pthread.h>
8298 #ifndef NULL
8299 #define NULL (void*)0
8300 #endif
8301
8302 static void *task(p)
8303         void *p;
8304 {
8305         return (void *) (p == NULL);
8306 }
8307
8308 int main() {
8309
8310         /* pthread test function */
8311         pthread_t t;
8312         int status;
8313 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8314         /* This system (e.g. AIX) defaults detached; must override */
8315         pthread_attr_t attr;
8316
8317         status = pthread_attr_init(&attr);
8318         if( status ) exit( status );
8319
8320         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8321         if( status ) exit( status );
8322
8323 #define ATTR    &attr
8324 #else
8325 #if HAVE_PTHREADS_D4
8326 #define ATTR    pthread_attr_default
8327 #else
8328 #define ATTR    NULL
8329 #endif
8330 #endif
8331         /* make sure pthread_create() isn't just a stub */
8332         status = pthread_create(&t, ATTR, task, NULL);
8333         if( status ) exit( status );
8334
8335         /* make sure pthread_detach() isn't just a stub */
8336 #if HAVE_PTHREADS_D4
8337         status = pthread_detach( &t );
8338 #else
8339         status = pthread_detach( t );
8340 #endif
8341
8342 #ifdef HAVE_LINUX_THREADS
8343         pthread_kill_other_threads_np();
8344 #endif
8345
8346         exit( status );
8347
8348 ; return 0; }
8349 EOF
8350 if { (eval echo configure:8351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8351   rm -rf conftest*
8352   ol_cv_pthread_thread=yes
8353 else
8354   echo "configure: failed program was:" >&5
8355   cat conftest.$ac_ext >&5
8356   rm -rf conftest*
8357   ol_cv_pthread_thread=no
8358 fi
8359 rm -f conftest*
8360 else
8361   cat > conftest.$ac_ext <<EOF
8362 #line 8363 "configure"
8363 #include "confdefs.h"
8364 /* pthread test headers */
8365 #include <pthread.h>
8366 #ifndef NULL
8367 #define NULL (void*)0
8368 #endif
8369
8370 static void *task(p)
8371         void *p;
8372 {
8373         return (void *) (p == NULL);
8374 }
8375
8376
8377 int main(argc, argv)
8378         int argc;
8379         char **argv;
8380 {
8381
8382         /* pthread test function */
8383         pthread_t t;
8384         int status;
8385 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8386         /* This system (e.g. AIX) defaults detached; must override */
8387         pthread_attr_t attr;
8388
8389         status = pthread_attr_init(&attr);
8390         if( status ) exit( status );
8391
8392         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8393         if( status ) exit( status );
8394
8395 #define ATTR    &attr
8396 #else
8397 #if HAVE_PTHREADS_D4
8398 #define ATTR    pthread_attr_default
8399 #else
8400 #define ATTR    NULL
8401 #endif
8402 #endif
8403         /* make sure pthread_create() isn't just a stub */
8404         status = pthread_create(&t, ATTR, task, NULL);
8405         if( status ) exit( status );
8406
8407         /* make sure pthread_detach() isn't just a stub */
8408 #if HAVE_PTHREADS_D4
8409         status = pthread_detach( &t );
8410 #else
8411         status = pthread_detach( t );
8412 #endif
8413
8414 #ifdef HAVE_LINUX_THREADS
8415         pthread_kill_other_threads_np();
8416 #endif
8417
8418         exit( status );
8419
8420 }
8421
8422 EOF
8423 if { (eval echo configure:8424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8424 then
8425   ol_cv_pthread_thread=yes
8426 else
8427   echo "configure: failed program was:" >&5
8428   cat conftest.$ac_ext >&5
8429   rm -fr conftest*
8430   ol_cv_pthread_thread=no
8431 fi
8432 rm -fr conftest*
8433 fi
8434
8435
8436                 # restore the LIBS
8437                 LIBS="$ol_LIBS"
8438         
8439 fi
8440
8441 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8442
8443         if test $ol_cv_pthread_thread = yes ; then
8444                 ol_link_pthreads="-thread"
8445                 ol_link_threads=posix
8446         fi
8447 fi
8448
8449
8450                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8451 if test "$ol_link_threads" = no ; then
8452         # try -lpthread -lmach -lexc -lc_r
8453         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8454 echo "configure:8455: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8455 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8456   echo $ac_n "(cached) $ac_c" 1>&6
8457 else
8458   
8459                 # save the flags
8460                 ol_LIBS="$LIBS"
8461                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8462
8463                 if test "$cross_compiling" = yes; then
8464   cat > conftest.$ac_ext <<EOF
8465 #line 8466 "configure"
8466 #include "confdefs.h"
8467 /* pthread test headers */
8468 #include <pthread.h>
8469 #ifndef NULL
8470 #define NULL (void*)0
8471 #endif
8472
8473 static void *task(p)
8474         void *p;
8475 {
8476         return (void *) (p == NULL);
8477 }
8478
8479 int main() {
8480
8481         /* pthread test function */
8482         pthread_t t;
8483         int status;
8484 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8485         /* This system (e.g. AIX) defaults detached; must override */
8486         pthread_attr_t attr;
8487
8488         status = pthread_attr_init(&attr);
8489         if( status ) exit( status );
8490
8491         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8492         if( status ) exit( status );
8493
8494 #define ATTR    &attr
8495 #else
8496 #if HAVE_PTHREADS_D4
8497 #define ATTR    pthread_attr_default
8498 #else
8499 #define ATTR    NULL
8500 #endif
8501 #endif
8502         /* make sure pthread_create() isn't just a stub */
8503         status = pthread_create(&t, ATTR, task, NULL);
8504         if( status ) exit( status );
8505
8506         /* make sure pthread_detach() isn't just a stub */
8507 #if HAVE_PTHREADS_D4
8508         status = pthread_detach( &t );
8509 #else
8510         status = pthread_detach( t );
8511 #endif
8512
8513 #ifdef HAVE_LINUX_THREADS
8514         pthread_kill_other_threads_np();
8515 #endif
8516
8517         exit( status );
8518
8519 ; return 0; }
8520 EOF
8521 if { (eval echo configure:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8522   rm -rf conftest*
8523   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8524 else
8525   echo "configure: failed program was:" >&5
8526   cat conftest.$ac_ext >&5
8527   rm -rf conftest*
8528   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8529 fi
8530 rm -f conftest*
8531 else
8532   cat > conftest.$ac_ext <<EOF
8533 #line 8534 "configure"
8534 #include "confdefs.h"
8535 /* pthread test headers */
8536 #include <pthread.h>
8537 #ifndef NULL
8538 #define NULL (void*)0
8539 #endif
8540
8541 static void *task(p)
8542         void *p;
8543 {
8544         return (void *) (p == NULL);
8545 }
8546
8547
8548 int main(argc, argv)
8549         int argc;
8550         char **argv;
8551 {
8552
8553         /* pthread test function */
8554         pthread_t t;
8555         int status;
8556 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8557         /* This system (e.g. AIX) defaults detached; must override */
8558         pthread_attr_t attr;
8559
8560         status = pthread_attr_init(&attr);
8561         if( status ) exit( status );
8562
8563         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8564         if( status ) exit( status );
8565
8566 #define ATTR    &attr
8567 #else
8568 #if HAVE_PTHREADS_D4
8569 #define ATTR    pthread_attr_default
8570 #else
8571 #define ATTR    NULL
8572 #endif
8573 #endif
8574         /* make sure pthread_create() isn't just a stub */
8575         status = pthread_create(&t, ATTR, task, NULL);
8576         if( status ) exit( status );
8577
8578         /* make sure pthread_detach() isn't just a stub */
8579 #if HAVE_PTHREADS_D4
8580         status = pthread_detach( &t );
8581 #else
8582         status = pthread_detach( t );
8583 #endif
8584
8585 #ifdef HAVE_LINUX_THREADS
8586         pthread_kill_other_threads_np();
8587 #endif
8588
8589         exit( status );
8590
8591 }
8592
8593 EOF
8594 if { (eval echo configure:8595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8595 then
8596   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8597 else
8598   echo "configure: failed program was:" >&5
8599   cat conftest.$ac_ext >&5
8600   rm -fr conftest*
8601   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8602 fi
8603 rm -fr conftest*
8604 fi
8605
8606
8607                 # restore the LIBS
8608                 LIBS="$ol_LIBS"
8609         
8610 fi
8611
8612 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8613
8614         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8615                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8616                 ol_link_threads=posix
8617         fi
8618 fi
8619
8620                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8621 if test "$ol_link_threads" = no ; then
8622         # try -lpthread -lmach -lexc
8623         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8624 echo "configure:8625: checking for pthread link with -lpthread -lmach -lexc" >&5
8625 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8626   echo $ac_n "(cached) $ac_c" 1>&6
8627 else
8628   
8629                 # save the flags
8630                 ol_LIBS="$LIBS"
8631                 LIBS="-lpthread -lmach -lexc $LIBS"
8632
8633                 if test "$cross_compiling" = yes; then
8634   cat > conftest.$ac_ext <<EOF
8635 #line 8636 "configure"
8636 #include "confdefs.h"
8637 /* pthread test headers */
8638 #include <pthread.h>
8639 #ifndef NULL
8640 #define NULL (void*)0
8641 #endif
8642
8643 static void *task(p)
8644         void *p;
8645 {
8646         return (void *) (p == NULL);
8647 }
8648
8649 int main() {
8650
8651         /* pthread test function */
8652         pthread_t t;
8653         int status;
8654 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8655         /* This system (e.g. AIX) defaults detached; must override */
8656         pthread_attr_t attr;
8657
8658         status = pthread_attr_init(&attr);
8659         if( status ) exit( status );
8660
8661         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8662         if( status ) exit( status );
8663
8664 #define ATTR    &attr
8665 #else
8666 #if HAVE_PTHREADS_D4
8667 #define ATTR    pthread_attr_default
8668 #else
8669 #define ATTR    NULL
8670 #endif
8671 #endif
8672         /* make sure pthread_create() isn't just a stub */
8673         status = pthread_create(&t, ATTR, task, NULL);
8674         if( status ) exit( status );
8675
8676         /* make sure pthread_detach() isn't just a stub */
8677 #if HAVE_PTHREADS_D4
8678         status = pthread_detach( &t );
8679 #else
8680         status = pthread_detach( t );
8681 #endif
8682
8683 #ifdef HAVE_LINUX_THREADS
8684         pthread_kill_other_threads_np();
8685 #endif
8686
8687         exit( status );
8688
8689 ; return 0; }
8690 EOF
8691 if { (eval echo configure:8692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8692   rm -rf conftest*
8693   ol_cv_pthread_lpthread_lmach_lexc=yes
8694 else
8695   echo "configure: failed program was:" >&5
8696   cat conftest.$ac_ext >&5
8697   rm -rf conftest*
8698   ol_cv_pthread_lpthread_lmach_lexc=no
8699 fi
8700 rm -f conftest*
8701 else
8702   cat > conftest.$ac_ext <<EOF
8703 #line 8704 "configure"
8704 #include "confdefs.h"
8705 /* pthread test headers */
8706 #include <pthread.h>
8707 #ifndef NULL
8708 #define NULL (void*)0
8709 #endif
8710
8711 static void *task(p)
8712         void *p;
8713 {
8714         return (void *) (p == NULL);
8715 }
8716
8717
8718 int main(argc, argv)
8719         int argc;
8720         char **argv;
8721 {
8722
8723         /* pthread test function */
8724         pthread_t t;
8725         int status;
8726 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8727         /* This system (e.g. AIX) defaults detached; must override */
8728         pthread_attr_t attr;
8729
8730         status = pthread_attr_init(&attr);
8731         if( status ) exit( status );
8732
8733         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8734         if( status ) exit( status );
8735
8736 #define ATTR    &attr
8737 #else
8738 #if HAVE_PTHREADS_D4
8739 #define ATTR    pthread_attr_default
8740 #else
8741 #define ATTR    NULL
8742 #endif
8743 #endif
8744         /* make sure pthread_create() isn't just a stub */
8745         status = pthread_create(&t, ATTR, task, NULL);
8746         if( status ) exit( status );
8747
8748         /* make sure pthread_detach() isn't just a stub */
8749 #if HAVE_PTHREADS_D4
8750         status = pthread_detach( &t );
8751 #else
8752         status = pthread_detach( t );
8753 #endif
8754
8755 #ifdef HAVE_LINUX_THREADS
8756         pthread_kill_other_threads_np();
8757 #endif
8758
8759         exit( status );
8760
8761 }
8762
8763 EOF
8764 if { (eval echo configure:8765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8765 then
8766   ol_cv_pthread_lpthread_lmach_lexc=yes
8767 else
8768   echo "configure: failed program was:" >&5
8769   cat conftest.$ac_ext >&5
8770   rm -fr conftest*
8771   ol_cv_pthread_lpthread_lmach_lexc=no
8772 fi
8773 rm -fr conftest*
8774 fi
8775
8776
8777                 # restore the LIBS
8778                 LIBS="$ol_LIBS"
8779         
8780 fi
8781
8782 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8783
8784         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8785                 ol_link_pthreads="-lpthread -lmach -lexc"
8786                 ol_link_threads=posix
8787         fi
8788 fi
8789
8790
8791                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8792 if test "$ol_link_threads" = no ; then
8793         # try -lpthread -Wl,-woff,85
8794         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8795 echo "configure:8796: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8796 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8797   echo $ac_n "(cached) $ac_c" 1>&6
8798 else
8799   
8800                 # save the flags
8801                 ol_LIBS="$LIBS"
8802                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8803
8804                 if test "$cross_compiling" = yes; then
8805   cat > conftest.$ac_ext <<EOF
8806 #line 8807 "configure"
8807 #include "confdefs.h"
8808 /* pthread test headers */
8809 #include <pthread.h>
8810 #ifndef NULL
8811 #define NULL (void*)0
8812 #endif
8813
8814 static void *task(p)
8815         void *p;
8816 {
8817         return (void *) (p == NULL);
8818 }
8819
8820 int main() {
8821
8822         /* pthread test function */
8823         pthread_t t;
8824         int status;
8825 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8826         /* This system (e.g. AIX) defaults detached; must override */
8827         pthread_attr_t attr;
8828
8829         status = pthread_attr_init(&attr);
8830         if( status ) exit( status );
8831
8832         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8833         if( status ) exit( status );
8834
8835 #define ATTR    &attr
8836 #else
8837 #if HAVE_PTHREADS_D4
8838 #define ATTR    pthread_attr_default
8839 #else
8840 #define ATTR    NULL
8841 #endif
8842 #endif
8843         /* make sure pthread_create() isn't just a stub */
8844         status = pthread_create(&t, ATTR, task, NULL);
8845         if( status ) exit( status );
8846
8847         /* make sure pthread_detach() isn't just a stub */
8848 #if HAVE_PTHREADS_D4
8849         status = pthread_detach( &t );
8850 #else
8851         status = pthread_detach( t );
8852 #endif
8853
8854 #ifdef HAVE_LINUX_THREADS
8855         pthread_kill_other_threads_np();
8856 #endif
8857
8858         exit( status );
8859
8860 ; return 0; }
8861 EOF
8862 if { (eval echo configure:8863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8863   rm -rf conftest*
8864   ol_cv_pthread_lib_lpthread_woff=yes
8865 else
8866   echo "configure: failed program was:" >&5
8867   cat conftest.$ac_ext >&5
8868   rm -rf conftest*
8869   ol_cv_pthread_lib_lpthread_woff=no
8870 fi
8871 rm -f conftest*
8872 else
8873   cat > conftest.$ac_ext <<EOF
8874 #line 8875 "configure"
8875 #include "confdefs.h"
8876 /* pthread test headers */
8877 #include <pthread.h>
8878 #ifndef NULL
8879 #define NULL (void*)0
8880 #endif
8881
8882 static void *task(p)
8883         void *p;
8884 {
8885         return (void *) (p == NULL);
8886 }
8887
8888
8889 int main(argc, argv)
8890         int argc;
8891         char **argv;
8892 {
8893
8894         /* pthread test function */
8895         pthread_t t;
8896         int status;
8897 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8898         /* This system (e.g. AIX) defaults detached; must override */
8899         pthread_attr_t attr;
8900
8901         status = pthread_attr_init(&attr);
8902         if( status ) exit( status );
8903
8904         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8905         if( status ) exit( status );
8906
8907 #define ATTR    &attr
8908 #else
8909 #if HAVE_PTHREADS_D4
8910 #define ATTR    pthread_attr_default
8911 #else
8912 #define ATTR    NULL
8913 #endif
8914 #endif
8915         /* make sure pthread_create() isn't just a stub */
8916         status = pthread_create(&t, ATTR, task, NULL);
8917         if( status ) exit( status );
8918
8919         /* make sure pthread_detach() isn't just a stub */
8920 #if HAVE_PTHREADS_D4
8921         status = pthread_detach( &t );
8922 #else
8923         status = pthread_detach( t );
8924 #endif
8925
8926 #ifdef HAVE_LINUX_THREADS
8927         pthread_kill_other_threads_np();
8928 #endif
8929
8930         exit( status );
8931
8932 }
8933
8934 EOF
8935 if { (eval echo configure:8936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8936 then
8937   ol_cv_pthread_lib_lpthread_woff=yes
8938 else
8939   echo "configure: failed program was:" >&5
8940   cat conftest.$ac_ext >&5
8941   rm -fr conftest*
8942   ol_cv_pthread_lib_lpthread_woff=no
8943 fi
8944 rm -fr conftest*
8945 fi
8946
8947
8948                 # restore the LIBS
8949                 LIBS="$ol_LIBS"
8950         
8951 fi
8952
8953 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8954
8955         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8956                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8957                 ol_link_threads=posix
8958         fi
8959 fi
8960
8961
8962                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8963 if test "$ol_link_threads" = no ; then
8964         # try -lpthread
8965         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8966 echo "configure:8967: checking for pthread link with -lpthread" >&5
8967 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8968   echo $ac_n "(cached) $ac_c" 1>&6
8969 else
8970   
8971                 # save the flags
8972                 ol_LIBS="$LIBS"
8973                 LIBS="-lpthread $LIBS"
8974
8975                 if test "$cross_compiling" = yes; then
8976   cat > conftest.$ac_ext <<EOF
8977 #line 8978 "configure"
8978 #include "confdefs.h"
8979 /* pthread test headers */
8980 #include <pthread.h>
8981 #ifndef NULL
8982 #define NULL (void*)0
8983 #endif
8984
8985 static void *task(p)
8986         void *p;
8987 {
8988         return (void *) (p == NULL);
8989 }
8990
8991 int main() {
8992
8993         /* pthread test function */
8994         pthread_t t;
8995         int status;
8996 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8997         /* This system (e.g. AIX) defaults detached; must override */
8998         pthread_attr_t attr;
8999
9000         status = pthread_attr_init(&attr);
9001         if( status ) exit( status );
9002
9003         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9004         if( status ) exit( status );
9005
9006 #define ATTR    &attr
9007 #else
9008 #if HAVE_PTHREADS_D4
9009 #define ATTR    pthread_attr_default
9010 #else
9011 #define ATTR    NULL
9012 #endif
9013 #endif
9014         /* make sure pthread_create() isn't just a stub */
9015         status = pthread_create(&t, ATTR, task, NULL);
9016         if( status ) exit( status );
9017
9018         /* make sure pthread_detach() isn't just a stub */
9019 #if HAVE_PTHREADS_D4
9020         status = pthread_detach( &t );
9021 #else
9022         status = pthread_detach( t );
9023 #endif
9024
9025 #ifdef HAVE_LINUX_THREADS
9026         pthread_kill_other_threads_np();
9027 #endif
9028
9029         exit( status );
9030
9031 ; return 0; }
9032 EOF
9033 if { (eval echo configure:9034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9034   rm -rf conftest*
9035   ol_cv_pthread_lpthread=yes
9036 else
9037   echo "configure: failed program was:" >&5
9038   cat conftest.$ac_ext >&5
9039   rm -rf conftest*
9040   ol_cv_pthread_lpthread=no
9041 fi
9042 rm -f conftest*
9043 else
9044   cat > conftest.$ac_ext <<EOF
9045 #line 9046 "configure"
9046 #include "confdefs.h"
9047 /* pthread test headers */
9048 #include <pthread.h>
9049 #ifndef NULL
9050 #define NULL (void*)0
9051 #endif
9052
9053 static void *task(p)
9054         void *p;
9055 {
9056         return (void *) (p == NULL);
9057 }
9058
9059
9060 int main(argc, argv)
9061         int argc;
9062         char **argv;
9063 {
9064
9065         /* pthread test function */
9066         pthread_t t;
9067         int status;
9068 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9069         /* This system (e.g. AIX) defaults detached; must override */
9070         pthread_attr_t attr;
9071
9072         status = pthread_attr_init(&attr);
9073         if( status ) exit( status );
9074
9075         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9076         if( status ) exit( status );
9077
9078 #define ATTR    &attr
9079 #else
9080 #if HAVE_PTHREADS_D4
9081 #define ATTR    pthread_attr_default
9082 #else
9083 #define ATTR    NULL
9084 #endif
9085 #endif
9086         /* make sure pthread_create() isn't just a stub */
9087         status = pthread_create(&t, ATTR, task, NULL);
9088         if( status ) exit( status );
9089
9090         /* make sure pthread_detach() isn't just a stub */
9091 #if HAVE_PTHREADS_D4
9092         status = pthread_detach( &t );
9093 #else
9094         status = pthread_detach( t );
9095 #endif
9096
9097 #ifdef HAVE_LINUX_THREADS
9098         pthread_kill_other_threads_np();
9099 #endif
9100
9101         exit( status );
9102
9103 }
9104
9105 EOF
9106 if { (eval echo configure:9107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9107 then
9108   ol_cv_pthread_lpthread=yes
9109 else
9110   echo "configure: failed program was:" >&5
9111   cat conftest.$ac_ext >&5
9112   rm -fr conftest*
9113   ol_cv_pthread_lpthread=no
9114 fi
9115 rm -fr conftest*
9116 fi
9117
9118
9119                 # restore the LIBS
9120                 LIBS="$ol_LIBS"
9121         
9122 fi
9123
9124 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9125
9126         if test $ol_cv_pthread_lpthread = yes ; then
9127                 ol_link_pthreads="-lpthread"
9128                 ol_link_threads=posix
9129         fi
9130 fi
9131
9132                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9133 if test "$ol_link_threads" = no ; then
9134         # try -lc_r
9135         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9136 echo "configure:9137: checking for pthread link with -lc_r" >&5
9137 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9138   echo $ac_n "(cached) $ac_c" 1>&6
9139 else
9140   
9141                 # save the flags
9142                 ol_LIBS="$LIBS"
9143                 LIBS="-lc_r $LIBS"
9144
9145                 if test "$cross_compiling" = yes; then
9146   cat > conftest.$ac_ext <<EOF
9147 #line 9148 "configure"
9148 #include "confdefs.h"
9149 /* pthread test headers */
9150 #include <pthread.h>
9151 #ifndef NULL
9152 #define NULL (void*)0
9153 #endif
9154
9155 static void *task(p)
9156         void *p;
9157 {
9158         return (void *) (p == NULL);
9159 }
9160
9161 int main() {
9162
9163         /* pthread test function */
9164         pthread_t t;
9165         int status;
9166 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9167         /* This system (e.g. AIX) defaults detached; must override */
9168         pthread_attr_t attr;
9169
9170         status = pthread_attr_init(&attr);
9171         if( status ) exit( status );
9172
9173         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9174         if( status ) exit( status );
9175
9176 #define ATTR    &attr
9177 #else
9178 #if HAVE_PTHREADS_D4
9179 #define ATTR    pthread_attr_default
9180 #else
9181 #define ATTR    NULL
9182 #endif
9183 #endif
9184         /* make sure pthread_create() isn't just a stub */
9185         status = pthread_create(&t, ATTR, task, NULL);
9186         if( status ) exit( status );
9187
9188         /* make sure pthread_detach() isn't just a stub */
9189 #if HAVE_PTHREADS_D4
9190         status = pthread_detach( &t );
9191 #else
9192         status = pthread_detach( t );
9193 #endif
9194
9195 #ifdef HAVE_LINUX_THREADS
9196         pthread_kill_other_threads_np();
9197 #endif
9198
9199         exit( status );
9200
9201 ; return 0; }
9202 EOF
9203 if { (eval echo configure:9204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9204   rm -rf conftest*
9205   ol_cv_pthread_lc_r=yes
9206 else
9207   echo "configure: failed program was:" >&5
9208   cat conftest.$ac_ext >&5
9209   rm -rf conftest*
9210   ol_cv_pthread_lc_r=no
9211 fi
9212 rm -f conftest*
9213 else
9214   cat > conftest.$ac_ext <<EOF
9215 #line 9216 "configure"
9216 #include "confdefs.h"
9217 /* pthread test headers */
9218 #include <pthread.h>
9219 #ifndef NULL
9220 #define NULL (void*)0
9221 #endif
9222
9223 static void *task(p)
9224         void *p;
9225 {
9226         return (void *) (p == NULL);
9227 }
9228
9229
9230 int main(argc, argv)
9231         int argc;
9232         char **argv;
9233 {
9234
9235         /* pthread test function */
9236         pthread_t t;
9237         int status;
9238 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9239         /* This system (e.g. AIX) defaults detached; must override */
9240         pthread_attr_t attr;
9241
9242         status = pthread_attr_init(&attr);
9243         if( status ) exit( status );
9244
9245         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9246         if( status ) exit( status );
9247
9248 #define ATTR    &attr
9249 #else
9250 #if HAVE_PTHREADS_D4
9251 #define ATTR    pthread_attr_default
9252 #else
9253 #define ATTR    NULL
9254 #endif
9255 #endif
9256         /* make sure pthread_create() isn't just a stub */
9257         status = pthread_create(&t, ATTR, task, NULL);
9258         if( status ) exit( status );
9259
9260         /* make sure pthread_detach() isn't just a stub */
9261 #if HAVE_PTHREADS_D4
9262         status = pthread_detach( &t );
9263 #else
9264         status = pthread_detach( t );
9265 #endif
9266
9267 #ifdef HAVE_LINUX_THREADS
9268         pthread_kill_other_threads_np();
9269 #endif
9270
9271         exit( status );
9272
9273 }
9274
9275 EOF
9276 if { (eval echo configure:9277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9277 then
9278   ol_cv_pthread_lc_r=yes
9279 else
9280   echo "configure: failed program was:" >&5
9281   cat conftest.$ac_ext >&5
9282   rm -fr conftest*
9283   ol_cv_pthread_lc_r=no
9284 fi
9285 rm -fr conftest*
9286 fi
9287
9288
9289                 # restore the LIBS
9290                 LIBS="$ol_LIBS"
9291         
9292 fi
9293
9294 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9295
9296         if test $ol_cv_pthread_lc_r = yes ; then
9297                 ol_link_pthreads="-lc_r"
9298                 ol_link_threads=posix
9299         fi
9300 fi
9301
9302
9303                 # Pthread try link: -threads (ol_cv_pthread_threads)
9304 if test "$ol_link_threads" = no ; then
9305         # try -threads
9306         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9307 echo "configure:9308: checking for pthread link with -threads" >&5
9308 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9309   echo $ac_n "(cached) $ac_c" 1>&6
9310 else
9311   
9312                 # save the flags
9313                 ol_LIBS="$LIBS"
9314                 LIBS="-threads $LIBS"
9315
9316                 if test "$cross_compiling" = yes; then
9317   cat > conftest.$ac_ext <<EOF
9318 #line 9319 "configure"
9319 #include "confdefs.h"
9320 /* pthread test headers */
9321 #include <pthread.h>
9322 #ifndef NULL
9323 #define NULL (void*)0
9324 #endif
9325
9326 static void *task(p)
9327         void *p;
9328 {
9329         return (void *) (p == NULL);
9330 }
9331
9332 int main() {
9333
9334         /* pthread test function */
9335         pthread_t t;
9336         int status;
9337 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9338         /* This system (e.g. AIX) defaults detached; must override */
9339         pthread_attr_t attr;
9340
9341         status = pthread_attr_init(&attr);
9342         if( status ) exit( status );
9343
9344         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9345         if( status ) exit( status );
9346
9347 #define ATTR    &attr
9348 #else
9349 #if HAVE_PTHREADS_D4
9350 #define ATTR    pthread_attr_default
9351 #else
9352 #define ATTR    NULL
9353 #endif
9354 #endif
9355         /* make sure pthread_create() isn't just a stub */
9356         status = pthread_create(&t, ATTR, task, NULL);
9357         if( status ) exit( status );
9358
9359         /* make sure pthread_detach() isn't just a stub */
9360 #if HAVE_PTHREADS_D4
9361         status = pthread_detach( &t );
9362 #else
9363         status = pthread_detach( t );
9364 #endif
9365
9366 #ifdef HAVE_LINUX_THREADS
9367         pthread_kill_other_threads_np();
9368 #endif
9369
9370         exit( status );
9371
9372 ; return 0; }
9373 EOF
9374 if { (eval echo configure:9375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9375   rm -rf conftest*
9376   ol_cv_pthread_threads=yes
9377 else
9378   echo "configure: failed program was:" >&5
9379   cat conftest.$ac_ext >&5
9380   rm -rf conftest*
9381   ol_cv_pthread_threads=no
9382 fi
9383 rm -f conftest*
9384 else
9385   cat > conftest.$ac_ext <<EOF
9386 #line 9387 "configure"
9387 #include "confdefs.h"
9388 /* pthread test headers */
9389 #include <pthread.h>
9390 #ifndef NULL
9391 #define NULL (void*)0
9392 #endif
9393
9394 static void *task(p)
9395         void *p;
9396 {
9397         return (void *) (p == NULL);
9398 }
9399
9400
9401 int main(argc, argv)
9402         int argc;
9403         char **argv;
9404 {
9405
9406         /* pthread test function */
9407         pthread_t t;
9408         int status;
9409 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9410         /* This system (e.g. AIX) defaults detached; must override */
9411         pthread_attr_t attr;
9412
9413         status = pthread_attr_init(&attr);
9414         if( status ) exit( status );
9415
9416         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9417         if( status ) exit( status );
9418
9419 #define ATTR    &attr
9420 #else
9421 #if HAVE_PTHREADS_D4
9422 #define ATTR    pthread_attr_default
9423 #else
9424 #define ATTR    NULL
9425 #endif
9426 #endif
9427         /* make sure pthread_create() isn't just a stub */
9428         status = pthread_create(&t, ATTR, task, NULL);
9429         if( status ) exit( status );
9430
9431         /* make sure pthread_detach() isn't just a stub */
9432 #if HAVE_PTHREADS_D4
9433         status = pthread_detach( &t );
9434 #else
9435         status = pthread_detach( t );
9436 #endif
9437
9438 #ifdef HAVE_LINUX_THREADS
9439         pthread_kill_other_threads_np();
9440 #endif
9441
9442         exit( status );
9443
9444 }
9445
9446 EOF
9447 if { (eval echo configure:9448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9448 then
9449   ol_cv_pthread_threads=yes
9450 else
9451   echo "configure: failed program was:" >&5
9452   cat conftest.$ac_ext >&5
9453   rm -fr conftest*
9454   ol_cv_pthread_threads=no
9455 fi
9456 rm -fr conftest*
9457 fi
9458
9459
9460                 # restore the LIBS
9461                 LIBS="$ol_LIBS"
9462         
9463 fi
9464
9465 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9466
9467         if test $ol_cv_pthread_threads = yes ; then
9468                 ol_link_pthreads="-threads"
9469                 ol_link_threads=posix
9470         fi
9471 fi
9472
9473
9474                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9475 if test "$ol_link_threads" = no ; then
9476         # try -lpthreads -lmach -lexc -lc_r
9477         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9478 echo "configure:9479: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9479 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9480   echo $ac_n "(cached) $ac_c" 1>&6
9481 else
9482   
9483                 # save the flags
9484                 ol_LIBS="$LIBS"
9485                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9486
9487                 if test "$cross_compiling" = yes; then
9488   cat > conftest.$ac_ext <<EOF
9489 #line 9490 "configure"
9490 #include "confdefs.h"
9491 /* pthread test headers */
9492 #include <pthread.h>
9493 #ifndef NULL
9494 #define NULL (void*)0
9495 #endif
9496
9497 static void *task(p)
9498         void *p;
9499 {
9500         return (void *) (p == NULL);
9501 }
9502
9503 int main() {
9504
9505         /* pthread test function */
9506         pthread_t t;
9507         int status;
9508 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9509         /* This system (e.g. AIX) defaults detached; must override */
9510         pthread_attr_t attr;
9511
9512         status = pthread_attr_init(&attr);
9513         if( status ) exit( status );
9514
9515         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9516         if( status ) exit( status );
9517
9518 #define ATTR    &attr
9519 #else
9520 #if HAVE_PTHREADS_D4
9521 #define ATTR    pthread_attr_default
9522 #else
9523 #define ATTR    NULL
9524 #endif
9525 #endif
9526         /* make sure pthread_create() isn't just a stub */
9527         status = pthread_create(&t, ATTR, task, NULL);
9528         if( status ) exit( status );
9529
9530         /* make sure pthread_detach() isn't just a stub */
9531 #if HAVE_PTHREADS_D4
9532         status = pthread_detach( &t );
9533 #else
9534         status = pthread_detach( t );
9535 #endif
9536
9537 #ifdef HAVE_LINUX_THREADS
9538         pthread_kill_other_threads_np();
9539 #endif
9540
9541         exit( status );
9542
9543 ; return 0; }
9544 EOF
9545 if { (eval echo configure:9546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9546   rm -rf conftest*
9547   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9548 else
9549   echo "configure: failed program was:" >&5
9550   cat conftest.$ac_ext >&5
9551   rm -rf conftest*
9552   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9553 fi
9554 rm -f conftest*
9555 else
9556   cat > conftest.$ac_ext <<EOF
9557 #line 9558 "configure"
9558 #include "confdefs.h"
9559 /* pthread test headers */
9560 #include <pthread.h>
9561 #ifndef NULL
9562 #define NULL (void*)0
9563 #endif
9564
9565 static void *task(p)
9566         void *p;
9567 {
9568         return (void *) (p == NULL);
9569 }
9570
9571
9572 int main(argc, argv)
9573         int argc;
9574         char **argv;
9575 {
9576
9577         /* pthread test function */
9578         pthread_t t;
9579         int status;
9580 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9581         /* This system (e.g. AIX) defaults detached; must override */
9582         pthread_attr_t attr;
9583
9584         status = pthread_attr_init(&attr);
9585         if( status ) exit( status );
9586
9587         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9588         if( status ) exit( status );
9589
9590 #define ATTR    &attr
9591 #else
9592 #if HAVE_PTHREADS_D4
9593 #define ATTR    pthread_attr_default
9594 #else
9595 #define ATTR    NULL
9596 #endif
9597 #endif
9598         /* make sure pthread_create() isn't just a stub */
9599         status = pthread_create(&t, ATTR, task, NULL);
9600         if( status ) exit( status );
9601
9602         /* make sure pthread_detach() isn't just a stub */
9603 #if HAVE_PTHREADS_D4
9604         status = pthread_detach( &t );
9605 #else
9606         status = pthread_detach( t );
9607 #endif
9608
9609 #ifdef HAVE_LINUX_THREADS
9610         pthread_kill_other_threads_np();
9611 #endif
9612
9613         exit( status );
9614
9615 }
9616
9617 EOF
9618 if { (eval echo configure:9619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9619 then
9620   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9621 else
9622   echo "configure: failed program was:" >&5
9623   cat conftest.$ac_ext >&5
9624   rm -fr conftest*
9625   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9626 fi
9627 rm -fr conftest*
9628 fi
9629
9630
9631                 # restore the LIBS
9632                 LIBS="$ol_LIBS"
9633         
9634 fi
9635
9636 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9637
9638         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9639                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9640                 ol_link_threads=posix
9641         fi
9642 fi
9643
9644                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9645 if test "$ol_link_threads" = no ; then
9646         # try -lpthreads -lmach -lexc
9647         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9648 echo "configure:9649: checking for pthread link with -lpthreads -lmach -lexc" >&5
9649 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9650   echo $ac_n "(cached) $ac_c" 1>&6
9651 else
9652   
9653                 # save the flags
9654                 ol_LIBS="$LIBS"
9655                 LIBS="-lpthreads -lmach -lexc $LIBS"
9656
9657                 if test "$cross_compiling" = yes; then
9658   cat > conftest.$ac_ext <<EOF
9659 #line 9660 "configure"
9660 #include "confdefs.h"
9661 /* pthread test headers */
9662 #include <pthread.h>
9663 #ifndef NULL
9664 #define NULL (void*)0
9665 #endif
9666
9667 static void *task(p)
9668         void *p;
9669 {
9670         return (void *) (p == NULL);
9671 }
9672
9673 int main() {
9674
9675         /* pthread test function */
9676         pthread_t t;
9677         int status;
9678 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9679         /* This system (e.g. AIX) defaults detached; must override */
9680         pthread_attr_t attr;
9681
9682         status = pthread_attr_init(&attr);
9683         if( status ) exit( status );
9684
9685         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9686         if( status ) exit( status );
9687
9688 #define ATTR    &attr
9689 #else
9690 #if HAVE_PTHREADS_D4
9691 #define ATTR    pthread_attr_default
9692 #else
9693 #define ATTR    NULL
9694 #endif
9695 #endif
9696         /* make sure pthread_create() isn't just a stub */
9697         status = pthread_create(&t, ATTR, task, NULL);
9698         if( status ) exit( status );
9699
9700         /* make sure pthread_detach() isn't just a stub */
9701 #if HAVE_PTHREADS_D4
9702         status = pthread_detach( &t );
9703 #else
9704         status = pthread_detach( t );
9705 #endif
9706
9707 #ifdef HAVE_LINUX_THREADS
9708         pthread_kill_other_threads_np();
9709 #endif
9710
9711         exit( status );
9712
9713 ; return 0; }
9714 EOF
9715 if { (eval echo configure:9716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9716   rm -rf conftest*
9717   ol_cv_pthread_lpthreads_lmach_lexc=yes
9718 else
9719   echo "configure: failed program was:" >&5
9720   cat conftest.$ac_ext >&5
9721   rm -rf conftest*
9722   ol_cv_pthread_lpthreads_lmach_lexc=no
9723 fi
9724 rm -f conftest*
9725 else
9726   cat > conftest.$ac_ext <<EOF
9727 #line 9728 "configure"
9728 #include "confdefs.h"
9729 /* pthread test headers */
9730 #include <pthread.h>
9731 #ifndef NULL
9732 #define NULL (void*)0
9733 #endif
9734
9735 static void *task(p)
9736         void *p;
9737 {
9738         return (void *) (p == NULL);
9739 }
9740
9741
9742 int main(argc, argv)
9743         int argc;
9744         char **argv;
9745 {
9746
9747         /* pthread test function */
9748         pthread_t t;
9749         int status;
9750 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9751         /* This system (e.g. AIX) defaults detached; must override */
9752         pthread_attr_t attr;
9753
9754         status = pthread_attr_init(&attr);
9755         if( status ) exit( status );
9756
9757         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9758         if( status ) exit( status );
9759
9760 #define ATTR    &attr
9761 #else
9762 #if HAVE_PTHREADS_D4
9763 #define ATTR    pthread_attr_default
9764 #else
9765 #define ATTR    NULL
9766 #endif
9767 #endif
9768         /* make sure pthread_create() isn't just a stub */
9769         status = pthread_create(&t, ATTR, task, NULL);
9770         if( status ) exit( status );
9771
9772         /* make sure pthread_detach() isn't just a stub */
9773 #if HAVE_PTHREADS_D4
9774         status = pthread_detach( &t );
9775 #else
9776         status = pthread_detach( t );
9777 #endif
9778
9779 #ifdef HAVE_LINUX_THREADS
9780         pthread_kill_other_threads_np();
9781 #endif
9782
9783         exit( status );
9784
9785 }
9786
9787 EOF
9788 if { (eval echo configure:9789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9789 then
9790   ol_cv_pthread_lpthreads_lmach_lexc=yes
9791 else
9792   echo "configure: failed program was:" >&5
9793   cat conftest.$ac_ext >&5
9794   rm -fr conftest*
9795   ol_cv_pthread_lpthreads_lmach_lexc=no
9796 fi
9797 rm -fr conftest*
9798 fi
9799
9800
9801                 # restore the LIBS
9802                 LIBS="$ol_LIBS"
9803         
9804 fi
9805
9806 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9807
9808         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9809                 ol_link_pthreads="-lpthreads -lmach -lexc"
9810                 ol_link_threads=posix
9811         fi
9812 fi
9813
9814                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9815 if test "$ol_link_threads" = no ; then
9816         # try -lpthreads -lexc
9817         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9818 echo "configure:9819: checking for pthread link with -lpthreads -lexc" >&5
9819 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9820   echo $ac_n "(cached) $ac_c" 1>&6
9821 else
9822   
9823                 # save the flags
9824                 ol_LIBS="$LIBS"
9825                 LIBS="-lpthreads -lexc $LIBS"
9826
9827                 if test "$cross_compiling" = yes; then
9828   cat > conftest.$ac_ext <<EOF
9829 #line 9830 "configure"
9830 #include "confdefs.h"
9831 /* pthread test headers */
9832 #include <pthread.h>
9833 #ifndef NULL
9834 #define NULL (void*)0
9835 #endif
9836
9837 static void *task(p)
9838         void *p;
9839 {
9840         return (void *) (p == NULL);
9841 }
9842
9843 int main() {
9844
9845         /* pthread test function */
9846         pthread_t t;
9847         int status;
9848 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9849         /* This system (e.g. AIX) defaults detached; must override */
9850         pthread_attr_t attr;
9851
9852         status = pthread_attr_init(&attr);
9853         if( status ) exit( status );
9854
9855         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9856         if( status ) exit( status );
9857
9858 #define ATTR    &attr
9859 #else
9860 #if HAVE_PTHREADS_D4
9861 #define ATTR    pthread_attr_default
9862 #else
9863 #define ATTR    NULL
9864 #endif
9865 #endif
9866         /* make sure pthread_create() isn't just a stub */
9867         status = pthread_create(&t, ATTR, task, NULL);
9868         if( status ) exit( status );
9869
9870         /* make sure pthread_detach() isn't just a stub */
9871 #if HAVE_PTHREADS_D4
9872         status = pthread_detach( &t );
9873 #else
9874         status = pthread_detach( t );
9875 #endif
9876
9877 #ifdef HAVE_LINUX_THREADS
9878         pthread_kill_other_threads_np();
9879 #endif
9880
9881         exit( status );
9882
9883 ; return 0; }
9884 EOF
9885 if { (eval echo configure:9886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9886   rm -rf conftest*
9887   ol_cv_pthread_lpthreads_lexc=yes
9888 else
9889   echo "configure: failed program was:" >&5
9890   cat conftest.$ac_ext >&5
9891   rm -rf conftest*
9892   ol_cv_pthread_lpthreads_lexc=no
9893 fi
9894 rm -f conftest*
9895 else
9896   cat > conftest.$ac_ext <<EOF
9897 #line 9898 "configure"
9898 #include "confdefs.h"
9899 /* pthread test headers */
9900 #include <pthread.h>
9901 #ifndef NULL
9902 #define NULL (void*)0
9903 #endif
9904
9905 static void *task(p)
9906         void *p;
9907 {
9908         return (void *) (p == NULL);
9909 }
9910
9911
9912 int main(argc, argv)
9913         int argc;
9914         char **argv;
9915 {
9916
9917         /* pthread test function */
9918         pthread_t t;
9919         int status;
9920 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9921         /* This system (e.g. AIX) defaults detached; must override */
9922         pthread_attr_t attr;
9923
9924         status = pthread_attr_init(&attr);
9925         if( status ) exit( status );
9926
9927         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9928         if( status ) exit( status );
9929
9930 #define ATTR    &attr
9931 #else
9932 #if HAVE_PTHREADS_D4
9933 #define ATTR    pthread_attr_default
9934 #else
9935 #define ATTR    NULL
9936 #endif
9937 #endif
9938         /* make sure pthread_create() isn't just a stub */
9939         status = pthread_create(&t, ATTR, task, NULL);
9940         if( status ) exit( status );
9941
9942         /* make sure pthread_detach() isn't just a stub */
9943 #if HAVE_PTHREADS_D4
9944         status = pthread_detach( &t );
9945 #else
9946         status = pthread_detach( t );
9947 #endif
9948
9949 #ifdef HAVE_LINUX_THREADS
9950         pthread_kill_other_threads_np();
9951 #endif
9952
9953         exit( status );
9954
9955 }
9956
9957 EOF
9958 if { (eval echo configure:9959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9959 then
9960   ol_cv_pthread_lpthreads_lexc=yes
9961 else
9962   echo "configure: failed program was:" >&5
9963   cat conftest.$ac_ext >&5
9964   rm -fr conftest*
9965   ol_cv_pthread_lpthreads_lexc=no
9966 fi
9967 rm -fr conftest*
9968 fi
9969
9970
9971                 # restore the LIBS
9972                 LIBS="$ol_LIBS"
9973         
9974 fi
9975
9976 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9977
9978         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9979                 ol_link_pthreads="-lpthreads -lexc"
9980                 ol_link_threads=posix
9981         fi
9982 fi
9983
9984
9985                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9986 if test "$ol_link_threads" = no ; then
9987         # try -lpthreads
9988         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9989 echo "configure:9990: checking for pthread link with -lpthreads" >&5
9990 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9991   echo $ac_n "(cached) $ac_c" 1>&6
9992 else
9993   
9994                 # save the flags
9995                 ol_LIBS="$LIBS"
9996                 LIBS="-lpthreads $LIBS"
9997
9998                 if test "$cross_compiling" = yes; then
9999   cat > conftest.$ac_ext <<EOF
10000 #line 10001 "configure"
10001 #include "confdefs.h"
10002 /* pthread test headers */
10003 #include <pthread.h>
10004 #ifndef NULL
10005 #define NULL (void*)0
10006 #endif
10007
10008 static void *task(p)
10009         void *p;
10010 {
10011         return (void *) (p == NULL);
10012 }
10013
10014 int main() {
10015
10016         /* pthread test function */
10017         pthread_t t;
10018         int status;
10019 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10020         /* This system (e.g. AIX) defaults detached; must override */
10021         pthread_attr_t attr;
10022
10023         status = pthread_attr_init(&attr);
10024         if( status ) exit( status );
10025
10026         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10027         if( status ) exit( status );
10028
10029 #define ATTR    &attr
10030 #else
10031 #if HAVE_PTHREADS_D4
10032 #define ATTR    pthread_attr_default
10033 #else
10034 #define ATTR    NULL
10035 #endif
10036 #endif
10037         /* make sure pthread_create() isn't just a stub */
10038         status = pthread_create(&t, ATTR, task, NULL);
10039         if( status ) exit( status );
10040
10041         /* make sure pthread_detach() isn't just a stub */
10042 #if HAVE_PTHREADS_D4
10043         status = pthread_detach( &t );
10044 #else
10045         status = pthread_detach( t );
10046 #endif
10047
10048 #ifdef HAVE_LINUX_THREADS
10049         pthread_kill_other_threads_np();
10050 #endif
10051
10052         exit( status );
10053
10054 ; return 0; }
10055 EOF
10056 if { (eval echo configure:10057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10057   rm -rf conftest*
10058   ol_cv_pthread_lib_lpthreads=yes
10059 else
10060   echo "configure: failed program was:" >&5
10061   cat conftest.$ac_ext >&5
10062   rm -rf conftest*
10063   ol_cv_pthread_lib_lpthreads=no
10064 fi
10065 rm -f conftest*
10066 else
10067   cat > conftest.$ac_ext <<EOF
10068 #line 10069 "configure"
10069 #include "confdefs.h"
10070 /* pthread test headers */
10071 #include <pthread.h>
10072 #ifndef NULL
10073 #define NULL (void*)0
10074 #endif
10075
10076 static void *task(p)
10077         void *p;
10078 {
10079         return (void *) (p == NULL);
10080 }
10081
10082
10083 int main(argc, argv)
10084         int argc;
10085         char **argv;
10086 {
10087
10088         /* pthread test function */
10089         pthread_t t;
10090         int status;
10091 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10092         /* This system (e.g. AIX) defaults detached; must override */
10093         pthread_attr_t attr;
10094
10095         status = pthread_attr_init(&attr);
10096         if( status ) exit( status );
10097
10098         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10099         if( status ) exit( status );
10100
10101 #define ATTR    &attr
10102 #else
10103 #if HAVE_PTHREADS_D4
10104 #define ATTR    pthread_attr_default
10105 #else
10106 #define ATTR    NULL
10107 #endif
10108 #endif
10109         /* make sure pthread_create() isn't just a stub */
10110         status = pthread_create(&t, ATTR, task, NULL);
10111         if( status ) exit( status );
10112
10113         /* make sure pthread_detach() isn't just a stub */
10114 #if HAVE_PTHREADS_D4
10115         status = pthread_detach( &t );
10116 #else
10117         status = pthread_detach( t );
10118 #endif
10119
10120 #ifdef HAVE_LINUX_THREADS
10121         pthread_kill_other_threads_np();
10122 #endif
10123
10124         exit( status );
10125
10126 }
10127
10128 EOF
10129 if { (eval echo configure:10130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10130 then
10131   ol_cv_pthread_lib_lpthreads=yes
10132 else
10133   echo "configure: failed program was:" >&5
10134   cat conftest.$ac_ext >&5
10135   rm -fr conftest*
10136   ol_cv_pthread_lib_lpthreads=no
10137 fi
10138 rm -fr conftest*
10139 fi
10140
10141
10142                 # restore the LIBS
10143                 LIBS="$ol_LIBS"
10144         
10145 fi
10146
10147 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10148
10149         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10150                 ol_link_pthreads="-lpthreads"
10151                 ol_link_threads=posix
10152         fi
10153 fi
10154
10155
10156                 if test $ol_link_threads != no ; then
10157                         cat >> confdefs.h <<\EOF
10158 #define HAVE_PTHREADS 1
10159 EOF
10160
10161
10162                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10163
10164                                                 save_CPPFLAGS="$CPPFLAGS"
10165                         save_LIBS="$LIBS"
10166                         LIBS="$LTHREAD_LIBS $LIBS"
10167
10168                                                                                                 for ac_func in sched_yield pthread_yield
10169 do
10170 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10171 echo "configure:10172: checking for $ac_func" >&5
10172 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10173   echo $ac_n "(cached) $ac_c" 1>&6
10174 else
10175   cat > conftest.$ac_ext <<EOF
10176 #line 10177 "configure"
10177 #include "confdefs.h"
10178 /* System header to define __stub macros and hopefully few prototypes,
10179     which can conflict with char $ac_func(); below.  */
10180 #include <assert.h>
10181 /* Override any gcc2 internal prototype to avoid an error.  */
10182 /* We use char because int might match the return type of a gcc2
10183     builtin and then its argument prototype would still apply.  */
10184 char $ac_func();
10185 char (*f)();
10186
10187 int main() {
10188
10189 /* The GNU C library defines this for functions which it implements
10190     to always fail with ENOSYS.  Some functions are actually named
10191     something starting with __ and the normal name is an alias.  */
10192 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10193 choke me
10194 #else
10195 f = $ac_func;
10196 #endif
10197
10198 ; return 0; }
10199 EOF
10200 if { (eval echo configure:10201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10201   rm -rf conftest*
10202   eval "ac_cv_func_$ac_func=yes"
10203 else
10204   echo "configure: failed program was:" >&5
10205   cat conftest.$ac_ext >&5
10206   rm -rf conftest*
10207   eval "ac_cv_func_$ac_func=no"
10208 fi
10209 rm -f conftest*
10210 fi
10211
10212 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10213   echo "$ac_t""yes" 1>&6
10214     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10215   cat >> confdefs.h <<EOF
10216 #define $ac_tr_func 1
10217 EOF
10218  
10219 else
10220   echo "$ac_t""no" 1>&6
10221 fi
10222 done
10223
10224
10225                         if test $ac_cv_func_sched_yield = no -a \
10226                                 $ac_cv_func_pthread_yield = no ; then
10227                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10228 echo "configure:10229: checking for sched_yield in -lrt" >&5
10229 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10230 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10231   echo $ac_n "(cached) $ac_c" 1>&6
10232 else
10233   ac_save_LIBS="$LIBS"
10234 LIBS="-lrt  $LIBS"
10235 cat > conftest.$ac_ext <<EOF
10236 #line 10237 "configure"
10237 #include "confdefs.h"
10238 /* Override any gcc2 internal prototype to avoid an error.  */
10239 /* We use char because int might match the return type of a gcc2
10240     builtin and then its argument prototype would still apply.  */
10241 char sched_yield();
10242
10243 int main() {
10244 sched_yield()
10245 ; return 0; }
10246 EOF
10247 if { (eval echo configure:10248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10248   rm -rf conftest*
10249   eval "ac_cv_lib_$ac_lib_var=yes"
10250 else
10251   echo "configure: failed program was:" >&5
10252   cat conftest.$ac_ext >&5
10253   rm -rf conftest*
10254   eval "ac_cv_lib_$ac_lib_var=no"
10255 fi
10256 rm -f conftest*
10257 LIBS="$ac_save_LIBS"
10258
10259 fi
10260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10261   echo "$ac_t""yes" 1>&6
10262   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10263                                         cat >> confdefs.h <<\EOF
10264 #define HAVE_SCHED_YIELD 1
10265 EOF
10266
10267                                         ac_cv_func_sched_yield=yes
10268 else
10269   echo "$ac_t""no" 1>&6
10270 ac_cv_func_sched_yield=no
10271 fi
10272
10273                         fi
10274                         if test $ac_cv_func_sched_yield = no -a \
10275                                 $ac_cv_func_pthread_yield = no ; then
10276                                                                                                 for ac_func in thr_yield
10277 do
10278 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10279 echo "configure:10280: checking for $ac_func" >&5
10280 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10281   echo $ac_n "(cached) $ac_c" 1>&6
10282 else
10283   cat > conftest.$ac_ext <<EOF
10284 #line 10285 "configure"
10285 #include "confdefs.h"
10286 /* System header to define __stub macros and hopefully few prototypes,
10287     which can conflict with char $ac_func(); below.  */
10288 #include <assert.h>
10289 /* Override any gcc2 internal prototype to avoid an error.  */
10290 /* We use char because int might match the return type of a gcc2
10291     builtin and then its argument prototype would still apply.  */
10292 char $ac_func();
10293 char (*f)();
10294
10295 int main() {
10296
10297 /* The GNU C library defines this for functions which it implements
10298     to always fail with ENOSYS.  Some functions are actually named
10299     something starting with __ and the normal name is an alias.  */
10300 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10301 choke me
10302 #else
10303 f = $ac_func;
10304 #endif
10305
10306 ; return 0; }
10307 EOF
10308 if { (eval echo configure:10309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10309   rm -rf conftest*
10310   eval "ac_cv_func_$ac_func=yes"
10311 else
10312   echo "configure: failed program was:" >&5
10313   cat conftest.$ac_ext >&5
10314   rm -rf conftest*
10315   eval "ac_cv_func_$ac_func=no"
10316 fi
10317 rm -f conftest*
10318 fi
10319
10320 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10321   echo "$ac_t""yes" 1>&6
10322     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10323   cat >> confdefs.h <<EOF
10324 #define $ac_tr_func 1
10325 EOF
10326  
10327 else
10328   echo "$ac_t""no" 1>&6
10329 fi
10330 done
10331
10332                         fi
10333                         if test $ac_cv_func_sched_yield = no -a \
10334                                 $ac_cv_func_pthread_yield = no -a \
10335                                 "$ac_cv_func_thr_yield" = no ; then
10336                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10337                         fi
10338
10339                                                 for ac_func in pthread_kill
10340 do
10341 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10342 echo "configure:10343: checking for $ac_func" >&5
10343 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10344   echo $ac_n "(cached) $ac_c" 1>&6
10345 else
10346   cat > conftest.$ac_ext <<EOF
10347 #line 10348 "configure"
10348 #include "confdefs.h"
10349 /* System header to define __stub macros and hopefully few prototypes,
10350     which can conflict with char $ac_func(); below.  */
10351 #include <assert.h>
10352 /* Override any gcc2 internal prototype to avoid an error.  */
10353 /* We use char because int might match the return type of a gcc2
10354     builtin and then its argument prototype would still apply.  */
10355 char $ac_func();
10356 char (*f)();
10357
10358 int main() {
10359
10360 /* The GNU C library defines this for functions which it implements
10361     to always fail with ENOSYS.  Some functions are actually named
10362     something starting with __ and the normal name is an alias.  */
10363 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10364 choke me
10365 #else
10366 f = $ac_func;
10367 #endif
10368
10369 ; return 0; }
10370 EOF
10371 if { (eval echo configure:10372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10372   rm -rf conftest*
10373   eval "ac_cv_func_$ac_func=yes"
10374 else
10375   echo "configure: failed program was:" >&5
10376   cat conftest.$ac_ext >&5
10377   rm -rf conftest*
10378   eval "ac_cv_func_$ac_func=no"
10379 fi
10380 rm -f conftest*
10381 fi
10382
10383 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10384   echo "$ac_t""yes" 1>&6
10385     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10386   cat >> confdefs.h <<EOF
10387 #define $ac_tr_func 1
10388 EOF
10389  
10390 else
10391   echo "$ac_t""no" 1>&6
10392 fi
10393 done
10394
10395
10396                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10397 echo "configure:10398: checking for pthread_detach with <pthread.h>" >&5
10398 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10399   echo $ac_n "(cached) $ac_c" 1>&6
10400 else
10401   
10402                                                                 cat > conftest.$ac_ext <<EOF
10403 #line 10404 "configure"
10404 #include "confdefs.h"
10405
10406 #include <pthread.h>
10407 #ifndef NULL
10408 #define NULL (void*)0
10409 #endif
10410
10411 int main() {
10412 pthread_detach(NULL);
10413 ; return 0; }
10414 EOF
10415 if { (eval echo configure:10416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10416   rm -rf conftest*
10417   ol_cv_func_pthread_detach=yes
10418 else
10419   echo "configure: failed program was:" >&5
10420   cat conftest.$ac_ext >&5
10421   rm -rf conftest*
10422   ol_cv_func_pthread_detach=no
10423 fi
10424 rm -f conftest*
10425                         
10426 fi
10427
10428 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10429
10430                         if test $ol_cv_func_pthread_detach = no ; then
10431                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10432                         fi
10433
10434                         cat >> confdefs.h <<\EOF
10435 #define HAVE_PTHREAD_DETACH 1
10436 EOF
10437
10438
10439                                                 for ac_func in \
10440                                 pthread_setconcurrency \
10441                                 pthread_getconcurrency \
10442                                 thr_setconcurrency \
10443                                 thr_getconcurrency \
10444                         
10445 do
10446 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10447 echo "configure:10448: checking for $ac_func" >&5
10448 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10449   echo $ac_n "(cached) $ac_c" 1>&6
10450 else
10451   cat > conftest.$ac_ext <<EOF
10452 #line 10453 "configure"
10453 #include "confdefs.h"
10454 /* System header to define __stub macros and hopefully few prototypes,
10455     which can conflict with char $ac_func(); below.  */
10456 #include <assert.h>
10457 /* Override any gcc2 internal prototype to avoid an error.  */
10458 /* We use char because int might match the return type of a gcc2
10459     builtin and then its argument prototype would still apply.  */
10460 char $ac_func();
10461 char (*f)();
10462
10463 int main() {
10464
10465 /* The GNU C library defines this for functions which it implements
10466     to always fail with ENOSYS.  Some functions are actually named
10467     something starting with __ and the normal name is an alias.  */
10468 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10469 choke me
10470 #else
10471 f = $ac_func;
10472 #endif
10473
10474 ; return 0; }
10475 EOF
10476 if { (eval echo configure:10477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10477   rm -rf conftest*
10478   eval "ac_cv_func_$ac_func=yes"
10479 else
10480   echo "configure: failed program was:" >&5
10481   cat conftest.$ac_ext >&5
10482   rm -rf conftest*
10483   eval "ac_cv_func_$ac_func=no"
10484 fi
10485 rm -f conftest*
10486 fi
10487
10488 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10489   echo "$ac_t""yes" 1>&6
10490     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10491   cat >> confdefs.h <<EOF
10492 #define $ac_tr_func 1
10493 EOF
10494  
10495 else
10496   echo "$ac_t""no" 1>&6
10497 fi
10498 done
10499
10500
10501                         
10502         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10503 echo "configure:10504: checking for pthread_kill_other_threads_np" >&5
10504 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10505   echo $ac_n "(cached) $ac_c" 1>&6
10506 else
10507   cat > conftest.$ac_ext <<EOF
10508 #line 10509 "configure"
10509 #include "confdefs.h"
10510 /* System header to define __stub macros and hopefully few prototypes,
10511     which can conflict with char pthread_kill_other_threads_np(); below.  */
10512 #include <assert.h>
10513 /* Override any gcc2 internal prototype to avoid an error.  */
10514 /* We use char because int might match the return type of a gcc2
10515     builtin and then its argument prototype would still apply.  */
10516 char pthread_kill_other_threads_np();
10517 char (*f)();
10518
10519 int main() {
10520
10521 /* The GNU C library defines this for functions which it implements
10522     to always fail with ENOSYS.  Some functions are actually named
10523     something starting with __ and the normal name is an alias.  */
10524 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10525 choke me
10526 #else
10527 f = pthread_kill_other_threads_np;
10528 #endif
10529
10530 ; return 0; }
10531 EOF
10532 if { (eval echo configure:10533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10533   rm -rf conftest*
10534   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10535 else
10536   echo "configure: failed program was:" >&5
10537   cat conftest.$ac_ext >&5
10538   rm -rf conftest*
10539   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10540 fi
10541 rm -f conftest*
10542 fi
10543
10544 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10545   echo "$ac_t""yes" 1>&6
10546   :
10547 else
10548   echo "$ac_t""no" 1>&6
10549 fi
10550
10551         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10552 echo "configure:10553: checking for LinuxThreads implementation" >&5
10553 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10554   echo $ac_n "(cached) $ac_c" 1>&6
10555 else
10556   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10557 fi
10558
10559 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10560
10561                         
10562         
10563         
10564         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10565 echo "configure:10566: checking for LinuxThreads consistency" >&5
10566 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10567   echo $ac_n "(cached) $ac_c" 1>&6
10568 else
10569   
10570                 if test $ol_cv_header_linux_threads = yes -a \
10571                         $ol_cv_sys_linux_threads = yes; then
10572                         ol_cv_linux_threads=yes
10573                 elif test $ol_cv_header_linux_threads = no -a \
10574                         $ol_cv_sys_linux_threads = no; then
10575                         ol_cv_linux_threads=no
10576                 else
10577                         ol_cv_linux_threads=error
10578                 fi
10579         
10580 fi
10581
10582 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10583
10584
10585                         if test $ol_cv_linux_threads = error; then
10586                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10587                         fi
10588
10589                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10590 echo "configure:10591: checking if pthread_create() works" >&5
10591 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10592   echo $ac_n "(cached) $ac_c" 1>&6
10593 else
10594   
10595                         if test "$cross_compiling" = yes; then
10596                                 ol_cv_pthread_create_works=yes
10597 else
10598   cat > conftest.$ac_ext <<EOF
10599 #line 10600 "configure"
10600 #include "confdefs.h"
10601 /* pthread test headers */
10602 #include <pthread.h>
10603 #ifndef NULL
10604 #define NULL (void*)0
10605 #endif
10606
10607 static void *task(p)
10608         void *p;
10609 {
10610         return (void *) (p == NULL);
10611 }
10612
10613
10614 int main(argc, argv)
10615         int argc;
10616         char **argv;
10617 {
10618
10619         /* pthread test function */
10620         pthread_t t;
10621         int status;
10622 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10623         /* This system (e.g. AIX) defaults detached; must override */
10624         pthread_attr_t attr;
10625
10626         status = pthread_attr_init(&attr);
10627         if( status ) exit( status );
10628
10629         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10630         if( status ) exit( status );
10631
10632 #define ATTR    &attr
10633 #else
10634 #if HAVE_PTHREADS_D4
10635 #define ATTR    pthread_attr_default
10636 #else
10637 #define ATTR    NULL
10638 #endif
10639 #endif
10640         /* make sure pthread_create() isn't just a stub */
10641         status = pthread_create(&t, ATTR, task, NULL);
10642         if( status ) exit( status );
10643
10644         /* make sure pthread_detach() isn't just a stub */
10645 #if HAVE_PTHREADS_D4
10646         status = pthread_detach( &t );
10647 #else
10648         status = pthread_detach( t );
10649 #endif
10650
10651 #ifdef HAVE_LINUX_THREADS
10652         pthread_kill_other_threads_np();
10653 #endif
10654
10655         exit( status );
10656
10657 }
10658
10659 EOF
10660 if { (eval echo configure:10661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10661 then
10662   ol_cv_pthread_create_works=yes
10663 else
10664   echo "configure: failed program was:" >&5
10665   cat conftest.$ac_ext >&5
10666   rm -fr conftest*
10667   ol_cv_pthread_create_works=no
10668 fi
10669 rm -fr conftest*
10670 fi
10671
10672 fi
10673
10674 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10675
10676                         if test $ol_cv_pthread_create_works = no ; then
10677                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10678                         fi
10679
10680                                                 if test $ol_with_yielding_select = auto ; then
10681                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10682 echo "configure:10683: checking if select yields when using pthreads" >&5
10683 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10684   echo $ac_n "(cached) $ac_c" 1>&6
10685 else
10686   
10687                                 if test "$cross_compiling" = yes; then
10688   ol_cv_pthread_select_yields=cross
10689 else
10690   cat > conftest.$ac_ext <<EOF
10691 #line 10692 "configure"
10692 #include "confdefs.h"
10693
10694 #include <sys/types.h>
10695 #include <sys/time.h>
10696 #include <unistd.h>
10697 #include <pthread.h>
10698 #ifndef NULL
10699 #define NULL (void*) 0
10700 #endif
10701
10702 static int fildes[2];
10703
10704 static void *task(p)
10705         void *p;
10706 {
10707         int i;
10708         struct timeval tv;
10709
10710         fd_set rfds;
10711
10712         tv.tv_sec=10;
10713         tv.tv_usec=0;
10714
10715         FD_ZERO(&rfds);
10716         FD_SET(fildes[0], &rfds);
10717
10718         /* we're not interested in any fds */
10719         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10720
10721         if(i < 0) {
10722                 perror("select");
10723                 exit(10);
10724         }
10725
10726         exit(0); /* if we exit here, the select blocked the whole process */
10727 }
10728
10729 int main(argc, argv)
10730         int argc;
10731         char **argv;
10732 {
10733         pthread_t t;
10734
10735         /* create a pipe to select */
10736         if(pipe(&fildes[0])) {
10737                 perror("select");
10738                 exit(1);
10739         }
10740
10741 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10742         (void) pthread_setconcurrency(2);
10743 #else
10744 #ifdef HAVE_THR_SETCONCURRENCY
10745         /* Set Solaris LWP concurrency to 2 */
10746         thr_setconcurrency(2);
10747 #endif
10748 #endif
10749
10750 #if HAVE_PTHREADS_D4
10751         pthread_create(&t, pthread_attr_default, task, NULL);
10752 #else
10753         pthread_create(&t, NULL, task, NULL);
10754 #endif
10755
10756 #if HAVE_SCHED_YIELD
10757         sched_yield();  /* make sure task runs first */
10758 #else
10759 #ifdef HAVE_PTHREAD_YIELD
10760         pthread_yield();        /* make sure task runs first */
10761 #endif
10762 #endif
10763
10764         exit(2);
10765 }
10766 EOF
10767 if { (eval echo configure:10768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10768 then
10769   ol_cv_pthread_select_yields=no
10770 else
10771   echo "configure: failed program was:" >&5
10772   cat conftest.$ac_ext >&5
10773   rm -fr conftest*
10774   ol_cv_pthread_select_yields=yes
10775 fi
10776 rm -fr conftest*
10777 fi
10778
10779 fi
10780
10781 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10782
10783                                 if test $ol_cv_pthread_select_yields = cross ; then
10784                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10785                                 fi
10786
10787                                 if test $ol_cv_pthread_select_yields = yes ; then
10788                                         ol_with_yielding_select=yes
10789                                 fi
10790                         fi
10791
10792                                                 CPPFLAGS="$save_CPPFLAGS"
10793                         LIBS="$save_LIBS"
10794                 else
10795                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10796                 fi
10797         fi
10798
10799         if test $ol_with_threads = posix ; then
10800                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10801         fi
10802 fi
10803
10804 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10805         -o $ol_with_threads = mach ; then
10806
10807                 for ac_hdr in mach/cthreads.h
10808 do
10809 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10810 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10811 echo "configure:10812: checking for $ac_hdr" >&5
10812 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10813   echo $ac_n "(cached) $ac_c" 1>&6
10814 else
10815   cat > conftest.$ac_ext <<EOF
10816 #line 10817 "configure"
10817 #include "confdefs.h"
10818 #include <$ac_hdr>
10819 EOF
10820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10821 { (eval echo configure:10822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10823 if test -z "$ac_err"; then
10824   rm -rf conftest*
10825   eval "ac_cv_header_$ac_safe=yes"
10826 else
10827   echo "$ac_err" >&5
10828   echo "configure: failed program was:" >&5
10829   cat conftest.$ac_ext >&5
10830   rm -rf conftest*
10831   eval "ac_cv_header_$ac_safe=no"
10832 fi
10833 rm -f conftest*
10834 fi
10835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10836   echo "$ac_t""yes" 1>&6
10837     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10838   cat >> confdefs.h <<EOF
10839 #define $ac_tr_hdr 1
10840 EOF
10841  
10842 else
10843   echo "$ac_t""no" 1>&6
10844 fi
10845 done
10846
10847         if test $ac_cv_header_mach_cthreads_h = yes ; then
10848                 ol_with_threads=found
10849
10850                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10851 echo "configure:10852: checking for cthread_fork" >&5
10852 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10853   echo $ac_n "(cached) $ac_c" 1>&6
10854 else
10855   cat > conftest.$ac_ext <<EOF
10856 #line 10857 "configure"
10857 #include "confdefs.h"
10858 /* System header to define __stub macros and hopefully few prototypes,
10859     which can conflict with char cthread_fork(); below.  */
10860 #include <assert.h>
10861 /* Override any gcc2 internal prototype to avoid an error.  */
10862 /* We use char because int might match the return type of a gcc2
10863     builtin and then its argument prototype would still apply.  */
10864 char cthread_fork();
10865 char (*f)();
10866
10867 int main() {
10868
10869 /* The GNU C library defines this for functions which it implements
10870     to always fail with ENOSYS.  Some functions are actually named
10871     something starting with __ and the normal name is an alias.  */
10872 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10873 choke me
10874 #else
10875 f = cthread_fork;
10876 #endif
10877
10878 ; return 0; }
10879 EOF
10880 if { (eval echo configure:10881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10881   rm -rf conftest*
10882   eval "ac_cv_func_cthread_fork=yes"
10883 else
10884   echo "configure: failed program was:" >&5
10885   cat conftest.$ac_ext >&5
10886   rm -rf conftest*
10887   eval "ac_cv_func_cthread_fork=no"
10888 fi
10889 rm -f conftest*
10890 fi
10891
10892 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10893   echo "$ac_t""yes" 1>&6
10894   ol_link_threads=yes
10895 else
10896   echo "$ac_t""no" 1>&6
10897 fi
10898
10899
10900                 if test $ol_link_threads = no ; then
10901                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10902 echo "configure:10903: checking for cthread_fork with -all_load" >&5
10903 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10904   echo $ac_n "(cached) $ac_c" 1>&6
10905 else
10906   
10907                                                                 save_LIBS="$LIBS"
10908                                 LIBS="-all_load $LIBS"
10909                                 cat > conftest.$ac_ext <<EOF
10910 #line 10911 "configure"
10911 #include "confdefs.h"
10912 #include <mach/cthreads.h>
10913 int main() {
10914
10915                                         cthread_fork((void *)0, (void *)0);
10916                                         
10917 ; return 0; }
10918 EOF
10919 if { (eval echo configure:10920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10920   rm -rf conftest*
10921   ol_cv_cthread_all_load=yes
10922 else
10923   echo "configure: failed program was:" >&5
10924   cat conftest.$ac_ext >&5
10925   rm -rf conftest*
10926   ol_cv_cthread_all_load=no
10927 fi
10928 rm -f conftest*
10929                                                                 LIBS="$save_LIBS"
10930                         
10931 fi
10932
10933 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10934
10935                         if test $ol_cv_cthread_all_load = yes ; then
10936                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10937                                 ol_link_threads=mach
10938                         fi
10939                 fi
10940
10941                 if test $ol_link_threads != no ; then
10942                         : check for cthread specific functionality here
10943                         cat >> confdefs.h <<\EOF
10944 #define HAVE_MACH_CTHREADS 1
10945 EOF
10946
10947                 else
10948                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10949                 fi
10950         fi
10951
10952         if test $ol_with_threads = mach ; then
10953                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10954         fi
10955 fi
10956
10957 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10958         -o $ol_with_threads = pth ; then
10959
10960         for ac_hdr in pth.h
10961 do
10962 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10963 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10964 echo "configure:10965: checking for $ac_hdr" >&5
10965 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10966   echo $ac_n "(cached) $ac_c" 1>&6
10967 else
10968   cat > conftest.$ac_ext <<EOF
10969 #line 10970 "configure"
10970 #include "confdefs.h"
10971 #include <$ac_hdr>
10972 EOF
10973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10974 { (eval echo configure:10975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10976 if test -z "$ac_err"; then
10977   rm -rf conftest*
10978   eval "ac_cv_header_$ac_safe=yes"
10979 else
10980   echo "$ac_err" >&5
10981   echo "configure: failed program was:" >&5
10982   cat conftest.$ac_ext >&5
10983   rm -rf conftest*
10984   eval "ac_cv_header_$ac_safe=no"
10985 fi
10986 rm -f conftest*
10987 fi
10988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10989   echo "$ac_t""yes" 1>&6
10990     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10991   cat >> confdefs.h <<EOF
10992 #define $ac_tr_hdr 1
10993 EOF
10994  
10995 else
10996   echo "$ac_t""no" 1>&6
10997 fi
10998 done
10999
11000
11001         if test $ac_cv_header_pth_h = yes ; then
11002                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
11003 echo "configure:11004: checking for pth_version in -lpth" >&5
11004 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
11005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11006   echo $ac_n "(cached) $ac_c" 1>&6
11007 else
11008   ac_save_LIBS="$LIBS"
11009 LIBS="-lpth  $LIBS"
11010 cat > conftest.$ac_ext <<EOF
11011 #line 11012 "configure"
11012 #include "confdefs.h"
11013 /* Override any gcc2 internal prototype to avoid an error.  */
11014 /* We use char because int might match the return type of a gcc2
11015     builtin and then its argument prototype would still apply.  */
11016 char pth_version();
11017
11018 int main() {
11019 pth_version()
11020 ; return 0; }
11021 EOF
11022 if { (eval echo configure:11023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11023   rm -rf conftest*
11024   eval "ac_cv_lib_$ac_lib_var=yes"
11025 else
11026   echo "configure: failed program was:" >&5
11027   cat conftest.$ac_ext >&5
11028   rm -rf conftest*
11029   eval "ac_cv_lib_$ac_lib_var=no"
11030 fi
11031 rm -f conftest*
11032 LIBS="$ac_save_LIBS"
11033
11034 fi
11035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11036   echo "$ac_t""yes" 1>&6
11037   have_pth=yes
11038 else
11039   echo "$ac_t""no" 1>&6
11040 have_pth=no
11041 fi
11042
11043
11044                 if test $have_pth = yes ; then
11045                         cat >> confdefs.h <<\EOF
11046 #define HAVE_GNU_PTH 1
11047 EOF
11048
11049                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
11050                         ol_link_threads=pth
11051
11052                         if test $ol_with_yielding_select = auto ; then
11053                                 ol_with_yielding_select=yes
11054                         fi
11055                 fi
11056         fi
11057 fi
11058
11059 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11060         -o $ol_with_threads = lwp ; then
11061
11062                 for ac_hdr in thread.h synch.h
11063 do
11064 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11065 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11066 echo "configure:11067: checking for $ac_hdr" >&5
11067 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11068   echo $ac_n "(cached) $ac_c" 1>&6
11069 else
11070   cat > conftest.$ac_ext <<EOF
11071 #line 11072 "configure"
11072 #include "confdefs.h"
11073 #include <$ac_hdr>
11074 EOF
11075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11076 { (eval echo configure:11077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11078 if test -z "$ac_err"; then
11079   rm -rf conftest*
11080   eval "ac_cv_header_$ac_safe=yes"
11081 else
11082   echo "$ac_err" >&5
11083   echo "configure: failed program was:" >&5
11084   cat conftest.$ac_ext >&5
11085   rm -rf conftest*
11086   eval "ac_cv_header_$ac_safe=no"
11087 fi
11088 rm -f conftest*
11089 fi
11090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11091   echo "$ac_t""yes" 1>&6
11092     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11093   cat >> confdefs.h <<EOF
11094 #define $ac_tr_hdr 1
11095 EOF
11096  
11097 else
11098   echo "$ac_t""no" 1>&6
11099 fi
11100 done
11101
11102         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
11103                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
11104 echo "configure:11105: checking for thr_create in -lthread" >&5
11105 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
11106 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11107   echo $ac_n "(cached) $ac_c" 1>&6
11108 else
11109   ac_save_LIBS="$LIBS"
11110 LIBS="-lthread  $LIBS"
11111 cat > conftest.$ac_ext <<EOF
11112 #line 11113 "configure"
11113 #include "confdefs.h"
11114 /* Override any gcc2 internal prototype to avoid an error.  */
11115 /* We use char because int might match the return type of a gcc2
11116     builtin and then its argument prototype would still apply.  */
11117 char thr_create();
11118
11119 int main() {
11120 thr_create()
11121 ; return 0; }
11122 EOF
11123 if { (eval echo configure:11124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11124   rm -rf conftest*
11125   eval "ac_cv_lib_$ac_lib_var=yes"
11126 else
11127   echo "configure: failed program was:" >&5
11128   cat conftest.$ac_ext >&5
11129   rm -rf conftest*
11130   eval "ac_cv_lib_$ac_lib_var=no"
11131 fi
11132 rm -f conftest*
11133 LIBS="$ac_save_LIBS"
11134
11135 fi
11136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11137   echo "$ac_t""yes" 1>&6
11138   have_thr=yes
11139 else
11140   echo "$ac_t""no" 1>&6
11141 have_thr=no
11142 fi
11143
11144
11145                 if test $have_thr = yes ; then
11146                         cat >> confdefs.h <<\EOF
11147 #define HAVE_THR 1
11148 EOF
11149
11150                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11151                         ol_link_threads=thr
11152
11153                         if test $ol_with_yielding_select = auto ; then
11154                                 ol_with_yielding_select=yes
11155                         fi
11156
11157                                                 for ac_func in \
11158                                 thr_setconcurrency \
11159                                 thr_getconcurrency \
11160                         
11161 do
11162 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11163 echo "configure:11164: checking for $ac_func" >&5
11164 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11165   echo $ac_n "(cached) $ac_c" 1>&6
11166 else
11167   cat > conftest.$ac_ext <<EOF
11168 #line 11169 "configure"
11169 #include "confdefs.h"
11170 /* System header to define __stub macros and hopefully few prototypes,
11171     which can conflict with char $ac_func(); below.  */
11172 #include <assert.h>
11173 /* Override any gcc2 internal prototype to avoid an error.  */
11174 /* We use char because int might match the return type of a gcc2
11175     builtin and then its argument prototype would still apply.  */
11176 char $ac_func();
11177 char (*f)();
11178
11179 int main() {
11180
11181 /* The GNU C library defines this for functions which it implements
11182     to always fail with ENOSYS.  Some functions are actually named
11183     something starting with __ and the normal name is an alias.  */
11184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11185 choke me
11186 #else
11187 f = $ac_func;
11188 #endif
11189
11190 ; return 0; }
11191 EOF
11192 if { (eval echo configure:11193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11193   rm -rf conftest*
11194   eval "ac_cv_func_$ac_func=yes"
11195 else
11196   echo "configure: failed program was:" >&5
11197   cat conftest.$ac_ext >&5
11198   rm -rf conftest*
11199   eval "ac_cv_func_$ac_func=no"
11200 fi
11201 rm -f conftest*
11202 fi
11203
11204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11205   echo "$ac_t""yes" 1>&6
11206     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11207   cat >> confdefs.h <<EOF
11208 #define $ac_tr_func 1
11209 EOF
11210  
11211 else
11212   echo "$ac_t""no" 1>&6
11213 fi
11214 done
11215
11216                 fi
11217         fi
11218
11219                 for ac_hdr in lwp/lwp.h
11220 do
11221 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11222 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11223 echo "configure:11224: checking for $ac_hdr" >&5
11224 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11225   echo $ac_n "(cached) $ac_c" 1>&6
11226 else
11227   cat > conftest.$ac_ext <<EOF
11228 #line 11229 "configure"
11229 #include "confdefs.h"
11230 #include <$ac_hdr>
11231 EOF
11232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11233 { (eval echo configure:11234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11235 if test -z "$ac_err"; then
11236   rm -rf conftest*
11237   eval "ac_cv_header_$ac_safe=yes"
11238 else
11239   echo "$ac_err" >&5
11240   echo "configure: failed program was:" >&5
11241   cat conftest.$ac_ext >&5
11242   rm -rf conftest*
11243   eval "ac_cv_header_$ac_safe=no"
11244 fi
11245 rm -f conftest*
11246 fi
11247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11248   echo "$ac_t""yes" 1>&6
11249     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11250   cat >> confdefs.h <<EOF
11251 #define $ac_tr_hdr 1
11252 EOF
11253  
11254 else
11255   echo "$ac_t""no" 1>&6
11256 fi
11257 done
11258
11259         if test $ac_cv_header_lwp_lwp_h = yes ; then
11260                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11261 echo "configure:11262: checking for lwp_create in -llwp" >&5
11262 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11263 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11264   echo $ac_n "(cached) $ac_c" 1>&6
11265 else
11266   ac_save_LIBS="$LIBS"
11267 LIBS="-llwp  $LIBS"
11268 cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11271 /* Override any gcc2 internal prototype to avoid an error.  */
11272 /* We use char because int might match the return type of a gcc2
11273     builtin and then its argument prototype would still apply.  */
11274 char lwp_create();
11275
11276 int main() {
11277 lwp_create()
11278 ; return 0; }
11279 EOF
11280 if { (eval echo configure:11281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11281   rm -rf conftest*
11282   eval "ac_cv_lib_$ac_lib_var=yes"
11283 else
11284   echo "configure: failed program was:" >&5
11285   cat conftest.$ac_ext >&5
11286   rm -rf conftest*
11287   eval "ac_cv_lib_$ac_lib_var=no"
11288 fi
11289 rm -f conftest*
11290 LIBS="$ac_save_LIBS"
11291
11292 fi
11293 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11294   echo "$ac_t""yes" 1>&6
11295   have_lwp=yes
11296 else
11297   echo "$ac_t""no" 1>&6
11298 have_lwp=no
11299 fi
11300
11301
11302                 if test $have_lwp = yes ; then
11303                         cat >> confdefs.h <<\EOF
11304 #define HAVE_LWP 1
11305 EOF
11306
11307                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11308                         ol_link_threads=lwp
11309
11310                         if test $ol_with_yielding_select = auto ; then
11311                                 ol_with_yielding_select=no
11312                         fi
11313                 fi
11314         fi
11315 fi
11316
11317 if test $ol_with_yielding_select = yes ; then
11318         cat >> confdefs.h <<\EOF
11319 #define HAVE_YIELDING_SELECT 1
11320 EOF
11321
11322 fi
11323
11324 if test $ol_with_threads = manual ; then
11325                 ol_link_threads=yes
11326
11327         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11328
11329         for ac_hdr in pthread.h sched.h
11330 do
11331 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11332 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11333 echo "configure:11334: checking for $ac_hdr" >&5
11334 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11335   echo $ac_n "(cached) $ac_c" 1>&6
11336 else
11337   cat > conftest.$ac_ext <<EOF
11338 #line 11339 "configure"
11339 #include "confdefs.h"
11340 #include <$ac_hdr>
11341 EOF
11342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11343 { (eval echo configure:11344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11345 if test -z "$ac_err"; then
11346   rm -rf conftest*
11347   eval "ac_cv_header_$ac_safe=yes"
11348 else
11349   echo "$ac_err" >&5
11350   echo "configure: failed program was:" >&5
11351   cat conftest.$ac_ext >&5
11352   rm -rf conftest*
11353   eval "ac_cv_header_$ac_safe=no"
11354 fi
11355 rm -f conftest*
11356 fi
11357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11358   echo "$ac_t""yes" 1>&6
11359     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11360   cat >> confdefs.h <<EOF
11361 #define $ac_tr_hdr 1
11362 EOF
11363  
11364 else
11365   echo "$ac_t""no" 1>&6
11366 fi
11367 done
11368
11369         for ac_func in sched_yield pthread_yield
11370 do
11371 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11372 echo "configure:11373: checking for $ac_func" >&5
11373 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11374   echo $ac_n "(cached) $ac_c" 1>&6
11375 else
11376   cat > conftest.$ac_ext <<EOF
11377 #line 11378 "configure"
11378 #include "confdefs.h"
11379 /* System header to define __stub macros and hopefully few prototypes,
11380     which can conflict with char $ac_func(); below.  */
11381 #include <assert.h>
11382 /* Override any gcc2 internal prototype to avoid an error.  */
11383 /* We use char because int might match the return type of a gcc2
11384     builtin and then its argument prototype would still apply.  */
11385 char $ac_func();
11386 char (*f)();
11387
11388 int main() {
11389
11390 /* The GNU C library defines this for functions which it implements
11391     to always fail with ENOSYS.  Some functions are actually named
11392     something starting with __ and the normal name is an alias.  */
11393 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11394 choke me
11395 #else
11396 f = $ac_func;
11397 #endif
11398
11399 ; return 0; }
11400 EOF
11401 if { (eval echo configure:11402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11402   rm -rf conftest*
11403   eval "ac_cv_func_$ac_func=yes"
11404 else
11405   echo "configure: failed program was:" >&5
11406   cat conftest.$ac_ext >&5
11407   rm -rf conftest*
11408   eval "ac_cv_func_$ac_func=no"
11409 fi
11410 rm -f conftest*
11411 fi
11412
11413 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11414   echo "$ac_t""yes" 1>&6
11415     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11416   cat >> confdefs.h <<EOF
11417 #define $ac_tr_func 1
11418 EOF
11419  
11420 else
11421   echo "$ac_t""no" 1>&6
11422 fi
11423 done
11424
11425         
11426         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11427 echo "configure:11428: checking for LinuxThreads pthread.h" >&5
11428 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11429   echo $ac_n "(cached) $ac_c" 1>&6
11430 else
11431   cat > conftest.$ac_ext <<EOF
11432 #line 11433 "configure"
11433 #include "confdefs.h"
11434 #include <pthread.h>
11435 EOF
11436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11437   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11438   rm -rf conftest*
11439   ol_cv_header_linux_threads=yes
11440 else
11441   rm -rf conftest*
11442   ol_cv_header_linux_threads=no
11443 fi
11444 rm -f conftest*
11445
11446                 
11447 fi
11448
11449 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11450         if test $ol_cv_header_linux_threads = yes; then
11451                 cat >> confdefs.h <<\EOF
11452 #define HAVE_LINUX_THREADS 1
11453 EOF
11454
11455         fi
11456
11457
11458         for ac_hdr in mach/cthreads.h
11459 do
11460 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11461 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11462 echo "configure:11463: checking for $ac_hdr" >&5
11463 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11464   echo $ac_n "(cached) $ac_c" 1>&6
11465 else
11466   cat > conftest.$ac_ext <<EOF
11467 #line 11468 "configure"
11468 #include "confdefs.h"
11469 #include <$ac_hdr>
11470 EOF
11471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11472 { (eval echo configure:11473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11474 if test -z "$ac_err"; then
11475   rm -rf conftest*
11476   eval "ac_cv_header_$ac_safe=yes"
11477 else
11478   echo "$ac_err" >&5
11479   echo "configure: failed program was:" >&5
11480   cat conftest.$ac_ext >&5
11481   rm -rf conftest*
11482   eval "ac_cv_header_$ac_safe=no"
11483 fi
11484 rm -f conftest*
11485 fi
11486 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11487   echo "$ac_t""yes" 1>&6
11488     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11489   cat >> confdefs.h <<EOF
11490 #define $ac_tr_hdr 1
11491 EOF
11492  
11493 else
11494   echo "$ac_t""no" 1>&6
11495 fi
11496 done
11497
11498         for ac_hdr in lwp/lwp.h
11499 do
11500 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11501 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11502 echo "configure:11503: checking for $ac_hdr" >&5
11503 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11504   echo $ac_n "(cached) $ac_c" 1>&6
11505 else
11506   cat > conftest.$ac_ext <<EOF
11507 #line 11508 "configure"
11508 #include "confdefs.h"
11509 #include <$ac_hdr>
11510 EOF
11511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11512 { (eval echo configure:11513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11514 if test -z "$ac_err"; then
11515   rm -rf conftest*
11516   eval "ac_cv_header_$ac_safe=yes"
11517 else
11518   echo "$ac_err" >&5
11519   echo "configure: failed program was:" >&5
11520   cat conftest.$ac_ext >&5
11521   rm -rf conftest*
11522   eval "ac_cv_header_$ac_safe=no"
11523 fi
11524 rm -f conftest*
11525 fi
11526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11527   echo "$ac_t""yes" 1>&6
11528     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11529   cat >> confdefs.h <<EOF
11530 #define $ac_tr_hdr 1
11531 EOF
11532  
11533 else
11534   echo "$ac_t""no" 1>&6
11535 fi
11536 done
11537
11538         for ac_hdr in thread.h synch.h
11539 do
11540 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11541 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11542 echo "configure:11543: checking for $ac_hdr" >&5
11543 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11544   echo $ac_n "(cached) $ac_c" 1>&6
11545 else
11546   cat > conftest.$ac_ext <<EOF
11547 #line 11548 "configure"
11548 #include "confdefs.h"
11549 #include <$ac_hdr>
11550 EOF
11551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11552 { (eval echo configure:11553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11554 if test -z "$ac_err"; then
11555   rm -rf conftest*
11556   eval "ac_cv_header_$ac_safe=yes"
11557 else
11558   echo "$ac_err" >&5
11559   echo "configure: failed program was:" >&5
11560   cat conftest.$ac_ext >&5
11561   rm -rf conftest*
11562   eval "ac_cv_header_$ac_safe=no"
11563 fi
11564 rm -f conftest*
11565 fi
11566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11567   echo "$ac_t""yes" 1>&6
11568     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11569   cat >> confdefs.h <<EOF
11570 #define $ac_tr_hdr 1
11571 EOF
11572  
11573 else
11574   echo "$ac_t""no" 1>&6
11575 fi
11576 done
11577
11578 fi
11579
11580 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11581                         cat >> confdefs.h <<\EOF
11582 #define REENTRANT 1
11583 EOF
11584
11585         cat >> confdefs.h <<\EOF
11586 #define _REENTRANT 1
11587 EOF
11588
11589         cat >> confdefs.h <<\EOF
11590 #define THREAD_SAFE 1
11591 EOF
11592
11593         cat >> confdefs.h <<\EOF
11594 #define _THREAD_SAFE 1
11595 EOF
11596
11597         cat >> confdefs.h <<\EOF
11598 #define THREADSAFE 1
11599 EOF
11600
11601         cat >> confdefs.h <<\EOF
11602 #define _THREADSAFE 1
11603 EOF
11604
11605         cat >> confdefs.h <<\EOF
11606 #define _SGI_MP_SOURCE 1
11607 EOF
11608
11609
11610                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11611 echo "configure:11612: checking for thread specific errno" >&5
11612 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11613   echo $ac_n "(cached) $ac_c" 1>&6
11614 else
11615   
11616                 cat > conftest.$ac_ext <<EOF
11617 #line 11618 "configure"
11618 #include "confdefs.h"
11619 #include <errno.h>
11620 int main() {
11621 errno = 0;
11622 ; return 0; }
11623 EOF
11624 if { (eval echo configure:11625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11625   rm -rf conftest*
11626   ol_cv_errno_thread_specific=yes
11627 else
11628   echo "configure: failed program was:" >&5
11629   cat conftest.$ac_ext >&5
11630   rm -rf conftest*
11631   ol_cv_errno_thread_specific=no
11632 fi
11633 rm -f conftest*
11634         
11635 fi
11636
11637 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11638
11639                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11640 echo "configure:11641: checking for thread specific h_errno" >&5
11641 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11642   echo $ac_n "(cached) $ac_c" 1>&6
11643 else
11644   
11645                 cat > conftest.$ac_ext <<EOF
11646 #line 11647 "configure"
11647 #include "confdefs.h"
11648 #include <netdb.h>
11649 int main() {
11650 h_errno = 0;
11651 ; return 0; }
11652 EOF
11653 if { (eval echo configure:11654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11654   rm -rf conftest*
11655   ol_cv_h_errno_thread_specific=yes
11656 else
11657   echo "configure: failed program was:" >&5
11658   cat conftest.$ac_ext >&5
11659   rm -rf conftest*
11660   ol_cv_h_errno_thread_specific=no
11661 fi
11662 rm -f conftest*
11663         
11664 fi
11665
11666 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11667
11668         if test $ol_cv_errno_thread_specific != yes \
11669                 -o $ol_cv_h_errno_thread_specific != yes ; then
11670                 LIBS="$LTHREAD_LIBS $LIBS"
11671                 LTHREAD_LIBS=""
11672         fi
11673
11674 fi  
11675
11676 if test $ol_link_threads = no ; then
11677         if test $ol_with_threads = yes ; then
11678                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11679         fi
11680
11681         if test $ol_with_threads = auto ; then
11682                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11683                 ol_with_threads=no
11684         fi
11685
11686         cat >> confdefs.h <<\EOF
11687 #define NO_THREADS 1
11688 EOF
11689
11690         LTHREAD_LIBS=""
11691 fi
11692
11693 if test $ol_link_threads != no ; then
11694         cat >> confdefs.h <<\EOF
11695 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11696 EOF
11697
11698 fi
11699
11700 ol_link_ldbm=no 
11701
11702 if test $ol_with_ldbm_api = auto \
11703         -o $ol_with_ldbm_api = berkeley \
11704         -o $ol_with_ldbm_api = bcompat ; then
11705
11706         if test $ol_with_ldbm_api = bcompat; then \
11707                 ol_cv_berkeley_db=no
11708 for ac_hdr in db_185.h db.h
11709 do
11710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11712 echo "configure:11713: checking for $ac_hdr" >&5
11713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11714   echo $ac_n "(cached) $ac_c" 1>&6
11715 else
11716   cat > conftest.$ac_ext <<EOF
11717 #line 11718 "configure"
11718 #include "confdefs.h"
11719 #include <$ac_hdr>
11720 EOF
11721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11722 { (eval echo configure:11723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11724 if test -z "$ac_err"; then
11725   rm -rf conftest*
11726   eval "ac_cv_header_$ac_safe=yes"
11727 else
11728   echo "$ac_err" >&5
11729   echo "configure: failed program was:" >&5
11730   cat conftest.$ac_ext >&5
11731   rm -rf conftest*
11732   eval "ac_cv_header_$ac_safe=no"
11733 fi
11734 rm -f conftest*
11735 fi
11736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11737   echo "$ac_t""yes" 1>&6
11738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11739   cat >> confdefs.h <<EOF
11740 #define $ac_tr_hdr 1
11741 EOF
11742  
11743 else
11744   echo "$ac_t""no" 1>&6
11745 fi
11746 done
11747
11748 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11749         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11750 echo "configure:11751: checking if Berkeley DB header compatibility" >&5
11751 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11752   echo $ac_n "(cached) $ac_c" 1>&6
11753 else
11754   
11755                 cat > conftest.$ac_ext <<EOF
11756 #line 11757 "configure"
11757 #include "confdefs.h"
11758
11759 #if HAVE_DB_185_H
11760 #       include <db_185.h>
11761 #else
11762 #       include <db.h>
11763 #endif
11764
11765  /* this check could be improved */
11766 #ifndef DB_VERSION_MAJOR
11767 #       define DB_VERSION_MAJOR 1
11768 #endif
11769
11770 #if DB_VERSION_MAJOR == 1 
11771         __db_version_1
11772 #endif
11773
11774 EOF
11775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11776   egrep "__db_version_1" >/dev/null 2>&1; then
11777   rm -rf conftest*
11778   ol_cv_header_db1=yes
11779 else
11780   rm -rf conftest*
11781   ol_cv_header_db1=no
11782 fi
11783 rm -f conftest*
11784
11785 fi
11786
11787 echo "$ac_t""$ol_cv_header_db1" 1>&6
11788
11789         if test ol_cv_header_db1=yes ; then
11790                 ol_cv_lib_db=no
11791 if test $ol_cv_lib_db = no ; then
11792         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11793 echo "configure:11794: checking for Berkeley DB link (default)" >&5
11794 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11795   echo $ac_n "(cached) $ac_c" 1>&6
11796 else
11797   
11798         ol_DB_LIB=
11799         ol_LIBS=$LIBS
11800         LIBS="$ol_DB_LIB $LIBS"
11801
11802         cat > conftest.$ac_ext <<EOF
11803 #line 11804 "configure"
11804 #include "confdefs.h"
11805
11806 #ifdef HAVE_DB_185_H
11807 # include <db_185.h>
11808 #else
11809 # include <db.h>
11810 #endif
11811
11812 #ifndef DB_VERSION_MAJOR
11813 # define DB_VERSION_MAJOR 1
11814 #endif
11815
11816 #ifndef NULL
11817 #define NULL ((void*)0)
11818 #endif
11819
11820 int main() {
11821
11822 #if DB_VERSION_MAJOR > 2
11823         db_env_create( NULL, 0 );
11824 #elif DB_VERSION_MAJOR > 1
11825         db_appexit( NULL );
11826 #else
11827         (void) dbopen( NULL, 0, 0, 0, NULL);
11828 #endif
11829
11830 ; return 0; }
11831 EOF
11832 if { (eval echo configure:11833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11833   rm -rf conftest*
11834   ol_cv_db_none=yes
11835 else
11836   echo "configure: failed program was:" >&5
11837   cat conftest.$ac_ext >&5
11838   rm -rf conftest*
11839   ol_cv_db_none=no
11840 fi
11841 rm -f conftest*
11842
11843         LIBS="$ol_LIBS"
11844
11845 fi
11846
11847 echo "$ac_t""$ol_cv_db_none" 1>&6
11848
11849         if test $ol_cv_db_none = yes ; then
11850                 ol_cv_lib_db=yes
11851         fi
11852 fi
11853
11854 if test $ol_cv_lib_db = no ; then
11855         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11856 echo "configure:11857: checking for Berkeley DB link (-ldb)" >&5
11857 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11858   echo $ac_n "(cached) $ac_c" 1>&6
11859 else
11860   
11861         ol_DB_LIB=-ldb
11862         ol_LIBS=$LIBS
11863         LIBS="$ol_DB_LIB $LIBS"
11864
11865         cat > conftest.$ac_ext <<EOF
11866 #line 11867 "configure"
11867 #include "confdefs.h"
11868
11869 #ifdef HAVE_DB_185_H
11870 # include <db_185.h>
11871 #else
11872 # include <db.h>
11873 #endif
11874
11875 #ifndef DB_VERSION_MAJOR
11876 # define DB_VERSION_MAJOR 1
11877 #endif
11878
11879 #ifndef NULL
11880 #define NULL ((void*)0)
11881 #endif
11882
11883 int main() {
11884
11885 #if DB_VERSION_MAJOR > 2
11886         db_env_create( NULL, 0 );
11887 #elif DB_VERSION_MAJOR > 1
11888         db_appexit( NULL );
11889 #else
11890         (void) dbopen( NULL, 0, 0, 0, NULL);
11891 #endif
11892
11893 ; return 0; }
11894 EOF
11895 if { (eval echo configure:11896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11896   rm -rf conftest*
11897   ol_cv_db_db=yes
11898 else
11899   echo "configure: failed program was:" >&5
11900   cat conftest.$ac_ext >&5
11901   rm -rf conftest*
11902   ol_cv_db_db=no
11903 fi
11904 rm -f conftest*
11905
11906         LIBS="$ol_LIBS"
11907
11908 fi
11909
11910 echo "$ac_t""$ol_cv_db_db" 1>&6
11911
11912         if test $ol_cv_db_db = yes ; then
11913                 ol_cv_lib_db=-ldb
11914         fi
11915 fi
11916
11917 if test $ol_cv_lib_db = no ; then
11918         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11919 echo "configure:11920: checking for Berkeley DB link (-ldb3)" >&5
11920 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11921   echo $ac_n "(cached) $ac_c" 1>&6
11922 else
11923   
11924         ol_DB_LIB=-ldb3
11925         ol_LIBS=$LIBS
11926         LIBS="$ol_DB_LIB $LIBS"
11927
11928         cat > conftest.$ac_ext <<EOF
11929 #line 11930 "configure"
11930 #include "confdefs.h"
11931
11932 #ifdef HAVE_DB_185_H
11933 # include <db_185.h>
11934 #else
11935 # include <db.h>
11936 #endif
11937
11938 #ifndef DB_VERSION_MAJOR
11939 # define DB_VERSION_MAJOR 1
11940 #endif
11941
11942 #ifndef NULL
11943 #define NULL ((void*)0)
11944 #endif
11945
11946 int main() {
11947
11948 #if DB_VERSION_MAJOR > 2
11949         db_env_create( NULL, 0 );
11950 #elif DB_VERSION_MAJOR > 1
11951         db_appexit( NULL );
11952 #else
11953         (void) dbopen( NULL, 0, 0, 0, NULL);
11954 #endif
11955
11956 ; return 0; }
11957 EOF
11958 if { (eval echo configure:11959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11959   rm -rf conftest*
11960   ol_cv_db_db3=yes
11961 else
11962   echo "configure: failed program was:" >&5
11963   cat conftest.$ac_ext >&5
11964   rm -rf conftest*
11965   ol_cv_db_db3=no
11966 fi
11967 rm -f conftest*
11968
11969         LIBS="$ol_LIBS"
11970
11971 fi
11972
11973 echo "$ac_t""$ol_cv_db_db3" 1>&6
11974
11975         if test $ol_cv_db_db3 = yes ; then
11976                 ol_cv_lib_db=-ldb3
11977         fi
11978 fi
11979
11980 if test $ol_cv_lib_db = no ; then
11981         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11982 echo "configure:11983: checking for Berkeley DB link (-ldb2)" >&5
11983 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11984   echo $ac_n "(cached) $ac_c" 1>&6
11985 else
11986   
11987         ol_DB_LIB=-ldb2
11988         ol_LIBS=$LIBS
11989         LIBS="$ol_DB_LIB $LIBS"
11990
11991         cat > conftest.$ac_ext <<EOF
11992 #line 11993 "configure"
11993 #include "confdefs.h"
11994
11995 #ifdef HAVE_DB_185_H
11996 # include <db_185.h>
11997 #else
11998 # include <db.h>
11999 #endif
12000
12001 #ifndef DB_VERSION_MAJOR
12002 # define DB_VERSION_MAJOR 1
12003 #endif
12004
12005 #ifndef NULL
12006 #define NULL ((void*)0)
12007 #endif
12008
12009 int main() {
12010
12011 #if DB_VERSION_MAJOR > 2
12012         db_env_create( NULL, 0 );
12013 #elif DB_VERSION_MAJOR > 1
12014         db_appexit( NULL );
12015 #else
12016         (void) dbopen( NULL, 0, 0, 0, NULL);
12017 #endif
12018
12019 ; return 0; }
12020 EOF
12021 if { (eval echo configure:12022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12022   rm -rf conftest*
12023   ol_cv_db_db2=yes
12024 else
12025   echo "configure: failed program was:" >&5
12026   cat conftest.$ac_ext >&5
12027   rm -rf conftest*
12028   ol_cv_db_db2=no
12029 fi
12030 rm -f conftest*
12031
12032         LIBS="$ol_LIBS"
12033
12034 fi
12035
12036 echo "$ac_t""$ol_cv_db_db2" 1>&6
12037
12038         if test $ol_cv_db_db2 = yes ; then
12039                 ol_cv_lib_db=-ldb2
12040         fi
12041 fi
12042
12043 if test $ol_cv_lib_db = no ; then
12044         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12045 echo "configure:12046: checking for Berkeley DB link (-ldb1)" >&5
12046 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12047   echo $ac_n "(cached) $ac_c" 1>&6
12048 else
12049   
12050         ol_DB_LIB=-ldb1
12051         ol_LIBS=$LIBS
12052         LIBS="$ol_DB_LIB $LIBS"
12053
12054         cat > conftest.$ac_ext <<EOF
12055 #line 12056 "configure"
12056 #include "confdefs.h"
12057
12058 #ifdef HAVE_DB_185_H
12059 # include <db_185.h>
12060 #else
12061 # include <db.h>
12062 #endif
12063
12064 #ifndef DB_VERSION_MAJOR
12065 # define DB_VERSION_MAJOR 1
12066 #endif
12067
12068 #ifndef NULL
12069 #define NULL ((void*)0)
12070 #endif
12071
12072 int main() {
12073
12074 #if DB_VERSION_MAJOR > 2
12075         db_env_create( NULL, 0 );
12076 #elif DB_VERSION_MAJOR > 1
12077         db_appexit( NULL );
12078 #else
12079         (void) dbopen( NULL, 0, 0, 0, NULL);
12080 #endif
12081
12082 ; return 0; }
12083 EOF
12084 if { (eval echo configure:12085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12085   rm -rf conftest*
12086   ol_cv_db_db1=yes
12087 else
12088   echo "configure: failed program was:" >&5
12089   cat conftest.$ac_ext >&5
12090   rm -rf conftest*
12091   ol_cv_db_db1=no
12092 fi
12093 rm -f conftest*
12094
12095         LIBS="$ol_LIBS"
12096
12097 fi
12098
12099 echo "$ac_t""$ol_cv_db_db1" 1>&6
12100
12101         if test $ol_cv_db_db1 = yes ; then
12102                 ol_cv_lib_db=-ldb1
12103         fi
12104 fi
12105
12106
12107                 if test "$ol_cv_lib_db" != no ; then
12108                         ol_cv_berkeley_db=yes
12109                 fi
12110         fi
12111 fi
12112
12113         else
12114                 ol_cv_berkeley_db=no
12115 for ac_hdr in db.h
12116 do
12117 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12118 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12119 echo "configure:12120: checking for $ac_hdr" >&5
12120 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12121   echo $ac_n "(cached) $ac_c" 1>&6
12122 else
12123   cat > conftest.$ac_ext <<EOF
12124 #line 12125 "configure"
12125 #include "confdefs.h"
12126 #include <$ac_hdr>
12127 EOF
12128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12129 { (eval echo configure:12130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12131 if test -z "$ac_err"; then
12132   rm -rf conftest*
12133   eval "ac_cv_header_$ac_safe=yes"
12134 else
12135   echo "$ac_err" >&5
12136   echo "configure: failed program was:" >&5
12137   cat conftest.$ac_ext >&5
12138   rm -rf conftest*
12139   eval "ac_cv_header_$ac_safe=no"
12140 fi
12141 rm -f conftest*
12142 fi
12143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12144   echo "$ac_t""yes" 1>&6
12145     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12146   cat >> confdefs.h <<EOF
12147 #define $ac_tr_hdr 1
12148 EOF
12149  
12150 else
12151   echo "$ac_t""no" 1>&6
12152 fi
12153 done
12154
12155 if test $ac_cv_header_db_h = yes; then
12156         ol_cv_lib_db=no
12157 if test $ol_cv_lib_db = no ; then
12158         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12159 echo "configure:12160: checking for Berkeley DB link (default)" >&5
12160 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12161   echo $ac_n "(cached) $ac_c" 1>&6
12162 else
12163   
12164         ol_DB_LIB=
12165         ol_LIBS=$LIBS
12166         LIBS="$ol_DB_LIB $LIBS"
12167
12168         cat > conftest.$ac_ext <<EOF
12169 #line 12170 "configure"
12170 #include "confdefs.h"
12171
12172 #ifdef HAVE_DB_185_H
12173 # include <db_185.h>
12174 #else
12175 # include <db.h>
12176 #endif
12177
12178 #ifndef DB_VERSION_MAJOR
12179 # define DB_VERSION_MAJOR 1
12180 #endif
12181
12182 #ifndef NULL
12183 #define NULL ((void*)0)
12184 #endif
12185
12186 int main() {
12187
12188 #if DB_VERSION_MAJOR > 2
12189         db_env_create( NULL, 0 );
12190 #elif DB_VERSION_MAJOR > 1
12191         db_appexit( NULL );
12192 #else
12193         (void) dbopen( NULL, 0, 0, 0, NULL);
12194 #endif
12195
12196 ; return 0; }
12197 EOF
12198 if { (eval echo configure:12199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12199   rm -rf conftest*
12200   ol_cv_db_none=yes
12201 else
12202   echo "configure: failed program was:" >&5
12203   cat conftest.$ac_ext >&5
12204   rm -rf conftest*
12205   ol_cv_db_none=no
12206 fi
12207 rm -f conftest*
12208
12209         LIBS="$ol_LIBS"
12210
12211 fi
12212
12213 echo "$ac_t""$ol_cv_db_none" 1>&6
12214
12215         if test $ol_cv_db_none = yes ; then
12216                 ol_cv_lib_db=yes
12217         fi
12218 fi
12219
12220 if test $ol_cv_lib_db = no ; then
12221         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12222 echo "configure:12223: checking for Berkeley DB link (-ldb)" >&5
12223 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12224   echo $ac_n "(cached) $ac_c" 1>&6
12225 else
12226   
12227         ol_DB_LIB=-ldb
12228         ol_LIBS=$LIBS
12229         LIBS="$ol_DB_LIB $LIBS"
12230
12231         cat > conftest.$ac_ext <<EOF
12232 #line 12233 "configure"
12233 #include "confdefs.h"
12234
12235 #ifdef HAVE_DB_185_H
12236 # include <db_185.h>
12237 #else
12238 # include <db.h>
12239 #endif
12240
12241 #ifndef DB_VERSION_MAJOR
12242 # define DB_VERSION_MAJOR 1
12243 #endif
12244
12245 #ifndef NULL
12246 #define NULL ((void*)0)
12247 #endif
12248
12249 int main() {
12250
12251 #if DB_VERSION_MAJOR > 2
12252         db_env_create( NULL, 0 );
12253 #elif DB_VERSION_MAJOR > 1
12254         db_appexit( NULL );
12255 #else
12256         (void) dbopen( NULL, 0, 0, 0, NULL);
12257 #endif
12258
12259 ; return 0; }
12260 EOF
12261 if { (eval echo configure:12262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12262   rm -rf conftest*
12263   ol_cv_db_db=yes
12264 else
12265   echo "configure: failed program was:" >&5
12266   cat conftest.$ac_ext >&5
12267   rm -rf conftest*
12268   ol_cv_db_db=no
12269 fi
12270 rm -f conftest*
12271
12272         LIBS="$ol_LIBS"
12273
12274 fi
12275
12276 echo "$ac_t""$ol_cv_db_db" 1>&6
12277
12278         if test $ol_cv_db_db = yes ; then
12279                 ol_cv_lib_db=-ldb
12280         fi
12281 fi
12282
12283 if test $ol_cv_lib_db = no ; then
12284         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12285 echo "configure:12286: checking for Berkeley DB link (-ldb3)" >&5
12286 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12287   echo $ac_n "(cached) $ac_c" 1>&6
12288 else
12289   
12290         ol_DB_LIB=-ldb3
12291         ol_LIBS=$LIBS
12292         LIBS="$ol_DB_LIB $LIBS"
12293
12294         cat > conftest.$ac_ext <<EOF
12295 #line 12296 "configure"
12296 #include "confdefs.h"
12297
12298 #ifdef HAVE_DB_185_H
12299 # include <db_185.h>
12300 #else
12301 # include <db.h>
12302 #endif
12303
12304 #ifndef DB_VERSION_MAJOR
12305 # define DB_VERSION_MAJOR 1
12306 #endif
12307
12308 #ifndef NULL
12309 #define NULL ((void*)0)
12310 #endif
12311
12312 int main() {
12313
12314 #if DB_VERSION_MAJOR > 2
12315         db_env_create( NULL, 0 );
12316 #elif DB_VERSION_MAJOR > 1
12317         db_appexit( NULL );
12318 #else
12319         (void) dbopen( NULL, 0, 0, 0, NULL);
12320 #endif
12321
12322 ; return 0; }
12323 EOF
12324 if { (eval echo configure:12325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12325   rm -rf conftest*
12326   ol_cv_db_db3=yes
12327 else
12328   echo "configure: failed program was:" >&5
12329   cat conftest.$ac_ext >&5
12330   rm -rf conftest*
12331   ol_cv_db_db3=no
12332 fi
12333 rm -f conftest*
12334
12335         LIBS="$ol_LIBS"
12336
12337 fi
12338
12339 echo "$ac_t""$ol_cv_db_db3" 1>&6
12340
12341         if test $ol_cv_db_db3 = yes ; then
12342                 ol_cv_lib_db=-ldb3
12343         fi
12344 fi
12345
12346 if test $ol_cv_lib_db = no ; then
12347         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12348 echo "configure:12349: checking for Berkeley DB link (-ldb2)" >&5
12349 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12350   echo $ac_n "(cached) $ac_c" 1>&6
12351 else
12352   
12353         ol_DB_LIB=-ldb2
12354         ol_LIBS=$LIBS
12355         LIBS="$ol_DB_LIB $LIBS"
12356
12357         cat > conftest.$ac_ext <<EOF
12358 #line 12359 "configure"
12359 #include "confdefs.h"
12360
12361 #ifdef HAVE_DB_185_H
12362 # include <db_185.h>
12363 #else
12364 # include <db.h>
12365 #endif
12366
12367 #ifndef DB_VERSION_MAJOR
12368 # define DB_VERSION_MAJOR 1
12369 #endif
12370
12371 #ifndef NULL
12372 #define NULL ((void*)0)
12373 #endif
12374
12375 int main() {
12376
12377 #if DB_VERSION_MAJOR > 2
12378         db_env_create( NULL, 0 );
12379 #elif DB_VERSION_MAJOR > 1
12380         db_appexit( NULL );
12381 #else
12382         (void) dbopen( NULL, 0, 0, 0, NULL);
12383 #endif
12384
12385 ; return 0; }
12386 EOF
12387 if { (eval echo configure:12388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12388   rm -rf conftest*
12389   ol_cv_db_db2=yes
12390 else
12391   echo "configure: failed program was:" >&5
12392   cat conftest.$ac_ext >&5
12393   rm -rf conftest*
12394   ol_cv_db_db2=no
12395 fi
12396 rm -f conftest*
12397
12398         LIBS="$ol_LIBS"
12399
12400 fi
12401
12402 echo "$ac_t""$ol_cv_db_db2" 1>&6
12403
12404         if test $ol_cv_db_db2 = yes ; then
12405                 ol_cv_lib_db=-ldb2
12406         fi
12407 fi
12408
12409 if test $ol_cv_lib_db = no ; then
12410         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12411 echo "configure:12412: checking for Berkeley DB link (-ldb1)" >&5
12412 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12413   echo $ac_n "(cached) $ac_c" 1>&6
12414 else
12415   
12416         ol_DB_LIB=-ldb1
12417         ol_LIBS=$LIBS
12418         LIBS="$ol_DB_LIB $LIBS"
12419
12420         cat > conftest.$ac_ext <<EOF
12421 #line 12422 "configure"
12422 #include "confdefs.h"
12423
12424 #ifdef HAVE_DB_185_H
12425 # include <db_185.h>
12426 #else
12427 # include <db.h>
12428 #endif
12429
12430 #ifndef DB_VERSION_MAJOR
12431 # define DB_VERSION_MAJOR 1
12432 #endif
12433
12434 #ifndef NULL
12435 #define NULL ((void*)0)
12436 #endif
12437
12438 int main() {
12439
12440 #if DB_VERSION_MAJOR > 2
12441         db_env_create( NULL, 0 );
12442 #elif DB_VERSION_MAJOR > 1
12443         db_appexit( NULL );
12444 #else
12445         (void) dbopen( NULL, 0, 0, 0, NULL);
12446 #endif
12447
12448 ; return 0; }
12449 EOF
12450 if { (eval echo configure:12451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12451   rm -rf conftest*
12452   ol_cv_db_db1=yes
12453 else
12454   echo "configure: failed program was:" >&5
12455   cat conftest.$ac_ext >&5
12456   rm -rf conftest*
12457   ol_cv_db_db1=no
12458 fi
12459 rm -f conftest*
12460
12461         LIBS="$ol_LIBS"
12462
12463 fi
12464
12465 echo "$ac_t""$ol_cv_db_db1" 1>&6
12466
12467         if test $ol_cv_db_db1 = yes ; then
12468                 ol_cv_lib_db=-ldb1
12469         fi
12470 fi
12471
12472
12473         if test "$ol_cv_lib_db" != no ; then
12474                 ol_cv_berkeley_db=yes
12475                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12476 echo "configure:12477: checking for Berkeley DB thread support" >&5
12477 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12478   echo $ac_n "(cached) $ac_c" 1>&6
12479 else
12480   
12481         ol_LIBS="$LIBS"
12482         if test $ol_cv_lib_db != yes ; then
12483                 LIBS="$ol_cv_lib_db"
12484         fi
12485
12486         if test "$cross_compiling" = yes; then
12487   ol_cv_berkeley_db_thread=cross
12488 else
12489   cat > conftest.$ac_ext <<EOF
12490 #line 12491 "configure"
12491 #include "confdefs.h"
12492
12493 #ifdef HAVE_DB_185_H
12494         choke me;
12495 #else
12496 #include <db.h>
12497 #endif
12498 #ifndef NULL
12499 #define NULL ((void *)0)
12500 #endif
12501 main()
12502 {
12503         int rc;
12504         u_int32_t flags = DB_CREATE | DB_THREAD;
12505
12506
12507 #if DB_VERSION_MAJOR > 2
12508         DB_ENV *env = NULL;
12509
12510         rc = db_env_create( &env, 0 );
12511
12512         if( rc == 0 ) {
12513                 rc = env->open( env, NULL, NULL, flags, 0 );
12514         }
12515
12516 #else
12517         DB_ENV env;
12518         memset( &env, '\0', sizeof(env) );
12519
12520         rc = db_appinit( NULL, NULL, &env, flags );
12521
12522         if( rc == 0 ) {
12523                 db_appexit( &env );
12524         }
12525 #endif
12526
12527         return rc;
12528 }
12529 EOF
12530 if { (eval echo configure:12531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12531 then
12532   ol_cv_berkeley_db_thread=yes
12533 else
12534   echo "configure: failed program was:" >&5
12535   cat conftest.$ac_ext >&5
12536   rm -fr conftest*
12537   ol_cv_berkeley_db_thread=no
12538 fi
12539 rm -fr conftest*
12540 fi
12541
12542
12543         LIBS="$ol_LIBS"
12544
12545         if test $ol_cv_berkeley_db_thread != no ; then
12546                 cat >> confdefs.h <<\EOF
12547 #define HAVE_BERKELEY_DB_THREAD 1
12548 EOF
12549
12550         fi
12551
12552 fi
12553
12554 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12555         fi
12556 fi
12557
12558         fi
12559
12560         if test $ol_cv_berkeley_db != no ; then
12561                 cat >> confdefs.h <<\EOF
12562 #define HAVE_BERKELEY_DB 1
12563 EOF
12564
12565
12566                 ol_link_ldbm=berkeley
12567                 ol_with_ldbm_api=db
12568
12569                 if test $ol_with_ldbm_type = hash ; then
12570                         cat >> confdefs.h <<\EOF
12571 #define LDBM_USE_DBHASH 1
12572 EOF
12573
12574                 else
12575                         cat >> confdefs.h <<\EOF
12576 #define LDBM_USE_DBBTREE 1
12577 EOF
12578
12579                 fi
12580
12581                                                 if test $ol_cv_lib_db != yes ; then
12582                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12583                 fi
12584         fi
12585 fi
12586
12587 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12588         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12589         ol_with_ldbm_api=none
12590 fi
12591
12592 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12593         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12594 echo "configure:12595: checking for MDBM library" >&5
12595 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12596   echo $ac_n "(cached) $ac_c" 1>&6
12597 else
12598         ol_LIBS="$LIBS"
12599         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12600 echo "configure:12601: checking for mdbm_set_chain" >&5
12601 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12602   echo $ac_n "(cached) $ac_c" 1>&6
12603 else
12604   cat > conftest.$ac_ext <<EOF
12605 #line 12606 "configure"
12606 #include "confdefs.h"
12607 /* System header to define __stub macros and hopefully few prototypes,
12608     which can conflict with char mdbm_set_chain(); below.  */
12609 #include <assert.h>
12610 /* Override any gcc2 internal prototype to avoid an error.  */
12611 /* We use char because int might match the return type of a gcc2
12612     builtin and then its argument prototype would still apply.  */
12613 char mdbm_set_chain();
12614 char (*f)();
12615
12616 int main() {
12617
12618 /* The GNU C library defines this for functions which it implements
12619     to always fail with ENOSYS.  Some functions are actually named
12620     something starting with __ and the normal name is an alias.  */
12621 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12622 choke me
12623 #else
12624 f = mdbm_set_chain;
12625 #endif
12626
12627 ; return 0; }
12628 EOF
12629 if { (eval echo configure:12630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12630   rm -rf conftest*
12631   eval "ac_cv_func_mdbm_set_chain=yes"
12632 else
12633   echo "configure: failed program was:" >&5
12634   cat conftest.$ac_ext >&5
12635   rm -rf conftest*
12636   eval "ac_cv_func_mdbm_set_chain=no"
12637 fi
12638 rm -f conftest*
12639 fi
12640
12641 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12642   echo "$ac_t""yes" 1>&6
12643   ol_cv_lib_mdbm=yes
12644 else
12645   echo "$ac_t""no" 1>&6
12646
12647                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12648 echo "configure:12649: checking for mdbm_set_chain in -lmdbm" >&5
12649 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12650 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12651   echo $ac_n "(cached) $ac_c" 1>&6
12652 else
12653   ac_save_LIBS="$LIBS"
12654 LIBS="-lmdbm  $LIBS"
12655 cat > conftest.$ac_ext <<EOF
12656 #line 12657 "configure"
12657 #include "confdefs.h"
12658 /* Override any gcc2 internal prototype to avoid an error.  */
12659 /* We use char because int might match the return type of a gcc2
12660     builtin and then its argument prototype would still apply.  */
12661 char mdbm_set_chain();
12662
12663 int main() {
12664 mdbm_set_chain()
12665 ; return 0; }
12666 EOF
12667 if { (eval echo configure:12668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12668   rm -rf conftest*
12669   eval "ac_cv_lib_$ac_lib_var=yes"
12670 else
12671   echo "configure: failed program was:" >&5
12672   cat conftest.$ac_ext >&5
12673   rm -rf conftest*
12674   eval "ac_cv_lib_$ac_lib_var=no"
12675 fi
12676 rm -f conftest*
12677 LIBS="$ac_save_LIBS"
12678
12679 fi
12680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12681   echo "$ac_t""yes" 1>&6
12682   ol_cv_lib_mdbm=-lmdbm
12683 else
12684   echo "$ac_t""no" 1>&6
12685 ol_cv_lib_mdbm=no
12686 fi
12687
12688         
12689 fi
12690
12691         LIBS="$ol_LIBS"
12692
12693 fi
12694
12695 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12696
12697
12698  for ac_hdr in mdbm.h
12699 do
12700 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12701 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12702 echo "configure:12703: checking for $ac_hdr" >&5
12703 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12704   echo $ac_n "(cached) $ac_c" 1>&6
12705 else
12706   cat > conftest.$ac_ext <<EOF
12707 #line 12708 "configure"
12708 #include "confdefs.h"
12709 #include <$ac_hdr>
12710 EOF
12711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12712 { (eval echo configure:12713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12714 if test -z "$ac_err"; then
12715   rm -rf conftest*
12716   eval "ac_cv_header_$ac_safe=yes"
12717 else
12718   echo "$ac_err" >&5
12719   echo "configure: failed program was:" >&5
12720   cat conftest.$ac_ext >&5
12721   rm -rf conftest*
12722   eval "ac_cv_header_$ac_safe=no"
12723 fi
12724 rm -f conftest*
12725 fi
12726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12727   echo "$ac_t""yes" 1>&6
12728     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12729   cat >> confdefs.h <<EOF
12730 #define $ac_tr_hdr 1
12731 EOF
12732  
12733 else
12734   echo "$ac_t""no" 1>&6
12735 fi
12736 done
12737
12738  echo $ac_n "checking for db""... $ac_c" 1>&6
12739 echo "configure:12740: checking for db" >&5
12740 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12741   echo $ac_n "(cached) $ac_c" 1>&6
12742 else
12743   
12744         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12745                 ol_cv_mdbm=no
12746         else
12747                 ol_cv_mdbm=yes
12748         fi
12749
12750 fi
12751
12752 echo "$ac_t""$ol_cv_mdbm" 1>&6
12753  if test $ol_cv_mdbm = yes ; then
12754         cat >> confdefs.h <<\EOF
12755 #define HAVE_MDBM 1
12756 EOF
12757
12758  fi
12759
12760
12761         if test $ol_cv_mdbm = yes ; then
12762                 ol_link_ldbm=mdbm
12763                 ol_with_ldbm_api=mdbm
12764                 if test $ol_cv_lib_mdbm != yes ; then
12765                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12766                 fi
12767         fi
12768 fi
12769
12770 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12771         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12772 echo "configure:12773: checking for GDBM library" >&5
12773 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12774   echo $ac_n "(cached) $ac_c" 1>&6
12775 else
12776         ol_LIBS="$LIBS"
12777         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12778 echo "configure:12779: checking for gdbm_open" >&5
12779 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12780   echo $ac_n "(cached) $ac_c" 1>&6
12781 else
12782   cat > conftest.$ac_ext <<EOF
12783 #line 12784 "configure"
12784 #include "confdefs.h"
12785 /* System header to define __stub macros and hopefully few prototypes,
12786     which can conflict with char gdbm_open(); below.  */
12787 #include <assert.h>
12788 /* Override any gcc2 internal prototype to avoid an error.  */
12789 /* We use char because int might match the return type of a gcc2
12790     builtin and then its argument prototype would still apply.  */
12791 char gdbm_open();
12792 char (*f)();
12793
12794 int main() {
12795
12796 /* The GNU C library defines this for functions which it implements
12797     to always fail with ENOSYS.  Some functions are actually named
12798     something starting with __ and the normal name is an alias.  */
12799 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12800 choke me
12801 #else
12802 f = gdbm_open;
12803 #endif
12804
12805 ; return 0; }
12806 EOF
12807 if { (eval echo configure:12808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12808   rm -rf conftest*
12809   eval "ac_cv_func_gdbm_open=yes"
12810 else
12811   echo "configure: failed program was:" >&5
12812   cat conftest.$ac_ext >&5
12813   rm -rf conftest*
12814   eval "ac_cv_func_gdbm_open=no"
12815 fi
12816 rm -f conftest*
12817 fi
12818
12819 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12820   echo "$ac_t""yes" 1>&6
12821   ol_cv_lib_gdbm=yes
12822 else
12823   echo "$ac_t""no" 1>&6
12824
12825                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12826 echo "configure:12827: checking for gdbm_open in -lgdbm" >&5
12827 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12828 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12829   echo $ac_n "(cached) $ac_c" 1>&6
12830 else
12831   ac_save_LIBS="$LIBS"
12832 LIBS="-lgdbm  $LIBS"
12833 cat > conftest.$ac_ext <<EOF
12834 #line 12835 "configure"
12835 #include "confdefs.h"
12836 /* Override any gcc2 internal prototype to avoid an error.  */
12837 /* We use char because int might match the return type of a gcc2
12838     builtin and then its argument prototype would still apply.  */
12839 char gdbm_open();
12840
12841 int main() {
12842 gdbm_open()
12843 ; return 0; }
12844 EOF
12845 if { (eval echo configure:12846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12846   rm -rf conftest*
12847   eval "ac_cv_lib_$ac_lib_var=yes"
12848 else
12849   echo "configure: failed program was:" >&5
12850   cat conftest.$ac_ext >&5
12851   rm -rf conftest*
12852   eval "ac_cv_lib_$ac_lib_var=no"
12853 fi
12854 rm -f conftest*
12855 LIBS="$ac_save_LIBS"
12856
12857 fi
12858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12859   echo "$ac_t""yes" 1>&6
12860   ol_cv_lib_gdbm=-lgdbm
12861 else
12862   echo "$ac_t""no" 1>&6
12863 ol_cv_lib_gdbm=no
12864 fi
12865
12866         
12867 fi
12868
12869         LIBS="$ol_LIBS"
12870
12871 fi
12872
12873 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12874
12875
12876  for ac_hdr in gdbm.h
12877 do
12878 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12879 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12880 echo "configure:12881: checking for $ac_hdr" >&5
12881 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12882   echo $ac_n "(cached) $ac_c" 1>&6
12883 else
12884   cat > conftest.$ac_ext <<EOF
12885 #line 12886 "configure"
12886 #include "confdefs.h"
12887 #include <$ac_hdr>
12888 EOF
12889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12890 { (eval echo configure:12891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12892 if test -z "$ac_err"; then
12893   rm -rf conftest*
12894   eval "ac_cv_header_$ac_safe=yes"
12895 else
12896   echo "$ac_err" >&5
12897   echo "configure: failed program was:" >&5
12898   cat conftest.$ac_ext >&5
12899   rm -rf conftest*
12900   eval "ac_cv_header_$ac_safe=no"
12901 fi
12902 rm -f conftest*
12903 fi
12904 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12905   echo "$ac_t""yes" 1>&6
12906     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12907   cat >> confdefs.h <<EOF
12908 #define $ac_tr_hdr 1
12909 EOF
12910  
12911 else
12912   echo "$ac_t""no" 1>&6
12913 fi
12914 done
12915
12916  echo $ac_n "checking for db""... $ac_c" 1>&6
12917 echo "configure:12918: checking for db" >&5
12918 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12919   echo $ac_n "(cached) $ac_c" 1>&6
12920 else
12921   
12922         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12923                 ol_cv_gdbm=no
12924         else
12925                 ol_cv_gdbm=yes
12926         fi
12927
12928 fi
12929
12930 echo "$ac_t""$ol_cv_gdbm" 1>&6
12931  if test $ol_cv_gdbm = yes ; then
12932         cat >> confdefs.h <<\EOF
12933 #define HAVE_GDBM 1
12934 EOF
12935
12936  fi
12937
12938
12939         if test $ol_cv_gdbm = yes ; then
12940                 ol_link_ldbm=gdbm
12941                 ol_with_ldbm_api=gdbm
12942
12943                 if test $ol_cv_lib_gdbm != yes ; then
12944                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12945                 fi
12946         fi
12947 fi
12948
12949 if test $ol_with_ldbm_api = ndbm ; then
12950         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12951 echo "configure:12952: checking for NDBM library" >&5
12952 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12953   echo $ac_n "(cached) $ac_c" 1>&6
12954 else
12955         ol_LIBS="$LIBS"
12956         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12957 echo "configure:12958: checking for dbm_open" >&5
12958 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12959   echo $ac_n "(cached) $ac_c" 1>&6
12960 else
12961   cat > conftest.$ac_ext <<EOF
12962 #line 12963 "configure"
12963 #include "confdefs.h"
12964 /* System header to define __stub macros and hopefully few prototypes,
12965     which can conflict with char dbm_open(); below.  */
12966 #include <assert.h>
12967 /* Override any gcc2 internal prototype to avoid an error.  */
12968 /* We use char because int might match the return type of a gcc2
12969     builtin and then its argument prototype would still apply.  */
12970 char dbm_open();
12971 char (*f)();
12972
12973 int main() {
12974
12975 /* The GNU C library defines this for functions which it implements
12976     to always fail with ENOSYS.  Some functions are actually named
12977     something starting with __ and the normal name is an alias.  */
12978 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12979 choke me
12980 #else
12981 f = dbm_open;
12982 #endif
12983
12984 ; return 0; }
12985 EOF
12986 if { (eval echo configure:12987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12987   rm -rf conftest*
12988   eval "ac_cv_func_dbm_open=yes"
12989 else
12990   echo "configure: failed program was:" >&5
12991   cat conftest.$ac_ext >&5
12992   rm -rf conftest*
12993   eval "ac_cv_func_dbm_open=no"
12994 fi
12995 rm -f conftest*
12996 fi
12997
12998 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12999   echo "$ac_t""yes" 1>&6
13000   ol_cv_lib_ndbm=yes
13001 else
13002   echo "$ac_t""no" 1>&6
13003
13004                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
13005 echo "configure:13006: checking for dbm_open in -lndbm" >&5
13006 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13008   echo $ac_n "(cached) $ac_c" 1>&6
13009 else
13010   ac_save_LIBS="$LIBS"
13011 LIBS="-lndbm  $LIBS"
13012 cat > conftest.$ac_ext <<EOF
13013 #line 13014 "configure"
13014 #include "confdefs.h"
13015 /* Override any gcc2 internal prototype to avoid an error.  */
13016 /* We use char because int might match the return type of a gcc2
13017     builtin and then its argument prototype would still apply.  */
13018 char dbm_open();
13019
13020 int main() {
13021 dbm_open()
13022 ; return 0; }
13023 EOF
13024 if { (eval echo configure:13025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13025   rm -rf conftest*
13026   eval "ac_cv_lib_$ac_lib_var=yes"
13027 else
13028   echo "configure: failed program was:" >&5
13029   cat conftest.$ac_ext >&5
13030   rm -rf conftest*
13031   eval "ac_cv_lib_$ac_lib_var=no"
13032 fi
13033 rm -f conftest*
13034 LIBS="$ac_save_LIBS"
13035
13036 fi
13037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13038   echo "$ac_t""yes" 1>&6
13039   ol_cv_lib_ndbm=-lndbm
13040 else
13041   echo "$ac_t""no" 1>&6
13042
13043                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13044 echo "configure:13045: checking for dbm_open in -ldbm" >&5
13045 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13046 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13047   echo $ac_n "(cached) $ac_c" 1>&6
13048 else
13049   ac_save_LIBS="$LIBS"
13050 LIBS="-ldbm  $LIBS"
13051 cat > conftest.$ac_ext <<EOF
13052 #line 13053 "configure"
13053 #include "confdefs.h"
13054 /* Override any gcc2 internal prototype to avoid an error.  */
13055 /* We use char because int might match the return type of a gcc2
13056     builtin and then its argument prototype would still apply.  */
13057 char dbm_open();
13058
13059 int main() {
13060 dbm_open()
13061 ; return 0; }
13062 EOF
13063 if { (eval echo configure:13064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13064   rm -rf conftest*
13065   eval "ac_cv_lib_$ac_lib_var=yes"
13066 else
13067   echo "configure: failed program was:" >&5
13068   cat conftest.$ac_ext >&5
13069   rm -rf conftest*
13070   eval "ac_cv_lib_$ac_lib_var=no"
13071 fi
13072 rm -f conftest*
13073 LIBS="$ac_save_LIBS"
13074
13075 fi
13076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13077   echo "$ac_t""yes" 1>&6
13078   ol_cv_lib_ndbm=-ldbm
13079 else
13080   echo "$ac_t""no" 1>&6
13081 ol_cv_lib_ndbm=no
13082 fi
13083                 
13084 fi
13085
13086         
13087 fi
13088
13089         LIBS="$ol_LIBS"
13090
13091 fi
13092
13093 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
13094
13095
13096  for ac_hdr in ndbm.h
13097 do
13098 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13099 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13100 echo "configure:13101: checking for $ac_hdr" >&5
13101 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13102   echo $ac_n "(cached) $ac_c" 1>&6
13103 else
13104   cat > conftest.$ac_ext <<EOF
13105 #line 13106 "configure"
13106 #include "confdefs.h"
13107 #include <$ac_hdr>
13108 EOF
13109 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13110 { (eval echo configure:13111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13111 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13112 if test -z "$ac_err"; then
13113   rm -rf conftest*
13114   eval "ac_cv_header_$ac_safe=yes"
13115 else
13116   echo "$ac_err" >&5
13117   echo "configure: failed program was:" >&5
13118   cat conftest.$ac_ext >&5
13119   rm -rf conftest*
13120   eval "ac_cv_header_$ac_safe=no"
13121 fi
13122 rm -f conftest*
13123 fi
13124 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13125   echo "$ac_t""yes" 1>&6
13126     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13127   cat >> confdefs.h <<EOF
13128 #define $ac_tr_hdr 1
13129 EOF
13130  
13131 else
13132   echo "$ac_t""no" 1>&6
13133 fi
13134 done
13135
13136  echo $ac_n "checking for db""... $ac_c" 1>&6
13137 echo "configure:13138: checking for db" >&5
13138 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13139   echo $ac_n "(cached) $ac_c" 1>&6
13140 else
13141   
13142         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13143                 ol_cv_ndbm=no
13144         else
13145                 ol_cv_ndbm=yes
13146         fi
13147
13148 fi
13149
13150 echo "$ac_t""$ol_cv_ndbm" 1>&6
13151  if test $ol_cv_ndbm = yes ; then
13152         cat >> confdefs.h <<\EOF
13153 #define HAVE_NDBM 1
13154 EOF
13155
13156  fi
13157
13158
13159         if test $ol_cv_ndbm = yes ; then
13160                 ol_link_ldbm=ndbm
13161                 ol_with_ldbm_api=ndbm
13162
13163                 if test $ol_cv_lib_ndbm != yes ; then
13164                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13165                 fi
13166         fi
13167 fi
13168
13169 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13170         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13171         if test $ol_enable_ldbm = yes ; then
13172                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13173         fi
13174
13175         echo "configure: warning: disabling LDBM" 1>&2
13176         ol_enable_ldbm=no
13177 fi
13178
13179 ol_link_bdb2=no
13180 if test $ol_enable_bdb2 != no ; then
13181         if test $ol_enable_bdb2 = yes -a $ol_link_ldbm != berkeley ; then
13182                 { echo "configure: error: BDB2 requires LDBM BerkeleyDB 2" 1>&2; exit 1; }
13183         elif test $ol_link_ldbm = berkeley ; then
13184                 ol_link_bdb2=$ol_link_ldbm
13185         fi
13186 fi
13187
13188 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13189         LINK_BINS_DYNAMIC="yes"
13190 else
13191         LINK_BINS_DYNAMIC="no"
13192 fi
13193
13194 if test $ol_enable_wrappers != no ; then
13195         for ac_hdr in tcpd.h
13196 do
13197 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13198 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13199 echo "configure:13200: checking for $ac_hdr" >&5
13200 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13201   echo $ac_n "(cached) $ac_c" 1>&6
13202 else
13203   cat > conftest.$ac_ext <<EOF
13204 #line 13205 "configure"
13205 #include "confdefs.h"
13206 #include <$ac_hdr>
13207 EOF
13208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13209 { (eval echo configure:13210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13211 if test -z "$ac_err"; then
13212   rm -rf conftest*
13213   eval "ac_cv_header_$ac_safe=yes"
13214 else
13215   echo "$ac_err" >&5
13216   echo "configure: failed program was:" >&5
13217   cat conftest.$ac_ext >&5
13218   rm -rf conftest*
13219   eval "ac_cv_header_$ac_safe=no"
13220 fi
13221 rm -f conftest*
13222 fi
13223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13224   echo "$ac_t""yes" 1>&6
13225     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13226   cat >> confdefs.h <<EOF
13227 #define $ac_tr_hdr 1
13228 EOF
13229  
13230 else
13231   echo "$ac_t""no" 1>&6
13232 fi
13233 done
13234
13235
13236         if test $ac_cv_header_tcpd_h != yes ; then
13237                 have_wrappers=no
13238         else
13239                 cat > conftest.$ac_ext <<EOF
13240 #line 13241 "configure"
13241 #include "confdefs.h"
13242
13243 int allow_severity = 0;
13244 int deny_severity  = 0;
13245                 
13246 int main() {
13247 hosts_access()
13248 ; return 0; }
13249 EOF
13250 if { (eval echo configure:13251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13251   rm -rf conftest*
13252   have_wrappers=yes
13253 else
13254   echo "configure: failed program was:" >&5
13255   cat conftest.$ac_ext >&5
13256   rm -rf conftest*
13257   have_wrappers=no
13258 fi
13259 rm -f conftest*
13260         fi
13261
13262         if test $have_wrappers = yes ; then
13263                 cat >> confdefs.h <<\EOF
13264 #define HAVE_TCPD 1
13265 EOF
13266
13267                 WRAP_LIBS="-lwrap"
13268
13269                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13270 echo "configure:13271: checking for main in -lnsl" >&5
13271 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13272 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13273   echo $ac_n "(cached) $ac_c" 1>&6
13274 else
13275   ac_save_LIBS="$LIBS"
13276 LIBS="-lnsl  $LIBS"
13277 cat > conftest.$ac_ext <<EOF
13278 #line 13279 "configure"
13279 #include "confdefs.h"
13280
13281 int main() {
13282 main()
13283 ; return 0; }
13284 EOF
13285 if { (eval echo configure:13286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13286   rm -rf conftest*
13287   eval "ac_cv_lib_$ac_lib_var=yes"
13288 else
13289   echo "configure: failed program was:" >&5
13290   cat conftest.$ac_ext >&5
13291   rm -rf conftest*
13292   eval "ac_cv_lib_$ac_lib_var=no"
13293 fi
13294 rm -f conftest*
13295 LIBS="$ac_save_LIBS"
13296
13297 fi
13298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13299   echo "$ac_t""yes" 1>&6
13300     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13301     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13302   cat >> confdefs.h <<EOF
13303 #define $ac_tr_lib 1
13304 EOF
13305
13306   LIBS="-lnsl $LIBS"
13307
13308 else
13309   echo "$ac_t""no" 1>&6
13310 fi
13311
13312         else
13313                 echo "configure: warning: could not find -lwrap" 1>&2
13314                 if test $ol_enable_wrappers = yes ; then
13315                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13316                 fi
13317
13318                 echo "configure: warning: disabling wrappers support" 1>&2
13319                 ol_enable_wrappers=no
13320                 WRAP_LIBS=""
13321         fi
13322 fi
13323
13324 if test $ol_enable_syslog != no ; then
13325         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13326 echo "configure:13327: checking for openlog" >&5
13327 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13328   echo $ac_n "(cached) $ac_c" 1>&6
13329 else
13330   cat > conftest.$ac_ext <<EOF
13331 #line 13332 "configure"
13332 #include "confdefs.h"
13333 /* System header to define __stub macros and hopefully few prototypes,
13334     which can conflict with char openlog(); below.  */
13335 #include <assert.h>
13336 /* Override any gcc2 internal prototype to avoid an error.  */
13337 /* We use char because int might match the return type of a gcc2
13338     builtin and then its argument prototype would still apply.  */
13339 char openlog();
13340 char (*f)();
13341
13342 int main() {
13343
13344 /* The GNU C library defines this for functions which it implements
13345     to always fail with ENOSYS.  Some functions are actually named
13346     something starting with __ and the normal name is an alias.  */
13347 #if defined (__stub_openlog) || defined (__stub___openlog)
13348 choke me
13349 #else
13350 f = openlog;
13351 #endif
13352
13353 ; return 0; }
13354 EOF
13355 if { (eval echo configure:13356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13356   rm -rf conftest*
13357   eval "ac_cv_func_openlog=yes"
13358 else
13359   echo "configure: failed program was:" >&5
13360   cat conftest.$ac_ext >&5
13361   rm -rf conftest*
13362   eval "ac_cv_func_openlog=no"
13363 fi
13364 rm -f conftest*
13365 fi
13366
13367 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13368   echo "$ac_t""yes" 1>&6
13369   :
13370 else
13371   echo "$ac_t""no" 1>&6
13372 fi
13373
13374         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13375                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13376         fi
13377         ol_enable_syslog=$ac_cv_func_openlog
13378 fi
13379
13380 if test $ol_enable_tcl != no ; then
13381         for ac_hdr in tcl.h
13382 do
13383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13385 echo "configure:13386: checking for $ac_hdr" >&5
13386 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13387   echo $ac_n "(cached) $ac_c" 1>&6
13388 else
13389   cat > conftest.$ac_ext <<EOF
13390 #line 13391 "configure"
13391 #include "confdefs.h"
13392 #include <$ac_hdr>
13393 EOF
13394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13395 { (eval echo configure:13396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13397 if test -z "$ac_err"; then
13398   rm -rf conftest*
13399   eval "ac_cv_header_$ac_safe=yes"
13400 else
13401   echo "$ac_err" >&5
13402   echo "configure: failed program was:" >&5
13403   cat conftest.$ac_ext >&5
13404   rm -rf conftest*
13405   eval "ac_cv_header_$ac_safe=no"
13406 fi
13407 rm -f conftest*
13408 fi
13409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13410   echo "$ac_t""yes" 1>&6
13411     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13412   cat >> confdefs.h <<EOF
13413 #define $ac_tr_hdr 1
13414 EOF
13415  
13416 else
13417   echo "$ac_t""no" 1>&6
13418 fi
13419 done
13420
13421
13422         if test $ac_cv_header_tcl_h != yes ; then
13423                 have_tcl=no
13424         else
13425                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13426                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13427 echo "configure:13428: checking for main in -l$lib" >&5
13428 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13429 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13430   echo $ac_n "(cached) $ac_c" 1>&6
13431 else
13432   ac_save_LIBS="$LIBS"
13433 LIBS="-l$lib  $LIBS"
13434 cat > conftest.$ac_ext <<EOF
13435 #line 13436 "configure"
13436 #include "confdefs.h"
13437
13438 int main() {
13439 main()
13440 ; return 0; }
13441 EOF
13442 if { (eval echo configure:13443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13443   rm -rf conftest*
13444   eval "ac_cv_lib_$ac_lib_var=yes"
13445 else
13446   echo "configure: failed program was:" >&5
13447   cat conftest.$ac_ext >&5
13448   rm -rf conftest*
13449   eval "ac_cv_lib_$ac_lib_var=no"
13450 fi
13451 rm -f conftest*
13452 LIBS="$ac_save_LIBS"
13453
13454 fi
13455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13456   echo "$ac_t""yes" 1>&6
13457   have_tcl=yes
13458                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13459                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13460                            else
13461                                MOD_TCL_LIB="-l${lib}"
13462                            fi;break
13463 else
13464   echo "$ac_t""no" 1>&6
13465 have_tcl=no
13466 fi
13467
13468                 done
13469         fi
13470
13471         if test $have_tcl != yes ; then
13472                 echo "configure: warning: could not find -ltcl" 1>&2
13473                 if test $ol_enable_tcl = yes ; then
13474                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13475                 fi
13476
13477                 ol_enable_tcl=no
13478         fi
13479 fi
13480
13481 ol_link_termcap=no
13482 for ac_hdr in termcap.h ncurses.h
13483 do
13484 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13485 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13486 echo "configure:13487: checking for $ac_hdr" >&5
13487 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13488   echo $ac_n "(cached) $ac_c" 1>&6
13489 else
13490   cat > conftest.$ac_ext <<EOF
13491 #line 13492 "configure"
13492 #include "confdefs.h"
13493 #include <$ac_hdr>
13494 EOF
13495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13496 { (eval echo configure:13497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13498 if test -z "$ac_err"; then
13499   rm -rf conftest*
13500   eval "ac_cv_header_$ac_safe=yes"
13501 else
13502   echo "$ac_err" >&5
13503   echo "configure: failed program was:" >&5
13504   cat conftest.$ac_ext >&5
13505   rm -rf conftest*
13506   eval "ac_cv_header_$ac_safe=no"
13507 fi
13508 rm -f conftest*
13509 fi
13510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13511   echo "$ac_t""yes" 1>&6
13512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13513   cat >> confdefs.h <<EOF
13514 #define $ac_tr_hdr 1
13515 EOF
13516  
13517 else
13518   echo "$ac_t""no" 1>&6
13519 fi
13520 done
13521
13522
13523 if test $ol_link_termcap = no ; then
13524         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13525 echo "configure:13526: checking for tputs in -ltermcap" >&5
13526 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13527 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13528   echo $ac_n "(cached) $ac_c" 1>&6
13529 else
13530   ac_save_LIBS="$LIBS"
13531 LIBS="-ltermcap  $LIBS"
13532 cat > conftest.$ac_ext <<EOF
13533 #line 13534 "configure"
13534 #include "confdefs.h"
13535 /* Override any gcc2 internal prototype to avoid an error.  */
13536 /* We use char because int might match the return type of a gcc2
13537     builtin and then its argument prototype would still apply.  */
13538 char tputs();
13539
13540 int main() {
13541 tputs()
13542 ; return 0; }
13543 EOF
13544 if { (eval echo configure:13545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13545   rm -rf conftest*
13546   eval "ac_cv_lib_$ac_lib_var=yes"
13547 else
13548   echo "configure: failed program was:" >&5
13549   cat conftest.$ac_ext >&5
13550   rm -rf conftest*
13551   eval "ac_cv_lib_$ac_lib_var=no"
13552 fi
13553 rm -f conftest*
13554 LIBS="$ac_save_LIBS"
13555
13556 fi
13557 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13558   echo "$ac_t""yes" 1>&6
13559   have_termcap=yes
13560 else
13561   echo "$ac_t""no" 1>&6
13562 have_termcap=no
13563 fi
13564
13565         if test $have_termcap = yes ; then
13566                 cat >> confdefs.h <<\EOF
13567 #define HAVE_TERMCAP 1
13568 EOF
13569
13570                 ol_link_termcap=yes
13571                 TERMCAP_LIBS=-ltermcap
13572         fi
13573 fi
13574
13575 if test $ol_link_termcap = no ; then
13576         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13577 echo "configure:13578: checking for initscr in -lncurses" >&5
13578 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13579 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13580   echo $ac_n "(cached) $ac_c" 1>&6
13581 else
13582   ac_save_LIBS="$LIBS"
13583 LIBS="-lncurses  $LIBS"
13584 cat > conftest.$ac_ext <<EOF
13585 #line 13586 "configure"
13586 #include "confdefs.h"
13587 /* Override any gcc2 internal prototype to avoid an error.  */
13588 /* We use char because int might match the return type of a gcc2
13589     builtin and then its argument prototype would still apply.  */
13590 char initscr();
13591
13592 int main() {
13593 initscr()
13594 ; return 0; }
13595 EOF
13596 if { (eval echo configure:13597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13597   rm -rf conftest*
13598   eval "ac_cv_lib_$ac_lib_var=yes"
13599 else
13600   echo "configure: failed program was:" >&5
13601   cat conftest.$ac_ext >&5
13602   rm -rf conftest*
13603   eval "ac_cv_lib_$ac_lib_var=no"
13604 fi
13605 rm -f conftest*
13606 LIBS="$ac_save_LIBS"
13607
13608 fi
13609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13610   echo "$ac_t""yes" 1>&6
13611   have_ncurses=yes
13612 else
13613   echo "$ac_t""no" 1>&6
13614 have_ncurses=no
13615 fi
13616
13617         if test $have_ncurses = yes ; then
13618                 cat >> confdefs.h <<\EOF
13619 #define HAVE_NCURSES 1
13620 EOF
13621
13622                 ol_link_termcap=yes
13623                 TERMCAP_LIBS=-lncurses
13624         fi
13625 fi
13626
13627 if test $ol_link_termcap = no ; then
13628         cat >> confdefs.h <<\EOF
13629 #define NO_TERMCAP 1
13630 EOF
13631
13632         TERMCAP_LIBS=
13633 fi
13634
13635 ol_link_sasl=no
13636 ol_link_spasswd=no
13637 if test $ol_with_cyrus_sasl != no ; then
13638         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13639 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13640 echo "configure:13641: checking for sasl.h" >&5
13641 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13642   echo $ac_n "(cached) $ac_c" 1>&6
13643 else
13644   cat > conftest.$ac_ext <<EOF
13645 #line 13646 "configure"
13646 #include "confdefs.h"
13647 #include <sasl.h>
13648 EOF
13649 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13650 { (eval echo configure:13651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13651 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13652 if test -z "$ac_err"; then
13653   rm -rf conftest*
13654   eval "ac_cv_header_$ac_safe=yes"
13655 else
13656   echo "$ac_err" >&5
13657   echo "configure: failed program was:" >&5
13658   cat conftest.$ac_ext >&5
13659   rm -rf conftest*
13660   eval "ac_cv_header_$ac_safe=no"
13661 fi
13662 rm -f conftest*
13663 fi
13664 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13665   echo "$ac_t""yes" 1>&6
13666   :
13667 else
13668   echo "$ac_t""no" 1>&6
13669 fi
13670
13671
13672         if test $ac_cv_header_sasl_h = yes ; then
13673                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13674 echo "configure:13675: checking for sasl_client_init in -lsasl" >&5
13675 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13676 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13677   echo $ac_n "(cached) $ac_c" 1>&6
13678 else
13679   ac_save_LIBS="$LIBS"
13680 LIBS="-lsasl  $LIBS"
13681 cat > conftest.$ac_ext <<EOF
13682 #line 13683 "configure"
13683 #include "confdefs.h"
13684 /* Override any gcc2 internal prototype to avoid an error.  */
13685 /* We use char because int might match the return type of a gcc2
13686     builtin and then its argument prototype would still apply.  */
13687 char sasl_client_init();
13688
13689 int main() {
13690 sasl_client_init()
13691 ; return 0; }
13692 EOF
13693 if { (eval echo configure:13694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13694   rm -rf conftest*
13695   eval "ac_cv_lib_$ac_lib_var=yes"
13696 else
13697   echo "configure: failed program was:" >&5
13698   cat conftest.$ac_ext >&5
13699   rm -rf conftest*
13700   eval "ac_cv_lib_$ac_lib_var=no"
13701 fi
13702 rm -f conftest*
13703 LIBS="$ac_save_LIBS"
13704
13705 fi
13706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13707   echo "$ac_t""yes" 1>&6
13708   have_cyrus_sasl=yes
13709 else
13710   echo "$ac_t""no" 1>&6
13711 have_cyrus_sasl=no
13712 fi
13713
13714
13715                 if test $have_cyrus_sasl != no ; then
13716                         SASL_LIBS="-lsasl"
13717                         cat >> confdefs.h <<\EOF
13718 #define HAVE_CYRUS_SASL 1
13719 EOF
13720
13721                         ol_link_sasl=yes
13722                 fi
13723         fi
13724
13725         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13726                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13727         fi
13728 fi
13729
13730 if test $cross_compiling != yes ; then
13731         dev=no
13732         if test -r /dev/urandom ; then
13733                 dev="/dev/urandom";
13734         elif test -r /idev/urandom ; then
13735                 dev="/idev/urandom";
13736         elif test -r /dev/srandom ; then
13737                 dev="/dev/srandom";
13738         elif test -r /dev/random ; then
13739                 dev="/dev/random";
13740         elif test -r /idev/random ; then
13741                 dev="/idev/random";
13742         fi
13743
13744         if test $dev != no ; then
13745                 cat >> confdefs.h <<EOF
13746 #define URANDOM_DEVICE "$dev"
13747 EOF
13748
13749         fi
13750 fi
13751
13752 ol_link_fetch=no
13753 if test $ol_with_fetch != no ; then
13754         ol_LIBS=$LIBS
13755 LIBS="-lfetch -lcom_err $LIBS"
13756 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13757 echo "configure:13758: checking fetch(3) library" >&5
13758 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13759   echo $ac_n "(cached) $ac_c" 1>&6
13760 else
13761   
13762         cat > conftest.$ac_ext <<EOF
13763 #line 13764 "configure"
13764 #include "confdefs.h"
13765
13766 #include <sys/param.h>
13767 #include <stdio.h>
13768 #include <fetch.h>
13769 int main() {
13770 struct url *u = fetchParseURL("file:///"); 
13771 ; return 0; }
13772 EOF
13773 if { (eval echo configure:13774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13774   rm -rf conftest*
13775   ol_cv_lib_fetch=yes
13776 else
13777   echo "configure: failed program was:" >&5
13778   cat conftest.$ac_ext >&5
13779   rm -rf conftest*
13780   ol_cv_lib_fetch=no
13781 fi
13782 rm -f conftest*
13783 fi
13784
13785 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13786 LIBS=$ol_LIBS
13787 if test $ol_cv_lib_fetch != no ; then
13788         ol_link_fetch="-lfetch -lcom_err"
13789         cat >> confdefs.h <<\EOF
13790 #define HAVE_FETCH 1
13791 EOF
13792
13793 fi
13794
13795
13796         if test $ol_cv_lib_fetch != no ; then
13797                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13798                 ol_link_fetch=freebsd
13799
13800         elif test $ol_with_fetch != auto ; then
13801                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13802         fi 
13803 fi
13804
13805 ol_link_readline=no
13806 if test $ol_with_readline != no ; then
13807         for ac_hdr in readline/readline.h readline/history.h
13808 do
13809 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13810 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13811 echo "configure:13812: checking for $ac_hdr" >&5
13812 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13813   echo $ac_n "(cached) $ac_c" 1>&6
13814 else
13815   cat > conftest.$ac_ext <<EOF
13816 #line 13817 "configure"
13817 #include "confdefs.h"
13818 #include <$ac_hdr>
13819 EOF
13820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13821 { (eval echo configure:13822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13823 if test -z "$ac_err"; then
13824   rm -rf conftest*
13825   eval "ac_cv_header_$ac_safe=yes"
13826 else
13827   echo "$ac_err" >&5
13828   echo "configure: failed program was:" >&5
13829   cat conftest.$ac_ext >&5
13830   rm -rf conftest*
13831   eval "ac_cv_header_$ac_safe=no"
13832 fi
13833 rm -f conftest*
13834 fi
13835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13836   echo "$ac_t""yes" 1>&6
13837     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13838   cat >> confdefs.h <<EOF
13839 #define $ac_tr_hdr 1
13840 EOF
13841  
13842 else
13843   echo "$ac_t""no" 1>&6
13844 fi
13845 done
13846
13847
13848         if test $ac_cv_header_readline_readline_h = yes ; then
13849                 save_LIBS="$LIBS"
13850                 LIBS="$TERMCAP_LIBS $LIBS"
13851                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13852 echo "configure:13853: checking for readline in -lreadline" >&5
13853 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13854 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13855   echo $ac_n "(cached) $ac_c" 1>&6
13856 else
13857   ac_save_LIBS="$LIBS"
13858 LIBS="-lreadline  $LIBS"
13859 cat > conftest.$ac_ext <<EOF
13860 #line 13861 "configure"
13861 #include "confdefs.h"
13862 /* Override any gcc2 internal prototype to avoid an error.  */
13863 /* We use char because int might match the return type of a gcc2
13864     builtin and then its argument prototype would still apply.  */
13865 char readline();
13866
13867 int main() {
13868 readline()
13869 ; return 0; }
13870 EOF
13871 if { (eval echo configure:13872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13872   rm -rf conftest*
13873   eval "ac_cv_lib_$ac_lib_var=yes"
13874 else
13875   echo "configure: failed program was:" >&5
13876   cat conftest.$ac_ext >&5
13877   rm -rf conftest*
13878   eval "ac_cv_lib_$ac_lib_var=no"
13879 fi
13880 rm -f conftest*
13881 LIBS="$ac_save_LIBS"
13882
13883 fi
13884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13885   echo "$ac_t""yes" 1>&6
13886   have_readline=yes
13887 else
13888   echo "$ac_t""no" 1>&6
13889 have_readline=no
13890 fi
13891
13892                 LIBS="$save_LIBS"
13893                         
13894                 if test $have_readline = yes ; then
13895                         ol_with_readline=found
13896                         ol_link_readline=yes
13897
13898                         READLINE_LIBS="-lreadline"
13899                 fi
13900         fi
13901 fi
13902
13903 if test $ol_link_readline = yes ; then
13904         cat >> confdefs.h <<\EOF
13905 #define HAVE_READLINE 1
13906 EOF
13907
13908 fi
13909
13910
13911 if test $ol_enable_crypt != no ; then
13912         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13913 echo "configure:13914: checking for crypt" >&5
13914 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13915   echo $ac_n "(cached) $ac_c" 1>&6
13916 else
13917   cat > conftest.$ac_ext <<EOF
13918 #line 13919 "configure"
13919 #include "confdefs.h"
13920 /* System header to define __stub macros and hopefully few prototypes,
13921     which can conflict with char crypt(); below.  */
13922 #include <assert.h>
13923 /* Override any gcc2 internal prototype to avoid an error.  */
13924 /* We use char because int might match the return type of a gcc2
13925     builtin and then its argument prototype would still apply.  */
13926 char crypt();
13927 char (*f)();
13928
13929 int main() {
13930
13931 /* The GNU C library defines this for functions which it implements
13932     to always fail with ENOSYS.  Some functions are actually named
13933     something starting with __ and the normal name is an alias.  */
13934 #if defined (__stub_crypt) || defined (__stub___crypt)
13935 choke me
13936 #else
13937 f = crypt;
13938 #endif
13939
13940 ; return 0; }
13941 EOF
13942 if { (eval echo configure:13943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13943   rm -rf conftest*
13944   eval "ac_cv_func_crypt=yes"
13945 else
13946   echo "configure: failed program was:" >&5
13947   cat conftest.$ac_ext >&5
13948   rm -rf conftest*
13949   eval "ac_cv_func_crypt=no"
13950 fi
13951 rm -f conftest*
13952 fi
13953
13954 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13955   echo "$ac_t""yes" 1>&6
13956   have_crypt=yes
13957 else
13958   echo "$ac_t""no" 1>&6
13959
13960                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13961 echo "configure:13962: checking for crypt in -lcrypt" >&5
13962 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13963 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13964   echo $ac_n "(cached) $ac_c" 1>&6
13965 else
13966   ac_save_LIBS="$LIBS"
13967 LIBS="-lcrypt  $LIBS"
13968 cat > conftest.$ac_ext <<EOF
13969 #line 13970 "configure"
13970 #include "confdefs.h"
13971 /* Override any gcc2 internal prototype to avoid an error.  */
13972 /* We use char because int might match the return type of a gcc2
13973     builtin and then its argument prototype would still apply.  */
13974 char crypt();
13975
13976 int main() {
13977 crypt()
13978 ; return 0; }
13979 EOF
13980 if { (eval echo configure:13981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13981   rm -rf conftest*
13982   eval "ac_cv_lib_$ac_lib_var=yes"
13983 else
13984   echo "configure: failed program was:" >&5
13985   cat conftest.$ac_ext >&5
13986   rm -rf conftest*
13987   eval "ac_cv_lib_$ac_lib_var=no"
13988 fi
13989 rm -f conftest*
13990 LIBS="$ac_save_LIBS"
13991
13992 fi
13993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13994   echo "$ac_t""yes" 1>&6
13995   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13996                         have_crypt=yes
13997 else
13998   echo "$ac_t""no" 1>&6
13999 have_crypt=no
14000 fi
14001
14002 fi
14003
14004
14005         if test $have_crypt = yes ; then
14006                 cat >> confdefs.h <<\EOF
14007 #define HAVE_CRYPT 1
14008 EOF
14009
14010         else
14011                 echo "configure: warning: could not find crypt" 1>&2
14012                 if test $ol_enable_crypt = yes ; then
14013                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14014                 fi
14015
14016                 echo "configure: warning: disabling crypt support" 1>&2
14017                 ol_enable_crypt=no
14018         fi
14019 fi
14020
14021 if test $ol_enable_proctitle != no ; then
14022         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14023 echo "configure:14024: checking for setproctitle" >&5
14024 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14025   echo $ac_n "(cached) $ac_c" 1>&6
14026 else
14027   cat > conftest.$ac_ext <<EOF
14028 #line 14029 "configure"
14029 #include "confdefs.h"
14030 /* System header to define __stub macros and hopefully few prototypes,
14031     which can conflict with char setproctitle(); below.  */
14032 #include <assert.h>
14033 /* Override any gcc2 internal prototype to avoid an error.  */
14034 /* We use char because int might match the return type of a gcc2
14035     builtin and then its argument prototype would still apply.  */
14036 char setproctitle();
14037 char (*f)();
14038
14039 int main() {
14040
14041 /* The GNU C library defines this for functions which it implements
14042     to always fail with ENOSYS.  Some functions are actually named
14043     something starting with __ and the normal name is an alias.  */
14044 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14045 choke me
14046 #else
14047 f = setproctitle;
14048 #endif
14049
14050 ; return 0; }
14051 EOF
14052 if { (eval echo configure:14053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14053   rm -rf conftest*
14054   eval "ac_cv_func_setproctitle=yes"
14055 else
14056   echo "configure: failed program was:" >&5
14057   cat conftest.$ac_ext >&5
14058   rm -rf conftest*
14059   eval "ac_cv_func_setproctitle=no"
14060 fi
14061 rm -f conftest*
14062 fi
14063
14064 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14065   echo "$ac_t""yes" 1>&6
14066   have_setproctitle=yes
14067 else
14068   echo "$ac_t""no" 1>&6
14069
14070                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14071 echo "configure:14072: checking for setproctitle in -lutil" >&5
14072 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14073 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14074   echo $ac_n "(cached) $ac_c" 1>&6
14075 else
14076   ac_save_LIBS="$LIBS"
14077 LIBS="-lutil  $LIBS"
14078 cat > conftest.$ac_ext <<EOF
14079 #line 14080 "configure"
14080 #include "confdefs.h"
14081 /* Override any gcc2 internal prototype to avoid an error.  */
14082 /* We use char because int might match the return type of a gcc2
14083     builtin and then its argument prototype would still apply.  */
14084 char setproctitle();
14085
14086 int main() {
14087 setproctitle()
14088 ; return 0; }
14089 EOF
14090 if { (eval echo configure:14091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14091   rm -rf conftest*
14092   eval "ac_cv_lib_$ac_lib_var=yes"
14093 else
14094   echo "configure: failed program was:" >&5
14095   cat conftest.$ac_ext >&5
14096   rm -rf conftest*
14097   eval "ac_cv_lib_$ac_lib_var=no"
14098 fi
14099 rm -f conftest*
14100 LIBS="$ac_save_LIBS"
14101
14102 fi
14103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14104   echo "$ac_t""yes" 1>&6
14105   have_setproctitle=yes
14106                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14107 else
14108   echo "$ac_t""no" 1>&6
14109 have_setproctitle=no
14110                         LIBOBJS="$LIBOBJS setproctitle.o"
14111                         LIBSRCS="$LIBSRCS setproctitle.c"
14112 fi
14113
14114 fi
14115
14116
14117         if test $have_setproctitle = yes ; then
14118                 cat >> confdefs.h <<\EOF
14119 #define HAVE_SETPROCTITLE 1
14120 EOF
14121
14122         fi
14123 fi
14124
14125 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14126 echo "configure:14127: checking for ANSI C header files" >&5
14127 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14128   echo $ac_n "(cached) $ac_c" 1>&6
14129 else
14130   cat > conftest.$ac_ext <<EOF
14131 #line 14132 "configure"
14132 #include "confdefs.h"
14133 #include <stdlib.h>
14134 #include <stdarg.h>
14135 #include <string.h>
14136 #include <float.h>
14137 EOF
14138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14139 { (eval echo configure:14140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14141 if test -z "$ac_err"; then
14142   rm -rf conftest*
14143   ac_cv_header_stdc=yes
14144 else
14145   echo "$ac_err" >&5
14146   echo "configure: failed program was:" >&5
14147   cat conftest.$ac_ext >&5
14148   rm -rf conftest*
14149   ac_cv_header_stdc=no
14150 fi
14151 rm -f conftest*
14152
14153 if test $ac_cv_header_stdc = yes; then
14154   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14155 cat > conftest.$ac_ext <<EOF
14156 #line 14157 "configure"
14157 #include "confdefs.h"
14158 #include <string.h>
14159 EOF
14160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14161   egrep "memchr" >/dev/null 2>&1; then
14162   :
14163 else
14164   rm -rf conftest*
14165   ac_cv_header_stdc=no
14166 fi
14167 rm -f conftest*
14168
14169 fi
14170
14171 if test $ac_cv_header_stdc = yes; then
14172   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14173 cat > conftest.$ac_ext <<EOF
14174 #line 14175 "configure"
14175 #include "confdefs.h"
14176 #include <stdlib.h>
14177 EOF
14178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14179   egrep "free" >/dev/null 2>&1; then
14180   :
14181 else
14182   rm -rf conftest*
14183   ac_cv_header_stdc=no
14184 fi
14185 rm -f conftest*
14186
14187 fi
14188
14189 if test $ac_cv_header_stdc = yes; then
14190   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14191 if test "$cross_compiling" = yes; then
14192   :
14193 else
14194   cat > conftest.$ac_ext <<EOF
14195 #line 14196 "configure"
14196 #include "confdefs.h"
14197 #include <ctype.h>
14198 #if ((' ' & 0x0FF) == 0x020)
14199 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14200 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14201 #else
14202 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14203  || ('j' <= (c) && (c) <= 'r') \
14204  || ('s' <= (c) && (c) <= 'z'))
14205 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14206 #endif
14207 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14208 int main () { int i; for (i = 0; i < 256; i++)
14209 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14210 exit (0); }
14211
14212 EOF
14213 if { (eval echo configure:14214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14214 then
14215   :
14216 else
14217   echo "configure: failed program was:" >&5
14218   cat conftest.$ac_ext >&5
14219   rm -fr conftest*
14220   ac_cv_header_stdc=no
14221 fi
14222 rm -fr conftest*
14223 fi
14224
14225 fi
14226 fi
14227
14228 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14229 if test $ac_cv_header_stdc = yes; then
14230   cat >> confdefs.h <<\EOF
14231 #define STDC_HEADERS 1
14232 EOF
14233
14234 fi
14235
14236 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14237 echo "configure:14238: checking for mode_t" >&5
14238 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14239   echo $ac_n "(cached) $ac_c" 1>&6
14240 else
14241   cat > conftest.$ac_ext <<EOF
14242 #line 14243 "configure"
14243 #include "confdefs.h"
14244 #include <sys/types.h>
14245 #if STDC_HEADERS
14246 #include <stdlib.h>
14247 #include <stddef.h>
14248 #endif
14249
14250 EOF
14251 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14252   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14253   rm -rf conftest*
14254   eval "ac_cv_type_mode_t=yes"
14255 else
14256   rm -rf conftest*
14257   eval "ac_cv_type_mode_t=no"
14258 fi
14259 rm -f conftest*
14260
14261 fi
14262 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14263   echo "$ac_t""yes" 1>&6
14264 else
14265   echo "$ac_t""no" 1>&6
14266   cat >> confdefs.h <<EOF
14267 #define mode_t int
14268 EOF
14269
14270 fi
14271
14272 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14273 echo "configure:14274: checking for off_t" >&5
14274 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14275   echo $ac_n "(cached) $ac_c" 1>&6
14276 else
14277   cat > conftest.$ac_ext <<EOF
14278 #line 14279 "configure"
14279 #include "confdefs.h"
14280 #include <sys/types.h>
14281 #if STDC_HEADERS
14282 #include <stdlib.h>
14283 #include <stddef.h>
14284 #endif
14285
14286 EOF
14287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14288   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14289   rm -rf conftest*
14290   eval "ac_cv_type_off_t=yes"
14291 else
14292   rm -rf conftest*
14293   eval "ac_cv_type_off_t=no"
14294 fi
14295 rm -f conftest*
14296
14297 fi
14298 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14299   echo "$ac_t""yes" 1>&6
14300 else
14301   echo "$ac_t""no" 1>&6
14302   cat >> confdefs.h <<EOF
14303 #define off_t long
14304 EOF
14305
14306 fi
14307
14308 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14309 echo "configure:14310: checking for pid_t" >&5
14310 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14311   echo $ac_n "(cached) $ac_c" 1>&6
14312 else
14313   cat > conftest.$ac_ext <<EOF
14314 #line 14315 "configure"
14315 #include "confdefs.h"
14316 #include <sys/types.h>
14317 #if STDC_HEADERS
14318 #include <stdlib.h>
14319 #include <stddef.h>
14320 #endif
14321
14322 EOF
14323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14324   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14325   rm -rf conftest*
14326   eval "ac_cv_type_pid_t=yes"
14327 else
14328   rm -rf conftest*
14329   eval "ac_cv_type_pid_t=no"
14330 fi
14331 rm -f conftest*
14332
14333 fi
14334 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14335   echo "$ac_t""yes" 1>&6
14336 else
14337   echo "$ac_t""no" 1>&6
14338   cat >> confdefs.h <<EOF
14339 #define pid_t int
14340 EOF
14341
14342 fi
14343
14344 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14345 echo "configure:14346: checking for ptrdiff_t" >&5
14346 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14347   echo $ac_n "(cached) $ac_c" 1>&6
14348 else
14349   cat > conftest.$ac_ext <<EOF
14350 #line 14351 "configure"
14351 #include "confdefs.h"
14352 #include <stddef.h>
14353 int main() {
14354 ptrdiff_t p
14355 ; return 0; }
14356 EOF
14357 if { (eval echo configure:14358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14358   rm -rf conftest*
14359   am_cv_type_ptrdiff_t=yes
14360 else
14361   echo "configure: failed program was:" >&5
14362   cat conftest.$ac_ext >&5
14363   rm -rf conftest*
14364   am_cv_type_ptrdiff_t=no
14365 fi
14366 rm -f conftest*
14367 fi
14368
14369 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14370    if test $am_cv_type_ptrdiff_t = yes; then
14371      cat >> confdefs.h <<\EOF
14372 #define HAVE_PTRDIFF_T 1
14373 EOF
14374
14375    fi
14376
14377 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14378 echo "configure:14379: checking return type of signal handlers" >&5
14379 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14380   echo $ac_n "(cached) $ac_c" 1>&6
14381 else
14382   cat > conftest.$ac_ext <<EOF
14383 #line 14384 "configure"
14384 #include "confdefs.h"
14385 #include <sys/types.h>
14386 #include <signal.h>
14387 #ifdef signal
14388 #undef signal
14389 #endif
14390 #ifdef __cplusplus
14391 extern "C" void (*signal (int, void (*)(int)))(int);
14392 #else
14393 void (*signal ()) ();
14394 #endif
14395
14396 int main() {
14397 int i;
14398 ; return 0; }
14399 EOF
14400 if { (eval echo configure:14401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14401   rm -rf conftest*
14402   ac_cv_type_signal=void
14403 else
14404   echo "configure: failed program was:" >&5
14405   cat conftest.$ac_ext >&5
14406   rm -rf conftest*
14407   ac_cv_type_signal=int
14408 fi
14409 rm -f conftest*
14410 fi
14411
14412 echo "$ac_t""$ac_cv_type_signal" 1>&6
14413 cat >> confdefs.h <<EOF
14414 #define RETSIGTYPE $ac_cv_type_signal
14415 EOF
14416
14417
14418 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14419 echo "configure:14420: checking for size_t" >&5
14420 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14421   echo $ac_n "(cached) $ac_c" 1>&6
14422 else
14423   cat > conftest.$ac_ext <<EOF
14424 #line 14425 "configure"
14425 #include "confdefs.h"
14426 #include <sys/types.h>
14427 #if STDC_HEADERS
14428 #include <stdlib.h>
14429 #include <stddef.h>
14430 #endif
14431
14432 EOF
14433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14434   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14435   rm -rf conftest*
14436   eval "ac_cv_type_size_t=yes"
14437 else
14438   rm -rf conftest*
14439   eval "ac_cv_type_size_t=no"
14440 fi
14441 rm -f conftest*
14442
14443 fi
14444 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14445   echo "$ac_t""yes" 1>&6
14446 else
14447   echo "$ac_t""no" 1>&6
14448   cat >> confdefs.h <<EOF
14449 #define size_t unsigned
14450 EOF
14451
14452 fi
14453
14454
14455 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14456 echo "configure:14457: checking for ssize_t" >&5
14457 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14458   echo $ac_n "(cached) $ac_c" 1>&6
14459 else
14460   cat > conftest.$ac_ext <<EOF
14461 #line 14462 "configure"
14462 #include "confdefs.h"
14463 #include <sys/types.h>
14464 #if STDC_HEADERS
14465 #include <stdlib.h>
14466 #include <stddef.h>
14467 #endif
14468
14469 EOF
14470 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14471   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14472   rm -rf conftest*
14473   eval "ac_cv_type_ssize_t=yes"
14474 else
14475   rm -rf conftest*
14476   eval "ac_cv_type_ssize_t=no"
14477 fi
14478 rm -f conftest*
14479
14480 fi
14481 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14482   echo "$ac_t""yes" 1>&6
14483 else
14484   echo "$ac_t""no" 1>&6
14485   cat >> confdefs.h <<EOF
14486 #define ssize_t signed int
14487 EOF
14488
14489 fi
14490
14491 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14492 echo "configure:14493: checking for caddr_t" >&5
14493 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14494   echo $ac_n "(cached) $ac_c" 1>&6
14495 else
14496   cat > conftest.$ac_ext <<EOF
14497 #line 14498 "configure"
14498 #include "confdefs.h"
14499 #include <sys/types.h>
14500 #if STDC_HEADERS
14501 #include <stdlib.h>
14502 #include <stddef.h>
14503 #endif
14504
14505 EOF
14506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14507   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14508   rm -rf conftest*
14509   eval "ac_cv_type_caddr_t=yes"
14510 else
14511   rm -rf conftest*
14512   eval "ac_cv_type_caddr_t=no"
14513 fi
14514 rm -f conftest*
14515
14516 fi
14517 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14518   echo "$ac_t""yes" 1>&6
14519 else
14520   echo "$ac_t""no" 1>&6
14521   cat >> confdefs.h <<EOF
14522 #define caddr_t char *
14523 EOF
14524
14525 fi
14526
14527
14528 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14529 echo "configure:14530: checking for socklen_t" >&5
14530 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14531   echo $ac_n "(cached) $ac_c" 1>&6
14532 else
14533   cat > conftest.$ac_ext <<EOF
14534 #line 14535 "configure"
14535 #include "confdefs.h"
14536
14537 #ifdef HAVE_SYS_TYPES_H
14538 #include <sys/types.h>
14539 #endif
14540 #ifdef HAVE_SYS_SOCKET_H
14541 #include <sys/socket.h>
14542 #endif
14543
14544 int main() {
14545 socklen_t len;
14546 ; return 0; }
14547 EOF
14548 if { (eval echo configure:14549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14549   rm -rf conftest*
14550   ol_cv_type_socklen_t=yes
14551 else
14552   echo "configure: failed program was:" >&5
14553   cat conftest.$ac_ext >&5
14554   rm -rf conftest*
14555   ol_cv_type_socklen_t=no
14556 fi
14557 rm -f conftest*
14558 fi
14559
14560 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14561   if test $ol_cv_type_socklen_t = no; then
14562     cat >> confdefs.h <<\EOF
14563 #define socklen_t int
14564 EOF
14565
14566   fi
14567  
14568 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14569 echo "configure:14570: checking for member st_blksize in aggregate type struct stat" >&5
14570 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14571   echo $ac_n "(cached) $ac_c" 1>&6
14572 else
14573   cat > conftest.$ac_ext <<EOF
14574 #line 14575 "configure"
14575 #include "confdefs.h"
14576 #include <sys/types.h>
14577 #include <sys/stat.h>
14578 int main() {
14579 struct stat foo; foo.st_blksize;
14580 ; return 0; }
14581 EOF
14582 if { (eval echo configure:14583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14583   rm -rf conftest*
14584   ac_cv_c_struct_member_st_blksize=yes
14585 else
14586   echo "configure: failed program was:" >&5
14587   cat conftest.$ac_ext >&5
14588   rm -rf conftest*
14589   ac_cv_c_struct_member_st_blksize=no
14590 fi
14591 rm -f conftest*
14592 fi
14593
14594 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14595 st_blksize="$ac_cv_c_struct_member_st_blksize"
14596 if test $ac_cv_c_struct_member_st_blksize = yes; then
14597   cat >> confdefs.h <<\EOF
14598 #define HAVE_ST_BLKSIZE 1
14599 EOF
14600
14601 fi
14602
14603 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14604 echo "configure:14605: checking whether time.h and sys/time.h may both be included" >&5
14605 if eval "test \"\${ac_cv_header_time+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 #include <sys/time.h>
14613 #include <time.h>
14614 int main() {
14615 struct tm *tp;
14616 ; return 0; }
14617 EOF
14618 if { (eval echo configure:14619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14619   rm -rf conftest*
14620   ac_cv_header_time=yes
14621 else
14622   echo "configure: failed program was:" >&5
14623   cat conftest.$ac_ext >&5
14624   rm -rf conftest*
14625   ac_cv_header_time=no
14626 fi
14627 rm -f conftest*
14628 fi
14629
14630 echo "$ac_t""$ac_cv_header_time" 1>&6
14631 if test $ac_cv_header_time = yes; then
14632   cat >> confdefs.h <<\EOF
14633 #define TIME_WITH_SYS_TIME 1
14634 EOF
14635
14636 fi
14637
14638 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14639 echo "configure:14640: checking whether struct tm is in sys/time.h or time.h" >&5
14640 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14641   echo $ac_n "(cached) $ac_c" 1>&6
14642 else
14643   cat > conftest.$ac_ext <<EOF
14644 #line 14645 "configure"
14645 #include "confdefs.h"
14646 #include <sys/types.h>
14647 #include <time.h>
14648 int main() {
14649 struct tm *tp; tp->tm_sec;
14650 ; return 0; }
14651 EOF
14652 if { (eval echo configure:14653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14653   rm -rf conftest*
14654   ac_cv_struct_tm=time.h
14655 else
14656   echo "configure: failed program was:" >&5
14657   cat conftest.$ac_ext >&5
14658   rm -rf conftest*
14659   ac_cv_struct_tm=sys/time.h
14660 fi
14661 rm -f conftest*
14662 fi
14663
14664 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14665 if test $ac_cv_struct_tm = sys/time.h; then
14666   cat >> confdefs.h <<\EOF
14667 #define TM_IN_SYS_TIME 1
14668 EOF
14669
14670 fi
14671
14672 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14673 echo "configure:14674: checking for uid_t in sys/types.h" >&5
14674 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14675   echo $ac_n "(cached) $ac_c" 1>&6
14676 else
14677   cat > conftest.$ac_ext <<EOF
14678 #line 14679 "configure"
14679 #include "confdefs.h"
14680 #include <sys/types.h>
14681 EOF
14682 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14683   egrep "uid_t" >/dev/null 2>&1; then
14684   rm -rf conftest*
14685   ac_cv_type_uid_t=yes
14686 else
14687   rm -rf conftest*
14688   ac_cv_type_uid_t=no
14689 fi
14690 rm -f conftest*
14691
14692 fi
14693
14694 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14695 if test $ac_cv_type_uid_t = no; then
14696   cat >> confdefs.h <<\EOF
14697 #define uid_t int
14698 EOF
14699
14700   cat >> confdefs.h <<\EOF
14701 #define gid_t int
14702 EOF
14703
14704 fi
14705
14706 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14707 echo "configure:14708: checking for sig_atomic_t" >&5
14708 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14709   echo $ac_n "(cached) $ac_c" 1>&6
14710 else
14711   cat > conftest.$ac_ext <<EOF
14712 #line 14713 "configure"
14713 #include "confdefs.h"
14714 #include <signal.h>
14715 int main() {
14716 sig_atomic_t atomic;
14717 ; return 0; }
14718 EOF
14719 if { (eval echo configure:14720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14720   rm -rf conftest*
14721   ol_cv_type_sig_atomic_t=yes
14722 else
14723   echo "configure: failed program was:" >&5
14724   cat conftest.$ac_ext >&5
14725   rm -rf conftest*
14726   ol_cv_type_sig_atomic_t=no
14727 fi
14728 rm -f conftest*
14729 fi
14730
14731 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14732   if test $ol_cv_type_sig_atomic_t = no; then
14733     cat >> confdefs.h <<\EOF
14734 #define sig_atomic_t int
14735 EOF
14736
14737   fi
14738  
14739
14740
14741 # test for pw_gecos in struct passwd
14742 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14743 echo "configure:14744: checking struct passwd for pw_gecos" >&5
14744 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14745   echo $ac_n "(cached) $ac_c" 1>&6
14746 else
14747   
14748         cat > conftest.$ac_ext <<EOF
14749 #line 14750 "configure"
14750 #include "confdefs.h"
14751 #include <pwd.h>
14752 int main() {
14753
14754         struct passwd pwd;
14755         pwd.pw_gecos = pwd.pw_name;
14756
14757 ; return 0; }
14758 EOF
14759 if { (eval echo configure:14760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14760   rm -rf conftest*
14761   ol_cv_struct_passwd_pw_gecos=yes
14762 else
14763   echo "configure: failed program was:" >&5
14764   cat conftest.$ac_ext >&5
14765   rm -rf conftest*
14766   ol_cv_struct_passwd_pw_gecos=no
14767 fi
14768 rm -f conftest*
14769 fi
14770
14771 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14772 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14773         cat >> confdefs.h <<\EOF
14774 #define HAVE_PW_GECOS 1
14775 EOF
14776
14777 fi
14778
14779 # test for pw_passwd in struct passwd
14780 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14781 echo "configure:14782: checking struct passwd for pw_passwd" >&5
14782 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14783   echo $ac_n "(cached) $ac_c" 1>&6
14784 else
14785   
14786         cat > conftest.$ac_ext <<EOF
14787 #line 14788 "configure"
14788 #include "confdefs.h"
14789 #include <pwd.h>
14790 int main() {
14791
14792         struct passwd pwd;
14793         pwd.pw_passwd = pwd.pw_name;
14794
14795 ; return 0; }
14796 EOF
14797 if { (eval echo configure:14798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14798   rm -rf conftest*
14799   ol_cv_struct_passwd_pw_passwd=yes
14800 else
14801   echo "configure: failed program was:" >&5
14802   cat conftest.$ac_ext >&5
14803   rm -rf conftest*
14804   ol_cv_struct_passwd_pw_passwd=no
14805 fi
14806 rm -f conftest*
14807 fi
14808
14809 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14810 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14811         cat >> confdefs.h <<\EOF
14812 #define HAVE_PW_PASSWD 1
14813 EOF
14814
14815 fi
14816
14817
14818 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14819 echo "configure:14820: checking if toupper() requires islower()" >&5
14820 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14821   echo $ac_n "(cached) $ac_c" 1>&6
14822 else
14823   
14824         if test "$cross_compiling" = yes; then
14825   ol_cv_c_upper_lower=safe
14826 else
14827   cat > conftest.$ac_ext <<EOF
14828 #line 14829 "configure"
14829 #include "confdefs.h"
14830
14831 #include <ctype.h>
14832 main()
14833 {
14834         if ('C' == toupper('C'))
14835                 exit(0);
14836         else
14837                 exit(1);
14838 }
14839 EOF
14840 if { (eval echo configure:14841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14841 then
14842   ol_cv_c_upper_lower=no
14843 else
14844   echo "configure: failed program was:" >&5
14845   cat conftest.$ac_ext >&5
14846   rm -fr conftest*
14847   ol_cv_c_upper_lower=yes
14848 fi
14849 rm -fr conftest*
14850 fi
14851
14852 fi
14853
14854 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14855 if test $ol_cv_c_upper_lower != no ; then
14856         cat >> confdefs.h <<\EOF
14857 #define C_UPPER_LOWER 1
14858 EOF
14859
14860 fi
14861
14862 echo $ac_n "checking for working const""... $ac_c" 1>&6
14863 echo "configure:14864: checking for working const" >&5
14864 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14865   echo $ac_n "(cached) $ac_c" 1>&6
14866 else
14867   cat > conftest.$ac_ext <<EOF
14868 #line 14869 "configure"
14869 #include "confdefs.h"
14870
14871 int main() {
14872
14873 /* Ultrix mips cc rejects this.  */
14874 typedef int charset[2]; const charset x;
14875 /* SunOS 4.1.1 cc rejects this.  */
14876 char const *const *ccp;
14877 char **p;
14878 /* NEC SVR4.0.2 mips cc rejects this.  */
14879 struct point {int x, y;};
14880 static struct point const zero = {0,0};
14881 /* AIX XL C 1.02.0.0 rejects this.
14882    It does not let you subtract one const X* pointer from another in an arm
14883    of an if-expression whose if-part is not a constant expression */
14884 const char *g = "string";
14885 ccp = &g + (g ? g-g : 0);
14886 /* HPUX 7.0 cc rejects these. */
14887 ++ccp;
14888 p = (char**) ccp;
14889 ccp = (char const *const *) p;
14890 { /* SCO 3.2v4 cc rejects this.  */
14891   char *t;
14892   char const *s = 0 ? (char *) 0 : (char const *) 0;
14893
14894   *t++ = 0;
14895 }
14896 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14897   int x[] = {25, 17};
14898   const int *foo = &x[0];
14899   ++foo;
14900 }
14901 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14902   typedef const int *iptr;
14903   iptr p = 0;
14904   ++p;
14905 }
14906 { /* AIX XL C 1.02.0.0 rejects this saying
14907      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14908   struct s { int j; const int *ap[3]; };
14909   struct s *b; b->j = 5;
14910 }
14911 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14912   const int foo = 10;
14913 }
14914
14915 ; return 0; }
14916 EOF
14917 if { (eval echo configure:14918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14918   rm -rf conftest*
14919   ac_cv_c_const=yes
14920 else
14921   echo "configure: failed program was:" >&5
14922   cat conftest.$ac_ext >&5
14923   rm -rf conftest*
14924   ac_cv_c_const=no
14925 fi
14926 rm -f conftest*
14927 fi
14928
14929 echo "$ac_t""$ac_cv_c_const" 1>&6
14930 if test $ac_cv_c_const = no; then
14931   cat >> confdefs.h <<\EOF
14932 #define const 
14933 EOF
14934
14935 fi
14936
14937 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14938 echo "configure:14939: checking if compiler understands volatile" >&5
14939 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14940   echo $ac_n "(cached) $ac_c" 1>&6
14941 else
14942   cat > conftest.$ac_ext <<EOF
14943 #line 14944 "configure"
14944 #include "confdefs.h"
14945 int x, y, z;
14946 int main() {
14947 volatile int a; int * volatile b = x ? &y : &z;
14948       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14949       *b = 0;
14950 ; return 0; }
14951 EOF
14952 if { (eval echo configure:14953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14953   rm -rf conftest*
14954   ol_cv_c_volatile=yes
14955 else
14956   echo "configure: failed program was:" >&5
14957   cat conftest.$ac_ext >&5
14958   rm -rf conftest*
14959   ol_cv_c_volatile=no
14960 fi
14961 rm -f conftest*
14962 fi
14963
14964 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14965   if test $ol_cv_c_volatile = yes; then
14966     : 
14967   else
14968     cat >> confdefs.h <<\EOF
14969 #define volatile 
14970 EOF
14971
14972   fi
14973  
14974
14975 if test $cross_compiling = yes ; then
14976         cat >> confdefs.h <<\EOF
14977 #define CROSS_COMPILING 1
14978 EOF
14979
14980 else
14981         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14982 echo "configure:14983: checking whether byte ordering is bigendian" >&5
14983 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14984   echo $ac_n "(cached) $ac_c" 1>&6
14985 else
14986   ac_cv_c_bigendian=unknown
14987 # See if sys/param.h defines the BYTE_ORDER macro.
14988 cat > conftest.$ac_ext <<EOF
14989 #line 14990 "configure"
14990 #include "confdefs.h"
14991 #include <sys/types.h>
14992 #include <sys/param.h>
14993 int main() {
14994
14995 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14996  bogus endian macros
14997 #endif
14998 ; return 0; }
14999 EOF
15000 if { (eval echo configure:15001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15001   rm -rf conftest*
15002   # It does; now see whether it defined to BIG_ENDIAN or not.
15003 cat > conftest.$ac_ext <<EOF
15004 #line 15005 "configure"
15005 #include "confdefs.h"
15006 #include <sys/types.h>
15007 #include <sys/param.h>
15008 int main() {
15009
15010 #if BYTE_ORDER != BIG_ENDIAN
15011  not big endian
15012 #endif
15013 ; return 0; }
15014 EOF
15015 if { (eval echo configure:15016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15016   rm -rf conftest*
15017   ac_cv_c_bigendian=yes
15018 else
15019   echo "configure: failed program was:" >&5
15020   cat conftest.$ac_ext >&5
15021   rm -rf conftest*
15022   ac_cv_c_bigendian=no
15023 fi
15024 rm -f conftest*
15025 else
15026   echo "configure: failed program was:" >&5
15027   cat conftest.$ac_ext >&5
15028 fi
15029 rm -f conftest*
15030 if test $ac_cv_c_bigendian = unknown; then
15031 if test "$cross_compiling" = yes; then
15032     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15033 else
15034   cat > conftest.$ac_ext <<EOF
15035 #line 15036 "configure"
15036 #include "confdefs.h"
15037 main () {
15038   /* Are we little or big endian?  From Harbison&Steele.  */
15039   union
15040   {
15041     long l;
15042     char c[sizeof (long)];
15043   } u;
15044   u.l = 1;
15045   exit (u.c[sizeof (long) - 1] == 1);
15046 }
15047 EOF
15048 if { (eval echo configure:15049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15049 then
15050   ac_cv_c_bigendian=no
15051 else
15052   echo "configure: failed program was:" >&5
15053   cat conftest.$ac_ext >&5
15054   rm -fr conftest*
15055   ac_cv_c_bigendian=yes
15056 fi
15057 rm -fr conftest*
15058 fi
15059
15060 fi
15061 fi
15062
15063 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15064 if test $ac_cv_c_bigendian = yes; then
15065   cat >> confdefs.h <<\EOF
15066 #define WORDS_BIGENDIAN 1
15067 EOF
15068
15069 fi
15070
15071 fi
15072
15073 echo $ac_n "checking size of short""... $ac_c" 1>&6
15074 echo "configure:15075: checking size of short" >&5 
15075 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15076   echo $ac_n "(cached) $ac_c" 1>&6
15077 else
15078   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15079   cat > conftest.$ac_ext <<EOF
15080 #line 15081 "configure"
15081 #include "confdefs.h"
15082 #include "confdefs.h" 
15083 #include <sys/types.h> 
15084  
15085
15086 int main() {
15087 switch (0) case 0: case (sizeof (short) == $ac_size):;
15088 ; return 0; }
15089 EOF
15090 if { (eval echo configure:15091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15091   rm -rf conftest*
15092   ac_cv_sizeof_short=$ac_size
15093 else
15094   echo "configure: failed program was:" >&5
15095   cat conftest.$ac_ext >&5
15096 fi
15097 rm -f conftest* 
15098   if test x$ac_cv_sizeof_short != x ; then break; fi 
15099 done 
15100
15101 fi
15102  
15103 if test x$ac_cv_sizeof_short = x ; then 
15104   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15105 fi 
15106 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15107 cat >> confdefs.h <<EOF
15108 #define SIZEOF_SHORT $ac_cv_sizeof_short
15109 EOF
15110  
15111  
15112 echo $ac_n "checking size of int""... $ac_c" 1>&6
15113 echo "configure:15114: checking size of int" >&5 
15114 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15115   echo $ac_n "(cached) $ac_c" 1>&6
15116 else
15117   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15118   cat > conftest.$ac_ext <<EOF
15119 #line 15120 "configure"
15120 #include "confdefs.h"
15121 #include "confdefs.h" 
15122 #include <sys/types.h> 
15123  
15124
15125 int main() {
15126 switch (0) case 0: case (sizeof (int) == $ac_size):;
15127 ; return 0; }
15128 EOF
15129 if { (eval echo configure:15130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15130   rm -rf conftest*
15131   ac_cv_sizeof_int=$ac_size
15132 else
15133   echo "configure: failed program was:" >&5
15134   cat conftest.$ac_ext >&5
15135 fi
15136 rm -f conftest* 
15137   if test x$ac_cv_sizeof_int != x ; then break; fi 
15138 done 
15139
15140 fi
15141  
15142 if test x$ac_cv_sizeof_int = x ; then 
15143   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15144 fi 
15145 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15146 cat >> confdefs.h <<EOF
15147 #define SIZEOF_INT $ac_cv_sizeof_int
15148 EOF
15149  
15150  
15151 echo $ac_n "checking size of long""... $ac_c" 1>&6
15152 echo "configure:15153: checking size of long" >&5 
15153 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15154   echo $ac_n "(cached) $ac_c" 1>&6
15155 else
15156   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15157   cat > conftest.$ac_ext <<EOF
15158 #line 15159 "configure"
15159 #include "confdefs.h"
15160 #include "confdefs.h" 
15161 #include <sys/types.h> 
15162  
15163
15164 int main() {
15165 switch (0) case 0: case (sizeof (long) == $ac_size):;
15166 ; return 0; }
15167 EOF
15168 if { (eval echo configure:15169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15169   rm -rf conftest*
15170   ac_cv_sizeof_long=$ac_size
15171 else
15172   echo "configure: failed program was:" >&5
15173   cat conftest.$ac_ext >&5
15174 fi
15175 rm -f conftest* 
15176   if test x$ac_cv_sizeof_long != x ; then break; fi 
15177 done 
15178
15179 fi
15180  
15181 if test x$ac_cv_sizeof_long = x ; then 
15182   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15183 fi 
15184 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15185 cat >> confdefs.h <<EOF
15186 #define SIZEOF_LONG $ac_cv_sizeof_long
15187 EOF
15188  
15189
15190
15191 if test "$ac_cv_sizeof_int" -lt 4 ; then
15192         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15193
15194         cat >> confdefs.h <<\EOF
15195 #define LBER_INT_T long
15196 EOF
15197
15198 else
15199         cat >> confdefs.h <<\EOF
15200 #define LBER_INT_T int
15201 EOF
15202
15203 fi
15204
15205 cat >> confdefs.h <<\EOF
15206 #define LBER_LEN_T long
15207 EOF
15208
15209 cat >> confdefs.h <<\EOF
15210 #define LBER_SOCKET_T int
15211 EOF
15212
15213 cat >> confdefs.h <<\EOF
15214 #define LBER_TAG_T long
15215 EOF
15216
15217
15218 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15219 echo "configure:15220: checking for 8-bit clean memcmp" >&5
15220 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15221   echo $ac_n "(cached) $ac_c" 1>&6
15222 else
15223   if test "$cross_compiling" = yes; then
15224   ac_cv_func_memcmp_clean=no
15225 else
15226   cat > conftest.$ac_ext <<EOF
15227 #line 15228 "configure"
15228 #include "confdefs.h"
15229
15230 main()
15231 {
15232   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15233   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15234 }
15235
15236 EOF
15237 if { (eval echo configure:15238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15238 then
15239   ac_cv_func_memcmp_clean=yes
15240 else
15241   echo "configure: failed program was:" >&5
15242   cat conftest.$ac_ext >&5
15243   rm -fr conftest*
15244   ac_cv_func_memcmp_clean=no
15245 fi
15246 rm -fr conftest*
15247 fi
15248
15249 fi
15250
15251 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15252 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15253
15254 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15255 echo "configure:15256: checking for strftime" >&5
15256 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15257   echo $ac_n "(cached) $ac_c" 1>&6
15258 else
15259   cat > conftest.$ac_ext <<EOF
15260 #line 15261 "configure"
15261 #include "confdefs.h"
15262 /* System header to define __stub macros and hopefully few prototypes,
15263     which can conflict with char strftime(); below.  */
15264 #include <assert.h>
15265 /* Override any gcc2 internal prototype to avoid an error.  */
15266 /* We use char because int might match the return type of a gcc2
15267     builtin and then its argument prototype would still apply.  */
15268 char strftime();
15269 char (*f)();
15270
15271 int main() {
15272
15273 /* The GNU C library defines this for functions which it implements
15274     to always fail with ENOSYS.  Some functions are actually named
15275     something starting with __ and the normal name is an alias.  */
15276 #if defined (__stub_strftime) || defined (__stub___strftime)
15277 choke me
15278 #else
15279 f = strftime;
15280 #endif
15281
15282 ; return 0; }
15283 EOF
15284 if { (eval echo configure:15285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15285   rm -rf conftest*
15286   eval "ac_cv_func_strftime=yes"
15287 else
15288   echo "configure: failed program was:" >&5
15289   cat conftest.$ac_ext >&5
15290   rm -rf conftest*
15291   eval "ac_cv_func_strftime=no"
15292 fi
15293 rm -f conftest*
15294 fi
15295
15296 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15297   echo "$ac_t""yes" 1>&6
15298   cat >> confdefs.h <<\EOF
15299 #define HAVE_STRFTIME 1
15300 EOF
15301
15302 else
15303   echo "$ac_t""no" 1>&6
15304 # strftime is in -lintl on SCO UNIX.
15305 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15306 echo "configure:15307: checking for strftime in -lintl" >&5
15307 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15308 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15309   echo $ac_n "(cached) $ac_c" 1>&6
15310 else
15311   ac_save_LIBS="$LIBS"
15312 LIBS="-lintl  $LIBS"
15313 cat > conftest.$ac_ext <<EOF
15314 #line 15315 "configure"
15315 #include "confdefs.h"
15316 /* Override any gcc2 internal prototype to avoid an error.  */
15317 /* We use char because int might match the return type of a gcc2
15318     builtin and then its argument prototype would still apply.  */
15319 char strftime();
15320
15321 int main() {
15322 strftime()
15323 ; return 0; }
15324 EOF
15325 if { (eval echo configure:15326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15326   rm -rf conftest*
15327   eval "ac_cv_lib_$ac_lib_var=yes"
15328 else
15329   echo "configure: failed program was:" >&5
15330   cat conftest.$ac_ext >&5
15331   rm -rf conftest*
15332   eval "ac_cv_lib_$ac_lib_var=no"
15333 fi
15334 rm -f conftest*
15335 LIBS="$ac_save_LIBS"
15336
15337 fi
15338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15339   echo "$ac_t""yes" 1>&6
15340   cat >> confdefs.h <<\EOF
15341 #define HAVE_STRFTIME 1
15342 EOF
15343
15344 LIBS="-lintl $LIBS"
15345 else
15346   echo "$ac_t""no" 1>&6
15347 fi
15348
15349 fi
15350
15351
15352 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15353 echo "configure:15354: checking for inet_aton()" >&5
15354 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15355   echo $ac_n "(cached) $ac_c" 1>&6
15356 else
15357   cat > conftest.$ac_ext <<EOF
15358 #line 15359 "configure"
15359 #include "confdefs.h"
15360
15361 #ifdef HAVE_SYS_TYPES_H
15362 #       include <sys/types.h>
15363 #endif
15364 #ifdef HAVE_SYS_SOCKET_H
15365 #       include <sys/socket.h>
15366 #       ifdef HAVE_SYS_SELECT_H
15367 #               include <sys/select.h>
15368 #       endif
15369 #       include <netinet/in.h>
15370 #       ifdef HAVE_ARPA_INET_H
15371 #               include <arpa/inet.h>
15372 #       endif
15373 #endif
15374
15375 int main() {
15376 struct in_addr in;
15377 int rc = inet_aton( "255.255.255.255", &in );
15378 ; return 0; }
15379 EOF
15380 if { (eval echo configure:15381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15381   rm -rf conftest*
15382   ol_cv_func_inet_aton=yes
15383 else
15384   echo "configure: failed program was:" >&5
15385   cat conftest.$ac_ext >&5
15386   rm -rf conftest*
15387   ol_cv_func_inet_aton=no
15388 fi
15389 rm -f conftest*
15390 fi
15391
15392 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15393   if test $ol_cv_func_inet_aton != no; then
15394     cat >> confdefs.h <<\EOF
15395 #define HAVE_INET_ATON 1
15396 EOF
15397
15398   fi
15399  
15400
15401 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15402 echo "configure:15403: checking for _spawnlp" >&5
15403 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15404   echo $ac_n "(cached) $ac_c" 1>&6
15405 else
15406   cat > conftest.$ac_ext <<EOF
15407 #line 15408 "configure"
15408 #include "confdefs.h"
15409 /* System header to define __stub macros and hopefully few prototypes,
15410     which can conflict with char _spawnlp(); below.  */
15411 #include <assert.h>
15412 /* Override any gcc2 internal prototype to avoid an error.  */
15413 /* We use char because int might match the return type of a gcc2
15414     builtin and then its argument prototype would still apply.  */
15415 char _spawnlp();
15416 char (*f)();
15417
15418 int main() {
15419
15420 /* The GNU C library defines this for functions which it implements
15421     to always fail with ENOSYS.  Some functions are actually named
15422     something starting with __ and the normal name is an alias.  */
15423 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15424 choke me
15425 #else
15426 f = _spawnlp;
15427 #endif
15428
15429 ; return 0; }
15430 EOF
15431 if { (eval echo configure:15432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15432   rm -rf conftest*
15433   eval "ac_cv_func__spawnlp=yes"
15434 else
15435   echo "configure: failed program was:" >&5
15436   cat conftest.$ac_ext >&5
15437   rm -rf conftest*
15438   eval "ac_cv_func__spawnlp=no"
15439 fi
15440 rm -f conftest*
15441 fi
15442
15443 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15444   echo "$ac_t""yes" 1>&6
15445   cat >> confdefs.h <<\EOF
15446 #define HAVE_SPAWNLP 1
15447 EOF
15448
15449 else
15450   echo "$ac_t""no" 1>&6
15451 fi
15452
15453
15454 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15455 echo "configure:15456: checking for _snprintf" >&5
15456 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15457   echo $ac_n "(cached) $ac_c" 1>&6
15458 else
15459   cat > conftest.$ac_ext <<EOF
15460 #line 15461 "configure"
15461 #include "confdefs.h"
15462 /* System header to define __stub macros and hopefully few prototypes,
15463     which can conflict with char _snprintf(); below.  */
15464 #include <assert.h>
15465 /* Override any gcc2 internal prototype to avoid an error.  */
15466 /* We use char because int might match the return type of a gcc2
15467     builtin and then its argument prototype would still apply.  */
15468 char _snprintf();
15469 char (*f)();
15470
15471 int main() {
15472
15473 /* The GNU C library defines this for functions which it implements
15474     to always fail with ENOSYS.  Some functions are actually named
15475     something starting with __ and the normal name is an alias.  */
15476 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15477 choke me
15478 #else
15479 f = _snprintf;
15480 #endif
15481
15482 ; return 0; }
15483 EOF
15484 if { (eval echo configure:15485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15485   rm -rf conftest*
15486   eval "ac_cv_func__snprintf=yes"
15487 else
15488   echo "configure: failed program was:" >&5
15489   cat conftest.$ac_ext >&5
15490   rm -rf conftest*
15491   eval "ac_cv_func__snprintf=no"
15492 fi
15493 rm -f conftest*
15494 fi
15495
15496 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15497   echo "$ac_t""yes" 1>&6
15498   ac_cv_func_snprintf=yes
15499         cat >> confdefs.h <<\EOF
15500 #define snprintf _snprintf
15501 EOF
15502
15503
15504 else
15505   echo "$ac_t""no" 1>&6
15506 fi
15507
15508
15509 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15510 echo "configure:15511: checking for _vsnprintf" >&5
15511 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15512   echo $ac_n "(cached) $ac_c" 1>&6
15513 else
15514   cat > conftest.$ac_ext <<EOF
15515 #line 15516 "configure"
15516 #include "confdefs.h"
15517 /* System header to define __stub macros and hopefully few prototypes,
15518     which can conflict with char _vsnprintf(); below.  */
15519 #include <assert.h>
15520 /* Override any gcc2 internal prototype to avoid an error.  */
15521 /* We use char because int might match the return type of a gcc2
15522     builtin and then its argument prototype would still apply.  */
15523 char _vsnprintf();
15524 char (*f)();
15525
15526 int main() {
15527
15528 /* The GNU C library defines this for functions which it implements
15529     to always fail with ENOSYS.  Some functions are actually named
15530     something starting with __ and the normal name is an alias.  */
15531 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15532 choke me
15533 #else
15534 f = _vsnprintf;
15535 #endif
15536
15537 ; return 0; }
15538 EOF
15539 if { (eval echo configure:15540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15540   rm -rf conftest*
15541   eval "ac_cv_func__vsnprintf=yes"
15542 else
15543   echo "configure: failed program was:" >&5
15544   cat conftest.$ac_ext >&5
15545   rm -rf conftest*
15546   eval "ac_cv_func__vsnprintf=no"
15547 fi
15548 rm -f conftest*
15549 fi
15550
15551 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15552   echo "$ac_t""yes" 1>&6
15553   ac_cv_func_vsnprintf=yes
15554         cat >> confdefs.h <<\EOF
15555 #define vsnprintf _vsnprintf
15556 EOF
15557
15558
15559 else
15560   echo "$ac_t""no" 1>&6
15561 fi
15562
15563
15564 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15565 echo "configure:15566: checking for vprintf" >&5
15566 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15567   echo $ac_n "(cached) $ac_c" 1>&6
15568 else
15569   cat > conftest.$ac_ext <<EOF
15570 #line 15571 "configure"
15571 #include "confdefs.h"
15572 /* System header to define __stub macros and hopefully few prototypes,
15573     which can conflict with char vprintf(); below.  */
15574 #include <assert.h>
15575 /* Override any gcc2 internal prototype to avoid an error.  */
15576 /* We use char because int might match the return type of a gcc2
15577     builtin and then its argument prototype would still apply.  */
15578 char vprintf();
15579 char (*f)();
15580
15581 int main() {
15582
15583 /* The GNU C library defines this for functions which it implements
15584     to always fail with ENOSYS.  Some functions are actually named
15585     something starting with __ and the normal name is an alias.  */
15586 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15587 choke me
15588 #else
15589 f = vprintf;
15590 #endif
15591
15592 ; return 0; }
15593 EOF
15594 if { (eval echo configure:15595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15595   rm -rf conftest*
15596   eval "ac_cv_func_vprintf=yes"
15597 else
15598   echo "configure: failed program was:" >&5
15599   cat conftest.$ac_ext >&5
15600   rm -rf conftest*
15601   eval "ac_cv_func_vprintf=no"
15602 fi
15603 rm -f conftest*
15604 fi
15605
15606 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15607   echo "$ac_t""yes" 1>&6
15608   cat >> confdefs.h <<\EOF
15609 #define HAVE_VPRINTF 1
15610 EOF
15611
15612 else
15613   echo "$ac_t""no" 1>&6
15614 fi
15615
15616 if test "$ac_cv_func_vprintf" != yes; then
15617 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15618 echo "configure:15619: checking for _doprnt" >&5
15619 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15620   echo $ac_n "(cached) $ac_c" 1>&6
15621 else
15622   cat > conftest.$ac_ext <<EOF
15623 #line 15624 "configure"
15624 #include "confdefs.h"
15625 /* System header to define __stub macros and hopefully few prototypes,
15626     which can conflict with char _doprnt(); below.  */
15627 #include <assert.h>
15628 /* Override any gcc2 internal prototype to avoid an error.  */
15629 /* We use char because int might match the return type of a gcc2
15630     builtin and then its argument prototype would still apply.  */
15631 char _doprnt();
15632 char (*f)();
15633
15634 int main() {
15635
15636 /* The GNU C library defines this for functions which it implements
15637     to always fail with ENOSYS.  Some functions are actually named
15638     something starting with __ and the normal name is an alias.  */
15639 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15640 choke me
15641 #else
15642 f = _doprnt;
15643 #endif
15644
15645 ; return 0; }
15646 EOF
15647 if { (eval echo configure:15648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15648   rm -rf conftest*
15649   eval "ac_cv_func__doprnt=yes"
15650 else
15651   echo "configure: failed program was:" >&5
15652   cat conftest.$ac_ext >&5
15653   rm -rf conftest*
15654   eval "ac_cv_func__doprnt=no"
15655 fi
15656 rm -f conftest*
15657 fi
15658
15659 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15660   echo "$ac_t""yes" 1>&6
15661   cat >> confdefs.h <<\EOF
15662 #define HAVE_DOPRNT 1
15663 EOF
15664
15665 else
15666   echo "$ac_t""no" 1>&6
15667 fi
15668
15669 fi
15670
15671
15672 if test $ac_cv_func_vprintf = yes ; then
15673                 for ac_func in vsnprintf vsprintf
15674 do
15675 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15676 echo "configure:15677: checking for $ac_func" >&5
15677 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15678   echo $ac_n "(cached) $ac_c" 1>&6
15679 else
15680   cat > conftest.$ac_ext <<EOF
15681 #line 15682 "configure"
15682 #include "confdefs.h"
15683 /* System header to define __stub macros and hopefully few prototypes,
15684     which can conflict with char $ac_func(); below.  */
15685 #include <assert.h>
15686 /* Override any gcc2 internal prototype to avoid an error.  */
15687 /* We use char because int might match the return type of a gcc2
15688     builtin and then its argument prototype would still apply.  */
15689 char $ac_func();
15690 char (*f)();
15691
15692 int main() {
15693
15694 /* The GNU C library defines this for functions which it implements
15695     to always fail with ENOSYS.  Some functions are actually named
15696     something starting with __ and the normal name is an alias.  */
15697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15698 choke me
15699 #else
15700 f = $ac_func;
15701 #endif
15702
15703 ; return 0; }
15704 EOF
15705 if { (eval echo configure:15706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15706   rm -rf conftest*
15707   eval "ac_cv_func_$ac_func=yes"
15708 else
15709   echo "configure: failed program was:" >&5
15710   cat conftest.$ac_ext >&5
15711   rm -rf conftest*
15712   eval "ac_cv_func_$ac_func=no"
15713 fi
15714 rm -f conftest*
15715 fi
15716
15717 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15718   echo "$ac_t""yes" 1>&6
15719     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15720   cat >> confdefs.h <<EOF
15721 #define $ac_tr_func 1
15722 EOF
15723  
15724 else
15725   echo "$ac_t""no" 1>&6
15726 fi
15727 done
15728
15729 fi
15730
15731 for ac_func in \
15732         bcopy                   \
15733         closesocket             \
15734         chroot                  \
15735         endgrent                \
15736         endpwent                \
15737         flock                   \
15738         getdtablesize   \
15739         getgrgid                \
15740         gethostname             \
15741         getpass                 \
15742         getpassphrase   \
15743         getpwuid                \
15744         getpwnam                \
15745         getspnam                \
15746         gettimeofday    \
15747         initgroups              \
15748         lockf                   \
15749         memcpy                  \
15750         memmove                 \
15751         mkstemp                 \
15752         pipe                    \
15753         read                    \
15754         recv                    \
15755         recvfrom                \
15756         setpwfile               \
15757         setgid                  \
15758         setegid                 \
15759         setsid                  \
15760         setuid                  \
15761         seteuid                 \
15762         sigaction               \
15763         signal                  \
15764         sigset                  \
15765         snprintf                \
15766         strdup                  \
15767         strerror                \
15768         strpbrk                 \
15769         strrchr                 \
15770         strsep                  \
15771         strstr                  \
15772         strtol                  \
15773         strtoul                 \
15774         strspn                  \
15775         sysconf                 \
15776         waitpid                 \
15777         wait4                   \
15778         write                   \
15779         send                    \
15780         sendto                  \
15781
15782 do
15783 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15784 echo "configure:15785: checking for $ac_func" >&5
15785 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15786   echo $ac_n "(cached) $ac_c" 1>&6
15787 else
15788   cat > conftest.$ac_ext <<EOF
15789 #line 15790 "configure"
15790 #include "confdefs.h"
15791 /* System header to define __stub macros and hopefully few prototypes,
15792     which can conflict with char $ac_func(); below.  */
15793 #include <assert.h>
15794 /* Override any gcc2 internal prototype to avoid an error.  */
15795 /* We use char because int might match the return type of a gcc2
15796     builtin and then its argument prototype would still apply.  */
15797 char $ac_func();
15798 char (*f)();
15799
15800 int main() {
15801
15802 /* The GNU C library defines this for functions which it implements
15803     to always fail with ENOSYS.  Some functions are actually named
15804     something starting with __ and the normal name is an alias.  */
15805 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15806 choke me
15807 #else
15808 f = $ac_func;
15809 #endif
15810
15811 ; return 0; }
15812 EOF
15813 if { (eval echo configure:15814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15814   rm -rf conftest*
15815   eval "ac_cv_func_$ac_func=yes"
15816 else
15817   echo "configure: failed program was:" >&5
15818   cat conftest.$ac_ext >&5
15819   rm -rf conftest*
15820   eval "ac_cv_func_$ac_func=no"
15821 fi
15822 rm -f conftest*
15823 fi
15824
15825 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15826   echo "$ac_t""yes" 1>&6
15827     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15828   cat >> confdefs.h <<EOF
15829 #define $ac_tr_func 1
15830 EOF
15831  
15832 else
15833   echo "$ac_t""no" 1>&6
15834 fi
15835 done
15836
15837
15838 for ac_func in getopt tempnam
15839 do
15840 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15841 echo "configure:15842: checking for $ac_func" >&5
15842 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15843   echo $ac_n "(cached) $ac_c" 1>&6
15844 else
15845   cat > conftest.$ac_ext <<EOF
15846 #line 15847 "configure"
15847 #include "confdefs.h"
15848 /* System header to define __stub macros and hopefully few prototypes,
15849     which can conflict with char $ac_func(); below.  */
15850 #include <assert.h>
15851 /* Override any gcc2 internal prototype to avoid an error.  */
15852 /* We use char because int might match the return type of a gcc2
15853     builtin and then its argument prototype would still apply.  */
15854 char $ac_func();
15855 char (*f)();
15856
15857 int main() {
15858
15859 /* The GNU C library defines this for functions which it implements
15860     to always fail with ENOSYS.  Some functions are actually named
15861     something starting with __ and the normal name is an alias.  */
15862 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15863 choke me
15864 #else
15865 f = $ac_func;
15866 #endif
15867
15868 ; return 0; }
15869 EOF
15870 if { (eval echo configure:15871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15871   rm -rf conftest*
15872   eval "ac_cv_func_$ac_func=yes"
15873 else
15874   echo "configure: failed program was:" >&5
15875   cat conftest.$ac_ext >&5
15876   rm -rf conftest*
15877   eval "ac_cv_func_$ac_func=no"
15878 fi
15879 rm -f conftest*
15880 fi
15881
15882 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15883   echo "$ac_t""yes" 1>&6
15884     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15885   cat >> confdefs.h <<EOF
15886 #define $ac_tr_func 1
15887 EOF
15888  
15889 else
15890   echo "$ac_t""no" 1>&6
15891 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15892 fi
15893 done
15894
15895
15896
15897 if test "$ac_cv_func_getopt" != yes; then
15898     LIBSRCS="$LIBSRCS getopt.c"
15899 fi
15900
15901 if test "$ac_cv_func_tempnam" != yes; then
15902     LIBSRCS="$LIBSRCS tempnam.c"
15903 fi
15904
15905 # Check Configuration
15906 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15907 echo "configure:15908: checking declaration of sys_errlist" >&5
15908 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15909   echo $ac_n "(cached) $ac_c" 1>&6
15910 else
15911   
15912         cat > conftest.$ac_ext <<EOF
15913 #line 15914 "configure"
15914 #include "confdefs.h"
15915
15916 #include <stdio.h>
15917 #include <sys/types.h>
15918 #include <errno.h>
15919 #ifdef WINNT
15920 #include <stdlib.h>
15921 #endif 
15922 int main() {
15923 char *c = (char *) *sys_errlist
15924 ; return 0; }
15925 EOF
15926 if { (eval echo configure:15927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15927   rm -rf conftest*
15928   ol_cv_dcl_sys_errlist=yes
15929         ol_cv_have_sys_errlist=yes
15930 else
15931   echo "configure: failed program was:" >&5
15932   cat conftest.$ac_ext >&5
15933   rm -rf conftest*
15934   ol_cv_dcl_sys_errlist=no
15935 fi
15936 rm -f conftest*
15937 fi
15938
15939 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15940 #
15941 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15942 if test $ol_cv_dcl_sys_errlist = no ; then
15943         cat >> confdefs.h <<\EOF
15944 #define DECL_SYS_ERRLIST 1
15945 EOF
15946
15947
15948         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15949 echo "configure:15950: checking existence of sys_errlist" >&5
15950 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15951   echo $ac_n "(cached) $ac_c" 1>&6
15952 else
15953   
15954                 cat > conftest.$ac_ext <<EOF
15955 #line 15956 "configure"
15956 #include "confdefs.h"
15957 #include <errno.h>
15958 int main() {
15959 char *c = (char *) *sys_errlist
15960 ; return 0; }
15961 EOF
15962 if { (eval echo configure:15963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15963   rm -rf conftest*
15964   ol_cv_have_sys_errlist=yes
15965 else
15966   echo "configure: failed program was:" >&5
15967   cat conftest.$ac_ext >&5
15968   rm -rf conftest*
15969   ol_cv_have_sys_errlist=no
15970 fi
15971 rm -f conftest*
15972 fi
15973
15974 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15975 fi
15976 if test $ol_cv_have_sys_errlist = yes ; then
15977         cat >> confdefs.h <<\EOF
15978 #define HAVE_SYS_ERRLIST 1
15979 EOF
15980
15981 fi
15982
15983
15984
15985 if test "$ol_enable_debug" != no ; then
15986         cat >> confdefs.h <<\EOF
15987 #define LDAP_DEBUG 1
15988 EOF
15989
15990 fi
15991 if test "$ol_enable_syslog" = yes ; then
15992         cat >> confdefs.h <<\EOF
15993 #define LDAP_SYSLOG 1
15994 EOF
15995
15996 fi
15997 if test "$ol_enable_libui" = yes ; then
15998         cat >> confdefs.h <<\EOF
15999 #define LDAP_LIBUI 1
16000 EOF
16001
16002 fi
16003 if test "$ol_enable_cache" = no ; then
16004         cat >> confdefs.h <<\EOF
16005 #define LDAP_NOCACHE 1
16006 EOF
16007
16008 fi
16009 if test "$ol_link_kbind" != no ; then
16010         cat >> confdefs.h <<\EOF
16011 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16012 EOF
16013
16014 fi
16015 if test "$ol_enable_dns" != no ; then
16016         cat >> confdefs.h <<\EOF
16017 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
16018 EOF
16019
16020 fi
16021 if test "$ol_enable_proctitle" != no ; then
16022         cat >> confdefs.h <<\EOF
16023 #define LDAP_PROCTITLE 1
16024 EOF
16025
16026 fi
16027 if test "$ol_enable_referrals" != no ; then
16028         cat >> confdefs.h <<\EOF
16029 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16030 EOF
16031
16032 fi
16033 if test "$ol_enable_cldap" != no ; then
16034         cat >> confdefs.h <<\EOF
16035 #define LDAP_CONNECTIONLESS 1
16036 EOF
16037
16038 fi
16039 if test "$ol_enable_ldapi" != no; then
16040         cat >> confdefs.h <<\EOF
16041 #define USE_PF_LOCAL 1
16042 EOF
16043
16044 fi
16045
16046 if test "$ol_enable_cleartext" != no ; then
16047         cat >> confdefs.h <<\EOF
16048 #define SLAPD_CLEARTEXT 1
16049 EOF
16050
16051 fi
16052 if test "$ol_enable_crypt" != no ; then
16053         cat >> confdefs.h <<\EOF
16054 #define SLAPD_CRYPT 1
16055 EOF
16056
16057 fi
16058 if test "$ol_link_kpasswd" != no ; then
16059         cat >> confdefs.h <<\EOF
16060 #define SLAPD_KPASSWD 1
16061 EOF
16062
16063 fi
16064 if test "$ol_link_spasswd" != no ; then
16065         cat >> confdefs.h <<\EOF
16066 #define SLAPD_SPASSWD 1
16067 EOF
16068
16069 fi
16070 if test "$ol_enable_multimaster" != no ; then
16071         cat >> confdefs.h <<\EOF
16072 #define SLAPD_MULTIMASTER 1
16073 EOF
16074
16075 fi
16076 if test "$ol_enable_phonetic" != no ; then
16077         cat >> confdefs.h <<\EOF
16078 #define SLAPD_PHONETIC 1
16079 EOF
16080
16081 fi
16082 if test "$ol_enable_rlookups" != no ; then
16083         cat >> confdefs.h <<\EOF
16084 #define SLAPD_RLOOKUPS 1
16085 EOF
16086
16087 fi
16088 if test "$ol_enable_aci" != no ; then
16089         cat >> confdefs.h <<\EOF
16090 #define SLAPD_ACI_ENABLED 1
16091 EOF
16092
16093 fi
16094
16095 if test "$ol_link_modules" != no ; then
16096         cat >> confdefs.h <<\EOF
16097 #define SLAPD_MODULES 1
16098 EOF
16099
16100         BUILD_SLAPD=yes
16101         SLAPD_MODULES_LDFLAGS="-dlopen self"
16102 fi
16103
16104 if test "$ol_link_bdb2" != no ; then
16105         cat >> confdefs.h <<\EOF
16106 #define SLAPD_BDB2 1
16107 EOF
16108
16109         BUILD_SLAPD=yes
16110         BUILD_BDB2=yes
16111         if test "$ol_with_bdb2_module" != static ; then
16112                 cat >> confdefs.h <<\EOF
16113 #define SLAPD_BDB2_DYNAMIC 1
16114 EOF
16115
16116                 BUILD_BDB2=mod
16117                 BUILD_BDB2_DYNAMIC=shared
16118                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
16119         fi
16120 fi
16121
16122 if test "$ol_enable_dnssrv" != no ; then
16123         cat >> confdefs.h <<\EOF
16124 #define SLAPD_DNSSRV 1
16125 EOF
16126
16127         BUILD_SLAPD=yes
16128         BUILD_DNSSRV=yes
16129         if test "$ol_with_dnssrv_module" != static ; then
16130                 cat >> confdefs.h <<\EOF
16131 #define SLAPD_DNSSRV_DYNAMIC 1
16132 EOF
16133
16134                 BUILD_DNSSRV=mod
16135                 BUILD_DNSSRV_DYNAMIC=shared
16136                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16137         fi
16138 fi
16139
16140 if test "$ol_enable_ldap" != no ; then
16141         cat >> confdefs.h <<\EOF
16142 #define SLAPD_LDAP 1
16143 EOF
16144
16145         BUILD_SLAPD=yes
16146         BUILD_LDAP=yes
16147         if test "$ol_with_ldap_module" != static ; then
16148                 cat >> confdefs.h <<\EOF
16149 #define SLAPD_LDAP_DYNAMIC 1
16150 EOF
16151
16152                 BUILD_LDAP=mod
16153                 BUILD_LDAP_DYNAMIC=shared
16154                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16155         fi
16156 fi
16157
16158 if test "$ol_link_ldbm" != no ; then
16159         cat >> confdefs.h <<\EOF
16160 #define SLAPD_LDBM 1
16161 EOF
16162
16163         BUILD_SLAPD=yes
16164         BUILD_LDBM=yes
16165         if test "$ol_with_ldbm_module" != static ; then
16166                 cat >> confdefs.h <<\EOF
16167 #define SLAPD_LDBM_DYNAMIC 1
16168 EOF
16169
16170                 BUILD_LDBM=mod
16171                 BUILD_LDBM_DYNAMIC=shared
16172                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16173         fi
16174 fi
16175
16176 if test "$ol_enable_passwd" != no ; then
16177         cat >> confdefs.h <<\EOF
16178 #define SLAPD_PASSWD 1
16179 EOF
16180
16181         BUILD_SLAPD=yes
16182         BUILD_PASSWD=yes
16183         if test "$ol_with_passwd_module" != static ; then
16184                 cat >> confdefs.h <<\EOF
16185 #define SLAPD_PASSWD_DYNAMIC 1
16186 EOF
16187
16188                 BUILD_PASSWD=mod
16189                 BUILD_PASSWD_DYNAMIC=shared
16190                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16191         fi
16192 fi
16193
16194 if test "$ol_link_perl" != no ; then
16195         cat >> confdefs.h <<\EOF
16196 #define SLAPD_PERL 1
16197 EOF
16198
16199         BUILD_SLAPD=yes
16200         BUILD_PERL=yes
16201         if test "$ol_with_perl_module" != static ; then
16202                 cat >> confdefs.h <<\EOF
16203 #define SLAPD_PERL_DYNAMIC 1
16204 EOF
16205
16206                 BUILD_PERL=mod
16207                 BUILD_PERL_DYNAMIC=shared
16208                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16209         fi
16210 fi
16211
16212 if test "$ol_enable_shell" != no ; then
16213         cat >> confdefs.h <<\EOF
16214 #define SLAPD_SHELL 1
16215 EOF
16216
16217         BUILD_SLAPD=yes
16218         BUILD_SHELL=yes
16219         if test "$ol_with_shell_module" != static ; then
16220                 cat >> confdefs.h <<\EOF
16221 #define SLAPD_SHELL_DYNAMIC 1
16222 EOF
16223
16224                 BUILD_SHELL=mod
16225                 BUILD_SHELL_DYNAMIC=shared
16226                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16227         fi
16228 fi
16229
16230 if test "$ol_enable_tcl" != no ; then
16231         cat >> confdefs.h <<\EOF
16232 #define SLAPD_TCL 1
16233 EOF
16234
16235         BUILD_SLAPD=yes
16236         BUILD_TCL=yes
16237         if test "$ol_with_tcl_module" != static; then
16238                 cat >> confdefs.h <<\EOF
16239 #define SLAPD_TCL_DYNAMIC 1
16240 EOF
16241
16242                 BUILD_TCL=mod
16243                 BUILD_TCL_DYNAMIC=shared
16244                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16245         fi
16246 fi
16247
16248 if test "$ol_enable_sql" != no ; then
16249         cat >> confdefs.h <<\EOF
16250 #define SLAPD_SQL 1
16251 EOF
16252
16253         BUILD_SLAPD=yes
16254         BUILD_SQL=yes
16255         SLAPD_SQL_LIBS=-liodbc
16256         if test "$ol_with_sql_module" != static; then
16257                 cat >> confdefs.h <<\EOF
16258 #define SLAPD_SQL_DYNAMIC 1
16259 EOF
16260
16261                 BUILD_SQL=mod
16262                 BUILD_SQL_DYNAMIC=shared
16263                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16264         fi
16265 fi
16266
16267 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16268         $BUILD_SLAPD = yes ; then
16269         BUILD_SLURPD=yes
16270 fi
16271
16272 if test "$ol_link_isode" != no ; then
16273         BUILD_LDAPD=yes
16274 fi
16275
16276
16277 if test "$LINK_BINS_DYNAMIC" = yes; then
16278     LIB_LINKAGE=DYN
16279     LT_LIB_LINKAGE=shared
16280 else
16281     LIB_LINKAGE=STAT
16282     LT_LIB_LINKAGE=static
16283 fi
16284
16285 if test "$ac_cv_mingw32" = yes ; then
16286     PLAT=NT
16287     DYN_EXT=dll
16288 else
16289     PLAT=UNIX
16290     DYN_EXT=so
16291 fi
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302   
16303   
16304   
16305   
16306   
16307   
16308   
16309   
16310   
16311   
16312   
16313   
16314   
16315   
16316   
16317   
16318   
16319   
16320   
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357 trap '' 1 2 15
16358
16359 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16360
16361 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16362 # Let make expand exec_prefix.
16363 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16364
16365 # Any assignment to VPATH causes Sun make to only execute
16366 # the first set of double-colon rules, so remove it if not needed.
16367 # If there is a colon in the path, we need to keep it.
16368 if test "x$srcdir" = x.; then
16369   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16370 fi
16371
16372 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16373
16374 DEFS=-DHAVE_CONFIG_H
16375
16376 # Without the "./", some shells look in PATH for config.status.
16377 : ${CONFIG_STATUS=./config.status}
16378
16379 echo creating $CONFIG_STATUS
16380 rm -f $CONFIG_STATUS
16381 cat > $CONFIG_STATUS <<EOF
16382 #! /bin/sh
16383 # Generated automatically by configure.
16384 # Run this file to recreate the current configuration.
16385 # This directory was configured as follows,
16386 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16387 #
16388 # $0 $ac_configure_args
16389 #
16390 # Compiler output produced by configure, useful for debugging
16391 # configure, is in ./config.log if it exists.
16392
16393 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16394 for ac_option
16395 do
16396   case "\$ac_option" in
16397   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16398     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16399     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16400   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16401     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16402     exit 0 ;;
16403   -help | --help | --hel | --he | --h)
16404     echo "\$ac_cs_usage"; exit 0 ;;
16405   *) echo "\$ac_cs_usage"; exit 1 ;;
16406   esac
16407 done
16408
16409 ac_given_srcdir=$srcdir
16410 ac_given_INSTALL="$INSTALL"
16411
16412 trap 'rm -fr `echo "\
16413 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16414 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16415 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16416 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16417 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16418 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16419 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16420 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16421 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16422 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16423 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16424 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16425 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16426 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16427 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16428 include/Makefile:build/top.mk:include/Makefile.in \
16429 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16430 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16431 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16432 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16433 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16434 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16435 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16436 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16437 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16438 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16439 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
16440 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16441 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16442 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16443 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16444 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16445 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16446 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16447 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16448 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16449 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16450 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16451 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16452 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16453 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16454 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16455 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16456 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16457 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16458  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16459 EOF
16460 cat >> $CONFIG_STATUS <<EOF
16461
16462 # Protect against being on the right side of a sed subst in config.status.
16463 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16464  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16465 $ac_vpsub
16466 $extrasub
16467 s%@SHELL@%$SHELL%g
16468 s%@CFLAGS@%$CFLAGS%g
16469 s%@CPPFLAGS@%$CPPFLAGS%g
16470 s%@CXXFLAGS@%$CXXFLAGS%g
16471 s%@FFLAGS@%$FFLAGS%g
16472 s%@DEFS@%$DEFS%g
16473 s%@LDFLAGS@%$LDFLAGS%g
16474 s%@LIBS@%$LIBS%g
16475 s%@exec_prefix@%$exec_prefix%g
16476 s%@prefix@%$prefix%g
16477 s%@program_transform_name@%$program_transform_name%g
16478 s%@bindir@%$bindir%g
16479 s%@sbindir@%$sbindir%g
16480 s%@libexecdir@%$libexecdir%g
16481 s%@datadir@%$datadir%g
16482 s%@sysconfdir@%$sysconfdir%g
16483 s%@sharedstatedir@%$sharedstatedir%g
16484 s%@localstatedir@%$localstatedir%g
16485 s%@libdir@%$libdir%g
16486 s%@includedir@%$includedir%g
16487 s%@oldincludedir@%$oldincludedir%g
16488 s%@infodir@%$infodir%g
16489 s%@mandir@%$mandir%g
16490 s%@host@%$host%g
16491 s%@host_alias@%$host_alias%g
16492 s%@host_cpu@%$host_cpu%g
16493 s%@host_vendor@%$host_vendor%g
16494 s%@host_os@%$host_os%g
16495 s%@target@%$target%g
16496 s%@target_alias@%$target_alias%g
16497 s%@target_cpu@%$target_cpu%g
16498 s%@target_vendor@%$target_vendor%g
16499 s%@target_os@%$target_os%g
16500 s%@build@%$build%g
16501 s%@build_alias@%$build_alias%g
16502 s%@build_cpu@%$build_cpu%g
16503 s%@build_vendor@%$build_vendor%g
16504 s%@build_os@%$build_os%g
16505 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16506 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16507 s%@INSTALL_DATA@%$INSTALL_DATA%g
16508 s%@PACKAGE@%$PACKAGE%g
16509 s%@VERSION@%$VERSION%g
16510 s%@ACLOCAL@%$ACLOCAL%g
16511 s%@AUTOCONF@%$AUTOCONF%g
16512 s%@AUTOMAKE@%$AUTOMAKE%g
16513 s%@AUTOHEADER@%$AUTOHEADER%g
16514 s%@MAKEINFO@%$MAKEINFO%g
16515 s%@install_sh@%$install_sh%g
16516 s%@AMTAR@%$AMTAR%g
16517 s%@AWK@%$AWK%g
16518 s%@AMTARFLAGS@%$AMTARFLAGS%g
16519 s%@SET_MAKE@%$SET_MAKE%g
16520 s%@top_builddir@%$top_builddir%g
16521 s%@ldap_subdir@%$ldap_subdir%g
16522 s%@CC@%$CC%g
16523 s%@RANLIB@%$RANLIB%g
16524 s%@LN_S@%$LN_S%g
16525 s%@DLLTOOL@%$DLLTOOL%g
16526 s%@AS@%$AS%g
16527 s%@OBJDUMP@%$OBJDUMP%g
16528 s%@LIBTOOL@%$LIBTOOL%g
16529 s%@LN_H@%$LN_H%g
16530 s%@SENDMAIL@%$SENDMAIL%g
16531 s%@EDITOR@%$EDITOR%g
16532 s%@FINGER@%$FINGER%g
16533 s%@PERLBIN@%$PERLBIN%g
16534 s%@CPP@%$CPP%g
16535 s%@EXEEXT@%$EXEEXT%g
16536 s%@OBJEXT@%$OBJEXT%g
16537 s%@OL_MKDEP@%$OL_MKDEP%g
16538 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16539 s%@PEPSY@%$PEPSY%g
16540 s%@LIBOBJS@%$LIBOBJS%g
16541 s%@LIBSRCS@%$LIBSRCS%g
16542 s%@PLAT@%$PLAT%g
16543 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16544 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16545 s%@DYN_EXT@%$DYN_EXT%g
16546 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
16547 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16548 s%@BUILD_BDB2@%$BUILD_BDB2%g
16549 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16550 s%@BUILD_LDAP@%$BUILD_LDAP%g
16551 s%@BUILD_LDBM@%$BUILD_LDBM%g
16552 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16553 s%@BUILD_PERL@%$BUILD_PERL%g
16554 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16555 s%@BUILD_SHELL@%$BUILD_SHELL%g
16556 s%@BUILD_SQL@%$BUILD_SQL%g
16557 s%@BUILD_TCL@%$BUILD_TCL%g
16558 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
16559 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16560 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16561 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16562 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16563 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16564 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16565 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16566 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16567 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16568 s%@LDAP_LIBS@%$LDAP_LIBS%g
16569 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
16570 s%@LDIF_LIBS@%$LDIF_LIBS%g
16571 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16572 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16573 s%@LDBM_LIBS@%$LDBM_LIBS%g
16574 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16575 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16576 s%@WRAP_LIBS@%$WRAP_LIBS%g
16577 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16578 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16579 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16580 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16581 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16582 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16583 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16584 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16585 s%@KRB4_LIBS@%$KRB4_LIBS%g
16586 s%@KRB5_LIBS@%$KRB5_LIBS%g
16587 s%@READLINE_LIBS@%$READLINE_LIBS%g
16588 s%@SASL_LIBS@%$SASL_LIBS%g
16589 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16590 s%@TLS_LIBS@%$TLS_LIBS%g
16591 s%@MODULES_LIBS@%$MODULES_LIBS%g
16592 s%@AUTH_LIBS@%$AUTH_LIBS%g
16593 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16594 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16595 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16596
16597 CEOF
16598 EOF
16599
16600 cat >> $CONFIG_STATUS <<\EOF
16601
16602 # Split the substitutions into bite-sized pieces for seds with
16603 # small command number limits, like on Digital OSF/1 and HP-UX.
16604 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16605 ac_file=1 # Number of current file.
16606 ac_beg=1 # First line for current file.
16607 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16608 ac_more_lines=:
16609 ac_sed_cmds=""
16610 while $ac_more_lines; do
16611   if test $ac_beg -gt 1; then
16612     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16613   else
16614     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16615   fi
16616   if test ! -s conftest.s$ac_file; then
16617     ac_more_lines=false
16618     rm -f conftest.s$ac_file
16619   else
16620     if test -z "$ac_sed_cmds"; then
16621       ac_sed_cmds="sed -f conftest.s$ac_file"
16622     else
16623       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16624     fi
16625     ac_file=`expr $ac_file + 1`
16626     ac_beg=$ac_end
16627     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16628   fi
16629 done
16630 if test -z "$ac_sed_cmds"; then
16631   ac_sed_cmds=cat
16632 fi
16633 EOF
16634
16635 cat >> $CONFIG_STATUS <<EOF
16636
16637 CONFIG_FILES=\${CONFIG_FILES-"\
16638 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16639 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16640 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16641 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16642 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16643 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16644 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16645 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16646 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16647 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16648 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16649 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16650 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16651 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16652 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16653 include/Makefile:build/top.mk:include/Makefile.in \
16654 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16655 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16656 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16657 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16658 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16659 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16660 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16661 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16662 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16663 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16664 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
16665 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16666 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16667 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16668 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16669 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16670 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16671 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16672 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16673 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16674 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16675 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16676 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16677 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16678 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16679 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16680 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16681 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16682 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16683 "}
16684 EOF
16685 cat >> $CONFIG_STATUS <<\EOF
16686 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16687   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16688   case "$ac_file" in
16689   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16690        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16691   *) ac_file_in="${ac_file}.in" ;;
16692   esac
16693
16694   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16695
16696   # Remove last slash and all that follows it.  Not all systems have dirname.
16697   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16698   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16699     # The file is in a subdirectory.
16700     test ! -d "$ac_dir" && mkdir "$ac_dir"
16701     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16702     # A "../" for each directory in $ac_dir_suffix.
16703     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16704   else
16705     ac_dir_suffix= ac_dots=
16706   fi
16707
16708   case "$ac_given_srcdir" in
16709   .)  srcdir=.
16710       if test -z "$ac_dots"; then top_srcdir=.
16711       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16712   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16713   *) # Relative path.
16714     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16715     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16716   esac
16717
16718   case "$ac_given_INSTALL" in
16719   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16720   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16721   esac
16722
16723   echo creating "$ac_file"
16724   rm -f "$ac_file"
16725   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16726   case "$ac_file" in
16727   *[Mm]akefile*) ac_comsub="1i\\
16728 # $configure_input" ;;
16729   *) ac_comsub= ;;
16730   esac
16731
16732   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16733   sed -e "$ac_comsub
16734 s%@configure_input@%$configure_input%g
16735 s%@srcdir@%$srcdir%g
16736 s%@top_srcdir@%$top_srcdir%g
16737 s%@INSTALL@%$INSTALL%g
16738 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16739 fi; done
16740 rm -f conftest.s*
16741
16742 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16743 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16744 #
16745 # ac_d sets the value in "#define NAME VALUE" lines.
16746 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16747 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16748 ac_dC='\3'
16749 ac_dD='%g'
16750 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16751 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16752 ac_uB='\([      ]\)%\1#\2define\3'
16753 ac_uC=' '
16754 ac_uD='\4%g'
16755 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16756 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16757 ac_eB='$%\1#\2define\3'
16758 ac_eC=' '
16759 ac_eD='%g'
16760
16761 if test "${CONFIG_HEADERS+set}" != set; then
16762 EOF
16763 cat >> $CONFIG_STATUS <<EOF
16764   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16765 EOF
16766 cat >> $CONFIG_STATUS <<\EOF
16767 fi
16768 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16769   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16770   case "$ac_file" in
16771   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16772        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16773   *) ac_file_in="${ac_file}.in" ;;
16774   esac
16775
16776   echo creating $ac_file
16777
16778   rm -f conftest.frag conftest.in conftest.out
16779   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16780   cat $ac_file_inputs > conftest.in
16781
16782 EOF
16783
16784 # Transform confdefs.h into a sed script conftest.vals that substitutes
16785 # the proper values into config.h.in to produce config.h.  And first:
16786 # Protect against being on the right side of a sed subst in config.status.
16787 # Protect against being in an unquoted here document in config.status.
16788 rm -f conftest.vals
16789 cat > conftest.hdr <<\EOF
16790 s/[\\&%]/\\&/g
16791 s%[\\$`]%\\&%g
16792 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16793 s%ac_d%ac_u%gp
16794 s%ac_u%ac_e%gp
16795 EOF
16796 sed -n -f conftest.hdr confdefs.h > conftest.vals
16797 rm -f conftest.hdr
16798
16799 # This sed command replaces #undef with comments.  This is necessary, for
16800 # example, in the case of _POSIX_SOURCE, which is predefined and required
16801 # on some systems where configure will not decide to define it.
16802 cat >> conftest.vals <<\EOF
16803 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16804 EOF
16805
16806 # Break up conftest.vals because some shells have a limit on
16807 # the size of here documents, and old seds have small limits too.
16808
16809 rm -f conftest.tail
16810 while :
16811 do
16812   ac_lines=`grep -c . conftest.vals`
16813   # grep -c gives empty output for an empty file on some AIX systems.
16814   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16815   # Write a limited-size here document to conftest.frag.
16816   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16817   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16818   echo 'CEOF
16819   sed -f conftest.frag conftest.in > conftest.out
16820   rm -f conftest.in
16821   mv conftest.out conftest.in
16822 ' >> $CONFIG_STATUS
16823   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16824   rm -f conftest.vals
16825   mv conftest.tail conftest.vals
16826 done
16827 rm -f conftest.vals
16828
16829 cat >> $CONFIG_STATUS <<\EOF
16830   rm -f conftest.frag conftest.h
16831   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16832   cat conftest.in >> conftest.h
16833   rm -f conftest.in
16834   if cmp -s $ac_file conftest.h 2>/dev/null; then
16835     echo "$ac_file is unchanged"
16836     rm -f conftest.h
16837   else
16838     # Remove last slash and all that follows it.  Not all systems have dirname.
16839       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16840       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16841       # The file is in a subdirectory.
16842       test ! -d "$ac_dir" && mkdir "$ac_dir"
16843     fi
16844     rm -f $ac_file
16845     mv conftest.h $ac_file
16846   fi
16847 fi; done
16848
16849 EOF
16850 cat >> $CONFIG_STATUS <<EOF
16851
16852 EOF
16853 cat >> $CONFIG_STATUS <<\EOF
16854
16855 date > stamp-h
16856 echo Please \"make depend\" to build dependencies
16857
16858 exit 0
16859 EOF
16860 chmod +x $CONFIG_STATUS
16861 rm -fr confdefs* $ac_clean_files
16862 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16863