]> git.sur5r.net Git - openldap/blob - configure
5128f47aed71b3e3ccc87974a8c258ab407f5acb
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.284 2000/01/08 17:42:15 kdz Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-kbind        enable V2 Kerberos IV bind (auto)"
43 ac_help="$ac_help
44   --enable-cldap        enable connectionless ldap (no)"
45 ac_help="$ac_help
46   --enable-ldapi        enable domain socket (PF_LOCAL) ldap (no)"
47 ac_help="$ac_help
48   --enable-x-compile    enable cross compiling (no)"
49 ac_help="$ac_help
50   --enable-dmalloc      enable debug malloc support (no)"
51 ac_help="$ac_help
52   --with-cyrus-sasl     with Cyrus SASL support (auto)"
53 ac_help="$ac_help
54   --with-fetch          with fetch URL support (auto)"
55 ac_help="$ac_help
56   --with-kerberos       with support (auto)"
57 ac_help="$ac_help
58   --with-readline       with readline support (auto)"
59 ac_help="$ac_help
60   --with-threads        use threads (auto)"
61 ac_help="$ac_help
62   --with-tls            with TLS/SSL support (auto)"
63 ac_help="$ac_help
64   --with-yielding-select        with implicitly yielding select (auto)"
65 ac_help="$ac_help
66 LDAPD (X.500-to-LDAP Gateway) Options:"
67 ac_help="$ac_help
68   --enable-ldapd        enable building ldapd (no)"
69 ac_help="$ac_help
70 SLAPD (Standalone LDAP Daemon) Options:"
71 ac_help="$ac_help
72   --enable-slapd        enable building slapd (yes)"
73 ac_help="$ac_help
74     --enable-cleartext  enable cleartext passwords (yes)"
75 ac_help="$ac_help
76     --enable-crypt      enable crypt(3) passwords (auto)"
77 ac_help="$ac_help
78     --enable-kpasswd    enable kerberos password verification (no)"
79 ac_help="$ac_help
80     --enable-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-discreteaci        enable discrete rights in ACIs (no)"
93 ac_help="$ac_help
94     --enable-wrappers   enable tcp wrapper support (no)"
95 ac_help="$ac_help
96     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
97 ac_help="$ac_help
98     --enable-bdb2       enable bdb2 backend (no)"
99 ac_help="$ac_help
100       --with-bdb2-module        module type (static)"
101 ac_help="$ac_help
102     --enable-ldap       enable ldap backend (no)"
103 ac_help="$ac_help
104       --with-ldap-module        module type (static)"
105 ac_help="$ac_help
106     --enable-ldbm       enable ldbm backend (yes)"
107 ac_help="$ac_help
108       --with-ldbm-api   use LDBM API (auto)"
109 ac_help="$ac_help
110       --with-ldbm-module        module type (static)"
111 ac_help="$ac_help
112       --with-ldbm-type  use LDBM type (auto)"
113 ac_help="$ac_help
114     --enable-passwd     enable passwd backend (no)"
115 ac_help="$ac_help
116       --with-passwd-module      module type (static)"
117 ac_help="$ac_help
118     --enable-perl       enable perl backend (no)"
119 ac_help="$ac_help
120       --with-perl-module        module type (static)"
121 ac_help="$ac_help
122     --enable-shell      enable shell backend (no)"
123 ac_help="$ac_help
124       --with-shell-module       module type (static)"
125 ac_help="$ac_help
126     --enable-tcl        enable tcl backend (no)"
127 ac_help="$ac_help
128       --with-tcl-module module type (static)"
129 ac_help="$ac_help
130 SLURPD (Replication Daemon) Options:"
131 ac_help="$ac_help
132   --enable-slurpd       enable building slurpd (auto)"
133 ac_help="$ac_help
134 Library Generation & Linking Options"
135 ac_help="$ac_help
136   --enable-static[=PKGS]  build static libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-shared[=PKGS]  build shared libraries [default=yes]"
139 ac_help="$ac_help
140   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
141 ac_help="$ac_help
142   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
143 ac_help="$ac_help
144   --disable-libtool-lock  avoid locking (might break parallel builds)"
145
146 # Initialize some variables set by options.
147 # The variables have the same names as the options, with
148 # dashes changed to underlines.
149 build=NONE
150 cache_file=./config.cache
151 exec_prefix=NONE
152 host=NONE
153 no_create=
154 nonopt=NONE
155 no_recursion=
156 prefix=NONE
157 program_prefix=NONE
158 program_suffix=NONE
159 program_transform_name=s,x,x,
160 silent=
161 site=
162 srcdir=
163 target=NONE
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167 bindir='${exec_prefix}/bin'
168 sbindir='${exec_prefix}/sbin'
169 libexecdir='${exec_prefix}/libexec'
170 datadir='${prefix}/share'
171 sysconfdir='${prefix}/etc'
172 sharedstatedir='${prefix}/com'
173 localstatedir='${prefix}/var'
174 libdir='${exec_prefix}/lib'
175 includedir='${prefix}/include'
176 oldincludedir='/usr/include'
177 infodir='${prefix}/info'
178 mandir='${prefix}/man'
179
180 # Initialize some other variables.
181 subdirs=
182 MFLAGS= MAKEFLAGS=
183 SHELL=${CONFIG_SHELL-/bin/sh}
184 # Maximum number of lines to put in a shell here document.
185 ac_max_here_lines=12
186
187 ac_prev=
188 for ac_option
189 do
190
191   # If the previous option needs an argument, assign it.
192   if test -n "$ac_prev"; then
193     eval "$ac_prev=\$ac_option"
194     ac_prev=
195     continue
196   fi
197
198   case "$ac_option" in
199   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
200   *) ac_optarg= ;;
201   esac
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case "$ac_option" in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir="$ac_optarg" ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build="$ac_optarg" ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file="$ac_optarg" ;;
223
224   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
225     ac_prev=datadir ;;
226   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
227   | --da=*)
228     datadir="$ac_optarg" ;;
229
230   -disable-* | --disable-*)
231     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
232     # Reject names that are not valid shell variable names.
233     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
234       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
235     fi
236     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
237     eval "enable_${ac_feature}=no" ;;
238
239   -enable-* | --enable-*)
240     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
241     # Reject names that are not valid shell variable names.
242     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
243       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
244     fi
245     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
246     case "$ac_option" in
247       *=*) ;;
248       *) ac_optarg=yes ;;
249     esac
250     eval "enable_${ac_feature}='$ac_optarg'" ;;
251
252   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
253   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
254   | --exec | --exe | --ex)
255     ac_prev=exec_prefix ;;
256   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
257   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
258   | --exec=* | --exe=* | --ex=*)
259     exec_prefix="$ac_optarg" ;;
260
261   -gas | --gas | --ga | --g)
262     # Obsolete; use --with-gas.
263     with_gas=yes ;;
264
265   -help | --help | --hel | --he)
266     # Omit some internal or obsolete options to make the list less imposing.
267     # This message is too long to be a string in the A/UX 3.1 sh.
268     cat << EOF
269 Usage: configure [options] [host]
270 Options: [defaults in brackets after descriptions]
271 Configuration:
272   --cache-file=FILE       cache test results in FILE
273   --help                  print this message
274   --no-create             do not create output files
275   --quiet, --silent       do not print \`checking...' messages
276   --version               print the version of autoconf that created configure
277 Directory and file names:
278   --prefix=PREFIX         install architecture-independent files in PREFIX
279                           [$ac_default_prefix]
280   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
281                           [same as prefix]
282   --bindir=DIR            user executables in DIR [EPREFIX/bin]
283   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
284   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
285   --datadir=DIR           read-only architecture-independent data in DIR
286                           [PREFIX/share]
287   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
288   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
289                           [PREFIX/com]
290   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
291   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
292   --includedir=DIR        C header files in DIR [PREFIX/include]
293   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
294   --infodir=DIR           info documentation in DIR [PREFIX/info]
295   --mandir=DIR            man documentation in DIR [PREFIX/man]
296   --srcdir=DIR            find the sources in DIR [configure dir or ..]
297   --program-prefix=PREFIX prepend PREFIX to installed program names
298   --program-suffix=SUFFIX append SUFFIX to installed program names
299   --program-transform-name=PROGRAM
300                           run sed PROGRAM on installed program names
301 EOF
302     cat << EOF
303 Host type:
304   --build=BUILD           configure for building on BUILD [BUILD=HOST]
305   --host=HOST             configure for HOST [guessed]
306   --target=TARGET         configure for TARGET [TARGET=HOST]
307 Features and packages:
308   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
309   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
310   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
311   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
312   --x-includes=DIR        X include files are in DIR
313   --x-libraries=DIR       X library files are in DIR
314 EOF
315     if test -n "$ac_help"; then
316       echo "--enable and --with options recognized:$ac_help"
317     fi
318     exit 0 ;;
319
320   -host | --host | --hos | --ho)
321     ac_prev=host ;;
322   -host=* | --host=* | --hos=* | --ho=*)
323     host="$ac_optarg" ;;
324
325   -includedir | --includedir | --includedi | --included | --include \
326   | --includ | --inclu | --incl | --inc)
327     ac_prev=includedir ;;
328   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
329   | --includ=* | --inclu=* | --incl=* | --inc=*)
330     includedir="$ac_optarg" ;;
331
332   -infodir | --infodir | --infodi | --infod | --info | --inf)
333     ac_prev=infodir ;;
334   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
335     infodir="$ac_optarg" ;;
336
337   -libdir | --libdir | --libdi | --libd)
338     ac_prev=libdir ;;
339   -libdir=* | --libdir=* | --libdi=* | --libd=*)
340     libdir="$ac_optarg" ;;
341
342   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
343   | --libexe | --libex | --libe)
344     ac_prev=libexecdir ;;
345   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
346   | --libexe=* | --libex=* | --libe=*)
347     libexecdir="$ac_optarg" ;;
348
349   -localstatedir | --localstatedir | --localstatedi | --localstated \
350   | --localstate | --localstat | --localsta | --localst \
351   | --locals | --local | --loca | --loc | --lo)
352     ac_prev=localstatedir ;;
353   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
354   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
355   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
356     localstatedir="$ac_optarg" ;;
357
358   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
359     ac_prev=mandir ;;
360   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
361     mandir="$ac_optarg" ;;
362
363   -nfp | --nfp | --nf)
364     # Obsolete; use --without-fp.
365     with_fp=no ;;
366
367   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
368   | --no-cr | --no-c)
369     no_create=yes ;;
370
371   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
372   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
373     no_recursion=yes ;;
374
375   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
376   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
377   | --oldin | --oldi | --old | --ol | --o)
378     ac_prev=oldincludedir ;;
379   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
380   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
381   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
382     oldincludedir="$ac_optarg" ;;
383
384   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
385     ac_prev=prefix ;;
386   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
387     prefix="$ac_optarg" ;;
388
389   -program-prefix | --program-prefix | --program-prefi | --program-pref \
390   | --program-pre | --program-pr | --program-p)
391     ac_prev=program_prefix ;;
392   -program-prefix=* | --program-prefix=* | --program-prefi=* \
393   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
394     program_prefix="$ac_optarg" ;;
395
396   -program-suffix | --program-suffix | --program-suffi | --program-suff \
397   | --program-suf | --program-su | --program-s)
398     ac_prev=program_suffix ;;
399   -program-suffix=* | --program-suffix=* | --program-suffi=* \
400   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
401     program_suffix="$ac_optarg" ;;
402
403   -program-transform-name | --program-transform-name \
404   | --program-transform-nam | --program-transform-na \
405   | --program-transform-n | --program-transform- \
406   | --program-transform | --program-transfor \
407   | --program-transfo | --program-transf \
408   | --program-trans | --program-tran \
409   | --progr-tra | --program-tr | --program-t)
410     ac_prev=program_transform_name ;;
411   -program-transform-name=* | --program-transform-name=* \
412   | --program-transform-nam=* | --program-transform-na=* \
413   | --program-transform-n=* | --program-transform-=* \
414   | --program-transform=* | --program-transfor=* \
415   | --program-transfo=* | --program-transf=* \
416   | --program-trans=* | --program-tran=* \
417   | --progr-tra=* | --program-tr=* | --program-t=*)
418     program_transform_name="$ac_optarg" ;;
419
420   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
421   | -silent | --silent | --silen | --sile | --sil)
422     silent=yes ;;
423
424   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
425     ac_prev=sbindir ;;
426   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
427   | --sbi=* | --sb=*)
428     sbindir="$ac_optarg" ;;
429
430   -sharedstatedir | --sharedstatedir | --sharedstatedi \
431   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
432   | --sharedst | --shareds | --shared | --share | --shar \
433   | --sha | --sh)
434     ac_prev=sharedstatedir ;;
435   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
436   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
437   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
438   | --sha=* | --sh=*)
439     sharedstatedir="$ac_optarg" ;;
440
441   -site | --site | --sit)
442     ac_prev=site ;;
443   -site=* | --site=* | --sit=*)
444     site="$ac_optarg" ;;
445
446   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
447     ac_prev=srcdir ;;
448   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
449     srcdir="$ac_optarg" ;;
450
451   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
452   | --syscon | --sysco | --sysc | --sys | --sy)
453     ac_prev=sysconfdir ;;
454   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
455   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
456     sysconfdir="$ac_optarg" ;;
457
458   -target | --target | --targe | --targ | --tar | --ta | --t)
459     ac_prev=target ;;
460   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
461     target="$ac_optarg" ;;
462
463   -v | -verbose | --verbose | --verbos | --verbo | --verb)
464     verbose=yes ;;
465
466   -version | --version | --versio | --versi | --vers)
467     echo "configure generated by autoconf version 2.13.1"
468     exit 0 ;;
469
470   -with-* | --with-*)
471     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
472     # Reject names that are not valid shell variable names.
473     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
474       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
475     fi
476     ac_package=`echo $ac_package| sed 's/-/_/g'`
477     case "$ac_option" in
478       *=*) ;;
479       *) ac_optarg=yes ;;
480     esac
481     eval "with_${ac_package}='$ac_optarg'" ;;
482
483   -without-* | --without-*)
484     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
485     # Reject names that are not valid shell variable names.
486     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
487       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
488     fi
489     ac_package=`echo $ac_package| sed 's/-/_/g'`
490     eval "with_${ac_package}=no" ;;
491
492   --x)
493     # Obsolete; use --with-x.
494     with_x=yes ;;
495
496   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
497   | --x-incl | --x-inc | --x-in | --x-i)
498     ac_prev=x_includes ;;
499   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
500   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
501     x_includes="$ac_optarg" ;;
502
503   -x-libraries | --x-libraries | --x-librarie | --x-librari \
504   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
505     ac_prev=x_libraries ;;
506   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
507   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
508     x_libraries="$ac_optarg" ;;
509
510   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
511     ;;
512
513   *)
514     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
515       echo "configure: warning: $ac_option: invalid host type" 1>&2
516     fi
517     if test "x$nonopt" != xNONE; then
518       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
519     fi
520     nonopt="$ac_option"
521     ;;
522
523   esac
524 done
525
526 if test -n "$ac_prev"; then
527   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
528 fi
529
530 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
531
532 # File descriptor usage:
533 # 0 standard input
534 # 1 file creation
535 # 2 errors and warnings
536 # 3 some systems may open it to /dev/tty
537 # 4 used on the Kubota Titan
538 # 6 checking for... messages and results
539 # 5 compiler messages saved in config.log
540 if test "$silent" = yes; then
541   exec 6>/dev/null
542 else
543   exec 6>&1
544 fi
545 exec 5>./config.log
546
547 echo "\
548 This file contains any messages produced by compilers while
549 running configure, to aid debugging if configure makes a mistake.
550 " 1>&5
551
552 # Strip out --no-create and --no-recursion so they do not pile up.
553 # Also quote any args containing shell metacharacters.
554 ac_configure_args=
555 for ac_arg
556 do
557   case "$ac_arg" in
558   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
559   | --no-cr | --no-c) ;;
560   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
561   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
562   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
563   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
564   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
565   esac
566 done
567
568 # NLS nuisances.
569 # Only set these to C if already set.  These must not be set unconditionally
570 # because not all systems understand e.g. LANG=C (notably SCO).
571 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
572 # Non-C LC_CTYPE values break the ctype check.
573 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
574 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
575 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
576 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
577
578 # confdefs.h avoids OS command line length limits that DEFS can exceed.
579 rm -rf conftest* confdefs.h
580 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
581 echo > confdefs.h
582
583 # A filename unique to this package, relative to the directory that
584 # configure is in, which we can look for to find out if srcdir is correct.
585 ac_unique_file=build/version
586
587 # Find the source files, if location was not specified.
588 if test -z "$srcdir"; then
589   ac_srcdir_defaulted=yes
590   # Try the directory containing this script, then its parent.
591   ac_prog=$0
592   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
593   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
594   srcdir=$ac_confdir
595   if test ! -r $srcdir/$ac_unique_file; then
596     srcdir=..
597   fi
598 else
599   ac_srcdir_defaulted=no
600 fi
601 if test ! -r $srcdir/$ac_unique_file; then
602   if test "$ac_srcdir_defaulted" = yes; then
603     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
604   else
605     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
606   fi
607 fi
608 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
609
610 # Prefer explicitly selected file to automatically selected ones.
611 if test -z "$CONFIG_SITE"; then
612   if test "x$prefix" != xNONE; then
613     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
614   else
615     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
616   fi
617 fi
618 for ac_site_file in $CONFIG_SITE; do
619   if test -r "$ac_site_file"; then
620     echo "loading site script $ac_site_file"
621     . "$ac_site_file"
622   fi
623 done
624
625
626 ac_ext=c
627 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
628 ac_cpp='$CPP $CPPFLAGS'
629 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
630 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
631 cross_compiling=$ac_cv_prog_cc_cross
632
633 ac_exeext=
634 ac_objext=o
635 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
636   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
637   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
638     ac_n= ac_c='
639 ' ac_t='        '
640   else
641     ac_n=-n ac_c= ac_t=
642   fi
643 else
644   ac_n= ac_c='\c' ac_t=
645 fi
646
647 ac_aux_dir=
648 for ac_dir in build $srcdir/build; do
649   if test -f $ac_dir/install-sh; then
650     ac_aux_dir=$ac_dir
651     ac_install_sh="$ac_aux_dir/install-sh -c"
652     break
653   elif test -f $ac_dir/install.sh; then
654     ac_aux_dir=$ac_dir
655     ac_install_sh="$ac_aux_dir/install.sh -c"
656     break
657   elif test -f $ac_dir/shtool; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/shtool install -c"
660     break
661   fi
662 done
663 if test -z "$ac_aux_dir"; then
664   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
665 fi
666 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
667 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
668 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
669
670 OL_VERSION=`cat $ac_aux_dir/version`
671 if test -z "$OL_VERSION"; then
672         { echo "configure: error: could not determine version" 1>&2; exit 1; }
673 fi
674
675 echo "Configuring OpenLDAP $OL_VERSION ..."
676
677
678 echo $ac_n "checking host system type""... $ac_c" 1>&6
679 echo "configure:680: checking host system type" >&5
680 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
681
682 # Make sure we can run config.sub.
683   if $ac_config_sub sun4 >/dev/null 2>&1; then :
684     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
685   fi
686
687   ac_cv_host_alias=$host
688   case "$ac_cv_host_alias" in
689   NONE)
690     case $nonopt in
691     NONE)
692       if ac_cv_host_alias=`$ac_config_guess`; then :
693       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
694       fi ;;
695     *) ac_cv_host_alias=$nonopt ;;
696     esac ;;
697   esac
698
699   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
700   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
701   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
702   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
703 else
704   echo $ac_n "(cached) $ac_c" 1>&6
705 fi
706
707 echo "$ac_t""$ac_cv_host" 1>&6
708
709 host=$ac_cv_host
710 host_alias=$ac_cv_host_alias
711 host_cpu=$ac_cv_host_cpu
712 host_vendor=$ac_cv_host_vendor
713 host_os=$ac_cv_host_os
714
715
716
717
718
719 echo $ac_n "checking target system type""... $ac_c" 1>&6
720 echo "configure:721: checking target system type" >&5
721 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
722
723 # Make sure we can run config.sub.
724   if $ac_config_sub sun4 >/dev/null 2>&1; then :
725     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
726   fi
727
728   ac_cv_target_alias=$target
729   case "$ac_cv_target_alias" in
730   NONE)
731     case $nonopt in
732     NONE)
733       ac_cv_target_alias=$host_alias ;;
734
735     *) ac_cv_target_alias=$nonopt ;;
736     esac ;;
737   esac
738
739   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
740   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
741   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
742   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
743 else
744   echo $ac_n "(cached) $ac_c" 1>&6
745 fi
746
747 echo "$ac_t""$ac_cv_target" 1>&6
748
749 target=$ac_cv_target
750 target_alias=$ac_cv_target_alias
751 target_cpu=$ac_cv_target_cpu
752 target_vendor=$ac_cv_target_vendor
753 target_os=$ac_cv_target_os
754
755
756
757
758
759 echo $ac_n "checking build system type""... $ac_c" 1>&6
760 echo "configure:761: checking build system type" >&5
761 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
762
763 # Make sure we can run config.sub.
764   if $ac_config_sub sun4 >/dev/null 2>&1; then :
765     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
766   fi
767
768   ac_cv_build_alias=$build
769   case "$ac_cv_build_alias" in
770   NONE)
771     case $nonopt in
772     NONE)
773       ac_cv_build_alias=$host_alias ;;
774
775     *) ac_cv_build_alias=$nonopt ;;
776     esac ;;
777   esac
778
779   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
780   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
781   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
782   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
783 else
784   echo $ac_n "(cached) $ac_c" 1>&6
785 fi
786
787 echo "$ac_t""$ac_cv_build" 1>&6
788
789 build=$ac_cv_build
790 build_alias=$ac_cv_build_alias
791 build_cpu=$ac_cv_build_cpu
792 build_vendor=$ac_cv_build_vendor
793 build_os=$ac_cv_build_os
794
795
796
797
798
799 # Do some error checking and defaulting for the host and target type.
800 # The inputs are:
801 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
802 #
803 # The rules are:
804 # 1. You are not allowed to specify --host, --target, and nonopt at the
805 #    same time.
806 # 2. Host defaults to nonopt.
807 # 3. If nonopt is not specified, then host defaults to the current host,
808 #    as determined by config.guess.
809 # 4. Target and build default to nonopt.
810 # 5. If nonopt is not specified, then target and build default to host.
811
812 # The aliases save the names the user supplied, while $host etc.
813 # will get canonicalized.
814 case $host---$target---$nonopt in
815 NONE---*---* | *---NONE---* | *---*---NONE) ;;
816 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
817 esac
818
819 test "$host_alias" != "$target_alias" &&
820   test "$program_prefix$program_suffix$program_transform_name" = \
821     NONENONEs,x,x, &&
822   program_prefix=${target_alias}-
823
824
825 # Find a good install program.  We prefer a C program (faster),
826 # so one script is as good as another.  But avoid the broken or
827 # incompatible versions:
828 # SysV /etc/install, /usr/sbin/install
829 # SunOS /usr/etc/install
830 # IRIX /sbin/install
831 # AIX /bin/install
832 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
833 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
834 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
835 # ./install, which can be erroneously created by make from ./install.sh.
836 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
837 echo "configure:838: checking for a BSD compatible install" >&5
838 if test -z "$INSTALL"; then
839 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
840   echo $ac_n "(cached) $ac_c" 1>&6
841 else
842     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
843   for ac_dir in $PATH; do
844     # Account for people who put trailing slashes in PATH elements.
845     case "$ac_dir/" in
846     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
847     *)
848       # OSF1 and SCO ODT 3.0 have their own names for install.
849       # Don't use installbsd from OSF since it installs stuff as root
850       # by default.
851       for ac_prog in ginstall scoinst install; do
852         if test -f $ac_dir/$ac_prog; then
853           if test $ac_prog = install &&
854             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
855             # AIX install.  It has an incompatible calling convention.
856             :
857           elif test $ac_prog = install &&
858             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
859             # program-specific install script used by HP pwplus--don't use.
860             :
861           else
862             ac_cv_path_install="$ac_dir/$ac_prog -c"
863             break 2
864           fi
865         fi
866       done
867       ;;
868     esac
869   done
870   IFS="$ac_save_IFS"
871
872 fi
873   if test "${ac_cv_path_install+set}" = set; then
874     INSTALL="$ac_cv_path_install"
875   else
876     # As a last resort, use the slow shell script.  We don't cache a
877     # path for INSTALL within a source directory, because that will
878     # break other packages using the cache if that directory is
879     # removed, or if the path is relative.
880     INSTALL="$ac_install_sh"
881   fi
882 fi
883 echo "$ac_t""$INSTALL" 1>&6
884
885 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
886 # It thinks the first close brace ends the variable substitution.
887 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
888
889 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
890
891 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
892
893 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
894 echo "configure:895: checking whether build environment is sane" >&5
895 # Just in case
896 sleep 1
897 echo timestamp > conftestfile
898 # Do `set' in a subshell so we don't clobber the current shell's
899 # arguments.  Must try -L first in case configure is actually a
900 # symlink; some systems play weird games with the mod time of symlinks
901 # (eg FreeBSD returns the mod time of the symlink's containing
902 # directory).
903 if (
904    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
905    if test "$*" = "X"; then
906       # -L didn't work.
907       set X `ls -t $srcdir/configure conftestfile`
908    fi
909    if test "$*" != "X $srcdir/configure conftestfile" \
910       && test "$*" != "X conftestfile $srcdir/configure"; then
911
912       # If neither matched, then we have a broken ls.  This can happen
913       # if, for instance, CONFIG_SHELL is bash and it inherits a
914       # broken ls alias from the environment.  This has actually
915       # happened.  Such a system could not be considered "sane".
916       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
917 alias in your environment" 1>&2; exit 1; }
918    fi
919
920    test "$2" = conftestfile
921    )
922 then
923    # Ok.
924    :
925 else
926    { echo "configure: error: newly created file is older than distributed files!
927 Check your system clock" 1>&2; exit 1; }
928 fi
929 rm -f conftest*
930 echo "$ac_t""yes" 1>&6
931 if test "$program_transform_name" = s,x,x,; then
932   program_transform_name=
933 else
934   # Double any \ or $.  echo might interpret backslashes.
935   cat <<\EOF_SED > conftestsed
936 s,\\,\\\\,g; s,\$,$$,g
937 EOF_SED
938   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
939   rm -f conftestsed
940 fi
941 test "$program_prefix" != NONE &&
942   program_transform_name="s,^,${program_prefix},;$program_transform_name"
943 # Use a double $ so make ignores it.
944 test "$program_suffix" != NONE &&
945   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
946
947 # sed with no file args requires a program.
948 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
949
950 for ac_prog in mawk gawk nawk awk
951 do
952 # Extract the first word of "$ac_prog", so it can be a program name with args.
953 set dummy $ac_prog; ac_word=$2
954 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
955 echo "configure:956: checking for $ac_word" >&5
956 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
957   echo $ac_n "(cached) $ac_c" 1>&6
958 else
959   if test -n "$AWK"; then
960   ac_cv_prog_AWK="$AWK" # Let the user override the test.
961 else
962   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
963   ac_dummy="$PATH"
964   for ac_dir in $ac_dummy; do
965     test -z "$ac_dir" && ac_dir=.
966     if test -f $ac_dir/$ac_word; then
967       ac_cv_prog_AWK="$ac_prog"
968       break
969     fi
970   done
971   IFS="$ac_save_ifs"
972 fi
973 fi
974 AWK="$ac_cv_prog_AWK"
975 if test -n "$AWK"; then
976   echo "$ac_t""$AWK" 1>&6
977 else
978   echo "$ac_t""no" 1>&6
979 fi
980
981 test -n "$AWK" && break
982 done
983
984 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
985 echo "configure:986: checking whether ${MAKE-make} sets \${MAKE}" >&5
986 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
987 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
988   echo $ac_n "(cached) $ac_c" 1>&6
989 else
990   cat > conftestmake <<\EOF
991 all:
992         @echo 'ac_maketemp="${MAKE}"'
993 EOF
994 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
995 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
996 if test -n "$ac_maketemp"; then
997   eval ac_cv_prog_make_${ac_make}_set=yes
998 else
999   eval ac_cv_prog_make_${ac_make}_set=no
1000 fi
1001 rm -f conftestmake
1002 fi
1003 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1004   echo "$ac_t""yes" 1>&6
1005   SET_MAKE=
1006 else
1007   echo "$ac_t""no" 1>&6
1008   SET_MAKE="MAKE=${MAKE-make}"
1009 fi
1010
1011
1012
1013 PACKAGE=OpenLDAP
1014
1015 VERSION=$OL_VERSION
1016
1017 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1018   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1019 fi
1020
1021
1022
1023 missing_dir=`cd $ac_aux_dir && pwd`
1024 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1025 echo "configure:1026: checking for working aclocal" >&5
1026 # Run test in a subshell; some versions of sh will print an error if
1027 # an executable is not found, even if stderr is redirected.
1028 # Redirect stdin to placate older versions of autoconf.  Sigh.
1029 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1030    ACLOCAL=aclocal
1031    echo "$ac_t""found" 1>&6
1032 else
1033    ACLOCAL="$missing_dir/missing aclocal"
1034    echo "$ac_t""missing" 1>&6
1035 fi
1036
1037 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1038 echo "configure:1039: checking for working autoconf" >&5
1039 # Run test in a subshell; some versions of sh will print an error if
1040 # an executable is not found, even if stderr is redirected.
1041 # Redirect stdin to placate older versions of autoconf.  Sigh.
1042 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1043    AUTOCONF=autoconf
1044    echo "$ac_t""found" 1>&6
1045 else
1046    AUTOCONF="$missing_dir/missing autoconf"
1047    echo "$ac_t""missing" 1>&6
1048 fi
1049
1050 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1051 echo "configure:1052: checking for working automake" >&5
1052 # Run test in a subshell; some versions of sh will print an error if
1053 # an executable is not found, even if stderr is redirected.
1054 # Redirect stdin to placate older versions of autoconf.  Sigh.
1055 if (automake --version) < /dev/null > /dev/null 2>&1; then
1056    AUTOMAKE=automake
1057    echo "$ac_t""found" 1>&6
1058 else
1059    AUTOMAKE="$missing_dir/missing automake"
1060    echo "$ac_t""missing" 1>&6
1061 fi
1062
1063 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1064 echo "configure:1065: checking for working autoheader" >&5
1065 # Run test in a subshell; some versions of sh will print an error if
1066 # an executable is not found, even if stderr is redirected.
1067 # Redirect stdin to placate older versions of autoconf.  Sigh.
1068 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1069    AUTOHEADER=autoheader
1070    echo "$ac_t""found" 1>&6
1071 else
1072    AUTOHEADER="$missing_dir/missing autoheader"
1073    echo "$ac_t""missing" 1>&6
1074 fi
1075
1076 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1077 echo "configure:1078: checking for working makeinfo" >&5
1078 # Run test in a subshell; some versions of sh will print an error if
1079 # an executable is not found, even if stderr is redirected.
1080 # Redirect stdin to placate older versions of autoconf.  Sigh.
1081 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1082    MAKEINFO=makeinfo
1083    echo "$ac_t""found" 1>&6
1084 else
1085    MAKEINFO="$missing_dir/missing makeinfo"
1086    echo "$ac_t""missing" 1>&6
1087 fi
1088
1089 install_sh="$missing_dir/install-sh"
1090 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1091
1092 for ac_prog in gnutar gtar tar
1093 do
1094 # Extract the first word of "$ac_prog", so it can be a program name with args.
1095 set dummy $ac_prog; ac_word=$2
1096 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1097 echo "configure:1098: checking for $ac_word" >&5
1098 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1099   echo $ac_n "(cached) $ac_c" 1>&6
1100 else
1101   if test -n "$AMTAR"; then
1102   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1103 else
1104   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1105   ac_dummy="$PATH"
1106   for ac_dir in $ac_dummy; do
1107     test -z "$ac_dir" && ac_dir=.
1108     if test -f $ac_dir/$ac_word; then
1109       ac_cv_prog_AMTAR="$ac_prog"
1110       break
1111     fi
1112   done
1113   IFS="$ac_save_ifs"
1114 fi
1115 fi
1116 AMTAR="$ac_cv_prog_AMTAR"
1117 if test -n "$AMTAR"; then
1118   echo "$ac_t""$AMTAR" 1>&6
1119 else
1120   echo "$ac_t""no" 1>&6
1121 fi
1122
1123 test -n "$AMTAR" && break
1124 done
1125
1126
1127 AMTARFLAGS=
1128 if test -n "$AMTAR"; then
1129   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1130         AMTARFLAGS=o
1131   fi
1132 fi
1133
1134
1135
1136 cat >> confdefs.h <<EOF
1137 #define OPENLDAP_PACKAGE "$PACKAGE"
1138 EOF
1139
1140 cat >> confdefs.h <<EOF
1141 #define OPENLDAP_VERSION "$VERSION"
1142 EOF
1143
1144
1145
1146
1147 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1148 echo "configure:1149: checking configure arguments" >&5
1149
1150
1151 top_builddir=`pwd`
1152
1153 ldap_subdir="/openldap"
1154
1155 # Check whether --with-subdir or --without-subdir was given.
1156 if test "${with_subdir+set}" = set; then
1157   withval="$with_subdir"
1158   case "$withval" in
1159         no) ldap_subdir=""
1160                 ;;
1161         yes)
1162                 ;;
1163         /*|\\*)
1164                 ldap_subdir="$withval"
1165                 ;;
1166         *)
1167                 ldap_subdir="/$withval"
1168                 ;;
1169 esac
1170
1171 fi
1172
1173
1174 # OpenLDAP --enable-debug
1175         # Check whether --enable-debug or --disable-debug was given.
1176 if test "${enable_debug+set}" = set; then
1177   enableval="$enable_debug"
1178   
1179         ol_arg=invalid
1180         for ol_val in auto yes no ; do
1181                 if test "$enableval" = "$ol_val" ; then
1182                         ol_arg="$ol_val"
1183                 fi
1184         done
1185         if test "$ol_arg" = "invalid" ; then
1186                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1187         fi
1188         ol_enable_debug="$ol_arg"
1189
1190 else
1191         ol_enable_debug="yes"
1192 fi
1193 # end --enable-debug
1194 # OpenLDAP --enable-syslog
1195         # Check whether --enable-syslog or --disable-syslog was given.
1196 if test "${enable_syslog+set}" = set; then
1197   enableval="$enable_syslog"
1198   
1199         ol_arg=invalid
1200         for ol_val in auto yes no ; do
1201                 if test "$enableval" = "$ol_val" ; then
1202                         ol_arg="$ol_val"
1203                 fi
1204         done
1205         if test "$ol_arg" = "invalid" ; then
1206                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1207         fi
1208         ol_enable_syslog="$ol_arg"
1209
1210 else
1211         ol_enable_syslog="auto"
1212 fi
1213 # end --enable-syslog
1214 # OpenLDAP --enable-proctitle
1215         # Check whether --enable-proctitle or --disable-proctitle was given.
1216 if test "${enable_proctitle+set}" = set; then
1217   enableval="$enable_proctitle"
1218   
1219         ol_arg=invalid
1220         for ol_val in auto yes no ; do
1221                 if test "$enableval" = "$ol_val" ; then
1222                         ol_arg="$ol_val"
1223                 fi
1224         done
1225         if test "$ol_arg" = "invalid" ; then
1226                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1227         fi
1228         ol_enable_proctitle="$ol_arg"
1229
1230 else
1231         ol_enable_proctitle="yes"
1232 fi
1233 # end --enable-proctitle
1234 # OpenLDAP --enable-cache
1235         # Check whether --enable-cache or --disable-cache was given.
1236 if test "${enable_cache+set}" = set; then
1237   enableval="$enable_cache"
1238   
1239         ol_arg=invalid
1240         for ol_val in auto yes no ; do
1241                 if test "$enableval" = "$ol_val" ; then
1242                         ol_arg="$ol_val"
1243                 fi
1244         done
1245         if test "$ol_arg" = "invalid" ; then
1246                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1247         fi
1248         ol_enable_cache="$ol_arg"
1249
1250 else
1251         ol_enable_cache="yes"
1252 fi
1253 # end --enable-cache
1254 # OpenLDAP --enable-dns
1255         # Check whether --enable-dns or --disable-dns was given.
1256 if test "${enable_dns+set}" = set; then
1257   enableval="$enable_dns"
1258   
1259         ol_arg=invalid
1260         for ol_val in auto yes no ; do
1261                 if test "$enableval" = "$ol_val" ; then
1262                         ol_arg="$ol_val"
1263                 fi
1264         done
1265         if test "$ol_arg" = "invalid" ; then
1266                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1267         fi
1268         ol_enable_dns="$ol_arg"
1269
1270 else
1271         ol_enable_dns="no"
1272 fi
1273 # end --enable-dns
1274 # OpenLDAP --enable-referrals
1275         # Check whether --enable-referrals or --disable-referrals was given.
1276 if test "${enable_referrals+set}" = set; then
1277   enableval="$enable_referrals"
1278   
1279         ol_arg=invalid
1280         for ol_val in auto yes no ; do
1281                 if test "$enableval" = "$ol_val" ; then
1282                         ol_arg="$ol_val"
1283                 fi
1284         done
1285         if test "$ol_arg" = "invalid" ; then
1286                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1287         fi
1288         ol_enable_referrals="$ol_arg"
1289
1290 else
1291         ol_enable_referrals="yes"
1292 fi
1293 # end --enable-referrals
1294 # OpenLDAP --enable-kbind
1295         # Check whether --enable-kbind or --disable-kbind was given.
1296 if test "${enable_kbind+set}" = set; then
1297   enableval="$enable_kbind"
1298   
1299         ol_arg=invalid
1300         for ol_val in auto yes no ; do
1301                 if test "$enableval" = "$ol_val" ; then
1302                         ol_arg="$ol_val"
1303                 fi
1304         done
1305         if test "$ol_arg" = "invalid" ; then
1306                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1307         fi
1308         ol_enable_kbind="$ol_arg"
1309
1310 else
1311         ol_enable_kbind="auto"
1312 fi
1313 # end --enable-kbind
1314 # OpenLDAP --enable-cldap
1315         # Check whether --enable-cldap or --disable-cldap was given.
1316 if test "${enable_cldap+set}" = set; then
1317   enableval="$enable_cldap"
1318   
1319         ol_arg=invalid
1320         for ol_val in auto yes no ; do
1321                 if test "$enableval" = "$ol_val" ; then
1322                         ol_arg="$ol_val"
1323                 fi
1324         done
1325         if test "$ol_arg" = "invalid" ; then
1326                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1327         fi
1328         ol_enable_cldap="$ol_arg"
1329
1330 else
1331         ol_enable_cldap="no"
1332 fi
1333 # end --enable-cldap
1334 # OpenLDAP --enable-ldapi
1335         # Check whether --enable-ldapi or --disable-ldapi was given.
1336 if test "${enable_ldapi+set}" = set; then
1337   enableval="$enable_ldapi"
1338   
1339         ol_arg=invalid
1340         for ol_val in auto yes no ; do
1341                 if test "$enableval" = "$ol_val" ; then
1342                         ol_arg="$ol_val"
1343                 fi
1344         done
1345         if test "$ol_arg" = "invalid" ; then
1346                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1347         fi
1348         ol_enable_ldapi="$ol_arg"
1349
1350 else
1351         ol_enable_ldapi="no"
1352 fi
1353 # end --enable-ldapi
1354 # OpenLDAP --enable-x_compile
1355         # Check whether --enable-x_compile or --disable-x_compile was given.
1356 if test "${enable_x_compile+set}" = set; then
1357   enableval="$enable_x_compile"
1358   
1359         ol_arg=invalid
1360         for ol_val in yes no ; do
1361                 if test "$enableval" = "$ol_val" ; then
1362                         ol_arg="$ol_val"
1363                 fi
1364         done
1365         if test "$ol_arg" = "invalid" ; then
1366                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1367         fi
1368         ol_enable_x_compile="$ol_arg"
1369
1370 else
1371         ol_enable_x_compile="no"
1372 fi
1373 # end --enable-x_compile
1374
1375 # OpenLDAP --enable-dmalloc
1376         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1377 if test "${enable_dmalloc+set}" = set; then
1378   enableval="$enable_dmalloc"
1379   
1380         ol_arg=invalid
1381         for ol_val in auto yes no ; do
1382                 if test "$enableval" = "$ol_val" ; then
1383                         ol_arg="$ol_val"
1384                 fi
1385         done
1386         if test "$ol_arg" = "invalid" ; then
1387                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1388         fi
1389         ol_enable_dmalloc="$ol_arg"
1390
1391 else
1392         ol_enable_dmalloc="no"
1393 fi
1394 # end --enable-dmalloc
1395
1396 # OpenLDAP --with-cyrus_sasl
1397         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1398 if test "${with_cyrus_sasl+set}" = set; then
1399   withval="$with_cyrus_sasl"
1400   
1401         ol_arg=invalid
1402         for ol_val in auto yes no  ; do
1403                 if test "$withval" = "$ol_val" ; then
1404                         ol_arg="$ol_val"
1405                 fi
1406         done
1407         if test "$ol_arg" = "invalid" ; then
1408                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1409         fi
1410         ol_with_cyrus_sasl="$ol_arg"
1411
1412 else
1413         ol_with_cyrus_sasl="auto"
1414 fi
1415 # end --with-cyrus_sasl
1416
1417 # OpenLDAP --with-fetch
1418         # Check whether --with-fetch or --without-fetch was given.
1419 if test "${with_fetch+set}" = set; then
1420   withval="$with_fetch"
1421   
1422         ol_arg=invalid
1423         for ol_val in auto yes no  ; do
1424                 if test "$withval" = "$ol_val" ; then
1425                         ol_arg="$ol_val"
1426                 fi
1427         done
1428         if test "$ol_arg" = "invalid" ; then
1429                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1430         fi
1431         ol_with_fetch="$ol_arg"
1432
1433 else
1434         ol_with_fetch="auto"
1435 fi
1436 # end --with-fetch
1437
1438 # OpenLDAP --with-kerberos
1439         # Check whether --with-kerberos or --without-kerberos was given.
1440 if test "${with_kerberos+set}" = set; then
1441   withval="$with_kerberos"
1442   
1443         ol_arg=invalid
1444         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1445                 if test "$withval" = "$ol_val" ; then
1446                         ol_arg="$ol_val"
1447                 fi
1448         done
1449         if test "$ol_arg" = "invalid" ; then
1450                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1451         fi
1452         ol_with_kerberos="$ol_arg"
1453
1454 else
1455         ol_with_kerberos="auto"
1456 fi
1457 # end --with-kerberos
1458
1459 # OpenLDAP --with-readline
1460         # Check whether --with-readline or --without-readline was given.
1461 if test "${with_readline+set}" = set; then
1462   withval="$with_readline"
1463   
1464         ol_arg=invalid
1465         for ol_val in auto yes no  ; do
1466                 if test "$withval" = "$ol_val" ; then
1467                         ol_arg="$ol_val"
1468                 fi
1469         done
1470         if test "$ol_arg" = "invalid" ; then
1471                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1472         fi
1473         ol_with_readline="$ol_arg"
1474
1475 else
1476         ol_with_readline="auto"
1477 fi
1478 # end --with-readline
1479
1480 # OpenLDAP --with-threads
1481         # Check whether --with-threads or --without-threads was given.
1482 if test "${with_threads+set}" = set; then
1483   withval="$with_threads"
1484   
1485         ol_arg=invalid
1486         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1487                 if test "$withval" = "$ol_val" ; then
1488                         ol_arg="$ol_val"
1489                 fi
1490         done
1491         if test "$ol_arg" = "invalid" ; then
1492                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1493         fi
1494         ol_with_threads="$ol_arg"
1495
1496 else
1497         ol_with_threads="auto"
1498 fi
1499 # end --with-threads
1500
1501 # OpenLDAP --with-tls
1502         # Check whether --with-tls or --without-tls was given.
1503 if test "${with_tls+set}" = set; then
1504   withval="$with_tls"
1505   
1506         ol_arg=invalid
1507         for ol_val in auto ssleay openssl yes no  ; do
1508                 if test "$withval" = "$ol_val" ; then
1509                         ol_arg="$ol_val"
1510                 fi
1511         done
1512         if test "$ol_arg" = "invalid" ; then
1513                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1514         fi
1515         ol_with_tls="$ol_arg"
1516
1517 else
1518         ol_with_tls="auto"
1519 fi
1520 # end --with-tls
1521
1522 # OpenLDAP --with-yielding_select
1523         # Check whether --with-yielding_select or --without-yielding_select was given.
1524 if test "${with_yielding_select+set}" = set; then
1525   withval="$with_yielding_select"
1526   
1527         ol_arg=invalid
1528         for ol_val in auto yes no manual  ; do
1529                 if test "$withval" = "$ol_val" ; then
1530                         ol_arg="$ol_val"
1531                 fi
1532         done
1533         if test "$ol_arg" = "invalid" ; then
1534                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1535         fi
1536         ol_with_yielding_select="$ol_arg"
1537
1538 else
1539         ol_with_yielding_select="auto"
1540 fi
1541 # end --with-yielding_select
1542
1543
1544 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1545 if test "${with_xxldapdoptions+set}" = set; then
1546   withval="$with_xxldapdoptions"
1547   :
1548 fi
1549
1550 # OpenLDAP --enable-ldapd
1551         # Check whether --enable-ldapd or --disable-ldapd was given.
1552 if test "${enable_ldapd+set}" = set; then
1553   enableval="$enable_ldapd"
1554   
1555         ol_arg=invalid
1556         for ol_val in auto yes no ; do
1557                 if test "$enableval" = "$ol_val" ; then
1558                         ol_arg="$ol_val"
1559                 fi
1560         done
1561         if test "$ol_arg" = "invalid" ; then
1562                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1563         fi
1564         ol_enable_ldapd="$ol_arg"
1565
1566 else
1567         ol_enable_ldapd="no"
1568 fi
1569 # end --enable-ldapd
1570
1571 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1572 if test "${with_xxslapdoptions+set}" = set; then
1573   withval="$with_xxslapdoptions"
1574   :
1575 fi
1576
1577 # OpenLDAP --enable-slapd
1578         # Check whether --enable-slapd or --disable-slapd was given.
1579 if test "${enable_slapd+set}" = set; then
1580   enableval="$enable_slapd"
1581   
1582         ol_arg=invalid
1583         for ol_val in auto yes no ; do
1584                 if test "$enableval" = "$ol_val" ; then
1585                         ol_arg="$ol_val"
1586                 fi
1587         done
1588         if test "$ol_arg" = "invalid" ; then
1589                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1590         fi
1591         ol_enable_slapd="$ol_arg"
1592
1593 else
1594         ol_enable_slapd="yes"
1595 fi
1596 # end --enable-slapd
1597 # OpenLDAP --enable-cleartext
1598         # Check whether --enable-cleartext or --disable-cleartext was given.
1599 if test "${enable_cleartext+set}" = set; then
1600   enableval="$enable_cleartext"
1601   
1602         ol_arg=invalid
1603         for ol_val in auto yes no ; do
1604                 if test "$enableval" = "$ol_val" ; then
1605                         ol_arg="$ol_val"
1606                 fi
1607         done
1608         if test "$ol_arg" = "invalid" ; then
1609                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1610         fi
1611         ol_enable_cleartext="$ol_arg"
1612
1613 else
1614         ol_enable_cleartext="yes"
1615 fi
1616 # end --enable-cleartext
1617 # OpenLDAP --enable-crypt
1618         # Check whether --enable-crypt or --disable-crypt was given.
1619 if test "${enable_crypt+set}" = set; then
1620   enableval="$enable_crypt"
1621   
1622         ol_arg=invalid
1623         for ol_val in auto yes no ; do
1624                 if test "$enableval" = "$ol_val" ; then
1625                         ol_arg="$ol_val"
1626                 fi
1627         done
1628         if test "$ol_arg" = "invalid" ; then
1629                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1630         fi
1631         ol_enable_crypt="$ol_arg"
1632
1633 else
1634         ol_enable_crypt="auto"
1635 fi
1636 # end --enable-crypt
1637 # OpenLDAP --enable-kpasswd
1638         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1639 if test "${enable_kpasswd+set}" = set; then
1640   enableval="$enable_kpasswd"
1641   
1642         ol_arg=invalid
1643         for ol_val in auto yes no ; do
1644                 if test "$enableval" = "$ol_val" ; then
1645                         ol_arg="$ol_val"
1646                 fi
1647         done
1648         if test "$ol_arg" = "invalid" ; then
1649                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1650         fi
1651         ol_enable_kpasswd="$ol_arg"
1652
1653 else
1654         ol_enable_kpasswd="no"
1655 fi
1656 # end --enable-kpasswd
1657 # OpenLDAP --enable-modules
1658         # Check whether --enable-modules or --disable-modules was given.
1659 if test "${enable_modules+set}" = set; then
1660   enableval="$enable_modules"
1661   
1662         ol_arg=invalid
1663         for ol_val in auto yes no ; do
1664                 if test "$enableval" = "$ol_val" ; then
1665                         ol_arg="$ol_val"
1666                 fi
1667         done
1668         if test "$ol_arg" = "invalid" ; then
1669                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1670         fi
1671         ol_enable_modules="$ol_arg"
1672
1673 else
1674         ol_enable_modules="no"
1675 fi
1676 # end --enable-modules
1677 # OpenLDAP --enable-multimaster
1678         # Check whether --enable-multimaster or --disable-multimaster was given.
1679 if test "${enable_multimaster+set}" = set; then
1680   enableval="$enable_multimaster"
1681   
1682         ol_arg=invalid
1683         for ol_val in auto yes no ; do
1684                 if test "$enableval" = "$ol_val" ; then
1685                         ol_arg="$ol_val"
1686                 fi
1687         done
1688         if test "$ol_arg" = "invalid" ; then
1689                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1690         fi
1691         ol_enable_multimaster="$ol_arg"
1692
1693 else
1694         ol_enable_multimaster="no"
1695 fi
1696 # end --enable-multimaster
1697 # OpenLDAP --enable-phonetic
1698         # Check whether --enable-phonetic or --disable-phonetic was given.
1699 if test "${enable_phonetic+set}" = set; then
1700   enableval="$enable_phonetic"
1701   
1702         ol_arg=invalid
1703         for ol_val in auto yes no ; do
1704                 if test "$enableval" = "$ol_val" ; then
1705                         ol_arg="$ol_val"
1706                 fi
1707         done
1708         if test "$ol_arg" = "invalid" ; then
1709                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1710         fi
1711         ol_enable_phonetic="$ol_arg"
1712
1713 else
1714         ol_enable_phonetic="no"
1715 fi
1716 # end --enable-phonetic
1717 # OpenLDAP --enable-quipu
1718         # Check whether --enable-quipu or --disable-quipu was given.
1719 if test "${enable_quipu+set}" = set; then
1720   enableval="$enable_quipu"
1721   
1722         ol_arg=invalid
1723         for ol_val in auto yes no ; do
1724                 if test "$enableval" = "$ol_val" ; then
1725                         ol_arg="$ol_val"
1726                 fi
1727         done
1728         if test "$ol_arg" = "invalid" ; then
1729                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1730         fi
1731         ol_enable_quipu="$ol_arg"
1732
1733 else
1734         ol_enable_quipu="no"
1735 fi
1736 # end --enable-quipu
1737 # OpenLDAP --enable-rlookups
1738         # Check whether --enable-rlookups or --disable-rlookups was given.
1739 if test "${enable_rlookups+set}" = set; then
1740   enableval="$enable_rlookups"
1741   
1742         ol_arg=invalid
1743         for ol_val in auto yes no ; do
1744                 if test "$enableval" = "$ol_val" ; then
1745                         ol_arg="$ol_val"
1746                 fi
1747         done
1748         if test "$ol_arg" = "invalid" ; then
1749                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1750         fi
1751         ol_enable_rlookups="$ol_arg"
1752
1753 else
1754         ol_enable_rlookups="auto"
1755 fi
1756 # end --enable-rlookups
1757 # OpenLDAP --enable-aci
1758         # Check whether --enable-aci or --disable-aci was given.
1759 if test "${enable_aci+set}" = set; then
1760   enableval="$enable_aci"
1761   
1762         ol_arg=invalid
1763         for ol_val in auto yes no ; do
1764                 if test "$enableval" = "$ol_val" ; then
1765                         ol_arg="$ol_val"
1766                 fi
1767         done
1768         if test "$ol_arg" = "invalid" ; then
1769                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1770         fi
1771         ol_enable_aci="$ol_arg"
1772
1773 else
1774         ol_enable_aci="no"
1775 fi
1776 # end --enable-aci
1777 # OpenLDAP --enable-discreteaci
1778         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1779 if test "${enable_discreteaci+set}" = set; then
1780   enableval="$enable_discreteaci"
1781   
1782         ol_arg=invalid
1783         for ol_val in auto yes no ; do
1784                 if test "$enableval" = "$ol_val" ; then
1785                         ol_arg="$ol_val"
1786                 fi
1787         done
1788         if test "$ol_arg" = "invalid" ; then
1789                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1790         fi
1791         ol_enable_discreteaci="$ol_arg"
1792
1793 else
1794         ol_enable_discreteaci="no"
1795 fi
1796 # end --enable-discreteaci
1797 # OpenLDAP --enable-wrappers
1798         # Check whether --enable-wrappers or --disable-wrappers was given.
1799 if test "${enable_wrappers+set}" = set; then
1800   enableval="$enable_wrappers"
1801   
1802         ol_arg=invalid
1803         for ol_val in auto yes no ; do
1804                 if test "$enableval" = "$ol_val" ; then
1805                         ol_arg="$ol_val"
1806                 fi
1807         done
1808         if test "$ol_arg" = "invalid" ; then
1809                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1810         fi
1811         ol_enable_wrappers="$ol_arg"
1812
1813 else
1814         ol_enable_wrappers="no"
1815 fi
1816 # end --enable-wrappers
1817 # OpenLDAP --enable-dynamic
1818         # Check whether --enable-dynamic or --disable-dynamic was given.
1819 if test "${enable_dynamic+set}" = set; then
1820   enableval="$enable_dynamic"
1821   
1822         ol_arg=invalid
1823         for ol_val in auto yes no ; do
1824                 if test "$enableval" = "$ol_val" ; then
1825                         ol_arg="$ol_val"
1826                 fi
1827         done
1828         if test "$ol_arg" = "invalid" ; then
1829                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1830         fi
1831         ol_enable_dynamic="$ol_arg"
1832
1833 else
1834         ol_enable_dynamic="no"
1835 fi
1836 # end --enable-dynamic
1837
1838 # OpenLDAP --enable-bdb2
1839         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1840 if test "${enable_bdb2+set}" = set; then
1841   enableval="$enable_bdb2"
1842   
1843         ol_arg=invalid
1844         for ol_val in auto yes no ; do
1845                 if test "$enableval" = "$ol_val" ; then
1846                         ol_arg="$ol_val"
1847                 fi
1848         done
1849         if test "$ol_arg" = "invalid" ; then
1850                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1851         fi
1852         ol_enable_bdb2="$ol_arg"
1853
1854 else
1855         ol_enable_bdb2="no"
1856 fi
1857 # end --enable-bdb2
1858 # OpenLDAP --with-bdb2_module
1859         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1860 if test "${with_bdb2_module+set}" = set; then
1861   withval="$with_bdb2_module"
1862   
1863         ol_arg=invalid
1864         for ol_val in static dynamic ; do
1865                 if test "$withval" = "$ol_val" ; then
1866                         ol_arg="$ol_val"
1867                 fi
1868         done
1869         if test "$ol_arg" = "invalid" ; then
1870                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1871         fi
1872         ol_with_bdb2_module="$ol_arg"
1873
1874 else
1875         ol_with_bdb2_module="static"
1876 fi
1877 # end --with-bdb2_module
1878
1879 # OpenLDAP --enable-ldap
1880         # Check whether --enable-ldap or --disable-ldap was given.
1881 if test "${enable_ldap+set}" = set; then
1882   enableval="$enable_ldap"
1883   
1884         ol_arg=invalid
1885         for ol_val in auto yes no ; do
1886                 if test "$enableval" = "$ol_val" ; then
1887                         ol_arg="$ol_val"
1888                 fi
1889         done
1890         if test "$ol_arg" = "invalid" ; then
1891                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1892         fi
1893         ol_enable_ldap="$ol_arg"
1894
1895 else
1896         ol_enable_ldap="no"
1897 fi
1898 # end --enable-ldap
1899 # OpenLDAP --with-ldap_module
1900         # Check whether --with-ldap_module or --without-ldap_module was given.
1901 if test "${with_ldap_module+set}" = set; then
1902   withval="$with_ldap_module"
1903   
1904         ol_arg=invalid
1905         for ol_val in static dynamic ; do
1906                 if test "$withval" = "$ol_val" ; then
1907                         ol_arg="$ol_val"
1908                 fi
1909         done
1910         if test "$ol_arg" = "invalid" ; then
1911                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1912         fi
1913         ol_with_ldap_module="$ol_arg"
1914
1915 else
1916         ol_with_ldap_module="static"
1917 fi
1918 # end --with-ldap_module
1919
1920 # OpenLDAP --enable-ldbm
1921         # Check whether --enable-ldbm or --disable-ldbm was given.
1922 if test "${enable_ldbm+set}" = set; then
1923   enableval="$enable_ldbm"
1924   
1925         ol_arg=invalid
1926         for ol_val in auto yes no ; do
1927                 if test "$enableval" = "$ol_val" ; then
1928                         ol_arg="$ol_val"
1929                 fi
1930         done
1931         if test "$ol_arg" = "invalid" ; then
1932                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1933         fi
1934         ol_enable_ldbm="$ol_arg"
1935
1936 else
1937         ol_enable_ldbm="yes"
1938 fi
1939 # end --enable-ldbm
1940 # OpenLDAP --with-ldbm_api
1941         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1942 if test "${with_ldbm_api+set}" = set; then
1943   withval="$with_ldbm_api"
1944   
1945         ol_arg=invalid
1946         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1947                 if test "$withval" = "$ol_val" ; then
1948                         ol_arg="$ol_val"
1949                 fi
1950         done
1951         if test "$ol_arg" = "invalid" ; then
1952                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1953         fi
1954         ol_with_ldbm_api="$ol_arg"
1955
1956 else
1957         ol_with_ldbm_api="auto"
1958 fi
1959 # end --with-ldbm_api
1960
1961 # OpenLDAP --with-ldbm_module
1962         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1963 if test "${with_ldbm_module+set}" = set; then
1964   withval="$with_ldbm_module"
1965   
1966         ol_arg=invalid
1967         for ol_val in static dynamic ; do
1968                 if test "$withval" = "$ol_val" ; then
1969                         ol_arg="$ol_val"
1970                 fi
1971         done
1972         if test "$ol_arg" = "invalid" ; then
1973                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1974         fi
1975         ol_with_ldbm_module="$ol_arg"
1976
1977 else
1978         ol_with_ldbm_module="static"
1979 fi
1980 # end --with-ldbm_module
1981
1982 # OpenLDAP --with-ldbm_type
1983         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1984 if test "${with_ldbm_type+set}" = set; then
1985   withval="$with_ldbm_type"
1986   
1987         ol_arg=invalid
1988         for ol_val in auto btree hash ; do
1989                 if test "$withval" = "$ol_val" ; then
1990                         ol_arg="$ol_val"
1991                 fi
1992         done
1993         if test "$ol_arg" = "invalid" ; then
1994                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1995         fi
1996         ol_with_ldbm_type="$ol_arg"
1997
1998 else
1999         ol_with_ldbm_type="auto"
2000 fi
2001 # end --with-ldbm_type
2002
2003
2004 # OpenLDAP --enable-passwd
2005         # Check whether --enable-passwd or --disable-passwd was given.
2006 if test "${enable_passwd+set}" = set; then
2007   enableval="$enable_passwd"
2008   
2009         ol_arg=invalid
2010         for ol_val in auto yes no ; do
2011                 if test "$enableval" = "$ol_val" ; then
2012                         ol_arg="$ol_val"
2013                 fi
2014         done
2015         if test "$ol_arg" = "invalid" ; then
2016                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2017         fi
2018         ol_enable_passwd="$ol_arg"
2019
2020 else
2021         ol_enable_passwd="no"
2022 fi
2023 # end --enable-passwd
2024 # OpenLDAP --with-passwd_module
2025         # Check whether --with-passwd_module or --without-passwd_module was given.
2026 if test "${with_passwd_module+set}" = set; then
2027   withval="$with_passwd_module"
2028   
2029         ol_arg=invalid
2030         for ol_val in static dynamic ; do
2031                 if test "$withval" = "$ol_val" ; then
2032                         ol_arg="$ol_val"
2033                 fi
2034         done
2035         if test "$ol_arg" = "invalid" ; then
2036                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2037         fi
2038         ol_with_passwd_module="$ol_arg"
2039
2040 else
2041         ol_with_passwd_module="static"
2042 fi
2043 # end --with-passwd_module
2044
2045 # OpenLDAP --enable-perl
2046         # Check whether --enable-perl or --disable-perl was given.
2047 if test "${enable_perl+set}" = set; then
2048   enableval="$enable_perl"
2049   
2050         ol_arg=invalid
2051         for ol_val in auto yes no ; do
2052                 if test "$enableval" = "$ol_val" ; then
2053                         ol_arg="$ol_val"
2054                 fi
2055         done
2056         if test "$ol_arg" = "invalid" ; then
2057                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2058         fi
2059         ol_enable_perl="$ol_arg"
2060
2061 else
2062         ol_enable_perl="no"
2063 fi
2064 # end --enable-perl
2065 # OpenLDAP --with-perl_module
2066         # Check whether --with-perl_module or --without-perl_module was given.
2067 if test "${with_perl_module+set}" = set; then
2068   withval="$with_perl_module"
2069   
2070         ol_arg=invalid
2071         for ol_val in static dynamic ; do
2072                 if test "$withval" = "$ol_val" ; then
2073                         ol_arg="$ol_val"
2074                 fi
2075         done
2076         if test "$ol_arg" = "invalid" ; then
2077                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2078         fi
2079         ol_with_perl_module="$ol_arg"
2080
2081 else
2082         ol_with_perl_module="static"
2083 fi
2084 # end --with-perl_module
2085
2086 # OpenLDAP --enable-shell
2087         # Check whether --enable-shell or --disable-shell was given.
2088 if test "${enable_shell+set}" = set; then
2089   enableval="$enable_shell"
2090   
2091         ol_arg=invalid
2092         for ol_val in auto yes no ; do
2093                 if test "$enableval" = "$ol_val" ; then
2094                         ol_arg="$ol_val"
2095                 fi
2096         done
2097         if test "$ol_arg" = "invalid" ; then
2098                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2099         fi
2100         ol_enable_shell="$ol_arg"
2101
2102 else
2103         ol_enable_shell="no"
2104 fi
2105 # end --enable-shell
2106 # OpenLDAP --with-shell_module
2107         # Check whether --with-shell_module or --without-shell_module was given.
2108 if test "${with_shell_module+set}" = set; then
2109   withval="$with_shell_module"
2110   
2111         ol_arg=invalid
2112         for ol_val in static dynamic ; do
2113                 if test "$withval" = "$ol_val" ; then
2114                         ol_arg="$ol_val"
2115                 fi
2116         done
2117         if test "$ol_arg" = "invalid" ; then
2118                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2119         fi
2120         ol_with_shell_module="$ol_arg"
2121
2122 else
2123         ol_with_shell_module="static"
2124 fi
2125 # end --with-shell_module
2126
2127 # OpenLDAP --enable-tcl
2128         # Check whether --enable-tcl or --disable-tcl was given.
2129 if test "${enable_tcl+set}" = set; then
2130   enableval="$enable_tcl"
2131   
2132         ol_arg=invalid
2133         for ol_val in auto yes no ; do
2134                 if test "$enableval" = "$ol_val" ; then
2135                         ol_arg="$ol_val"
2136                 fi
2137         done
2138         if test "$ol_arg" = "invalid" ; then
2139                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2140         fi
2141         ol_enable_tcl="$ol_arg"
2142
2143 else
2144         ol_enable_tcl="no"
2145 fi
2146 # end --enable-tcl
2147 # OpenLDAP --with-tcl_module
2148         # Check whether --with-tcl_module or --without-tcl_module was given.
2149 if test "${with_tcl_module+set}" = set; then
2150   withval="$with_tcl_module"
2151   
2152         ol_arg=invalid
2153         for ol_val in static dynamic ; do
2154                 if test "$withval" = "$ol_val" ; then
2155                         ol_arg="$ol_val"
2156                 fi
2157         done
2158         if test "$ol_arg" = "invalid" ; then
2159                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2160         fi
2161         ol_with_tcl_module="$ol_arg"
2162
2163 else
2164         ol_with_tcl_module="static"
2165 fi
2166 # end --with-tcl_module
2167
2168
2169 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2170 if test "${with_xxslurpdoptions+set}" = set; then
2171   withval="$with_xxslurpdoptions"
2172   :
2173 fi
2174
2175 # OpenLDAP --enable-slurpd
2176         # Check whether --enable-slurpd or --disable-slurpd was given.
2177 if test "${enable_slurpd+set}" = set; then
2178   enableval="$enable_slurpd"
2179   
2180         ol_arg=invalid
2181         for ol_val in auto yes no ; do
2182                 if test "$enableval" = "$ol_val" ; then
2183                         ol_arg="$ol_val"
2184                 fi
2185         done
2186         if test "$ol_arg" = "invalid" ; then
2187                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2188         fi
2189         ol_enable_slurpd="$ol_arg"
2190
2191 else
2192         ol_enable_slurpd="auto"
2193 fi
2194 # end --enable-slurpd
2195
2196 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2197 if test "${with_xxliboptions+set}" = set; then
2198   withval="$with_xxliboptions"
2199   :
2200 fi
2201
2202 # Check whether --enable-static or --disable-static was given.
2203 if test "${enable_static+set}" = set; then
2204   enableval="$enable_static"
2205   p=${PACKAGE-default}
2206 case "$enableval" in
2207 yes) enable_static=yes ;;
2208 no) enable_static=no ;;
2209 *)
2210   enable_static=no
2211   # Look at the argument we got.  We use all the common list separators.
2212   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2213   for pkg in $enableval; do
2214     if test "X$pkg" = "X$p"; then
2215       enable_static=yes
2216     fi
2217   done
2218   IFS="$ac_save_ifs"
2219   ;;
2220 esac
2221 else
2222   enable_static=yes
2223 fi
2224
2225 # Check whether --enable-shared or --disable-shared was given.
2226 if test "${enable_shared+set}" = set; then
2227   enableval="$enable_shared"
2228   p=${PACKAGE-default}
2229 case "$enableval" in
2230 yes) enable_shared=yes ;;
2231 no) enable_shared=no ;;
2232 *)
2233   enable_shared=no
2234   # Look at the argument we got.  We use all the common list separators.
2235   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2236   for pkg in $enableval; do
2237     if test "X$pkg" = "X$p"; then
2238       enable_shared=yes
2239     fi
2240   done
2241   IFS="$ac_save_ifs"
2242   ;;
2243 esac
2244 else
2245   enable_shared=yes
2246 fi
2247
2248
2249
2250 # validate options
2251 if test $ol_enable_dns = yes ; then
2252         if test $ol_enable_referrals = no ; then
2253                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2254         fi
2255         if test $ol_enable_referrals = auto ; then
2256                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2257                 ol_enable_referrals=yes
2258         fi
2259 fi
2260
2261 if test $ol_enable_slapd = no ; then
2262                 if test $ol_enable_bdb2 = yes ; then
2263                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2264         fi
2265         if test $ol_enable_ldap = yes ; then
2266                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2267         fi
2268         if test $ol_enable_ldbm = yes ; then
2269                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2270         fi
2271         if test $ol_enable_passwd = yes ; then
2272                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2273         fi
2274         if test $ol_enable_perl = yes ; then
2275                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2276         fi
2277         if test $ol_enable_shell = yes ; then
2278                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2279         fi
2280         if test $ol_enable_tcl = yes ; then
2281                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2282         fi
2283         if test $ol_enable_modules = yes ; then
2284                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2285         fi
2286         if test $ol_enable_multimaster = yes ; then
2287                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2288         fi
2289         if test $ol_enable_wrappers = yes ; then
2290                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2291         fi
2292         if test $ol_enable_phonetic = yes ; then
2293                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2294         fi
2295         if test $ol_enable_quipu = yes ; then
2296                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2297         fi
2298         if test $ol_enable_rlookups = yes ; then
2299                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2300         fi
2301         if test $ol_enable_aci = yes ; then
2302                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2303         fi
2304         if test $ol_enable_discreteaci = yes ; then
2305                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2306         fi
2307         if test $ol_with_ldbm_api != auto ; then
2308                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2309         fi
2310         if test $ol_with_ldbm_type != auto ; then
2311                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2312         fi
2313         if test $ol_with_bdb2_module != static ; then
2314                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2315         fi
2316         if test $ol_with_ldap_module != static ; then
2317                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2318         fi
2319         if test $ol_with_ldbm_module != static ; then
2320                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2321         fi
2322         if test $ol_with_passwd_module != static ; then
2323                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2324         fi
2325         if test $ol_with_perl_module != static ; then
2326                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2327         fi
2328         if test $ol_with_shell_module != static ; then
2329                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2330         fi
2331         if test $ol_with_tcl_module != static ; then
2332                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2333         fi
2334         if test $ol_enable_slurpd = yes ; then
2335                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2336         fi
2337
2338         # force settings to no
2339         ol_enable_bdb2=no
2340         ol_enable_ldap=no
2341         ol_enable_ldbm=no
2342         ol_enable_passwd=no
2343         ol_enable_perl=no
2344         ol_enable_shell=no
2345         ol_enable_tcl=no
2346
2347         ol_enable_modules=no
2348         ol_enable_multimaster=no
2349         ol_enable_phonetic=no
2350         ol_enable_quipu=no
2351         ol_enable_rlookups=no
2352         ol_enable_aci=no
2353         ol_enable_discreteaci=no
2354         ol_enable_wrappers=no
2355         ol_enable_dynamic=no
2356
2357         ol_with_ldbm_api=no
2358         ol_with_ldbm_type=no
2359
2360         ol_with_bdb2_module=static
2361         ol_with_ldap_module=static
2362         ol_with_ldbm_module=static
2363         ol_with_passwd_module=static
2364         ol_with_perl_module=static
2365         ol_with_shell_module=static
2366         ol_with_tcl_module=static
2367
2368         ol_enable_slurpd=no
2369
2370 elif test $ol_enable_ldbm = no ; then
2371         
2372         if test $ol_with_ldbm_api != auto ; then
2373                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2374         fi
2375
2376         if test $ol_with_ldbm_type != auto ; then
2377                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2378         fi
2379
2380         if test $ol_with_ldbm_module != static ; then
2381                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2382         fi
2383
2384         if test $ol_enable_bdb2 = yes ; then
2385                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2386         fi
2387
2388         if test $ol_enable_modules != yes -a \
2389                 $ol_enable_ldap = no -a \
2390                 $ol_enable_passwd = no -a \
2391                 $ol_enable_perl = no -a \
2392                 $ol_enable_shell = no -a \
2393                 $ol_enable_tcl = no ; then
2394                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2395         fi
2396
2397         ol_with_ldbm_api=no
2398         ol_with_ldbm_type=no
2399         ol_with_ldbm_module=static
2400
2401 elif test $ol_enable_bdb2 = yes ; then
2402         
2403         if test $ol_with_ldbm_api != auto -a \
2404                 $ol_with_ldbm_api != db2 ; then
2405                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2406         fi
2407
2408         ol_with_ldbm_api=db2
2409
2410 else
2411         
2412         if test $ol_enable_bdb2 != no ; then
2413                 if test $ol_with_ldbm_api != auto -a \
2414                         $ol_with_ldbm_api != db2 ; then
2415                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2416                         ol_enable_bdb2=no
2417                 fi
2418         fi
2419
2420         if test $ol_with_ldbm_api = gdbm -a \
2421                 $ol_with_ldbm_type = btree ; then
2422                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2423         fi
2424         if test $ol_with_ldbm_api = mdbm -a \
2425                 $ol_with_ldbm_type = btree ; then
2426                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2427         fi
2428         if test $ol_with_ldbm_api = ndbm -a \
2429                 $ol_with_ldbm_type = btree ; then
2430                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2431         fi
2432 fi
2433
2434 if test $ol_enable_slurpd = yes ; then
2435                 if test $ol_with_threads = no ; then
2436                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2437         fi
2438 fi
2439
2440 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2441         if test $ol_with_kerberos = no ; then
2442                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2443         fi
2444 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2445         if test $ol_with_kerberos != auto ; then
2446                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2447         else
2448                 ol_with_kerberos=no
2449         fi
2450 fi
2451
2452 echo "$ac_t""done" 1>&6
2453
2454 LDAP_LIBS=
2455 LDIF_LIBS=
2456 LDBM_LIBS=
2457 LTHREAD_LIBS=
2458 LUTIL_LIBS=
2459
2460 LDAPD_LIBS=
2461 SLAPD_LIBS=
2462 SLURPD_LIBS=
2463
2464 BUILD_LDAPD=no
2465 BUILD_SLAPD=no
2466 BUILD_SLURPD=no
2467
2468 BUILD_BDB2=no
2469 BUILD_LDAP=no
2470 BUILD_LDBM=no
2471 BUILD_PASSWD=no
2472 BUILD_PERL=no
2473 BUILD_QUIPU=no
2474 BUILD_SHELL=no
2475 BUILD_TCL=no
2476 BUILD_THREAD=no
2477
2478 BUILD_BDB2_DYNAMIC=static
2479 BUILD_LDAP_DYNAMIC=static
2480 BUILD_LDBM_DYNAMIC=static
2481 BUILD_PASSWD_DYNAMIC=static
2482 BUILD_PERL_DYNAMIC=static
2483 BUILD_SHELL_DYNAMIC=static
2484 BUILD_TCL_DYNAMIC=static
2485
2486 SLAPD_MODULES_LDFLAGS=
2487 SLAPD_MODULES_CPPFLAGS=
2488 SLAPD_MODULES_LIST=
2489
2490 SLAPD_PERL_LDFLAGS=
2491 MOD_PERL_LDFLAGS=
2492 PERL_CPPFLAGS=
2493
2494 MOD_TCL_LIB=
2495 KRB4_LIBS=
2496 KRB5_LIBS=
2497 READLINE_LIBS=
2498 SASL_LIBS=
2499 TERMCAP_LIBS=
2500 TLS_LIBS=
2501 MODULES_LIBS=
2502
2503
2504
2505 cat >> confdefs.h <<\EOF
2506 #define HAVE_MKVERSION 1
2507 EOF
2508
2509
2510
2511
2512 ol_aix_threads=no
2513 case "$target" in
2514 *-*-aix*)       if test -z "$CC" ; then
2515                 case "$ol_with_threads" in
2516                 auto | yes |  posix) ol_aix_threads=yes ;;
2517                 esac
2518         fi
2519 ;;
2520 esac
2521
2522 if test $ol_aix_threads = yes ; then
2523         if test -z "${CC}" ; then
2524                 for ac_prog in cc_r xlc_r cc
2525 do
2526 # Extract the first word of "$ac_prog", so it can be a program name with args.
2527 set dummy $ac_prog; ac_word=$2
2528 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2529 echo "configure:2530: checking for $ac_word" >&5
2530 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2531   echo $ac_n "(cached) $ac_c" 1>&6
2532 else
2533   if test -n "$CC"; then
2534   ac_cv_prog_CC="$CC" # Let the user override the test.
2535 else
2536   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2537   ac_dummy="$PATH"
2538   for ac_dir in $ac_dummy; do
2539     test -z "$ac_dir" && ac_dir=.
2540     if test -f $ac_dir/$ac_word; then
2541       ac_cv_prog_CC="$ac_prog"
2542       break
2543     fi
2544   done
2545   IFS="$ac_save_ifs"
2546 fi
2547 fi
2548 CC="$ac_cv_prog_CC"
2549 if test -n "$CC"; then
2550   echo "$ac_t""$CC" 1>&6
2551 else
2552   echo "$ac_t""no" 1>&6
2553 fi
2554
2555 test -n "$CC" && break
2556 done
2557
2558
2559                 if test "$CC" = cc ; then
2560                                                 if test $ol_with_threads != auto ; then
2561                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2562                         else
2563                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2564                         fi
2565                         ol_with_threads=no
2566                 fi
2567         fi
2568
2569         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2570                 ol_with_threads=posix
2571                 ol_cv_pthread_create=yes
2572         fi
2573 fi
2574
2575 if test -z "${CC}"; then
2576         for ac_prog in cc
2577 do
2578 # Extract the first word of "$ac_prog", so it can be a program name with args.
2579 set dummy $ac_prog; ac_word=$2
2580 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2581 echo "configure:2582: checking for $ac_word" >&5
2582 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2583   echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585   if test -n "$CC"; then
2586   ac_cv_prog_CC="$CC" # Let the user override the test.
2587 else
2588   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2589   ac_dummy="$PATH"
2590   for ac_dir in $ac_dummy; do
2591     test -z "$ac_dir" && ac_dir=.
2592     if test -f $ac_dir/$ac_word; then
2593       ac_cv_prog_CC="$ac_prog"
2594       break
2595     fi
2596   done
2597   IFS="$ac_save_ifs"
2598 fi
2599 fi
2600 CC="$ac_cv_prog_CC"
2601 if test -n "$CC"; then
2602   echo "$ac_t""$CC" 1>&6
2603 else
2604   echo "$ac_t""no" 1>&6
2605 fi
2606
2607 test -n "$CC" && break
2608 done
2609
2610 fi
2611
2612
2613
2614
2615 # Check whether --enable-fast-install or --disable-fast-install was given.
2616 if test "${enable_fast_install+set}" = set; then
2617   enableval="$enable_fast_install"
2618   p=${PACKAGE-default}
2619 case "$enableval" in
2620 yes) enable_fast_install=yes ;;
2621 no) enable_fast_install=no ;;
2622 *)
2623   enable_fast_install=no
2624   # Look at the argument we got.  We use all the common list separators.
2625   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2626   for pkg in $enableval; do
2627     if test "X$pkg" = "X$p"; then
2628       enable_fast_install=yes
2629     fi
2630   done
2631   IFS="$ac_save_ifs"
2632   ;;
2633 esac
2634 else
2635   enable_fast_install=yes
2636 fi
2637
2638 # Extract the first word of "ranlib", so it can be a program name with args.
2639 set dummy ranlib; ac_word=$2
2640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2641 echo "configure:2642: checking for $ac_word" >&5
2642 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2643   echo $ac_n "(cached) $ac_c" 1>&6
2644 else
2645   if test -n "$RANLIB"; then
2646   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2647 else
2648   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2649   ac_dummy="$PATH"
2650   for ac_dir in $ac_dummy; do
2651     test -z "$ac_dir" && ac_dir=.
2652     if test -f $ac_dir/$ac_word; then
2653       ac_cv_prog_RANLIB="ranlib"
2654       break
2655     fi
2656   done
2657   IFS="$ac_save_ifs"
2658   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2659 fi
2660 fi
2661 RANLIB="$ac_cv_prog_RANLIB"
2662 if test -n "$RANLIB"; then
2663   echo "$ac_t""$RANLIB" 1>&6
2664 else
2665   echo "$ac_t""no" 1>&6
2666 fi
2667
2668 # Extract the first word of "gcc", so it can be a program name with args.
2669 set dummy gcc; ac_word=$2
2670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2671 echo "configure:2672: checking for $ac_word" >&5
2672 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2673   echo $ac_n "(cached) $ac_c" 1>&6
2674 else
2675   if test -n "$CC"; then
2676   ac_cv_prog_CC="$CC" # Let the user override the test.
2677 else
2678   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2679   ac_dummy="$PATH"
2680   for ac_dir in $ac_dummy; do
2681     test -z "$ac_dir" && ac_dir=.
2682     if test -f $ac_dir/$ac_word; then
2683       ac_cv_prog_CC="gcc"
2684       break
2685     fi
2686   done
2687   IFS="$ac_save_ifs"
2688 fi
2689 fi
2690 CC="$ac_cv_prog_CC"
2691 if test -n "$CC"; then
2692   echo "$ac_t""$CC" 1>&6
2693 else
2694   echo "$ac_t""no" 1>&6
2695 fi
2696
2697 if test -z "$CC"; then
2698   # Extract the first word of "cc", so it can be a program name with args.
2699 set dummy cc; ac_word=$2
2700 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2701 echo "configure:2702: checking for $ac_word" >&5
2702 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2703   echo $ac_n "(cached) $ac_c" 1>&6
2704 else
2705   if test -n "$CC"; then
2706   ac_cv_prog_CC="$CC" # Let the user override the test.
2707 else
2708   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2709   ac_prog_rejected=no
2710   ac_dummy="$PATH"
2711   for ac_dir in $ac_dummy; do
2712     test -z "$ac_dir" && ac_dir=.
2713     if test -f $ac_dir/$ac_word; then
2714       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2715         ac_prog_rejected=yes
2716         continue
2717       fi
2718       ac_cv_prog_CC="cc"
2719       break
2720     fi
2721   done
2722   IFS="$ac_save_ifs"
2723 if test $ac_prog_rejected = yes; then
2724   # We found a bogon in the path, so make sure we never use it.
2725   set dummy $ac_cv_prog_CC
2726   shift
2727   if test $# -gt 0; then
2728     # We chose a different compiler from the bogus one.
2729     # However, it has the same basename, so the bogon will be chosen
2730     # first if we set CC to just the basename; use the full file name.
2731     shift
2732     set dummy "$ac_dir/$ac_word" "$@"
2733     shift
2734     ac_cv_prog_CC="$@"
2735   fi
2736 fi
2737 fi
2738 fi
2739 CC="$ac_cv_prog_CC"
2740 if test -n "$CC"; then
2741   echo "$ac_t""$CC" 1>&6
2742 else
2743   echo "$ac_t""no" 1>&6
2744 fi
2745
2746   if test -z "$CC"; then
2747     case "`uname -s`" in
2748     *win32* | *WIN32* | *CYGWIN*)
2749       # Extract the first word of "cl", so it can be a program name with args.
2750 set dummy cl; ac_word=$2
2751 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2752 echo "configure:2753: checking for $ac_word" >&5
2753 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2754   echo $ac_n "(cached) $ac_c" 1>&6
2755 else
2756   if test -n "$CC"; then
2757   ac_cv_prog_CC="$CC" # Let the user override the test.
2758 else
2759   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2760   ac_dummy="$PATH"
2761   for ac_dir in $ac_dummy; do
2762     test -z "$ac_dir" && ac_dir=.
2763     if test -f $ac_dir/$ac_word; then
2764       ac_cv_prog_CC="cl"
2765       break
2766     fi
2767   done
2768   IFS="$ac_save_ifs"
2769 fi
2770 fi
2771 CC="$ac_cv_prog_CC"
2772 if test -n "$CC"; then
2773   echo "$ac_t""$CC" 1>&6
2774 else
2775   echo "$ac_t""no" 1>&6
2776 fi
2777  ;;
2778     esac
2779   fi
2780   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2781 fi
2782
2783 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2784 echo "configure:2785: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2785
2786 ac_ext=c
2787 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2788 ac_cpp='$CPP $CPPFLAGS'
2789 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2790 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2791 cross_compiling=$ac_cv_prog_cc_cross
2792
2793 cat > conftest.$ac_ext << EOF
2794
2795 #line 2796 "configure"
2796 #include "confdefs.h"
2797
2798 main(){return(0);}
2799 EOF
2800 if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2801   ac_cv_prog_cc_works=yes
2802   # If we can't run a trivial program, we are probably using a cross compiler.
2803   if (./conftest; exit) 2>/dev/null; then
2804     ac_cv_prog_cc_cross=no
2805   else
2806     ac_cv_prog_cc_cross=yes
2807   fi
2808 else
2809   echo "configure: failed program was:" >&5
2810   cat conftest.$ac_ext >&5
2811   ac_cv_prog_cc_works=no
2812 fi
2813 rm -fr conftest*
2814 ac_ext=c
2815 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2816 ac_cpp='$CPP $CPPFLAGS'
2817 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2818 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2819 cross_compiling=$ac_cv_prog_cc_cross
2820
2821 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2822 if test $ac_cv_prog_cc_works = no; then
2823   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2824 fi
2825 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2826 echo "configure:2827: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2827 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2828 cross_compiling=$ac_cv_prog_cc_cross
2829
2830 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2831 echo "configure:2832: checking whether we are using GNU C" >&5
2832 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2833   echo $ac_n "(cached) $ac_c" 1>&6
2834 else
2835   cat > conftest.c <<EOF
2836 #ifdef __GNUC__
2837   yes;
2838 #endif
2839 EOF
2840 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2841   ac_cv_prog_gcc=yes
2842 else
2843   ac_cv_prog_gcc=no
2844 fi
2845 fi
2846
2847 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2848
2849 if test $ac_cv_prog_gcc = yes; then
2850   GCC=yes
2851 else
2852   GCC=
2853 fi
2854
2855 ac_test_CFLAGS="${CFLAGS+set}"
2856 ac_save_CFLAGS="$CFLAGS"
2857 CFLAGS=
2858 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2859 echo "configure:2860: checking whether ${CC-cc} accepts -g" >&5
2860 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2861   echo $ac_n "(cached) $ac_c" 1>&6
2862 else
2863   echo 'void f(){}' > conftest.c
2864 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2865   ac_cv_prog_cc_g=yes
2866 else
2867   ac_cv_prog_cc_g=no
2868 fi
2869 rm -f conftest*
2870
2871 fi
2872
2873 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2874 if test "$ac_test_CFLAGS" = set; then
2875   CFLAGS="$ac_save_CFLAGS"
2876 elif test $ac_cv_prog_cc_g = yes; then
2877   if test "$GCC" = yes; then
2878     CFLAGS="-g -O2"
2879   else
2880     CFLAGS="-g"
2881   fi
2882 else
2883   if test "$GCC" = yes; then
2884     CFLAGS="-O2"
2885   else
2886     CFLAGS=
2887   fi
2888 fi
2889
2890 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2891 if test "${with_gnu_ld+set}" = set; then
2892   withval="$with_gnu_ld"
2893   test "$withval" = no || with_gnu_ld=yes
2894 else
2895   with_gnu_ld=no
2896 fi
2897
2898 ac_prog=ld
2899 if test "$ac_cv_prog_gcc" = yes; then
2900   # Check if gcc -print-prog-name=ld gives a path.
2901   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2902 echo "configure:2903: checking for ld used by GCC" >&5
2903   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2904   case "$ac_prog" in
2905     # Accept absolute paths.
2906     [\\/]* | [A-Za-z]:[\\/]*)
2907       re_direlt='/[^/][^/]*/\.\./'
2908       # Canonicalize the path of ld
2909       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2910       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2911         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2912       done
2913       test -z "$LD" && LD="$ac_prog"
2914       ;;
2915   "")
2916     # If it fails, then pretend we aren't using GCC.
2917     ac_prog=ld
2918     ;;
2919   *)
2920     # If it is relative, then search for the first ld in PATH.
2921     with_gnu_ld=unknown
2922     ;;
2923   esac
2924 elif test "$with_gnu_ld" = yes; then
2925   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2926 echo "configure:2927: checking for GNU ld" >&5
2927 else
2928   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2929 echo "configure:2930: checking for non-GNU ld" >&5
2930 fi
2931 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2932   echo $ac_n "(cached) $ac_c" 1>&6
2933 else
2934   if test -z "$LD"; then
2935   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2936   for ac_dir in $PATH; do
2937     test -z "$ac_dir" && ac_dir=.
2938     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2939       ac_cv_path_LD="$ac_dir/$ac_prog"
2940       # Check to see if the program is GNU ld.  I'd rather use --version,
2941       # but apparently some GNU ld's only accept -v.
2942       # Break only if it was the GNU/non-GNU ld that we prefer.
2943       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2944         test "$with_gnu_ld" != no && break
2945       else
2946         test "$with_gnu_ld" != yes && break
2947       fi
2948     fi
2949   done
2950   IFS="$ac_save_ifs"
2951 else
2952   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2953 fi
2954 fi
2955
2956 LD="$ac_cv_path_LD"
2957 if test -n "$LD"; then
2958   echo "$ac_t""$LD" 1>&6
2959 else
2960   echo "$ac_t""no" 1>&6
2961 fi
2962 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2963
2964 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2965 echo "configure:2966: checking if the linker ($LD) is GNU ld" >&5
2966 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2967   echo $ac_n "(cached) $ac_c" 1>&6
2968 else
2969   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2970 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2971   ac_cv_prog_gnu_ld=yes
2972 else
2973   ac_cv_prog_gnu_ld=no
2974 fi
2975 fi
2976
2977 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2978
2979
2980 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2981 echo "configure:2982: checking for BSD-compatible nm" >&5
2982 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2983   echo $ac_n "(cached) $ac_c" 1>&6
2984 else
2985   if test -n "$NM"; then
2986   # Let the user override the test.
2987   ac_cv_path_NM="$NM"
2988 else
2989   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2990   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2991     test -z "$ac_dir" && ac_dir=.
2992     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2993       # Check to see if the nm accepts a BSD-compat flag.
2994       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2995       #   nm: unknown option "B" ignored
2996       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2997         ac_cv_path_NM="$ac_dir/nm -B"
2998         break
2999       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3000         ac_cv_path_NM="$ac_dir/nm -p"
3001         break
3002       else
3003         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3004         continue # so that we can try to find one that supports BSD flags
3005       fi
3006     fi
3007   done
3008   IFS="$ac_save_ifs"
3009   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3010 fi
3011 fi
3012
3013 NM="$ac_cv_path_NM"
3014 echo "$ac_t""$NM" 1>&6
3015
3016
3017 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3018 echo "configure:3019: checking whether ln -s works" >&5
3019 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3020   echo $ac_n "(cached) $ac_c" 1>&6
3021 else
3022   rm -f conftestdata
3023 if ln -s X conftestdata 2>/dev/null
3024 then
3025   rm -f conftestdata
3026   ac_cv_prog_LN_S="ln -s"
3027 else
3028   ac_cv_prog_LN_S=ln
3029 fi
3030 fi
3031 LN_S="$ac_cv_prog_LN_S"
3032 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3033   echo "$ac_t""yes" 1>&6
3034 else
3035   echo "$ac_t""no" 1>&6
3036 fi
3037
3038 if test $host != $build; then
3039   ac_tool_prefix=${host_alias}-
3040 else
3041   ac_tool_prefix=
3042 fi
3043
3044
3045 # Check for any special flags to pass to ltconfig.
3046 libtool_flags="--cache-file=$cache_file"
3047 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3048 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3049 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3050 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3051 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3052 libtool_flags="$libtool_flags --enable-dlopen"
3053 libtool_flags="$libtool_flags --enable-win32-dll"
3054 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3055 if test "${enable_libtool_lock+set}" = set; then
3056   enableval="$enable_libtool_lock"
3057   :
3058 fi
3059
3060 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3061 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3062
3063 # Some flags need to be propagated to the compiler or linker for good
3064 # libtool support.
3065 case "$host" in
3066 *-*-irix6*)
3067   # Find out which ABI we are using.
3068   echo '#line 3069 "configure"' > conftest.$ac_ext
3069   if { (eval echo configure:3070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3070     case "`/usr/bin/file conftest.o`" in
3071     *32-bit*)
3072       LD="${LD-ld} -32"
3073       ;;
3074     *N32*)
3075       LD="${LD-ld} -n32"
3076       ;;
3077     *64-bit*)
3078       LD="${LD-ld} -64"
3079       ;;
3080     esac
3081   fi
3082   rm -rf conftest*
3083   ;;
3084
3085 *-*-sco3.2v5*)
3086   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3087   SAVE_CFLAGS="$CFLAGS"
3088   CFLAGS="$CFLAGS -belf"
3089   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3090 echo "configure:3091: checking whether the C compiler needs -belf" >&5
3091 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3092   echo $ac_n "(cached) $ac_c" 1>&6
3093 else
3094   cat > conftest.$ac_ext <<EOF
3095 #line 3096 "configure"
3096 #include "confdefs.h"
3097
3098 int main() {
3099
3100 ; return 0; }
3101 EOF
3102 if { (eval echo configure:3103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3103   rm -rf conftest*
3104   lt_cv_cc_needs_belf=yes
3105 else
3106   echo "configure: failed program was:" >&5
3107   cat conftest.$ac_ext >&5
3108   rm -rf conftest*
3109   lt_cv_cc_needs_belf=no
3110 fi
3111 rm -f conftest*
3112 fi
3113
3114 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3115   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3116     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3117     CFLAGS="$SAVE_CFLAGS"
3118   fi
3119   ;;
3120
3121 *-*-cygwin* | *-*-mingw*)
3122   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3123 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3124 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3125 echo "configure:3126: checking for $ac_word" >&5
3126 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3127   echo $ac_n "(cached) $ac_c" 1>&6
3128 else
3129   if test -n "$DLLTOOL"; then
3130   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3131 else
3132   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3133   ac_dummy="$PATH"
3134   for ac_dir in $ac_dummy; do
3135     test -z "$ac_dir" && ac_dir=.
3136     if test -f $ac_dir/$ac_word; then
3137       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3138       break
3139     fi
3140   done
3141   IFS="$ac_save_ifs"
3142 fi
3143 fi
3144 DLLTOOL="$ac_cv_prog_DLLTOOL"
3145 if test -n "$DLLTOOL"; then
3146   echo "$ac_t""$DLLTOOL" 1>&6
3147 else
3148   echo "$ac_t""no" 1>&6
3149 fi
3150
3151
3152 if test -z "$ac_cv_prog_DLLTOOL"; then
3153 if test -n "$ac_tool_prefix"; then
3154   # Extract the first word of "dlltool", so it can be a program name with args.
3155 set dummy dlltool; ac_word=$2
3156 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3157 echo "configure:3158: checking for $ac_word" >&5
3158 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3159   echo $ac_n "(cached) $ac_c" 1>&6
3160 else
3161   if test -n "$DLLTOOL"; then
3162   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3163 else
3164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3165   ac_dummy="$PATH"
3166   for ac_dir in $ac_dummy; do
3167     test -z "$ac_dir" && ac_dir=.
3168     if test -f $ac_dir/$ac_word; then
3169       ac_cv_prog_DLLTOOL="dlltool"
3170       break
3171     fi
3172   done
3173   IFS="$ac_save_ifs"
3174   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3175 fi
3176 fi
3177 DLLTOOL="$ac_cv_prog_DLLTOOL"
3178 if test -n "$DLLTOOL"; then
3179   echo "$ac_t""$DLLTOOL" 1>&6
3180 else
3181   echo "$ac_t""no" 1>&6
3182 fi
3183
3184 else
3185   DLLTOOL="false"
3186 fi
3187 fi
3188
3189   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3190 set dummy ${ac_tool_prefix}as; ac_word=$2
3191 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3192 echo "configure:3193: checking for $ac_word" >&5
3193 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3194   echo $ac_n "(cached) $ac_c" 1>&6
3195 else
3196   if test -n "$AS"; then
3197   ac_cv_prog_AS="$AS" # Let the user override the test.
3198 else
3199   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3200   ac_dummy="$PATH"
3201   for ac_dir in $ac_dummy; do
3202     test -z "$ac_dir" && ac_dir=.
3203     if test -f $ac_dir/$ac_word; then
3204       ac_cv_prog_AS="${ac_tool_prefix}as"
3205       break
3206     fi
3207   done
3208   IFS="$ac_save_ifs"
3209 fi
3210 fi
3211 AS="$ac_cv_prog_AS"
3212 if test -n "$AS"; then
3213   echo "$ac_t""$AS" 1>&6
3214 else
3215   echo "$ac_t""no" 1>&6
3216 fi
3217
3218
3219 if test -z "$ac_cv_prog_AS"; then
3220 if test -n "$ac_tool_prefix"; then
3221   # Extract the first word of "as", so it can be a program name with args.
3222 set dummy as; ac_word=$2
3223 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3224 echo "configure:3225: checking for $ac_word" >&5
3225 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3226   echo $ac_n "(cached) $ac_c" 1>&6
3227 else
3228   if test -n "$AS"; then
3229   ac_cv_prog_AS="$AS" # Let the user override the test.
3230 else
3231   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3232   ac_dummy="$PATH"
3233   for ac_dir in $ac_dummy; do
3234     test -z "$ac_dir" && ac_dir=.
3235     if test -f $ac_dir/$ac_word; then
3236       ac_cv_prog_AS="as"
3237       break
3238     fi
3239   done
3240   IFS="$ac_save_ifs"
3241   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3242 fi
3243 fi
3244 AS="$ac_cv_prog_AS"
3245 if test -n "$AS"; then
3246   echo "$ac_t""$AS" 1>&6
3247 else
3248   echo "$ac_t""no" 1>&6
3249 fi
3250
3251 else
3252   AS="false"
3253 fi
3254 fi
3255
3256   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3257 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3258 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3259 echo "configure:3260: checking for $ac_word" >&5
3260 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3261   echo $ac_n "(cached) $ac_c" 1>&6
3262 else
3263   if test -n "$OBJDUMP"; then
3264   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3265 else
3266   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3267   ac_dummy="$PATH"
3268   for ac_dir in $ac_dummy; do
3269     test -z "$ac_dir" && ac_dir=.
3270     if test -f $ac_dir/$ac_word; then
3271       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3272       break
3273     fi
3274   done
3275   IFS="$ac_save_ifs"
3276 fi
3277 fi
3278 OBJDUMP="$ac_cv_prog_OBJDUMP"
3279 if test -n "$OBJDUMP"; then
3280   echo "$ac_t""$OBJDUMP" 1>&6
3281 else
3282   echo "$ac_t""no" 1>&6
3283 fi
3284
3285
3286 if test -z "$ac_cv_prog_OBJDUMP"; then
3287 if test -n "$ac_tool_prefix"; then
3288   # Extract the first word of "objdump", so it can be a program name with args.
3289 set dummy objdump; ac_word=$2
3290 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3291 echo "configure:3292: checking for $ac_word" >&5
3292 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3293   echo $ac_n "(cached) $ac_c" 1>&6
3294 else
3295   if test -n "$OBJDUMP"; then
3296   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3297 else
3298   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3299   ac_dummy="$PATH"
3300   for ac_dir in $ac_dummy; do
3301     test -z "$ac_dir" && ac_dir=.
3302     if test -f $ac_dir/$ac_word; then
3303       ac_cv_prog_OBJDUMP="objdump"
3304       break
3305     fi
3306   done
3307   IFS="$ac_save_ifs"
3308   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3309 fi
3310 fi
3311 OBJDUMP="$ac_cv_prog_OBJDUMP"
3312 if test -n "$OBJDUMP"; then
3313   echo "$ac_t""$OBJDUMP" 1>&6
3314 else
3315   echo "$ac_t""no" 1>&6
3316 fi
3317
3318 else
3319   OBJDUMP="false"
3320 fi
3321 fi
3322
3323   ;;
3324
3325 esac
3326
3327
3328 # Save cache, so that ltconfig can load it
3329
3330
3331 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3332 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3333 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3334 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3335 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3336 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3337 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3338 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3339
3340 # Reload cache, that may have been modified by ltconfig
3341
3342
3343 # This can be used to rebuild libtool when needed
3344 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3345
3346 # Always use our own libtool.
3347 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3348
3349 # Redirect the config.log output again, so that the ltconfig log is not
3350 # clobbered by the next message.
3351 exec 5>>./config.log
3352
3353
3354 for ac_prog in mawk gawk nawk awk
3355 do
3356 # Extract the first word of "$ac_prog", so it can be a program name with args.
3357 set dummy $ac_prog; ac_word=$2
3358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3359 echo "configure:3360: checking for $ac_word" >&5
3360 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3361   echo $ac_n "(cached) $ac_c" 1>&6
3362 else
3363   if test -n "$AWK"; then
3364   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3365 else
3366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3367   ac_dummy="$PATH"
3368   for ac_dir in $ac_dummy; do
3369     test -z "$ac_dir" && ac_dir=.
3370     if test -f $ac_dir/$ac_word; then
3371       ac_cv_prog_AWK="$ac_prog"
3372       break
3373     fi
3374   done
3375   IFS="$ac_save_ifs"
3376 fi
3377 fi
3378 AWK="$ac_cv_prog_AWK"
3379 if test -n "$AWK"; then
3380   echo "$ac_t""$AWK" 1>&6
3381 else
3382   echo "$ac_t""no" 1>&6
3383 fi
3384
3385 test -n "$AWK" && break
3386 done
3387
3388 # test for ln hardlink support
3389 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3390 echo "configure:3391: checking whether ln works" >&5
3391 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3392   echo $ac_n "(cached) $ac_c" 1>&6
3393 else
3394   rm -f conftest.src conftest.dst
3395 echo "conftest" > conftest.src
3396 if ln conftest.src conftest.dst 2>/dev/null
3397 then
3398   ol_cv_prog_LN_H="ln"
3399 else
3400   ol_cv_prog_LN_H="cp"
3401 fi
3402 rm -f conftest.src conftest.dst
3403
3404 fi
3405 LN_H="$ol_cv_prog_LN_H"
3406 if test "$ol_cv_prog_LN_H" = "ln"; then
3407         echo "$ac_t""yes" 1>&6
3408 else
3409         echo "$ac_t""no" 1>&6
3410 fi
3411
3412 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3413 echo "configure:3414: checking whether ln -s works" >&5
3414 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3415   echo $ac_n "(cached) $ac_c" 1>&6
3416 else
3417   rm -f conftestdata
3418 if ln -s X conftestdata 2>/dev/null
3419 then
3420   rm -f conftestdata
3421   ac_cv_prog_LN_S="ln -s"
3422 else
3423   ac_cv_prog_LN_S=ln
3424 fi
3425 fi
3426 LN_S="$ac_cv_prog_LN_S"
3427 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3428   echo "$ac_t""yes" 1>&6
3429 else
3430   echo "$ac_t""no" 1>&6
3431 fi
3432
3433
3434 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3435         LN_S="$LN_H"
3436 fi
3437
3438 # Extract the first word of "sendmail", so it can be a program name with args.
3439 set dummy sendmail; ac_word=$2
3440 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3441 echo "configure:3442: checking for $ac_word" >&5
3442 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3443   echo $ac_n "(cached) $ac_c" 1>&6
3444 else
3445   case "$SENDMAIL" in
3446   /*)
3447   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3448   ;;
3449   ?:/*)
3450   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3451   ;;
3452   *)
3453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3454   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3455   for ac_dir in $ac_dummy; do 
3456     test -z "$ac_dir" && ac_dir=.
3457     if test -f $ac_dir/$ac_word; then
3458       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3459       break
3460     fi
3461   done
3462   IFS="$ac_save_ifs"
3463   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3464   ;;
3465 esac
3466 fi
3467 SENDMAIL="$ac_cv_path_SENDMAIL"
3468 if test -n "$SENDMAIL"; then
3469   echo "$ac_t""$SENDMAIL" 1>&6
3470 else
3471   echo "$ac_t""no" 1>&6
3472 fi
3473
3474 # Extract the first word of "vi", so it can be a program name with args.
3475 set dummy vi; ac_word=$2
3476 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3477 echo "configure:3478: checking for $ac_word" >&5
3478 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3479   echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481   case "$EDITOR" in
3482   /*)
3483   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3484   ;;
3485   ?:/*)
3486   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3487   ;;
3488   *)
3489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3490   ac_dummy="$PATH:/usr/ucb"
3491   for ac_dir in $ac_dummy; do 
3492     test -z "$ac_dir" && ac_dir=.
3493     if test -f $ac_dir/$ac_word; then
3494       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3495       break
3496     fi
3497   done
3498   IFS="$ac_save_ifs"
3499   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3500   ;;
3501 esac
3502 fi
3503 EDITOR="$ac_cv_path_EDITOR"
3504 if test -n "$EDITOR"; then
3505   echo "$ac_t""$EDITOR" 1>&6
3506 else
3507   echo "$ac_t""no" 1>&6
3508 fi
3509
3510 # Extract the first word of "finger", so it can be a program name with args.
3511 set dummy finger; ac_word=$2
3512 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3513 echo "configure:3514: checking for $ac_word" >&5
3514 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   case "$FINGER" in
3518   /*)
3519   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3520   ;;
3521   ?:/*)
3522   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3523   ;;
3524   *)
3525   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3526   ac_dummy="$PATH:/usr/ucb"
3527   for ac_dir in $ac_dummy; do 
3528     test -z "$ac_dir" && ac_dir=.
3529     if test -f $ac_dir/$ac_word; then
3530       ac_cv_path_FINGER="$ac_dir/$ac_word"
3531       break
3532     fi
3533   done
3534   IFS="$ac_save_ifs"
3535   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3536   ;;
3537 esac
3538 fi
3539 FINGER="$ac_cv_path_FINGER"
3540 if test -n "$FINGER"; then
3541   echo "$ac_t""$FINGER" 1>&6
3542 else
3543   echo "$ac_t""no" 1>&6
3544 fi
3545
3546
3547 ol_link_perl=no
3548 if test $ol_enable_perl != no ; then
3549         # Extract the first word of "perl", so it can be a program name with args.
3550 set dummy perl; ac_word=$2
3551 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3552 echo "configure:3553: checking for $ac_word" >&5
3553 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3554   echo $ac_n "(cached) $ac_c" 1>&6
3555 else
3556   case "$PERLBIN" in
3557   /*)
3558   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3559   ;;
3560   ?:/*)
3561   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3562   ;;
3563   *)
3564   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3565   ac_dummy="$PATH"
3566   for ac_dir in $ac_dummy; do 
3567     test -z "$ac_dir" && ac_dir=.
3568     if test -f $ac_dir/$ac_word; then
3569       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3570       break
3571     fi
3572   done
3573   IFS="$ac_save_ifs"
3574   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3575   ;;
3576 esac
3577 fi
3578 PERLBIN="$ac_cv_path_PERLBIN"
3579 if test -n "$PERLBIN"; then
3580   echo "$ac_t""$PERLBIN" 1>&6
3581 else
3582   echo "$ac_t""no" 1>&6
3583 fi
3584
3585
3586         if test "no$PERLBIN" = "no" ; then
3587                 if test $ol_enable_perl = yes ; then
3588                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3589                 fi
3590
3591         else
3592                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3593                 if test x"$ol_with_perl_module" = "xstatic" ; then
3594                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3595                 else
3596                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3597                 fi
3598                                 ol_link_perl=yes
3599         fi
3600 fi
3601
3602 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3603 echo "configure:3604: checking how to run the C preprocessor" >&5
3604 # On Suns, sometimes $CPP names a directory.
3605 if test -n "$CPP" && test -d "$CPP"; then
3606   CPP=
3607 fi
3608 if test -z "$CPP"; then
3609 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3610   echo $ac_n "(cached) $ac_c" 1>&6
3611 else
3612     # This must be in double quotes, not single quotes, because CPP may get
3613   # substituted into the Makefile and "${CC-cc}" will confuse make.
3614   CPP="${CC-cc} -E"
3615   # On the NeXT, cc -E runs the code through the compiler's parser,
3616   # not just through cpp.
3617   cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 #include <assert.h>
3621 Syntax Error
3622 EOF
3623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3624 { (eval echo configure:3625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3626 if test -z "$ac_err"; then
3627   :
3628 else
3629   echo "$ac_err" >&5
3630   echo "configure: failed program was:" >&5
3631   cat conftest.$ac_ext >&5
3632   rm -rf conftest*
3633   CPP="${CC-cc} -E -traditional-cpp"
3634   cat > conftest.$ac_ext <<EOF
3635 #line 3636 "configure"
3636 #include "confdefs.h"
3637 #include <assert.h>
3638 Syntax Error
3639 EOF
3640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3641 { (eval echo configure:3642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3643 if test -z "$ac_err"; then
3644   :
3645 else
3646   echo "$ac_err" >&5
3647   echo "configure: failed program was:" >&5
3648   cat conftest.$ac_ext >&5
3649   rm -rf conftest*
3650   CPP="${CC-cc} -nologo -E"
3651   cat > conftest.$ac_ext <<EOF
3652 #line 3653 "configure"
3653 #include "confdefs.h"
3654 #include <assert.h>
3655 Syntax Error
3656 EOF
3657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3658 { (eval echo configure:3659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3660 if test -z "$ac_err"; then
3661   :
3662 else
3663   echo "$ac_err" >&5
3664   echo "configure: failed program was:" >&5
3665   cat conftest.$ac_ext >&5
3666   rm -rf conftest*
3667   CPP=/lib/cpp
3668 fi
3669 rm -f conftest*
3670 fi
3671 rm -f conftest*
3672 fi
3673 rm -f conftest*
3674   ac_cv_prog_CPP="$CPP"
3675 fi
3676   CPP="$ac_cv_prog_CPP"
3677 else
3678   ac_cv_prog_CPP="$CPP"
3679 fi
3680 echo "$ac_t""$CPP" 1>&6
3681
3682
3683 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3684         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3685
3686 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3687         echo "configure: warning: programs compiled here do run here..." 1>&2
3688         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3689
3690 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3691         echo "configure: warning: programs compiled here do not run here..." 1>&2
3692         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3693 fi
3694
3695 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3696 echo "configure:3697: checking for AIX" >&5
3697 cat > conftest.$ac_ext <<EOF
3698 #line 3699 "configure"
3699 #include "confdefs.h"
3700 #ifdef _AIX
3701   yes
3702 #endif
3703
3704 EOF
3705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3706   egrep "yes" >/dev/null 2>&1; then
3707   rm -rf conftest*
3708   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3709 #define _ALL_SOURCE 1
3710 EOF
3711
3712 else
3713   rm -rf conftest*
3714   echo "$ac_t""no" 1>&6
3715 fi
3716 rm -f conftest*
3717
3718
3719 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3720 echo "configure:3721: checking for POSIXized ISC" >&5
3721 if test -d /etc/conf/kconfig.d &&
3722   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3723 then
3724   echo "$ac_t""yes" 1>&6
3725   ISC=yes # If later tests want to check for ISC.
3726   cat >> confdefs.h <<\EOF
3727 #define _POSIX_SOURCE 1
3728 EOF
3729
3730   if test "$GCC" = yes; then
3731     CC="$CC -posix"
3732   else
3733     CC="$CC -Xp"
3734   fi
3735 else
3736   echo "$ac_t""no" 1>&6
3737   ISC=
3738 fi
3739
3740 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3741 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3742 echo "configure:3743: checking for minix/config.h" >&5
3743 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3744   echo $ac_n "(cached) $ac_c" 1>&6
3745 else
3746   cat > conftest.$ac_ext <<EOF
3747 #line 3748 "configure"
3748 #include "confdefs.h"
3749 #include <minix/config.h>
3750 EOF
3751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3752 { (eval echo configure:3753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3754 if test -z "$ac_err"; then
3755   rm -rf conftest*
3756   eval "ac_cv_header_$ac_safe=yes"
3757 else
3758   echo "$ac_err" >&5
3759   echo "configure: failed program was:" >&5
3760   cat conftest.$ac_ext >&5
3761   rm -rf conftest*
3762   eval "ac_cv_header_$ac_safe=no"
3763 fi
3764 rm -f conftest*
3765 fi
3766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3767   echo "$ac_t""yes" 1>&6
3768   MINIX=yes
3769 else
3770   echo "$ac_t""no" 1>&6
3771 MINIX=
3772 fi
3773
3774 if test "$MINIX" = yes; then
3775   cat >> confdefs.h <<\EOF
3776 #define _POSIX_SOURCE 1
3777 EOF
3778
3779   cat >> confdefs.h <<\EOF
3780 #define _POSIX_1_SOURCE 2
3781 EOF
3782
3783   cat >> confdefs.h <<\EOF
3784 #define _MINIX 1
3785 EOF
3786
3787 fi
3788
3789
3790 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3791 echo "configure:3792: checking for Cygwin environment" >&5
3792 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3793   echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795   cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798
3799 int main() {
3800
3801 #ifndef __CYGWIN__
3802 #define __CYGWIN__ __CYGWIN32__
3803 #endif
3804 return __CYGWIN__;
3805 ; return 0; }
3806 EOF
3807 if { (eval echo configure:3808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3808   rm -rf conftest*
3809   ac_cv_cygwin=yes
3810 else
3811   echo "configure: failed program was:" >&5
3812   cat conftest.$ac_ext >&5
3813   rm -rf conftest*
3814   ac_cv_cygwin=no
3815 fi
3816 rm -f conftest*
3817 fi
3818
3819 echo "$ac_t""$ac_cv_cygwin" 1>&6
3820 CYGWIN=
3821 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3822 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3823 echo "configure:3824: checking for mingw32 environment" >&5
3824 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3825   echo $ac_n "(cached) $ac_c" 1>&6
3826 else
3827   cat > conftest.$ac_ext <<EOF
3828 #line 3829 "configure"
3829 #include "confdefs.h"
3830
3831 int main() {
3832 return __MINGW32__;
3833 ; return 0; }
3834 EOF
3835 if { (eval echo configure:3836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3836   rm -rf conftest*
3837   ac_cv_mingw32=yes
3838 else
3839   echo "configure: failed program was:" >&5
3840   cat conftest.$ac_ext >&5
3841   rm -rf conftest*
3842   ac_cv_mingw32=no
3843 fi
3844 rm -f conftest*
3845 fi
3846
3847 echo "$ac_t""$ac_cv_mingw32" 1>&6
3848 MINGW32=
3849 test "$ac_cv_mingw32" = yes && MINGW32=yes
3850 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3851 echo "configure:3852: checking for EMX OS/2 environment" >&5
3852 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3853   echo $ac_n "(cached) $ac_c" 1>&6
3854 else
3855   cat > conftest.$ac_ext <<EOF
3856 #line 3857 "configure"
3857 #include "confdefs.h"
3858
3859 int main() {
3860 return __EMX__;
3861 ; return 0; }
3862 EOF
3863 if { (eval echo configure:3864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3864   rm -rf conftest*
3865   ac_cv_emxos2=yes
3866 else
3867   echo "configure: failed program was:" >&5
3868   cat conftest.$ac_ext >&5
3869   rm -rf conftest*
3870   ac_cv_emxos2=no
3871 fi
3872 rm -f conftest*
3873 fi
3874
3875 echo "$ac_t""$ac_cv_emxos2" 1>&6
3876 EMXOS2=
3877 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3878
3879
3880
3881 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3882 echo "configure:3883: checking for executable suffix" >&5
3883 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3884   echo $ac_n "(cached) $ac_c" 1>&6
3885 else
3886   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3887   ac_cv_exeext=.exe
3888 else
3889   rm -f conftest*
3890   echo 'int main () { return 0; }' > conftest.$ac_ext
3891   ac_cv_exeext=
3892   if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3893     for file in conftest.*; do
3894       case $file in
3895       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3896       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3897       esac
3898     done
3899   else
3900     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3901   fi
3902   rm -f conftest*
3903   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3904 fi
3905 fi
3906
3907 EXEEXT=""
3908 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3909 echo "$ac_t""${ac_cv_exeext}" 1>&6
3910 ac_exeext=$EXEEXT
3911
3912 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3913 echo "configure:3914: checking for object suffix" >&5
3914 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3915   echo $ac_n "(cached) $ac_c" 1>&6
3916 else
3917   rm -f conftest*
3918 echo 'int i = 1;' > conftest.$ac_ext
3919 if { (eval echo configure:3920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3920   for ac_file in conftest.*; do
3921     case $ac_file in
3922     *.c) ;;
3923     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3924     esac
3925   done
3926 else
3927   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3928 fi
3929 rm -f conftest*
3930 fi
3931
3932 echo "$ac_t""$ac_cv_objext" 1>&6
3933 OBJEXT=$ac_cv_objext
3934 ac_objext=$ac_cv_objext
3935
3936
3937 cat >> confdefs.h <<EOF
3938 #define EXEEXT "${EXEEXT}"
3939 EOF
3940
3941
3942 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3943 echo "configure:3944: checking for be_app in -lbe" >&5
3944 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3945 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3946   echo $ac_n "(cached) $ac_c" 1>&6
3947 else
3948   ac_save_LIBS="$LIBS"
3949 LIBS="-lbe -lroot -lnet $LIBS"
3950 cat > conftest.$ac_ext <<EOF
3951 #line 3952 "configure"
3952 #include "confdefs.h"
3953 /* Override any gcc2 internal prototype to avoid an error.  */
3954 /* We use char because int might match the return type of a gcc2
3955     builtin and then its argument prototype would still apply.  */
3956 char be_app();
3957
3958 int main() {
3959 be_app()
3960 ; return 0; }
3961 EOF
3962 if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3963   rm -rf conftest*
3964   eval "ac_cv_lib_$ac_lib_var=yes"
3965 else
3966   echo "configure: failed program was:" >&5
3967   cat conftest.$ac_ext >&5
3968   rm -rf conftest*
3969   eval "ac_cv_lib_$ac_lib_var=no"
3970 fi
3971 rm -f conftest*
3972 LIBS="$ac_save_LIBS"
3973
3974 fi
3975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3976   echo "$ac_t""yes" 1>&6
3977   LIBS="$LIBS -lbe -lroot -lnet"
3978 else
3979   echo "$ac_t""no" 1>&6
3980 :
3981 fi
3982
3983
3984
3985
3986
3987 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3988 echo "configure:3989: checking for ${CC-cc} option to accept ANSI C" >&5
3989 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3990   echo $ac_n "(cached) $ac_c" 1>&6
3991 else
3992   am_cv_prog_cc_stdc=no
3993 ac_save_CC="$CC"
3994 # Don't try gcc -ansi; that turns off useful extensions and
3995 # breaks some systems' header files.
3996 # AIX                   -qlanglvl=ansi
3997 # Ultrix and OSF/1      -std1
3998 # HP-UX 10.20 and later -Ae
3999 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4000 # SVR4                  -Xc -D__EXTENSIONS__
4001 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4002 do
4003   CC="$ac_save_CC $ac_arg"
4004   cat > conftest.$ac_ext <<EOF
4005 #line 4006 "configure"
4006 #include "confdefs.h"
4007 #include <stdarg.h>
4008 #include <stdio.h>
4009 #include <sys/types.h>
4010 #include <sys/stat.h>
4011 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4012 struct buf { int x; };
4013 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4014 static char *e (p, i)
4015      char **p;
4016      int i;
4017 {
4018   return p[i];
4019 }
4020 static char *f (char * (*g) (char **, int), char **p, ...)
4021 {
4022   char *s;
4023   va_list v;
4024   va_start (v,p);
4025   s = g (p, va_arg (v,int));
4026   va_end (v);
4027   return s;
4028 }
4029 int test (int i, double x);
4030 struct s1 {int (*f) (int a);};
4031 struct s2 {int (*f) (double a);};
4032 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4033 int argc;
4034 char **argv;
4035
4036 int main() {
4037
4038 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4039
4040 ; return 0; }
4041 EOF
4042 if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4043   rm -rf conftest*
4044   am_cv_prog_cc_stdc="$ac_arg"; break
4045 else
4046   echo "configure: failed program was:" >&5
4047   cat conftest.$ac_ext >&5
4048 fi
4049 rm -f conftest*
4050 done
4051 CC="$ac_save_CC"
4052
4053 fi
4054
4055 if test -z "$am_cv_prog_cc_stdc"; then
4056   echo "$ac_t""none needed" 1>&6
4057 else
4058   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4059 fi
4060 case "x$am_cv_prog_cc_stdc" in
4061   x|xno) ;;
4062   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4063 esac
4064
4065 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4066         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4067 fi
4068
4069 # test for make depend flag
4070 OL_MKDEP=
4071 OL_MKDEP_FLAGS=
4072 if test -z "${MKDEP}"; then
4073         OL_MKDEP="${CC-cc}"
4074         if test -z "${MKDEP_FLAGS}"; then
4075                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4076 echo "configure:4077: checking for ${OL_MKDEP} depend flag" >&5
4077 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4078   echo $ac_n "(cached) $ac_c" 1>&6
4079 else
4080   
4081                         ol_cv_mkdep=no
4082                         for flag in "-M" "-xM"; do
4083                                 cat > conftest.c <<EOF
4084  noCode;
4085 EOF
4086                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4087                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4088                                 then
4089                                         if test ! -f conftest."${ac_object}" ; then
4090                                                 ol_cv_mkdep=$flag
4091                                                 OL_MKDEP_FLAGS="$flag"
4092                                                 break
4093                                         fi
4094                                 fi
4095                         done
4096                         rm -f conftest*
4097                 
4098 fi
4099
4100 echo "$ac_t""$ol_cv_mkdep" 1>&6
4101         else
4102                 cc_cv_mkdep=yes
4103                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4104         fi
4105 else
4106         cc_cv_mkdep=yes
4107         OL_MKDEP="${MKDEP}"
4108         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4109 fi
4110
4111
4112
4113 if test "${ol_cv_mkdep}" = no ; then
4114         # this will soon become an error
4115         echo "configure: warning: do not know how to generate dependencies" 1>&2
4116 fi
4117
4118 ol_link_modules=no
4119 if test $ol_enable_modules != no ; then
4120         for ac_hdr in ltdl.h
4121 do
4122 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4123 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4124 echo "configure:4125: checking for $ac_hdr" >&5
4125 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4126   echo $ac_n "(cached) $ac_c" 1>&6
4127 else
4128   cat > conftest.$ac_ext <<EOF
4129 #line 4130 "configure"
4130 #include "confdefs.h"
4131 #include <$ac_hdr>
4132 EOF
4133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4134 { (eval echo configure:4135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4136 if test -z "$ac_err"; then
4137   rm -rf conftest*
4138   eval "ac_cv_header_$ac_safe=yes"
4139 else
4140   echo "$ac_err" >&5
4141   echo "configure: failed program was:" >&5
4142   cat conftest.$ac_ext >&5
4143   rm -rf conftest*
4144   eval "ac_cv_header_$ac_safe=no"
4145 fi
4146 rm -f conftest*
4147 fi
4148 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4149   echo "$ac_t""yes" 1>&6
4150     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4151   cat >> confdefs.h <<EOF
4152 #define $ac_tr_hdr 1
4153 EOF
4154  
4155 else
4156   echo "$ac_t""no" 1>&6
4157 fi
4158 done
4159
4160
4161         if test $ac_cv_header_ltdl_h = no ; then
4162                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4163         fi
4164
4165         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4166 echo "configure:4167: checking for lt_dlinit in -lltdl" >&5
4167 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4168 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4169   echo $ac_n "(cached) $ac_c" 1>&6
4170 else
4171   ac_save_LIBS="$LIBS"
4172 LIBS="-lltdl  $LIBS"
4173 cat > conftest.$ac_ext <<EOF
4174 #line 4175 "configure"
4175 #include "confdefs.h"
4176 /* Override any gcc2 internal prototype to avoid an error.  */
4177 /* We use char because int might match the return type of a gcc2
4178     builtin and then its argument prototype would still apply.  */
4179 char lt_dlinit();
4180
4181 int main() {
4182 lt_dlinit()
4183 ; return 0; }
4184 EOF
4185 if { (eval echo configure:4186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4186   rm -rf conftest*
4187   eval "ac_cv_lib_$ac_lib_var=yes"
4188 else
4189   echo "configure: failed program was:" >&5
4190   cat conftest.$ac_ext >&5
4191   rm -rf conftest*
4192   eval "ac_cv_lib_$ac_lib_var=no"
4193 fi
4194 rm -f conftest*
4195 LIBS="$ac_save_LIBS"
4196
4197 fi
4198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4199   echo "$ac_t""yes" 1>&6
4200   
4201             MODULES_LIBS=-lltdl
4202             cat >> confdefs.h <<\EOF
4203 #define HAVE_LIBLTDL 1
4204 EOF
4205
4206         
4207 else
4208   echo "$ac_t""no" 1>&6
4209 fi
4210
4211
4212         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4213                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4214         fi
4215         ol_link_modules=yes
4216 else
4217         ol_with_bdb2_module=static
4218         ol_with_ldap_module=static
4219         ol_with_ldbm_module=static
4220         ol_with_passwd_module=static
4221         ol_with_perl_module=static
4222         ol_with_shell_module=static
4223         ol_with_tcl_module=static
4224 fi
4225
4226 # test for EBCDIC
4227 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4228 echo "configure:4229: checking for EBCDIC" >&5
4229 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4230   echo $ac_n "(cached) $ac_c" 1>&6
4231 else
4232   
4233         cat > conftest.$ac_ext <<EOF
4234 #line 4235 "configure"
4235 #include "confdefs.h"
4236
4237 #if !('M' == 0xd4)
4238 #include <__ASCII__/generate_error.h>
4239 #endif
4240
4241 EOF
4242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4243 { (eval echo configure:4244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4245 if test -z "$ac_err"; then
4246   rm -rf conftest*
4247   ol_cv_cpp_ebcdic=yes
4248 else
4249   echo "$ac_err" >&5
4250   echo "configure: failed program was:" >&5
4251   cat conftest.$ac_ext >&5
4252   rm -rf conftest*
4253   ol_cv_cpp_ebcdic=no
4254 fi
4255 rm -f conftest*
4256 fi
4257
4258 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4259 if test $ol_cv_cpp_ebcdic = yes ; then
4260         cat >> confdefs.h <<\EOF
4261 #define HAVE_EBCDIC 1
4262 EOF
4263
4264 fi
4265
4266 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4267 echo "configure:4268: checking for ANSI C header files" >&5
4268 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4269   echo $ac_n "(cached) $ac_c" 1>&6
4270 else
4271   cat > conftest.$ac_ext <<EOF
4272 #line 4273 "configure"
4273 #include "confdefs.h"
4274 #include <stdlib.h>
4275 #include <stdarg.h>
4276 #include <string.h>
4277 #include <float.h>
4278 EOF
4279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4280 { (eval echo configure:4281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4282 if test -z "$ac_err"; then
4283   rm -rf conftest*
4284   ol_cv_header_stdc=yes
4285 else
4286   echo "$ac_err" >&5
4287   echo "configure: failed program was:" >&5
4288   cat conftest.$ac_ext >&5
4289   rm -rf conftest*
4290   ol_cv_header_stdc=no
4291 fi
4292 rm -f conftest*
4293
4294 if test $ol_cv_header_stdc = yes; then
4295   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4296 cat > conftest.$ac_ext <<EOF
4297 #line 4298 "configure"
4298 #include "confdefs.h"
4299 #include <string.h>
4300 EOF
4301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4302   egrep "memchr" >/dev/null 2>&1; then
4303   :
4304 else
4305   rm -rf conftest*
4306   ol_cv_header_stdc=no
4307 fi
4308 rm -f conftest*
4309
4310 fi
4311
4312 if test $ol_cv_header_stdc = yes; then
4313   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4314 cat > conftest.$ac_ext <<EOF
4315 #line 4316 "configure"
4316 #include "confdefs.h"
4317 #include <stdlib.h>
4318 EOF
4319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4320   egrep "free" >/dev/null 2>&1; then
4321   :
4322 else
4323   rm -rf conftest*
4324   ol_cv_header_stdc=no
4325 fi
4326 rm -f conftest*
4327
4328 fi
4329
4330 if test $ol_cv_header_stdc = yes; then
4331   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4332 if test "$cross_compiling" = yes; then
4333   :
4334 else
4335   cat > conftest.$ac_ext <<EOF
4336 #line 4337 "configure"
4337 #include "confdefs.h"
4338 #include <ctype.h>
4339 #ifndef HAVE_EBCDIC
4340 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4341 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4342 #else
4343 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4344                 || ('j' <= (c) && (c) <= 'r') \
4345                 || ('s' <= (c) && (c) <= 'z'))
4346 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4347 #endif
4348 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4349 int main () { int i; for (i = 0; i < 256; i++)
4350 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4351 exit (0); }
4352
4353 EOF
4354 if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4355 then
4356   :
4357 else
4358   echo "configure: failed program was:" >&5
4359   cat conftest.$ac_ext >&5
4360   rm -fr conftest*
4361   ol_cv_header_stdc=no
4362 fi
4363 rm -fr conftest*
4364 fi
4365
4366 fi
4367 fi
4368
4369 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4370 if test $ol_cv_header_stdc = yes; then
4371   cat >> confdefs.h <<\EOF
4372 #define STDC_HEADERS 1
4373 EOF
4374
4375 fi
4376 ac_cv_header_stdc=disable
4377
4378
4379 if test $ol_cv_header_stdc != yes; then
4380         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4381 fi
4382
4383 ac_header_dirent=no
4384 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4385 do
4386 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4387 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4388 echo "configure:4389: checking for $ac_hdr that defines DIR" >&5
4389 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4390   echo $ac_n "(cached) $ac_c" 1>&6
4391 else
4392   cat > conftest.$ac_ext <<EOF
4393 #line 4394 "configure"
4394 #include "confdefs.h"
4395 #include <sys/types.h>
4396 #include <$ac_hdr>
4397 int main() {
4398 DIR *dirp = 0;
4399 ; return 0; }
4400 EOF
4401 if { (eval echo configure:4402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4402   rm -rf conftest*
4403   eval "ac_cv_header_dirent_$ac_safe=yes"
4404 else
4405   echo "configure: failed program was:" >&5
4406   cat conftest.$ac_ext >&5
4407   rm -rf conftest*
4408   eval "ac_cv_header_dirent_$ac_safe=no"
4409 fi
4410 rm -f conftest*
4411 fi
4412 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4413   echo "$ac_t""yes" 1>&6
4414     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4415   cat >> confdefs.h <<EOF
4416 #define $ac_tr_hdr 1
4417 EOF
4418  ac_header_dirent=$ac_hdr; break
4419 else
4420   echo "$ac_t""no" 1>&6
4421 fi
4422 done
4423 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4424 if test $ac_header_dirent = dirent.h; then
4425 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4426 echo "configure:4427: checking for opendir in -ldir" >&5
4427 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4428 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4429   echo $ac_n "(cached) $ac_c" 1>&6
4430 else
4431   ac_save_LIBS="$LIBS"
4432 LIBS="-ldir  $LIBS"
4433 cat > conftest.$ac_ext <<EOF
4434 #line 4435 "configure"
4435 #include "confdefs.h"
4436 /* Override any gcc2 internal prototype to avoid an error.  */
4437 /* We use char because int might match the return type of a gcc2
4438     builtin and then its argument prototype would still apply.  */
4439 char opendir();
4440
4441 int main() {
4442 opendir()
4443 ; return 0; }
4444 EOF
4445 if { (eval echo configure:4446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4446   rm -rf conftest*
4447   eval "ac_cv_lib_$ac_lib_var=yes"
4448 else
4449   echo "configure: failed program was:" >&5
4450   cat conftest.$ac_ext >&5
4451   rm -rf conftest*
4452   eval "ac_cv_lib_$ac_lib_var=no"
4453 fi
4454 rm -f conftest*
4455 LIBS="$ac_save_LIBS"
4456
4457 fi
4458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4459   echo "$ac_t""yes" 1>&6
4460   LIBS="$LIBS -ldir"
4461 else
4462   echo "$ac_t""no" 1>&6
4463 fi
4464
4465 else
4466 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4467 echo "configure:4468: checking for opendir in -lx" >&5
4468 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4469 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4470   echo $ac_n "(cached) $ac_c" 1>&6
4471 else
4472   ac_save_LIBS="$LIBS"
4473 LIBS="-lx  $LIBS"
4474 cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477 /* Override any gcc2 internal prototype to avoid an error.  */
4478 /* We use char because int might match the return type of a gcc2
4479     builtin and then its argument prototype would still apply.  */
4480 char opendir();
4481
4482 int main() {
4483 opendir()
4484 ; return 0; }
4485 EOF
4486 if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4487   rm -rf conftest*
4488   eval "ac_cv_lib_$ac_lib_var=yes"
4489 else
4490   echo "configure: failed program was:" >&5
4491   cat conftest.$ac_ext >&5
4492   rm -rf conftest*
4493   eval "ac_cv_lib_$ac_lib_var=no"
4494 fi
4495 rm -f conftest*
4496 LIBS="$ac_save_LIBS"
4497
4498 fi
4499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4500   echo "$ac_t""yes" 1>&6
4501   LIBS="$LIBS -lx"
4502 else
4503   echo "$ac_t""no" 1>&6
4504 fi
4505
4506 fi
4507
4508 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4509 echo "configure:4510: checking for sys/wait.h that is POSIX.1 compatible" >&5
4510 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4511   echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4513   cat > conftest.$ac_ext <<EOF
4514 #line 4515 "configure"
4515 #include "confdefs.h"
4516 #include <sys/types.h>
4517 #include <sys/wait.h>
4518 #ifndef WEXITSTATUS
4519 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4520 #endif
4521 #ifndef WIFEXITED
4522 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4523 #endif
4524 int main() {
4525 int s;
4526 wait (&s);
4527 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4528 ; return 0; }
4529 EOF
4530 if { (eval echo configure:4531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4531   rm -rf conftest*
4532   ac_cv_header_sys_wait_h=yes
4533 else
4534   echo "configure: failed program was:" >&5
4535   cat conftest.$ac_ext >&5
4536   rm -rf conftest*
4537   ac_cv_header_sys_wait_h=no
4538 fi
4539 rm -f conftest*
4540 fi
4541
4542 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4543 if test $ac_cv_header_sys_wait_h = yes; then
4544   cat >> confdefs.h <<\EOF
4545 #define HAVE_SYS_WAIT_H 1
4546 EOF
4547
4548 fi
4549
4550 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4551 echo "configure:4552: checking POSIX termios" >&5
4552 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4553   echo $ac_n "(cached) $ac_c" 1>&6
4554 else
4555   cat > conftest.$ac_ext <<EOF
4556 #line 4557 "configure"
4557 #include "confdefs.h"
4558 #include <sys/types.h>
4559 #include <unistd.h>
4560 #include <termios.h>
4561 int main() {
4562 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4563    tcgetattr(0, 0);
4564 ; return 0; }
4565 EOF
4566 if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4567   rm -rf conftest*
4568   am_cv_sys_posix_termios=yes
4569 else
4570   echo "configure: failed program was:" >&5
4571   cat conftest.$ac_ext >&5
4572   rm -rf conftest*
4573   am_cv_sys_posix_termios=no
4574 fi
4575 rm -f conftest*
4576 fi
4577
4578 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4579
4580
4581  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4582 echo "configure:4583: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4583 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4584   echo $ac_n "(cached) $ac_c" 1>&6
4585 else
4586   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4587
4588   gwinsz_in_termios_h=no
4589   if test $am_cv_sys_posix_termios = yes; then
4590     cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 #include <sys/types.h>
4594 #     include <termios.h>
4595 #     ifdef TIOCGWINSZ
4596         yes
4597 #     endif
4598     
4599 EOF
4600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4601   egrep "yes" >/dev/null 2>&1; then
4602   rm -rf conftest*
4603   gwinsz_in_termios_h=yes
4604 fi
4605 rm -f conftest*
4606
4607   fi
4608
4609   if test $gwinsz_in_termios_h = no; then
4610     cat > conftest.$ac_ext <<EOF
4611 #line 4612 "configure"
4612 #include "confdefs.h"
4613 #include <sys/types.h>
4614 #     include <sys/ioctl.h>
4615 #     ifdef TIOCGWINSZ
4616         yes
4617 #     endif
4618     
4619 EOF
4620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4621   egrep "yes" >/dev/null 2>&1; then
4622   rm -rf conftest*
4623   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4624 fi
4625 rm -f conftest*
4626
4627   fi
4628   
4629 fi
4630
4631 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4632   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4633     cat >> confdefs.h <<\EOF
4634 #define GWINSZ_IN_SYS_IOCTL 1
4635 EOF
4636
4637   fi
4638
4639 if test $am_cv_sys_posix_termios = yes ; then
4640         cat >> confdefs.h <<\EOF
4641 #define HAVE_POSIX_TERMIOS 1
4642 EOF
4643
4644 fi
4645
4646 for ac_hdr in \
4647         arpa/inet.h             \
4648         arpa/nameser.h  \
4649         assert.h                \
4650         conio.h                 \
4651         crypt.h                 \
4652         direct.h                \
4653         errno.h                 \
4654         fcntl.h                 \
4655         filio.h                 \
4656         getopt.h                \
4657         grp.h                   \
4658         io.h                    \
4659         libutil.h               \
4660         limits.h                \
4661         locale.h                \
4662         netinet/tcp.h   \
4663         malloc.h                \
4664         memory.h                \
4665         psap.h                  \
4666         pwd.h                   \
4667         process.h               \
4668         resolv.h                \
4669         sgtty.h                 \
4670         shadow.h                \
4671         stddef.h                \
4672         string.h                \
4673         strings.h               \
4674         sysexits.h              \
4675         sys/file.h              \
4676         sys/filio.h             \
4677         sys/errno.h             \
4678         sys/ioctl.h             \
4679         sys/param.h             \
4680         sys/resource.h  \
4681         sys/select.h    \
4682         sys/socket.h    \
4683         sys/syslog.h    \
4684         sys/time.h              \
4685         sys/types.h             \
4686         syslog.h                \
4687         termios.h               \
4688         unistd.h                \
4689         winsock.h               \
4690
4691 do
4692 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4693 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4694 echo "configure:4695: checking for $ac_hdr" >&5
4695 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4696   echo $ac_n "(cached) $ac_c" 1>&6
4697 else
4698   cat > conftest.$ac_ext <<EOF
4699 #line 4700 "configure"
4700 #include "confdefs.h"
4701 #include <$ac_hdr>
4702 EOF
4703 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4704 { (eval echo configure:4705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4705 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4706 if test -z "$ac_err"; then
4707   rm -rf conftest*
4708   eval "ac_cv_header_$ac_safe=yes"
4709 else
4710   echo "$ac_err" >&5
4711   echo "configure: failed program was:" >&5
4712   cat conftest.$ac_ext >&5
4713   rm -rf conftest*
4714   eval "ac_cv_header_$ac_safe=no"
4715 fi
4716 rm -f conftest*
4717 fi
4718 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4719   echo "$ac_t""yes" 1>&6
4720     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4721   cat >> confdefs.h <<EOF
4722 #define $ac_tr_hdr 1
4723 EOF
4724  
4725 else
4726   echo "$ac_t""no" 1>&6
4727 fi
4728 done
4729
4730
4731
4732
4733 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4734 echo "configure:4735: checking for sigset in -lV3" >&5
4735 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4736 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4737   echo $ac_n "(cached) $ac_c" 1>&6
4738 else
4739   ac_save_LIBS="$LIBS"
4740 LIBS="-lV3  $LIBS"
4741 cat > conftest.$ac_ext <<EOF
4742 #line 4743 "configure"
4743 #include "confdefs.h"
4744 /* Override any gcc2 internal prototype to avoid an error.  */
4745 /* We use char because int might match the return type of a gcc2
4746     builtin and then its argument prototype would still apply.  */
4747 char sigset();
4748
4749 int main() {
4750 sigset()
4751 ; return 0; }
4752 EOF
4753 if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4754   rm -rf conftest*
4755   eval "ac_cv_lib_$ac_lib_var=yes"
4756 else
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -rf conftest*
4760   eval "ac_cv_lib_$ac_lib_var=no"
4761 fi
4762 rm -f conftest*
4763 LIBS="$ac_save_LIBS"
4764
4765 fi
4766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4767   echo "$ac_t""yes" 1>&6
4768     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4769     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4770   cat >> confdefs.h <<EOF
4771 #define $ac_tr_lib 1
4772 EOF
4773
4774   LIBS="-lV3 $LIBS"
4775
4776 else
4777   echo "$ac_t""no" 1>&6
4778 fi
4779
4780
4781 if test $ac_cv_header_winsock_h = yes; then
4782         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4783 echo "configure:4784: checking for winsock" >&5
4784 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4785   echo $ac_n "(cached) $ac_c" 1>&6
4786 else
4787   cat > conftest.$ac_ext <<EOF
4788 #line 4789 "configure"
4789 #include "confdefs.h"
4790 #include <winsock.h>
4791 int main() {
4792
4793                         socket(0,0,0);
4794                         select(0,NULL,NULL,NULL,NULL);
4795                         closesocket(0);
4796                         gethostname(NULL,0);
4797         
4798 ; return 0; }
4799 EOF
4800 if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4801   rm -rf conftest*
4802   ol_cv_winsock=yes
4803 else
4804   echo "configure: failed program was:" >&5
4805   cat conftest.$ac_ext >&5
4806   rm -rf conftest*
4807   ol_cv_winsock=no
4808 fi
4809 rm -f conftest*]
4810 fi
4811
4812 echo "$ac_t""$ol_cv_winsock" 1>&6
4813
4814         if test $ol_cv_winsock = yes ; then
4815                 cat >> confdefs.h <<\EOF
4816 #define HAVE_WINSOCK 1
4817 EOF
4818
4819                 ac_cv_func_socket=yes
4820                 ac_cv_func_select=yes
4821                 ac_cv_func_closesocket=yes
4822                 ac_cv_func_gethostname=yes
4823         fi
4824 fi
4825
4826
4827 echo $ac_n "checking for socket""... $ac_c" 1>&6
4828 echo "configure:4829: checking for socket" >&5
4829 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4830   echo $ac_n "(cached) $ac_c" 1>&6
4831 else
4832   cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835 /* System header to define __stub macros and hopefully few prototypes,
4836     which can conflict with char socket(); below.  */
4837 #include <assert.h>
4838 /* Override any gcc2 internal prototype to avoid an error.  */
4839 /* We use char because int might match the return type of a gcc2
4840     builtin and then its argument prototype would still apply.  */
4841 char socket();
4842 char (*f)();
4843
4844 int main() {
4845
4846 /* The GNU C library defines this for functions which it implements
4847     to always fail with ENOSYS.  Some functions are actually named
4848     something starting with __ and the normal name is an alias.  */
4849 #if defined (__stub_socket) || defined (__stub___socket)
4850 choke me
4851 #else
4852 f = socket;
4853 #endif
4854
4855 ; return 0; }
4856 EOF
4857 if { (eval echo configure:4858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4858   rm -rf conftest*
4859   eval "ac_cv_func_socket=yes"
4860 else
4861   echo "configure: failed program was:" >&5
4862   cat conftest.$ac_ext >&5
4863   rm -rf conftest*
4864   eval "ac_cv_func_socket=no"
4865 fi
4866 rm -f conftest*
4867 fi
4868
4869 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4870   echo "$ac_t""yes" 1>&6
4871   :
4872 else
4873   echo "$ac_t""no" 1>&6
4874         
4875         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4876 echo "configure:4877: checking for main in -lsocket" >&5
4877 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4878 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4879   echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881   ac_save_LIBS="$LIBS"
4882 LIBS="-lsocket  $LIBS"
4883 cat > conftest.$ac_ext <<EOF
4884 #line 4885 "configure"
4885 #include "confdefs.h"
4886
4887 int main() {
4888 main()
4889 ; return 0; }
4890 EOF
4891 if { (eval echo configure:4892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4892   rm -rf conftest*
4893   eval "ac_cv_lib_$ac_lib_var=yes"
4894 else
4895   echo "configure: failed program was:" >&5
4896   cat conftest.$ac_ext >&5
4897   rm -rf conftest*
4898   eval "ac_cv_lib_$ac_lib_var=no"
4899 fi
4900 rm -f conftest*
4901 LIBS="$ac_save_LIBS"
4902
4903 fi
4904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4905   echo "$ac_t""yes" 1>&6
4906     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4907     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4908   cat >> confdefs.h <<EOF
4909 #define $ac_tr_lib 1
4910 EOF
4911
4912   LIBS="-lsocket $LIBS"
4913
4914 else
4915   echo "$ac_t""no" 1>&6
4916 fi
4917
4918         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4919 echo "configure:4920: checking for main in -lnet" >&5
4920 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4921 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4922   echo $ac_n "(cached) $ac_c" 1>&6
4923 else
4924   ac_save_LIBS="$LIBS"
4925 LIBS="-lnet  $LIBS"
4926 cat > conftest.$ac_ext <<EOF
4927 #line 4928 "configure"
4928 #include "confdefs.h"
4929
4930 int main() {
4931 main()
4932 ; return 0; }
4933 EOF
4934 if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4935   rm -rf conftest*
4936   eval "ac_cv_lib_$ac_lib_var=yes"
4937 else
4938   echo "configure: failed program was:" >&5
4939   cat conftest.$ac_ext >&5
4940   rm -rf conftest*
4941   eval "ac_cv_lib_$ac_lib_var=no"
4942 fi
4943 rm -f conftest*
4944 LIBS="$ac_save_LIBS"
4945
4946 fi
4947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4948   echo "$ac_t""yes" 1>&6
4949     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4950     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4951   cat >> confdefs.h <<EOF
4952 #define $ac_tr_lib 1
4953 EOF
4954
4955   LIBS="-lnet $LIBS"
4956
4957 else
4958   echo "$ac_t""no" 1>&6
4959 fi
4960
4961         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4962 echo "configure:4963: checking for main in -lnsl_s" >&5
4963 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4964 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4965   echo $ac_n "(cached) $ac_c" 1>&6
4966 else
4967   ac_save_LIBS="$LIBS"
4968 LIBS="-lnsl_s  $LIBS"
4969 cat > conftest.$ac_ext <<EOF
4970 #line 4971 "configure"
4971 #include "confdefs.h"
4972
4973 int main() {
4974 main()
4975 ; return 0; }
4976 EOF
4977 if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4978   rm -rf conftest*
4979   eval "ac_cv_lib_$ac_lib_var=yes"
4980 else
4981   echo "configure: failed program was:" >&5
4982   cat conftest.$ac_ext >&5
4983   rm -rf conftest*
4984   eval "ac_cv_lib_$ac_lib_var=no"
4985 fi
4986 rm -f conftest*
4987 LIBS="$ac_save_LIBS"
4988
4989 fi
4990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4991   echo "$ac_t""yes" 1>&6
4992     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4993     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4994   cat >> confdefs.h <<EOF
4995 #define $ac_tr_lib 1
4996 EOF
4997
4998   LIBS="-lnsl_s $LIBS"
4999
5000 else
5001   echo "$ac_t""no" 1>&6
5002 fi
5003
5004         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5005 echo "configure:5006: checking for main in -lnsl" >&5
5006 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5008   echo $ac_n "(cached) $ac_c" 1>&6
5009 else
5010   ac_save_LIBS="$LIBS"
5011 LIBS="-lnsl  $LIBS"
5012 cat > conftest.$ac_ext <<EOF
5013 #line 5014 "configure"
5014 #include "confdefs.h"
5015
5016 int main() {
5017 main()
5018 ; return 0; }
5019 EOF
5020 if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5021   rm -rf conftest*
5022   eval "ac_cv_lib_$ac_lib_var=yes"
5023 else
5024   echo "configure: failed program was:" >&5
5025   cat conftest.$ac_ext >&5
5026   rm -rf conftest*
5027   eval "ac_cv_lib_$ac_lib_var=no"
5028 fi
5029 rm -f conftest*
5030 LIBS="$ac_save_LIBS"
5031
5032 fi
5033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5034   echo "$ac_t""yes" 1>&6
5035     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5036     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5037   cat >> confdefs.h <<EOF
5038 #define $ac_tr_lib 1
5039 EOF
5040
5041   LIBS="-lnsl $LIBS"
5042
5043 else
5044   echo "$ac_t""no" 1>&6
5045 fi
5046
5047         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5048 echo "configure:5049: checking for socket in -linet" >&5
5049 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5051   echo $ac_n "(cached) $ac_c" 1>&6
5052 else
5053   ac_save_LIBS="$LIBS"
5054 LIBS="-linet  $LIBS"
5055 cat > conftest.$ac_ext <<EOF
5056 #line 5057 "configure"
5057 #include "confdefs.h"
5058 /* Override any gcc2 internal prototype to avoid an error.  */
5059 /* We use char because int might match the return type of a gcc2
5060     builtin and then its argument prototype would still apply.  */
5061 char socket();
5062
5063 int main() {
5064 socket()
5065 ; return 0; }
5066 EOF
5067 if { (eval echo configure:5068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5068   rm -rf conftest*
5069   eval "ac_cv_lib_$ac_lib_var=yes"
5070 else
5071   echo "configure: failed program was:" >&5
5072   cat conftest.$ac_ext >&5
5073   rm -rf conftest*
5074   eval "ac_cv_lib_$ac_lib_var=no"
5075 fi
5076 rm -f conftest*
5077 LIBS="$ac_save_LIBS"
5078
5079 fi
5080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5081   echo "$ac_t""yes" 1>&6
5082     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5083     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5084   cat >> confdefs.h <<EOF
5085 #define $ac_tr_lib 1
5086 EOF
5087
5088   LIBS="-linet $LIBS"
5089
5090 else
5091   echo "$ac_t""no" 1>&6
5092 fi
5093
5094         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5095 echo "configure:5096: checking for main in -lgen" >&5
5096 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5097 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5098   echo $ac_n "(cached) $ac_c" 1>&6
5099 else
5100   ac_save_LIBS="$LIBS"
5101 LIBS="-lgen  $LIBS"
5102 cat > conftest.$ac_ext <<EOF
5103 #line 5104 "configure"
5104 #include "confdefs.h"
5105
5106 int main() {
5107 main()
5108 ; return 0; }
5109 EOF
5110 if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5111   rm -rf conftest*
5112   eval "ac_cv_lib_$ac_lib_var=yes"
5113 else
5114   echo "configure: failed program was:" >&5
5115   cat conftest.$ac_ext >&5
5116   rm -rf conftest*
5117   eval "ac_cv_lib_$ac_lib_var=no"
5118 fi
5119 rm -f conftest*
5120 LIBS="$ac_save_LIBS"
5121
5122 fi
5123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5124   echo "$ac_t""yes" 1>&6
5125     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5126     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5127   cat >> confdefs.h <<EOF
5128 #define $ac_tr_lib 1
5129 EOF
5130
5131   LIBS="-lgen $LIBS"
5132
5133 else
5134   echo "$ac_t""no" 1>&6
5135 fi
5136
5137
5138 fi
5139
5140
5141 echo $ac_n "checking for select""... $ac_c" 1>&6
5142 echo "configure:5143: checking for select" >&5
5143 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5144   echo $ac_n "(cached) $ac_c" 1>&6
5145 else
5146   cat > conftest.$ac_ext <<EOF
5147 #line 5148 "configure"
5148 #include "confdefs.h"
5149 /* System header to define __stub macros and hopefully few prototypes,
5150     which can conflict with char select(); below.  */
5151 #include <assert.h>
5152 /* Override any gcc2 internal prototype to avoid an error.  */
5153 /* We use char because int might match the return type of a gcc2
5154     builtin and then its argument prototype would still apply.  */
5155 char select();
5156 char (*f)();
5157
5158 int main() {
5159
5160 /* The GNU C library defines this for functions which it implements
5161     to always fail with ENOSYS.  Some functions are actually named
5162     something starting with __ and the normal name is an alias.  */
5163 #if defined (__stub_select) || defined (__stub___select)
5164 choke me
5165 #else
5166 f = select;
5167 #endif
5168
5169 ; return 0; }
5170 EOF
5171 if { (eval echo configure:5172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5172   rm -rf conftest*
5173   eval "ac_cv_func_select=yes"
5174 else
5175   echo "configure: failed program was:" >&5
5176   cat conftest.$ac_ext >&5
5177   rm -rf conftest*
5178   eval "ac_cv_func_select=no"
5179 fi
5180 rm -f conftest*
5181 fi
5182
5183 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5184   echo "$ac_t""yes" 1>&6
5185   :
5186 else
5187   echo "$ac_t""no" 1>&6
5188 { echo "configure: error: select() required." 1>&2; exit 1; }
5189 fi
5190
5191
5192 if test "${ac_cv_header_winsock_h}" != yes; then
5193                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5194 echo "configure:5195: checking types of arguments for select()" >&5
5195  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5196   echo $ac_n "(cached) $ac_c" 1>&6
5197 else
5198    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5199   echo $ac_n "(cached) $ac_c" 1>&6
5200 else
5201     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5202   echo $ac_n "(cached) $ac_c" 1>&6
5203 else
5204      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5205      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5206       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5207        cat > conftest.$ac_ext <<EOF
5208 #line 5209 "configure"
5209 #include "confdefs.h"
5210 #ifdef HAVE_SYS_TYPES_H
5211 #include <sys/types.h>
5212 #endif
5213 #ifdef HAVE_SYS_TIME_H
5214 #include <sys/time.h>
5215 #endif
5216 #ifdef HAVE_SYS_SELECT_H
5217 #include <sys/select.h>
5218 #endif
5219 #ifdef HAVE_SYS_SOCKET_H
5220 #include <sys/socket.h>
5221 #endif
5222 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);
5223 int main() {
5224
5225 ; return 0; }
5226 EOF
5227 if { (eval echo configure:5228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5228   rm -rf conftest*
5229           ac_not_found=no ; break 3
5230 else
5231   echo "configure: failed program was:" >&5
5232   cat conftest.$ac_ext >&5
5233   rm -rf conftest*
5234   ac_not_found=yes
5235 fi
5236 rm -f conftest*
5237       done
5238      done
5239     done
5240    
5241 fi
5242   
5243 fi
5244  
5245 fi
5246  if test "$ac_not_found" = yes; then
5247   ac_cv_func_select_arg1=int 
5248   ac_cv_func_select_arg234='int *' 
5249   ac_cv_func_select_arg5='struct timeval *'
5250  fi
5251  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5252  cat >> confdefs.h <<EOF
5253 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5254 EOF
5255
5256  cat >> confdefs.h <<EOF
5257 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5258 EOF
5259
5260  cat >> confdefs.h <<EOF
5261 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5262 EOF
5263
5264
5265 fi
5266
5267
5268 for ac_hdr in regex.h 
5269 do
5270 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5271 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5272 echo "configure:5273: checking for $ac_hdr" >&5
5273 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5274   echo $ac_n "(cached) $ac_c" 1>&6
5275 else
5276   cat > conftest.$ac_ext <<EOF
5277 #line 5278 "configure"
5278 #include "confdefs.h"
5279 #include <$ac_hdr>
5280 EOF
5281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5282 { (eval echo configure:5283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5284 if test -z "$ac_err"; then
5285   rm -rf conftest*
5286   eval "ac_cv_header_$ac_safe=yes"
5287 else
5288   echo "$ac_err" >&5
5289   echo "configure: failed program was:" >&5
5290   cat conftest.$ac_ext >&5
5291   rm -rf conftest*
5292   eval "ac_cv_header_$ac_safe=no"
5293 fi
5294 rm -f conftest*
5295 fi
5296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5297   echo "$ac_t""yes" 1>&6
5298     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5299   cat >> confdefs.h <<EOF
5300 #define $ac_tr_hdr 1
5301 EOF
5302  
5303 else
5304   echo "$ac_t""no" 1>&6
5305 fi
5306 done
5307
5308 if test "$ac_cv_header_regex_h" != yes ; then
5309         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5310 fi
5311 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5312 echo "configure:5313: checking for regfree" >&5
5313 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5314   echo $ac_n "(cached) $ac_c" 1>&6
5315 else
5316   cat > conftest.$ac_ext <<EOF
5317 #line 5318 "configure"
5318 #include "confdefs.h"
5319 /* System header to define __stub macros and hopefully few prototypes,
5320     which can conflict with char regfree(); below.  */
5321 #include <assert.h>
5322 /* Override any gcc2 internal prototype to avoid an error.  */
5323 /* We use char because int might match the return type of a gcc2
5324     builtin and then its argument prototype would still apply.  */
5325 char regfree();
5326 char (*f)();
5327
5328 int main() {
5329
5330 /* The GNU C library defines this for functions which it implements
5331     to always fail with ENOSYS.  Some functions are actually named
5332     something starting with __ and the normal name is an alias.  */
5333 #if defined (__stub_regfree) || defined (__stub___regfree)
5334 choke me
5335 #else
5336 f = regfree;
5337 #endif
5338
5339 ; return 0; }
5340 EOF
5341 if { (eval echo configure:5342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5342   rm -rf conftest*
5343   eval "ac_cv_func_regfree=yes"
5344 else
5345   echo "configure: failed program was:" >&5
5346   cat conftest.$ac_ext >&5
5347   rm -rf conftest*
5348   eval "ac_cv_func_regfree=no"
5349 fi
5350 rm -f conftest*
5351 fi
5352
5353 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5354   echo "$ac_t""yes" 1>&6
5355   :
5356 else
5357   echo "$ac_t""no" 1>&6
5358 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5359 fi
5360
5361
5362
5363 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5364 echo "configure:5365: checking for compatible POSIX regex" >&5
5365 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5366   echo $ac_n "(cached) $ac_c" 1>&6
5367 else
5368   
5369         if test "$cross_compiling" = yes; then
5370   ol_cv_c_posix_regex=cross
5371 else
5372   cat > conftest.$ac_ext <<EOF
5373 #line 5374 "configure"
5374 #include "confdefs.h"
5375
5376 #include <sys/types.h>
5377 #include <regex.h>
5378 static char *pattern, *string;
5379 main()
5380 {
5381         int rc;
5382         regex_t re;
5383
5384         pattern = "^A";
5385
5386         if(regcomp(&re, pattern, 0)) {
5387                 return -1;
5388         }
5389         
5390         string = "ALL MATCH";
5391         
5392         rc = regexec(&re, string, 0, (void*)0, 0);
5393
5394         regfree(&re);
5395
5396         return rc;
5397 }
5398 EOF
5399 if { (eval echo configure:5400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5400 then
5401   ol_cv_c_posix_regex=yes
5402 else
5403   echo "configure: failed program was:" >&5
5404   cat conftest.$ac_ext >&5
5405   rm -fr conftest*
5406   ol_cv_c_posix_regex=no
5407 fi
5408 rm -fr conftest*
5409 fi
5410
5411 fi
5412
5413 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5414
5415 if test "$ol_cv_c_posix_regex" = no ; then
5416         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5417 fi
5418
5419 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5420 echo "configure:5421: checking for res_search" >&5
5421 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5422   echo $ac_n "(cached) $ac_c" 1>&6
5423 else
5424   cat > conftest.$ac_ext <<EOF
5425 #line 5426 "configure"
5426 #include "confdefs.h"
5427 /* System header to define __stub macros and hopefully few prototypes,
5428     which can conflict with char res_search(); below.  */
5429 #include <assert.h>
5430 /* Override any gcc2 internal prototype to avoid an error.  */
5431 /* We use char because int might match the return type of a gcc2
5432     builtin and then its argument prototype would still apply.  */
5433 char res_search();
5434 char (*f)();
5435
5436 int main() {
5437
5438 /* The GNU C library defines this for functions which it implements
5439     to always fail with ENOSYS.  Some functions are actually named
5440     something starting with __ and the normal name is an alias.  */
5441 #if defined (__stub_res_search) || defined (__stub___res_search)
5442 choke me
5443 #else
5444 f = res_search;
5445 #endif
5446
5447 ; return 0; }
5448 EOF
5449 if { (eval echo configure:5450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5450   rm -rf conftest*
5451   eval "ac_cv_func_res_search=yes"
5452 else
5453   echo "configure: failed program was:" >&5
5454   cat conftest.$ac_ext >&5
5455   rm -rf conftest*
5456   eval "ac_cv_func_res_search=no"
5457 fi
5458 rm -f conftest*
5459 fi
5460
5461 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5462   echo "$ac_t""yes" 1>&6
5463   :
5464 else
5465   echo "$ac_t""no" 1>&6
5466 fi
5467
5468 if test $ac_cv_func_res_search = no ; then 
5469         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5470 echo "configure:5471: checking for res_search in -lbind" >&5
5471 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5472 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5473   echo $ac_n "(cached) $ac_c" 1>&6
5474 else
5475   ac_save_LIBS="$LIBS"
5476 LIBS="-lbind  $LIBS"
5477 cat > conftest.$ac_ext <<EOF
5478 #line 5479 "configure"
5479 #include "confdefs.h"
5480 /* Override any gcc2 internal prototype to avoid an error.  */
5481 /* We use char because int might match the return type of a gcc2
5482     builtin and then its argument prototype would still apply.  */
5483 char res_search();
5484
5485 int main() {
5486 res_search()
5487 ; return 0; }
5488 EOF
5489 if { (eval echo configure:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5490   rm -rf conftest*
5491   eval "ac_cv_lib_$ac_lib_var=yes"
5492 else
5493   echo "configure: failed program was:" >&5
5494   cat conftest.$ac_ext >&5
5495   rm -rf conftest*
5496   eval "ac_cv_lib_$ac_lib_var=no"
5497 fi
5498 rm -f conftest*
5499 LIBS="$ac_save_LIBS"
5500
5501 fi
5502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5503   echo "$ac_t""yes" 1>&6
5504     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5505     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5506   cat >> confdefs.h <<EOF
5507 #define $ac_tr_lib 1
5508 EOF
5509
5510   LIBS="-lbind $LIBS"
5511
5512 else
5513   echo "$ac_t""no" 1>&6
5514 fi
5515
5516         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5517 fi
5518
5519 if test $ac_cv_func_res_search = no ; then 
5520         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5521 echo "configure:5522: checking for __res_search in -lbind" >&5
5522 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5523 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5524   echo $ac_n "(cached) $ac_c" 1>&6
5525 else
5526   ac_save_LIBS="$LIBS"
5527 LIBS="-lbind  $LIBS"
5528 cat > conftest.$ac_ext <<EOF
5529 #line 5530 "configure"
5530 #include "confdefs.h"
5531 /* Override any gcc2 internal prototype to avoid an error.  */
5532 /* We use char because int might match the return type of a gcc2
5533     builtin and then its argument prototype would still apply.  */
5534 char __res_search();
5535
5536 int main() {
5537 __res_search()
5538 ; return 0; }
5539 EOF
5540 if { (eval echo configure:5541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5541   rm -rf conftest*
5542   eval "ac_cv_lib_$ac_lib_var=yes"
5543 else
5544   echo "configure: failed program was:" >&5
5545   cat conftest.$ac_ext >&5
5546   rm -rf conftest*
5547   eval "ac_cv_lib_$ac_lib_var=no"
5548 fi
5549 rm -f conftest*
5550 LIBS="$ac_save_LIBS"
5551
5552 fi
5553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5554   echo "$ac_t""yes" 1>&6
5555     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5556     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5557   cat >> confdefs.h <<EOF
5558 #define $ac_tr_lib 1
5559 EOF
5560
5561   LIBS="-lbind $LIBS"
5562
5563 else
5564   echo "$ac_t""no" 1>&6
5565 fi
5566
5567         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5568 fi
5569
5570 if test $ac_cv_func_res_search = no ; then 
5571         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5572 echo "configure:5573: checking for res_search in -lresolv" >&5
5573 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5574 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5575   echo $ac_n "(cached) $ac_c" 1>&6
5576 else
5577   ac_save_LIBS="$LIBS"
5578 LIBS="-lresolv  $LIBS"
5579 cat > conftest.$ac_ext <<EOF
5580 #line 5581 "configure"
5581 #include "confdefs.h"
5582 /* Override any gcc2 internal prototype to avoid an error.  */
5583 /* We use char because int might match the return type of a gcc2
5584     builtin and then its argument prototype would still apply.  */
5585 char res_search();
5586
5587 int main() {
5588 res_search()
5589 ; return 0; }
5590 EOF
5591 if { (eval echo configure:5592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5592   rm -rf conftest*
5593   eval "ac_cv_lib_$ac_lib_var=yes"
5594 else
5595   echo "configure: failed program was:" >&5
5596   cat conftest.$ac_ext >&5
5597   rm -rf conftest*
5598   eval "ac_cv_lib_$ac_lib_var=no"
5599 fi
5600 rm -f conftest*
5601 LIBS="$ac_save_LIBS"
5602
5603 fi
5604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5605   echo "$ac_t""yes" 1>&6
5606     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5607     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5608   cat >> confdefs.h <<EOF
5609 #define $ac_tr_lib 1
5610 EOF
5611
5612   LIBS="-lresolv $LIBS"
5613
5614 else
5615   echo "$ac_t""no" 1>&6
5616 fi
5617
5618         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5619 fi
5620
5621 if test "$ac_cv_func_res_search" = yes ; then
5622         cat >> confdefs.h <<\EOF
5623 #define HAVE_RES_SEARCH 1
5624 EOF
5625
5626 elif test $ol_enable_dns = yes ; then
5627         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5628 elif test $ol_enable_dns != no ; then
5629         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5630 fi
5631
5632
5633 ol_link_isode=no
5634 if test $ol_enable_ldapd != no ; then
5635         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5636
5637                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5638 echo "configure:5639: checking for main in -lxtpp" >&5
5639 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5640 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5641   echo $ac_n "(cached) $ac_c" 1>&6
5642 else
5643   ac_save_LIBS="$LIBS"
5644 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5645 cat > conftest.$ac_ext <<EOF
5646 #line 5647 "configure"
5647 #include "confdefs.h"
5648
5649 int main() {
5650 main()
5651 ; return 0; }
5652 EOF
5653 if { (eval echo configure:5654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5654   rm -rf conftest*
5655   eval "ac_cv_lib_$ac_lib_var=yes"
5656 else
5657   echo "configure: failed program was:" >&5
5658   cat conftest.$ac_ext >&5
5659   rm -rf conftest*
5660   eval "ac_cv_lib_$ac_lib_var=no"
5661 fi
5662 rm -f conftest*
5663 LIBS="$ac_save_LIBS"
5664
5665 fi
5666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5667   echo "$ac_t""yes" 1>&6
5668   
5669                 ol_link_isode=yes
5670                 cat >> confdefs.h <<\EOF
5671 #define HAVE_XTPP 1
5672 EOF
5673
5674                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5675                 
5676 else
5677   echo "$ac_t""no" 1>&6
5678 :
5679 fi
5680
5681         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5682 echo "configure:5683: checking for main in -ldsap" >&5
5683 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5684 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5685   echo $ac_n "(cached) $ac_c" 1>&6
5686 else
5687   ac_save_LIBS="$LIBS"
5688 LIBS="-ldsap -lisode $LIBS"
5689 cat > conftest.$ac_ext <<EOF
5690 #line 5691 "configure"
5691 #include "confdefs.h"
5692
5693 int main() {
5694 main()
5695 ; return 0; }
5696 EOF
5697 if { (eval echo configure:5698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5698   rm -rf conftest*
5699   eval "ac_cv_lib_$ac_lib_var=yes"
5700 else
5701   echo "configure: failed program was:" >&5
5702   cat conftest.$ac_ext >&5
5703   rm -rf conftest*
5704   eval "ac_cv_lib_$ac_lib_var=no"
5705 fi
5706 rm -f conftest*
5707 LIBS="$ac_save_LIBS"
5708
5709 fi
5710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5711   echo "$ac_t""yes" 1>&6
5712   
5713                 ol_link_isode=yes
5714                 cat >> confdefs.h <<\EOF
5715 #define HAVE_DSAP 1
5716 EOF
5717
5718                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5719                 
5720 else
5721   echo "$ac_t""no" 1>&6
5722 :
5723 fi
5724
5725         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5726 echo "configure:5727: checking for main in -lisode" >&5
5727 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5728 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5729   echo $ac_n "(cached) $ac_c" 1>&6
5730 else
5731   ac_save_LIBS="$LIBS"
5732 LIBS="-lisode  $LIBS"
5733 cat > conftest.$ac_ext <<EOF
5734 #line 5735 "configure"
5735 #include "confdefs.h"
5736
5737 int main() {
5738 main()
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   
5757                 ol_link_isode=yes
5758                 cat >> confdefs.h <<\EOF
5759 #define HAVE_ISODE 1
5760 EOF
5761
5762                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5763                 
5764 else
5765   echo "$ac_t""no" 1>&6
5766 :
5767 fi
5768
5769 fi
5770
5771 if test $ol_link_isode != no; then
5772         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5773 echo "configure:5774: checking for main in -lpp" >&5
5774 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5775 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5776   echo $ac_n "(cached) $ac_c" 1>&6
5777 else
5778   ac_save_LIBS="$LIBS"
5779 LIBS="-lpp  $LIBS"
5780 cat > conftest.$ac_ext <<EOF
5781 #line 5782 "configure"
5782 #include "confdefs.h"
5783
5784 int main() {
5785 main()
5786 ; return 0; }
5787 EOF
5788 if { (eval echo configure:5789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5789   rm -rf conftest*
5790   eval "ac_cv_lib_$ac_lib_var=yes"
5791 else
5792   echo "configure: failed program was:" >&5
5793   cat conftest.$ac_ext >&5
5794   rm -rf conftest*
5795   eval "ac_cv_lib_$ac_lib_var=no"
5796 fi
5797 rm -f conftest*
5798 LIBS="$ac_save_LIBS"
5799
5800 fi
5801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5802   echo "$ac_t""yes" 1>&6
5803   
5804                 cat >> confdefs.h <<\EOF
5805 #define HAVE_PP 1
5806 EOF
5807
5808                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5809                 
5810 else
5811   echo "$ac_t""no" 1>&6
5812 :
5813 fi
5814
5815
5816         # Extract the first word of "pepsy", so it can be a program name with args.
5817 set dummy pepsy; ac_word=$2
5818 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5819 echo "configure:5820: checking for $ac_word" >&5
5820 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5821   echo $ac_n "(cached) $ac_c" 1>&6
5822 else
5823   case "$PEPSY" in
5824   /*)
5825   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5826   ;;
5827   ?:/*)
5828   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5829   ;;
5830   *)
5831   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5832   ac_dummy="$PATH"
5833   for ac_dir in $ac_dummy; do 
5834     test -z "$ac_dir" && ac_dir=.
5835     if test -f $ac_dir/$ac_word; then
5836       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5837       break
5838     fi
5839   done
5840   IFS="$ac_save_ifs"
5841   ;;
5842 esac
5843 fi
5844 PEPSY="$ac_cv_path_PEPSY"
5845 if test -n "$PEPSY"; then
5846   echo "$ac_t""$PEPSY" 1>&6
5847 else
5848   echo "$ac_t""no" 1>&6
5849 fi
5850
5851 fi
5852
5853 if test $ol_enable_quipu != no ; then
5854         for ac_hdr in quipu/commonarg.h
5855 do
5856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5858 echo "configure:5859: checking for $ac_hdr" >&5
5859 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5860   echo $ac_n "(cached) $ac_c" 1>&6
5861 else
5862   cat > conftest.$ac_ext <<EOF
5863 #line 5864 "configure"
5864 #include "confdefs.h"
5865 #include <$ac_hdr>
5866 EOF
5867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5868 { (eval echo configure:5869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5870 if test -z "$ac_err"; then
5871   rm -rf conftest*
5872   eval "ac_cv_header_$ac_safe=yes"
5873 else
5874   echo "$ac_err" >&5
5875   echo "configure: failed program was:" >&5
5876   cat conftest.$ac_ext >&5
5877   rm -rf conftest*
5878   eval "ac_cv_header_$ac_safe=no"
5879 fi
5880 rm -f conftest*
5881 fi
5882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5883   echo "$ac_t""yes" 1>&6
5884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5885   cat >> confdefs.h <<EOF
5886 #define $ac_tr_hdr 1
5887 EOF
5888  
5889 else
5890   echo "$ac_t""no" 1>&6
5891 fi
5892 done
5893
5894
5895         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5896                 BUILD_QUIPU=yes
5897         elif test $ol_enable_quipu = auto ; then
5898                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5899         else
5900                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5901         fi
5902 fi
5903
5904 ol_link_krb5=no
5905
5906 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5907         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5908
5909         for ac_hdr in krb5.h
5910 do
5911 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5912 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5913 echo "configure:5914: checking for $ac_hdr" >&5
5914 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5915   echo $ac_n "(cached) $ac_c" 1>&6
5916 else
5917   cat > conftest.$ac_ext <<EOF
5918 #line 5919 "configure"
5919 #include "confdefs.h"
5920 #include <$ac_hdr>
5921 EOF
5922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5923 { (eval echo configure:5924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5925 if test -z "$ac_err"; then
5926   rm -rf conftest*
5927   eval "ac_cv_header_$ac_safe=yes"
5928 else
5929   echo "$ac_err" >&5
5930   echo "configure: failed program was:" >&5
5931   cat conftest.$ac_ext >&5
5932   rm -rf conftest*
5933   eval "ac_cv_header_$ac_safe=no"
5934 fi
5935 rm -f conftest*
5936 fi
5937 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5938   echo "$ac_t""yes" 1>&6
5939     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5940   cat >> confdefs.h <<EOF
5941 #define $ac_tr_hdr 1
5942 EOF
5943  
5944 else
5945   echo "$ac_t""no" 1>&6
5946 fi
5947 done
5948
5949
5950         if test $ac_cv_header_krb5_h = yes ; then
5951                                 for ac_hdr in heim_err.h
5952 do
5953 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5954 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5955 echo "configure:5956: checking for $ac_hdr" >&5
5956 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5957   echo $ac_n "(cached) $ac_c" 1>&6
5958 else
5959   cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5962 #include <$ac_hdr>
5963 EOF
5964 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5965 { (eval echo configure:5966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5966 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5967 if test -z "$ac_err"; then
5968   rm -rf conftest*
5969   eval "ac_cv_header_$ac_safe=yes"
5970 else
5971   echo "$ac_err" >&5
5972   echo "configure: failed program was:" >&5
5973   cat conftest.$ac_ext >&5
5974   rm -rf conftest*
5975   eval "ac_cv_header_$ac_safe=no"
5976 fi
5977 rm -f conftest*
5978 fi
5979 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5980   echo "$ac_t""yes" 1>&6
5981     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5982   cat >> confdefs.h <<EOF
5983 #define $ac_tr_hdr 1
5984 EOF
5985  
5986 else
5987   echo "$ac_t""no" 1>&6
5988 fi
5989 done
5990
5991                 if test $ac_cv_header_heim_err_h = yes ; then
5992                         krb5_impl=heimdal
5993                 else
5994                         krb5_impl=mit
5995                 fi
5996
5997                 if test $krb5_impl = mit; then
5998                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5999 echo "configure:6000: checking for main in -lkrb5" >&5
6000 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6001 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6002   echo $ac_n "(cached) $ac_c" 1>&6
6003 else
6004   ac_save_LIBS="$LIBS"
6005 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6006 cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6009
6010 int main() {
6011 main()
6012 ; return 0; }
6013 EOF
6014 if { (eval echo configure:6015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6015   rm -rf conftest*
6016   eval "ac_cv_lib_$ac_lib_var=yes"
6017 else
6018   echo "configure: failed program was:" >&5
6019   cat conftest.$ac_ext >&5
6020   rm -rf conftest*
6021   eval "ac_cv_lib_$ac_lib_var=no"
6022 fi
6023 rm -f conftest*
6024 LIBS="$ac_save_LIBS"
6025
6026 fi
6027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6028   echo "$ac_t""yes" 1>&6
6029   have_krb5=yes
6030                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6031 else
6032   echo "$ac_t""no" 1>&6
6033 have_krb5=no
6034 fi
6035
6036
6037                 elif test $krb5_impl = heimdal; then
6038                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6039 echo "configure:6040: checking for main in -lkrb5" >&5
6040 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6041 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6042   echo $ac_n "(cached) $ac_c" 1>&6
6043 else
6044   ac_save_LIBS="$LIBS"
6045 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6046 cat > conftest.$ac_ext <<EOF
6047 #line 6048 "configure"
6048 #include "confdefs.h"
6049
6050 int main() {
6051 main()
6052 ; return 0; }
6053 EOF
6054 if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6055   rm -rf conftest*
6056   eval "ac_cv_lib_$ac_lib_var=yes"
6057 else
6058   echo "configure: failed program was:" >&5
6059   cat conftest.$ac_ext >&5
6060   rm -rf conftest*
6061   eval "ac_cv_lib_$ac_lib_var=no"
6062 fi
6063 rm -f conftest*
6064 LIBS="$ac_save_LIBS"
6065
6066 fi
6067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6068   echo "$ac_t""yes" 1>&6
6069   have_krb5=yes
6070                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6071 else
6072   echo "$ac_t""no" 1>&6
6073 have_krb5=no
6074 fi
6075
6076
6077                         cat >> confdefs.h <<\EOF
6078 #define HAVE_HEIMDAL_KERBEROS 1
6079 EOF
6080
6081                 else
6082                         have_krb5=no
6083                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6084                 fi
6085
6086                 if test $have_krb5 = yes ; then
6087                         ol_link_krb5=yes
6088
6089                         cat >> confdefs.h <<\EOF
6090 #define HAVE_KRB5 1
6091 EOF
6092
6093
6094                         if test $ol_with_kerberos = k5only ; then
6095                                 ol_with_kerberos=found
6096                         fi
6097
6098                 elif test $ol_with_kerberos != auto ; then
6099                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6100                 fi
6101
6102         fi
6103 fi
6104
6105 ol_link_krb4=no
6106 if test $ol_link_krb5 = yes -a \
6107         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6108
6109         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6110 do
6111 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6112 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6113 echo "configure:6114: checking for $ac_hdr" >&5
6114 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6115   echo $ac_n "(cached) $ac_c" 1>&6
6116 else
6117   cat > conftest.$ac_ext <<EOF
6118 #line 6119 "configure"
6119 #include "confdefs.h"
6120 #include <$ac_hdr>
6121 EOF
6122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6123 { (eval echo configure:6124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6125 if test -z "$ac_err"; then
6126   rm -rf conftest*
6127   eval "ac_cv_header_$ac_safe=yes"
6128 else
6129   echo "$ac_err" >&5
6130   echo "configure: failed program was:" >&5
6131   cat conftest.$ac_ext >&5
6132   rm -rf conftest*
6133   eval "ac_cv_header_$ac_safe=no"
6134 fi
6135 rm -f conftest*
6136 fi
6137 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6138   echo "$ac_t""yes" 1>&6
6139     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6140   cat >> confdefs.h <<EOF
6141 #define $ac_tr_hdr 1
6142 EOF
6143  
6144 else
6145   echo "$ac_t""no" 1>&6
6146 fi
6147 done
6148
6149
6150         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6151                 if test $krb5_impl = mit; then
6152                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6153 echo "configure:6154: checking for main in -lkrb4" >&5
6154 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6156   echo $ac_n "(cached) $ac_c" 1>&6
6157 else
6158   ac_save_LIBS="$LIBS"
6159 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6160 cat > conftest.$ac_ext <<EOF
6161 #line 6162 "configure"
6162 #include "confdefs.h"
6163
6164 int main() {
6165 main()
6166 ; return 0; }
6167 EOF
6168 if { (eval echo configure:6169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6169   rm -rf conftest*
6170   eval "ac_cv_lib_$ac_lib_var=yes"
6171 else
6172   echo "configure: failed program was:" >&5
6173   cat conftest.$ac_ext >&5
6174   rm -rf conftest*
6175   eval "ac_cv_lib_$ac_lib_var=no"
6176 fi
6177 rm -f conftest*
6178 LIBS="$ac_save_LIBS"
6179
6180 fi
6181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6182   echo "$ac_t""yes" 1>&6
6183   have_k425=yes
6184                                 KRB4_LIBS="-lkrb4 -ldes425"
6185 else
6186   echo "$ac_t""no" 1>&6
6187 have_k425=no
6188 fi
6189
6190
6191                 elif test $krb5_impl = heimdal; then
6192                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6193 echo "configure:6194: checking for main in -lkrb4" >&5
6194 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6195 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6196   echo $ac_n "(cached) $ac_c" 1>&6
6197 else
6198   ac_save_LIBS="$LIBS"
6199 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6200 cat > conftest.$ac_ext <<EOF
6201 #line 6202 "configure"
6202 #include "confdefs.h"
6203
6204 int main() {
6205 main()
6206 ; return 0; }
6207 EOF
6208 if { (eval echo configure:6209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6209   rm -rf conftest*
6210   eval "ac_cv_lib_$ac_lib_var=yes"
6211 else
6212   echo "configure: failed program was:" >&5
6213   cat conftest.$ac_ext >&5
6214   rm -rf conftest*
6215   eval "ac_cv_lib_$ac_lib_var=no"
6216 fi
6217 rm -f conftest*
6218 LIBS="$ac_save_LIBS"
6219
6220 fi
6221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6222   echo "$ac_t""yes" 1>&6
6223   have_k425=yes
6224                                 KRB4_LIBS="-lkrb4"
6225 else
6226   echo "$ac_t""no" 1>&6
6227 have_k425=no
6228 fi
6229
6230
6231                 else
6232                         have_425=no
6233                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6234                 fi
6235
6236                 if test $have_k425 = yes ; then
6237                         ol_with_kerberos=found
6238                         ol_link_krb4=yes
6239
6240                         cat >> confdefs.h <<\EOF
6241 #define HAVE_KRB425 1
6242 EOF
6243
6244                         cat >> confdefs.h <<\EOF
6245 #define HAVE_KRB4 1
6246 EOF
6247
6248
6249                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6250 echo "configure:6251: checking for des_debug in Kerberos libraries" >&5
6251 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6252   echo $ac_n "(cached) $ac_c" 1>&6
6253 else
6254   
6255                                                                 save_LIBS="$LIBS"
6256                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6257                                 cat > conftest.$ac_ext <<EOF
6258 #line 6259 "configure"
6259 #include "confdefs.h"
6260
6261 #include <kerberosIV/krb.h>
6262 #include <kerberosIV/des.h>
6263 extern int des_debug;
6264
6265 int main() {
6266
6267 des_debug = 1;
6268
6269 ; return 0; }
6270 EOF
6271 if { (eval echo configure:6272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6272   rm -rf conftest*
6273   ol_cv_var_des_debug=yes
6274 else
6275   echo "configure: failed program was:" >&5
6276   cat conftest.$ac_ext >&5
6277   rm -rf conftest*
6278   ol_cv_var_des_debug=no
6279 fi
6280 rm -f conftest*
6281                                                                 LIBS="$save_LIBS"
6282                         
6283 fi
6284
6285 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6286
6287                         if test $ol_cv_var_des_debug = yes ; then
6288                                 cat >> confdefs.h <<\EOF
6289 #define HAVE_DES_DEBUG 1
6290 EOF
6291
6292                         fi
6293
6294                         LIBS="$save_LIBS"
6295                 fi
6296         fi
6297 fi
6298
6299 if test $ol_link_krb5 = yes ; then
6300         ol_with_kerberos=found
6301 fi
6302
6303 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6304         -o $ol_with_kerberos = kth ; then
6305
6306         for ac_hdr in krb.h des.h krb-archaeology.h 
6307 do
6308 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6309 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6310 echo "configure:6311: checking for $ac_hdr" >&5
6311 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6312   echo $ac_n "(cached) $ac_c" 1>&6
6313 else
6314   cat > conftest.$ac_ext <<EOF
6315 #line 6316 "configure"
6316 #include "confdefs.h"
6317 #include <$ac_hdr>
6318 EOF
6319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6320 { (eval echo configure:6321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6322 if test -z "$ac_err"; then
6323   rm -rf conftest*
6324   eval "ac_cv_header_$ac_safe=yes"
6325 else
6326   echo "$ac_err" >&5
6327   echo "configure: failed program was:" >&5
6328   cat conftest.$ac_ext >&5
6329   rm -rf conftest*
6330   eval "ac_cv_header_$ac_safe=no"
6331 fi
6332 rm -f conftest*
6333 fi
6334 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6335   echo "$ac_t""yes" 1>&6
6336     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6337   cat >> confdefs.h <<EOF
6338 #define $ac_tr_hdr 1
6339 EOF
6340  
6341 else
6342   echo "$ac_t""no" 1>&6
6343 fi
6344 done
6345
6346
6347         if test $ac_cv_header_krb_h = yes ; then
6348                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6349 echo "configure:6350: checking for main in -lkrb" >&5
6350 ac_lib_var=`echo krb'_'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="-lkrb -ldes $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_k4=yes
6380 else
6381   echo "$ac_t""no" 1>&6
6382 have_k4=no
6383 fi
6384
6385
6386                 if test $have_k4 = yes ; then
6387                         ol_with_kerberos=found
6388                         ol_link_krb4=yes
6389
6390                         cat >> confdefs.h <<\EOF
6391 #define HAVE_KRB4 1
6392 EOF
6393
6394
6395                         KRB4_LIBS="-lkrb -ldes"
6396
6397                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6398                                 cat >> confdefs.h <<\EOF
6399 #define HAVE_KTH_KERBEROS 1
6400 EOF
6401
6402                         fi
6403                 fi
6404         fi
6405 fi
6406
6407 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6408         cat >> confdefs.h <<\EOF
6409 #define HAVE_KERBEROS 1
6410 EOF
6411
6412
6413 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6414         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6415 fi
6416
6417 ol_link_tls=no
6418 if test $ol_with_tls != no ; then
6419         
6420         for ac_hdr in openssl/ssl.h ssl.h
6421 do
6422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6424 echo "configure:6425: checking for $ac_hdr" >&5
6425 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6426   echo $ac_n "(cached) $ac_c" 1>&6
6427 else
6428   cat > conftest.$ac_ext <<EOF
6429 #line 6430 "configure"
6430 #include "confdefs.h"
6431 #include <$ac_hdr>
6432 EOF
6433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6434 { (eval echo configure:6435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6436 if test -z "$ac_err"; then
6437   rm -rf conftest*
6438   eval "ac_cv_header_$ac_safe=yes"
6439 else
6440   echo "$ac_err" >&5
6441   echo "configure: failed program was:" >&5
6442   cat conftest.$ac_ext >&5
6443   rm -rf conftest*
6444   eval "ac_cv_header_$ac_safe=no"
6445 fi
6446 rm -f conftest*
6447 fi
6448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6449   echo "$ac_t""yes" 1>&6
6450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6451   cat >> confdefs.h <<EOF
6452 #define $ac_tr_hdr 1
6453 EOF
6454  
6455 else
6456   echo "$ac_t""no" 1>&6
6457 fi
6458 done
6459
6460         
6461         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6462                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6463 echo "configure:6464: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6464 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6465 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6466   echo $ac_n "(cached) $ac_c" 1>&6
6467 else
6468   ac_save_LIBS="$LIBS"
6469 LIBS="-lssl -lcrypto $LIBS"
6470 cat > conftest.$ac_ext <<EOF
6471 #line 6472 "configure"
6472 #include "confdefs.h"
6473 /* Override any gcc2 internal prototype to avoid an error.  */
6474 /* We use char because int might match the return type of a gcc2
6475     builtin and then its argument prototype would still apply.  */
6476 char SSLeay_add_ssl_algorithms();
6477
6478 int main() {
6479 SSLeay_add_ssl_algorithms()
6480 ; return 0; }
6481 EOF
6482 if { (eval echo configure:6483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6483   rm -rf conftest*
6484   eval "ac_cv_lib_$ac_lib_var=yes"
6485 else
6486   echo "configure: failed program was:" >&5
6487   cat conftest.$ac_ext >&5
6488   rm -rf conftest*
6489   eval "ac_cv_lib_$ac_lib_var=no"
6490 fi
6491 rm -f conftest*
6492 LIBS="$ac_save_LIBS"
6493
6494 fi
6495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6496   echo "$ac_t""yes" 1>&6
6497   have_ssleay=yes
6498                         need_rsaref=no
6499 else
6500   echo "$ac_t""no" 1>&6
6501 have_ssleay=no
6502 fi
6503
6504                         
6505                 if test $have_ssleay = no ; then
6506                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6507 echo "configure:6508: checking for SSL_library_init in -lssl" >&5
6508 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6509 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6510   echo $ac_n "(cached) $ac_c" 1>&6
6511 else
6512   ac_save_LIBS="$LIBS"
6513 LIBS="-lssl -lcrypto $LIBS"
6514 cat > conftest.$ac_ext <<EOF
6515 #line 6516 "configure"
6516 #include "confdefs.h"
6517 /* Override any gcc2 internal prototype to avoid an error.  */
6518 /* We use char because int might match the return type of a gcc2
6519     builtin and then its argument prototype would still apply.  */
6520 char SSL_library_init();
6521
6522 int main() {
6523 SSL_library_init()
6524 ; return 0; }
6525 EOF
6526 if { (eval echo configure:6527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6527   rm -rf conftest*
6528   eval "ac_cv_lib_$ac_lib_var=yes"
6529 else
6530   echo "configure: failed program was:" >&5
6531   cat conftest.$ac_ext >&5
6532   rm -rf conftest*
6533   eval "ac_cv_lib_$ac_lib_var=no"
6534 fi
6535 rm -f conftest*
6536 LIBS="$ac_save_LIBS"
6537
6538 fi
6539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6540   echo "$ac_t""yes" 1>&6
6541   have_ssleay=yes
6542                                 need_rsaref=no
6543 else
6544   echo "$ac_t""no" 1>&6
6545 have_ssleay=no
6546 fi
6547
6548                 fi
6549
6550                 if test $have_ssleay = no ; then
6551                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6552 echo "configure:6553: checking for ssl3_accept in -lssl" >&5
6553 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6554 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6555   echo $ac_n "(cached) $ac_c" 1>&6
6556 else
6557   ac_save_LIBS="$LIBS"
6558 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6559 cat > conftest.$ac_ext <<EOF
6560 #line 6561 "configure"
6561 #include "confdefs.h"
6562 /* Override any gcc2 internal prototype to avoid an error.  */
6563 /* We use char because int might match the return type of a gcc2
6564     builtin and then its argument prototype would still apply.  */
6565 char ssl3_accept();
6566
6567 int main() {
6568 ssl3_accept()
6569 ; return 0; }
6570 EOF
6571 if { (eval echo configure:6572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6572   rm -rf conftest*
6573   eval "ac_cv_lib_$ac_lib_var=yes"
6574 else
6575   echo "configure: failed program was:" >&5
6576   cat conftest.$ac_ext >&5
6577   rm -rf conftest*
6578   eval "ac_cv_lib_$ac_lib_var=no"
6579 fi
6580 rm -f conftest*
6581 LIBS="$ac_save_LIBS"
6582
6583 fi
6584 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6585   echo "$ac_t""yes" 1>&6
6586   have_ssleay=yes
6587                                 need_rsaref=yes
6588 else
6589   echo "$ac_t""no" 1>&6
6590 have_ssleay=no
6591 fi
6592
6593                 fi
6594
6595                 if test $have_ssleay = yes ; then
6596                         ol_with_tls=found
6597                         ol_link_tls=yes
6598
6599                         cat >> confdefs.h <<\EOF
6600 #define HAVE_SSLEAY 1
6601 EOF
6602
6603
6604                         if test $need_rsaref = yes; then
6605                                 cat >> confdefs.h <<\EOF
6606 #define HAVE_RSAREF 1
6607 EOF
6608
6609
6610                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6611                         else
6612                                 TLS_LIBS="-lssl -lcrypto"
6613                         fi
6614                 fi
6615         fi
6616 fi
6617
6618 if test $ol_link_tls = yes ; then
6619         cat >> confdefs.h <<\EOF
6620 #define HAVE_TLS 1
6621 EOF
6622
6623 fi      
6624
6625 for ac_func in \
6626         ctime_r                 \
6627         gethostbyname_r gethostbyaddr_r \
6628
6629 do
6630 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6631 echo "configure:6632: checking for $ac_func" >&5
6632 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6633   echo $ac_n "(cached) $ac_c" 1>&6
6634 else
6635   cat > conftest.$ac_ext <<EOF
6636 #line 6637 "configure"
6637 #include "confdefs.h"
6638 /* System header to define __stub macros and hopefully few prototypes,
6639     which can conflict with char $ac_func(); below.  */
6640 #include <assert.h>
6641 /* Override any gcc2 internal prototype to avoid an error.  */
6642 /* We use char because int might match the return type of a gcc2
6643     builtin and then its argument prototype would still apply.  */
6644 char $ac_func();
6645 char (*f)();
6646
6647 int main() {
6648
6649 /* The GNU C library defines this for functions which it implements
6650     to always fail with ENOSYS.  Some functions are actually named
6651     something starting with __ and the normal name is an alias.  */
6652 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6653 choke me
6654 #else
6655 f = $ac_func;
6656 #endif
6657
6658 ; return 0; }
6659 EOF
6660 if { (eval echo configure:6661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6661   rm -rf conftest*
6662   eval "ac_cv_func_$ac_func=yes"
6663 else
6664   echo "configure: failed program was:" >&5
6665   cat conftest.$ac_ext >&5
6666   rm -rf conftest*
6667   eval "ac_cv_func_$ac_func=no"
6668 fi
6669 rm -f conftest*
6670 fi
6671
6672 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6673   echo "$ac_t""yes" 1>&6
6674     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6675   cat >> confdefs.h <<EOF
6676 #define $ac_tr_func 1
6677 EOF
6678  
6679 else
6680   echo "$ac_t""no" 1>&6
6681 fi
6682 done
6683
6684
6685 if test "$ac_cv_func_ctime_r" = no ; then
6686         ol_cv_func_ctime_r_nargs=0
6687 else
6688         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6689 echo "configure:6690: checking number of arguments of ctime_r" >&5
6690 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6691   echo $ac_n "(cached) $ac_c" 1>&6
6692 else
6693   cat > conftest.$ac_ext <<EOF
6694 #line 6695 "configure"
6695 #include "confdefs.h"
6696 #include <time.h>
6697 int main() {
6698 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6699 ; return 0; }
6700 EOF
6701 if { (eval echo configure:6702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6702   rm -rf conftest*
6703   ol_cv_func_ctime_r_nargs3=yes
6704 else
6705   echo "configure: failed program was:" >&5
6706   cat conftest.$ac_ext >&5
6707   rm -rf conftest*
6708   ol_cv_func_ctime_r_nargs3=no
6709 fi
6710 rm -f conftest*
6711
6712         cat > conftest.$ac_ext <<EOF
6713 #line 6714 "configure"
6714 #include "confdefs.h"
6715 #include <time.h>
6716 int main() {
6717 time_t ti; char *buffer; ctime_r(&ti,buffer);
6718 ; return 0; }
6719 EOF
6720 if { (eval echo configure:6721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6721   rm -rf conftest*
6722   ol_cv_func_ctime_r_nargs2=yes
6723 else
6724   echo "configure: failed program was:" >&5
6725   cat conftest.$ac_ext >&5
6726   rm -rf conftest*
6727   ol_cv_func_ctime_r_nargs2=no
6728 fi
6729 rm -f conftest*
6730
6731         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6732                 $ol_cv_func_ctime_r_nargs2 = no ; then
6733
6734                 ol_cv_func_ctime_r_nargs=3
6735
6736         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6737                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6738
6739                 ol_cv_func_ctime_r_nargs=2
6740
6741         else
6742                 ol_cv_func_ctime_r_nargs=0
6743         fi
6744   
6745 fi
6746
6747 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6748
6749   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6750         cat >> confdefs.h <<EOF
6751 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6752 EOF
6753
6754   fi
6755
6756 fi
6757
6758 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6759         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6760 echo "configure:6761: checking number of arguments of gethostbyname_r" >&5
6761 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6762   echo $ac_n "(cached) $ac_c" 1>&6
6763 else
6764   cat > conftest.$ac_ext <<EOF
6765 #line 6766 "configure"
6766 #include "confdefs.h"
6767 #include <sys/types.h>
6768 #include <sys/socket.h>
6769 #include <netinet/in.h>
6770 #include <netdb.h>
6771 #define BUFSIZE (sizeof(struct hostent)+10)
6772 int main() {
6773 struct hostent hent; char buffer[BUFSIZE];
6774                 int bufsize=BUFSIZE;int h_errno;
6775                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6776                         buffer, bufsize, &h_errno);
6777 ; return 0; }
6778 EOF
6779 if { (eval echo configure:6780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6780   rm -rf conftest*
6781   ol_cv_func_gethostbyname_r_nargs5=yes
6782 else
6783   echo "configure: failed program was:" >&5
6784   cat conftest.$ac_ext >&5
6785   rm -rf conftest*
6786   ol_cv_func_gethostbyname_r_nargs5=no
6787 fi
6788 rm -f conftest*
6789
6790         cat > conftest.$ac_ext <<EOF
6791 #line 6792 "configure"
6792 #include "confdefs.h"
6793 #include <sys/types.h>
6794 #include <sys/socket.h>
6795 #include <netinet/in.h>
6796 #include <netdb.h>
6797 #define BUFSIZE (sizeof(struct hostent)+10)
6798 int main() {
6799 struct hostent hent;struct hostent *rhent;
6800                 char buffer[BUFSIZE];
6801                 int bufsize=BUFSIZE;int h_errno;
6802                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6803                         &rhent, &h_errno);
6804 ; return 0; }
6805 EOF
6806 if { (eval echo configure:6807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6807   rm -rf conftest*
6808   ol_cv_func_gethostbyname_r_nargs6=yes
6809 else
6810   echo "configure: failed program was:" >&5
6811   cat conftest.$ac_ext >&5
6812   rm -rf conftest*
6813   ol_cv_func_gethostbyname_r_nargs6=no
6814 fi
6815 rm -f conftest*
6816
6817         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6818                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6819
6820                 ol_cv_func_gethostbyname_r_nargs=5
6821
6822         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6823                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6824
6825                 ol_cv_func_gethostbyname_r_nargs=6
6826
6827         else
6828                 ol_cv_func_gethostbyname_r_nargs=0
6829         fi
6830   
6831 fi
6832
6833 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6834   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6835         cat >> confdefs.h <<EOF
6836 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6837 EOF
6838
6839   fi
6840
6841 else
6842         ol_cv_func_gethostbyname_r_nargs=0
6843 fi
6844  
6845 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6846         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6847 echo "configure:6848: checking number of arguments of gethostbyaddr_r" >&5
6848 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6849   echo $ac_n "(cached) $ac_c" 1>&6
6850 else
6851   cat > conftest.$ac_ext <<EOF
6852 #line 6853 "configure"
6853 #include "confdefs.h"
6854 #include <sys/types.h>
6855 #include <sys/socket.h>
6856 #include <netinet/in.h>
6857 #include <netdb.h>
6858 #define BUFSIZE (sizeof(struct hostent)+10)
6859 int main() {
6860 struct hostent hent; char buffer[BUFSIZE]; 
6861             struct in_addr add;
6862             size_t alen=sizeof(struct in_addr);
6863             int bufsize=BUFSIZE;int h_errno;
6864                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6865                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6866 ; return 0; }
6867 EOF
6868 if { (eval echo configure:6869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6869   rm -rf conftest*
6870   ol_cv_func_gethostbyaddr_r_nargs7=yes
6871 else
6872   echo "configure: failed program was:" >&5
6873   cat conftest.$ac_ext >&5
6874   rm -rf conftest*
6875   ol_cv_func_gethostbyaddr_r_nargs7=no
6876 fi
6877 rm -f conftest*
6878
6879         cat > conftest.$ac_ext <<EOF
6880 #line 6881 "configure"
6881 #include "confdefs.h"
6882 #include <sys/types.h>
6883 #include <sys/socket.h>
6884 #include <netinet/in.h>
6885 #include <netdb.h>
6886 #define BUFSIZE (sizeof(struct hostent)+10)
6887 int main() {
6888 struct hostent hent;
6889                 struct hostent *rhent; char buffer[BUFSIZE]; 
6890                 struct in_addr add;
6891                 size_t alen=sizeof(struct in_addr);
6892                 int bufsize=BUFSIZE;int h_errno;
6893                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6894                         alen, AF_INET, &hent, buffer, bufsize, 
6895                         &rhent, &h_errno);
6896 ; return 0; }
6897 EOF
6898 if { (eval echo configure:6899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6899   rm -rf conftest*
6900   ol_cv_func_gethostbyaddr_r_nargs8=yes
6901 else
6902   echo "configure: failed program was:" >&5
6903   cat conftest.$ac_ext >&5
6904   rm -rf conftest*
6905   ol_cv_func_gethostbyaddr_r_nargs8=no
6906 fi
6907 rm -f conftest*
6908
6909         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6910                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6911
6912                 ol_cv_func_gethostbyaddr_r_nargs=7
6913
6914         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6915                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6916
6917                 ol_cv_func_gethostbyaddr_r_nargs=8
6918
6919         else
6920                 ol_cv_func_gethostbyaddr_r_nargs=0
6921         fi
6922   
6923 fi
6924
6925 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6926   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6927     cat >> confdefs.h <<EOF
6928 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6929 EOF
6930
6931   fi
6932
6933 else
6934         ol_cv_func_gethostbyaddr_r_nargs=0
6935 fi
6936
6937 if test "$ac_cv_func_ctime_r" = yes \
6938         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6939         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6940         -a "$ac_cv_func_gethostbyname_r" = yes \
6941         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6942         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6943         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6944         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6945         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6946         ; then
6947  
6948         cat >> confdefs.h <<\EOF
6949 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6950 EOF
6951
6952 fi
6953
6954 ol_link_threads=no
6955
6956 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6957         -o $ol_with_threads = nt ; then
6958
6959         
6960         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6961 echo "configure:6962: checking for NT Threads" >&5
6962 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6963   echo $ac_n "(cached) $ac_c" 1>&6
6964 else
6965   
6966                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6967 echo "configure:6968: checking for _beginthread" >&5
6968 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6969   echo $ac_n "(cached) $ac_c" 1>&6
6970 else
6971   cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974 /* System header to define __stub macros and hopefully few prototypes,
6975     which can conflict with char _beginthread(); below.  */
6976 #include <assert.h>
6977 /* Override any gcc2 internal prototype to avoid an error.  */
6978 /* We use char because int might match the return type of a gcc2
6979     builtin and then its argument prototype would still apply.  */
6980 char _beginthread();
6981 char (*f)();
6982
6983 int main() {
6984
6985 /* The GNU C library defines this for functions which it implements
6986     to always fail with ENOSYS.  Some functions are actually named
6987     something starting with __ and the normal name is an alias.  */
6988 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6989 choke me
6990 #else
6991 f = _beginthread;
6992 #endif
6993
6994 ; return 0; }
6995 EOF
6996 if { (eval echo configure:6997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6997   rm -rf conftest*
6998   eval "ac_cv_func__beginthread=yes"
6999 else
7000   echo "configure: failed program was:" >&5
7001   cat conftest.$ac_ext >&5
7002   rm -rf conftest*
7003   eval "ac_cv_func__beginthread=no"
7004 fi
7005 rm -f conftest*
7006 fi
7007
7008 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7009   echo "$ac_t""yes" 1>&6
7010   ol_cv_nt_threads=yes
7011 else
7012   echo "$ac_t""no" 1>&6
7013 ol_cv_nt_threads=no
7014 fi
7015
7016         
7017 fi
7018
7019 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7020
7021         if test $ol_cv_nt_threads = yes ; then
7022                 cat >> confdefs.h <<\EOF
7023 #define HAVE_NT_THREADS 1
7024 EOF
7025
7026         fi
7027
7028
7029         if test "$ol_cv_nt_threads" = yes ; then
7030         ol_link_threads=nt
7031         ol_with_threads=found
7032         ol_with_yielding_select=yes
7033
7034                 cat >> confdefs.h <<\EOF
7035 #define HAVE_NT_SERVICE_MANAGER 1
7036 EOF
7037
7038                 cat >> confdefs.h <<\EOF
7039 #define HAVE_NT_EVENT_LOG 1
7040 EOF
7041
7042         fi
7043
7044         if test $ol_with_threads = nt ; then
7045                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7046         fi
7047 fi
7048
7049 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7050         -o $ol_with_threads = posix ; then
7051
7052         for ac_hdr in pthread.h
7053 do
7054 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7055 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7056 echo "configure:7057: checking for $ac_hdr" >&5
7057 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7058   echo $ac_n "(cached) $ac_c" 1>&6
7059 else
7060   cat > conftest.$ac_ext <<EOF
7061 #line 7062 "configure"
7062 #include "confdefs.h"
7063 #include <$ac_hdr>
7064 EOF
7065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7066 { (eval echo configure:7067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7068 if test -z "$ac_err"; then
7069   rm -rf conftest*
7070   eval "ac_cv_header_$ac_safe=yes"
7071 else
7072   echo "$ac_err" >&5
7073   echo "configure: failed program was:" >&5
7074   cat conftest.$ac_ext >&5
7075   rm -rf conftest*
7076   eval "ac_cv_header_$ac_safe=no"
7077 fi
7078 rm -f conftest*
7079 fi
7080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7081   echo "$ac_t""yes" 1>&6
7082     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7083   cat >> confdefs.h <<EOF
7084 #define $ac_tr_hdr 1
7085 EOF
7086  
7087 else
7088   echo "$ac_t""no" 1>&6
7089 fi
7090 done
7091
7092
7093         if test $ac_cv_header_pthread_h = yes ; then
7094                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7095 echo "configure:7096: checking POSIX thread version" >&5
7096 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7097   echo $ac_n "(cached) $ac_c" 1>&6
7098 else
7099   
7100         cat > conftest.$ac_ext <<EOF
7101 #line 7102 "configure"
7102 #include "confdefs.h"
7103
7104 #               include <pthread.h>
7105                 /* this check could be improved */
7106 #               ifdef PTHREAD_ONCE_INIT
7107                         pthread_version_final;
7108 #               endif
7109         
7110 EOF
7111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7112   egrep "pthread_version_final" >/dev/null 2>&1; then
7113   rm -rf conftest*
7114   ol_pthread_final=yes
7115 else
7116   rm -rf conftest*
7117   ol_pthread_final=no
7118 fi
7119 rm -f conftest*
7120
7121
7122         cat > conftest.$ac_ext <<EOF
7123 #line 7124 "configure"
7124 #include "confdefs.h"
7125
7126 #               include <pthread.h>
7127                 /* this check could be improved */
7128 #               ifdef pthread_once_init
7129                         pthread_version_draft4;
7130 #               endif
7131         
7132 EOF
7133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7134   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7135   rm -rf conftest*
7136   ol_pthread_draft4=yes
7137 else
7138   rm -rf conftest*
7139   ol_pthread_draft4=no
7140 fi
7141 rm -f conftest*
7142
7143
7144         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7145                 ol_cv_pthread_version=final
7146         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7147                 ol_cv_pthread_version=draft4
7148         else
7149                 ol_cv_pthread_version=unknown
7150         fi
7151
7152 fi
7153
7154 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7155
7156
7157                 if test $ol_cv_pthread_version = final ; then
7158                         cat >> confdefs.h <<\EOF
7159 #define HAVE_PTHREADS_FINAL 1
7160 EOF
7161
7162                 elif test $ol_cv_pthread_version = draft4 ; then
7163                         cat >> confdefs.h <<\EOF
7164 #define HAVE_PTHREADS_D4 1
7165 EOF
7166
7167                 else
7168                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7169                 fi
7170
7171                 # consider threads found
7172                 ol_with_threads=found
7173
7174                 
7175         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7176 echo "configure:7177: checking for LinuxThreads pthread.h" >&5
7177 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7178   echo $ac_n "(cached) $ac_c" 1>&6
7179 else
7180   cat > conftest.$ac_ext <<EOF
7181 #line 7182 "configure"
7182 #include "confdefs.h"
7183 #include <pthread.h>
7184 EOF
7185 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7186   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7187   rm -rf conftest*
7188   ol_cv_header_linux_threads=yes
7189 else
7190   rm -rf conftest*
7191   ol_cv_header_linux_threads=no
7192 fi
7193 rm -f conftest*
7194
7195                 
7196 fi
7197
7198 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7199         if test $ol_cv_header_linux_threads = yes; then
7200                 cat >> confdefs.h <<\EOF
7201 #define HAVE_LINUX_THREADS 1
7202 EOF
7203
7204         fi
7205
7206                 
7207         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7208 echo "configure:7209: checking for GNU Pth pthread.h" >&5
7209 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7210   echo $ac_n "(cached) $ac_c" 1>&6
7211 else
7212   cat > conftest.$ac_ext <<EOF
7213 #line 7214 "configure"
7214 #include "confdefs.h"
7215 #include <pthread.h>
7216 #ifdef _POSIX_THREAD_IS_GNU_PTH
7217         __gnu_pth__;
7218 #endif
7219
7220 EOF
7221 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7222   egrep "__gnu_pth__" >/dev/null 2>&1; then
7223   rm -rf conftest*
7224   ol_cv_header_gnu_pth_pthread_h=yes
7225 else
7226   rm -rf conftest*
7227   ol_cv_header_gnu_pth_pthread_h=no
7228 fi
7229 rm -f conftest*
7230
7231                 
7232 fi
7233
7234 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7235
7236
7237                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7238                         for ac_hdr in sched.h
7239 do
7240 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7241 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7242 echo "configure:7243: checking for $ac_hdr" >&5
7243 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7244   echo $ac_n "(cached) $ac_c" 1>&6
7245 else
7246   cat > conftest.$ac_ext <<EOF
7247 #line 7248 "configure"
7248 #include "confdefs.h"
7249 #include <$ac_hdr>
7250 EOF
7251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7252 { (eval echo configure:7253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7254 if test -z "$ac_err"; then
7255   rm -rf conftest*
7256   eval "ac_cv_header_$ac_safe=yes"
7257 else
7258   echo "$ac_err" >&5
7259   echo "configure: failed program was:" >&5
7260   cat conftest.$ac_ext >&5
7261   rm -rf conftest*
7262   eval "ac_cv_header_$ac_safe=no"
7263 fi
7264 rm -f conftest*
7265 fi
7266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7267   echo "$ac_t""yes" 1>&6
7268     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7269   cat >> confdefs.h <<EOF
7270 #define $ac_tr_hdr 1
7271 EOF
7272  
7273 else
7274   echo "$ac_t""no" 1>&6
7275 fi
7276 done
7277
7278                 fi
7279
7280                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7281                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7282 echo "configure:7283: checking for pthread_create in default libraries" >&5
7283 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7284   echo $ac_n "(cached) $ac_c" 1>&6
7285 else
7286   
7287                 if test "$cross_compiling" = yes; then
7288   cat > conftest.$ac_ext <<EOF
7289 #line 7290 "configure"
7290 #include "confdefs.h"
7291 /* pthread test headers */
7292 #include <pthread.h>
7293 #ifndef NULL
7294 #define NULL (void*)0
7295 #endif
7296
7297 static void *task(p)
7298         void *p;
7299 {
7300         return (void *) (p == NULL);
7301 }
7302
7303 int main() {
7304
7305         /* pthread test function */
7306         pthread_t t;
7307         int status;
7308
7309         /* make sure pthread_create() isn't just a stub */
7310 #if HAVE_PTHREADS_D4
7311         status = pthread_create(&t, pthread_attr_default, task, NULL);
7312 #else
7313         status = pthread_create(&t, NULL, task, NULL);
7314 #endif
7315
7316         if( status ) exit( status );
7317
7318         /* make sure pthread_detach() isn't just a stub */
7319 #if HAVE_PTHREADS_D4
7320         status = pthread_detach( &t );
7321 #else
7322         status = pthread_detach( t );
7323 #endif
7324
7325 #ifdef HAVE_LINUX_THREADS
7326         pthread_kill_other_threads_np();
7327 #endif
7328
7329         exit( status );
7330
7331 ; return 0; }
7332 EOF
7333 if { (eval echo configure:7334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7334   rm -rf conftest*
7335   ol_cv_pthread_create=yes
7336 else
7337   echo "configure: failed program was:" >&5
7338   cat conftest.$ac_ext >&5
7339   rm -rf conftest*
7340   ol_cv_pthread_create=no
7341 fi
7342 rm -f conftest*
7343 else
7344   cat > conftest.$ac_ext <<EOF
7345 #line 7346 "configure"
7346 #include "confdefs.h"
7347 /* pthread test headers */
7348 #include <pthread.h>
7349 #ifndef NULL
7350 #define NULL (void*)0
7351 #endif
7352
7353 static void *task(p)
7354         void *p;
7355 {
7356         return (void *) (p == NULL);
7357 }
7358
7359
7360 int main(argc, argv)
7361         int argc;
7362         char **argv;
7363 {
7364
7365         /* pthread test function */
7366         pthread_t t;
7367         int status;
7368
7369         /* make sure pthread_create() isn't just a stub */
7370 #if HAVE_PTHREADS_D4
7371         status = pthread_create(&t, pthread_attr_default, task, NULL);
7372 #else
7373         status = pthread_create(&t, NULL, task, NULL);
7374 #endif
7375
7376         if( status ) exit( status );
7377
7378         /* make sure pthread_detach() isn't just a stub */
7379 #if HAVE_PTHREADS_D4
7380         status = pthread_detach( &t );
7381 #else
7382         status = pthread_detach( t );
7383 #endif
7384
7385 #ifdef HAVE_LINUX_THREADS
7386         pthread_kill_other_threads_np();
7387 #endif
7388
7389         exit( status );
7390
7391 }
7392
7393 EOF
7394 if { (eval echo configure:7395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7395 then
7396   ol_cv_pthread_create=yes
7397 else
7398   echo "configure: failed program was:" >&5
7399   cat conftest.$ac_ext >&5
7400   rm -fr conftest*
7401   ol_cv_pthread_create=no
7402 fi
7403 rm -fr conftest*
7404 fi
7405
7406 fi
7407
7408 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7409
7410                 if test $ol_cv_pthread_create != no ; then
7411                         ol_link_threads=posix
7412                         ol_link_pthreads=""
7413                 fi
7414                 
7415                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7416 if test "$ol_link_threads" = no ; then
7417         # try -kthread
7418         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7419 echo "configure:7420: checking for pthread link with -kthread" >&5
7420 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7421   echo $ac_n "(cached) $ac_c" 1>&6
7422 else
7423   
7424                 # save the flags
7425                 ol_LIBS="$LIBS"
7426                 LIBS="-kthread $LIBS"
7427
7428                 if test "$cross_compiling" = yes; then
7429   cat > conftest.$ac_ext <<EOF
7430 #line 7431 "configure"
7431 #include "confdefs.h"
7432 /* pthread test headers */
7433 #include <pthread.h>
7434 #ifndef NULL
7435 #define NULL (void*)0
7436 #endif
7437
7438 static void *task(p)
7439         void *p;
7440 {
7441         return (void *) (p == NULL);
7442 }
7443
7444 int main() {
7445
7446         /* pthread test function */
7447         pthread_t t;
7448         int status;
7449
7450         /* make sure pthread_create() isn't just a stub */
7451 #if HAVE_PTHREADS_D4
7452         status = pthread_create(&t, pthread_attr_default, task, NULL);
7453 #else
7454         status = pthread_create(&t, NULL, task, NULL);
7455 #endif
7456
7457         if( status ) exit( status );
7458
7459         /* make sure pthread_detach() isn't just a stub */
7460 #if HAVE_PTHREADS_D4
7461         status = pthread_detach( &t );
7462 #else
7463         status = pthread_detach( t );
7464 #endif
7465
7466 #ifdef HAVE_LINUX_THREADS
7467         pthread_kill_other_threads_np();
7468 #endif
7469
7470         exit( status );
7471
7472 ; return 0; }
7473 EOF
7474 if { (eval echo configure:7475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7475   rm -rf conftest*
7476   ol_cv_pthread_kthread=yes
7477 else
7478   echo "configure: failed program was:" >&5
7479   cat conftest.$ac_ext >&5
7480   rm -rf conftest*
7481   ol_cv_pthread_kthread=no
7482 fi
7483 rm -f conftest*
7484 else
7485   cat > conftest.$ac_ext <<EOF
7486 #line 7487 "configure"
7487 #include "confdefs.h"
7488 /* pthread test headers */
7489 #include <pthread.h>
7490 #ifndef NULL
7491 #define NULL (void*)0
7492 #endif
7493
7494 static void *task(p)
7495         void *p;
7496 {
7497         return (void *) (p == NULL);
7498 }
7499
7500
7501 int main(argc, argv)
7502         int argc;
7503         char **argv;
7504 {
7505
7506         /* pthread test function */
7507         pthread_t t;
7508         int status;
7509
7510         /* make sure pthread_create() isn't just a stub */
7511 #if HAVE_PTHREADS_D4
7512         status = pthread_create(&t, pthread_attr_default, task, NULL);
7513 #else
7514         status = pthread_create(&t, NULL, task, NULL);
7515 #endif
7516
7517         if( status ) exit( status );
7518
7519         /* make sure pthread_detach() isn't just a stub */
7520 #if HAVE_PTHREADS_D4
7521         status = pthread_detach( &t );
7522 #else
7523         status = pthread_detach( t );
7524 #endif
7525
7526 #ifdef HAVE_LINUX_THREADS
7527         pthread_kill_other_threads_np();
7528 #endif
7529
7530         exit( status );
7531
7532 }
7533
7534 EOF
7535 if { (eval echo configure:7536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7536 then
7537   ol_cv_pthread_kthread=yes
7538 else
7539   echo "configure: failed program was:" >&5
7540   cat conftest.$ac_ext >&5
7541   rm -fr conftest*
7542   ol_cv_pthread_kthread=no
7543 fi
7544 rm -fr conftest*
7545 fi
7546
7547
7548                 # restore the LIBS
7549                 LIBS="$ol_LIBS"
7550         
7551 fi
7552
7553 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7554
7555         if test $ol_cv_pthread_kthread = yes ; then
7556                 ol_link_pthreads="-kthread"
7557                 ol_link_threads=posix
7558         fi
7559 fi
7560
7561                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7562 if test "$ol_link_threads" = no ; then
7563         # try -pthread
7564         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7565 echo "configure:7566: checking for pthread link with -pthread" >&5
7566 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7567   echo $ac_n "(cached) $ac_c" 1>&6
7568 else
7569   
7570                 # save the flags
7571                 ol_LIBS="$LIBS"
7572                 LIBS="-pthread $LIBS"
7573
7574                 if test "$cross_compiling" = yes; then
7575   cat > conftest.$ac_ext <<EOF
7576 #line 7577 "configure"
7577 #include "confdefs.h"
7578 /* pthread test headers */
7579 #include <pthread.h>
7580 #ifndef NULL
7581 #define NULL (void*)0
7582 #endif
7583
7584 static void *task(p)
7585         void *p;
7586 {
7587         return (void *) (p == NULL);
7588 }
7589
7590 int main() {
7591
7592         /* pthread test function */
7593         pthread_t t;
7594         int status;
7595
7596         /* make sure pthread_create() isn't just a stub */
7597 #if HAVE_PTHREADS_D4
7598         status = pthread_create(&t, pthread_attr_default, task, NULL);
7599 #else
7600         status = pthread_create(&t, NULL, task, NULL);
7601 #endif
7602
7603         if( status ) exit( status );
7604
7605         /* make sure pthread_detach() isn't just a stub */
7606 #if HAVE_PTHREADS_D4
7607         status = pthread_detach( &t );
7608 #else
7609         status = pthread_detach( t );
7610 #endif
7611
7612 #ifdef HAVE_LINUX_THREADS
7613         pthread_kill_other_threads_np();
7614 #endif
7615
7616         exit( status );
7617
7618 ; return 0; }
7619 EOF
7620 if { (eval echo configure:7621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7621   rm -rf conftest*
7622   ol_cv_pthread_pthread=yes
7623 else
7624   echo "configure: failed program was:" >&5
7625   cat conftest.$ac_ext >&5
7626   rm -rf conftest*
7627   ol_cv_pthread_pthread=no
7628 fi
7629 rm -f conftest*
7630 else
7631   cat > conftest.$ac_ext <<EOF
7632 #line 7633 "configure"
7633 #include "confdefs.h"
7634 /* pthread test headers */
7635 #include <pthread.h>
7636 #ifndef NULL
7637 #define NULL (void*)0
7638 #endif
7639
7640 static void *task(p)
7641         void *p;
7642 {
7643         return (void *) (p == NULL);
7644 }
7645
7646
7647 int main(argc, argv)
7648         int argc;
7649         char **argv;
7650 {
7651
7652         /* pthread test function */
7653         pthread_t t;
7654         int status;
7655
7656         /* make sure pthread_create() isn't just a stub */
7657 #if HAVE_PTHREADS_D4
7658         status = pthread_create(&t, pthread_attr_default, task, NULL);
7659 #else
7660         status = pthread_create(&t, NULL, task, NULL);
7661 #endif
7662
7663         if( status ) exit( status );
7664
7665         /* make sure pthread_detach() isn't just a stub */
7666 #if HAVE_PTHREADS_D4
7667         status = pthread_detach( &t );
7668 #else
7669         status = pthread_detach( t );
7670 #endif
7671
7672 #ifdef HAVE_LINUX_THREADS
7673         pthread_kill_other_threads_np();
7674 #endif
7675
7676         exit( status );
7677
7678 }
7679
7680 EOF
7681 if { (eval echo configure:7682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7682 then
7683   ol_cv_pthread_pthread=yes
7684 else
7685   echo "configure: failed program was:" >&5
7686   cat conftest.$ac_ext >&5
7687   rm -fr conftest*
7688   ol_cv_pthread_pthread=no
7689 fi
7690 rm -fr conftest*
7691 fi
7692
7693
7694                 # restore the LIBS
7695                 LIBS="$ol_LIBS"
7696         
7697 fi
7698
7699 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7700
7701         if test $ol_cv_pthread_pthread = yes ; then
7702                 ol_link_pthreads="-pthread"
7703                 ol_link_threads=posix
7704         fi
7705 fi
7706
7707                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7708 if test "$ol_link_threads" = no ; then
7709         # try -pthreads
7710         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7711 echo "configure:7712: checking for pthread link with -pthreads" >&5
7712 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7713   echo $ac_n "(cached) $ac_c" 1>&6
7714 else
7715   
7716                 # save the flags
7717                 ol_LIBS="$LIBS"
7718                 LIBS="-pthreads $LIBS"
7719
7720                 if test "$cross_compiling" = yes; then
7721   cat > conftest.$ac_ext <<EOF
7722 #line 7723 "configure"
7723 #include "confdefs.h"
7724 /* pthread test headers */
7725 #include <pthread.h>
7726 #ifndef NULL
7727 #define NULL (void*)0
7728 #endif
7729
7730 static void *task(p)
7731         void *p;
7732 {
7733         return (void *) (p == NULL);
7734 }
7735
7736 int main() {
7737
7738         /* pthread test function */
7739         pthread_t t;
7740         int status;
7741
7742         /* make sure pthread_create() isn't just a stub */
7743 #if HAVE_PTHREADS_D4
7744         status = pthread_create(&t, pthread_attr_default, task, NULL);
7745 #else
7746         status = pthread_create(&t, NULL, task, NULL);
7747 #endif
7748
7749         if( status ) exit( status );
7750
7751         /* make sure pthread_detach() isn't just a stub */
7752 #if HAVE_PTHREADS_D4
7753         status = pthread_detach( &t );
7754 #else
7755         status = pthread_detach( t );
7756 #endif
7757
7758 #ifdef HAVE_LINUX_THREADS
7759         pthread_kill_other_threads_np();
7760 #endif
7761
7762         exit( status );
7763
7764 ; return 0; }
7765 EOF
7766 if { (eval echo configure:7767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7767   rm -rf conftest*
7768   ol_cv_pthread_pthreads=yes
7769 else
7770   echo "configure: failed program was:" >&5
7771   cat conftest.$ac_ext >&5
7772   rm -rf conftest*
7773   ol_cv_pthread_pthreads=no
7774 fi
7775 rm -f conftest*
7776 else
7777   cat > conftest.$ac_ext <<EOF
7778 #line 7779 "configure"
7779 #include "confdefs.h"
7780 /* pthread test headers */
7781 #include <pthread.h>
7782 #ifndef NULL
7783 #define NULL (void*)0
7784 #endif
7785
7786 static void *task(p)
7787         void *p;
7788 {
7789         return (void *) (p == NULL);
7790 }
7791
7792
7793 int main(argc, argv)
7794         int argc;
7795         char **argv;
7796 {
7797
7798         /* pthread test function */
7799         pthread_t t;
7800         int status;
7801
7802         /* make sure pthread_create() isn't just a stub */
7803 #if HAVE_PTHREADS_D4
7804         status = pthread_create(&t, pthread_attr_default, task, NULL);
7805 #else
7806         status = pthread_create(&t, NULL, task, NULL);
7807 #endif
7808
7809         if( status ) exit( status );
7810
7811         /* make sure pthread_detach() isn't just a stub */
7812 #if HAVE_PTHREADS_D4
7813         status = pthread_detach( &t );
7814 #else
7815         status = pthread_detach( t );
7816 #endif
7817
7818 #ifdef HAVE_LINUX_THREADS
7819         pthread_kill_other_threads_np();
7820 #endif
7821
7822         exit( status );
7823
7824 }
7825
7826 EOF
7827 if { (eval echo configure:7828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7828 then
7829   ol_cv_pthread_pthreads=yes
7830 else
7831   echo "configure: failed program was:" >&5
7832   cat conftest.$ac_ext >&5
7833   rm -fr conftest*
7834   ol_cv_pthread_pthreads=no
7835 fi
7836 rm -fr conftest*
7837 fi
7838
7839
7840                 # restore the LIBS
7841                 LIBS="$ol_LIBS"
7842         
7843 fi
7844
7845 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7846
7847         if test $ol_cv_pthread_pthreads = yes ; then
7848                 ol_link_pthreads="-pthreads"
7849                 ol_link_threads=posix
7850         fi
7851 fi
7852
7853                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7854 if test "$ol_link_threads" = no ; then
7855         # try -mthreads
7856         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7857 echo "configure:7858: checking for pthread link with -mthreads" >&5
7858 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7859   echo $ac_n "(cached) $ac_c" 1>&6
7860 else
7861   
7862                 # save the flags
7863                 ol_LIBS="$LIBS"
7864                 LIBS="-mthreads $LIBS"
7865
7866                 if test "$cross_compiling" = yes; then
7867   cat > conftest.$ac_ext <<EOF
7868 #line 7869 "configure"
7869 #include "confdefs.h"
7870 /* pthread test headers */
7871 #include <pthread.h>
7872 #ifndef NULL
7873 #define NULL (void*)0
7874 #endif
7875
7876 static void *task(p)
7877         void *p;
7878 {
7879         return (void *) (p == NULL);
7880 }
7881
7882 int main() {
7883
7884         /* pthread test function */
7885         pthread_t t;
7886         int status;
7887
7888         /* make sure pthread_create() isn't just a stub */
7889 #if HAVE_PTHREADS_D4
7890         status = pthread_create(&t, pthread_attr_default, task, NULL);
7891 #else
7892         status = pthread_create(&t, NULL, task, NULL);
7893 #endif
7894
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 ; return 0; }
7911 EOF
7912 if { (eval echo configure:7913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7913   rm -rf conftest*
7914   ol_cv_pthread_mthreads=yes
7915 else
7916   echo "configure: failed program was:" >&5
7917   cat conftest.$ac_ext >&5
7918   rm -rf conftest*
7919   ol_cv_pthread_mthreads=no
7920 fi
7921 rm -f conftest*
7922 else
7923   cat > conftest.$ac_ext <<EOF
7924 #line 7925 "configure"
7925 #include "confdefs.h"
7926 /* pthread test headers */
7927 #include <pthread.h>
7928 #ifndef NULL
7929 #define NULL (void*)0
7930 #endif
7931
7932 static void *task(p)
7933         void *p;
7934 {
7935         return (void *) (p == NULL);
7936 }
7937
7938
7939 int main(argc, argv)
7940         int argc;
7941         char **argv;
7942 {
7943
7944         /* pthread test function */
7945         pthread_t t;
7946         int status;
7947
7948         /* make sure pthread_create() isn't just a stub */
7949 #if HAVE_PTHREADS_D4
7950         status = pthread_create(&t, pthread_attr_default, task, NULL);
7951 #else
7952         status = pthread_create(&t, NULL, task, NULL);
7953 #endif
7954
7955         if( status ) exit( status );
7956
7957         /* make sure pthread_detach() isn't just a stub */
7958 #if HAVE_PTHREADS_D4
7959         status = pthread_detach( &t );
7960 #else
7961         status = pthread_detach( t );
7962 #endif
7963
7964 #ifdef HAVE_LINUX_THREADS
7965         pthread_kill_other_threads_np();
7966 #endif
7967
7968         exit( status );
7969
7970 }
7971
7972 EOF
7973 if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7974 then
7975   ol_cv_pthread_mthreads=yes
7976 else
7977   echo "configure: failed program was:" >&5
7978   cat conftest.$ac_ext >&5
7979   rm -fr conftest*
7980   ol_cv_pthread_mthreads=no
7981 fi
7982 rm -fr conftest*
7983 fi
7984
7985
7986                 # restore the LIBS
7987                 LIBS="$ol_LIBS"
7988         
7989 fi
7990
7991 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7992
7993         if test $ol_cv_pthread_mthreads = yes ; then
7994                 ol_link_pthreads="-mthreads"
7995                 ol_link_threads=posix
7996         fi
7997 fi
7998
7999                 # Pthread try link: -thread (ol_cv_pthread_thread)
8000 if test "$ol_link_threads" = no ; then
8001         # try -thread
8002         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8003 echo "configure:8004: checking for pthread link with -thread" >&5
8004 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8005   echo $ac_n "(cached) $ac_c" 1>&6
8006 else
8007   
8008                 # save the flags
8009                 ol_LIBS="$LIBS"
8010                 LIBS="-thread $LIBS"
8011
8012                 if test "$cross_compiling" = yes; then
8013   cat > conftest.$ac_ext <<EOF
8014 #line 8015 "configure"
8015 #include "confdefs.h"
8016 /* pthread test headers */
8017 #include <pthread.h>
8018 #ifndef NULL
8019 #define NULL (void*)0
8020 #endif
8021
8022 static void *task(p)
8023         void *p;
8024 {
8025         return (void *) (p == NULL);
8026 }
8027
8028 int main() {
8029
8030         /* pthread test function */
8031         pthread_t t;
8032         int status;
8033
8034         /* make sure pthread_create() isn't just a stub */
8035 #if HAVE_PTHREADS_D4
8036         status = pthread_create(&t, pthread_attr_default, task, NULL);
8037 #else
8038         status = pthread_create(&t, NULL, task, NULL);
8039 #endif
8040
8041         if( status ) exit( status );
8042
8043         /* make sure pthread_detach() isn't just a stub */
8044 #if HAVE_PTHREADS_D4
8045         status = pthread_detach( &t );
8046 #else
8047         status = pthread_detach( t );
8048 #endif
8049
8050 #ifdef HAVE_LINUX_THREADS
8051         pthread_kill_other_threads_np();
8052 #endif
8053
8054         exit( status );
8055
8056 ; return 0; }
8057 EOF
8058 if { (eval echo configure:8059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8059   rm -rf conftest*
8060   ol_cv_pthread_thread=yes
8061 else
8062   echo "configure: failed program was:" >&5
8063   cat conftest.$ac_ext >&5
8064   rm -rf conftest*
8065   ol_cv_pthread_thread=no
8066 fi
8067 rm -f conftest*
8068 else
8069   cat > conftest.$ac_ext <<EOF
8070 #line 8071 "configure"
8071 #include "confdefs.h"
8072 /* pthread test headers */
8073 #include <pthread.h>
8074 #ifndef NULL
8075 #define NULL (void*)0
8076 #endif
8077
8078 static void *task(p)
8079         void *p;
8080 {
8081         return (void *) (p == NULL);
8082 }
8083
8084
8085 int main(argc, argv)
8086         int argc;
8087         char **argv;
8088 {
8089
8090         /* pthread test function */
8091         pthread_t t;
8092         int status;
8093
8094         /* make sure pthread_create() isn't just a stub */
8095 #if HAVE_PTHREADS_D4
8096         status = pthread_create(&t, pthread_attr_default, task, NULL);
8097 #else
8098         status = pthread_create(&t, NULL, task, NULL);
8099 #endif
8100
8101         if( status ) exit( status );
8102
8103         /* make sure pthread_detach() isn't just a stub */
8104 #if HAVE_PTHREADS_D4
8105         status = pthread_detach( &t );
8106 #else
8107         status = pthread_detach( t );
8108 #endif
8109
8110 #ifdef HAVE_LINUX_THREADS
8111         pthread_kill_other_threads_np();
8112 #endif
8113
8114         exit( status );
8115
8116 }
8117
8118 EOF
8119 if { (eval echo configure:8120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8120 then
8121   ol_cv_pthread_thread=yes
8122 else
8123   echo "configure: failed program was:" >&5
8124   cat conftest.$ac_ext >&5
8125   rm -fr conftest*
8126   ol_cv_pthread_thread=no
8127 fi
8128 rm -fr conftest*
8129 fi
8130
8131
8132                 # restore the LIBS
8133                 LIBS="$ol_LIBS"
8134         
8135 fi
8136
8137 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8138
8139         if test $ol_cv_pthread_thread = yes ; then
8140                 ol_link_pthreads="-thread"
8141                 ol_link_threads=posix
8142         fi
8143 fi
8144
8145
8146                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8147 if test "$ol_link_threads" = no ; then
8148         # try -lpthread -lmach -lexc -lc_r
8149         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8150 echo "configure:8151: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8151 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8152   echo $ac_n "(cached) $ac_c" 1>&6
8153 else
8154   
8155                 # save the flags
8156                 ol_LIBS="$LIBS"
8157                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8158
8159                 if test "$cross_compiling" = yes; then
8160   cat > conftest.$ac_ext <<EOF
8161 #line 8162 "configure"
8162 #include "confdefs.h"
8163 /* pthread test headers */
8164 #include <pthread.h>
8165 #ifndef NULL
8166 #define NULL (void*)0
8167 #endif
8168
8169 static void *task(p)
8170         void *p;
8171 {
8172         return (void *) (p == NULL);
8173 }
8174
8175 int main() {
8176
8177         /* pthread test function */
8178         pthread_t t;
8179         int status;
8180
8181         /* make sure pthread_create() isn't just a stub */
8182 #if HAVE_PTHREADS_D4
8183         status = pthread_create(&t, pthread_attr_default, task, NULL);
8184 #else
8185         status = pthread_create(&t, NULL, task, NULL);
8186 #endif
8187
8188         if( status ) exit( status );
8189
8190         /* make sure pthread_detach() isn't just a stub */
8191 #if HAVE_PTHREADS_D4
8192         status = pthread_detach( &t );
8193 #else
8194         status = pthread_detach( t );
8195 #endif
8196
8197 #ifdef HAVE_LINUX_THREADS
8198         pthread_kill_other_threads_np();
8199 #endif
8200
8201         exit( status );
8202
8203 ; return 0; }
8204 EOF
8205 if { (eval echo configure:8206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8206   rm -rf conftest*
8207   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8208 else
8209   echo "configure: failed program was:" >&5
8210   cat conftest.$ac_ext >&5
8211   rm -rf conftest*
8212   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8213 fi
8214 rm -f conftest*
8215 else
8216   cat > conftest.$ac_ext <<EOF
8217 #line 8218 "configure"
8218 #include "confdefs.h"
8219 /* pthread test headers */
8220 #include <pthread.h>
8221 #ifndef NULL
8222 #define NULL (void*)0
8223 #endif
8224
8225 static void *task(p)
8226         void *p;
8227 {
8228         return (void *) (p == NULL);
8229 }
8230
8231
8232 int main(argc, argv)
8233         int argc;
8234         char **argv;
8235 {
8236
8237         /* pthread test function */
8238         pthread_t t;
8239         int status;
8240
8241         /* make sure pthread_create() isn't just a stub */
8242 #if HAVE_PTHREADS_D4
8243         status = pthread_create(&t, pthread_attr_default, task, NULL);
8244 #else
8245         status = pthread_create(&t, NULL, task, NULL);
8246 #endif
8247
8248         if( status ) exit( status );
8249
8250         /* make sure pthread_detach() isn't just a stub */
8251 #if HAVE_PTHREADS_D4
8252         status = pthread_detach( &t );
8253 #else
8254         status = pthread_detach( t );
8255 #endif
8256
8257 #ifdef HAVE_LINUX_THREADS
8258         pthread_kill_other_threads_np();
8259 #endif
8260
8261         exit( status );
8262
8263 }
8264
8265 EOF
8266 if { (eval echo configure:8267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8267 then
8268   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8269 else
8270   echo "configure: failed program was:" >&5
8271   cat conftest.$ac_ext >&5
8272   rm -fr conftest*
8273   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8274 fi
8275 rm -fr conftest*
8276 fi
8277
8278
8279                 # restore the LIBS
8280                 LIBS="$ol_LIBS"
8281         
8282 fi
8283
8284 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8285
8286         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8287                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8288                 ol_link_threads=posix
8289         fi
8290 fi
8291
8292                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8293 if test "$ol_link_threads" = no ; then
8294         # try -lpthread -lmach -lexc
8295         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8296 echo "configure:8297: checking for pthread link with -lpthread -lmach -lexc" >&5
8297 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8298   echo $ac_n "(cached) $ac_c" 1>&6
8299 else
8300   
8301                 # save the flags
8302                 ol_LIBS="$LIBS"
8303                 LIBS="-lpthread -lmach -lexc $LIBS"
8304
8305                 if test "$cross_compiling" = yes; then
8306   cat > conftest.$ac_ext <<EOF
8307 #line 8308 "configure"
8308 #include "confdefs.h"
8309 /* pthread test headers */
8310 #include <pthread.h>
8311 #ifndef NULL
8312 #define NULL (void*)0
8313 #endif
8314
8315 static void *task(p)
8316         void *p;
8317 {
8318         return (void *) (p == NULL);
8319 }
8320
8321 int main() {
8322
8323         /* pthread test function */
8324         pthread_t t;
8325         int status;
8326
8327         /* make sure pthread_create() isn't just a stub */
8328 #if HAVE_PTHREADS_D4
8329         status = pthread_create(&t, pthread_attr_default, task, NULL);
8330 #else
8331         status = pthread_create(&t, NULL, task, NULL);
8332 #endif
8333
8334         if( status ) exit( status );
8335
8336         /* make sure pthread_detach() isn't just a stub */
8337 #if HAVE_PTHREADS_D4
8338         status = pthread_detach( &t );
8339 #else
8340         status = pthread_detach( t );
8341 #endif
8342
8343 #ifdef HAVE_LINUX_THREADS
8344         pthread_kill_other_threads_np();
8345 #endif
8346
8347         exit( status );
8348
8349 ; return 0; }
8350 EOF
8351 if { (eval echo configure:8352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8352   rm -rf conftest*
8353   ol_cv_pthread_lpthread_lmach_lexc=yes
8354 else
8355   echo "configure: failed program was:" >&5
8356   cat conftest.$ac_ext >&5
8357   rm -rf conftest*
8358   ol_cv_pthread_lpthread_lmach_lexc=no
8359 fi
8360 rm -f conftest*
8361 else
8362   cat > conftest.$ac_ext <<EOF
8363 #line 8364 "configure"
8364 #include "confdefs.h"
8365 /* pthread test headers */
8366 #include <pthread.h>
8367 #ifndef NULL
8368 #define NULL (void*)0
8369 #endif
8370
8371 static void *task(p)
8372         void *p;
8373 {
8374         return (void *) (p == NULL);
8375 }
8376
8377
8378 int main(argc, argv)
8379         int argc;
8380         char **argv;
8381 {
8382
8383         /* pthread test function */
8384         pthread_t t;
8385         int status;
8386
8387         /* make sure pthread_create() isn't just a stub */
8388 #if HAVE_PTHREADS_D4
8389         status = pthread_create(&t, pthread_attr_default, task, NULL);
8390 #else
8391         status = pthread_create(&t, NULL, task, NULL);
8392 #endif
8393
8394         if( status ) exit( status );
8395
8396         /* make sure pthread_detach() isn't just a stub */
8397 #if HAVE_PTHREADS_D4
8398         status = pthread_detach( &t );
8399 #else
8400         status = pthread_detach( t );
8401 #endif
8402
8403 #ifdef HAVE_LINUX_THREADS
8404         pthread_kill_other_threads_np();
8405 #endif
8406
8407         exit( status );
8408
8409 }
8410
8411 EOF
8412 if { (eval echo configure:8413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8413 then
8414   ol_cv_pthread_lpthread_lmach_lexc=yes
8415 else
8416   echo "configure: failed program was:" >&5
8417   cat conftest.$ac_ext >&5
8418   rm -fr conftest*
8419   ol_cv_pthread_lpthread_lmach_lexc=no
8420 fi
8421 rm -fr conftest*
8422 fi
8423
8424
8425                 # restore the LIBS
8426                 LIBS="$ol_LIBS"
8427         
8428 fi
8429
8430 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8431
8432         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8433                 ol_link_pthreads="-lpthread -lmach -lexc"
8434                 ol_link_threads=posix
8435         fi
8436 fi
8437
8438
8439                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8440 if test "$ol_link_threads" = no ; then
8441         # try -lpthread -Wl,-woff,85
8442         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8443 echo "configure:8444: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8444 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8445   echo $ac_n "(cached) $ac_c" 1>&6
8446 else
8447   
8448                 # save the flags
8449                 ol_LIBS="$LIBS"
8450                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8451
8452                 if test "$cross_compiling" = yes; then
8453   cat > conftest.$ac_ext <<EOF
8454 #line 8455 "configure"
8455 #include "confdefs.h"
8456 /* pthread test headers */
8457 #include <pthread.h>
8458 #ifndef NULL
8459 #define NULL (void*)0
8460 #endif
8461
8462 static void *task(p)
8463         void *p;
8464 {
8465         return (void *) (p == NULL);
8466 }
8467
8468 int main() {
8469
8470         /* pthread test function */
8471         pthread_t t;
8472         int status;
8473
8474         /* make sure pthread_create() isn't just a stub */
8475 #if HAVE_PTHREADS_D4
8476         status = pthread_create(&t, pthread_attr_default, task, NULL);
8477 #else
8478         status = pthread_create(&t, NULL, task, NULL);
8479 #endif
8480
8481         if( status ) exit( status );
8482
8483         /* make sure pthread_detach() isn't just a stub */
8484 #if HAVE_PTHREADS_D4
8485         status = pthread_detach( &t );
8486 #else
8487         status = pthread_detach( t );
8488 #endif
8489
8490 #ifdef HAVE_LINUX_THREADS
8491         pthread_kill_other_threads_np();
8492 #endif
8493
8494         exit( status );
8495
8496 ; return 0; }
8497 EOF
8498 if { (eval echo configure:8499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8499   rm -rf conftest*
8500   ol_cv_pthread_lib_lpthread_woff=yes
8501 else
8502   echo "configure: failed program was:" >&5
8503   cat conftest.$ac_ext >&5
8504   rm -rf conftest*
8505   ol_cv_pthread_lib_lpthread_woff=no
8506 fi
8507 rm -f conftest*
8508 else
8509   cat > conftest.$ac_ext <<EOF
8510 #line 8511 "configure"
8511 #include "confdefs.h"
8512 /* pthread test headers */
8513 #include <pthread.h>
8514 #ifndef NULL
8515 #define NULL (void*)0
8516 #endif
8517
8518 static void *task(p)
8519         void *p;
8520 {
8521         return (void *) (p == NULL);
8522 }
8523
8524
8525 int main(argc, argv)
8526         int argc;
8527         char **argv;
8528 {
8529
8530         /* pthread test function */
8531         pthread_t t;
8532         int status;
8533
8534         /* make sure pthread_create() isn't just a stub */
8535 #if HAVE_PTHREADS_D4
8536         status = pthread_create(&t, pthread_attr_default, task, NULL);
8537 #else
8538         status = pthread_create(&t, NULL, task, NULL);
8539 #endif
8540
8541         if( status ) exit( status );
8542
8543         /* make sure pthread_detach() isn't just a stub */
8544 #if HAVE_PTHREADS_D4
8545         status = pthread_detach( &t );
8546 #else
8547         status = pthread_detach( t );
8548 #endif
8549
8550 #ifdef HAVE_LINUX_THREADS
8551         pthread_kill_other_threads_np();
8552 #endif
8553
8554         exit( status );
8555
8556 }
8557
8558 EOF
8559 if { (eval echo configure:8560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8560 then
8561   ol_cv_pthread_lib_lpthread_woff=yes
8562 else
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -fr conftest*
8566   ol_cv_pthread_lib_lpthread_woff=no
8567 fi
8568 rm -fr conftest*
8569 fi
8570
8571
8572                 # restore the LIBS
8573                 LIBS="$ol_LIBS"
8574         
8575 fi
8576
8577 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8578
8579         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8580                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8581                 ol_link_threads=posix
8582         fi
8583 fi
8584
8585
8586                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8587 if test "$ol_link_threads" = no ; then
8588         # try -lpthread
8589         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8590 echo "configure:8591: checking for pthread link with -lpthread" >&5
8591 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8592   echo $ac_n "(cached) $ac_c" 1>&6
8593 else
8594   
8595                 # save the flags
8596                 ol_LIBS="$LIBS"
8597                 LIBS="-lpthread $LIBS"
8598
8599                 if test "$cross_compiling" = yes; then
8600   cat > conftest.$ac_ext <<EOF
8601 #line 8602 "configure"
8602 #include "confdefs.h"
8603 /* pthread test headers */
8604 #include <pthread.h>
8605 #ifndef NULL
8606 #define NULL (void*)0
8607 #endif
8608
8609 static void *task(p)
8610         void *p;
8611 {
8612         return (void *) (p == NULL);
8613 }
8614
8615 int main() {
8616
8617         /* pthread test function */
8618         pthread_t t;
8619         int status;
8620
8621         /* make sure pthread_create() isn't just a stub */
8622 #if HAVE_PTHREADS_D4
8623         status = pthread_create(&t, pthread_attr_default, task, NULL);
8624 #else
8625         status = pthread_create(&t, NULL, task, NULL);
8626 #endif
8627
8628         if( status ) exit( status );
8629
8630         /* make sure pthread_detach() isn't just a stub */
8631 #if HAVE_PTHREADS_D4
8632         status = pthread_detach( &t );
8633 #else
8634         status = pthread_detach( t );
8635 #endif
8636
8637 #ifdef HAVE_LINUX_THREADS
8638         pthread_kill_other_threads_np();
8639 #endif
8640
8641         exit( status );
8642
8643 ; return 0; }
8644 EOF
8645 if { (eval echo configure:8646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8646   rm -rf conftest*
8647   ol_cv_pthread_lpthread=yes
8648 else
8649   echo "configure: failed program was:" >&5
8650   cat conftest.$ac_ext >&5
8651   rm -rf conftest*
8652   ol_cv_pthread_lpthread=no
8653 fi
8654 rm -f conftest*
8655 else
8656   cat > conftest.$ac_ext <<EOF
8657 #line 8658 "configure"
8658 #include "confdefs.h"
8659 /* pthread test headers */
8660 #include <pthread.h>
8661 #ifndef NULL
8662 #define NULL (void*)0
8663 #endif
8664
8665 static void *task(p)
8666         void *p;
8667 {
8668         return (void *) (p == NULL);
8669 }
8670
8671
8672 int main(argc, argv)
8673         int argc;
8674         char **argv;
8675 {
8676
8677         /* pthread test function */
8678         pthread_t t;
8679         int status;
8680
8681         /* make sure pthread_create() isn't just a stub */
8682 #if HAVE_PTHREADS_D4
8683         status = pthread_create(&t, pthread_attr_default, task, NULL);
8684 #else
8685         status = pthread_create(&t, NULL, task, NULL);
8686 #endif
8687
8688         if( status ) exit( status );
8689
8690         /* make sure pthread_detach() isn't just a stub */
8691 #if HAVE_PTHREADS_D4
8692         status = pthread_detach( &t );
8693 #else
8694         status = pthread_detach( t );
8695 #endif
8696
8697 #ifdef HAVE_LINUX_THREADS
8698         pthread_kill_other_threads_np();
8699 #endif
8700
8701         exit( status );
8702
8703 }
8704
8705 EOF
8706 if { (eval echo configure:8707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8707 then
8708   ol_cv_pthread_lpthread=yes
8709 else
8710   echo "configure: failed program was:" >&5
8711   cat conftest.$ac_ext >&5
8712   rm -fr conftest*
8713   ol_cv_pthread_lpthread=no
8714 fi
8715 rm -fr conftest*
8716 fi
8717
8718
8719                 # restore the LIBS
8720                 LIBS="$ol_LIBS"
8721         
8722 fi
8723
8724 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8725
8726         if test $ol_cv_pthread_lpthread = yes ; then
8727                 ol_link_pthreads="-lpthread"
8728                 ol_link_threads=posix
8729         fi
8730 fi
8731
8732                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8733 if test "$ol_link_threads" = no ; then
8734         # try -lc_r
8735         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8736 echo "configure:8737: checking for pthread link with -lc_r" >&5
8737 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   
8741                 # save the flags
8742                 ol_LIBS="$LIBS"
8743                 LIBS="-lc_r $LIBS"
8744
8745                 if test "$cross_compiling" = yes; then
8746   cat > conftest.$ac_ext <<EOF
8747 #line 8748 "configure"
8748 #include "confdefs.h"
8749 /* pthread test headers */
8750 #include <pthread.h>
8751 #ifndef NULL
8752 #define NULL (void*)0
8753 #endif
8754
8755 static void *task(p)
8756         void *p;
8757 {
8758         return (void *) (p == NULL);
8759 }
8760
8761 int main() {
8762
8763         /* pthread test function */
8764         pthread_t t;
8765         int status;
8766
8767         /* make sure pthread_create() isn't just a stub */
8768 #if HAVE_PTHREADS_D4
8769         status = pthread_create(&t, pthread_attr_default, task, NULL);
8770 #else
8771         status = pthread_create(&t, NULL, task, NULL);
8772 #endif
8773
8774         if( status ) exit( status );
8775
8776         /* make sure pthread_detach() isn't just a stub */
8777 #if HAVE_PTHREADS_D4
8778         status = pthread_detach( &t );
8779 #else
8780         status = pthread_detach( t );
8781 #endif
8782
8783 #ifdef HAVE_LINUX_THREADS
8784         pthread_kill_other_threads_np();
8785 #endif
8786
8787         exit( status );
8788
8789 ; return 0; }
8790 EOF
8791 if { (eval echo configure:8792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8792   rm -rf conftest*
8793   ol_cv_pthread_lc_r=yes
8794 else
8795   echo "configure: failed program was:" >&5
8796   cat conftest.$ac_ext >&5
8797   rm -rf conftest*
8798   ol_cv_pthread_lc_r=no
8799 fi
8800 rm -f conftest*
8801 else
8802   cat > conftest.$ac_ext <<EOF
8803 #line 8804 "configure"
8804 #include "confdefs.h"
8805 /* pthread test headers */
8806 #include <pthread.h>
8807 #ifndef NULL
8808 #define NULL (void*)0
8809 #endif
8810
8811 static void *task(p)
8812         void *p;
8813 {
8814         return (void *) (p == NULL);
8815 }
8816
8817
8818 int main(argc, argv)
8819         int argc;
8820         char **argv;
8821 {
8822
8823         /* pthread test function */
8824         pthread_t t;
8825         int status;
8826
8827         /* make sure pthread_create() isn't just a stub */
8828 #if HAVE_PTHREADS_D4
8829         status = pthread_create(&t, pthread_attr_default, task, NULL);
8830 #else
8831         status = pthread_create(&t, NULL, task, NULL);
8832 #endif
8833
8834         if( status ) exit( status );
8835
8836         /* make sure pthread_detach() isn't just a stub */
8837 #if HAVE_PTHREADS_D4
8838         status = pthread_detach( &t );
8839 #else
8840         status = pthread_detach( t );
8841 #endif
8842
8843 #ifdef HAVE_LINUX_THREADS
8844         pthread_kill_other_threads_np();
8845 #endif
8846
8847         exit( status );
8848
8849 }
8850
8851 EOF
8852 if { (eval echo configure:8853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8853 then
8854   ol_cv_pthread_lc_r=yes
8855 else
8856   echo "configure: failed program was:" >&5
8857   cat conftest.$ac_ext >&5
8858   rm -fr conftest*
8859   ol_cv_pthread_lc_r=no
8860 fi
8861 rm -fr conftest*
8862 fi
8863
8864
8865                 # restore the LIBS
8866                 LIBS="$ol_LIBS"
8867         
8868 fi
8869
8870 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8871
8872         if test $ol_cv_pthread_lc_r = yes ; then
8873                 ol_link_pthreads="-lc_r"
8874                 ol_link_threads=posix
8875         fi
8876 fi
8877
8878
8879                 # Pthread try link: -threads (ol_cv_pthread_threads)
8880 if test "$ol_link_threads" = no ; then
8881         # try -threads
8882         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8883 echo "configure:8884: checking for pthread link with -threads" >&5
8884 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8885   echo $ac_n "(cached) $ac_c" 1>&6
8886 else
8887   
8888                 # save the flags
8889                 ol_LIBS="$LIBS"
8890                 LIBS="-threads $LIBS"
8891
8892                 if test "$cross_compiling" = yes; then
8893   cat > conftest.$ac_ext <<EOF
8894 #line 8895 "configure"
8895 #include "confdefs.h"
8896 /* pthread test headers */
8897 #include <pthread.h>
8898 #ifndef NULL
8899 #define NULL (void*)0
8900 #endif
8901
8902 static void *task(p)
8903         void *p;
8904 {
8905         return (void *) (p == NULL);
8906 }
8907
8908 int main() {
8909
8910         /* pthread test function */
8911         pthread_t t;
8912         int status;
8913
8914         /* make sure pthread_create() isn't just a stub */
8915 #if HAVE_PTHREADS_D4
8916         status = pthread_create(&t, pthread_attr_default, task, NULL);
8917 #else
8918         status = pthread_create(&t, NULL, task, NULL);
8919 #endif
8920
8921         if( status ) exit( status );
8922
8923         /* make sure pthread_detach() isn't just a stub */
8924 #if HAVE_PTHREADS_D4
8925         status = pthread_detach( &t );
8926 #else
8927         status = pthread_detach( t );
8928 #endif
8929
8930 #ifdef HAVE_LINUX_THREADS
8931         pthread_kill_other_threads_np();
8932 #endif
8933
8934         exit( status );
8935
8936 ; return 0; }
8937 EOF
8938 if { (eval echo configure:8939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8939   rm -rf conftest*
8940   ol_cv_pthread_threads=yes
8941 else
8942   echo "configure: failed program was:" >&5
8943   cat conftest.$ac_ext >&5
8944   rm -rf conftest*
8945   ol_cv_pthread_threads=no
8946 fi
8947 rm -f conftest*
8948 else
8949   cat > conftest.$ac_ext <<EOF
8950 #line 8951 "configure"
8951 #include "confdefs.h"
8952 /* pthread test headers */
8953 #include <pthread.h>
8954 #ifndef NULL
8955 #define NULL (void*)0
8956 #endif
8957
8958 static void *task(p)
8959         void *p;
8960 {
8961         return (void *) (p == NULL);
8962 }
8963
8964
8965 int main(argc, argv)
8966         int argc;
8967         char **argv;
8968 {
8969
8970         /* pthread test function */
8971         pthread_t t;
8972         int status;
8973
8974         /* make sure pthread_create() isn't just a stub */
8975 #if HAVE_PTHREADS_D4
8976         status = pthread_create(&t, pthread_attr_default, task, NULL);
8977 #else
8978         status = pthread_create(&t, NULL, task, NULL);
8979 #endif
8980
8981         if( status ) exit( status );
8982
8983         /* make sure pthread_detach() isn't just a stub */
8984 #if HAVE_PTHREADS_D4
8985         status = pthread_detach( &t );
8986 #else
8987         status = pthread_detach( t );
8988 #endif
8989
8990 #ifdef HAVE_LINUX_THREADS
8991         pthread_kill_other_threads_np();
8992 #endif
8993
8994         exit( status );
8995
8996 }
8997
8998 EOF
8999 if { (eval echo configure:9000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9000 then
9001   ol_cv_pthread_threads=yes
9002 else
9003   echo "configure: failed program was:" >&5
9004   cat conftest.$ac_ext >&5
9005   rm -fr conftest*
9006   ol_cv_pthread_threads=no
9007 fi
9008 rm -fr conftest*
9009 fi
9010
9011
9012                 # restore the LIBS
9013                 LIBS="$ol_LIBS"
9014         
9015 fi
9016
9017 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9018
9019         if test $ol_cv_pthread_threads = yes ; then
9020                 ol_link_pthreads="-threads"
9021                 ol_link_threads=posix
9022         fi
9023 fi
9024
9025
9026                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9027 if test "$ol_link_threads" = no ; then
9028         # try -lpthreads -lmach -lexc -lc_r
9029         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9030 echo "configure:9031: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9031 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9032   echo $ac_n "(cached) $ac_c" 1>&6
9033 else
9034   
9035                 # save the flags
9036                 ol_LIBS="$LIBS"
9037                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9038
9039                 if test "$cross_compiling" = yes; then
9040   cat > conftest.$ac_ext <<EOF
9041 #line 9042 "configure"
9042 #include "confdefs.h"
9043 /* pthread test headers */
9044 #include <pthread.h>
9045 #ifndef NULL
9046 #define NULL (void*)0
9047 #endif
9048
9049 static void *task(p)
9050         void *p;
9051 {
9052         return (void *) (p == NULL);
9053 }
9054
9055 int main() {
9056
9057         /* pthread test function */
9058         pthread_t t;
9059         int status;
9060
9061         /* make sure pthread_create() isn't just a stub */
9062 #if HAVE_PTHREADS_D4
9063         status = pthread_create(&t, pthread_attr_default, task, NULL);
9064 #else
9065         status = pthread_create(&t, NULL, task, NULL);
9066 #endif
9067
9068         if( status ) exit( status );
9069
9070         /* make sure pthread_detach() isn't just a stub */
9071 #if HAVE_PTHREADS_D4
9072         status = pthread_detach( &t );
9073 #else
9074         status = pthread_detach( t );
9075 #endif
9076
9077 #ifdef HAVE_LINUX_THREADS
9078         pthread_kill_other_threads_np();
9079 #endif
9080
9081         exit( status );
9082
9083 ; return 0; }
9084 EOF
9085 if { (eval echo configure:9086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9086   rm -rf conftest*
9087   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9088 else
9089   echo "configure: failed program was:" >&5
9090   cat conftest.$ac_ext >&5
9091   rm -rf conftest*
9092   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9093 fi
9094 rm -f conftest*
9095 else
9096   cat > conftest.$ac_ext <<EOF
9097 #line 9098 "configure"
9098 #include "confdefs.h"
9099 /* pthread test headers */
9100 #include <pthread.h>
9101 #ifndef NULL
9102 #define NULL (void*)0
9103 #endif
9104
9105 static void *task(p)
9106         void *p;
9107 {
9108         return (void *) (p == NULL);
9109 }
9110
9111
9112 int main(argc, argv)
9113         int argc;
9114         char **argv;
9115 {
9116
9117         /* pthread test function */
9118         pthread_t t;
9119         int status;
9120
9121         /* make sure pthread_create() isn't just a stub */
9122 #if HAVE_PTHREADS_D4
9123         status = pthread_create(&t, pthread_attr_default, task, NULL);
9124 #else
9125         status = pthread_create(&t, NULL, task, NULL);
9126 #endif
9127
9128         if( status ) exit( status );
9129
9130         /* make sure pthread_detach() isn't just a stub */
9131 #if HAVE_PTHREADS_D4
9132         status = pthread_detach( &t );
9133 #else
9134         status = pthread_detach( t );
9135 #endif
9136
9137 #ifdef HAVE_LINUX_THREADS
9138         pthread_kill_other_threads_np();
9139 #endif
9140
9141         exit( status );
9142
9143 }
9144
9145 EOF
9146 if { (eval echo configure:9147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9147 then
9148   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9149 else
9150   echo "configure: failed program was:" >&5
9151   cat conftest.$ac_ext >&5
9152   rm -fr conftest*
9153   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9154 fi
9155 rm -fr conftest*
9156 fi
9157
9158
9159                 # restore the LIBS
9160                 LIBS="$ol_LIBS"
9161         
9162 fi
9163
9164 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9165
9166         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9167                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9168                 ol_link_threads=posix
9169         fi
9170 fi
9171
9172                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9173 if test "$ol_link_threads" = no ; then
9174         # try -lpthreads -lmach -lexc
9175         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9176 echo "configure:9177: checking for pthread link with -lpthreads -lmach -lexc" >&5
9177 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9178   echo $ac_n "(cached) $ac_c" 1>&6
9179 else
9180   
9181                 # save the flags
9182                 ol_LIBS="$LIBS"
9183                 LIBS="-lpthreads -lmach -lexc $LIBS"
9184
9185                 if test "$cross_compiling" = yes; then
9186   cat > conftest.$ac_ext <<EOF
9187 #line 9188 "configure"
9188 #include "confdefs.h"
9189 /* pthread test headers */
9190 #include <pthread.h>
9191 #ifndef NULL
9192 #define NULL (void*)0
9193 #endif
9194
9195 static void *task(p)
9196         void *p;
9197 {
9198         return (void *) (p == NULL);
9199 }
9200
9201 int main() {
9202
9203         /* pthread test function */
9204         pthread_t t;
9205         int status;
9206
9207         /* make sure pthread_create() isn't just a stub */
9208 #if HAVE_PTHREADS_D4
9209         status = pthread_create(&t, pthread_attr_default, task, NULL);
9210 #else
9211         status = pthread_create(&t, NULL, task, NULL);
9212 #endif
9213
9214         if( status ) exit( status );
9215
9216         /* make sure pthread_detach() isn't just a stub */
9217 #if HAVE_PTHREADS_D4
9218         status = pthread_detach( &t );
9219 #else
9220         status = pthread_detach( t );
9221 #endif
9222
9223 #ifdef HAVE_LINUX_THREADS
9224         pthread_kill_other_threads_np();
9225 #endif
9226
9227         exit( status );
9228
9229 ; return 0; }
9230 EOF
9231 if { (eval echo configure:9232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9232   rm -rf conftest*
9233   ol_cv_pthread_lpthreads_lmach_lexc=yes
9234 else
9235   echo "configure: failed program was:" >&5
9236   cat conftest.$ac_ext >&5
9237   rm -rf conftest*
9238   ol_cv_pthread_lpthreads_lmach_lexc=no
9239 fi
9240 rm -f conftest*
9241 else
9242   cat > conftest.$ac_ext <<EOF
9243 #line 9244 "configure"
9244 #include "confdefs.h"
9245 /* pthread test headers */
9246 #include <pthread.h>
9247 #ifndef NULL
9248 #define NULL (void*)0
9249 #endif
9250
9251 static void *task(p)
9252         void *p;
9253 {
9254         return (void *) (p == NULL);
9255 }
9256
9257
9258 int main(argc, argv)
9259         int argc;
9260         char **argv;
9261 {
9262
9263         /* pthread test function */
9264         pthread_t t;
9265         int status;
9266
9267         /* make sure pthread_create() isn't just a stub */
9268 #if HAVE_PTHREADS_D4
9269         status = pthread_create(&t, pthread_attr_default, task, NULL);
9270 #else
9271         status = pthread_create(&t, NULL, task, NULL);
9272 #endif
9273
9274         if( status ) exit( status );
9275
9276         /* make sure pthread_detach() isn't just a stub */
9277 #if HAVE_PTHREADS_D4
9278         status = pthread_detach( &t );
9279 #else
9280         status = pthread_detach( t );
9281 #endif
9282
9283 #ifdef HAVE_LINUX_THREADS
9284         pthread_kill_other_threads_np();
9285 #endif
9286
9287         exit( status );
9288
9289 }
9290
9291 EOF
9292 if { (eval echo configure:9293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9293 then
9294   ol_cv_pthread_lpthreads_lmach_lexc=yes
9295 else
9296   echo "configure: failed program was:" >&5
9297   cat conftest.$ac_ext >&5
9298   rm -fr conftest*
9299   ol_cv_pthread_lpthreads_lmach_lexc=no
9300 fi
9301 rm -fr conftest*
9302 fi
9303
9304
9305                 # restore the LIBS
9306                 LIBS="$ol_LIBS"
9307         
9308 fi
9309
9310 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9311
9312         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9313                 ol_link_pthreads="-lpthreads -lmach -lexc"
9314                 ol_link_threads=posix
9315         fi
9316 fi
9317
9318                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9319 if test "$ol_link_threads" = no ; then
9320         # try -lpthreads -lexc
9321         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9322 echo "configure:9323: checking for pthread link with -lpthreads -lexc" >&5
9323 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9324   echo $ac_n "(cached) $ac_c" 1>&6
9325 else
9326   
9327                 # save the flags
9328                 ol_LIBS="$LIBS"
9329                 LIBS="-lpthreads -lexc $LIBS"
9330
9331                 if test "$cross_compiling" = yes; then
9332   cat > conftest.$ac_ext <<EOF
9333 #line 9334 "configure"
9334 #include "confdefs.h"
9335 /* pthread test headers */
9336 #include <pthread.h>
9337 #ifndef NULL
9338 #define NULL (void*)0
9339 #endif
9340
9341 static void *task(p)
9342         void *p;
9343 {
9344         return (void *) (p == NULL);
9345 }
9346
9347 int main() {
9348
9349         /* pthread test function */
9350         pthread_t t;
9351         int status;
9352
9353         /* make sure pthread_create() isn't just a stub */
9354 #if HAVE_PTHREADS_D4
9355         status = pthread_create(&t, pthread_attr_default, task, NULL);
9356 #else
9357         status = pthread_create(&t, NULL, task, NULL);
9358 #endif
9359
9360         if( status ) exit( status );
9361
9362         /* make sure pthread_detach() isn't just a stub */
9363 #if HAVE_PTHREADS_D4
9364         status = pthread_detach( &t );
9365 #else
9366         status = pthread_detach( t );
9367 #endif
9368
9369 #ifdef HAVE_LINUX_THREADS
9370         pthread_kill_other_threads_np();
9371 #endif
9372
9373         exit( status );
9374
9375 ; return 0; }
9376 EOF
9377 if { (eval echo configure:9378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9378   rm -rf conftest*
9379   ol_cv_pthread_lpthreads_lexc=yes
9380 else
9381   echo "configure: failed program was:" >&5
9382   cat conftest.$ac_ext >&5
9383   rm -rf conftest*
9384   ol_cv_pthread_lpthreads_lexc=no
9385 fi
9386 rm -f conftest*
9387 else
9388   cat > conftest.$ac_ext <<EOF
9389 #line 9390 "configure"
9390 #include "confdefs.h"
9391 /* pthread test headers */
9392 #include <pthread.h>
9393 #ifndef NULL
9394 #define NULL (void*)0
9395 #endif
9396
9397 static void *task(p)
9398         void *p;
9399 {
9400         return (void *) (p == NULL);
9401 }
9402
9403
9404 int main(argc, argv)
9405         int argc;
9406         char **argv;
9407 {
9408
9409         /* pthread test function */
9410         pthread_t t;
9411         int status;
9412
9413         /* make sure pthread_create() isn't just a stub */
9414 #if HAVE_PTHREADS_D4
9415         status = pthread_create(&t, pthread_attr_default, task, NULL);
9416 #else
9417         status = pthread_create(&t, NULL, task, NULL);
9418 #endif
9419
9420         if( status ) exit( status );
9421
9422         /* make sure pthread_detach() isn't just a stub */
9423 #if HAVE_PTHREADS_D4
9424         status = pthread_detach( &t );
9425 #else
9426         status = pthread_detach( t );
9427 #endif
9428
9429 #ifdef HAVE_LINUX_THREADS
9430         pthread_kill_other_threads_np();
9431 #endif
9432
9433         exit( status );
9434
9435 }
9436
9437 EOF
9438 if { (eval echo configure:9439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9439 then
9440   ol_cv_pthread_lpthreads_lexc=yes
9441 else
9442   echo "configure: failed program was:" >&5
9443   cat conftest.$ac_ext >&5
9444   rm -fr conftest*
9445   ol_cv_pthread_lpthreads_lexc=no
9446 fi
9447 rm -fr conftest*
9448 fi
9449
9450
9451                 # restore the LIBS
9452                 LIBS="$ol_LIBS"
9453         
9454 fi
9455
9456 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9457
9458         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9459                 ol_link_pthreads="-lpthreads -lexc"
9460                 ol_link_threads=posix
9461         fi
9462 fi
9463
9464
9465                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9466 if test "$ol_link_threads" = no ; then
9467         # try -lpthreads
9468         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9469 echo "configure:9470: checking for pthread link with -lpthreads" >&5
9470 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9471   echo $ac_n "(cached) $ac_c" 1>&6
9472 else
9473   
9474                 # save the flags
9475                 ol_LIBS="$LIBS"
9476                 LIBS="-lpthreads $LIBS"
9477
9478                 if test "$cross_compiling" = yes; then
9479   cat > conftest.$ac_ext <<EOF
9480 #line 9481 "configure"
9481 #include "confdefs.h"
9482 /* pthread test headers */
9483 #include <pthread.h>
9484 #ifndef NULL
9485 #define NULL (void*)0
9486 #endif
9487
9488 static void *task(p)
9489         void *p;
9490 {
9491         return (void *) (p == NULL);
9492 }
9493
9494 int main() {
9495
9496         /* pthread test function */
9497         pthread_t t;
9498         int status;
9499
9500         /* make sure pthread_create() isn't just a stub */
9501 #if HAVE_PTHREADS_D4
9502         status = pthread_create(&t, pthread_attr_default, task, NULL);
9503 #else
9504         status = pthread_create(&t, NULL, task, NULL);
9505 #endif
9506
9507         if( status ) exit( status );
9508
9509         /* make sure pthread_detach() isn't just a stub */
9510 #if HAVE_PTHREADS_D4
9511         status = pthread_detach( &t );
9512 #else
9513         status = pthread_detach( t );
9514 #endif
9515
9516 #ifdef HAVE_LINUX_THREADS
9517         pthread_kill_other_threads_np();
9518 #endif
9519
9520         exit( status );
9521
9522 ; return 0; }
9523 EOF
9524 if { (eval echo configure:9525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9525   rm -rf conftest*
9526   ol_cv_pthread_lib_lpthreads=yes
9527 else
9528   echo "configure: failed program was:" >&5
9529   cat conftest.$ac_ext >&5
9530   rm -rf conftest*
9531   ol_cv_pthread_lib_lpthreads=no
9532 fi
9533 rm -f conftest*
9534 else
9535   cat > conftest.$ac_ext <<EOF
9536 #line 9537 "configure"
9537 #include "confdefs.h"
9538 /* pthread test headers */
9539 #include <pthread.h>
9540 #ifndef NULL
9541 #define NULL (void*)0
9542 #endif
9543
9544 static void *task(p)
9545         void *p;
9546 {
9547         return (void *) (p == NULL);
9548 }
9549
9550
9551 int main(argc, argv)
9552         int argc;
9553         char **argv;
9554 {
9555
9556         /* pthread test function */
9557         pthread_t t;
9558         int status;
9559
9560         /* make sure pthread_create() isn't just a stub */
9561 #if HAVE_PTHREADS_D4
9562         status = pthread_create(&t, pthread_attr_default, task, NULL);
9563 #else
9564         status = pthread_create(&t, NULL, task, NULL);
9565 #endif
9566
9567         if( status ) exit( status );
9568
9569         /* make sure pthread_detach() isn't just a stub */
9570 #if HAVE_PTHREADS_D4
9571         status = pthread_detach( &t );
9572 #else
9573         status = pthread_detach( t );
9574 #endif
9575
9576 #ifdef HAVE_LINUX_THREADS
9577         pthread_kill_other_threads_np();
9578 #endif
9579
9580         exit( status );
9581
9582 }
9583
9584 EOF
9585 if { (eval echo configure:9586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9586 then
9587   ol_cv_pthread_lib_lpthreads=yes
9588 else
9589   echo "configure: failed program was:" >&5
9590   cat conftest.$ac_ext >&5
9591   rm -fr conftest*
9592   ol_cv_pthread_lib_lpthreads=no
9593 fi
9594 rm -fr conftest*
9595 fi
9596
9597
9598                 # restore the LIBS
9599                 LIBS="$ol_LIBS"
9600         
9601 fi
9602
9603 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9604
9605         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9606                 ol_link_pthreads="-lpthreads"
9607                 ol_link_threads=posix
9608         fi
9609 fi
9610
9611
9612                 if test $ol_link_threads != no ; then
9613                         cat >> confdefs.h <<\EOF
9614 #define HAVE_PTHREADS 1
9615 EOF
9616
9617
9618                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9619
9620                                                 save_CPPFLAGS="$CPPFLAGS"
9621                         save_LIBS="$LIBS"
9622                         LIBS="$LTHREAD_LIBS $LIBS"
9623
9624                                                                                                 for ac_func in sched_yield pthread_yield
9625 do
9626 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9627 echo "configure:9628: checking for $ac_func" >&5
9628 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9629   echo $ac_n "(cached) $ac_c" 1>&6
9630 else
9631   cat > conftest.$ac_ext <<EOF
9632 #line 9633 "configure"
9633 #include "confdefs.h"
9634 /* System header to define __stub macros and hopefully few prototypes,
9635     which can conflict with char $ac_func(); below.  */
9636 #include <assert.h>
9637 /* Override any gcc2 internal prototype to avoid an error.  */
9638 /* We use char because int might match the return type of a gcc2
9639     builtin and then its argument prototype would still apply.  */
9640 char $ac_func();
9641 char (*f)();
9642
9643 int main() {
9644
9645 /* The GNU C library defines this for functions which it implements
9646     to always fail with ENOSYS.  Some functions are actually named
9647     something starting with __ and the normal name is an alias.  */
9648 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9649 choke me
9650 #else
9651 f = $ac_func;
9652 #endif
9653
9654 ; return 0; }
9655 EOF
9656 if { (eval echo configure:9657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9657   rm -rf conftest*
9658   eval "ac_cv_func_$ac_func=yes"
9659 else
9660   echo "configure: failed program was:" >&5
9661   cat conftest.$ac_ext >&5
9662   rm -rf conftest*
9663   eval "ac_cv_func_$ac_func=no"
9664 fi
9665 rm -f conftest*
9666 fi
9667
9668 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9669   echo "$ac_t""yes" 1>&6
9670     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9671   cat >> confdefs.h <<EOF
9672 #define $ac_tr_func 1
9673 EOF
9674  
9675 else
9676   echo "$ac_t""no" 1>&6
9677 fi
9678 done
9679
9680
9681                         if test $ac_cv_func_sched_yield = no -a \
9682                                 $ac_cv_func_pthread_yield = no ; then
9683                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9684 echo "configure:9685: checking for sched_yield in -lrt" >&5
9685 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9686 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9687   echo $ac_n "(cached) $ac_c" 1>&6
9688 else
9689   ac_save_LIBS="$LIBS"
9690 LIBS="-lrt  $LIBS"
9691 cat > conftest.$ac_ext <<EOF
9692 #line 9693 "configure"
9693 #include "confdefs.h"
9694 /* Override any gcc2 internal prototype to avoid an error.  */
9695 /* We use char because int might match the return type of a gcc2
9696     builtin and then its argument prototype would still apply.  */
9697 char sched_yield();
9698
9699 int main() {
9700 sched_yield()
9701 ; return 0; }
9702 EOF
9703 if { (eval echo configure:9704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9704   rm -rf conftest*
9705   eval "ac_cv_lib_$ac_lib_var=yes"
9706 else
9707   echo "configure: failed program was:" >&5
9708   cat conftest.$ac_ext >&5
9709   rm -rf conftest*
9710   eval "ac_cv_lib_$ac_lib_var=no"
9711 fi
9712 rm -f conftest*
9713 LIBS="$ac_save_LIBS"
9714
9715 fi
9716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9717   echo "$ac_t""yes" 1>&6
9718   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9719                                         cat >> confdefs.h <<\EOF
9720 #define HAVE_SCHED_YIELD 1
9721 EOF
9722
9723                                         ac_cv_func_sched_yield=yes
9724 else
9725   echo "$ac_t""no" 1>&6
9726 ac_cv_func_sched_yield=no
9727 fi
9728
9729                         fi
9730                         if test $ac_cv_func_sched_yield = no -a \
9731                                 $ac_cv_func_pthread_yield = no ; then
9732                                                                                                 for ac_func in thr_yield
9733 do
9734 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9735 echo "configure:9736: checking for $ac_func" >&5
9736 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9737   echo $ac_n "(cached) $ac_c" 1>&6
9738 else
9739   cat > conftest.$ac_ext <<EOF
9740 #line 9741 "configure"
9741 #include "confdefs.h"
9742 /* System header to define __stub macros and hopefully few prototypes,
9743     which can conflict with char $ac_func(); below.  */
9744 #include <assert.h>
9745 /* Override any gcc2 internal prototype to avoid an error.  */
9746 /* We use char because int might match the return type of a gcc2
9747     builtin and then its argument prototype would still apply.  */
9748 char $ac_func();
9749 char (*f)();
9750
9751 int main() {
9752
9753 /* The GNU C library defines this for functions which it implements
9754     to always fail with ENOSYS.  Some functions are actually named
9755     something starting with __ and the normal name is an alias.  */
9756 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9757 choke me
9758 #else
9759 f = $ac_func;
9760 #endif
9761
9762 ; return 0; }
9763 EOF
9764 if { (eval echo configure:9765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9765   rm -rf conftest*
9766   eval "ac_cv_func_$ac_func=yes"
9767 else
9768   echo "configure: failed program was:" >&5
9769   cat conftest.$ac_ext >&5
9770   rm -rf conftest*
9771   eval "ac_cv_func_$ac_func=no"
9772 fi
9773 rm -f conftest*
9774 fi
9775
9776 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9777   echo "$ac_t""yes" 1>&6
9778     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9779   cat >> confdefs.h <<EOF
9780 #define $ac_tr_func 1
9781 EOF
9782  
9783 else
9784   echo "$ac_t""no" 1>&6
9785 fi
9786 done
9787
9788                         fi
9789                         if test $ac_cv_func_sched_yield = no -a \
9790                                 $ac_cv_func_pthread_yield = no -a \
9791                                 "$ac_cv_func_thr_yield" = no ; then
9792                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9793                         fi
9794
9795                                                 for ac_func in pthread_kill
9796 do
9797 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9798 echo "configure:9799: checking for $ac_func" >&5
9799 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9800   echo $ac_n "(cached) $ac_c" 1>&6
9801 else
9802   cat > conftest.$ac_ext <<EOF
9803 #line 9804 "configure"
9804 #include "confdefs.h"
9805 /* System header to define __stub macros and hopefully few prototypes,
9806     which can conflict with char $ac_func(); below.  */
9807 #include <assert.h>
9808 /* Override any gcc2 internal prototype to avoid an error.  */
9809 /* We use char because int might match the return type of a gcc2
9810     builtin and then its argument prototype would still apply.  */
9811 char $ac_func();
9812 char (*f)();
9813
9814 int main() {
9815
9816 /* The GNU C library defines this for functions which it implements
9817     to always fail with ENOSYS.  Some functions are actually named
9818     something starting with __ and the normal name is an alias.  */
9819 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9820 choke me
9821 #else
9822 f = $ac_func;
9823 #endif
9824
9825 ; return 0; }
9826 EOF
9827 if { (eval echo configure:9828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9828   rm -rf conftest*
9829   eval "ac_cv_func_$ac_func=yes"
9830 else
9831   echo "configure: failed program was:" >&5
9832   cat conftest.$ac_ext >&5
9833   rm -rf conftest*
9834   eval "ac_cv_func_$ac_func=no"
9835 fi
9836 rm -f conftest*
9837 fi
9838
9839 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9840   echo "$ac_t""yes" 1>&6
9841     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9842   cat >> confdefs.h <<EOF
9843 #define $ac_tr_func 1
9844 EOF
9845  
9846 else
9847   echo "$ac_t""no" 1>&6
9848 fi
9849 done
9850
9851
9852                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9853 echo "configure:9854: checking for pthread_detach with <pthread.h>" >&5
9854 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9855   echo $ac_n "(cached) $ac_c" 1>&6
9856 else
9857   
9858                                                                 cat > conftest.$ac_ext <<EOF
9859 #line 9860 "configure"
9860 #include "confdefs.h"
9861
9862 #include <pthread.h>
9863 #ifndef NULL
9864 #define NULL (void*)0
9865 #endif
9866
9867 int main() {
9868 pthread_detach(NULL);
9869 ; return 0; }
9870 EOF
9871 if { (eval echo configure:9872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9872   rm -rf conftest*
9873   ol_cv_func_pthread_detach=yes
9874 else
9875   echo "configure: failed program was:" >&5
9876   cat conftest.$ac_ext >&5
9877   rm -rf conftest*
9878   ol_cv_func_pthread_detach=no
9879 fi
9880 rm -f conftest*
9881                         
9882 fi
9883
9884 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9885
9886                         if test $ol_cv_func_pthread_detach = no ; then
9887                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9888                         fi
9889
9890                         cat >> confdefs.h <<\EOF
9891 #define HAVE_PTHREAD_DETACH 1
9892 EOF
9893
9894
9895                                                 for ac_func in \
9896                                 pthread_setconcurrency \
9897                                 pthread_getconcurrency \
9898                                 thr_setconcurrency \
9899                                 thr_getconcurrency \
9900                         
9901 do
9902 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9903 echo "configure:9904: checking for $ac_func" >&5
9904 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9905   echo $ac_n "(cached) $ac_c" 1>&6
9906 else
9907   cat > conftest.$ac_ext <<EOF
9908 #line 9909 "configure"
9909 #include "confdefs.h"
9910 /* System header to define __stub macros and hopefully few prototypes,
9911     which can conflict with char $ac_func(); below.  */
9912 #include <assert.h>
9913 /* Override any gcc2 internal prototype to avoid an error.  */
9914 /* We use char because int might match the return type of a gcc2
9915     builtin and then its argument prototype would still apply.  */
9916 char $ac_func();
9917 char (*f)();
9918
9919 int main() {
9920
9921 /* The GNU C library defines this for functions which it implements
9922     to always fail with ENOSYS.  Some functions are actually named
9923     something starting with __ and the normal name is an alias.  */
9924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9925 choke me
9926 #else
9927 f = $ac_func;
9928 #endif
9929
9930 ; return 0; }
9931 EOF
9932 if { (eval echo configure:9933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9933   rm -rf conftest*
9934   eval "ac_cv_func_$ac_func=yes"
9935 else
9936   echo "configure: failed program was:" >&5
9937   cat conftest.$ac_ext >&5
9938   rm -rf conftest*
9939   eval "ac_cv_func_$ac_func=no"
9940 fi
9941 rm -f conftest*
9942 fi
9943
9944 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9945   echo "$ac_t""yes" 1>&6
9946     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9947   cat >> confdefs.h <<EOF
9948 #define $ac_tr_func 1
9949 EOF
9950  
9951 else
9952   echo "$ac_t""no" 1>&6
9953 fi
9954 done
9955
9956
9957                         
9958         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9959 echo "configure:9960: checking for pthread_kill_other_threads_np" >&5
9960 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9961   echo $ac_n "(cached) $ac_c" 1>&6
9962 else
9963   cat > conftest.$ac_ext <<EOF
9964 #line 9965 "configure"
9965 #include "confdefs.h"
9966 /* System header to define __stub macros and hopefully few prototypes,
9967     which can conflict with char pthread_kill_other_threads_np(); below.  */
9968 #include <assert.h>
9969 /* Override any gcc2 internal prototype to avoid an error.  */
9970 /* We use char because int might match the return type of a gcc2
9971     builtin and then its argument prototype would still apply.  */
9972 char pthread_kill_other_threads_np();
9973 char (*f)();
9974
9975 int main() {
9976
9977 /* The GNU C library defines this for functions which it implements
9978     to always fail with ENOSYS.  Some functions are actually named
9979     something starting with __ and the normal name is an alias.  */
9980 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9981 choke me
9982 #else
9983 f = pthread_kill_other_threads_np;
9984 #endif
9985
9986 ; return 0; }
9987 EOF
9988 if { (eval echo configure:9989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9989   rm -rf conftest*
9990   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9991 else
9992   echo "configure: failed program was:" >&5
9993   cat conftest.$ac_ext >&5
9994   rm -rf conftest*
9995   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9996 fi
9997 rm -f conftest*
9998 fi
9999
10000 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10001   echo "$ac_t""yes" 1>&6
10002   :
10003 else
10004   echo "$ac_t""no" 1>&6
10005 fi
10006
10007         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10008 echo "configure:10009: checking for LinuxThreads implementation" >&5
10009 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10010   echo $ac_n "(cached) $ac_c" 1>&6
10011 else
10012   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10013 fi
10014
10015 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10016
10017                         
10018         
10019         
10020         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10021 echo "configure:10022: checking for LinuxThreads consistency" >&5
10022 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10023   echo $ac_n "(cached) $ac_c" 1>&6
10024 else
10025   
10026                 if test $ol_cv_header_linux_threads = yes -a \
10027                         $ol_cv_sys_linux_threads = yes; then
10028                         ol_cv_linux_threads=yes
10029                 elif test $ol_cv_header_linux_threads = no -a \
10030                         $ol_cv_sys_linux_threads = no; then
10031                         ol_cv_linux_threads=no
10032                 else
10033                         ol_cv_linux_threads=error
10034                 fi
10035         
10036 fi
10037
10038 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10039
10040
10041                         if test $ol_cv_linux_threads = error; then
10042                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10043                         fi
10044
10045                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10046 echo "configure:10047: checking if pthread_create() works" >&5
10047 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10048   echo $ac_n "(cached) $ac_c" 1>&6
10049 else
10050   
10051                         if test "$cross_compiling" = yes; then
10052                                 ol_cv_pthread_create_works=yes
10053 else
10054   cat > conftest.$ac_ext <<EOF
10055 #line 10056 "configure"
10056 #include "confdefs.h"
10057 /* pthread test headers */
10058 #include <pthread.h>
10059 #ifndef NULL
10060 #define NULL (void*)0
10061 #endif
10062
10063 static void *task(p)
10064         void *p;
10065 {
10066         return (void *) (p == NULL);
10067 }
10068
10069
10070 int main(argc, argv)
10071         int argc;
10072         char **argv;
10073 {
10074
10075         /* pthread test function */
10076         pthread_t t;
10077         int status;
10078
10079         /* make sure pthread_create() isn't just a stub */
10080 #if HAVE_PTHREADS_D4
10081         status = pthread_create(&t, pthread_attr_default, task, NULL);
10082 #else
10083         status = pthread_create(&t, NULL, task, NULL);
10084 #endif
10085
10086         if( status ) exit( status );
10087
10088         /* make sure pthread_detach() isn't just a stub */
10089 #if HAVE_PTHREADS_D4
10090         status = pthread_detach( &t );
10091 #else
10092         status = pthread_detach( t );
10093 #endif
10094
10095 #ifdef HAVE_LINUX_THREADS
10096         pthread_kill_other_threads_np();
10097 #endif
10098
10099         exit( status );
10100
10101 }
10102
10103 EOF
10104 if { (eval echo configure:10105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10105 then
10106   ol_cv_pthread_create_works=yes
10107 else
10108   echo "configure: failed program was:" >&5
10109   cat conftest.$ac_ext >&5
10110   rm -fr conftest*
10111   ol_cv_pthread_create_works=no
10112 fi
10113 rm -fr conftest*
10114 fi
10115
10116 fi
10117
10118 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10119
10120                         if test $ol_cv_pthread_create_works = no ; then
10121                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10122                         fi
10123
10124                                                 if test $ol_with_yielding_select = auto ; then
10125                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10126 echo "configure:10127: checking if select yields when using pthreads" >&5
10127 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10128   echo $ac_n "(cached) $ac_c" 1>&6
10129 else
10130   
10131                                 if test "$cross_compiling" = yes; then
10132   ol_cv_pthread_select_yields=cross
10133 else
10134   cat > conftest.$ac_ext <<EOF
10135 #line 10136 "configure"
10136 #include "confdefs.h"
10137
10138 #include <sys/types.h>
10139 #include <sys/time.h>
10140 #include <unistd.h>
10141 #include <pthread.h>
10142 #ifndef NULL
10143 #define NULL (void*) 0
10144 #endif
10145
10146 static int fildes[2];
10147
10148 static void *task(p)
10149         void *p;
10150 {
10151         int i;
10152         struct timeval tv;
10153
10154         fd_set rfds;
10155
10156         tv.tv_sec=10;
10157         tv.tv_usec=0;
10158
10159         FD_ZERO(&rfds);
10160         FD_SET(fildes[0], &rfds);
10161
10162         /* we're not interested in any fds */
10163         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10164
10165         if(i < 0) {
10166                 perror("select");
10167                 exit(10);
10168         }
10169
10170         exit(0); /* if we exit here, the select blocked the whole process */
10171 }
10172
10173 int main(argc, argv)
10174         int argc;
10175         char **argv;
10176 {
10177         pthread_t t;
10178
10179         /* create a pipe to select */
10180         if(pipe(&fildes[0])) {
10181                 perror("select");
10182                 exit(1);
10183         }
10184
10185 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10186         (void) pthread_setconcurrency(2);
10187 #else
10188 #ifdef HAVE_THR_SETCONCURRENCY
10189         /* Set Solaris LWP concurrency to 2 */
10190         thr_setconcurrency(2);
10191 #endif
10192 #endif
10193
10194 #if HAVE_PTHREADS_D4
10195         pthread_create(&t, pthread_attr_default, task, NULL);
10196 #else
10197         pthread_create(&t, NULL, task, NULL);
10198 #endif
10199
10200 #if HAVE_SCHED_YIELD
10201         sched_yield();  /* make sure task runs first */
10202 #else
10203 #ifdef HAVE_PTHREAD_YIELD
10204         pthread_yield();        /* make sure task runs first */
10205 #endif
10206 #endif
10207
10208         exit(2);
10209 }
10210 EOF
10211 if { (eval echo configure:10212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10212 then
10213   ol_cv_pthread_select_yields=no
10214 else
10215   echo "configure: failed program was:" >&5
10216   cat conftest.$ac_ext >&5
10217   rm -fr conftest*
10218   ol_cv_pthread_select_yields=yes
10219 fi
10220 rm -fr conftest*
10221 fi
10222
10223 fi
10224
10225 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10226
10227                                 if test $ol_cv_pthread_select_yields = cross ; then
10228                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10229                                 fi
10230
10231                                 if test $ol_cv_pthread_select_yields = yes ; then
10232                                         ol_with_yielding_select=yes
10233                                 fi
10234                         fi
10235
10236                                                 CPPFLAGS="$save_CPPFLAGS"
10237                         LIBS="$save_LIBS"
10238                 else
10239                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10240                 fi
10241         fi
10242
10243         if test $ol_with_threads = posix ; then
10244                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10245         fi
10246 fi
10247
10248 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10249         -o $ol_with_threads = mach ; then
10250
10251                 for ac_hdr in mach/cthreads.h
10252 do
10253 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10254 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10255 echo "configure:10256: checking for $ac_hdr" >&5
10256 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10257   echo $ac_n "(cached) $ac_c" 1>&6
10258 else
10259   cat > conftest.$ac_ext <<EOF
10260 #line 10261 "configure"
10261 #include "confdefs.h"
10262 #include <$ac_hdr>
10263 EOF
10264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10265 { (eval echo configure:10266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10267 if test -z "$ac_err"; then
10268   rm -rf conftest*
10269   eval "ac_cv_header_$ac_safe=yes"
10270 else
10271   echo "$ac_err" >&5
10272   echo "configure: failed program was:" >&5
10273   cat conftest.$ac_ext >&5
10274   rm -rf conftest*
10275   eval "ac_cv_header_$ac_safe=no"
10276 fi
10277 rm -f conftest*
10278 fi
10279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10280   echo "$ac_t""yes" 1>&6
10281     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10282   cat >> confdefs.h <<EOF
10283 #define $ac_tr_hdr 1
10284 EOF
10285  
10286 else
10287   echo "$ac_t""no" 1>&6
10288 fi
10289 done
10290
10291         if test $ac_cv_header_mach_cthreads_h = yes ; then
10292                 ol_with_threads=found
10293
10294                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10295 echo "configure:10296: checking for cthread_fork" >&5
10296 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10297   echo $ac_n "(cached) $ac_c" 1>&6
10298 else
10299   cat > conftest.$ac_ext <<EOF
10300 #line 10301 "configure"
10301 #include "confdefs.h"
10302 /* System header to define __stub macros and hopefully few prototypes,
10303     which can conflict with char cthread_fork(); below.  */
10304 #include <assert.h>
10305 /* Override any gcc2 internal prototype to avoid an error.  */
10306 /* We use char because int might match the return type of a gcc2
10307     builtin and then its argument prototype would still apply.  */
10308 char cthread_fork();
10309 char (*f)();
10310
10311 int main() {
10312
10313 /* The GNU C library defines this for functions which it implements
10314     to always fail with ENOSYS.  Some functions are actually named
10315     something starting with __ and the normal name is an alias.  */
10316 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10317 choke me
10318 #else
10319 f = cthread_fork;
10320 #endif
10321
10322 ; return 0; }
10323 EOF
10324 if { (eval echo configure:10325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10325   rm -rf conftest*
10326   eval "ac_cv_func_cthread_fork=yes"
10327 else
10328   echo "configure: failed program was:" >&5
10329   cat conftest.$ac_ext >&5
10330   rm -rf conftest*
10331   eval "ac_cv_func_cthread_fork=no"
10332 fi
10333 rm -f conftest*
10334 fi
10335
10336 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10337   echo "$ac_t""yes" 1>&6
10338   ol_link_threads=yes
10339 else
10340   echo "$ac_t""no" 1>&6
10341 fi
10342
10343
10344                 if test $ol_link_threads = no ; then
10345                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10346 echo "configure:10347: checking for cthread_fork with -all_load" >&5
10347 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10348   echo $ac_n "(cached) $ac_c" 1>&6
10349 else
10350   
10351                                                                 save_LIBS="$LIBS"
10352                                 LIBS="-all_load $LIBS"
10353                                 cat > conftest.$ac_ext <<EOF
10354 #line 10355 "configure"
10355 #include "confdefs.h"
10356 #include <mach/cthreads.h>
10357 int main() {
10358
10359                                         cthread_fork((void *)0, (void *)0);
10360                                         
10361 ; return 0; }
10362 EOF
10363 if { (eval echo configure:10364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10364   rm -rf conftest*
10365   ol_cv_cthread_all_load=yes
10366 else
10367   echo "configure: failed program was:" >&5
10368   cat conftest.$ac_ext >&5
10369   rm -rf conftest*
10370   ol_cv_cthread_all_load=no
10371 fi
10372 rm -f conftest*
10373                                                                 LIBS="$save_LIBS"
10374                         
10375 fi
10376
10377 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10378
10379                         if test $ol_cv_cthread_all_load = yes ; then
10380                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10381                                 ol_link_threads=mach
10382                         fi
10383                 fi
10384
10385                 if test $ol_link_threads != no ; then
10386                         : check for cthread specific functionality here
10387                         cat >> confdefs.h <<\EOF
10388 #define HAVE_MACH_CTHREADS 1
10389 EOF
10390
10391                 else
10392                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10393                 fi
10394         fi
10395
10396         if test $ol_with_threads = mach ; then
10397                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10398         fi
10399 fi
10400
10401 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10402         -o $ol_with_threads = pth ; then
10403
10404         for ac_hdr in pth.h
10405 do
10406 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10407 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10408 echo "configure:10409: checking for $ac_hdr" >&5
10409 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10410   echo $ac_n "(cached) $ac_c" 1>&6
10411 else
10412   cat > conftest.$ac_ext <<EOF
10413 #line 10414 "configure"
10414 #include "confdefs.h"
10415 #include <$ac_hdr>
10416 EOF
10417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10418 { (eval echo configure:10419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10419 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10420 if test -z "$ac_err"; then
10421   rm -rf conftest*
10422   eval "ac_cv_header_$ac_safe=yes"
10423 else
10424   echo "$ac_err" >&5
10425   echo "configure: failed program was:" >&5
10426   cat conftest.$ac_ext >&5
10427   rm -rf conftest*
10428   eval "ac_cv_header_$ac_safe=no"
10429 fi
10430 rm -f conftest*
10431 fi
10432 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10433   echo "$ac_t""yes" 1>&6
10434     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10435   cat >> confdefs.h <<EOF
10436 #define $ac_tr_hdr 1
10437 EOF
10438  
10439 else
10440   echo "$ac_t""no" 1>&6
10441 fi
10442 done
10443
10444
10445         if test $ac_cv_header_pth_h = yes ; then
10446                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10447 echo "configure:10448: checking for pth_version in -lpth" >&5
10448 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10449 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10450   echo $ac_n "(cached) $ac_c" 1>&6
10451 else
10452   ac_save_LIBS="$LIBS"
10453 LIBS="-lpth  $LIBS"
10454 cat > conftest.$ac_ext <<EOF
10455 #line 10456 "configure"
10456 #include "confdefs.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 pth_version();
10461
10462 int main() {
10463 pth_version()
10464 ; return 0; }
10465 EOF
10466 if { (eval echo configure:10467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10467   rm -rf conftest*
10468   eval "ac_cv_lib_$ac_lib_var=yes"
10469 else
10470   echo "configure: failed program was:" >&5
10471   cat conftest.$ac_ext >&5
10472   rm -rf conftest*
10473   eval "ac_cv_lib_$ac_lib_var=no"
10474 fi
10475 rm -f conftest*
10476 LIBS="$ac_save_LIBS"
10477
10478 fi
10479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10480   echo "$ac_t""yes" 1>&6
10481   have_pth=yes
10482 else
10483   echo "$ac_t""no" 1>&6
10484 have_pth=no
10485 fi
10486
10487
10488                 if test $have_pth = yes ; then
10489                         cat >> confdefs.h <<\EOF
10490 #define HAVE_GNU_PTH 1
10491 EOF
10492
10493                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10494                         ol_link_threads=pth
10495
10496                         if test $ol_with_yielding_select = auto ; then
10497                                 ol_with_yielding_select=yes
10498                         fi
10499                 fi
10500         fi
10501 fi
10502
10503 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10504         -o $ol_with_threads = lwp ; then
10505
10506                 for ac_hdr in thread.h synch.h
10507 do
10508 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10509 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10510 echo "configure:10511: checking for $ac_hdr" >&5
10511 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10512   echo $ac_n "(cached) $ac_c" 1>&6
10513 else
10514   cat > conftest.$ac_ext <<EOF
10515 #line 10516 "configure"
10516 #include "confdefs.h"
10517 #include <$ac_hdr>
10518 EOF
10519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10520 { (eval echo configure:10521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10522 if test -z "$ac_err"; then
10523   rm -rf conftest*
10524   eval "ac_cv_header_$ac_safe=yes"
10525 else
10526   echo "$ac_err" >&5
10527   echo "configure: failed program was:" >&5
10528   cat conftest.$ac_ext >&5
10529   rm -rf conftest*
10530   eval "ac_cv_header_$ac_safe=no"
10531 fi
10532 rm -f conftest*
10533 fi
10534 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10535   echo "$ac_t""yes" 1>&6
10536     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10537   cat >> confdefs.h <<EOF
10538 #define $ac_tr_hdr 1
10539 EOF
10540  
10541 else
10542   echo "$ac_t""no" 1>&6
10543 fi
10544 done
10545
10546         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10547                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10548 echo "configure:10549: checking for thr_create in -lthread" >&5
10549 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10551   echo $ac_n "(cached) $ac_c" 1>&6
10552 else
10553   ac_save_LIBS="$LIBS"
10554 LIBS="-lthread  $LIBS"
10555 cat > conftest.$ac_ext <<EOF
10556 #line 10557 "configure"
10557 #include "confdefs.h"
10558 /* Override any gcc2 internal prototype to avoid an error.  */
10559 /* We use char because int might match the return type of a gcc2
10560     builtin and then its argument prototype would still apply.  */
10561 char thr_create();
10562
10563 int main() {
10564 thr_create()
10565 ; return 0; }
10566 EOF
10567 if { (eval echo configure:10568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10568   rm -rf conftest*
10569   eval "ac_cv_lib_$ac_lib_var=yes"
10570 else
10571   echo "configure: failed program was:" >&5
10572   cat conftest.$ac_ext >&5
10573   rm -rf conftest*
10574   eval "ac_cv_lib_$ac_lib_var=no"
10575 fi
10576 rm -f conftest*
10577 LIBS="$ac_save_LIBS"
10578
10579 fi
10580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10581   echo "$ac_t""yes" 1>&6
10582   have_thr=yes
10583 else
10584   echo "$ac_t""no" 1>&6
10585 have_thr=no
10586 fi
10587
10588
10589                 if test $have_thr = yes ; then
10590                         cat >> confdefs.h <<\EOF
10591 #define HAVE_THR 1
10592 EOF
10593
10594                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10595                         ol_link_threads=thr
10596
10597                         if test $ol_with_yielding_select = auto ; then
10598                                 ol_with_yielding_select=yes
10599                         fi
10600
10601                                                 for ac_func in \
10602                                 thr_setconcurrency \
10603                                 thr_getconcurrency \
10604                         
10605 do
10606 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10607 echo "configure:10608: checking for $ac_func" >&5
10608 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10609   echo $ac_n "(cached) $ac_c" 1>&6
10610 else
10611   cat > conftest.$ac_ext <<EOF
10612 #line 10613 "configure"
10613 #include "confdefs.h"
10614 /* System header to define __stub macros and hopefully few prototypes,
10615     which can conflict with char $ac_func(); below.  */
10616 #include <assert.h>
10617 /* Override any gcc2 internal prototype to avoid an error.  */
10618 /* We use char because int might match the return type of a gcc2
10619     builtin and then its argument prototype would still apply.  */
10620 char $ac_func();
10621 char (*f)();
10622
10623 int main() {
10624
10625 /* The GNU C library defines this for functions which it implements
10626     to always fail with ENOSYS.  Some functions are actually named
10627     something starting with __ and the normal name is an alias.  */
10628 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10629 choke me
10630 #else
10631 f = $ac_func;
10632 #endif
10633
10634 ; return 0; }
10635 EOF
10636 if { (eval echo configure:10637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10637   rm -rf conftest*
10638   eval "ac_cv_func_$ac_func=yes"
10639 else
10640   echo "configure: failed program was:" >&5
10641   cat conftest.$ac_ext >&5
10642   rm -rf conftest*
10643   eval "ac_cv_func_$ac_func=no"
10644 fi
10645 rm -f conftest*
10646 fi
10647
10648 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10649   echo "$ac_t""yes" 1>&6
10650     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10651   cat >> confdefs.h <<EOF
10652 #define $ac_tr_func 1
10653 EOF
10654  
10655 else
10656   echo "$ac_t""no" 1>&6
10657 fi
10658 done
10659
10660                 fi
10661         fi
10662
10663                 for ac_hdr in lwp/lwp.h
10664 do
10665 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10666 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10667 echo "configure:10668: checking for $ac_hdr" >&5
10668 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10669   echo $ac_n "(cached) $ac_c" 1>&6
10670 else
10671   cat > conftest.$ac_ext <<EOF
10672 #line 10673 "configure"
10673 #include "confdefs.h"
10674 #include <$ac_hdr>
10675 EOF
10676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10677 { (eval echo configure:10678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10679 if test -z "$ac_err"; then
10680   rm -rf conftest*
10681   eval "ac_cv_header_$ac_safe=yes"
10682 else
10683   echo "$ac_err" >&5
10684   echo "configure: failed program was:" >&5
10685   cat conftest.$ac_ext >&5
10686   rm -rf conftest*
10687   eval "ac_cv_header_$ac_safe=no"
10688 fi
10689 rm -f conftest*
10690 fi
10691 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10692   echo "$ac_t""yes" 1>&6
10693     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10694   cat >> confdefs.h <<EOF
10695 #define $ac_tr_hdr 1
10696 EOF
10697  
10698 else
10699   echo "$ac_t""no" 1>&6
10700 fi
10701 done
10702
10703         if test $ac_cv_header_lwp_lwp_h = yes ; then
10704                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10705 echo "configure:10706: checking for lwp_create in -llwp" >&5
10706 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10707 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10708   echo $ac_n "(cached) $ac_c" 1>&6
10709 else
10710   ac_save_LIBS="$LIBS"
10711 LIBS="-llwp  $LIBS"
10712 cat > conftest.$ac_ext <<EOF
10713 #line 10714 "configure"
10714 #include "confdefs.h"
10715 /* Override any gcc2 internal prototype to avoid an error.  */
10716 /* We use char because int might match the return type of a gcc2
10717     builtin and then its argument prototype would still apply.  */
10718 char lwp_create();
10719
10720 int main() {
10721 lwp_create()
10722 ; return 0; }
10723 EOF
10724 if { (eval echo configure:10725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10725   rm -rf conftest*
10726   eval "ac_cv_lib_$ac_lib_var=yes"
10727 else
10728   echo "configure: failed program was:" >&5
10729   cat conftest.$ac_ext >&5
10730   rm -rf conftest*
10731   eval "ac_cv_lib_$ac_lib_var=no"
10732 fi
10733 rm -f conftest*
10734 LIBS="$ac_save_LIBS"
10735
10736 fi
10737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10738   echo "$ac_t""yes" 1>&6
10739   have_lwp=yes
10740 else
10741   echo "$ac_t""no" 1>&6
10742 have_lwp=no
10743 fi
10744
10745
10746                 if test $have_lwp = yes ; then
10747                         cat >> confdefs.h <<\EOF
10748 #define HAVE_LWP 1
10749 EOF
10750
10751                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10752                         ol_link_threads=lwp
10753
10754                         if test $ol_with_yielding_select = auto ; then
10755                                 ol_with_yielding_select=no
10756                         fi
10757                 fi
10758         fi
10759 fi
10760
10761 if test $ol_with_yielding_select = yes ; then
10762         cat >> confdefs.h <<\EOF
10763 #define HAVE_YIELDING_SELECT 1
10764 EOF
10765
10766 fi
10767
10768 if test $ol_with_threads = manual ; then
10769                 ol_link_threads=yes
10770
10771         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10772
10773         for ac_hdr in pthread.h sched.h
10774 do
10775 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10776 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10777 echo "configure:10778: checking for $ac_hdr" >&5
10778 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10779   echo $ac_n "(cached) $ac_c" 1>&6
10780 else
10781   cat > conftest.$ac_ext <<EOF
10782 #line 10783 "configure"
10783 #include "confdefs.h"
10784 #include <$ac_hdr>
10785 EOF
10786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10787 { (eval echo configure:10788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10789 if test -z "$ac_err"; then
10790   rm -rf conftest*
10791   eval "ac_cv_header_$ac_safe=yes"
10792 else
10793   echo "$ac_err" >&5
10794   echo "configure: failed program was:" >&5
10795   cat conftest.$ac_ext >&5
10796   rm -rf conftest*
10797   eval "ac_cv_header_$ac_safe=no"
10798 fi
10799 rm -f conftest*
10800 fi
10801 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10802   echo "$ac_t""yes" 1>&6
10803     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10804   cat >> confdefs.h <<EOF
10805 #define $ac_tr_hdr 1
10806 EOF
10807  
10808 else
10809   echo "$ac_t""no" 1>&6
10810 fi
10811 done
10812
10813         for ac_func in sched_yield pthread_yield
10814 do
10815 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10816 echo "configure:10817: checking for $ac_func" >&5
10817 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10818   echo $ac_n "(cached) $ac_c" 1>&6
10819 else
10820   cat > conftest.$ac_ext <<EOF
10821 #line 10822 "configure"
10822 #include "confdefs.h"
10823 /* System header to define __stub macros and hopefully few prototypes,
10824     which can conflict with char $ac_func(); below.  */
10825 #include <assert.h>
10826 /* Override any gcc2 internal prototype to avoid an error.  */
10827 /* We use char because int might match the return type of a gcc2
10828     builtin and then its argument prototype would still apply.  */
10829 char $ac_func();
10830 char (*f)();
10831
10832 int main() {
10833
10834 /* The GNU C library defines this for functions which it implements
10835     to always fail with ENOSYS.  Some functions are actually named
10836     something starting with __ and the normal name is an alias.  */
10837 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10838 choke me
10839 #else
10840 f = $ac_func;
10841 #endif
10842
10843 ; return 0; }
10844 EOF
10845 if { (eval echo configure:10846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10846   rm -rf conftest*
10847   eval "ac_cv_func_$ac_func=yes"
10848 else
10849   echo "configure: failed program was:" >&5
10850   cat conftest.$ac_ext >&5
10851   rm -rf conftest*
10852   eval "ac_cv_func_$ac_func=no"
10853 fi
10854 rm -f conftest*
10855 fi
10856
10857 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10858   echo "$ac_t""yes" 1>&6
10859     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10860   cat >> confdefs.h <<EOF
10861 #define $ac_tr_func 1
10862 EOF
10863  
10864 else
10865   echo "$ac_t""no" 1>&6
10866 fi
10867 done
10868
10869         
10870         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10871 echo "configure:10872: checking for LinuxThreads pthread.h" >&5
10872 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10873   echo $ac_n "(cached) $ac_c" 1>&6
10874 else
10875   cat > conftest.$ac_ext <<EOF
10876 #line 10877 "configure"
10877 #include "confdefs.h"
10878 #include <pthread.h>
10879 EOF
10880 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10881   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10882   rm -rf conftest*
10883   ol_cv_header_linux_threads=yes
10884 else
10885   rm -rf conftest*
10886   ol_cv_header_linux_threads=no
10887 fi
10888 rm -f conftest*
10889
10890                 
10891 fi
10892
10893 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10894         if test $ol_cv_header_linux_threads = yes; then
10895                 cat >> confdefs.h <<\EOF
10896 #define HAVE_LINUX_THREADS 1
10897 EOF
10898
10899         fi
10900
10901
10902         for ac_hdr in mach/cthreads.h
10903 do
10904 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10905 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10906 echo "configure:10907: checking for $ac_hdr" >&5
10907 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10908   echo $ac_n "(cached) $ac_c" 1>&6
10909 else
10910   cat > conftest.$ac_ext <<EOF
10911 #line 10912 "configure"
10912 #include "confdefs.h"
10913 #include <$ac_hdr>
10914 EOF
10915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10916 { (eval echo configure:10917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10918 if test -z "$ac_err"; then
10919   rm -rf conftest*
10920   eval "ac_cv_header_$ac_safe=yes"
10921 else
10922   echo "$ac_err" >&5
10923   echo "configure: failed program was:" >&5
10924   cat conftest.$ac_ext >&5
10925   rm -rf conftest*
10926   eval "ac_cv_header_$ac_safe=no"
10927 fi
10928 rm -f conftest*
10929 fi
10930 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10931   echo "$ac_t""yes" 1>&6
10932     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10933   cat >> confdefs.h <<EOF
10934 #define $ac_tr_hdr 1
10935 EOF
10936  
10937 else
10938   echo "$ac_t""no" 1>&6
10939 fi
10940 done
10941
10942         for ac_hdr in lwp/lwp.h
10943 do
10944 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10945 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10946 echo "configure:10947: checking for $ac_hdr" >&5
10947 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10948   echo $ac_n "(cached) $ac_c" 1>&6
10949 else
10950   cat > conftest.$ac_ext <<EOF
10951 #line 10952 "configure"
10952 #include "confdefs.h"
10953 #include <$ac_hdr>
10954 EOF
10955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10956 { (eval echo configure:10957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10958 if test -z "$ac_err"; then
10959   rm -rf conftest*
10960   eval "ac_cv_header_$ac_safe=yes"
10961 else
10962   echo "$ac_err" >&5
10963   echo "configure: failed program was:" >&5
10964   cat conftest.$ac_ext >&5
10965   rm -rf conftest*
10966   eval "ac_cv_header_$ac_safe=no"
10967 fi
10968 rm -f conftest*
10969 fi
10970 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10971   echo "$ac_t""yes" 1>&6
10972     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10973   cat >> confdefs.h <<EOF
10974 #define $ac_tr_hdr 1
10975 EOF
10976  
10977 else
10978   echo "$ac_t""no" 1>&6
10979 fi
10980 done
10981
10982         for ac_hdr in thread.h synch.h
10983 do
10984 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10985 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10986 echo "configure:10987: checking for $ac_hdr" >&5
10987 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   cat > conftest.$ac_ext <<EOF
10991 #line 10992 "configure"
10992 #include "confdefs.h"
10993 #include <$ac_hdr>
10994 EOF
10995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10996 { (eval echo configure:10997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10998 if test -z "$ac_err"; then
10999   rm -rf conftest*
11000   eval "ac_cv_header_$ac_safe=yes"
11001 else
11002   echo "$ac_err" >&5
11003   echo "configure: failed program was:" >&5
11004   cat conftest.$ac_ext >&5
11005   rm -rf conftest*
11006   eval "ac_cv_header_$ac_safe=no"
11007 fi
11008 rm -f conftest*
11009 fi
11010 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11011   echo "$ac_t""yes" 1>&6
11012     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11013   cat >> confdefs.h <<EOF
11014 #define $ac_tr_hdr 1
11015 EOF
11016  
11017 else
11018   echo "$ac_t""no" 1>&6
11019 fi
11020 done
11021
11022 fi
11023
11024 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11025                         cat >> confdefs.h <<\EOF
11026 #define REENTRANT 1
11027 EOF
11028
11029         cat >> confdefs.h <<\EOF
11030 #define _REENTRANT 1
11031 EOF
11032
11033         cat >> confdefs.h <<\EOF
11034 #define THREAD_SAFE 1
11035 EOF
11036
11037         cat >> confdefs.h <<\EOF
11038 #define _THREAD_SAFE 1
11039 EOF
11040
11041         cat >> confdefs.h <<\EOF
11042 #define THREADSAFE 1
11043 EOF
11044
11045         cat >> confdefs.h <<\EOF
11046 #define _THREADSAFE 1
11047 EOF
11048
11049         cat >> confdefs.h <<\EOF
11050 #define _SGI_MP_SOURCE 1
11051 EOF
11052
11053
11054                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11055 echo "configure:11056: checking for thread specific errno" >&5
11056 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11057   echo $ac_n "(cached) $ac_c" 1>&6
11058 else
11059   
11060                 cat > conftest.$ac_ext <<EOF
11061 #line 11062 "configure"
11062 #include "confdefs.h"
11063 #include <errno.h>
11064 int main() {
11065 errno = 0;
11066 ; return 0; }
11067 EOF
11068 if { (eval echo configure:11069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11069   rm -rf conftest*
11070   ol_cv_errno_thread_specific=yes
11071 else
11072   echo "configure: failed program was:" >&5
11073   cat conftest.$ac_ext >&5
11074   rm -rf conftest*
11075   ol_cv_errno_thread_specific=no
11076 fi
11077 rm -f conftest*
11078         
11079 fi
11080
11081 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11082
11083                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11084 echo "configure:11085: checking for thread specific h_errno" >&5
11085 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11086   echo $ac_n "(cached) $ac_c" 1>&6
11087 else
11088   
11089                 cat > conftest.$ac_ext <<EOF
11090 #line 11091 "configure"
11091 #include "confdefs.h"
11092 #include <netdb.h>
11093 int main() {
11094 h_errno = 0;
11095 ; return 0; }
11096 EOF
11097 if { (eval echo configure:11098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11098   rm -rf conftest*
11099   ol_cv_h_errno_thread_specific=yes
11100 else
11101   echo "configure: failed program was:" >&5
11102   cat conftest.$ac_ext >&5
11103   rm -rf conftest*
11104   ol_cv_h_errno_thread_specific=no
11105 fi
11106 rm -f conftest*
11107         
11108 fi
11109
11110 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11111
11112         if test $ol_cv_errno_thread_specific != yes \
11113                 -o $ol_cv_h_errno_thread_specific != yes ; then
11114                 LIBS="$LTHREAD_LIBS $LIBS"
11115                 LTHREAD_LIBS=""
11116         fi
11117
11118 fi  
11119
11120 if test $ol_link_threads = no ; then
11121         if test $ol_with_threads = yes ; then
11122                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11123         fi
11124
11125         if test $ol_with_threads = auto ; then
11126                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11127                 ol_with_threads=no
11128         fi
11129
11130         cat >> confdefs.h <<\EOF
11131 #define NO_THREADS 1
11132 EOF
11133
11134         LTHREAD_LIBS=""
11135 fi
11136
11137 if test $ol_link_threads != no ; then
11138         cat >> confdefs.h <<\EOF
11139 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11140 EOF
11141
11142 fi
11143
11144
11145 ol_link_ldbm=no 
11146 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
11147         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
11148 echo "configure:11149: checking for DB2 library" >&5
11149 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
11150   echo $ac_n "(cached) $ac_c" 1>&6
11151 else
11152         ol_LIBS="$LIBS"
11153         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
11154 echo "configure:11155: checking for db_appexit in -ldb" >&5
11155 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
11156 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11157   echo $ac_n "(cached) $ac_c" 1>&6
11158 else
11159   ac_save_LIBS="$LIBS"
11160 LIBS="-ldb  $LIBS"
11161 cat > conftest.$ac_ext <<EOF
11162 #line 11163 "configure"
11163 #include "confdefs.h"
11164 /* Override any gcc2 internal prototype to avoid an error.  */
11165 /* We use char because int might match the return type of a gcc2
11166     builtin and then its argument prototype would still apply.  */
11167 char db_appexit();
11168
11169 int main() {
11170 db_appexit()
11171 ; return 0; }
11172 EOF
11173 if { (eval echo configure:11174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11174   rm -rf conftest*
11175   eval "ac_cv_lib_$ac_lib_var=yes"
11176 else
11177   echo "configure: failed program was:" >&5
11178   cat conftest.$ac_ext >&5
11179   rm -rf conftest*
11180   eval "ac_cv_lib_$ac_lib_var=no"
11181 fi
11182 rm -f conftest*
11183 LIBS="$ac_save_LIBS"
11184
11185 fi
11186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11187   echo "$ac_t""yes" 1>&6
11188   ol_cv_lib_db2=-ldb
11189 else
11190   echo "$ac_t""no" 1>&6
11191 ol_cv_lib_db2=no
11192 fi
11193
11194         LIBS="$ol_LIBS"
11195
11196 fi
11197
11198 echo "$ac_t""$ol_cv_lib_db2" 1>&6
11199
11200 for ac_hdr in db.h
11201 do
11202 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11203 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11204 echo "configure:11205: checking for $ac_hdr" >&5
11205 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11206   echo $ac_n "(cached) $ac_c" 1>&6
11207 else
11208   cat > conftest.$ac_ext <<EOF
11209 #line 11210 "configure"
11210 #include "confdefs.h"
11211 #include <$ac_hdr>
11212 EOF
11213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11214 { (eval echo configure:11215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11216 if test -z "$ac_err"; then
11217   rm -rf conftest*
11218   eval "ac_cv_header_$ac_safe=yes"
11219 else
11220   echo "$ac_err" >&5
11221   echo "configure: failed program was:" >&5
11222   cat conftest.$ac_ext >&5
11223   rm -rf conftest*
11224   eval "ac_cv_header_$ac_safe=no"
11225 fi
11226 rm -f conftest*
11227 fi
11228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11229   echo "$ac_t""yes" 1>&6
11230     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11231   cat >> confdefs.h <<EOF
11232 #define $ac_tr_hdr 1
11233 EOF
11234  
11235 else
11236   echo "$ac_t""no" 1>&6
11237 fi
11238 done
11239
11240 if test $ac_cv_header_db_h = yes ; then
11241         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
11242 echo "configure:11243: checking if db.h is DB2" >&5
11243 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
11244   echo $ac_n "(cached) $ac_c" 1>&6
11245 else
11246   
11247                 cat > conftest.$ac_ext <<EOF
11248 #line 11249 "configure"
11249 #include "confdefs.h"
11250
11251 #                       include <db.h>
11252                         /* this check could be improved */
11253 #                       ifdef DB_VERSION_MAJOR
11254 #                               if DB_VERSION_MAJOR == 2
11255                                         __db_version_2;
11256 #                               endif
11257 #                       endif
11258                 
11259 EOF
11260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11261   egrep "__db_version_2" >/dev/null 2>&1; then
11262   rm -rf conftest*
11263   ol_cv_header_db2=yes
11264 else
11265   rm -rf conftest*
11266   ol_cv_header_db2=no
11267 fi
11268 rm -f conftest*
11269
11270 fi
11271
11272 echo "$ac_t""$ol_cv_header_db2" 1>&6
11273 else
11274         ol_cv_header_db2=no
11275 fi
11276
11277
11278  
11279  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
11280 echo "configure:11281: checking for Berkeley DB2" >&5
11281 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
11282   echo $ac_n "(cached) $ac_c" 1>&6
11283 else
11284   
11285         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
11286                 ol_cv_berkeley_db2=no
11287         else
11288                 ol_cv_berkeley_db2=yes
11289         fi
11290
11291 fi
11292
11293 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
11294  if test $ol_cv_berkeley_db2 = yes ; then
11295         cat >> confdefs.h <<\EOF
11296 #define HAVE_BERKELEY_DB2 1
11297 EOF
11298
11299  fi
11300
11301
11302         if test $ol_cv_berkeley_db2 = yes ; then
11303                 ol_link_ldbm=db2
11304                 ol_with_ldbm_api=db2
11305
11306                 if test $ol_with_ldbm_type = hash ; then
11307                         cat >> confdefs.h <<\EOF
11308 #define LDBM_USE_DBHASH 1
11309 EOF
11310
11311                 else
11312                         cat >> confdefs.h <<\EOF
11313 #define LDBM_USE_DBBTREE 1
11314 EOF
11315
11316                 fi
11317
11318                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11319 echo "configure:11320: checking for DB_THREAD support" >&5
11320 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
11321   echo $ac_n "(cached) $ac_c" 1>&6
11322 else
11323   
11324         ol_LIBS="$LIBS"
11325         if test $ol_cv_lib_db2 != yes ; then
11326                 LIBS="$ol_cv_lib_db2"
11327         fi
11328
11329         if test "$cross_compiling" = yes; then
11330   ol_cv_berkeley_db2_db_thread=cross
11331 else
11332   cat > conftest.$ac_ext <<EOF
11333 #line 11334 "configure"
11334 #include "confdefs.h"
11335
11336 #include <db.h>
11337 #ifndef NULL
11338 #define NULL ((void *)0)
11339 #endif
11340 main()
11341 {
11342         int rc;
11343         DB_ENV env;
11344         u_int32_t flags = DB_CREATE | DB_THREAD;
11345
11346         memset( &env, '\0', sizeof(env) );
11347
11348         rc = db_appinit( NULL, NULL, &env, flags );
11349
11350         if( rc == 0 ) {
11351                 db_appexit( &env );
11352         }
11353
11354         return rc;
11355 }
11356 EOF
11357 if { (eval echo configure:11358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11358 then
11359   ol_cv_berkeley_db2_db_thread=yes
11360 else
11361   echo "configure: failed program was:" >&5
11362   cat conftest.$ac_ext >&5
11363   rm -fr conftest*
11364   ol_cv_berkeley_db2_db_thread=no
11365 fi
11366 rm -fr conftest*
11367 fi
11368
11369
11370         LIBS="$ol_LIBS"
11371
11372         if test $ol_cv_berkeley_db2_db_thread != no ; then
11373                 cat >> confdefs.h <<\EOF
11374 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11375 EOF
11376
11377         fi
11378
11379 fi
11380
11381 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11382
11383                                                 if test $ol_cv_lib_db2 != yes ; then
11384                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11385                 fi
11386         fi
11387 fi
11388
11389 ol_link_bdb2=no
11390 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11391         if test $ol_cv_berkeley_db2_db_thread != no ; then
11392                 ol_link_bdb2=yes
11393         else
11394                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11395         fi
11396 fi
11397
11398 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11399         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11400 echo "configure:11401: checking for Berkeley DB library" >&5
11401 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11402   echo $ac_n "(cached) $ac_c" 1>&6
11403 else
11404   
11405         for ac_hdr in db1/db.h
11406 do
11407 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11408 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11409 echo "configure:11410: checking for $ac_hdr" >&5
11410 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11411   echo $ac_n "(cached) $ac_c" 1>&6
11412 else
11413   cat > conftest.$ac_ext <<EOF
11414 #line 11415 "configure"
11415 #include "confdefs.h"
11416 #include <$ac_hdr>
11417 EOF
11418 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11419 { (eval echo configure:11420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11420 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11421 if test -z "$ac_err"; then
11422   rm -rf conftest*
11423   eval "ac_cv_header_$ac_safe=yes"
11424 else
11425   echo "$ac_err" >&5
11426   echo "configure: failed program was:" >&5
11427   cat conftest.$ac_ext >&5
11428   rm -rf conftest*
11429   eval "ac_cv_header_$ac_safe=no"
11430 fi
11431 rm -f conftest*
11432 fi
11433 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11434   echo "$ac_t""yes" 1>&6
11435     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11436   cat >> confdefs.h <<EOF
11437 #define $ac_tr_hdr 1
11438 EOF
11439  
11440 else
11441   echo "$ac_t""no" 1>&6
11442 fi
11443 done
11444
11445         ol_LIBS="$LIBS"
11446         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11447 echo "configure:11448: checking for dbopen" >&5
11448 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11449   echo $ac_n "(cached) $ac_c" 1>&6
11450 else
11451   cat > conftest.$ac_ext <<EOF
11452 #line 11453 "configure"
11453 #include "confdefs.h"
11454 /* System header to define __stub macros and hopefully few prototypes,
11455     which can conflict with char dbopen(); below.  */
11456 #include <assert.h>
11457 /* Override any gcc2 internal prototype to avoid an error.  */
11458 /* We use char because int might match the return type of a gcc2
11459     builtin and then its argument prototype would still apply.  */
11460 char dbopen();
11461 char (*f)();
11462
11463 int main() {
11464
11465 /* The GNU C library defines this for functions which it implements
11466     to always fail with ENOSYS.  Some functions are actually named
11467     something starting with __ and the normal name is an alias.  */
11468 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11469 choke me
11470 #else
11471 f = dbopen;
11472 #endif
11473
11474 ; return 0; }
11475 EOF
11476 if { (eval echo configure:11477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11477   rm -rf conftest*
11478   eval "ac_cv_func_dbopen=yes"
11479 else
11480   echo "configure: failed program was:" >&5
11481   cat conftest.$ac_ext >&5
11482   rm -rf conftest*
11483   eval "ac_cv_func_dbopen=no"
11484 fi
11485 rm -f conftest*
11486 fi
11487
11488 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11489   echo "$ac_t""yes" 1>&6
11490   ol_cv_lib_db=yes
11491 else
11492   echo "$ac_t""no" 1>&6
11493
11494                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11495 echo "configure:11496: checking for dbopen in -ldb1" >&5
11496 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11497 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11498   echo $ac_n "(cached) $ac_c" 1>&6
11499 else
11500   ac_save_LIBS="$LIBS"
11501 LIBS="-ldb1  $LIBS"
11502 cat > conftest.$ac_ext <<EOF
11503 #line 11504 "configure"
11504 #include "confdefs.h"
11505 /* Override any gcc2 internal prototype to avoid an error.  */
11506 /* We use char because int might match the return type of a gcc2
11507     builtin and then its argument prototype would still apply.  */
11508 char dbopen();
11509
11510 int main() {
11511 dbopen()
11512 ; return 0; }
11513 EOF
11514 if { (eval echo configure:11515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11515   rm -rf conftest*
11516   eval "ac_cv_lib_$ac_lib_var=yes"
11517 else
11518   echo "configure: failed program was:" >&5
11519   cat conftest.$ac_ext >&5
11520   rm -rf conftest*
11521   eval "ac_cv_lib_$ac_lib_var=no"
11522 fi
11523 rm -f conftest*
11524 LIBS="$ac_save_LIBS"
11525
11526 fi
11527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11528   echo "$ac_t""yes" 1>&6
11529   ol_cv_lib_db=-ldb1
11530 else
11531   echo "$ac_t""no" 1>&6
11532
11533                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11534 echo "configure:11535: checking for dbopen in -ldb" >&5
11535 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11536 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11537   echo $ac_n "(cached) $ac_c" 1>&6
11538 else
11539   ac_save_LIBS="$LIBS"
11540 LIBS="-ldb  $LIBS"
11541 cat > conftest.$ac_ext <<EOF
11542 #line 11543 "configure"
11543 #include "confdefs.h"
11544 /* Override any gcc2 internal prototype to avoid an error.  */
11545 /* We use char because int might match the return type of a gcc2
11546     builtin and then its argument prototype would still apply.  */
11547 char dbopen();
11548
11549 int main() {
11550 dbopen()
11551 ; return 0; }
11552 EOF
11553 if { (eval echo configure:11554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11554   rm -rf conftest*
11555   eval "ac_cv_lib_$ac_lib_var=yes"
11556 else
11557   echo "configure: failed program was:" >&5
11558   cat conftest.$ac_ext >&5
11559   rm -rf conftest*
11560   eval "ac_cv_lib_$ac_lib_var=no"
11561 fi
11562 rm -f conftest*
11563 LIBS="$ac_save_LIBS"
11564
11565 fi
11566 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11567   echo "$ac_t""yes" 1>&6
11568   ol_cv_lib_db=-ldb
11569 else
11570   echo "$ac_t""no" 1>&6
11571 ol_cv_lib_db=no
11572 fi
11573
11574                 
11575 fi
11576
11577         
11578 fi
11579
11580         LIBS="$ol_LIBS"
11581
11582 fi
11583
11584 echo "$ac_t""$ol_cv_lib_db" 1>&6
11585
11586
11587 for ac_hdr in db_185.h
11588 do
11589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11591 echo "configure:11592: checking for $ac_hdr" >&5
11592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11593   echo $ac_n "(cached) $ac_c" 1>&6
11594 else
11595   cat > conftest.$ac_ext <<EOF
11596 #line 11597 "configure"
11597 #include "confdefs.h"
11598 #include <$ac_hdr>
11599 EOF
11600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11601 { (eval echo configure:11602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11603 if test -z "$ac_err"; then
11604   rm -rf conftest*
11605   eval "ac_cv_header_$ac_safe=yes"
11606 else
11607   echo "$ac_err" >&5
11608   echo "configure: failed program was:" >&5
11609   cat conftest.$ac_ext >&5
11610   rm -rf conftest*
11611   eval "ac_cv_header_$ac_safe=no"
11612 fi
11613 rm -f conftest*
11614 fi
11615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11616   echo "$ac_t""yes" 1>&6
11617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11618   cat >> confdefs.h <<EOF
11619 #define $ac_tr_hdr 1
11620 EOF
11621  
11622 else
11623   echo "$ac_t""no" 1>&6
11624 fi
11625 done
11626
11627 if test "$ol_cv_header_db2" = yes ; then
11628         
11629         ol_cv_header_db=$ac_cv_header_db_185_h
11630 else
11631         ol_cv_header_db=$ac_cv_header_db_h
11632 fi
11633
11634
11635  
11636  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11637 echo "configure:11638: checking for Berkeley DB" >&5
11638 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11639   echo $ac_n "(cached) $ac_c" 1>&6
11640 else
11641   
11642         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11643                 ol_cv_berkeley_db=no
11644         else
11645                 ol_cv_berkeley_db=yes
11646         fi
11647
11648 fi
11649
11650 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11651  if test $ol_cv_berkeley_db = yes ; then
11652         cat >> confdefs.h <<\EOF
11653 #define HAVE_BERKELEY_DB 1
11654 EOF
11655
11656  fi
11657
11658
11659         if test $ol_cv_berkeley_db = yes ; then
11660                 ol_link_ldbm=db
11661                 ol_with_ldbm_api=db
11662
11663                 if test $ol_with_ldbm_type = hash ; then
11664                         cat >> confdefs.h <<\EOF
11665 #define LDBM_USE_DBHASH 1
11666 EOF
11667
11668                 else
11669                         cat >> confdefs.h <<\EOF
11670 #define LDBM_USE_DBBTREE 1
11671 EOF
11672
11673                 fi
11674
11675                                                 if test $ol_cv_lib_db != yes ; then
11676                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11677                 fi
11678         fi
11679 fi
11680
11681 if test $ol_with_ldbm_api = manual ; then
11682                 ol_link_ldbm=yes
11683
11684         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11685
11686         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11687 do
11688 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11689 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11690 echo "configure:11691: checking for $ac_hdr" >&5
11691 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11692   echo $ac_n "(cached) $ac_c" 1>&6
11693 else
11694   cat > conftest.$ac_ext <<EOF
11695 #line 11696 "configure"
11696 #include "confdefs.h"
11697 #include <$ac_hdr>
11698 EOF
11699 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11700 { (eval echo configure:11701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11701 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11702 if test -z "$ac_err"; then
11703   rm -rf conftest*
11704   eval "ac_cv_header_$ac_safe=yes"
11705 else
11706   echo "$ac_err" >&5
11707   echo "configure: failed program was:" >&5
11708   cat conftest.$ac_ext >&5
11709   rm -rf conftest*
11710   eval "ac_cv_header_$ac_safe=no"
11711 fi
11712 rm -f conftest*
11713 fi
11714 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11715   echo "$ac_t""yes" 1>&6
11716     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11717   cat >> confdefs.h <<EOF
11718 #define $ac_tr_hdr 1
11719 EOF
11720  
11721 else
11722   echo "$ac_t""no" 1>&6
11723 fi
11724 done
11725
11726 fi
11727
11728 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11729         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11730         ol_with_ldbm_api=none
11731 fi
11732
11733 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11734         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11735 echo "configure:11736: checking for MDBM library" >&5
11736 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11737   echo $ac_n "(cached) $ac_c" 1>&6
11738 else
11739         ol_LIBS="$LIBS"
11740         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11741 echo "configure:11742: checking for mdbm_set_chain" >&5
11742 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11743   echo $ac_n "(cached) $ac_c" 1>&6
11744 else
11745   cat > conftest.$ac_ext <<EOF
11746 #line 11747 "configure"
11747 #include "confdefs.h"
11748 /* System header to define __stub macros and hopefully few prototypes,
11749     which can conflict with char mdbm_set_chain(); below.  */
11750 #include <assert.h>
11751 /* Override any gcc2 internal prototype to avoid an error.  */
11752 /* We use char because int might match the return type of a gcc2
11753     builtin and then its argument prototype would still apply.  */
11754 char mdbm_set_chain();
11755 char (*f)();
11756
11757 int main() {
11758
11759 /* The GNU C library defines this for functions which it implements
11760     to always fail with ENOSYS.  Some functions are actually named
11761     something starting with __ and the normal name is an alias.  */
11762 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11763 choke me
11764 #else
11765 f = mdbm_set_chain;
11766 #endif
11767
11768 ; return 0; }
11769 EOF
11770 if { (eval echo configure:11771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11771   rm -rf conftest*
11772   eval "ac_cv_func_mdbm_set_chain=yes"
11773 else
11774   echo "configure: failed program was:" >&5
11775   cat conftest.$ac_ext >&5
11776   rm -rf conftest*
11777   eval "ac_cv_func_mdbm_set_chain=no"
11778 fi
11779 rm -f conftest*
11780 fi
11781
11782 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11783   echo "$ac_t""yes" 1>&6
11784   ol_cv_lib_mdbm=yes
11785 else
11786   echo "$ac_t""no" 1>&6
11787
11788                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11789 echo "configure:11790: checking for mdbm_set_chain in -lmdbm" >&5
11790 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11791 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11792   echo $ac_n "(cached) $ac_c" 1>&6
11793 else
11794   ac_save_LIBS="$LIBS"
11795 LIBS="-lmdbm  $LIBS"
11796 cat > conftest.$ac_ext <<EOF
11797 #line 11798 "configure"
11798 #include "confdefs.h"
11799 /* Override any gcc2 internal prototype to avoid an error.  */
11800 /* We use char because int might match the return type of a gcc2
11801     builtin and then its argument prototype would still apply.  */
11802 char mdbm_set_chain();
11803
11804 int main() {
11805 mdbm_set_chain()
11806 ; return 0; }
11807 EOF
11808 if { (eval echo configure:11809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11809   rm -rf conftest*
11810   eval "ac_cv_lib_$ac_lib_var=yes"
11811 else
11812   echo "configure: failed program was:" >&5
11813   cat conftest.$ac_ext >&5
11814   rm -rf conftest*
11815   eval "ac_cv_lib_$ac_lib_var=no"
11816 fi
11817 rm -f conftest*
11818 LIBS="$ac_save_LIBS"
11819
11820 fi
11821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11822   echo "$ac_t""yes" 1>&6
11823   ol_cv_lib_mdbm=-lmdbm
11824 else
11825   echo "$ac_t""no" 1>&6
11826 ol_cv_lib_mdbm=no
11827 fi
11828
11829         
11830 fi
11831
11832         LIBS="$ol_LIBS"
11833
11834 fi
11835
11836 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11837
11838
11839  for ac_hdr in mdbm.h
11840 do
11841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11842 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11843 echo "configure:11844: checking for $ac_hdr" >&5
11844 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11845   echo $ac_n "(cached) $ac_c" 1>&6
11846 else
11847   cat > conftest.$ac_ext <<EOF
11848 #line 11849 "configure"
11849 #include "confdefs.h"
11850 #include <$ac_hdr>
11851 EOF
11852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11853 { (eval echo configure:11854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11855 if test -z "$ac_err"; then
11856   rm -rf conftest*
11857   eval "ac_cv_header_$ac_safe=yes"
11858 else
11859   echo "$ac_err" >&5
11860   echo "configure: failed program was:" >&5
11861   cat conftest.$ac_ext >&5
11862   rm -rf conftest*
11863   eval "ac_cv_header_$ac_safe=no"
11864 fi
11865 rm -f conftest*
11866 fi
11867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11868   echo "$ac_t""yes" 1>&6
11869     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11870   cat >> confdefs.h <<EOF
11871 #define $ac_tr_hdr 1
11872 EOF
11873  
11874 else
11875   echo "$ac_t""no" 1>&6
11876 fi
11877 done
11878
11879  echo $ac_n "checking for db""... $ac_c" 1>&6
11880 echo "configure:11881: checking for db" >&5
11881 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11882   echo $ac_n "(cached) $ac_c" 1>&6
11883 else
11884   
11885         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11886                 ol_cv_mdbm=no
11887         else
11888                 ol_cv_mdbm=yes
11889         fi
11890
11891 fi
11892
11893 echo "$ac_t""$ol_cv_mdbm" 1>&6
11894  if test $ol_cv_mdbm = yes ; then
11895         cat >> confdefs.h <<\EOF
11896 #define HAVE_MDBM 1
11897 EOF
11898
11899  fi
11900
11901
11902         if test $ol_cv_mdbm = yes ; then
11903                 ol_link_ldbm=mdbm
11904                 ol_with_ldbm_api=mdbm
11905                 if test $ol_cv_lib_mdbm != yes ; then
11906                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11907                 fi
11908         fi
11909 fi
11910
11911 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11912         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11913 echo "configure:11914: checking for GDBM library" >&5
11914 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11915   echo $ac_n "(cached) $ac_c" 1>&6
11916 else
11917         ol_LIBS="$LIBS"
11918         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11919 echo "configure:11920: checking for gdbm_open" >&5
11920 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11921   echo $ac_n "(cached) $ac_c" 1>&6
11922 else
11923   cat > conftest.$ac_ext <<EOF
11924 #line 11925 "configure"
11925 #include "confdefs.h"
11926 /* System header to define __stub macros and hopefully few prototypes,
11927     which can conflict with char gdbm_open(); below.  */
11928 #include <assert.h>
11929 /* Override any gcc2 internal prototype to avoid an error.  */
11930 /* We use char because int might match the return type of a gcc2
11931     builtin and then its argument prototype would still apply.  */
11932 char gdbm_open();
11933 char (*f)();
11934
11935 int main() {
11936
11937 /* The GNU C library defines this for functions which it implements
11938     to always fail with ENOSYS.  Some functions are actually named
11939     something starting with __ and the normal name is an alias.  */
11940 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11941 choke me
11942 #else
11943 f = gdbm_open;
11944 #endif
11945
11946 ; return 0; }
11947 EOF
11948 if { (eval echo configure:11949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11949   rm -rf conftest*
11950   eval "ac_cv_func_gdbm_open=yes"
11951 else
11952   echo "configure: failed program was:" >&5
11953   cat conftest.$ac_ext >&5
11954   rm -rf conftest*
11955   eval "ac_cv_func_gdbm_open=no"
11956 fi
11957 rm -f conftest*
11958 fi
11959
11960 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11961   echo "$ac_t""yes" 1>&6
11962   ol_cv_lib_gdbm=yes
11963 else
11964   echo "$ac_t""no" 1>&6
11965
11966                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11967 echo "configure:11968: checking for gdbm_open in -lgdbm" >&5
11968 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11969 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11970   echo $ac_n "(cached) $ac_c" 1>&6
11971 else
11972   ac_save_LIBS="$LIBS"
11973 LIBS="-lgdbm  $LIBS"
11974 cat > conftest.$ac_ext <<EOF
11975 #line 11976 "configure"
11976 #include "confdefs.h"
11977 /* Override any gcc2 internal prototype to avoid an error.  */
11978 /* We use char because int might match the return type of a gcc2
11979     builtin and then its argument prototype would still apply.  */
11980 char gdbm_open();
11981
11982 int main() {
11983 gdbm_open()
11984 ; return 0; }
11985 EOF
11986 if { (eval echo configure:11987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11987   rm -rf conftest*
11988   eval "ac_cv_lib_$ac_lib_var=yes"
11989 else
11990   echo "configure: failed program was:" >&5
11991   cat conftest.$ac_ext >&5
11992   rm -rf conftest*
11993   eval "ac_cv_lib_$ac_lib_var=no"
11994 fi
11995 rm -f conftest*
11996 LIBS="$ac_save_LIBS"
11997
11998 fi
11999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12000   echo "$ac_t""yes" 1>&6
12001   ol_cv_lib_gdbm=-lgdbm
12002 else
12003   echo "$ac_t""no" 1>&6
12004 ol_cv_lib_gdbm=no
12005 fi
12006
12007         
12008 fi
12009
12010         LIBS="$ol_LIBS"
12011
12012 fi
12013
12014 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12015
12016
12017  for ac_hdr in gdbm.h
12018 do
12019 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12020 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12021 echo "configure:12022: checking for $ac_hdr" >&5
12022 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12023   echo $ac_n "(cached) $ac_c" 1>&6
12024 else
12025   cat > conftest.$ac_ext <<EOF
12026 #line 12027 "configure"
12027 #include "confdefs.h"
12028 #include <$ac_hdr>
12029 EOF
12030 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12031 { (eval echo configure:12032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12032 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12033 if test -z "$ac_err"; then
12034   rm -rf conftest*
12035   eval "ac_cv_header_$ac_safe=yes"
12036 else
12037   echo "$ac_err" >&5
12038   echo "configure: failed program was:" >&5
12039   cat conftest.$ac_ext >&5
12040   rm -rf conftest*
12041   eval "ac_cv_header_$ac_safe=no"
12042 fi
12043 rm -f conftest*
12044 fi
12045 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12046   echo "$ac_t""yes" 1>&6
12047     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12048   cat >> confdefs.h <<EOF
12049 #define $ac_tr_hdr 1
12050 EOF
12051  
12052 else
12053   echo "$ac_t""no" 1>&6
12054 fi
12055 done
12056
12057  echo $ac_n "checking for db""... $ac_c" 1>&6
12058 echo "configure:12059: checking for db" >&5
12059 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12060   echo $ac_n "(cached) $ac_c" 1>&6
12061 else
12062   
12063         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12064                 ol_cv_gdbm=no
12065         else
12066                 ol_cv_gdbm=yes
12067         fi
12068
12069 fi
12070
12071 echo "$ac_t""$ol_cv_gdbm" 1>&6
12072  if test $ol_cv_gdbm = yes ; then
12073         cat >> confdefs.h <<\EOF
12074 #define HAVE_GDBM 1
12075 EOF
12076
12077  fi
12078
12079
12080         if test $ol_cv_gdbm = yes ; then
12081                 ol_link_ldbm=gdbm
12082                 ol_with_ldbm_api=gdbm
12083
12084                 if test $ol_cv_lib_gdbm != yes ; then
12085                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12086                 fi
12087         fi
12088 fi
12089
12090 if test $ol_with_ldbm_api = auto ; then
12091         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
12092 elif test $ol_with_ldbm_api = ndbm ; then
12093         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12094 echo "configure:12095: checking for NDBM library" >&5
12095 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12096   echo $ac_n "(cached) $ac_c" 1>&6
12097 else
12098         ol_LIBS="$LIBS"
12099         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12100 echo "configure:12101: checking for dbm_open" >&5
12101 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12102   echo $ac_n "(cached) $ac_c" 1>&6
12103 else
12104   cat > conftest.$ac_ext <<EOF
12105 #line 12106 "configure"
12106 #include "confdefs.h"
12107 /* System header to define __stub macros and hopefully few prototypes,
12108     which can conflict with char dbm_open(); below.  */
12109 #include <assert.h>
12110 /* Override any gcc2 internal prototype to avoid an error.  */
12111 /* We use char because int might match the return type of a gcc2
12112     builtin and then its argument prototype would still apply.  */
12113 char dbm_open();
12114 char (*f)();
12115
12116 int main() {
12117
12118 /* The GNU C library defines this for functions which it implements
12119     to always fail with ENOSYS.  Some functions are actually named
12120     something starting with __ and the normal name is an alias.  */
12121 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12122 choke me
12123 #else
12124 f = dbm_open;
12125 #endif
12126
12127 ; return 0; }
12128 EOF
12129 if { (eval echo configure:12130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12130   rm -rf conftest*
12131   eval "ac_cv_func_dbm_open=yes"
12132 else
12133   echo "configure: failed program was:" >&5
12134   cat conftest.$ac_ext >&5
12135   rm -rf conftest*
12136   eval "ac_cv_func_dbm_open=no"
12137 fi
12138 rm -f conftest*
12139 fi
12140
12141 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12142   echo "$ac_t""yes" 1>&6
12143   ol_cv_lib_ndbm=yes
12144 else
12145   echo "$ac_t""no" 1>&6
12146
12147                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12148 echo "configure:12149: checking for dbm_open in -lndbm" >&5
12149 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12151   echo $ac_n "(cached) $ac_c" 1>&6
12152 else
12153   ac_save_LIBS="$LIBS"
12154 LIBS="-lndbm  $LIBS"
12155 cat > conftest.$ac_ext <<EOF
12156 #line 12157 "configure"
12157 #include "confdefs.h"
12158 /* Override any gcc2 internal prototype to avoid an error.  */
12159 /* We use char because int might match the return type of a gcc2
12160     builtin and then its argument prototype would still apply.  */
12161 char dbm_open();
12162
12163 int main() {
12164 dbm_open()
12165 ; return 0; }
12166 EOF
12167 if { (eval echo configure:12168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12168   rm -rf conftest*
12169   eval "ac_cv_lib_$ac_lib_var=yes"
12170 else
12171   echo "configure: failed program was:" >&5
12172   cat conftest.$ac_ext >&5
12173   rm -rf conftest*
12174   eval "ac_cv_lib_$ac_lib_var=no"
12175 fi
12176 rm -f conftest*
12177 LIBS="$ac_save_LIBS"
12178
12179 fi
12180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12181   echo "$ac_t""yes" 1>&6
12182   ol_cv_lib_ndbm=-lndbm
12183 else
12184   echo "$ac_t""no" 1>&6
12185
12186                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12187 echo "configure:12188: checking for dbm_open in -ldbm" >&5
12188 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12189 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12190   echo $ac_n "(cached) $ac_c" 1>&6
12191 else
12192   ac_save_LIBS="$LIBS"
12193 LIBS="-ldbm  $LIBS"
12194 cat > conftest.$ac_ext <<EOF
12195 #line 12196 "configure"
12196 #include "confdefs.h"
12197 /* Override any gcc2 internal prototype to avoid an error.  */
12198 /* We use char because int might match the return type of a gcc2
12199     builtin and then its argument prototype would still apply.  */
12200 char dbm_open();
12201
12202 int main() {
12203 dbm_open()
12204 ; return 0; }
12205 EOF
12206 if { (eval echo configure:12207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12207   rm -rf conftest*
12208   eval "ac_cv_lib_$ac_lib_var=yes"
12209 else
12210   echo "configure: failed program was:" >&5
12211   cat conftest.$ac_ext >&5
12212   rm -rf conftest*
12213   eval "ac_cv_lib_$ac_lib_var=no"
12214 fi
12215 rm -f conftest*
12216 LIBS="$ac_save_LIBS"
12217
12218 fi
12219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12220   echo "$ac_t""yes" 1>&6
12221   ol_cv_lib_ndbm=-ldbm
12222 else
12223   echo "$ac_t""no" 1>&6
12224 ol_cv_lib_ndbm=no
12225 fi
12226                 
12227 fi
12228
12229         
12230 fi
12231
12232         LIBS="$ol_LIBS"
12233
12234 fi
12235
12236 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12237
12238
12239  for ac_hdr in ndbm.h
12240 do
12241 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12242 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12243 echo "configure:12244: checking for $ac_hdr" >&5
12244 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12245   echo $ac_n "(cached) $ac_c" 1>&6
12246 else
12247   cat > conftest.$ac_ext <<EOF
12248 #line 12249 "configure"
12249 #include "confdefs.h"
12250 #include <$ac_hdr>
12251 EOF
12252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12253 { (eval echo configure:12254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12255 if test -z "$ac_err"; then
12256   rm -rf conftest*
12257   eval "ac_cv_header_$ac_safe=yes"
12258 else
12259   echo "$ac_err" >&5
12260   echo "configure: failed program was:" >&5
12261   cat conftest.$ac_ext >&5
12262   rm -rf conftest*
12263   eval "ac_cv_header_$ac_safe=no"
12264 fi
12265 rm -f conftest*
12266 fi
12267 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12268   echo "$ac_t""yes" 1>&6
12269     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12270   cat >> confdefs.h <<EOF
12271 #define $ac_tr_hdr 1
12272 EOF
12273  
12274 else
12275   echo "$ac_t""no" 1>&6
12276 fi
12277 done
12278
12279  echo $ac_n "checking for db""... $ac_c" 1>&6
12280 echo "configure:12281: checking for db" >&5
12281 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12282   echo $ac_n "(cached) $ac_c" 1>&6
12283 else
12284   
12285         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12286                 ol_cv_ndbm=no
12287         else
12288                 ol_cv_ndbm=yes
12289         fi
12290
12291 fi
12292
12293 echo "$ac_t""$ol_cv_ndbm" 1>&6
12294  if test $ol_cv_ndbm = yes ; then
12295         cat >> confdefs.h <<\EOF
12296 #define HAVE_NDBM 1
12297 EOF
12298
12299  fi
12300
12301
12302         if test $ol_cv_ndbm = yes ; then
12303                 ol_link_ldbm=ndbm
12304                 ol_with_ldbm_api=ndbm
12305
12306                 if test $ol_cv_lib_ndbm != yes ; then
12307                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12308                 fi
12309         fi
12310 fi
12311
12312 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12313         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12314         if test $ol_enable_ldbm = yes ; then
12315                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12316         fi
12317
12318         echo "configure: warning: disabling LDBM" 1>&2
12319         ol_enable_ldbm=no
12320 fi
12321
12322 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12323         LINK_BINS_DYNAMIC="yes"
12324 else
12325         LINK_BINS_DYNAMIC="no"
12326 fi
12327
12328 if test $ol_enable_wrappers != no ; then
12329         for ac_hdr in tcpd.h
12330 do
12331 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12332 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12333 echo "configure:12334: checking for $ac_hdr" >&5
12334 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12335   echo $ac_n "(cached) $ac_c" 1>&6
12336 else
12337   cat > conftest.$ac_ext <<EOF
12338 #line 12339 "configure"
12339 #include "confdefs.h"
12340 #include <$ac_hdr>
12341 EOF
12342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12343 { (eval echo configure:12344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12345 if test -z "$ac_err"; then
12346   rm -rf conftest*
12347   eval "ac_cv_header_$ac_safe=yes"
12348 else
12349   echo "$ac_err" >&5
12350   echo "configure: failed program was:" >&5
12351   cat conftest.$ac_ext >&5
12352   rm -rf conftest*
12353   eval "ac_cv_header_$ac_safe=no"
12354 fi
12355 rm -f conftest*
12356 fi
12357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12358   echo "$ac_t""yes" 1>&6
12359     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12360   cat >> confdefs.h <<EOF
12361 #define $ac_tr_hdr 1
12362 EOF
12363  
12364 else
12365   echo "$ac_t""no" 1>&6
12366 fi
12367 done
12368
12369
12370         if test $ac_cv_header_tcpd_h != yes ; then
12371                 have_wrappers=no
12372         else
12373                 cat > conftest.$ac_ext <<EOF
12374 #line 12375 "configure"
12375 #include "confdefs.h"
12376
12377 int allow_severity = 0;
12378 int deny_severity  = 0;
12379                 
12380 int main() {
12381 hosts_access()
12382 ; return 0; }
12383 EOF
12384 if { (eval echo configure:12385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12385   rm -rf conftest*
12386   have_wrappers=yes
12387 else
12388   echo "configure: failed program was:" >&5
12389   cat conftest.$ac_ext >&5
12390   rm -rf conftest*
12391   have_wrappers=no
12392 fi
12393 rm -f conftest*
12394         fi
12395
12396         if test $have_wrappers = yes ; then
12397                 cat >> confdefs.h <<\EOF
12398 #define HAVE_TCPD 1
12399 EOF
12400
12401                 WRAP_LIBS="-lwrap"
12402
12403                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12404 echo "configure:12405: checking for main in -lnsl" >&5
12405 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12406 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12407   echo $ac_n "(cached) $ac_c" 1>&6
12408 else
12409   ac_save_LIBS="$LIBS"
12410 LIBS="-lnsl  $LIBS"
12411 cat > conftest.$ac_ext <<EOF
12412 #line 12413 "configure"
12413 #include "confdefs.h"
12414
12415 int main() {
12416 main()
12417 ; return 0; }
12418 EOF
12419 if { (eval echo configure:12420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12420   rm -rf conftest*
12421   eval "ac_cv_lib_$ac_lib_var=yes"
12422 else
12423   echo "configure: failed program was:" >&5
12424   cat conftest.$ac_ext >&5
12425   rm -rf conftest*
12426   eval "ac_cv_lib_$ac_lib_var=no"
12427 fi
12428 rm -f conftest*
12429 LIBS="$ac_save_LIBS"
12430
12431 fi
12432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12433   echo "$ac_t""yes" 1>&6
12434     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12435     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12436   cat >> confdefs.h <<EOF
12437 #define $ac_tr_lib 1
12438 EOF
12439
12440   LIBS="-lnsl $LIBS"
12441
12442 else
12443   echo "$ac_t""no" 1>&6
12444 fi
12445
12446         else
12447                 echo "configure: warning: could not find -lwrap" 1>&2
12448                 if test $ol_enable_wrappers = yes ; then
12449                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12450                 fi
12451
12452                 echo "configure: warning: disabling wrappers support" 1>&2
12453                 ol_enable_wrappers=no
12454                 WRAP_LIBS=""
12455         fi
12456 fi
12457
12458 if test $ol_enable_syslog != no ; then
12459         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12460 echo "configure:12461: checking for openlog" >&5
12461 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12462   echo $ac_n "(cached) $ac_c" 1>&6
12463 else
12464   cat > conftest.$ac_ext <<EOF
12465 #line 12466 "configure"
12466 #include "confdefs.h"
12467 /* System header to define __stub macros and hopefully few prototypes,
12468     which can conflict with char openlog(); below.  */
12469 #include <assert.h>
12470 /* Override any gcc2 internal prototype to avoid an error.  */
12471 /* We use char because int might match the return type of a gcc2
12472     builtin and then its argument prototype would still apply.  */
12473 char openlog();
12474 char (*f)();
12475
12476 int main() {
12477
12478 /* The GNU C library defines this for functions which it implements
12479     to always fail with ENOSYS.  Some functions are actually named
12480     something starting with __ and the normal name is an alias.  */
12481 #if defined (__stub_openlog) || defined (__stub___openlog)
12482 choke me
12483 #else
12484 f = openlog;
12485 #endif
12486
12487 ; return 0; }
12488 EOF
12489 if { (eval echo configure:12490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12490   rm -rf conftest*
12491   eval "ac_cv_func_openlog=yes"
12492 else
12493   echo "configure: failed program was:" >&5
12494   cat conftest.$ac_ext >&5
12495   rm -rf conftest*
12496   eval "ac_cv_func_openlog=no"
12497 fi
12498 rm -f conftest*
12499 fi
12500
12501 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12502   echo "$ac_t""yes" 1>&6
12503   :
12504 else
12505   echo "$ac_t""no" 1>&6
12506 fi
12507
12508         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12509                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12510         fi
12511         ol_enable_syslog=$ac_cv_func_openlog
12512 fi
12513
12514 if test $ol_enable_dmalloc != no ; then
12515         for ac_hdr in dmalloc.h
12516 do
12517 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12518 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12519 echo "configure:12520: checking for $ac_hdr" >&5
12520 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12521   echo $ac_n "(cached) $ac_c" 1>&6
12522 else
12523   cat > conftest.$ac_ext <<EOF
12524 #line 12525 "configure"
12525 #include "confdefs.h"
12526 #include <$ac_hdr>
12527 EOF
12528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12529 { (eval echo configure:12530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12531 if test -z "$ac_err"; then
12532   rm -rf conftest*
12533   eval "ac_cv_header_$ac_safe=yes"
12534 else
12535   echo "$ac_err" >&5
12536   echo "configure: failed program was:" >&5
12537   cat conftest.$ac_ext >&5
12538   rm -rf conftest*
12539   eval "ac_cv_header_$ac_safe=no"
12540 fi
12541 rm -f conftest*
12542 fi
12543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12544   echo "$ac_t""yes" 1>&6
12545     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12546   cat >> confdefs.h <<EOF
12547 #define $ac_tr_hdr 1
12548 EOF
12549  
12550 else
12551   echo "$ac_t""no" 1>&6
12552 fi
12553 done
12554
12555         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12556 echo "configure:12557: checking for dmalloc_shutdown in -ldmalloc" >&5
12557 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12558 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12559   echo $ac_n "(cached) $ac_c" 1>&6
12560 else
12561   ac_save_LIBS="$LIBS"
12562 LIBS="-ldmalloc  $LIBS"
12563 cat > conftest.$ac_ext <<EOF
12564 #line 12565 "configure"
12565 #include "confdefs.h"
12566 /* Override any gcc2 internal prototype to avoid an error.  */
12567 /* We use char because int might match the return type of a gcc2
12568     builtin and then its argument prototype would still apply.  */
12569 char dmalloc_shutdown();
12570
12571 int main() {
12572 dmalloc_shutdown()
12573 ; return 0; }
12574 EOF
12575 if { (eval echo configure:12576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12576   rm -rf conftest*
12577   eval "ac_cv_lib_$ac_lib_var=yes"
12578 else
12579   echo "configure: failed program was:" >&5
12580   cat conftest.$ac_ext >&5
12581   rm -rf conftest*
12582   eval "ac_cv_lib_$ac_lib_var=no"
12583 fi
12584 rm -f conftest*
12585 LIBS="$ac_save_LIBS"
12586
12587 fi
12588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12589   echo "$ac_t""yes" 1>&6
12590     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12591     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12592   cat >> confdefs.h <<EOF
12593 #define $ac_tr_lib 1
12594 EOF
12595
12596   LIBS="-ldmalloc $LIBS"
12597
12598 else
12599   echo "$ac_t""no" 1>&6
12600 fi
12601
12602 fi
12603
12604 if test $ol_enable_tcl != no ; then
12605         for ac_hdr in tcl.h
12606 do
12607 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12608 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12609 echo "configure:12610: checking for $ac_hdr" >&5
12610 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12611   echo $ac_n "(cached) $ac_c" 1>&6
12612 else
12613   cat > conftest.$ac_ext <<EOF
12614 #line 12615 "configure"
12615 #include "confdefs.h"
12616 #include <$ac_hdr>
12617 EOF
12618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12619 { (eval echo configure:12620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12621 if test -z "$ac_err"; then
12622   rm -rf conftest*
12623   eval "ac_cv_header_$ac_safe=yes"
12624 else
12625   echo "$ac_err" >&5
12626   echo "configure: failed program was:" >&5
12627   cat conftest.$ac_ext >&5
12628   rm -rf conftest*
12629   eval "ac_cv_header_$ac_safe=no"
12630 fi
12631 rm -f conftest*
12632 fi
12633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12634   echo "$ac_t""yes" 1>&6
12635     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12636   cat >> confdefs.h <<EOF
12637 #define $ac_tr_hdr 1
12638 EOF
12639  
12640 else
12641   echo "$ac_t""no" 1>&6
12642 fi
12643 done
12644
12645
12646         if test $ac_cv_header_tcl_h != yes ; then
12647                 have_tcl=no
12648         else
12649                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12650                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12651 echo "configure:12652: checking for main in -l$lib" >&5
12652 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12654   echo $ac_n "(cached) $ac_c" 1>&6
12655 else
12656   ac_save_LIBS="$LIBS"
12657 LIBS="-l$lib  $LIBS"
12658 cat > conftest.$ac_ext <<EOF
12659 #line 12660 "configure"
12660 #include "confdefs.h"
12661
12662 int main() {
12663 main()
12664 ; return 0; }
12665 EOF
12666 if { (eval echo configure:12667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12667   rm -rf conftest*
12668   eval "ac_cv_lib_$ac_lib_var=yes"
12669 else
12670   echo "configure: failed program was:" >&5
12671   cat conftest.$ac_ext >&5
12672   rm -rf conftest*
12673   eval "ac_cv_lib_$ac_lib_var=no"
12674 fi
12675 rm -f conftest*
12676 LIBS="$ac_save_LIBS"
12677
12678 fi
12679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12680   echo "$ac_t""yes" 1>&6
12681   have_tcl=yes
12682                            if test x"$ol_with_tcl_module" = "xstatic" ; then
12683                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12684                            else
12685                                MOD_TCL_LIB="-l${lib}"
12686                            fi;break
12687 else
12688   echo "$ac_t""no" 1>&6
12689 have_tcl=no
12690 fi
12691
12692                 done
12693         fi
12694
12695         if test $have_tcl != yes ; then
12696                 echo "configure: warning: could not find -ltcl" 1>&2
12697                 if test $ol_enable_tcl = yes ; then
12698                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12699                 fi
12700
12701                 ol_enable_tcl=no
12702         fi
12703 fi
12704
12705 ol_link_termcap=no
12706 for ac_hdr in termcap.h ncurses.h
12707 do
12708 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12709 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12710 echo "configure:12711: checking for $ac_hdr" >&5
12711 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12712   echo $ac_n "(cached) $ac_c" 1>&6
12713 else
12714   cat > conftest.$ac_ext <<EOF
12715 #line 12716 "configure"
12716 #include "confdefs.h"
12717 #include <$ac_hdr>
12718 EOF
12719 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12720 { (eval echo configure:12721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12721 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12722 if test -z "$ac_err"; then
12723   rm -rf conftest*
12724   eval "ac_cv_header_$ac_safe=yes"
12725 else
12726   echo "$ac_err" >&5
12727   echo "configure: failed program was:" >&5
12728   cat conftest.$ac_ext >&5
12729   rm -rf conftest*
12730   eval "ac_cv_header_$ac_safe=no"
12731 fi
12732 rm -f conftest*
12733 fi
12734 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12735   echo "$ac_t""yes" 1>&6
12736     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12737   cat >> confdefs.h <<EOF
12738 #define $ac_tr_hdr 1
12739 EOF
12740  
12741 else
12742   echo "$ac_t""no" 1>&6
12743 fi
12744 done
12745
12746
12747 if test $ol_link_termcap = no ; then
12748         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12749 echo "configure:12750: checking for tputs in -ltermcap" >&5
12750 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12751 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12752   echo $ac_n "(cached) $ac_c" 1>&6
12753 else
12754   ac_save_LIBS="$LIBS"
12755 LIBS="-ltermcap  $LIBS"
12756 cat > conftest.$ac_ext <<EOF
12757 #line 12758 "configure"
12758 #include "confdefs.h"
12759 /* Override any gcc2 internal prototype to avoid an error.  */
12760 /* We use char because int might match the return type of a gcc2
12761     builtin and then its argument prototype would still apply.  */
12762 char tputs();
12763
12764 int main() {
12765 tputs()
12766 ; return 0; }
12767 EOF
12768 if { (eval echo configure:12769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12769   rm -rf conftest*
12770   eval "ac_cv_lib_$ac_lib_var=yes"
12771 else
12772   echo "configure: failed program was:" >&5
12773   cat conftest.$ac_ext >&5
12774   rm -rf conftest*
12775   eval "ac_cv_lib_$ac_lib_var=no"
12776 fi
12777 rm -f conftest*
12778 LIBS="$ac_save_LIBS"
12779
12780 fi
12781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12782   echo "$ac_t""yes" 1>&6
12783   have_termcap=yes
12784 else
12785   echo "$ac_t""no" 1>&6
12786 have_termcap=no
12787 fi
12788
12789         if test $have_termcap = yes ; then
12790                 cat >> confdefs.h <<\EOF
12791 #define HAVE_TERMCAP 1
12792 EOF
12793
12794                 ol_link_termcap=yes
12795                 TERMCAP_LIBS=-ltermcap
12796         fi
12797 fi
12798
12799 if test $ol_link_termcap = no ; then
12800         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12801 echo "configure:12802: checking for initscr in -lncurses" >&5
12802 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12803 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12804   echo $ac_n "(cached) $ac_c" 1>&6
12805 else
12806   ac_save_LIBS="$LIBS"
12807 LIBS="-lncurses  $LIBS"
12808 cat > conftest.$ac_ext <<EOF
12809 #line 12810 "configure"
12810 #include "confdefs.h"
12811 /* Override any gcc2 internal prototype to avoid an error.  */
12812 /* We use char because int might match the return type of a gcc2
12813     builtin and then its argument prototype would still apply.  */
12814 char initscr();
12815
12816 int main() {
12817 initscr()
12818 ; return 0; }
12819 EOF
12820 if { (eval echo configure:12821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12821   rm -rf conftest*
12822   eval "ac_cv_lib_$ac_lib_var=yes"
12823 else
12824   echo "configure: failed program was:" >&5
12825   cat conftest.$ac_ext >&5
12826   rm -rf conftest*
12827   eval "ac_cv_lib_$ac_lib_var=no"
12828 fi
12829 rm -f conftest*
12830 LIBS="$ac_save_LIBS"
12831
12832 fi
12833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12834   echo "$ac_t""yes" 1>&6
12835   have_ncurses=yes
12836 else
12837   echo "$ac_t""no" 1>&6
12838 have_ncurses=no
12839 fi
12840
12841         if test $have_ncurses = yes ; then
12842                 cat >> confdefs.h <<\EOF
12843 #define HAVE_NCURSES 1
12844 EOF
12845
12846                 ol_link_termcap=yes
12847                 TERMCAP_LIBS=-lncurses
12848         fi
12849 fi
12850
12851 if test $ol_link_termcap = no ; then
12852         cat >> confdefs.h <<\EOF
12853 #define NO_TERMCAP 1
12854 EOF
12855
12856         TERMCAP_LIBS=
12857 fi
12858
12859 ol_link_sasl=no
12860 if test $ol_with_cyrus_sasl != no ; then
12861         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12862 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12863 echo "configure:12864: checking for sasl.h" >&5
12864 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12865   echo $ac_n "(cached) $ac_c" 1>&6
12866 else
12867   cat > conftest.$ac_ext <<EOF
12868 #line 12869 "configure"
12869 #include "confdefs.h"
12870 #include <sasl.h>
12871 EOF
12872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12873 { (eval echo configure:12874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12875 if test -z "$ac_err"; then
12876   rm -rf conftest*
12877   eval "ac_cv_header_$ac_safe=yes"
12878 else
12879   echo "$ac_err" >&5
12880   echo "configure: failed program was:" >&5
12881   cat conftest.$ac_ext >&5
12882   rm -rf conftest*
12883   eval "ac_cv_header_$ac_safe=no"
12884 fi
12885 rm -f conftest*
12886 fi
12887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12888   echo "$ac_t""yes" 1>&6
12889   :
12890 else
12891   echo "$ac_t""no" 1>&6
12892 fi
12893
12894
12895         if test $ac_cv_header_sasl_h = yes ; then
12896                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12897 echo "configure:12898: checking for sasl_client_init in -lsasl" >&5
12898 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12899 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12900   echo $ac_n "(cached) $ac_c" 1>&6
12901 else
12902   ac_save_LIBS="$LIBS"
12903 LIBS="-lsasl  $LIBS"
12904 cat > conftest.$ac_ext <<EOF
12905 #line 12906 "configure"
12906 #include "confdefs.h"
12907 /* Override any gcc2 internal prototype to avoid an error.  */
12908 /* We use char because int might match the return type of a gcc2
12909     builtin and then its argument prototype would still apply.  */
12910 char sasl_client_init();
12911
12912 int main() {
12913 sasl_client_init()
12914 ; return 0; }
12915 EOF
12916 if { (eval echo configure:12917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12917   rm -rf conftest*
12918   eval "ac_cv_lib_$ac_lib_var=yes"
12919 else
12920   echo "configure: failed program was:" >&5
12921   cat conftest.$ac_ext >&5
12922   rm -rf conftest*
12923   eval "ac_cv_lib_$ac_lib_var=no"
12924 fi
12925 rm -f conftest*
12926 LIBS="$ac_save_LIBS"
12927
12928 fi
12929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12930   echo "$ac_t""yes" 1>&6
12931   have_cyrus_sasl=yes
12932 else
12933   echo "$ac_t""no" 1>&6
12934 have_cyrus_sasl=no
12935 fi
12936
12937
12938                 if test $have_cyrus_sasl != no ; then
12939                         SASL_LIBS="-lsasl"
12940                         cat >> confdefs.h <<\EOF
12941 #define HAVE_CYRUS_SASL 1
12942 EOF
12943
12944                         ol_link_sasl=yes
12945                 fi
12946         fi
12947
12948         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12949                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12950         fi
12951 fi
12952
12953 if test $cross_compiling != yes ; then
12954         dev=no
12955         if test -r /dev/urandom ; then
12956                 dev="/dev/urandom";
12957         elif test -r /idev/urandom ; then
12958                 dev="/idev/urandom";
12959         elif test -r /dev/srandom ; then
12960                 dev="/dev/srandom";
12961         elif test -r /dev/random ; then
12962                 dev="/dev/random";
12963         elif test -r /idev/random ; then
12964                 dev="/idev/random";
12965         fi
12966
12967         if test $dev != no ; then
12968                 cat >> confdefs.h <<EOF
12969 #define URANDOM_DEVICE "$dev"
12970 EOF
12971
12972         fi
12973 fi
12974
12975 ol_link_fetch=no
12976 if test $ol_with_fetch != no ; then
12977         ol=$LIBS
12978 LIBS="-lfetch -lcom_err $LIBS"
12979 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12980 echo "configure:12981: checking fetch(3) library" >&5
12981 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12982   echo $ac_n "(cached) $ac_c" 1>&6
12983 else
12984   
12985         cat > conftest.$ac_ext <<EOF
12986 #line 12987 "configure"
12987 #include "confdefs.h"
12988
12989 #include <sys/param.h>
12990 #include <stdio.h>
12991 #include <fetch.h>
12992 int main() {
12993 struct url *u = fetchParseURL("file:///"); 
12994 ; return 0; }
12995 EOF
12996 if { (eval echo configure:12997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12997   rm -rf conftest*
12998   ol_cv_lib_fetch=yes
12999 else
13000   echo "configure: failed program was:" >&5
13001   cat conftest.$ac_ext >&5
13002   rm -rf conftest*
13003   ol_cv_lib_fetch=no
13004 fi
13005 rm -f conftest*
13006 fi
13007
13008 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13009 LIBS=$ol_LIBS
13010 if test $ol_cv_lib_fetch != no ; then
13011         ol_link_fetch="-lfetch -lcom_err"
13012         cat >> confdefs.h <<\EOF
13013 #define HAVE_FETCH 1
13014 EOF
13015
13016 fi
13017
13018
13019         if test $ol_cv_lib_fetch != no ; then
13020                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13021                 ol_link_fetch=freebsd
13022
13023         elif test $ol_with_fetch != auto ; then
13024                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13025         fi 
13026 fi
13027
13028 ol_link_readline=no
13029 if test $ol_with_readline != no ; then
13030         for ac_hdr in readline/readline.h readline/history.h
13031 do
13032 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13033 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13034 echo "configure:13035: checking for $ac_hdr" >&5
13035 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13036   echo $ac_n "(cached) $ac_c" 1>&6
13037 else
13038   cat > conftest.$ac_ext <<EOF
13039 #line 13040 "configure"
13040 #include "confdefs.h"
13041 #include <$ac_hdr>
13042 EOF
13043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13044 { (eval echo configure:13045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13046 if test -z "$ac_err"; then
13047   rm -rf conftest*
13048   eval "ac_cv_header_$ac_safe=yes"
13049 else
13050   echo "$ac_err" >&5
13051   echo "configure: failed program was:" >&5
13052   cat conftest.$ac_ext >&5
13053   rm -rf conftest*
13054   eval "ac_cv_header_$ac_safe=no"
13055 fi
13056 rm -f conftest*
13057 fi
13058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13059   echo "$ac_t""yes" 1>&6
13060     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13061   cat >> confdefs.h <<EOF
13062 #define $ac_tr_hdr 1
13063 EOF
13064  
13065 else
13066   echo "$ac_t""no" 1>&6
13067 fi
13068 done
13069
13070
13071         if test $ac_cv_header_readline_readline_h = yes ; then
13072                 save_LIBS="$LIBS"
13073                 LIBS="$TERMCAP_LIBS $LIBS"
13074                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13075 echo "configure:13076: checking for readline in -lreadline" >&5
13076 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13077 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13078   echo $ac_n "(cached) $ac_c" 1>&6
13079 else
13080   ac_save_LIBS="$LIBS"
13081 LIBS="-lreadline  $LIBS"
13082 cat > conftest.$ac_ext <<EOF
13083 #line 13084 "configure"
13084 #include "confdefs.h"
13085 /* Override any gcc2 internal prototype to avoid an error.  */
13086 /* We use char because int might match the return type of a gcc2
13087     builtin and then its argument prototype would still apply.  */
13088 char readline();
13089
13090 int main() {
13091 readline()
13092 ; return 0; }
13093 EOF
13094 if { (eval echo configure:13095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13095   rm -rf conftest*
13096   eval "ac_cv_lib_$ac_lib_var=yes"
13097 else
13098   echo "configure: failed program was:" >&5
13099   cat conftest.$ac_ext >&5
13100   rm -rf conftest*
13101   eval "ac_cv_lib_$ac_lib_var=no"
13102 fi
13103 rm -f conftest*
13104 LIBS="$ac_save_LIBS"
13105
13106 fi
13107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13108   echo "$ac_t""yes" 1>&6
13109   have_readline=yes
13110 else
13111   echo "$ac_t""no" 1>&6
13112 have_readline=no
13113 fi
13114
13115                 LIBS="$save_LIBS"
13116                         
13117                 if test $have_readline = yes ; then
13118                         ol_with_readline=found
13119                         ol_link_readline=yes
13120
13121                         READLINE_LIBS="-lreadline"
13122                 fi
13123         fi
13124 fi
13125
13126 if test $ol_link_readline = yes ; then
13127         cat >> confdefs.h <<\EOF
13128 #define HAVE_READLINE 1
13129 EOF
13130
13131 fi
13132
13133
13134 if test $ol_enable_crypt != no ; then
13135         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13136 echo "configure:13137: checking for crypt" >&5
13137 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13138   echo $ac_n "(cached) $ac_c" 1>&6
13139 else
13140   cat > conftest.$ac_ext <<EOF
13141 #line 13142 "configure"
13142 #include "confdefs.h"
13143 /* System header to define __stub macros and hopefully few prototypes,
13144     which can conflict with char crypt(); below.  */
13145 #include <assert.h>
13146 /* Override any gcc2 internal prototype to avoid an error.  */
13147 /* We use char because int might match the return type of a gcc2
13148     builtin and then its argument prototype would still apply.  */
13149 char crypt();
13150 char (*f)();
13151
13152 int main() {
13153
13154 /* The GNU C library defines this for functions which it implements
13155     to always fail with ENOSYS.  Some functions are actually named
13156     something starting with __ and the normal name is an alias.  */
13157 #if defined (__stub_crypt) || defined (__stub___crypt)
13158 choke me
13159 #else
13160 f = crypt;
13161 #endif
13162
13163 ; return 0; }
13164 EOF
13165 if { (eval echo configure:13166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13166   rm -rf conftest*
13167   eval "ac_cv_func_crypt=yes"
13168 else
13169   echo "configure: failed program was:" >&5
13170   cat conftest.$ac_ext >&5
13171   rm -rf conftest*
13172   eval "ac_cv_func_crypt=no"
13173 fi
13174 rm -f conftest*
13175 fi
13176
13177 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13178   echo "$ac_t""yes" 1>&6
13179   have_crypt=yes
13180 else
13181   echo "$ac_t""no" 1>&6
13182
13183                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13184 echo "configure:13185: checking for crypt in -lcrypt" >&5
13185 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13186 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13187   echo $ac_n "(cached) $ac_c" 1>&6
13188 else
13189   ac_save_LIBS="$LIBS"
13190 LIBS="-lcrypt  $LIBS"
13191 cat > conftest.$ac_ext <<EOF
13192 #line 13193 "configure"
13193 #include "confdefs.h"
13194 /* Override any gcc2 internal prototype to avoid an error.  */
13195 /* We use char because int might match the return type of a gcc2
13196     builtin and then its argument prototype would still apply.  */
13197 char crypt();
13198
13199 int main() {
13200 crypt()
13201 ; return 0; }
13202 EOF
13203 if { (eval echo configure:13204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13204   rm -rf conftest*
13205   eval "ac_cv_lib_$ac_lib_var=yes"
13206 else
13207   echo "configure: failed program was:" >&5
13208   cat conftest.$ac_ext >&5
13209   rm -rf conftest*
13210   eval "ac_cv_lib_$ac_lib_var=no"
13211 fi
13212 rm -f conftest*
13213 LIBS="$ac_save_LIBS"
13214
13215 fi
13216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13217   echo "$ac_t""yes" 1>&6
13218   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13219                         have_crypt=yes
13220 else
13221   echo "$ac_t""no" 1>&6
13222 have_crypt=no
13223 fi
13224
13225 fi
13226
13227
13228         if test $have_crypt = yes ; then
13229                 cat >> confdefs.h <<\EOF
13230 #define HAVE_CRYPT 1
13231 EOF
13232
13233         else
13234                 echo "configure: warning: could not find crypt" 1>&2
13235                 if test $ol_enable_crypt = yes ; then
13236                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13237                 fi
13238
13239                 echo "configure: warning: disabling crypt support" 1>&2
13240                 ol_enable_crypt=no
13241         fi
13242 fi
13243
13244 if test $ol_enable_proctitle != no ; then
13245         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13246 echo "configure:13247: checking for setproctitle" >&5
13247 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13248   echo $ac_n "(cached) $ac_c" 1>&6
13249 else
13250   cat > conftest.$ac_ext <<EOF
13251 #line 13252 "configure"
13252 #include "confdefs.h"
13253 /* System header to define __stub macros and hopefully few prototypes,
13254     which can conflict with char setproctitle(); below.  */
13255 #include <assert.h>
13256 /* Override any gcc2 internal prototype to avoid an error.  */
13257 /* We use char because int might match the return type of a gcc2
13258     builtin and then its argument prototype would still apply.  */
13259 char setproctitle();
13260 char (*f)();
13261
13262 int main() {
13263
13264 /* The GNU C library defines this for functions which it implements
13265     to always fail with ENOSYS.  Some functions are actually named
13266     something starting with __ and the normal name is an alias.  */
13267 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13268 choke me
13269 #else
13270 f = setproctitle;
13271 #endif
13272
13273 ; return 0; }
13274 EOF
13275 if { (eval echo configure:13276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13276   rm -rf conftest*
13277   eval "ac_cv_func_setproctitle=yes"
13278 else
13279   echo "configure: failed program was:" >&5
13280   cat conftest.$ac_ext >&5
13281   rm -rf conftest*
13282   eval "ac_cv_func_setproctitle=no"
13283 fi
13284 rm -f conftest*
13285 fi
13286
13287 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13288   echo "$ac_t""yes" 1>&6
13289   have_setproctitle=yes
13290 else
13291   echo "$ac_t""no" 1>&6
13292
13293                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13294 echo "configure:13295: checking for setproctitle in -lutil" >&5
13295 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13296 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13297   echo $ac_n "(cached) $ac_c" 1>&6
13298 else
13299   ac_save_LIBS="$LIBS"
13300 LIBS="-lutil  $LIBS"
13301 cat > conftest.$ac_ext <<EOF
13302 #line 13303 "configure"
13303 #include "confdefs.h"
13304 /* Override any gcc2 internal prototype to avoid an error.  */
13305 /* We use char because int might match the return type of a gcc2
13306     builtin and then its argument prototype would still apply.  */
13307 char setproctitle();
13308
13309 int main() {
13310 setproctitle()
13311 ; return 0; }
13312 EOF
13313 if { (eval echo configure:13314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13314   rm -rf conftest*
13315   eval "ac_cv_lib_$ac_lib_var=yes"
13316 else
13317   echo "configure: failed program was:" >&5
13318   cat conftest.$ac_ext >&5
13319   rm -rf conftest*
13320   eval "ac_cv_lib_$ac_lib_var=no"
13321 fi
13322 rm -f conftest*
13323 LIBS="$ac_save_LIBS"
13324
13325 fi
13326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13327   echo "$ac_t""yes" 1>&6
13328   have_setproctitle=yes
13329                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13330 else
13331   echo "$ac_t""no" 1>&6
13332 have_setproctitle=no
13333                         LIBOBJS="$LIBOBJS setproctitle.o"
13334                         LIBSRCS="$LIBSRCS setproctitle.c"
13335 fi
13336
13337 fi
13338
13339
13340         if test $have_setproctitle = yes ; then
13341                 cat >> confdefs.h <<\EOF
13342 #define HAVE_SETPROCTITLE 1
13343 EOF
13344
13345         fi
13346 fi
13347
13348 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13349 echo "configure:13350: checking for ANSI C header files" >&5
13350 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13351   echo $ac_n "(cached) $ac_c" 1>&6
13352 else
13353   cat > conftest.$ac_ext <<EOF
13354 #line 13355 "configure"
13355 #include "confdefs.h"
13356 #include <stdlib.h>
13357 #include <stdarg.h>
13358 #include <string.h>
13359 #include <float.h>
13360 EOF
13361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13362 { (eval echo configure:13363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13364 if test -z "$ac_err"; then
13365   rm -rf conftest*
13366   ac_cv_header_stdc=yes
13367 else
13368   echo "$ac_err" >&5
13369   echo "configure: failed program was:" >&5
13370   cat conftest.$ac_ext >&5
13371   rm -rf conftest*
13372   ac_cv_header_stdc=no
13373 fi
13374 rm -f conftest*
13375
13376 if test $ac_cv_header_stdc = yes; then
13377   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13378 cat > conftest.$ac_ext <<EOF
13379 #line 13380 "configure"
13380 #include "confdefs.h"
13381 #include <string.h>
13382 EOF
13383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13384   egrep "memchr" >/dev/null 2>&1; then
13385   :
13386 else
13387   rm -rf conftest*
13388   ac_cv_header_stdc=no
13389 fi
13390 rm -f conftest*
13391
13392 fi
13393
13394 if test $ac_cv_header_stdc = yes; then
13395   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13396 cat > conftest.$ac_ext <<EOF
13397 #line 13398 "configure"
13398 #include "confdefs.h"
13399 #include <stdlib.h>
13400 EOF
13401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13402   egrep "free" >/dev/null 2>&1; then
13403   :
13404 else
13405   rm -rf conftest*
13406   ac_cv_header_stdc=no
13407 fi
13408 rm -f conftest*
13409
13410 fi
13411
13412 if test $ac_cv_header_stdc = yes; then
13413   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13414 if test "$cross_compiling" = yes; then
13415   :
13416 else
13417   cat > conftest.$ac_ext <<EOF
13418 #line 13419 "configure"
13419 #include "confdefs.h"
13420 #include <ctype.h>
13421 #if ((' ' & 0x0FF) == 0x020)
13422 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13423 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13424 #else
13425 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13426  || ('j' <= (c) && (c) <= 'r') \
13427  || ('s' <= (c) && (c) <= 'z'))
13428 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13429 #endif
13430 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13431 int main () { int i; for (i = 0; i < 256; i++)
13432 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13433 exit (0); }
13434
13435 EOF
13436 if { (eval echo configure:13437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13437 then
13438   :
13439 else
13440   echo "configure: failed program was:" >&5
13441   cat conftest.$ac_ext >&5
13442   rm -fr conftest*
13443   ac_cv_header_stdc=no
13444 fi
13445 rm -fr conftest*
13446 fi
13447
13448 fi
13449 fi
13450
13451 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13452 if test $ac_cv_header_stdc = yes; then
13453   cat >> confdefs.h <<\EOF
13454 #define STDC_HEADERS 1
13455 EOF
13456
13457 fi
13458
13459 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13460 echo "configure:13461: checking for mode_t" >&5
13461 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13462   echo $ac_n "(cached) $ac_c" 1>&6
13463 else
13464   cat > conftest.$ac_ext <<EOF
13465 #line 13466 "configure"
13466 #include "confdefs.h"
13467 #include <sys/types.h>
13468 #if STDC_HEADERS
13469 #include <stdlib.h>
13470 #include <stddef.h>
13471 #endif
13472
13473 EOF
13474 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13475   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13476   rm -rf conftest*
13477   eval "ac_cv_type_mode_t=yes"
13478 else
13479   rm -rf conftest*
13480   eval "ac_cv_type_mode_t=no"
13481 fi
13482 rm -f conftest*
13483
13484 fi
13485 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13486   echo "$ac_t""yes" 1>&6
13487 else
13488   echo "$ac_t""no" 1>&6
13489   cat >> confdefs.h <<EOF
13490 #define mode_t int
13491 EOF
13492
13493 fi
13494
13495 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13496 echo "configure:13497: checking for off_t" >&5
13497 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13498   echo $ac_n "(cached) $ac_c" 1>&6
13499 else
13500   cat > conftest.$ac_ext <<EOF
13501 #line 13502 "configure"
13502 #include "confdefs.h"
13503 #include <sys/types.h>
13504 #if STDC_HEADERS
13505 #include <stdlib.h>
13506 #include <stddef.h>
13507 #endif
13508
13509 EOF
13510 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13511   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13512   rm -rf conftest*
13513   eval "ac_cv_type_off_t=yes"
13514 else
13515   rm -rf conftest*
13516   eval "ac_cv_type_off_t=no"
13517 fi
13518 rm -f conftest*
13519
13520 fi
13521 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13522   echo "$ac_t""yes" 1>&6
13523 else
13524   echo "$ac_t""no" 1>&6
13525   cat >> confdefs.h <<EOF
13526 #define off_t long
13527 EOF
13528
13529 fi
13530
13531 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13532 echo "configure:13533: checking for pid_t" >&5
13533 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13534   echo $ac_n "(cached) $ac_c" 1>&6
13535 else
13536   cat > conftest.$ac_ext <<EOF
13537 #line 13538 "configure"
13538 #include "confdefs.h"
13539 #include <sys/types.h>
13540 #if STDC_HEADERS
13541 #include <stdlib.h>
13542 #include <stddef.h>
13543 #endif
13544
13545 EOF
13546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13547   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13548   rm -rf conftest*
13549   eval "ac_cv_type_pid_t=yes"
13550 else
13551   rm -rf conftest*
13552   eval "ac_cv_type_pid_t=no"
13553 fi
13554 rm -f conftest*
13555
13556 fi
13557 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13558   echo "$ac_t""yes" 1>&6
13559 else
13560   echo "$ac_t""no" 1>&6
13561   cat >> confdefs.h <<EOF
13562 #define pid_t int
13563 EOF
13564
13565 fi
13566
13567 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13568 echo "configure:13569: checking for ptrdiff_t" >&5
13569 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13570   echo $ac_n "(cached) $ac_c" 1>&6
13571 else
13572   cat > conftest.$ac_ext <<EOF
13573 #line 13574 "configure"
13574 #include "confdefs.h"
13575 #include <stddef.h>
13576 int main() {
13577 ptrdiff_t p
13578 ; return 0; }
13579 EOF
13580 if { (eval echo configure:13581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13581   rm -rf conftest*
13582   am_cv_type_ptrdiff_t=yes
13583 else
13584   echo "configure: failed program was:" >&5
13585   cat conftest.$ac_ext >&5
13586   rm -rf conftest*
13587   am_cv_type_ptrdiff_t=no
13588 fi
13589 rm -f conftest*
13590 fi
13591
13592 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13593    if test $am_cv_type_ptrdiff_t = yes; then
13594      cat >> confdefs.h <<\EOF
13595 #define HAVE_PTRDIFF_T 1
13596 EOF
13597
13598    fi
13599
13600 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13601 echo "configure:13602: checking return type of signal handlers" >&5
13602 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13603   echo $ac_n "(cached) $ac_c" 1>&6
13604 else
13605   cat > conftest.$ac_ext <<EOF
13606 #line 13607 "configure"
13607 #include "confdefs.h"
13608 #include <sys/types.h>
13609 #include <signal.h>
13610 #ifdef signal
13611 #undef signal
13612 #endif
13613 #ifdef __cplusplus
13614 extern "C" void (*signal (int, void (*)(int)))(int);
13615 #else
13616 void (*signal ()) ();
13617 #endif
13618
13619 int main() {
13620 int i;
13621 ; return 0; }
13622 EOF
13623 if { (eval echo configure:13624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13624   rm -rf conftest*
13625   ac_cv_type_signal=void
13626 else
13627   echo "configure: failed program was:" >&5
13628   cat conftest.$ac_ext >&5
13629   rm -rf conftest*
13630   ac_cv_type_signal=int
13631 fi
13632 rm -f conftest*
13633 fi
13634
13635 echo "$ac_t""$ac_cv_type_signal" 1>&6
13636 cat >> confdefs.h <<EOF
13637 #define RETSIGTYPE $ac_cv_type_signal
13638 EOF
13639
13640
13641 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13642 echo "configure:13643: checking for size_t" >&5
13643 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13644   echo $ac_n "(cached) $ac_c" 1>&6
13645 else
13646   cat > conftest.$ac_ext <<EOF
13647 #line 13648 "configure"
13648 #include "confdefs.h"
13649 #include <sys/types.h>
13650 #if STDC_HEADERS
13651 #include <stdlib.h>
13652 #include <stddef.h>
13653 #endif
13654
13655 EOF
13656 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13657   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13658   rm -rf conftest*
13659   eval "ac_cv_type_size_t=yes"
13660 else
13661   rm -rf conftest*
13662   eval "ac_cv_type_size_t=no"
13663 fi
13664 rm -f conftest*
13665
13666 fi
13667 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13668   echo "$ac_t""yes" 1>&6
13669 else
13670   echo "$ac_t""no" 1>&6
13671   cat >> confdefs.h <<EOF
13672 #define size_t unsigned
13673 EOF
13674
13675 fi
13676
13677
13678 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13679 echo "configure:13680: checking for ssize_t" >&5
13680 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13681   echo $ac_n "(cached) $ac_c" 1>&6
13682 else
13683   cat > conftest.$ac_ext <<EOF
13684 #line 13685 "configure"
13685 #include "confdefs.h"
13686 #include <sys/types.h>
13687 #if STDC_HEADERS
13688 #include <stdlib.h>
13689 #include <stddef.h>
13690 #endif
13691
13692 EOF
13693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13694   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13695   rm -rf conftest*
13696   eval "ac_cv_type_ssize_t=yes"
13697 else
13698   rm -rf conftest*
13699   eval "ac_cv_type_ssize_t=no"
13700 fi
13701 rm -f conftest*
13702
13703 fi
13704 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13705   echo "$ac_t""yes" 1>&6
13706 else
13707   echo "$ac_t""no" 1>&6
13708   cat >> confdefs.h <<EOF
13709 #define ssize_t signed int
13710 EOF
13711
13712 fi
13713
13714 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13715 echo "configure:13716: checking for caddr_t" >&5
13716 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13717   echo $ac_n "(cached) $ac_c" 1>&6
13718 else
13719   cat > conftest.$ac_ext <<EOF
13720 #line 13721 "configure"
13721 #include "confdefs.h"
13722 #include <sys/types.h>
13723 #if STDC_HEADERS
13724 #include <stdlib.h>
13725 #include <stddef.h>
13726 #endif
13727
13728 EOF
13729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13730   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13731   rm -rf conftest*
13732   eval "ac_cv_type_caddr_t=yes"
13733 else
13734   rm -rf conftest*
13735   eval "ac_cv_type_caddr_t=no"
13736 fi
13737 rm -f conftest*
13738
13739 fi
13740 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13741   echo "$ac_t""yes" 1>&6
13742 else
13743   echo "$ac_t""no" 1>&6
13744   cat >> confdefs.h <<EOF
13745 #define caddr_t char *
13746 EOF
13747
13748 fi
13749
13750
13751 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13752 echo "configure:13753: checking for socklen_t" >&5
13753 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13754   echo $ac_n "(cached) $ac_c" 1>&6
13755 else
13756   cat > conftest.$ac_ext <<EOF
13757 #line 13758 "configure"
13758 #include "confdefs.h"
13759
13760 #ifdef HAVE_SYS_TYPES_H
13761 #include <sys/types.h>
13762 #endif
13763 #ifdef HAVE_SYS_SOCKET_H
13764 #include <sys/socket.h>
13765 #endif
13766
13767 int main() {
13768 socklen_t len;
13769 ; return 0; }
13770 EOF
13771 if { (eval echo configure:13772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13772   rm -rf conftest*
13773   ol_cv_type_socklen_t=yes
13774 else
13775   echo "configure: failed program was:" >&5
13776   cat conftest.$ac_ext >&5
13777   rm -rf conftest*
13778   ol_cv_type_socklen_t=no
13779 fi
13780 rm -f conftest*
13781 fi
13782
13783 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13784   if test $ol_cv_type_socklen_t = no; then
13785     cat >> confdefs.h <<\EOF
13786 #define socklen_t int
13787 EOF
13788
13789   fi
13790  
13791 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13792 echo "configure:13793: checking for member st_blksize in aggregate type struct stat" >&5
13793 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13794   echo $ac_n "(cached) $ac_c" 1>&6
13795 else
13796   cat > conftest.$ac_ext <<EOF
13797 #line 13798 "configure"
13798 #include "confdefs.h"
13799 #include <sys/types.h>
13800 #include <sys/stat.h>
13801 int main() {
13802 struct stat foo; foo.st_blksize;
13803 ; return 0; }
13804 EOF
13805 if { (eval echo configure:13806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13806   rm -rf conftest*
13807   ac_cv_c_struct_member_st_blksize=yes
13808 else
13809   echo "configure: failed program was:" >&5
13810   cat conftest.$ac_ext >&5
13811   rm -rf conftest*
13812   ac_cv_c_struct_member_st_blksize=no
13813 fi
13814 rm -f conftest*
13815 fi
13816
13817 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13818 st_blksize="$ac_cv_c_struct_member_st_blksize"
13819 if test $ac_cv_c_struct_member_st_blksize = yes; then
13820   cat >> confdefs.h <<\EOF
13821 #define HAVE_ST_BLKSIZE 1
13822 EOF
13823
13824 fi
13825
13826 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13827 echo "configure:13828: checking whether time.h and sys/time.h may both be included" >&5
13828 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13829   echo $ac_n "(cached) $ac_c" 1>&6
13830 else
13831   cat > conftest.$ac_ext <<EOF
13832 #line 13833 "configure"
13833 #include "confdefs.h"
13834 #include <sys/types.h>
13835 #include <sys/time.h>
13836 #include <time.h>
13837 int main() {
13838 struct tm *tp;
13839 ; return 0; }
13840 EOF
13841 if { (eval echo configure:13842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13842   rm -rf conftest*
13843   ac_cv_header_time=yes
13844 else
13845   echo "configure: failed program was:" >&5
13846   cat conftest.$ac_ext >&5
13847   rm -rf conftest*
13848   ac_cv_header_time=no
13849 fi
13850 rm -f conftest*
13851 fi
13852
13853 echo "$ac_t""$ac_cv_header_time" 1>&6
13854 if test $ac_cv_header_time = yes; then
13855   cat >> confdefs.h <<\EOF
13856 #define TIME_WITH_SYS_TIME 1
13857 EOF
13858
13859 fi
13860
13861 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13862 echo "configure:13863: checking whether struct tm is in sys/time.h or time.h" >&5
13863 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13864   echo $ac_n "(cached) $ac_c" 1>&6
13865 else
13866   cat > conftest.$ac_ext <<EOF
13867 #line 13868 "configure"
13868 #include "confdefs.h"
13869 #include <sys/types.h>
13870 #include <time.h>
13871 int main() {
13872 struct tm *tp; tp->tm_sec;
13873 ; return 0; }
13874 EOF
13875 if { (eval echo configure:13876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13876   rm -rf conftest*
13877   ac_cv_struct_tm=time.h
13878 else
13879   echo "configure: failed program was:" >&5
13880   cat conftest.$ac_ext >&5
13881   rm -rf conftest*
13882   ac_cv_struct_tm=sys/time.h
13883 fi
13884 rm -f conftest*
13885 fi
13886
13887 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13888 if test $ac_cv_struct_tm = sys/time.h; then
13889   cat >> confdefs.h <<\EOF
13890 #define TM_IN_SYS_TIME 1
13891 EOF
13892
13893 fi
13894
13895 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13896 echo "configure:13897: checking for uid_t in sys/types.h" >&5
13897 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13898   echo $ac_n "(cached) $ac_c" 1>&6
13899 else
13900   cat > conftest.$ac_ext <<EOF
13901 #line 13902 "configure"
13902 #include "confdefs.h"
13903 #include <sys/types.h>
13904 EOF
13905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13906   egrep "uid_t" >/dev/null 2>&1; then
13907   rm -rf conftest*
13908   ac_cv_type_uid_t=yes
13909 else
13910   rm -rf conftest*
13911   ac_cv_type_uid_t=no
13912 fi
13913 rm -f conftest*
13914
13915 fi
13916
13917 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13918 if test $ac_cv_type_uid_t = no; then
13919   cat >> confdefs.h <<\EOF
13920 #define uid_t int
13921 EOF
13922
13923   cat >> confdefs.h <<\EOF
13924 #define gid_t int
13925 EOF
13926
13927 fi
13928
13929 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13930 echo "configure:13931: checking for sig_atomic_t" >&5
13931 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13932   echo $ac_n "(cached) $ac_c" 1>&6
13933 else
13934   cat > conftest.$ac_ext <<EOF
13935 #line 13936 "configure"
13936 #include "confdefs.h"
13937 #include <signal.h>
13938 int main() {
13939 sig_atomic_t atomic;
13940 ; return 0; }
13941 EOF
13942 if { (eval echo configure:13943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13943   rm -rf conftest*
13944   ol_cv_type_sig_atomic_t=yes
13945 else
13946   echo "configure: failed program was:" >&5
13947   cat conftest.$ac_ext >&5
13948   rm -rf conftest*
13949   ol_cv_type_sig_atomic_t=no
13950 fi
13951 rm -f conftest*
13952 fi
13953
13954 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13955   if test $ol_cv_type_sig_atomic_t = no; then
13956     cat >> confdefs.h <<\EOF
13957 #define sig_atomic_t int
13958 EOF
13959
13960   fi
13961  
13962
13963
13964 # test for pw_gecos in struct passwd
13965 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13966 echo "configure:13967: checking struct passwd for pw_gecos" >&5
13967 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13968   echo $ac_n "(cached) $ac_c" 1>&6
13969 else
13970   
13971         cat > conftest.$ac_ext <<EOF
13972 #line 13973 "configure"
13973 #include "confdefs.h"
13974 #include <pwd.h>
13975 int main() {
13976
13977         struct passwd pwd;
13978         pwd.pw_gecos = pwd.pw_name;
13979
13980 ; return 0; }
13981 EOF
13982 if { (eval echo configure:13983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13983   rm -rf conftest*
13984   ol_cv_struct_passwd_pw_gecos=yes
13985 else
13986   echo "configure: failed program was:" >&5
13987   cat conftest.$ac_ext >&5
13988   rm -rf conftest*
13989   ol_cv_struct_passwd_pw_gecos=no
13990 fi
13991 rm -f conftest*
13992 fi
13993
13994 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13995 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13996         cat >> confdefs.h <<\EOF
13997 #define HAVE_PW_GECOS 1
13998 EOF
13999
14000 fi
14001
14002 # test for pw_passwd in struct passwd
14003 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14004 echo "configure:14005: checking struct passwd for pw_passwd" >&5
14005 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14006   echo $ac_n "(cached) $ac_c" 1>&6
14007 else
14008   
14009         cat > conftest.$ac_ext <<EOF
14010 #line 14011 "configure"
14011 #include "confdefs.h"
14012 #include <pwd.h>
14013 int main() {
14014
14015         struct passwd pwd;
14016         pwd.pw_passwd = pwd.pw_name;
14017
14018 ; return 0; }
14019 EOF
14020 if { (eval echo configure:14021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14021   rm -rf conftest*
14022   ol_cv_struct_passwd_pw_passwd=yes
14023 else
14024   echo "configure: failed program was:" >&5
14025   cat conftest.$ac_ext >&5
14026   rm -rf conftest*
14027   ol_cv_struct_passwd_pw_passwd=no
14028 fi
14029 rm -f conftest*
14030 fi
14031
14032 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14033 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14034         cat >> confdefs.h <<\EOF
14035 #define HAVE_PW_PASSWD 1
14036 EOF
14037
14038 fi
14039
14040
14041 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14042 echo "configure:14043: checking if toupper() requires islower()" >&5
14043 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14044   echo $ac_n "(cached) $ac_c" 1>&6
14045 else
14046   
14047         if test "$cross_compiling" = yes; then
14048   ol_cv_c_upper_lower=safe
14049 else
14050   cat > conftest.$ac_ext <<EOF
14051 #line 14052 "configure"
14052 #include "confdefs.h"
14053
14054 #include <ctype.h>
14055 main()
14056 {
14057         if ('C' == toupper('C'))
14058                 exit(0);
14059         else
14060                 exit(1);
14061 }
14062 EOF
14063 if { (eval echo configure:14064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14064 then
14065   ol_cv_c_upper_lower=no
14066 else
14067   echo "configure: failed program was:" >&5
14068   cat conftest.$ac_ext >&5
14069   rm -fr conftest*
14070   ol_cv_c_upper_lower=yes
14071 fi
14072 rm -fr conftest*
14073 fi
14074
14075 fi
14076
14077 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14078 if test $ol_cv_c_upper_lower != no ; then
14079         cat >> confdefs.h <<\EOF
14080 #define C_UPPER_LOWER 1
14081 EOF
14082
14083 fi
14084
14085 echo $ac_n "checking for working const""... $ac_c" 1>&6
14086 echo "configure:14087: checking for working const" >&5
14087 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14088   echo $ac_n "(cached) $ac_c" 1>&6
14089 else
14090   cat > conftest.$ac_ext <<EOF
14091 #line 14092 "configure"
14092 #include "confdefs.h"
14093
14094 int main() {
14095
14096 /* Ultrix mips cc rejects this.  */
14097 typedef int charset[2]; const charset x;
14098 /* SunOS 4.1.1 cc rejects this.  */
14099 char const *const *ccp;
14100 char **p;
14101 /* NEC SVR4.0.2 mips cc rejects this.  */
14102 struct point {int x, y;};
14103 static struct point const zero = {0,0};
14104 /* AIX XL C 1.02.0.0 rejects this.
14105    It does not let you subtract one const X* pointer from another in an arm
14106    of an if-expression whose if-part is not a constant expression */
14107 const char *g = "string";
14108 ccp = &g + (g ? g-g : 0);
14109 /* HPUX 7.0 cc rejects these. */
14110 ++ccp;
14111 p = (char**) ccp;
14112 ccp = (char const *const *) p;
14113 { /* SCO 3.2v4 cc rejects this.  */
14114   char *t;
14115   char const *s = 0 ? (char *) 0 : (char const *) 0;
14116
14117   *t++ = 0;
14118 }
14119 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14120   int x[] = {25, 17};
14121   const int *foo = &x[0];
14122   ++foo;
14123 }
14124 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14125   typedef const int *iptr;
14126   iptr p = 0;
14127   ++p;
14128 }
14129 { /* AIX XL C 1.02.0.0 rejects this saying
14130      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14131   struct s { int j; const int *ap[3]; };
14132   struct s *b; b->j = 5;
14133 }
14134 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14135   const int foo = 10;
14136 }
14137
14138 ; return 0; }
14139 EOF
14140 if { (eval echo configure:14141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14141   rm -rf conftest*
14142   ac_cv_c_const=yes
14143 else
14144   echo "configure: failed program was:" >&5
14145   cat conftest.$ac_ext >&5
14146   rm -rf conftest*
14147   ac_cv_c_const=no
14148 fi
14149 rm -f conftest*
14150 fi
14151
14152 echo "$ac_t""$ac_cv_c_const" 1>&6
14153 if test $ac_cv_c_const = no; then
14154   cat >> confdefs.h <<\EOF
14155 #define const 
14156 EOF
14157
14158 fi
14159
14160 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14161 echo "configure:14162: checking if compiler understands volatile" >&5
14162 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14163   echo $ac_n "(cached) $ac_c" 1>&6
14164 else
14165   cat > conftest.$ac_ext <<EOF
14166 #line 14167 "configure"
14167 #include "confdefs.h"
14168 int x, y, z;
14169 int main() {
14170 volatile int a; int * volatile b = x ? &y : &z;
14171       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14172       *b = 0;
14173 ; return 0; }
14174 EOF
14175 if { (eval echo configure:14176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14176   rm -rf conftest*
14177   ol_cv_c_volatile=yes
14178 else
14179   echo "configure: failed program was:" >&5
14180   cat conftest.$ac_ext >&5
14181   rm -rf conftest*
14182   ol_cv_c_volatile=no
14183 fi
14184 rm -f conftest*
14185 fi
14186
14187 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14188   if test $ol_cv_c_volatile = yes; then
14189     : 
14190   else
14191     cat >> confdefs.h <<\EOF
14192 #define volatile 
14193 EOF
14194
14195   fi
14196  
14197
14198 if test $cross_compiling = yes ; then
14199         cat >> confdefs.h <<\EOF
14200 #define CROSS_COMPILING 1
14201 EOF
14202
14203 else
14204         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14205 echo "configure:14206: checking whether byte ordering is bigendian" >&5
14206 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14207   echo $ac_n "(cached) $ac_c" 1>&6
14208 else
14209   ac_cv_c_bigendian=unknown
14210 # See if sys/param.h defines the BYTE_ORDER macro.
14211 cat > conftest.$ac_ext <<EOF
14212 #line 14213 "configure"
14213 #include "confdefs.h"
14214 #include <sys/types.h>
14215 #include <sys/param.h>
14216 int main() {
14217
14218 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14219  bogus endian macros
14220 #endif
14221 ; return 0; }
14222 EOF
14223 if { (eval echo configure:14224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14224   rm -rf conftest*
14225   # It does; now see whether it defined to BIG_ENDIAN or not.
14226 cat > conftest.$ac_ext <<EOF
14227 #line 14228 "configure"
14228 #include "confdefs.h"
14229 #include <sys/types.h>
14230 #include <sys/param.h>
14231 int main() {
14232
14233 #if BYTE_ORDER != BIG_ENDIAN
14234  not big endian
14235 #endif
14236 ; return 0; }
14237 EOF
14238 if { (eval echo configure:14239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14239   rm -rf conftest*
14240   ac_cv_c_bigendian=yes
14241 else
14242   echo "configure: failed program was:" >&5
14243   cat conftest.$ac_ext >&5
14244   rm -rf conftest*
14245   ac_cv_c_bigendian=no
14246 fi
14247 rm -f conftest*
14248 else
14249   echo "configure: failed program was:" >&5
14250   cat conftest.$ac_ext >&5
14251 fi
14252 rm -f conftest*
14253 if test $ac_cv_c_bigendian = unknown; then
14254 if test "$cross_compiling" = yes; then
14255     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14256 else
14257   cat > conftest.$ac_ext <<EOF
14258 #line 14259 "configure"
14259 #include "confdefs.h"
14260 main () {
14261   /* Are we little or big endian?  From Harbison&Steele.  */
14262   union
14263   {
14264     long l;
14265     char c[sizeof (long)];
14266   } u;
14267   u.l = 1;
14268   exit (u.c[sizeof (long) - 1] == 1);
14269 }
14270 EOF
14271 if { (eval echo configure:14272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14272 then
14273   ac_cv_c_bigendian=no
14274 else
14275   echo "configure: failed program was:" >&5
14276   cat conftest.$ac_ext >&5
14277   rm -fr conftest*
14278   ac_cv_c_bigendian=yes
14279 fi
14280 rm -fr conftest*
14281 fi
14282
14283 fi
14284 fi
14285
14286 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14287 if test $ac_cv_c_bigendian = yes; then
14288   cat >> confdefs.h <<\EOF
14289 #define WORDS_BIGENDIAN 1
14290 EOF
14291
14292 fi
14293
14294 fi
14295
14296 echo $ac_n "checking size of short""... $ac_c" 1>&6
14297 echo "configure:14298: checking size of short" >&5 
14298 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14299   echo $ac_n "(cached) $ac_c" 1>&6
14300 else
14301   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14302   cat > conftest.$ac_ext <<EOF
14303 #line 14304 "configure"
14304 #include "confdefs.h"
14305 #include "confdefs.h" 
14306 #include <sys/types.h> 
14307  
14308
14309 int main() {
14310 switch (0) case 0: case (sizeof (short) == $ac_size):;
14311 ; return 0; }
14312 EOF
14313 if { (eval echo configure:14314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14314   rm -rf conftest*
14315   ac_cv_sizeof_short=$ac_size
14316 else
14317   echo "configure: failed program was:" >&5
14318   cat conftest.$ac_ext >&5
14319 fi
14320 rm -f conftest* 
14321   if test x$ac_cv_sizeof_short != x ; then break; fi 
14322 done 
14323
14324 fi
14325  
14326 if test x$ac_cv_sizeof_short = x ; then 
14327   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14328 fi 
14329 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14330 cat >> confdefs.h <<EOF
14331 #define SIZEOF_SHORT $ac_cv_sizeof_short
14332 EOF
14333  
14334  
14335 echo $ac_n "checking size of int""... $ac_c" 1>&6
14336 echo "configure:14337: checking size of int" >&5 
14337 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14338   echo $ac_n "(cached) $ac_c" 1>&6
14339 else
14340   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14341   cat > conftest.$ac_ext <<EOF
14342 #line 14343 "configure"
14343 #include "confdefs.h"
14344 #include "confdefs.h" 
14345 #include <sys/types.h> 
14346  
14347
14348 int main() {
14349 switch (0) case 0: case (sizeof (int) == $ac_size):;
14350 ; return 0; }
14351 EOF
14352 if { (eval echo configure:14353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14353   rm -rf conftest*
14354   ac_cv_sizeof_int=$ac_size
14355 else
14356   echo "configure: failed program was:" >&5
14357   cat conftest.$ac_ext >&5
14358 fi
14359 rm -f conftest* 
14360   if test x$ac_cv_sizeof_int != x ; then break; fi 
14361 done 
14362
14363 fi
14364  
14365 if test x$ac_cv_sizeof_int = x ; then 
14366   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14367 fi 
14368 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14369 cat >> confdefs.h <<EOF
14370 #define SIZEOF_INT $ac_cv_sizeof_int
14371 EOF
14372  
14373  
14374 echo $ac_n "checking size of long""... $ac_c" 1>&6
14375 echo "configure:14376: checking size of long" >&5 
14376 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14377   echo $ac_n "(cached) $ac_c" 1>&6
14378 else
14379   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14380   cat > conftest.$ac_ext <<EOF
14381 #line 14382 "configure"
14382 #include "confdefs.h"
14383 #include "confdefs.h" 
14384 #include <sys/types.h> 
14385  
14386
14387 int main() {
14388 switch (0) case 0: case (sizeof (long) == $ac_size):;
14389 ; return 0; }
14390 EOF
14391 if { (eval echo configure:14392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14392   rm -rf conftest*
14393   ac_cv_sizeof_long=$ac_size
14394 else
14395   echo "configure: failed program was:" >&5
14396   cat conftest.$ac_ext >&5
14397 fi
14398 rm -f conftest* 
14399   if test x$ac_cv_sizeof_long != x ; then break; fi 
14400 done 
14401
14402 fi
14403  
14404 if test x$ac_cv_sizeof_long = x ; then 
14405   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14406 fi 
14407 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14408 cat >> confdefs.h <<EOF
14409 #define SIZEOF_LONG $ac_cv_sizeof_long
14410 EOF
14411  
14412
14413
14414 if test "$ac_cv_sizeof_int" -lt 4 ; then
14415         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14416
14417         cat >> confdefs.h <<\EOF
14418 #define LBER_INT_T long
14419 EOF
14420
14421 else
14422         cat >> confdefs.h <<\EOF
14423 #define LBER_INT_T int
14424 EOF
14425
14426 fi
14427
14428 cat >> confdefs.h <<\EOF
14429 #define LBER_LEN_T long
14430 EOF
14431
14432 cat >> confdefs.h <<\EOF
14433 #define LBER_SOCKET_T int
14434 EOF
14435
14436 cat >> confdefs.h <<\EOF
14437 #define LBER_TAG_T long
14438 EOF
14439
14440
14441 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14442 echo "configure:14443: checking for 8-bit clean memcmp" >&5
14443 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14444   echo $ac_n "(cached) $ac_c" 1>&6
14445 else
14446   if test "$cross_compiling" = yes; then
14447   ac_cv_func_memcmp_clean=no
14448 else
14449   cat > conftest.$ac_ext <<EOF
14450 #line 14451 "configure"
14451 #include "confdefs.h"
14452
14453 main()
14454 {
14455   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14456   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14457 }
14458
14459 EOF
14460 if { (eval echo configure:14461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14461 then
14462   ac_cv_func_memcmp_clean=yes
14463 else
14464   echo "configure: failed program was:" >&5
14465   cat conftest.$ac_ext >&5
14466   rm -fr conftest*
14467   ac_cv_func_memcmp_clean=no
14468 fi
14469 rm -fr conftest*
14470 fi
14471
14472 fi
14473
14474 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14475 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14476
14477 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14478 echo "configure:14479: checking for strftime" >&5
14479 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14480   echo $ac_n "(cached) $ac_c" 1>&6
14481 else
14482   cat > conftest.$ac_ext <<EOF
14483 #line 14484 "configure"
14484 #include "confdefs.h"
14485 /* System header to define __stub macros and hopefully few prototypes,
14486     which can conflict with char strftime(); below.  */
14487 #include <assert.h>
14488 /* Override any gcc2 internal prototype to avoid an error.  */
14489 /* We use char because int might match the return type of a gcc2
14490     builtin and then its argument prototype would still apply.  */
14491 char strftime();
14492 char (*f)();
14493
14494 int main() {
14495
14496 /* The GNU C library defines this for functions which it implements
14497     to always fail with ENOSYS.  Some functions are actually named
14498     something starting with __ and the normal name is an alias.  */
14499 #if defined (__stub_strftime) || defined (__stub___strftime)
14500 choke me
14501 #else
14502 f = strftime;
14503 #endif
14504
14505 ; return 0; }
14506 EOF
14507 if { (eval echo configure:14508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14508   rm -rf conftest*
14509   eval "ac_cv_func_strftime=yes"
14510 else
14511   echo "configure: failed program was:" >&5
14512   cat conftest.$ac_ext >&5
14513   rm -rf conftest*
14514   eval "ac_cv_func_strftime=no"
14515 fi
14516 rm -f conftest*
14517 fi
14518
14519 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14520   echo "$ac_t""yes" 1>&6
14521   cat >> confdefs.h <<\EOF
14522 #define HAVE_STRFTIME 1
14523 EOF
14524
14525 else
14526   echo "$ac_t""no" 1>&6
14527 # strftime is in -lintl on SCO UNIX.
14528 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14529 echo "configure:14530: checking for strftime in -lintl" >&5
14530 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14531 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14532   echo $ac_n "(cached) $ac_c" 1>&6
14533 else
14534   ac_save_LIBS="$LIBS"
14535 LIBS="-lintl  $LIBS"
14536 cat > conftest.$ac_ext <<EOF
14537 #line 14538 "configure"
14538 #include "confdefs.h"
14539 /* Override any gcc2 internal prototype to avoid an error.  */
14540 /* We use char because int might match the return type of a gcc2
14541     builtin and then its argument prototype would still apply.  */
14542 char strftime();
14543
14544 int main() {
14545 strftime()
14546 ; return 0; }
14547 EOF
14548 if { (eval echo configure:14549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14549   rm -rf conftest*
14550   eval "ac_cv_lib_$ac_lib_var=yes"
14551 else
14552   echo "configure: failed program was:" >&5
14553   cat conftest.$ac_ext >&5
14554   rm -rf conftest*
14555   eval "ac_cv_lib_$ac_lib_var=no"
14556 fi
14557 rm -f conftest*
14558 LIBS="$ac_save_LIBS"
14559
14560 fi
14561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14562   echo "$ac_t""yes" 1>&6
14563   cat >> confdefs.h <<\EOF
14564 #define HAVE_STRFTIME 1
14565 EOF
14566
14567 LIBS="-lintl $LIBS"
14568 else
14569   echo "$ac_t""no" 1>&6
14570 fi
14571
14572 fi
14573
14574
14575 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14576 echo "configure:14577: checking for inet_aton()" >&5
14577 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14578   echo $ac_n "(cached) $ac_c" 1>&6
14579 else
14580   cat > conftest.$ac_ext <<EOF
14581 #line 14582 "configure"
14582 #include "confdefs.h"
14583
14584 #ifdef HAVE_SYS_TYPES_H
14585 #       include <sys/types.h>
14586 #endif
14587 #ifdef HAVE_SYS_SOCKET_H
14588 #       include <sys/socket.h>
14589 #       ifdef HAVE_SYS_SELECT_H
14590 #               include <sys/select.h>
14591 #       endif
14592 #       include <netinet/in.h>
14593 #       ifdef HAVE_ARPA_INET_H
14594 #               include <arpa/inet.h>
14595 #       endif
14596 #endif
14597
14598 int main() {
14599 struct in_addr in;
14600 int rc = inet_aton( "255.255.255.255", &in );
14601 ; return 0; }
14602 EOF
14603 if { (eval echo configure:14604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14604   rm -rf conftest*
14605   ol_cv_func_inet_aton=yes
14606 else
14607   echo "configure: failed program was:" >&5
14608   cat conftest.$ac_ext >&5
14609   rm -rf conftest*
14610   ol_cv_func_inet_aton=no
14611 fi
14612 rm -f conftest*
14613 fi
14614
14615 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14616   if test $ol_cv_func_inet_aton != no; then
14617     cat >> confdefs.h <<\EOF
14618 #define HAVE_INET_ATON 1
14619 EOF
14620
14621   fi
14622  
14623
14624 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14625 echo "configure:14626: checking for _spawnlp" >&5
14626 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14627   echo $ac_n "(cached) $ac_c" 1>&6
14628 else
14629   cat > conftest.$ac_ext <<EOF
14630 #line 14631 "configure"
14631 #include "confdefs.h"
14632 /* System header to define __stub macros and hopefully few prototypes,
14633     which can conflict with char _spawnlp(); below.  */
14634 #include <assert.h>
14635 /* Override any gcc2 internal prototype to avoid an error.  */
14636 /* We use char because int might match the return type of a gcc2
14637     builtin and then its argument prototype would still apply.  */
14638 char _spawnlp();
14639 char (*f)();
14640
14641 int main() {
14642
14643 /* The GNU C library defines this for functions which it implements
14644     to always fail with ENOSYS.  Some functions are actually named
14645     something starting with __ and the normal name is an alias.  */
14646 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14647 choke me
14648 #else
14649 f = _spawnlp;
14650 #endif
14651
14652 ; return 0; }
14653 EOF
14654 if { (eval echo configure:14655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14655   rm -rf conftest*
14656   eval "ac_cv_func__spawnlp=yes"
14657 else
14658   echo "configure: failed program was:" >&5
14659   cat conftest.$ac_ext >&5
14660   rm -rf conftest*
14661   eval "ac_cv_func__spawnlp=no"
14662 fi
14663 rm -f conftest*
14664 fi
14665
14666 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14667   echo "$ac_t""yes" 1>&6
14668   cat >> confdefs.h <<\EOF
14669 #define HAVE_SPAWNLP 1
14670 EOF
14671
14672 else
14673   echo "$ac_t""no" 1>&6
14674 fi
14675
14676
14677 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14678 echo "configure:14679: checking for _snprintf" >&5
14679 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14680   echo $ac_n "(cached) $ac_c" 1>&6
14681 else
14682   cat > conftest.$ac_ext <<EOF
14683 #line 14684 "configure"
14684 #include "confdefs.h"
14685 /* System header to define __stub macros and hopefully few prototypes,
14686     which can conflict with char _snprintf(); below.  */
14687 #include <assert.h>
14688 /* Override any gcc2 internal prototype to avoid an error.  */
14689 /* We use char because int might match the return type of a gcc2
14690     builtin and then its argument prototype would still apply.  */
14691 char _snprintf();
14692 char (*f)();
14693
14694 int main() {
14695
14696 /* The GNU C library defines this for functions which it implements
14697     to always fail with ENOSYS.  Some functions are actually named
14698     something starting with __ and the normal name is an alias.  */
14699 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14700 choke me
14701 #else
14702 f = _snprintf;
14703 #endif
14704
14705 ; return 0; }
14706 EOF
14707 if { (eval echo configure:14708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14708   rm -rf conftest*
14709   eval "ac_cv_func__snprintf=yes"
14710 else
14711   echo "configure: failed program was:" >&5
14712   cat conftest.$ac_ext >&5
14713   rm -rf conftest*
14714   eval "ac_cv_func__snprintf=no"
14715 fi
14716 rm -f conftest*
14717 fi
14718
14719 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14720   echo "$ac_t""yes" 1>&6
14721   ac_cv_func_snprintf=yes
14722         cat >> confdefs.h <<\EOF
14723 #define snprintf _snprintf
14724 EOF
14725
14726
14727 else
14728   echo "$ac_t""no" 1>&6
14729 fi
14730
14731
14732 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14733 echo "configure:14734: checking for _vsnprintf" >&5
14734 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14735   echo $ac_n "(cached) $ac_c" 1>&6
14736 else
14737   cat > conftest.$ac_ext <<EOF
14738 #line 14739 "configure"
14739 #include "confdefs.h"
14740 /* System header to define __stub macros and hopefully few prototypes,
14741     which can conflict with char _vsnprintf(); below.  */
14742 #include <assert.h>
14743 /* Override any gcc2 internal prototype to avoid an error.  */
14744 /* We use char because int might match the return type of a gcc2
14745     builtin and then its argument prototype would still apply.  */
14746 char _vsnprintf();
14747 char (*f)();
14748
14749 int main() {
14750
14751 /* The GNU C library defines this for functions which it implements
14752     to always fail with ENOSYS.  Some functions are actually named
14753     something starting with __ and the normal name is an alias.  */
14754 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14755 choke me
14756 #else
14757 f = _vsnprintf;
14758 #endif
14759
14760 ; return 0; }
14761 EOF
14762 if { (eval echo configure:14763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14763   rm -rf conftest*
14764   eval "ac_cv_func__vsnprintf=yes"
14765 else
14766   echo "configure: failed program was:" >&5
14767   cat conftest.$ac_ext >&5
14768   rm -rf conftest*
14769   eval "ac_cv_func__vsnprintf=no"
14770 fi
14771 rm -f conftest*
14772 fi
14773
14774 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14775   echo "$ac_t""yes" 1>&6
14776   ac_cv_func_vsnprintf=yes
14777         cat >> confdefs.h <<\EOF
14778 #define vsnprintf _vsnprintf
14779 EOF
14780
14781
14782 else
14783   echo "$ac_t""no" 1>&6
14784 fi
14785
14786
14787 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14788 echo "configure:14789: checking for vprintf" >&5
14789 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14790   echo $ac_n "(cached) $ac_c" 1>&6
14791 else
14792   cat > conftest.$ac_ext <<EOF
14793 #line 14794 "configure"
14794 #include "confdefs.h"
14795 /* System header to define __stub macros and hopefully few prototypes,
14796     which can conflict with char vprintf(); below.  */
14797 #include <assert.h>
14798 /* Override any gcc2 internal prototype to avoid an error.  */
14799 /* We use char because int might match the return type of a gcc2
14800     builtin and then its argument prototype would still apply.  */
14801 char vprintf();
14802 char (*f)();
14803
14804 int main() {
14805
14806 /* The GNU C library defines this for functions which it implements
14807     to always fail with ENOSYS.  Some functions are actually named
14808     something starting with __ and the normal name is an alias.  */
14809 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14810 choke me
14811 #else
14812 f = vprintf;
14813 #endif
14814
14815 ; return 0; }
14816 EOF
14817 if { (eval echo configure:14818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14818   rm -rf conftest*
14819   eval "ac_cv_func_vprintf=yes"
14820 else
14821   echo "configure: failed program was:" >&5
14822   cat conftest.$ac_ext >&5
14823   rm -rf conftest*
14824   eval "ac_cv_func_vprintf=no"
14825 fi
14826 rm -f conftest*
14827 fi
14828
14829 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14830   echo "$ac_t""yes" 1>&6
14831   cat >> confdefs.h <<\EOF
14832 #define HAVE_VPRINTF 1
14833 EOF
14834
14835 else
14836   echo "$ac_t""no" 1>&6
14837 fi
14838
14839 if test "$ac_cv_func_vprintf" != yes; then
14840 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14841 echo "configure:14842: checking for _doprnt" >&5
14842 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14843   echo $ac_n "(cached) $ac_c" 1>&6
14844 else
14845   cat > conftest.$ac_ext <<EOF
14846 #line 14847 "configure"
14847 #include "confdefs.h"
14848 /* System header to define __stub macros and hopefully few prototypes,
14849     which can conflict with char _doprnt(); below.  */
14850 #include <assert.h>
14851 /* Override any gcc2 internal prototype to avoid an error.  */
14852 /* We use char because int might match the return type of a gcc2
14853     builtin and then its argument prototype would still apply.  */
14854 char _doprnt();
14855 char (*f)();
14856
14857 int main() {
14858
14859 /* The GNU C library defines this for functions which it implements
14860     to always fail with ENOSYS.  Some functions are actually named
14861     something starting with __ and the normal name is an alias.  */
14862 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14863 choke me
14864 #else
14865 f = _doprnt;
14866 #endif
14867
14868 ; return 0; }
14869 EOF
14870 if { (eval echo configure:14871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14871   rm -rf conftest*
14872   eval "ac_cv_func__doprnt=yes"
14873 else
14874   echo "configure: failed program was:" >&5
14875   cat conftest.$ac_ext >&5
14876   rm -rf conftest*
14877   eval "ac_cv_func__doprnt=no"
14878 fi
14879 rm -f conftest*
14880 fi
14881
14882 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14883   echo "$ac_t""yes" 1>&6
14884   cat >> confdefs.h <<\EOF
14885 #define HAVE_DOPRNT 1
14886 EOF
14887
14888 else
14889   echo "$ac_t""no" 1>&6
14890 fi
14891
14892 fi
14893
14894
14895 if test $ac_cv_func_vprintf = yes ; then
14896                 for ac_func in vsnprintf vsprintf
14897 do
14898 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14899 echo "configure:14900: checking for $ac_func" >&5
14900 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14901   echo $ac_n "(cached) $ac_c" 1>&6
14902 else
14903   cat > conftest.$ac_ext <<EOF
14904 #line 14905 "configure"
14905 #include "confdefs.h"
14906 /* System header to define __stub macros and hopefully few prototypes,
14907     which can conflict with char $ac_func(); below.  */
14908 #include <assert.h>
14909 /* Override any gcc2 internal prototype to avoid an error.  */
14910 /* We use char because int might match the return type of a gcc2
14911     builtin and then its argument prototype would still apply.  */
14912 char $ac_func();
14913 char (*f)();
14914
14915 int main() {
14916
14917 /* The GNU C library defines this for functions which it implements
14918     to always fail with ENOSYS.  Some functions are actually named
14919     something starting with __ and the normal name is an alias.  */
14920 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14921 choke me
14922 #else
14923 f = $ac_func;
14924 #endif
14925
14926 ; return 0; }
14927 EOF
14928 if { (eval echo configure:14929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14929   rm -rf conftest*
14930   eval "ac_cv_func_$ac_func=yes"
14931 else
14932   echo "configure: failed program was:" >&5
14933   cat conftest.$ac_ext >&5
14934   rm -rf conftest*
14935   eval "ac_cv_func_$ac_func=no"
14936 fi
14937 rm -f conftest*
14938 fi
14939
14940 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14941   echo "$ac_t""yes" 1>&6
14942     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14943   cat >> confdefs.h <<EOF
14944 #define $ac_tr_func 1
14945 EOF
14946  
14947 else
14948   echo "$ac_t""no" 1>&6
14949 fi
14950 done
14951
14952 fi
14953
14954 for ac_func in \
14955         bcopy                   \
14956         closesocket             \
14957         endgrent                \
14958         endpwent                \
14959         flock                   \
14960         getdtablesize   \
14961         getgrgid                \
14962         gethostname             \
14963         getpass                 \
14964         getpwuid                \
14965         getpwnam                \
14966         getspnam                \
14967         gettimeofday    \
14968         initgroups              \
14969         lockf                   \
14970         memcpy                  \
14971         memmove                 \
14972         mkstemp                 \
14973         pipe                    \
14974         read                    \
14975         recv                    \
14976         recvfrom                \
14977         setpwfile               \
14978         setgid                  \
14979         setegid                 \
14980         setsid                  \
14981         setuid                  \
14982         seteuid                 \
14983         sigaction               \
14984         signal                  \
14985         sigset                  \
14986         snprintf                \
14987         strdup                  \
14988         strerror                \
14989         strpbrk                 \
14990         strrchr                 \
14991         strsep                  \
14992         strstr                  \
14993         strtol                  \
14994         strtoul                 \
14995         strspn                  \
14996         sysconf                 \
14997         waitpid                 \
14998         wait4                   \
14999         write                   \
15000         send                    \
15001         sendto                  \
15002
15003 do
15004 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15005 echo "configure:15006: checking for $ac_func" >&5
15006 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15007   echo $ac_n "(cached) $ac_c" 1>&6
15008 else
15009   cat > conftest.$ac_ext <<EOF
15010 #line 15011 "configure"
15011 #include "confdefs.h"
15012 /* System header to define __stub macros and hopefully few prototypes,
15013     which can conflict with char $ac_func(); below.  */
15014 #include <assert.h>
15015 /* Override any gcc2 internal prototype to avoid an error.  */
15016 /* We use char because int might match the return type of a gcc2
15017     builtin and then its argument prototype would still apply.  */
15018 char $ac_func();
15019 char (*f)();
15020
15021 int main() {
15022
15023 /* The GNU C library defines this for functions which it implements
15024     to always fail with ENOSYS.  Some functions are actually named
15025     something starting with __ and the normal name is an alias.  */
15026 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15027 choke me
15028 #else
15029 f = $ac_func;
15030 #endif
15031
15032 ; return 0; }
15033 EOF
15034 if { (eval echo configure:15035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15035   rm -rf conftest*
15036   eval "ac_cv_func_$ac_func=yes"
15037 else
15038   echo "configure: failed program was:" >&5
15039   cat conftest.$ac_ext >&5
15040   rm -rf conftest*
15041   eval "ac_cv_func_$ac_func=no"
15042 fi
15043 rm -f conftest*
15044 fi
15045
15046 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15047   echo "$ac_t""yes" 1>&6
15048     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15049   cat >> confdefs.h <<EOF
15050 #define $ac_tr_func 1
15051 EOF
15052  
15053 else
15054   echo "$ac_t""no" 1>&6
15055 fi
15056 done
15057
15058
15059 for ac_func in getopt tempnam
15060 do
15061 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15062 echo "configure:15063: checking for $ac_func" >&5
15063 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15064   echo $ac_n "(cached) $ac_c" 1>&6
15065 else
15066   cat > conftest.$ac_ext <<EOF
15067 #line 15068 "configure"
15068 #include "confdefs.h"
15069 /* System header to define __stub macros and hopefully few prototypes,
15070     which can conflict with char $ac_func(); below.  */
15071 #include <assert.h>
15072 /* Override any gcc2 internal prototype to avoid an error.  */
15073 /* We use char because int might match the return type of a gcc2
15074     builtin and then its argument prototype would still apply.  */
15075 char $ac_func();
15076 char (*f)();
15077
15078 int main() {
15079
15080 /* The GNU C library defines this for functions which it implements
15081     to always fail with ENOSYS.  Some functions are actually named
15082     something starting with __ and the normal name is an alias.  */
15083 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15084 choke me
15085 #else
15086 f = $ac_func;
15087 #endif
15088
15089 ; return 0; }
15090 EOF
15091 if { (eval echo configure:15092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15092   rm -rf conftest*
15093   eval "ac_cv_func_$ac_func=yes"
15094 else
15095   echo "configure: failed program was:" >&5
15096   cat conftest.$ac_ext >&5
15097   rm -rf conftest*
15098   eval "ac_cv_func_$ac_func=no"
15099 fi
15100 rm -f conftest*
15101 fi
15102
15103 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15104   echo "$ac_t""yes" 1>&6
15105     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15106   cat >> confdefs.h <<EOF
15107 #define $ac_tr_func 1
15108 EOF
15109  
15110 else
15111   echo "$ac_t""no" 1>&6
15112 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15113 fi
15114 done
15115
15116
15117
15118 if test "$ac_cv_func_getopt" != yes; then
15119     LIBSRCS="$LIBSRCS getopt.c"
15120 fi
15121
15122 if test "$ac_cv_func_tempnam" != yes; then
15123     LIBSRCS="$LIBSRCS tempnam.c"
15124 fi
15125
15126 # Check Configuration
15127 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15128 echo "configure:15129: checking declaration of sys_errlist" >&5
15129 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15130   echo $ac_n "(cached) $ac_c" 1>&6
15131 else
15132   
15133         cat > conftest.$ac_ext <<EOF
15134 #line 15135 "configure"
15135 #include "confdefs.h"
15136
15137 #include <stdio.h>
15138 #include <sys/types.h>
15139 #include <errno.h>
15140 #ifdef WINNT
15141 #include <stdlib.h>
15142 #endif 
15143 int main() {
15144 char *c = (char *) *sys_errlist
15145 ; return 0; }
15146 EOF
15147 if { (eval echo configure:15148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15148   rm -rf conftest*
15149   ol_cv_dcl_sys_errlist=yes
15150         ol_cv_have_sys_errlist=yes
15151 else
15152   echo "configure: failed program was:" >&5
15153   cat conftest.$ac_ext >&5
15154   rm -rf conftest*
15155   ol_cv_dcl_sys_errlist=no
15156 fi
15157 rm -f conftest*
15158 fi
15159
15160 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15161 #
15162 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15163 if test $ol_cv_dcl_sys_errlist = no ; then
15164         cat >> confdefs.h <<\EOF
15165 #define DECL_SYS_ERRLIST 1
15166 EOF
15167
15168
15169         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15170 echo "configure:15171: checking existence of sys_errlist" >&5
15171 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15172   echo $ac_n "(cached) $ac_c" 1>&6
15173 else
15174   
15175                 cat > conftest.$ac_ext <<EOF
15176 #line 15177 "configure"
15177 #include "confdefs.h"
15178 #include <errno.h>
15179 int main() {
15180 char *c = (char *) *sys_errlist
15181 ; return 0; }
15182 EOF
15183 if { (eval echo configure:15184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15184   rm -rf conftest*
15185   ol_cv_have_sys_errlist=yes
15186 else
15187   echo "configure: failed program was:" >&5
15188   cat conftest.$ac_ext >&5
15189   rm -rf conftest*
15190   ol_cv_have_sys_errlist=no
15191 fi
15192 rm -f conftest*
15193 fi
15194
15195 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15196 fi
15197 if test $ol_cv_have_sys_errlist = yes ; then
15198         cat >> confdefs.h <<\EOF
15199 #define HAVE_SYS_ERRLIST 1
15200 EOF
15201
15202 fi
15203
15204
15205
15206 if test "$ol_enable_debug" != no ; then
15207         cat >> confdefs.h <<\EOF
15208 #define LDAP_DEBUG 1
15209 EOF
15210
15211 fi
15212 if test "$ol_enable_syslog" = yes ; then
15213         cat >> confdefs.h <<\EOF
15214 #define LDAP_SYSLOG 1
15215 EOF
15216
15217 fi
15218 if test "$ol_enable_libui" = yes ; then
15219         cat >> confdefs.h <<\EOF
15220 #define LDAP_LIBUI 1
15221 EOF
15222
15223 fi
15224 if test "$ol_enable_cache" = no ; then
15225         cat >> confdefs.h <<\EOF
15226 #define LDAP_NOCACHE 1
15227 EOF
15228
15229 fi
15230 if test "$ol_enable_kbind" != no ; then
15231         cat >> confdefs.h <<\EOF
15232 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15233 EOF
15234
15235 fi
15236 if test "$ol_enable_dns" != no ; then
15237         cat >> confdefs.h <<\EOF
15238 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
15239 EOF
15240
15241 fi
15242 if test "$ol_enable_proctitle" != no ; then
15243         cat >> confdefs.h <<\EOF
15244 #define LDAP_PROCTITLE 1
15245 EOF
15246
15247 fi
15248 if test "$ol_enable_referrals" != no ; then
15249         cat >> confdefs.h <<\EOF
15250 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15251 EOF
15252
15253 fi
15254 if test "$ol_enable_cldap" != no ; then
15255         cat >> confdefs.h <<\EOF
15256 #define LDAP_CONNECTIONLESS 1
15257 EOF
15258
15259 fi
15260 if test "$ol_enable_ldapi" != no; then
15261         cat >> confdefs.h <<\EOF
15262 #define USE_PF_LOCAL 1
15263 EOF
15264
15265 fi
15266
15267 if test "$ol_enable_cleartext" != no ; then
15268         cat >> confdefs.h <<\EOF
15269 #define SLAPD_CLEARTEXT 1
15270 EOF
15271
15272 fi
15273 if test "$ol_enable_crypt" != no ; then
15274         cat >> confdefs.h <<\EOF
15275 #define SLAPD_CRYPT 1
15276 EOF
15277
15278 fi
15279 if test "$ol_enable_kpasswd" != no ; then
15280         cat >> confdefs.h <<\EOF
15281 #define SLAPD_KPASSWD 1
15282 EOF
15283
15284 fi
15285 if test "$ol_enable_multimaster" != no ; then
15286         cat >> confdefs.h <<\EOF
15287 #define SLAPD_MULTIMASTER 1
15288 EOF
15289
15290 fi
15291 if test "$ol_enable_phonetic" != no ; then
15292         cat >> confdefs.h <<\EOF
15293 #define SLAPD_PHONETIC 1
15294 EOF
15295
15296 fi
15297 if test "$ol_enable_rlookups" != no ; then
15298         cat >> confdefs.h <<\EOF
15299 #define SLAPD_RLOOKUPS 1
15300 EOF
15301
15302 fi
15303 if test "$ol_enable_aci" != no ; then
15304         cat >> confdefs.h <<\EOF
15305 #define SLAPD_ACI_ENABLED 1
15306 EOF
15307
15308 fi
15309 if test "$ol_enable_discreteaci" != no ; then
15310         cat >> confdefs.h <<\EOF
15311 #define SLAPD_ACI_DISCRETE_RIGHTS 1
15312 EOF
15313
15314 fi
15315
15316 if test "$ol_link_modules" != no ; then
15317         cat >> confdefs.h <<\EOF
15318 #define SLAPD_MODULES 1
15319 EOF
15320
15321         BUILD_SLAPD=yes
15322         SLAPD_MODULES_LDFLAGS="-dlopen self"
15323 fi
15324
15325 if test "$ol_link_bdb2" != no ; then
15326         cat >> confdefs.h <<\EOF
15327 #define SLAPD_BDB2 1
15328 EOF
15329
15330         BUILD_SLAPD=yes
15331         BUILD_BDB2=yes
15332         if test "$ol_with_bdb2_module" != static ; then
15333                 cat >> confdefs.h <<\EOF
15334 #define SLAPD_BDB2_DYNAMIC 1
15335 EOF
15336
15337                 BUILD_BDB2=mod
15338                 BUILD_BDB2_DYNAMIC=shared
15339                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15340         fi
15341 fi
15342
15343 if test "$ol_enable_ldap" != no ; then
15344         cat >> confdefs.h <<\EOF
15345 #define SLAPD_LDAP 1
15346 EOF
15347
15348         BUILD_SLAPD=yes
15349         BUILD_LDAP=yes
15350         if test "$ol_with_ldap_module" != static ; then
15351                 cat >> confdefs.h <<\EOF
15352 #define SLAPD_LDAP_DYNAMIC 1
15353 EOF
15354
15355                 BUILD_LDAP=mod
15356                 BUILD_LDAP_DYNAMIC=shared
15357                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15358         fi
15359 fi
15360
15361 if test "$ol_link_ldbm" != no ; then
15362         cat >> confdefs.h <<\EOF
15363 #define SLAPD_LDBM 1
15364 EOF
15365
15366         BUILD_SLAPD=yes
15367         BUILD_LDBM=yes
15368         if test "$ol_with_ldbm_module" != static ; then
15369                 cat >> confdefs.h <<\EOF
15370 #define SLAPD_LDBM_DYNAMIC 1
15371 EOF
15372
15373                 BUILD_LDBM=mod
15374                 BUILD_LDBM_DYNAMIC=shared
15375                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15376         fi
15377 fi
15378
15379 if test "$ol_enable_passwd" != no ; then
15380         cat >> confdefs.h <<\EOF
15381 #define SLAPD_PASSWD 1
15382 EOF
15383
15384         BUILD_SLAPD=yes
15385         BUILD_PASSWD=yes
15386         if test "$ol_with_passwd_module" != static ; then
15387                 cat >> confdefs.h <<\EOF
15388 #define SLAPD_PASSWD_DYNAMIC 1
15389 EOF
15390
15391                 BUILD_PASSWD=mod
15392                 BUILD_PASSWD_DYNAMIC=shared
15393                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15394         fi
15395 fi
15396
15397 if test "$ol_link_perl" != no ; then
15398         cat >> confdefs.h <<\EOF
15399 #define SLAPD_PERL 1
15400 EOF
15401
15402         BUILD_SLAPD=yes
15403         BUILD_PERL=yes
15404         if test "$ol_with_perl_module" != static ; then
15405                 cat >> confdefs.h <<\EOF
15406 #define SLAPD_PERL_DYNAMIC 1
15407 EOF
15408
15409                 BUILD_PERL=mod
15410                 BUILD_PERL_DYNAMIC=shared
15411                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15412         fi
15413 fi
15414
15415 if test "$ol_enable_shell" != no ; then
15416         cat >> confdefs.h <<\EOF
15417 #define SLAPD_SHELL 1
15418 EOF
15419
15420         BUILD_SLAPD=yes
15421         BUILD_SHELL=yes
15422         if test "$ol_with_shell_module" != static ; then
15423                 cat >> confdefs.h <<\EOF
15424 #define SLAPD_SHELL_DYNAMIC 1
15425 EOF
15426
15427                 BUILD_SHELL=mod
15428                 BUILD_SHELL_DYNAMIC=shared
15429                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15430         fi
15431 fi
15432
15433 if test "$ol_enable_tcl" != no ; then
15434         cat >> confdefs.h <<\EOF
15435 #define SLAPD_TCL 1
15436 EOF
15437
15438         BUILD_SLAPD=yes
15439         BUILD_TCL=yes
15440         if test "$ol_with_tcl_module" != static; then
15441                 cat >> confdefs.h <<\EOF
15442 #define SLAPD_TCL_DYNAMIC 1
15443 EOF
15444
15445                 BUILD_TCL=mod
15446                 BUILD_TCL_DYNAMIC=shared
15447                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15448         fi
15449 fi
15450
15451 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15452         $BUILD_SLAPD = yes ; then
15453         BUILD_SLURPD=yes
15454 fi
15455
15456 if test "$ol_link_isode" != no ; then
15457         BUILD_LDAPD=yes
15458 fi
15459
15460
15461 if test "$LINK_BINS_DYNAMIC" = yes; then
15462     LIB_LINKAGE=DYN
15463     LT_LIB_LINKAGE=shared
15464 else
15465     LIB_LINKAGE=STAT
15466     LT_LIB_LINKAGE=static
15467 fi
15468
15469 if test "$ac_cv_mingw32" = yes ; then
15470     PLAT=NT
15471     DYN_EXT=dll
15472 else
15473     PLAT=UNIX
15474     DYN_EXT=so
15475 fi
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486   
15487   
15488   
15489   
15490   
15491   
15492   
15493   
15494   
15495   
15496   
15497   
15498   
15499   
15500   
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532 trap '' 1 2 15
15533
15534 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15535
15536 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15537 # Let make expand exec_prefix.
15538 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15539
15540 # Any assignment to VPATH causes Sun make to only execute
15541 # the first set of double-colon rules, so remove it if not needed.
15542 # If there is a colon in the path, we need to keep it.
15543 if test "x$srcdir" = x.; then
15544   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15545 fi
15546
15547 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15548
15549 DEFS=-DHAVE_CONFIG_H
15550
15551 # Without the "./", some shells look in PATH for config.status.
15552 : ${CONFIG_STATUS=./config.status}
15553
15554 echo creating $CONFIG_STATUS
15555 rm -f $CONFIG_STATUS
15556 cat > $CONFIG_STATUS <<EOF
15557 #! /bin/sh
15558 # Generated automatically by configure.
15559 # Run this file to recreate the current configuration.
15560 # This directory was configured as follows,
15561 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15562 #
15563 # $0 $ac_configure_args
15564 #
15565 # Compiler output produced by configure, useful for debugging
15566 # configure, is in ./config.log if it exists.
15567
15568 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15569 for ac_option
15570 do
15571   case "\$ac_option" in
15572   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15573     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15574     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15575   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15576     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15577     exit 0 ;;
15578   -help | --help | --hel | --he | --h)
15579     echo "\$ac_cs_usage"; exit 0 ;;
15580   *) echo "\$ac_cs_usage"; exit 1 ;;
15581   esac
15582 done
15583
15584 ac_given_srcdir=$srcdir
15585 ac_given_INSTALL="$INSTALL"
15586
15587 trap 'rm -fr `echo "\
15588 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15589 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15590 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15591 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15592 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15593 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15594 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15595 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15596 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15597 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15598 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15599 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15600 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15601 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15602 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15603 include/Makefile:build/top.mk:include/Makefile.in \
15604 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15605 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15606 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15607 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15608 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15609 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15610 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15611 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15612 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15613 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15614 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15615 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15616 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15617 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15618 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15619 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15620 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15621 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15622 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15623 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15624 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15625 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15626 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15627 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15628 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15629 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15630  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15631 EOF
15632 cat >> $CONFIG_STATUS <<EOF
15633
15634 # Protect against being on the right side of a sed subst in config.status.
15635 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15636  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15637 $ac_vpsub
15638 $extrasub
15639 s%@SHELL@%$SHELL%g
15640 s%@CFLAGS@%$CFLAGS%g
15641 s%@CPPFLAGS@%$CPPFLAGS%g
15642 s%@CXXFLAGS@%$CXXFLAGS%g
15643 s%@FFLAGS@%$FFLAGS%g
15644 s%@DEFS@%$DEFS%g
15645 s%@LDFLAGS@%$LDFLAGS%g
15646 s%@LIBS@%$LIBS%g
15647 s%@exec_prefix@%$exec_prefix%g
15648 s%@prefix@%$prefix%g
15649 s%@program_transform_name@%$program_transform_name%g
15650 s%@bindir@%$bindir%g
15651 s%@sbindir@%$sbindir%g
15652 s%@libexecdir@%$libexecdir%g
15653 s%@datadir@%$datadir%g
15654 s%@sysconfdir@%$sysconfdir%g
15655 s%@sharedstatedir@%$sharedstatedir%g
15656 s%@localstatedir@%$localstatedir%g
15657 s%@libdir@%$libdir%g
15658 s%@includedir@%$includedir%g
15659 s%@oldincludedir@%$oldincludedir%g
15660 s%@infodir@%$infodir%g
15661 s%@mandir@%$mandir%g
15662 s%@host@%$host%g
15663 s%@host_alias@%$host_alias%g
15664 s%@host_cpu@%$host_cpu%g
15665 s%@host_vendor@%$host_vendor%g
15666 s%@host_os@%$host_os%g
15667 s%@target@%$target%g
15668 s%@target_alias@%$target_alias%g
15669 s%@target_cpu@%$target_cpu%g
15670 s%@target_vendor@%$target_vendor%g
15671 s%@target_os@%$target_os%g
15672 s%@build@%$build%g
15673 s%@build_alias@%$build_alias%g
15674 s%@build_cpu@%$build_cpu%g
15675 s%@build_vendor@%$build_vendor%g
15676 s%@build_os@%$build_os%g
15677 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15678 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15679 s%@INSTALL_DATA@%$INSTALL_DATA%g
15680 s%@PACKAGE@%$PACKAGE%g
15681 s%@VERSION@%$VERSION%g
15682 s%@ACLOCAL@%$ACLOCAL%g
15683 s%@AUTOCONF@%$AUTOCONF%g
15684 s%@AUTOMAKE@%$AUTOMAKE%g
15685 s%@AUTOHEADER@%$AUTOHEADER%g
15686 s%@MAKEINFO@%$MAKEINFO%g
15687 s%@install_sh@%$install_sh%g
15688 s%@AMTAR@%$AMTAR%g
15689 s%@AWK@%$AWK%g
15690 s%@AMTARFLAGS@%$AMTARFLAGS%g
15691 s%@SET_MAKE@%$SET_MAKE%g
15692 s%@top_builddir@%$top_builddir%g
15693 s%@ldap_subdir@%$ldap_subdir%g
15694 s%@CC@%$CC%g
15695 s%@RANLIB@%$RANLIB%g
15696 s%@LD@%$LD%g
15697 s%@NM@%$NM%g
15698 s%@LN_S@%$LN_S%g
15699 s%@DLLTOOL@%$DLLTOOL%g
15700 s%@AS@%$AS%g
15701 s%@OBJDUMP@%$OBJDUMP%g
15702 s%@LIBTOOL@%$LIBTOOL%g
15703 s%@LN_H@%$LN_H%g
15704 s%@SENDMAIL@%$SENDMAIL%g
15705 s%@EDITOR@%$EDITOR%g
15706 s%@FINGER@%$FINGER%g
15707 s%@PERLBIN@%$PERLBIN%g
15708 s%@CPP@%$CPP%g
15709 s%@EXEEXT@%$EXEEXT%g
15710 s%@OBJEXT@%$OBJEXT%g
15711 s%@OL_MKDEP@%$OL_MKDEP%g
15712 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15713 s%@PEPSY@%$PEPSY%g
15714 s%@LIBOBJS@%$LIBOBJS%g
15715 s%@LIBSRCS@%$LIBSRCS%g
15716 s%@PLAT@%$PLAT%g
15717 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15718 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15719 s%@DYN_EXT@%$DYN_EXT%g
15720 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15721 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15722 s%@BUILD_BDB2@%$BUILD_BDB2%g
15723 s%@BUILD_LDAP@%$BUILD_LDAP%g
15724 s%@BUILD_LDBM@%$BUILD_LDBM%g
15725 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15726 s%@BUILD_PERL@%$BUILD_PERL%g
15727 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15728 s%@BUILD_SHELL@%$BUILD_SHELL%g
15729 s%@BUILD_TCL@%$BUILD_TCL%g
15730 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15731 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15732 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15733 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15734 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15735 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15736 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15737 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15738 s%@LDAP_LIBS@%$LDAP_LIBS%g
15739 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15740 s%@LDIF_LIBS@%$LDIF_LIBS%g
15741 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15742 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15743 s%@LDBM_LIBS@%$LDBM_LIBS%g
15744 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15745 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15746 s%@WRAP_LIBS@%$WRAP_LIBS%g
15747 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15748 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15749 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15750 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15751 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15752 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15753 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15754 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15755 s%@KRB4_LIBS@%$KRB4_LIBS%g
15756 s%@KRB5_LIBS@%$KRB5_LIBS%g
15757 s%@READLINE_LIBS@%$READLINE_LIBS%g
15758 s%@SASL_LIBS@%$SASL_LIBS%g
15759 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15760 s%@TLS_LIBS@%$TLS_LIBS%g
15761 s%@MODULES_LIBS@%$MODULES_LIBS%g
15762
15763 CEOF
15764 EOF
15765
15766 cat >> $CONFIG_STATUS <<\EOF
15767
15768 # Split the substitutions into bite-sized pieces for seds with
15769 # small command number limits, like on Digital OSF/1 and HP-UX.
15770 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15771 ac_file=1 # Number of current file.
15772 ac_beg=1 # First line for current file.
15773 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15774 ac_more_lines=:
15775 ac_sed_cmds=""
15776 while $ac_more_lines; do
15777   if test $ac_beg -gt 1; then
15778     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15779   else
15780     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15781   fi
15782   if test ! -s conftest.s$ac_file; then
15783     ac_more_lines=false
15784     rm -f conftest.s$ac_file
15785   else
15786     if test -z "$ac_sed_cmds"; then
15787       ac_sed_cmds="sed -f conftest.s$ac_file"
15788     else
15789       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15790     fi
15791     ac_file=`expr $ac_file + 1`
15792     ac_beg=$ac_end
15793     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15794   fi
15795 done
15796 if test -z "$ac_sed_cmds"; then
15797   ac_sed_cmds=cat
15798 fi
15799 EOF
15800
15801 cat >> $CONFIG_STATUS <<EOF
15802
15803 CONFIG_FILES=\${CONFIG_FILES-"\
15804 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15805 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15806 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15807 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15808 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15809 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15810 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15811 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15812 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15813 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15814 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15815 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15816 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15817 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15818 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15819 include/Makefile:build/top.mk:include/Makefile.in \
15820 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15821 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15822 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15823 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15824 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15825 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15826 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15827 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15828 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15829 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15830 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15831 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15832 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15833 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15834 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15835 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15836 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15837 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15838 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15839 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15840 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15841 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15842 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15843 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15844 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15845 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15846 "}
15847 EOF
15848 cat >> $CONFIG_STATUS <<\EOF
15849 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15850   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15851   case "$ac_file" in
15852   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15853        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15854   *) ac_file_in="${ac_file}.in" ;;
15855   esac
15856
15857   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15858
15859   # Remove last slash and all that follows it.  Not all systems have dirname.
15860   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15861   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15862     # The file is in a subdirectory.
15863     test ! -d "$ac_dir" && mkdir "$ac_dir"
15864     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15865     # A "../" for each directory in $ac_dir_suffix.
15866     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15867   else
15868     ac_dir_suffix= ac_dots=
15869   fi
15870
15871   case "$ac_given_srcdir" in
15872   .)  srcdir=.
15873       if test -z "$ac_dots"; then top_srcdir=.
15874       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15875   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15876   *) # Relative path.
15877     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15878     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15879   esac
15880
15881   case "$ac_given_INSTALL" in
15882   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15883   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15884   esac
15885
15886   echo creating "$ac_file"
15887   rm -f "$ac_file"
15888   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15889   case "$ac_file" in
15890   *[Mm]akefile*) ac_comsub="1i\\
15891 # $configure_input" ;;
15892   *) ac_comsub= ;;
15893   esac
15894
15895   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15896   sed -e "$ac_comsub
15897 s%@configure_input@%$configure_input%g
15898 s%@srcdir@%$srcdir%g
15899 s%@top_srcdir@%$top_srcdir%g
15900 s%@INSTALL@%$INSTALL%g
15901 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15902 fi; done
15903 rm -f conftest.s*
15904
15905 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15906 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15907 #
15908 # ac_d sets the value in "#define NAME VALUE" lines.
15909 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15910 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15911 ac_dC='\3'
15912 ac_dD='%g'
15913 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15914 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15915 ac_uB='\([      ]\)%\1#\2define\3'
15916 ac_uC=' '
15917 ac_uD='\4%g'
15918 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15919 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15920 ac_eB='$%\1#\2define\3'
15921 ac_eC=' '
15922 ac_eD='%g'
15923
15924 if test "${CONFIG_HEADERS+set}" != set; then
15925 EOF
15926 cat >> $CONFIG_STATUS <<EOF
15927   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15928 EOF
15929 cat >> $CONFIG_STATUS <<\EOF
15930 fi
15931 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15932   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15933   case "$ac_file" in
15934   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15935        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15936   *) ac_file_in="${ac_file}.in" ;;
15937   esac
15938
15939   echo creating $ac_file
15940
15941   rm -f conftest.frag conftest.in conftest.out
15942   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15943   cat $ac_file_inputs > conftest.in
15944
15945 EOF
15946
15947 # Transform confdefs.h into a sed script conftest.vals that substitutes
15948 # the proper values into config.h.in to produce config.h.  And first:
15949 # Protect against being on the right side of a sed subst in config.status.
15950 # Protect against being in an unquoted here document in config.status.
15951 rm -f conftest.vals
15952 cat > conftest.hdr <<\EOF
15953 s/[\\&%]/\\&/g
15954 s%[\\$`]%\\&%g
15955 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15956 s%ac_d%ac_u%gp
15957 s%ac_u%ac_e%gp
15958 EOF
15959 sed -n -f conftest.hdr confdefs.h > conftest.vals
15960 rm -f conftest.hdr
15961
15962 # This sed command replaces #undef with comments.  This is necessary, for
15963 # example, in the case of _POSIX_SOURCE, which is predefined and required
15964 # on some systems where configure will not decide to define it.
15965 cat >> conftest.vals <<\EOF
15966 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15967 EOF
15968
15969 # Break up conftest.vals because some shells have a limit on
15970 # the size of here documents, and old seds have small limits too.
15971
15972 rm -f conftest.tail
15973 while :
15974 do
15975   ac_lines=`grep -c . conftest.vals`
15976   # grep -c gives empty output for an empty file on some AIX systems.
15977   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15978   # Write a limited-size here document to conftest.frag.
15979   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15980   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15981   echo 'CEOF
15982   sed -f conftest.frag conftest.in > conftest.out
15983   rm -f conftest.in
15984   mv conftest.out conftest.in
15985 ' >> $CONFIG_STATUS
15986   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15987   rm -f conftest.vals
15988   mv conftest.tail conftest.vals
15989 done
15990 rm -f conftest.vals
15991
15992 cat >> $CONFIG_STATUS <<\EOF
15993   rm -f conftest.frag conftest.h
15994   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15995   cat conftest.in >> conftest.h
15996   rm -f conftest.in
15997   if cmp -s $ac_file conftest.h 2>/dev/null; then
15998     echo "$ac_file is unchanged"
15999     rm -f conftest.h
16000   else
16001     # Remove last slash and all that follows it.  Not all systems have dirname.
16002       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16003       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16004       # The file is in a subdirectory.
16005       test ! -d "$ac_dir" && mkdir "$ac_dir"
16006     fi
16007     rm -f $ac_file
16008     mv conftest.h $ac_file
16009   fi
16010 fi; done
16011
16012 EOF
16013 cat >> $CONFIG_STATUS <<EOF
16014
16015 EOF
16016 cat >> $CONFIG_STATUS <<\EOF
16017
16018 date > stamp-h
16019 echo Please \"make depend\" to build dependencies
16020
16021 exit 0
16022 EOF
16023 chmod +x $CONFIG_STATUS
16024 rm -fr confdefs* $ac_clean_files
16025 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16026