]> git.sur5r.net Git - openldap/blob - configure
getbyname/getbyaddr should share mutex per ITS#563.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.306 2000/06/05 05:19:11 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals    enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind        enable V2 Kerberos IV bind (auto)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-ldapi        enable domain socket (PF_LOCAL) ldap (no)"
45 ac_help="$ac_help
46   --enable-x-compile    enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl     with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch          with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos       with support (auto)"
53 ac_help="$ac_help
54   --with-readline       with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads        use threads (auto)"
57 ac_help="$ac_help
58   --with-tls            with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select        with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd        enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-cleartext  enable cleartext passwords (yes)"
67 ac_help="$ac_help
68     --enable-crypt      enable crypt(3) passwords (auto)"
69 ac_help="$ac_help
70     --enable-kpasswd    enable kerberos password verification (no)"
71 ac_help="$ac_help
72     --enable-spasswd    enable (Cyrus) SASL password verification (no)"
73 ac_help="$ac_help
74     --enable-modules    enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster        enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic   enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-quipu      build quipu migration tools (no)"
81 ac_help="$ac_help
82     --enable-rlookups   enable reverse lookups (auto)"
83 ac_help="$ac_help
84     --enable-aci        enable per-object ACIs (no)"
85 ac_help="$ac_help
86     --enable-wrappers   enable tcp wrapper support (no)"
87 ac_help="$ac_help
88     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
89 ac_help="$ac_help
90     --enable-bdb2       enable bdb2 backend (no)"
91 ac_help="$ac_help
92       --with-bdb2-module        module type (static)"
93 ac_help="$ac_help
94     --enable-dnssrv     enable bdb2 backend (no)"
95 ac_help="$ac_help
96       --with-dnssrv-module      module type (static)"
97 ac_help="$ac_help
98     --enable-ldap       enable ldap backend (no)"
99 ac_help="$ac_help
100       --with-ldap-module        module type (static)"
101 ac_help="$ac_help
102     --enable-ldbm       enable ldbm backend (yes)"
103 ac_help="$ac_help
104       --with-ldbm-api   use LDBM API (auto)"
105 ac_help="$ac_help
106       --with-ldbm-module        module type (static)"
107 ac_help="$ac_help
108       --with-ldbm-type  use LDBM type (auto)"
109 ac_help="$ac_help
110     --enable-passwd     enable passwd backend (no)"
111 ac_help="$ac_help
112       --with-passwd-module      module type (static)"
113 ac_help="$ac_help
114     --enable-perl       enable perl backend (no)"
115 ac_help="$ac_help
116       --with-perl-module        module type (static)"
117 ac_help="$ac_help
118     --enable-shell      enable shell backend (no)"
119 ac_help="$ac_help
120       --with-shell-module       module type (static)"
121 ac_help="$ac_help
122     --enable-sql        enable sql backend (no)"
123 ac_help="$ac_help
124       --with-sql-module module type (static)"
125 ac_help="$ac_help
126     --enable-tcl        enable tcl backend (no)"
127 ac_help="$ac_help
128       --with-tcl-module module type (static)"
129 ac_help="$ac_help
130 SLURPD (Replication Daemon) Options:"
131 ac_help="$ac_help
132   --enable-slurpd       enable building slurpd (auto)"
133 ac_help="$ac_help
134 Library Generation & Linking Options"
135 ac_help="$ac_help
136   --enable-static[=PKGS]  build static libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-shared[=PKGS]  build shared libraries [default=yes]"
139 ac_help="$ac_help
140   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
141 ac_help="$ac_help
142   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
143 ac_help="$ac_help
144   --disable-libtool-lock  avoid locking (might break parallel builds)"
145
146 # Initialize some variables set by options.
147 # The variables have the same names as the options, with
148 # dashes changed to underlines.
149 build=NONE
150 cache_file=./config.cache
151 exec_prefix=NONE
152 host=NONE
153 no_create=
154 nonopt=NONE
155 no_recursion=
156 prefix=NONE
157 program_prefix=NONE
158 program_suffix=NONE
159 program_transform_name=s,x,x,
160 silent=
161 site=
162 srcdir=
163 target=NONE
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167 bindir='${exec_prefix}/bin'
168 sbindir='${exec_prefix}/sbin'
169 libexecdir='${exec_prefix}/libexec'
170 datadir='${prefix}/share'
171 sysconfdir='${prefix}/etc'
172 sharedstatedir='${prefix}/com'
173 localstatedir='${prefix}/var'
174 libdir='${exec_prefix}/lib'
175 includedir='${prefix}/include'
176 oldincludedir='/usr/include'
177 infodir='${prefix}/info'
178 mandir='${prefix}/man'
179
180 # Initialize some other variables.
181 subdirs=
182 MFLAGS= MAKEFLAGS=
183 SHELL=${CONFIG_SHELL-/bin/sh}
184 # Maximum number of lines to put in a shell here document.
185 ac_max_here_lines=12
186
187 ac_prev=
188 for ac_option
189 do
190
191   # If the previous option needs an argument, assign it.
192   if test -n "$ac_prev"; then
193     eval "$ac_prev=\$ac_option"
194     ac_prev=
195     continue
196   fi
197
198   case "$ac_option" in
199   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
200   *) ac_optarg= ;;
201   esac
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case "$ac_option" in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir="$ac_optarg" ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build="$ac_optarg" ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file="$ac_optarg" ;;
223
224   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
225     ac_prev=datadir ;;
226   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
227   | --da=*)
228     datadir="$ac_optarg" ;;
229
230   -disable-* | --disable-*)
231     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
232     # Reject names that are not valid shell variable names.
233     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
234       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
235     fi
236     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
237     eval "enable_${ac_feature}=no" ;;
238
239   -enable-* | --enable-*)
240     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
241     # Reject names that are not valid shell variable names.
242     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
243       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
244     fi
245     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
246     case "$ac_option" in
247       *=*) ;;
248       *) ac_optarg=yes ;;
249     esac
250     eval "enable_${ac_feature}='$ac_optarg'" ;;
251
252   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
253   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
254   | --exec | --exe | --ex)
255     ac_prev=exec_prefix ;;
256   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
257   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
258   | --exec=* | --exe=* | --ex=*)
259     exec_prefix="$ac_optarg" ;;
260
261   -gas | --gas | --ga | --g)
262     # Obsolete; use --with-gas.
263     with_gas=yes ;;
264
265   -help | --help | --hel | --he)
266     # Omit some internal or obsolete options to make the list less imposing.
267     # This message is too long to be a string in the A/UX 3.1 sh.
268     cat << EOF
269 Usage: configure [options] [host]
270 Options: [defaults in brackets after descriptions]
271 Configuration:
272   --cache-file=FILE       cache test results in FILE
273   --help                  print this message
274   --no-create             do not create output files
275   --quiet, --silent       do not print \`checking...' messages
276   --version               print the version of autoconf that created configure
277 Directory and file names:
278   --prefix=PREFIX         install architecture-independent files in PREFIX
279                           [$ac_default_prefix]
280   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
281                           [same as prefix]
282   --bindir=DIR            user executables in DIR [EPREFIX/bin]
283   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
284   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
285   --datadir=DIR           read-only architecture-independent data in DIR
286                           [PREFIX/share]
287   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
288   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
289                           [PREFIX/com]
290   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
291   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
292   --includedir=DIR        C header files in DIR [PREFIX/include]
293   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
294   --infodir=DIR           info documentation in DIR [PREFIX/info]
295   --mandir=DIR            man documentation in DIR [PREFIX/man]
296   --srcdir=DIR            find the sources in DIR [configure dir or ..]
297   --program-prefix=PREFIX prepend PREFIX to installed program names
298   --program-suffix=SUFFIX append SUFFIX to installed program names
299   --program-transform-name=PROGRAM
300                           run sed PROGRAM on installed program names
301 EOF
302     cat << EOF
303 Host type:
304   --build=BUILD           configure for building on BUILD [BUILD=HOST]
305   --host=HOST             configure for HOST [guessed]
306   --target=TARGET         configure for TARGET [TARGET=HOST]
307 Features and packages:
308   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
309   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
310   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
311   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
312   --x-includes=DIR        X include files are in DIR
313   --x-libraries=DIR       X library files are in DIR
314 EOF
315     if test -n "$ac_help"; then
316       echo "--enable and --with options recognized:$ac_help"
317     fi
318     exit 0 ;;
319
320   -host | --host | --hos | --ho)
321     ac_prev=host ;;
322   -host=* | --host=* | --hos=* | --ho=*)
323     host="$ac_optarg" ;;
324
325   -includedir | --includedir | --includedi | --included | --include \
326   | --includ | --inclu | --incl | --inc)
327     ac_prev=includedir ;;
328   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
329   | --includ=* | --inclu=* | --incl=* | --inc=*)
330     includedir="$ac_optarg" ;;
331
332   -infodir | --infodir | --infodi | --infod | --info | --inf)
333     ac_prev=infodir ;;
334   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
335     infodir="$ac_optarg" ;;
336
337   -libdir | --libdir | --libdi | --libd)
338     ac_prev=libdir ;;
339   -libdir=* | --libdir=* | --libdi=* | --libd=*)
340     libdir="$ac_optarg" ;;
341
342   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
343   | --libexe | --libex | --libe)
344     ac_prev=libexecdir ;;
345   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
346   | --libexe=* | --libex=* | --libe=*)
347     libexecdir="$ac_optarg" ;;
348
349   -localstatedir | --localstatedir | --localstatedi | --localstated \
350   | --localstate | --localstat | --localsta | --localst \
351   | --locals | --local | --loca | --loc | --lo)
352     ac_prev=localstatedir ;;
353   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
354   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
355   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
356     localstatedir="$ac_optarg" ;;
357
358   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
359     ac_prev=mandir ;;
360   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
361     mandir="$ac_optarg" ;;
362
363   -nfp | --nfp | --nf)
364     # Obsolete; use --without-fp.
365     with_fp=no ;;
366
367   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
368   | --no-cr | --no-c)
369     no_create=yes ;;
370
371   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
372   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
373     no_recursion=yes ;;
374
375   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
376   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
377   | --oldin | --oldi | --old | --ol | --o)
378     ac_prev=oldincludedir ;;
379   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
380   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
381   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
382     oldincludedir="$ac_optarg" ;;
383
384   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
385     ac_prev=prefix ;;
386   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
387     prefix="$ac_optarg" ;;
388
389   -program-prefix | --program-prefix | --program-prefi | --program-pref \
390   | --program-pre | --program-pr | --program-p)
391     ac_prev=program_prefix ;;
392   -program-prefix=* | --program-prefix=* | --program-prefi=* \
393   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
394     program_prefix="$ac_optarg" ;;
395
396   -program-suffix | --program-suffix | --program-suffi | --program-suff \
397   | --program-suf | --program-su | --program-s)
398     ac_prev=program_suffix ;;
399   -program-suffix=* | --program-suffix=* | --program-suffi=* \
400   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
401     program_suffix="$ac_optarg" ;;
402
403   -program-transform-name | --program-transform-name \
404   | --program-transform-nam | --program-transform-na \
405   | --program-transform-n | --program-transform- \
406   | --program-transform | --program-transfor \
407   | --program-transfo | --program-transf \
408   | --program-trans | --program-tran \
409   | --progr-tra | --program-tr | --program-t)
410     ac_prev=program_transform_name ;;
411   -program-transform-name=* | --program-transform-name=* \
412   | --program-transform-nam=* | --program-transform-na=* \
413   | --program-transform-n=* | --program-transform-=* \
414   | --program-transform=* | --program-transfor=* \
415   | --program-transfo=* | --program-transf=* \
416   | --program-trans=* | --program-tran=* \
417   | --progr-tra=* | --program-tr=* | --program-t=*)
418     program_transform_name="$ac_optarg" ;;
419
420   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
421   | -silent | --silent | --silen | --sile | --sil)
422     silent=yes ;;
423
424   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
425     ac_prev=sbindir ;;
426   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
427   | --sbi=* | --sb=*)
428     sbindir="$ac_optarg" ;;
429
430   -sharedstatedir | --sharedstatedir | --sharedstatedi \
431   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
432   | --sharedst | --shareds | --shared | --share | --shar \
433   | --sha | --sh)
434     ac_prev=sharedstatedir ;;
435   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
436   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
437   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
438   | --sha=* | --sh=*)
439     sharedstatedir="$ac_optarg" ;;
440
441   -site | --site | --sit)
442     ac_prev=site ;;
443   -site=* | --site=* | --sit=*)
444     site="$ac_optarg" ;;
445
446   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
447     ac_prev=srcdir ;;
448   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
449     srcdir="$ac_optarg" ;;
450
451   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
452   | --syscon | --sysco | --sysc | --sys | --sy)
453     ac_prev=sysconfdir ;;
454   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
455   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
456     sysconfdir="$ac_optarg" ;;
457
458   -target | --target | --targe | --targ | --tar | --ta | --t)
459     ac_prev=target ;;
460   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
461     target="$ac_optarg" ;;
462
463   -v | -verbose | --verbose | --verbos | --verbo | --verb)
464     verbose=yes ;;
465
466   -version | --version | --versio | --versi | --vers)
467     echo "configure generated by autoconf version 2.13.1"
468     exit 0 ;;
469
470   -with-* | --with-*)
471     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
472     # Reject names that are not valid shell variable names.
473     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
474       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
475     fi
476     ac_package=`echo $ac_package| sed 's/-/_/g'`
477     case "$ac_option" in
478       *=*) ;;
479       *) ac_optarg=yes ;;
480     esac
481     eval "with_${ac_package}='$ac_optarg'" ;;
482
483   -without-* | --without-*)
484     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
485     # Reject names that are not valid shell variable names.
486     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
487       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
488     fi
489     ac_package=`echo $ac_package| sed 's/-/_/g'`
490     eval "with_${ac_package}=no" ;;
491
492   --x)
493     # Obsolete; use --with-x.
494     with_x=yes ;;
495
496   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
497   | --x-incl | --x-inc | --x-in | --x-i)
498     ac_prev=x_includes ;;
499   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
500   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
501     x_includes="$ac_optarg" ;;
502
503   -x-libraries | --x-libraries | --x-librarie | --x-librari \
504   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
505     ac_prev=x_libraries ;;
506   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
507   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
508     x_libraries="$ac_optarg" ;;
509
510   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
511     ;;
512
513   *)
514     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
515       echo "configure: warning: $ac_option: invalid host type" 1>&2
516     fi
517     if test "x$nonopt" != xNONE; then
518       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
519     fi
520     nonopt="$ac_option"
521     ;;
522
523   esac
524 done
525
526 if test -n "$ac_prev"; then
527   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
528 fi
529
530 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
531
532 # File descriptor usage:
533 # 0 standard input
534 # 1 file creation
535 # 2 errors and warnings
536 # 3 some systems may open it to /dev/tty
537 # 4 used on the Kubota Titan
538 # 6 checking for... messages and results
539 # 5 compiler messages saved in config.log
540 if test "$silent" = yes; then
541   exec 6>/dev/null
542 else
543   exec 6>&1
544 fi
545 exec 5>./config.log
546
547 echo "\
548 This file contains any messages produced by compilers while
549 running configure, to aid debugging if configure makes a mistake.
550 " 1>&5
551
552 # Strip out --no-create and --no-recursion so they do not pile up.
553 # Also quote any args containing shell metacharacters.
554 ac_configure_args=
555 for ac_arg
556 do
557   case "$ac_arg" in
558   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
559   | --no-cr | --no-c) ;;
560   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
561   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
562   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
563   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
564   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
565   esac
566 done
567
568 # NLS nuisances.
569 # Only set these to C if already set.  These must not be set unconditionally
570 # because not all systems understand e.g. LANG=C (notably SCO).
571 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
572 # Non-C LC_CTYPE values break the ctype check.
573 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
574 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
575 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
576 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
577
578 # confdefs.h avoids OS command line length limits that DEFS can exceed.
579 rm -rf conftest* confdefs.h
580 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
581 echo > confdefs.h
582
583 # A filename unique to this package, relative to the directory that
584 # configure is in, which we can look for to find out if srcdir is correct.
585 ac_unique_file=build/version
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-referrals
1255         # Check whether --enable-referrals or --disable-referrals was given.
1256 if test "${enable_referrals+set}" = set; then
1257   enableval="$enable_referrals"
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-referrals" 1>&2; exit 1; }
1267         fi
1268         ol_enable_referrals="$ol_arg"
1269
1270 else
1271         ol_enable_referrals="yes"
1272 fi
1273 # end --enable-referrals
1274 # OpenLDAP --enable-kbind
1275         # Check whether --enable-kbind or --disable-kbind was given.
1276 if test "${enable_kbind+set}" = set; then
1277   enableval="$enable_kbind"
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-kbind" 1>&2; exit 1; }
1287         fi
1288         ol_enable_kbind="$ol_arg"
1289
1290 else
1291         ol_enable_kbind="auto"
1292 fi
1293 # end --enable-kbind
1294 # OpenLDAP --enable-cldap
1295         # Check whether --enable-cldap or --disable-cldap was given.
1296 if test "${enable_cldap+set}" = set; then
1297   enableval="$enable_cldap"
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-cldap" 1>&2; exit 1; }
1307         fi
1308         ol_enable_cldap="$ol_arg"
1309
1310 else
1311         ol_enable_cldap="no"
1312 fi
1313 # end --enable-cldap
1314 # OpenLDAP --enable-ldapi
1315         # Check whether --enable-ldapi or --disable-ldapi was given.
1316 if test "${enable_ldapi+set}" = set; then
1317   enableval="$enable_ldapi"
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-ldapi" 1>&2; exit 1; }
1327         fi
1328         ol_enable_ldapi="$ol_arg"
1329
1330 else
1331         ol_enable_ldapi="no"
1332 fi
1333 # end --enable-ldapi
1334 # OpenLDAP --enable-x_compile
1335         # Check whether --enable-x_compile or --disable-x_compile was given.
1336 if test "${enable_x_compile+set}" = set; then
1337   enableval="$enable_x_compile"
1338   
1339         ol_arg=invalid
1340         for ol_val in 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-x_compile" 1>&2; exit 1; }
1347         fi
1348         ol_enable_x_compile="$ol_arg"
1349
1350 else
1351         ol_enable_x_compile="no"
1352 fi
1353 # end --enable-x_compile
1354
1355
1356 # OpenLDAP --with-cyrus_sasl
1357         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1358 if test "${with_cyrus_sasl+set}" = set; then
1359   withval="$with_cyrus_sasl"
1360   
1361         ol_arg=invalid
1362         for ol_val in auto yes no  ; do
1363                 if test "$withval" = "$ol_val" ; then
1364                         ol_arg="$ol_val"
1365                 fi
1366         done
1367         if test "$ol_arg" = "invalid" ; then
1368                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1369         fi
1370         ol_with_cyrus_sasl="$ol_arg"
1371
1372 else
1373         ol_with_cyrus_sasl="auto"
1374 fi
1375 # end --with-cyrus_sasl
1376
1377 # OpenLDAP --with-fetch
1378         # Check whether --with-fetch or --without-fetch was given.
1379 if test "${with_fetch+set}" = set; then
1380   withval="$with_fetch"
1381   
1382         ol_arg=invalid
1383         for ol_val in auto yes no  ; do
1384                 if test "$withval" = "$ol_val" ; then
1385                         ol_arg="$ol_val"
1386                 fi
1387         done
1388         if test "$ol_arg" = "invalid" ; then
1389                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1390         fi
1391         ol_with_fetch="$ol_arg"
1392
1393 else
1394         ol_with_fetch="auto"
1395 fi
1396 # end --with-fetch
1397
1398 # OpenLDAP --with-kerberos
1399         # Check whether --with-kerberos or --without-kerberos was given.
1400 if test "${with_kerberos+set}" = set; then
1401   withval="$with_kerberos"
1402   
1403         ol_arg=invalid
1404         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1405                 if test "$withval" = "$ol_val" ; then
1406                         ol_arg="$ol_val"
1407                 fi
1408         done
1409         if test "$ol_arg" = "invalid" ; then
1410                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1411         fi
1412         ol_with_kerberos="$ol_arg"
1413
1414 else
1415         ol_with_kerberos="auto"
1416 fi
1417 # end --with-kerberos
1418
1419 # OpenLDAP --with-readline
1420         # Check whether --with-readline or --without-readline was given.
1421 if test "${with_readline+set}" = set; then
1422   withval="$with_readline"
1423   
1424         ol_arg=invalid
1425         for ol_val in auto yes no  ; do
1426                 if test "$withval" = "$ol_val" ; then
1427                         ol_arg="$ol_val"
1428                 fi
1429         done
1430         if test "$ol_arg" = "invalid" ; then
1431                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1432         fi
1433         ol_with_readline="$ol_arg"
1434
1435 else
1436         ol_with_readline="auto"
1437 fi
1438 # end --with-readline
1439
1440 # OpenLDAP --with-threads
1441         # Check whether --with-threads or --without-threads was given.
1442 if test "${with_threads+set}" = set; then
1443   withval="$with_threads"
1444   
1445         ol_arg=invalid
1446         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1447                 if test "$withval" = "$ol_val" ; then
1448                         ol_arg="$ol_val"
1449                 fi
1450         done
1451         if test "$ol_arg" = "invalid" ; then
1452                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1453         fi
1454         ol_with_threads="$ol_arg"
1455
1456 else
1457         ol_with_threads="auto"
1458 fi
1459 # end --with-threads
1460
1461 # OpenLDAP --with-tls
1462         # Check whether --with-tls or --without-tls was given.
1463 if test "${with_tls+set}" = set; then
1464   withval="$with_tls"
1465   
1466         ol_arg=invalid
1467         for ol_val in auto ssleay openssl yes no  ; do
1468                 if test "$withval" = "$ol_val" ; then
1469                         ol_arg="$ol_val"
1470                 fi
1471         done
1472         if test "$ol_arg" = "invalid" ; then
1473                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1474         fi
1475         ol_with_tls="$ol_arg"
1476
1477 else
1478         ol_with_tls="auto"
1479 fi
1480 # end --with-tls
1481
1482 # OpenLDAP --with-yielding_select
1483         # Check whether --with-yielding_select or --without-yielding_select was given.
1484 if test "${with_yielding_select+set}" = set; then
1485   withval="$with_yielding_select"
1486   
1487         ol_arg=invalid
1488         for ol_val in auto yes no manual  ; do
1489                 if test "$withval" = "$ol_val" ; then
1490                         ol_arg="$ol_val"
1491                 fi
1492         done
1493         if test "$ol_arg" = "invalid" ; then
1494                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1495         fi
1496         ol_with_yielding_select="$ol_arg"
1497
1498 else
1499         ol_with_yielding_select="auto"
1500 fi
1501 # end --with-yielding_select
1502
1503
1504
1505 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1506 if test "${with_xxslapdoptions+set}" = set; then
1507   withval="$with_xxslapdoptions"
1508   :
1509 fi
1510
1511 # OpenLDAP --enable-slapd
1512         # Check whether --enable-slapd or --disable-slapd was given.
1513 if test "${enable_slapd+set}" = set; then
1514   enableval="$enable_slapd"
1515   
1516         ol_arg=invalid
1517         for ol_val in auto yes no ; do
1518                 if test "$enableval" = "$ol_val" ; then
1519                         ol_arg="$ol_val"
1520                 fi
1521         done
1522         if test "$ol_arg" = "invalid" ; then
1523                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1524         fi
1525         ol_enable_slapd="$ol_arg"
1526
1527 else
1528         ol_enable_slapd="yes"
1529 fi
1530 # end --enable-slapd
1531 # OpenLDAP --enable-cleartext
1532         # Check whether --enable-cleartext or --disable-cleartext was given.
1533 if test "${enable_cleartext+set}" = set; then
1534   enableval="$enable_cleartext"
1535   
1536         ol_arg=invalid
1537         for ol_val in auto yes no ; do
1538                 if test "$enableval" = "$ol_val" ; then
1539                         ol_arg="$ol_val"
1540                 fi
1541         done
1542         if test "$ol_arg" = "invalid" ; then
1543                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1544         fi
1545         ol_enable_cleartext="$ol_arg"
1546
1547 else
1548         ol_enable_cleartext="yes"
1549 fi
1550 # end --enable-cleartext
1551 # OpenLDAP --enable-crypt
1552         # Check whether --enable-crypt or --disable-crypt was given.
1553 if test "${enable_crypt+set}" = set; then
1554   enableval="$enable_crypt"
1555   
1556         ol_arg=invalid
1557         for ol_val in auto yes no ; do
1558                 if test "$enableval" = "$ol_val" ; then
1559                         ol_arg="$ol_val"
1560                 fi
1561         done
1562         if test "$ol_arg" = "invalid" ; then
1563                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1564         fi
1565         ol_enable_crypt="$ol_arg"
1566
1567 else
1568         ol_enable_crypt="auto"
1569 fi
1570 # end --enable-crypt
1571 # OpenLDAP --enable-kpasswd
1572         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1573 if test "${enable_kpasswd+set}" = set; then
1574   enableval="$enable_kpasswd"
1575   
1576         ol_arg=invalid
1577         for ol_val in auto yes no ; do
1578                 if test "$enableval" = "$ol_val" ; then
1579                         ol_arg="$ol_val"
1580                 fi
1581         done
1582         if test "$ol_arg" = "invalid" ; then
1583                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1584         fi
1585         ol_enable_kpasswd="$ol_arg"
1586
1587 else
1588         ol_enable_kpasswd="no"
1589 fi
1590 # end --enable-kpasswd
1591 # OpenLDAP --enable-spasswd
1592         # Check whether --enable-spasswd or --disable-spasswd was given.
1593 if test "${enable_spasswd+set}" = set; then
1594   enableval="$enable_spasswd"
1595   
1596         ol_arg=invalid
1597         for ol_val in auto yes no ; do
1598                 if test "$enableval" = "$ol_val" ; then
1599                         ol_arg="$ol_val"
1600                 fi
1601         done
1602         if test "$ol_arg" = "invalid" ; then
1603                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1604         fi
1605         ol_enable_spasswd="$ol_arg"
1606
1607 else
1608         ol_enable_spasswd="no"
1609 fi
1610 # end --enable-spasswd
1611 # OpenLDAP --enable-modules
1612         # Check whether --enable-modules or --disable-modules was given.
1613 if test "${enable_modules+set}" = set; then
1614   enableval="$enable_modules"
1615   
1616         ol_arg=invalid
1617         for ol_val in auto yes no ; do
1618                 if test "$enableval" = "$ol_val" ; then
1619                         ol_arg="$ol_val"
1620                 fi
1621         done
1622         if test "$ol_arg" = "invalid" ; then
1623                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1624         fi
1625         ol_enable_modules="$ol_arg"
1626
1627 else
1628         ol_enable_modules="no"
1629 fi
1630 # end --enable-modules
1631 # OpenLDAP --enable-multimaster
1632         # Check whether --enable-multimaster or --disable-multimaster was given.
1633 if test "${enable_multimaster+set}" = set; then
1634   enableval="$enable_multimaster"
1635   
1636         ol_arg=invalid
1637         for ol_val in auto yes no ; do
1638                 if test "$enableval" = "$ol_val" ; then
1639                         ol_arg="$ol_val"
1640                 fi
1641         done
1642         if test "$ol_arg" = "invalid" ; then
1643                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1644         fi
1645         ol_enable_multimaster="$ol_arg"
1646
1647 else
1648         ol_enable_multimaster="no"
1649 fi
1650 # end --enable-multimaster
1651 # OpenLDAP --enable-phonetic
1652         # Check whether --enable-phonetic or --disable-phonetic was given.
1653 if test "${enable_phonetic+set}" = set; then
1654   enableval="$enable_phonetic"
1655   
1656         ol_arg=invalid
1657         for ol_val in auto yes no ; do
1658                 if test "$enableval" = "$ol_val" ; then
1659                         ol_arg="$ol_val"
1660                 fi
1661         done
1662         if test "$ol_arg" = "invalid" ; then
1663                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1664         fi
1665         ol_enable_phonetic="$ol_arg"
1666
1667 else
1668         ol_enable_phonetic="no"
1669 fi
1670 # end --enable-phonetic
1671 # OpenLDAP --enable-quipu
1672         # Check whether --enable-quipu or --disable-quipu was given.
1673 if test "${enable_quipu+set}" = set; then
1674   enableval="$enable_quipu"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1684         fi
1685         ol_enable_quipu="$ol_arg"
1686
1687 else
1688         ol_enable_quipu="no"
1689 fi
1690 # end --enable-quipu
1691 # OpenLDAP --enable-rlookups
1692         # Check whether --enable-rlookups or --disable-rlookups was given.
1693 if test "${enable_rlookups+set}" = set; then
1694   enableval="$enable_rlookups"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1704         fi
1705         ol_enable_rlookups="$ol_arg"
1706
1707 else
1708         ol_enable_rlookups="auto"
1709 fi
1710 # end --enable-rlookups
1711 # OpenLDAP --enable-aci
1712         # Check whether --enable-aci or --disable-aci was given.
1713 if test "${enable_aci+set}" = set; then
1714   enableval="$enable_aci"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1724         fi
1725         ol_enable_aci="$ol_arg"
1726
1727 else
1728         ol_enable_aci="no"
1729 fi
1730 # end --enable-aci
1731 # OpenLDAP --enable-wrappers
1732         # Check whether --enable-wrappers or --disable-wrappers was given.
1733 if test "${enable_wrappers+set}" = set; then
1734   enableval="$enable_wrappers"
1735   
1736         ol_arg=invalid
1737         for ol_val in auto yes no ; do
1738                 if test "$enableval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1744         fi
1745         ol_enable_wrappers="$ol_arg"
1746
1747 else
1748         ol_enable_wrappers="no"
1749 fi
1750 # end --enable-wrappers
1751 # OpenLDAP --enable-dynamic
1752         # Check whether --enable-dynamic or --disable-dynamic was given.
1753 if test "${enable_dynamic+set}" = set; then
1754   enableval="$enable_dynamic"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1764         fi
1765         ol_enable_dynamic="$ol_arg"
1766
1767 else
1768         ol_enable_dynamic="no"
1769 fi
1770 # end --enable-dynamic
1771
1772 # OpenLDAP --enable-bdb2
1773         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1774 if test "${enable_bdb2+set}" = set; then
1775   enableval="$enable_bdb2"
1776   
1777         ol_arg=invalid
1778         for ol_val in auto yes no ; do
1779                 if test "$enableval" = "$ol_val" ; then
1780                         ol_arg="$ol_val"
1781                 fi
1782         done
1783         if test "$ol_arg" = "invalid" ; then
1784                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1785         fi
1786         ol_enable_bdb2="$ol_arg"
1787
1788 else
1789         ol_enable_bdb2="no"
1790 fi
1791 # end --enable-bdb2
1792 # OpenLDAP --with-bdb2_module
1793         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1794 if test "${with_bdb2_module+set}" = set; then
1795   withval="$with_bdb2_module"
1796   
1797         ol_arg=invalid
1798         for ol_val in static dynamic ; do
1799                 if test "$withval" = "$ol_val" ; then
1800                         ol_arg="$ol_val"
1801                 fi
1802         done
1803         if test "$ol_arg" = "invalid" ; then
1804                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1805         fi
1806         ol_with_bdb2_module="$ol_arg"
1807
1808 else
1809         ol_with_bdb2_module="static"
1810 fi
1811 # end --with-bdb2_module
1812
1813 # OpenLDAP --enable-dnssrv
1814         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1815 if test "${enable_dnssrv+set}" = set; then
1816   enableval="$enable_dnssrv"
1817   
1818         ol_arg=invalid
1819         for ol_val in auto yes no ; do
1820                 if test "$enableval" = "$ol_val" ; then
1821                         ol_arg="$ol_val"
1822                 fi
1823         done
1824         if test "$ol_arg" = "invalid" ; then
1825                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1826         fi
1827         ol_enable_dnssrv="$ol_arg"
1828
1829 else
1830         ol_enable_dnssrv="no"
1831 fi
1832 # end --enable-dnssrv
1833 # OpenLDAP --with-dnssrv_module
1834         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1835 if test "${with_dnssrv_module+set}" = set; then
1836   withval="$with_dnssrv_module"
1837   
1838         ol_arg=invalid
1839         for ol_val in static dynamic ; do
1840                 if test "$withval" = "$ol_val" ; then
1841                         ol_arg="$ol_val"
1842                 fi
1843         done
1844         if test "$ol_arg" = "invalid" ; then
1845                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1846         fi
1847         ol_with_dnssrv_module="$ol_arg"
1848
1849 else
1850         ol_with_dnssrv_module="static"
1851 fi
1852 # end --with-dnssrv_module
1853
1854 # OpenLDAP --enable-ldap
1855         # Check whether --enable-ldap or --disable-ldap was given.
1856 if test "${enable_ldap+set}" = set; then
1857   enableval="$enable_ldap"
1858   
1859         ol_arg=invalid
1860         for ol_val in auto yes no ; do
1861                 if test "$enableval" = "$ol_val" ; then
1862                         ol_arg="$ol_val"
1863                 fi
1864         done
1865         if test "$ol_arg" = "invalid" ; then
1866                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1867         fi
1868         ol_enable_ldap="$ol_arg"
1869
1870 else
1871         ol_enable_ldap="no"
1872 fi
1873 # end --enable-ldap
1874 # OpenLDAP --with-ldap_module
1875         # Check whether --with-ldap_module or --without-ldap_module was given.
1876 if test "${with_ldap_module+set}" = set; then
1877   withval="$with_ldap_module"
1878   
1879         ol_arg=invalid
1880         for ol_val in static dynamic ; do
1881                 if test "$withval" = "$ol_val" ; then
1882                         ol_arg="$ol_val"
1883                 fi
1884         done
1885         if test "$ol_arg" = "invalid" ; then
1886                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1887         fi
1888         ol_with_ldap_module="$ol_arg"
1889
1890 else
1891         ol_with_ldap_module="static"
1892 fi
1893 # end --with-ldap_module
1894
1895 # OpenLDAP --enable-ldbm
1896         # Check whether --enable-ldbm or --disable-ldbm was given.
1897 if test "${enable_ldbm+set}" = set; then
1898   enableval="$enable_ldbm"
1899   
1900         ol_arg=invalid
1901         for ol_val in auto yes no ; do
1902                 if test "$enableval" = "$ol_val" ; then
1903                         ol_arg="$ol_val"
1904                 fi
1905         done
1906         if test "$ol_arg" = "invalid" ; then
1907                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1908         fi
1909         ol_enable_ldbm="$ol_arg"
1910
1911 else
1912         ol_enable_ldbm="yes"
1913 fi
1914 # end --enable-ldbm
1915 # OpenLDAP --with-ldbm_api
1916         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1917 if test "${with_ldbm_api+set}" = set; then
1918   withval="$with_ldbm_api"
1919   
1920         ol_arg=invalid
1921         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1922                 if test "$withval" = "$ol_val" ; then
1923                         ol_arg="$ol_val"
1924                 fi
1925         done
1926         if test "$ol_arg" = "invalid" ; then
1927                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1928         fi
1929         ol_with_ldbm_api="$ol_arg"
1930
1931 else
1932         ol_with_ldbm_api="auto"
1933 fi
1934 # end --with-ldbm_api
1935
1936 # OpenLDAP --with-ldbm_module
1937         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1938 if test "${with_ldbm_module+set}" = set; then
1939   withval="$with_ldbm_module"
1940   
1941         ol_arg=invalid
1942         for ol_val in static dynamic ; do
1943                 if test "$withval" = "$ol_val" ; then
1944                         ol_arg="$ol_val"
1945                 fi
1946         done
1947         if test "$ol_arg" = "invalid" ; then
1948                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1949         fi
1950         ol_with_ldbm_module="$ol_arg"
1951
1952 else
1953         ol_with_ldbm_module="static"
1954 fi
1955 # end --with-ldbm_module
1956
1957 # OpenLDAP --with-ldbm_type
1958         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1959 if test "${with_ldbm_type+set}" = set; then
1960   withval="$with_ldbm_type"
1961   
1962         ol_arg=invalid
1963         for ol_val in auto btree hash ; do
1964                 if test "$withval" = "$ol_val" ; then
1965                         ol_arg="$ol_val"
1966                 fi
1967         done
1968         if test "$ol_arg" = "invalid" ; then
1969                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1970         fi
1971         ol_with_ldbm_type="$ol_arg"
1972
1973 else
1974         ol_with_ldbm_type="auto"
1975 fi
1976 # end --with-ldbm_type
1977
1978 # OpenLDAP --enable-passwd
1979         # Check whether --enable-passwd or --disable-passwd was given.
1980 if test "${enable_passwd+set}" = set; then
1981   enableval="$enable_passwd"
1982   
1983         ol_arg=invalid
1984         for ol_val in auto yes no ; do
1985                 if test "$enableval" = "$ol_val" ; then
1986                         ol_arg="$ol_val"
1987                 fi
1988         done
1989         if test "$ol_arg" = "invalid" ; then
1990                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1991         fi
1992         ol_enable_passwd="$ol_arg"
1993
1994 else
1995         ol_enable_passwd="no"
1996 fi
1997 # end --enable-passwd
1998 # OpenLDAP --with-passwd_module
1999         # Check whether --with-passwd_module or --without-passwd_module was given.
2000 if test "${with_passwd_module+set}" = set; then
2001   withval="$with_passwd_module"
2002   
2003         ol_arg=invalid
2004         for ol_val in static dynamic ; do
2005                 if test "$withval" = "$ol_val" ; then
2006                         ol_arg="$ol_val"
2007                 fi
2008         done
2009         if test "$ol_arg" = "invalid" ; then
2010                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2011         fi
2012         ol_with_passwd_module="$ol_arg"
2013
2014 else
2015         ol_with_passwd_module="static"
2016 fi
2017 # end --with-passwd_module
2018
2019 # OpenLDAP --enable-perl
2020         # Check whether --enable-perl or --disable-perl was given.
2021 if test "${enable_perl+set}" = set; then
2022   enableval="$enable_perl"
2023   
2024         ol_arg=invalid
2025         for ol_val in auto yes no ; do
2026                 if test "$enableval" = "$ol_val" ; then
2027                         ol_arg="$ol_val"
2028                 fi
2029         done
2030         if test "$ol_arg" = "invalid" ; then
2031                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2032         fi
2033         ol_enable_perl="$ol_arg"
2034
2035 else
2036         ol_enable_perl="no"
2037 fi
2038 # end --enable-perl
2039 # OpenLDAP --with-perl_module
2040         # Check whether --with-perl_module or --without-perl_module was given.
2041 if test "${with_perl_module+set}" = set; then
2042   withval="$with_perl_module"
2043   
2044         ol_arg=invalid
2045         for ol_val in static dynamic ; do
2046                 if test "$withval" = "$ol_val" ; then
2047                         ol_arg="$ol_val"
2048                 fi
2049         done
2050         if test "$ol_arg" = "invalid" ; then
2051                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2052         fi
2053         ol_with_perl_module="$ol_arg"
2054
2055 else
2056         ol_with_perl_module="static"
2057 fi
2058 # end --with-perl_module
2059
2060 # OpenLDAP --enable-shell
2061         # Check whether --enable-shell or --disable-shell was given.
2062 if test "${enable_shell+set}" = set; then
2063   enableval="$enable_shell"
2064   
2065         ol_arg=invalid
2066         for ol_val in auto yes no ; do
2067                 if test "$enableval" = "$ol_val" ; then
2068                         ol_arg="$ol_val"
2069                 fi
2070         done
2071         if test "$ol_arg" = "invalid" ; then
2072                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2073         fi
2074         ol_enable_shell="$ol_arg"
2075
2076 else
2077         ol_enable_shell="no"
2078 fi
2079 # end --enable-shell
2080 # OpenLDAP --with-shell_module
2081         # Check whether --with-shell_module or --without-shell_module was given.
2082 if test "${with_shell_module+set}" = set; then
2083   withval="$with_shell_module"
2084   
2085         ol_arg=invalid
2086         for ol_val in static dynamic ; do
2087                 if test "$withval" = "$ol_val" ; then
2088                         ol_arg="$ol_val"
2089                 fi
2090         done
2091         if test "$ol_arg" = "invalid" ; then
2092                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2093         fi
2094         ol_with_shell_module="$ol_arg"
2095
2096 else
2097         ol_with_shell_module="static"
2098 fi
2099 # end --with-shell_module
2100
2101 # OpenLDAP --enable-sql
2102         # Check whether --enable-sql or --disable-sql was given.
2103 if test "${enable_sql+set}" = set; then
2104   enableval="$enable_sql"
2105   
2106         ol_arg=invalid
2107         for ol_val in auto yes no ; do
2108                 if test "$enableval" = "$ol_val" ; then
2109                         ol_arg="$ol_val"
2110                 fi
2111         done
2112         if test "$ol_arg" = "invalid" ; then
2113                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2114         fi
2115         ol_enable_sql="$ol_arg"
2116
2117 else
2118         ol_enable_sql="no"
2119 fi
2120 # end --enable-sql
2121 # OpenLDAP --with-sql_module
2122         # Check whether --with-sql_module or --without-sql_module was given.
2123 if test "${with_sql_module+set}" = set; then
2124   withval="$with_sql_module"
2125   
2126         ol_arg=invalid
2127         for ol_val in static dynamic ; do
2128                 if test "$withval" = "$ol_val" ; then
2129                         ol_arg="$ol_val"
2130                 fi
2131         done
2132         if test "$ol_arg" = "invalid" ; then
2133                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2134         fi
2135         ol_with_sql_module="$ol_arg"
2136
2137 else
2138         ol_with_sql_module="static"
2139 fi
2140 # end --with-sql_module
2141
2142 # OpenLDAP --enable-tcl
2143         # Check whether --enable-tcl or --disable-tcl was given.
2144 if test "${enable_tcl+set}" = set; then
2145   enableval="$enable_tcl"
2146   
2147         ol_arg=invalid
2148         for ol_val in auto yes no ; do
2149                 if test "$enableval" = "$ol_val" ; then
2150                         ol_arg="$ol_val"
2151                 fi
2152         done
2153         if test "$ol_arg" = "invalid" ; then
2154                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2155         fi
2156         ol_enable_tcl="$ol_arg"
2157
2158 else
2159         ol_enable_tcl="no"
2160 fi
2161 # end --enable-tcl
2162 # OpenLDAP --with-tcl_module
2163         # Check whether --with-tcl_module or --without-tcl_module was given.
2164 if test "${with_tcl_module+set}" = set; then
2165   withval="$with_tcl_module"
2166   
2167         ol_arg=invalid
2168         for ol_val in static dynamic ; do
2169                 if test "$withval" = "$ol_val" ; then
2170                         ol_arg="$ol_val"
2171                 fi
2172         done
2173         if test "$ol_arg" = "invalid" ; then
2174                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2175         fi
2176         ol_with_tcl_module="$ol_arg"
2177
2178 else
2179         ol_with_tcl_module="static"
2180 fi
2181 # end --with-tcl_module
2182
2183
2184 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2185 if test "${with_xxslurpdoptions+set}" = set; then
2186   withval="$with_xxslurpdoptions"
2187   :
2188 fi
2189
2190 # OpenLDAP --enable-slurpd
2191         # Check whether --enable-slurpd or --disable-slurpd was given.
2192 if test "${enable_slurpd+set}" = set; then
2193   enableval="$enable_slurpd"
2194   
2195         ol_arg=invalid
2196         for ol_val in auto yes no ; do
2197                 if test "$enableval" = "$ol_val" ; then
2198                         ol_arg="$ol_val"
2199                 fi
2200         done
2201         if test "$ol_arg" = "invalid" ; then
2202                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2203         fi
2204         ol_enable_slurpd="$ol_arg"
2205
2206 else
2207         ol_enable_slurpd="auto"
2208 fi
2209 # end --enable-slurpd
2210
2211 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2212 if test "${with_xxliboptions+set}" = set; then
2213   withval="$with_xxliboptions"
2214   :
2215 fi
2216
2217 # Check whether --enable-static or --disable-static was given.
2218 if test "${enable_static+set}" = set; then
2219   enableval="$enable_static"
2220   p=${PACKAGE-default}
2221 case "$enableval" in
2222 yes) enable_static=yes ;;
2223 no) enable_static=no ;;
2224 *)
2225   enable_static=no
2226   # Look at the argument we got.  We use all the common list separators.
2227   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2228   for pkg in $enableval; do
2229     if test "X$pkg" = "X$p"; then
2230       enable_static=yes
2231     fi
2232   done
2233   IFS="$ac_save_ifs"
2234   ;;
2235 esac
2236 else
2237   enable_static=yes
2238 fi
2239
2240 # Check whether --enable-shared or --disable-shared was given.
2241 if test "${enable_shared+set}" = set; then
2242   enableval="$enable_shared"
2243   p=${PACKAGE-default}
2244 case "$enableval" in
2245 yes) enable_shared=yes ;;
2246 no) enable_shared=no ;;
2247 *)
2248   enable_shared=no
2249   # Look at the argument we got.  We use all the common list separators.
2250   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2251   for pkg in $enableval; do
2252     if test "X$pkg" = "X$p"; then
2253       enable_shared=yes
2254     fi
2255   done
2256   IFS="$ac_save_ifs"
2257   ;;
2258 esac
2259 else
2260   enable_shared=yes
2261 fi
2262
2263
2264
2265 # validate options
2266 if test $ol_enable_slapd = no ; then
2267                 if test $ol_enable_bdb2 = yes ; then
2268                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2269         fi
2270         if test $ol_enable_dnssrv = yes ; then
2271                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2272         fi
2273         if test $ol_enable_ldap = yes ; then
2274                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2275         fi
2276         if test $ol_enable_ldbm = yes ; then
2277                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2278         fi
2279         if test $ol_enable_passwd = yes ; then
2280                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2281         fi
2282         if test $ol_enable_perl = yes ; then
2283                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2284         fi
2285         if test $ol_enable_shell = yes ; then
2286                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2287         fi
2288         if test $ol_enable_tcl = yes ; then
2289                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2290         fi
2291         if test $ol_enable_sql = yes ; then
2292                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2293         fi
2294         if test $ol_enable_modules = yes ; then
2295                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2296         fi
2297         if test $ol_enable_multimaster = yes ; then
2298                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2299         fi
2300         if test $ol_enable_wrappers = yes ; then
2301                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2302         fi
2303         if test $ol_enable_phonetic = yes ; then
2304                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2305         fi
2306         if test $ol_enable_quipu = yes ; then
2307                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2308         fi
2309         if test $ol_enable_rlookups = yes ; then
2310                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2311         fi
2312         if test $ol_enable_aci = yes ; then
2313                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2314         fi
2315         if test $ol_with_ldbm_api != auto ; then
2316                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2317         fi
2318         if test $ol_with_ldbm_type != auto ; then
2319                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2320         fi
2321         if test $ol_with_bdb2_module != static ; then
2322                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2323         fi
2324         if test $ol_with_dnssrv_module != static ; then
2325                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2326         fi
2327         if test $ol_with_ldap_module != static ; then
2328                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2329         fi
2330         if test $ol_with_ldbm_module != static ; then
2331                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2332         fi
2333         if test $ol_with_passwd_module != static ; then
2334                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2335         fi
2336         if test $ol_with_perl_module != static ; then
2337                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2338         fi
2339         if test $ol_with_shell_module != static ; then
2340                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2341         fi
2342         if test $ol_with_tcl_module != static ; then
2343                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2344         fi
2345         if test $ol_with_sql_module != static ; then
2346                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2347         fi
2348         if test $ol_enable_slurpd = yes ; then
2349                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2350         fi
2351
2352         # force settings to no
2353         ol_enable_bdb2=no
2354         ol_enable_dnssrv=no
2355         ol_enable_ldap=no
2356         ol_enable_ldbm=no
2357         ol_enable_passwd=no
2358         ol_enable_perl=no
2359         ol_enable_shell=no
2360         ol_enable_tcl=no
2361         ol_enable_sql=no
2362
2363         ol_enable_modules=no
2364         ol_enable_multimaster=no
2365         ol_enable_phonetic=no
2366         ol_enable_quipu=no
2367         ol_enable_rlookups=no
2368         ol_enable_aci=no
2369         ol_enable_wrappers=no
2370         ol_enable_dynamic=no
2371
2372         ol_with_ldbm_api=no
2373         ol_with_ldbm_type=no
2374
2375         ol_with_bdb2_module=static
2376         ol_with_dnssrv_module=static
2377         ol_with_ldap_module=static
2378         ol_with_ldbm_module=static
2379         ol_with_passwd_module=static
2380         ol_with_perl_module=static
2381         ol_with_shell_module=static
2382         ol_with_tcl_module=static
2383         ol_with_sql_module=static
2384
2385         ol_enable_slurpd=no
2386
2387 elif test $ol_enable_ldbm = no ; then
2388         
2389         if test $ol_with_ldbm_api != auto ; then
2390                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2391         fi
2392
2393         if test $ol_with_ldbm_type != auto ; then
2394                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2395         fi
2396
2397         if test $ol_with_ldbm_module != static ; then
2398                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2399         fi
2400
2401         if test $ol_enable_bdb2 = yes ; then
2402                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2403         fi
2404
2405         if test $ol_enable_modules != yes -a \
2406                 $ol_enable_dnssrv = no -a \
2407                 $ol_enable_ldap = no -a \
2408                 $ol_enable_passwd = no -a \
2409                 $ol_enable_perl = no -a \
2410                 $ol_enable_shell = no -a \
2411                 $ol_enable_sql = no -a \
2412                 $ol_enable_tcl = no ; then
2413                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2414         fi
2415
2416         ol_with_ldbm_api=no
2417         ol_with_ldbm_type=no
2418         ol_with_ldbm_module=static
2419
2420 elif test $ol_enable_bdb2 = yes ; then
2421         
2422         if test $ol_with_ldbm_api != auto -a \
2423                 $ol_with_ldbm_api != berkeley ; then
2424                 { echo "configure: error: BDB2 requires LDBM API berkeley or auto" 1>&2; exit 1; }
2425         fi
2426
2427         ol_with_ldbm_api=db2
2428
2429 else
2430         
2431         if test $ol_enable_bdb2 != no ; then
2432                 if test $ol_with_ldbm_api != auto -a \
2433                         $ol_with_ldbm_api != berkeley ; then
2434                         echo "configure: warning: BDB2 requires LDBM api berkeley or auto" 1>&2
2435                         ol_enable_bdb2=no
2436                 fi
2437         fi
2438
2439         if test $ol_with_ldbm_api = gdbm -a \
2440                 $ol_with_ldbm_type = btree ; then
2441                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2442         fi
2443         if test $ol_with_ldbm_api = mdbm -a \
2444                 $ol_with_ldbm_type = btree ; then
2445                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2446         fi
2447         if test $ol_with_ldbm_api = ndbm -a \
2448                 $ol_with_ldbm_type = btree ; then
2449                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2450         fi
2451 fi
2452
2453 if test $ol_enable_slurpd = yes ; then
2454                 if test $ol_with_threads = no ; then
2455                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2456         fi
2457 fi
2458
2459 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2460         if test $ol_with_kerberos = no ; then
2461                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2462         fi
2463 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2464         if test $ol_with_kerberos != auto ; then
2465                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2466         else
2467                 ol_with_kerberos=no
2468         fi
2469 fi
2470
2471 if test $ol_enable_spasswd = yes ; then
2472         if test $ol_with_cyrus_sasl = no ; then
2473                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2474         fi
2475         ol_link_spasswd=yes
2476 fi
2477
2478 echo "$ac_t""done" 1>&6
2479
2480 LDAP_LIBS=
2481 LDIF_LIBS=
2482 LDBM_LIBS=
2483 LTHREAD_LIBS=
2484 LUTIL_LIBS=
2485
2486 QUIPU_LIBS=
2487 SLAPD_LIBS=
2488 SLURPD_LIBS=
2489
2490 BUILD_SLAPD=no
2491 BUILD_SLURPD=no
2492
2493 BUILD_QUIPU=no
2494 BUILD_THREAD=no
2495
2496 BUILD_BDB2=no
2497 BUILD_DNSSRV=no
2498 BUILD_LDAP=no
2499 BUILD_LDBM=no
2500 BUILD_PASSWD=no
2501 BUILD_PERL=no
2502 BUILD_SHELL=no
2503 BUILD_SQL=no
2504 BUILD_TCL=no
2505
2506 BUILD_BDB2_DYNAMIC=static
2507 BUILD_DNSSRV_DYNAMIC=static
2508 BUILD_LDAP_DYNAMIC=static
2509 BUILD_LDBM_DYNAMIC=static
2510 BUILD_PASSWD_DYNAMIC=static
2511 BUILD_PERL_DYNAMIC=static
2512 BUILD_SHELL_DYNAMIC=static
2513 BUILD_TCL_DYNAMIC=static
2514 BUILD_SQL_DYNAMIC=static
2515
2516 SLAPD_MODULES_LDFLAGS=
2517 SLAPD_MODULES_CPPFLAGS=
2518 SLAPD_MODULES_LIST=
2519
2520 SLAPD_PERL_LDFLAGS=
2521 MOD_PERL_LDFLAGS=
2522 PERL_CPPFLAGS=
2523
2524 SLAPD_SQL_LDFLAGS=
2525 SLAPD_SQL_LIBS=
2526 SLAPD_SQL_INCLUDES=
2527
2528 MOD_TCL_LIB=
2529 KRB4_LIBS=
2530 KRB5_LIBS=
2531 READLINE_LIBS=
2532 SASL_LIBS=
2533 TERMCAP_LIBS=
2534 TLS_LIBS=
2535 MODULES_LIBS=
2536 AUTH_LIBS=
2537
2538
2539
2540 cat >> confdefs.h <<\EOF
2541 #define HAVE_MKVERSION 1
2542 EOF
2543
2544
2545
2546
2547 ol_aix_threads=no
2548 case "$target" in
2549 *-*-aix*)       if test -z "$CC" ; then
2550                 case "$ol_with_threads" in
2551                 auto | yes |  posix) ol_aix_threads=yes ;;
2552                 esac
2553         fi
2554 ;;
2555 esac
2556
2557 if test $ol_aix_threads = yes ; then
2558         if test -z "${CC}" ; then
2559                 for ac_prog in cc_r xlc_r cc
2560 do
2561 # Extract the first word of "$ac_prog", so it can be a program name with args.
2562 set dummy $ac_prog; ac_word=$2
2563 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2564 echo "configure:2565: checking for $ac_word" >&5
2565 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2566   echo $ac_n "(cached) $ac_c" 1>&6
2567 else
2568   if test -n "$CC"; then
2569   ac_cv_prog_CC="$CC" # Let the user override the test.
2570 else
2571   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2572   ac_dummy="$PATH"
2573   for ac_dir in $ac_dummy; do
2574     test -z "$ac_dir" && ac_dir=.
2575     if test -f $ac_dir/$ac_word; then
2576       ac_cv_prog_CC="$ac_prog"
2577       break
2578     fi
2579   done
2580   IFS="$ac_save_ifs"
2581 fi
2582 fi
2583 CC="$ac_cv_prog_CC"
2584 if test -n "$CC"; then
2585   echo "$ac_t""$CC" 1>&6
2586 else
2587   echo "$ac_t""no" 1>&6
2588 fi
2589
2590 test -n "$CC" && break
2591 done
2592
2593
2594                 if test "$CC" = cc ; then
2595                                                 if test $ol_with_threads != auto ; then
2596                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2597                         else
2598                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2599                         fi
2600                         ol_with_threads=no
2601                 fi
2602         fi
2603
2604         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2605                 ol_with_threads=posix
2606                 ol_cv_pthread_create=yes
2607         fi
2608 fi
2609
2610 if test -z "${CC}"; then
2611         for ac_prog in cc
2612 do
2613 # Extract the first word of "$ac_prog", so it can be a program name with args.
2614 set dummy $ac_prog; ac_word=$2
2615 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2616 echo "configure:2617: checking for $ac_word" >&5
2617 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2618   echo $ac_n "(cached) $ac_c" 1>&6
2619 else
2620   if test -n "$CC"; then
2621   ac_cv_prog_CC="$CC" # Let the user override the test.
2622 else
2623   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2624   ac_dummy="$PATH"
2625   for ac_dir in $ac_dummy; do
2626     test -z "$ac_dir" && ac_dir=.
2627     if test -f $ac_dir/$ac_word; then
2628       ac_cv_prog_CC="$ac_prog"
2629       break
2630     fi
2631   done
2632   IFS="$ac_save_ifs"
2633 fi
2634 fi
2635 CC="$ac_cv_prog_CC"
2636 if test -n "$CC"; then
2637   echo "$ac_t""$CC" 1>&6
2638 else
2639   echo "$ac_t""no" 1>&6
2640 fi
2641
2642 test -n "$CC" && break
2643 done
2644
2645 fi
2646
2647
2648
2649
2650 # Check whether --enable-fast-install or --disable-fast-install was given.
2651 if test "${enable_fast_install+set}" = set; then
2652   enableval="$enable_fast_install"
2653   p=${PACKAGE-default}
2654 case "$enableval" in
2655 yes) enable_fast_install=yes ;;
2656 no) enable_fast_install=no ;;
2657 *)
2658   enable_fast_install=no
2659   # Look at the argument we got.  We use all the common list separators.
2660   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2661   for pkg in $enableval; do
2662     if test "X$pkg" = "X$p"; then
2663       enable_fast_install=yes
2664     fi
2665   done
2666   IFS="$ac_save_ifs"
2667   ;;
2668 esac
2669 else
2670   enable_fast_install=yes
2671 fi
2672
2673 # Extract the first word of "ranlib", so it can be a program name with args.
2674 set dummy ranlib; ac_word=$2
2675 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2676 echo "configure:2677: checking for $ac_word" >&5
2677 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2678   echo $ac_n "(cached) $ac_c" 1>&6
2679 else
2680   if test -n "$RANLIB"; then
2681   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2682 else
2683   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2684   ac_dummy="$PATH"
2685   for ac_dir in $ac_dummy; do
2686     test -z "$ac_dir" && ac_dir=.
2687     if test -f $ac_dir/$ac_word; then
2688       ac_cv_prog_RANLIB="ranlib"
2689       break
2690     fi
2691   done
2692   IFS="$ac_save_ifs"
2693   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2694 fi
2695 fi
2696 RANLIB="$ac_cv_prog_RANLIB"
2697 if test -n "$RANLIB"; then
2698   echo "$ac_t""$RANLIB" 1>&6
2699 else
2700   echo "$ac_t""no" 1>&6
2701 fi
2702
2703 # Extract the first word of "gcc", so it can be a program name with args.
2704 set dummy gcc; ac_word=$2
2705 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2706 echo "configure:2707: checking for $ac_word" >&5
2707 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2708   echo $ac_n "(cached) $ac_c" 1>&6
2709 else
2710   if test -n "$CC"; then
2711   ac_cv_prog_CC="$CC" # Let the user override the test.
2712 else
2713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2714   ac_dummy="$PATH"
2715   for ac_dir in $ac_dummy; do
2716     test -z "$ac_dir" && ac_dir=.
2717     if test -f $ac_dir/$ac_word; then
2718       ac_cv_prog_CC="gcc"
2719       break
2720     fi
2721   done
2722   IFS="$ac_save_ifs"
2723 fi
2724 fi
2725 CC="$ac_cv_prog_CC"
2726 if test -n "$CC"; then
2727   echo "$ac_t""$CC" 1>&6
2728 else
2729   echo "$ac_t""no" 1>&6
2730 fi
2731
2732 if test -z "$CC"; then
2733   # Extract the first word of "cc", so it can be a program name with args.
2734 set dummy cc; ac_word=$2
2735 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2736 echo "configure:2737: checking for $ac_word" >&5
2737 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2738   echo $ac_n "(cached) $ac_c" 1>&6
2739 else
2740   if test -n "$CC"; then
2741   ac_cv_prog_CC="$CC" # Let the user override the test.
2742 else
2743   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2744   ac_prog_rejected=no
2745   ac_dummy="$PATH"
2746   for ac_dir in $ac_dummy; do
2747     test -z "$ac_dir" && ac_dir=.
2748     if test -f $ac_dir/$ac_word; then
2749       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2750         ac_prog_rejected=yes
2751         continue
2752       fi
2753       ac_cv_prog_CC="cc"
2754       break
2755     fi
2756   done
2757   IFS="$ac_save_ifs"
2758 if test $ac_prog_rejected = yes; then
2759   # We found a bogon in the path, so make sure we never use it.
2760   set dummy $ac_cv_prog_CC
2761   shift
2762   if test $# -gt 0; then
2763     # We chose a different compiler from the bogus one.
2764     # However, it has the same basename, so the bogon will be chosen
2765     # first if we set CC to just the basename; use the full file name.
2766     shift
2767     set dummy "$ac_dir/$ac_word" "$@"
2768     shift
2769     ac_cv_prog_CC="$@"
2770   fi
2771 fi
2772 fi
2773 fi
2774 CC="$ac_cv_prog_CC"
2775 if test -n "$CC"; then
2776   echo "$ac_t""$CC" 1>&6
2777 else
2778   echo "$ac_t""no" 1>&6
2779 fi
2780
2781   if test -z "$CC"; then
2782     case "`uname -s`" in
2783     *win32* | *WIN32* | *CYGWIN*)
2784       # Extract the first word of "cl", so it can be a program name with args.
2785 set dummy cl; ac_word=$2
2786 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2787 echo "configure:2788: checking for $ac_word" >&5
2788 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2789   echo $ac_n "(cached) $ac_c" 1>&6
2790 else
2791   if test -n "$CC"; then
2792   ac_cv_prog_CC="$CC" # Let the user override the test.
2793 else
2794   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2795   ac_dummy="$PATH"
2796   for ac_dir in $ac_dummy; do
2797     test -z "$ac_dir" && ac_dir=.
2798     if test -f $ac_dir/$ac_word; then
2799       ac_cv_prog_CC="cl"
2800       break
2801     fi
2802   done
2803   IFS="$ac_save_ifs"
2804 fi
2805 fi
2806 CC="$ac_cv_prog_CC"
2807 if test -n "$CC"; then
2808   echo "$ac_t""$CC" 1>&6
2809 else
2810   echo "$ac_t""no" 1>&6
2811 fi
2812  ;;
2813     esac
2814   fi
2815   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2816 fi
2817
2818 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2819 echo "configure:2820: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2820
2821 ac_ext=c
2822 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2823 ac_cpp='$CPP $CPPFLAGS'
2824 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2825 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2826 cross_compiling=$ac_cv_prog_cc_cross
2827
2828 cat > conftest.$ac_ext << EOF
2829
2830 #line 2831 "configure"
2831 #include "confdefs.h"
2832
2833 main(){return(0);}
2834 EOF
2835 if { (eval echo configure:2836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2836   ac_cv_prog_cc_works=yes
2837   # If we can't run a trivial program, we are probably using a cross compiler.
2838   if (./conftest; exit) 2>/dev/null; then
2839     ac_cv_prog_cc_cross=no
2840   else
2841     ac_cv_prog_cc_cross=yes
2842   fi
2843 else
2844   echo "configure: failed program was:" >&5
2845   cat conftest.$ac_ext >&5
2846   ac_cv_prog_cc_works=no
2847 fi
2848 rm -fr conftest*
2849 ac_ext=c
2850 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2851 ac_cpp='$CPP $CPPFLAGS'
2852 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2853 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2854 cross_compiling=$ac_cv_prog_cc_cross
2855
2856 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2857 if test $ac_cv_prog_cc_works = no; then
2858   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2859 fi
2860 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2861 echo "configure:2862: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2862 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2863 cross_compiling=$ac_cv_prog_cc_cross
2864
2865 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2866 echo "configure:2867: checking whether we are using GNU C" >&5
2867 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2868   echo $ac_n "(cached) $ac_c" 1>&6
2869 else
2870   cat > conftest.c <<EOF
2871 #ifdef __GNUC__
2872   yes;
2873 #endif
2874 EOF
2875 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2876   ac_cv_prog_gcc=yes
2877 else
2878   ac_cv_prog_gcc=no
2879 fi
2880 fi
2881
2882 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2883
2884 if test $ac_cv_prog_gcc = yes; then
2885   GCC=yes
2886 else
2887   GCC=
2888 fi
2889
2890 ac_test_CFLAGS="${CFLAGS+set}"
2891 ac_save_CFLAGS="$CFLAGS"
2892 CFLAGS=
2893 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2894 echo "configure:2895: checking whether ${CC-cc} accepts -g" >&5
2895 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2896   echo $ac_n "(cached) $ac_c" 1>&6
2897 else
2898   echo 'void f(){}' > conftest.c
2899 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2900   ac_cv_prog_cc_g=yes
2901 else
2902   ac_cv_prog_cc_g=no
2903 fi
2904 rm -f conftest*
2905
2906 fi
2907
2908 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2909 if test "$ac_test_CFLAGS" = set; then
2910   CFLAGS="$ac_save_CFLAGS"
2911 elif test $ac_cv_prog_cc_g = yes; then
2912   if test "$GCC" = yes; then
2913     CFLAGS="-g -O2"
2914   else
2915     CFLAGS="-g"
2916   fi
2917 else
2918   if test "$GCC" = yes; then
2919     CFLAGS="-O2"
2920   else
2921     CFLAGS=
2922   fi
2923 fi
2924
2925 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2926 if test "${with_gnu_ld+set}" = set; then
2927   withval="$with_gnu_ld"
2928   test "$withval" = no || with_gnu_ld=yes
2929 else
2930   with_gnu_ld=no
2931 fi
2932
2933 ac_prog=ld
2934 if test "$ac_cv_prog_gcc" = yes; then
2935   # Check if gcc -print-prog-name=ld gives a path.
2936   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2937 echo "configure:2938: checking for ld used by GCC" >&5
2938   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2939   case "$ac_prog" in
2940     # Accept absolute paths.
2941     [\\/]* | [A-Za-z]:[\\/]*)
2942       re_direlt='/[^/][^/]*/\.\./'
2943       # Canonicalize the path of ld
2944       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2945       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2946         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2947       done
2948       test -z "$LD" && LD="$ac_prog"
2949       ;;
2950   "")
2951     # If it fails, then pretend we aren't using GCC.
2952     ac_prog=ld
2953     ;;
2954   *)
2955     # If it is relative, then search for the first ld in PATH.
2956     with_gnu_ld=unknown
2957     ;;
2958   esac
2959 elif test "$with_gnu_ld" = yes; then
2960   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2961 echo "configure:2962: checking for GNU ld" >&5
2962 else
2963   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2964 echo "configure:2965: checking for non-GNU ld" >&5
2965 fi
2966 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2967   echo $ac_n "(cached) $ac_c" 1>&6
2968 else
2969   if test -z "$LD"; then
2970   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2971   for ac_dir in $PATH; do
2972     test -z "$ac_dir" && ac_dir=.
2973     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2974       ac_cv_path_LD="$ac_dir/$ac_prog"
2975       # Check to see if the program is GNU ld.  I'd rather use --version,
2976       # but apparently some GNU ld's only accept -v.
2977       # Break only if it was the GNU/non-GNU ld that we prefer.
2978       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2979         test "$with_gnu_ld" != no && break
2980       else
2981         test "$with_gnu_ld" != yes && break
2982       fi
2983     fi
2984   done
2985   IFS="$ac_save_ifs"
2986 else
2987   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2988 fi
2989 fi
2990
2991 LD="$ac_cv_path_LD"
2992 if test -n "$LD"; then
2993   echo "$ac_t""$LD" 1>&6
2994 else
2995   echo "$ac_t""no" 1>&6
2996 fi
2997 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2998 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2999 echo "configure:3000: checking if the linker ($LD) is GNU ld" >&5
3000 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3001   echo $ac_n "(cached) $ac_c" 1>&6
3002 else
3003   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3004 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3005   ac_cv_prog_gnu_ld=yes
3006 else
3007   ac_cv_prog_gnu_ld=no
3008 fi
3009 fi
3010
3011 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3012
3013
3014 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3015 echo "configure:3016: checking for BSD-compatible nm" >&5
3016 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3017   echo $ac_n "(cached) $ac_c" 1>&6
3018 else
3019   if test -n "$NM"; then
3020   # Let the user override the test.
3021   ac_cv_path_NM="$NM"
3022 else
3023   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3024   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3025     test -z "$ac_dir" && ac_dir=.
3026     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3027       # Check to see if the nm accepts a BSD-compat flag.
3028       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3029       #   nm: unknown option "B" ignored
3030       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3031         ac_cv_path_NM="$ac_dir/nm -B"
3032         break
3033       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3034         ac_cv_path_NM="$ac_dir/nm -p"
3035         break
3036       else
3037         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3038         continue # so that we can try to find one that supports BSD flags
3039       fi
3040     fi
3041   done
3042   IFS="$ac_save_ifs"
3043   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3044 fi
3045 fi
3046
3047 NM="$ac_cv_path_NM"
3048 echo "$ac_t""$NM" 1>&6
3049
3050 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3051 echo "configure:3052: checking whether ln -s works" >&5
3052 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3053   echo $ac_n "(cached) $ac_c" 1>&6
3054 else
3055   rm -f conftestdata
3056 if ln -s X conftestdata 2>/dev/null
3057 then
3058   rm -f conftestdata
3059   ac_cv_prog_LN_S="ln -s"
3060 else
3061   ac_cv_prog_LN_S=ln
3062 fi
3063 fi
3064 LN_S="$ac_cv_prog_LN_S"
3065 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3066   echo "$ac_t""yes" 1>&6
3067 else
3068   echo "$ac_t""no" 1>&6
3069 fi
3070
3071 if test $host != $build; then
3072   ac_tool_prefix=${host_alias}-
3073 else
3074   ac_tool_prefix=
3075 fi
3076
3077
3078 case "$target" in
3079 NONE) lt_target="$host" ;;
3080 *) lt_target="$target" ;;
3081 esac
3082
3083 # Check for any special flags to pass to ltconfig.
3084 libtool_flags="--cache-file=$cache_file"
3085 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3086 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3087 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3088 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3089 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3090 libtool_flags="$libtool_flags --enable-dlopen"
3091 libtool_flags="$libtool_flags --enable-win32-dll"
3092 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3093 if test "${enable_libtool_lock+set}" = set; then
3094   enableval="$enable_libtool_lock"
3095   :
3096 fi
3097
3098 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3099 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3100
3101 # Some flags need to be propagated to the compiler or linker for good
3102 # libtool support.
3103 case "$lt_target" in
3104 *-*-irix6*)
3105   # Find out which ABI we are using.
3106   echo '#line 3107 "configure"' > conftest.$ac_ext
3107   if { (eval echo configure:3108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3108     case "`/usr/bin/file conftest.o`" in
3109     *32-bit*)
3110       LD="${LD-ld} -32"
3111       ;;
3112     *N32*)
3113       LD="${LD-ld} -n32"
3114       ;;
3115     *64-bit*)
3116       LD="${LD-ld} -64"
3117       ;;
3118     esac
3119   fi
3120   rm -rf conftest*
3121   ;;
3122
3123 *-*-sco3.2v5*)
3124   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3125   SAVE_CFLAGS="$CFLAGS"
3126   CFLAGS="$CFLAGS -belf"
3127   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3128 echo "configure:3129: checking whether the C compiler needs -belf" >&5
3129 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3130   echo $ac_n "(cached) $ac_c" 1>&6
3131 else
3132   cat > conftest.$ac_ext <<EOF
3133 #line 3134 "configure"
3134 #include "confdefs.h"
3135
3136 int main() {
3137
3138 ; return 0; }
3139 EOF
3140 if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3141   rm -rf conftest*
3142   lt_cv_cc_needs_belf=yes
3143 else
3144   echo "configure: failed program was:" >&5
3145   cat conftest.$ac_ext >&5
3146   rm -rf conftest*
3147   lt_cv_cc_needs_belf=no
3148 fi
3149 rm -f conftest*
3150 fi
3151
3152 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3153   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3154     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3155     CFLAGS="$SAVE_CFLAGS"
3156   fi
3157   ;;
3158
3159 *-*-cygwin* | *-*-mingw*)
3160   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3161 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3162 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3163 echo "configure:3164: checking for $ac_word" >&5
3164 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3165   echo $ac_n "(cached) $ac_c" 1>&6
3166 else
3167   if test -n "$DLLTOOL"; then
3168   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3169 else
3170   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3171   ac_dummy="$PATH"
3172   for ac_dir in $ac_dummy; do
3173     test -z "$ac_dir" && ac_dir=.
3174     if test -f $ac_dir/$ac_word; then
3175       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3176       break
3177     fi
3178   done
3179   IFS="$ac_save_ifs"
3180 fi
3181 fi
3182 DLLTOOL="$ac_cv_prog_DLLTOOL"
3183 if test -n "$DLLTOOL"; then
3184   echo "$ac_t""$DLLTOOL" 1>&6
3185 else
3186   echo "$ac_t""no" 1>&6
3187 fi
3188
3189
3190 if test -z "$ac_cv_prog_DLLTOOL"; then
3191 if test -n "$ac_tool_prefix"; then
3192   # Extract the first word of "dlltool", so it can be a program name with args.
3193 set dummy dlltool; ac_word=$2
3194 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3195 echo "configure:3196: checking for $ac_word" >&5
3196 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3197   echo $ac_n "(cached) $ac_c" 1>&6
3198 else
3199   if test -n "$DLLTOOL"; then
3200   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3201 else
3202   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3203   ac_dummy="$PATH"
3204   for ac_dir in $ac_dummy; do
3205     test -z "$ac_dir" && ac_dir=.
3206     if test -f $ac_dir/$ac_word; then
3207       ac_cv_prog_DLLTOOL="dlltool"
3208       break
3209     fi
3210   done
3211   IFS="$ac_save_ifs"
3212   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3213 fi
3214 fi
3215 DLLTOOL="$ac_cv_prog_DLLTOOL"
3216 if test -n "$DLLTOOL"; then
3217   echo "$ac_t""$DLLTOOL" 1>&6
3218 else
3219   echo "$ac_t""no" 1>&6
3220 fi
3221
3222 else
3223   DLLTOOL="false"
3224 fi
3225 fi
3226
3227   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3228 set dummy ${ac_tool_prefix}as; ac_word=$2
3229 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3230 echo "configure:3231: checking for $ac_word" >&5
3231 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3232   echo $ac_n "(cached) $ac_c" 1>&6
3233 else
3234   if test -n "$AS"; then
3235   ac_cv_prog_AS="$AS" # Let the user override the test.
3236 else
3237   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3238   ac_dummy="$PATH"
3239   for ac_dir in $ac_dummy; do
3240     test -z "$ac_dir" && ac_dir=.
3241     if test -f $ac_dir/$ac_word; then
3242       ac_cv_prog_AS="${ac_tool_prefix}as"
3243       break
3244     fi
3245   done
3246   IFS="$ac_save_ifs"
3247 fi
3248 fi
3249 AS="$ac_cv_prog_AS"
3250 if test -n "$AS"; then
3251   echo "$ac_t""$AS" 1>&6
3252 else
3253   echo "$ac_t""no" 1>&6
3254 fi
3255
3256
3257 if test -z "$ac_cv_prog_AS"; then
3258 if test -n "$ac_tool_prefix"; then
3259   # Extract the first word of "as", so it can be a program name with args.
3260 set dummy as; ac_word=$2
3261 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3262 echo "configure:3263: checking for $ac_word" >&5
3263 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3264   echo $ac_n "(cached) $ac_c" 1>&6
3265 else
3266   if test -n "$AS"; then
3267   ac_cv_prog_AS="$AS" # Let the user override the test.
3268 else
3269   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3270   ac_dummy="$PATH"
3271   for ac_dir in $ac_dummy; do
3272     test -z "$ac_dir" && ac_dir=.
3273     if test -f $ac_dir/$ac_word; then
3274       ac_cv_prog_AS="as"
3275       break
3276     fi
3277   done
3278   IFS="$ac_save_ifs"
3279   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3280 fi
3281 fi
3282 AS="$ac_cv_prog_AS"
3283 if test -n "$AS"; then
3284   echo "$ac_t""$AS" 1>&6
3285 else
3286   echo "$ac_t""no" 1>&6
3287 fi
3288
3289 else
3290   AS="false"
3291 fi
3292 fi
3293
3294   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3295 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3296 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3297 echo "configure:3298: checking for $ac_word" >&5
3298 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3299   echo $ac_n "(cached) $ac_c" 1>&6
3300 else
3301   if test -n "$OBJDUMP"; then
3302   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3303 else
3304   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3305   ac_dummy="$PATH"
3306   for ac_dir in $ac_dummy; do
3307     test -z "$ac_dir" && ac_dir=.
3308     if test -f $ac_dir/$ac_word; then
3309       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3310       break
3311     fi
3312   done
3313   IFS="$ac_save_ifs"
3314 fi
3315 fi
3316 OBJDUMP="$ac_cv_prog_OBJDUMP"
3317 if test -n "$OBJDUMP"; then
3318   echo "$ac_t""$OBJDUMP" 1>&6
3319 else
3320   echo "$ac_t""no" 1>&6
3321 fi
3322
3323
3324 if test -z "$ac_cv_prog_OBJDUMP"; then
3325 if test -n "$ac_tool_prefix"; then
3326   # Extract the first word of "objdump", so it can be a program name with args.
3327 set dummy objdump; ac_word=$2
3328 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3329 echo "configure:3330: checking for $ac_word" >&5
3330 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3331   echo $ac_n "(cached) $ac_c" 1>&6
3332 else
3333   if test -n "$OBJDUMP"; then
3334   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3335 else
3336   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3337   ac_dummy="$PATH"
3338   for ac_dir in $ac_dummy; do
3339     test -z "$ac_dir" && ac_dir=.
3340     if test -f $ac_dir/$ac_word; then
3341       ac_cv_prog_OBJDUMP="objdump"
3342       break
3343     fi
3344   done
3345   IFS="$ac_save_ifs"
3346   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3347 fi
3348 fi
3349 OBJDUMP="$ac_cv_prog_OBJDUMP"
3350 if test -n "$OBJDUMP"; then
3351   echo "$ac_t""$OBJDUMP" 1>&6
3352 else
3353   echo "$ac_t""no" 1>&6
3354 fi
3355
3356 else
3357   OBJDUMP="false"
3358 fi
3359 fi
3360
3361   ;;
3362
3363 esac
3364
3365
3366 # Save cache, so that ltconfig can load it
3367
3368
3369 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3370 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3371 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3372 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3373 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3374 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3375 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3376 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3377
3378 # Reload cache, that may have been modified by ltconfig
3379
3380
3381 # This can be used to rebuild libtool when needed
3382 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3383
3384 # Always use our own libtool.
3385 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3386
3387 # Redirect the config.log output again, so that the ltconfig log is not
3388 # clobbered by the next message.
3389 exec 5>>./config.log
3390
3391
3392 for ac_prog in mawk gawk nawk awk
3393 do
3394 # Extract the first word of "$ac_prog", so it can be a program name with args.
3395 set dummy $ac_prog; ac_word=$2
3396 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3397 echo "configure:3398: checking for $ac_word" >&5
3398 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3399   echo $ac_n "(cached) $ac_c" 1>&6
3400 else
3401   if test -n "$AWK"; then
3402   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3403 else
3404   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3405   ac_dummy="$PATH"
3406   for ac_dir in $ac_dummy; do
3407     test -z "$ac_dir" && ac_dir=.
3408     if test -f $ac_dir/$ac_word; then
3409       ac_cv_prog_AWK="$ac_prog"
3410       break
3411     fi
3412   done
3413   IFS="$ac_save_ifs"
3414 fi
3415 fi
3416 AWK="$ac_cv_prog_AWK"
3417 if test -n "$AWK"; then
3418   echo "$ac_t""$AWK" 1>&6
3419 else
3420   echo "$ac_t""no" 1>&6
3421 fi
3422
3423 test -n "$AWK" && break
3424 done
3425
3426 # test for ln hardlink support
3427 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3428 echo "configure:3429: checking whether ln works" >&5
3429 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3430   echo $ac_n "(cached) $ac_c" 1>&6
3431 else
3432   rm -f conftest.src conftest.dst
3433 echo "conftest" > conftest.src
3434 if ln conftest.src conftest.dst 2>/dev/null
3435 then
3436   ol_cv_prog_LN_H="ln"
3437 else
3438   ol_cv_prog_LN_H="cp"
3439 fi
3440 rm -f conftest.src conftest.dst
3441
3442 fi
3443 LN_H="$ol_cv_prog_LN_H"
3444 if test "$ol_cv_prog_LN_H" = "ln"; then
3445         echo "$ac_t""yes" 1>&6
3446 else
3447         echo "$ac_t""no" 1>&6
3448 fi
3449
3450 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3451 echo "configure:3452: checking whether ln -s works" >&5
3452 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3453   echo $ac_n "(cached) $ac_c" 1>&6
3454 else
3455   rm -f conftestdata
3456 if ln -s X conftestdata 2>/dev/null
3457 then
3458   rm -f conftestdata
3459   ac_cv_prog_LN_S="ln -s"
3460 else
3461   ac_cv_prog_LN_S=ln
3462 fi
3463 fi
3464 LN_S="$ac_cv_prog_LN_S"
3465 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3466   echo "$ac_t""yes" 1>&6
3467 else
3468   echo "$ac_t""no" 1>&6
3469 fi
3470
3471
3472 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3473         LN_S="$LN_H"
3474 fi
3475
3476 # Extract the first word of "sendmail", so it can be a program name with args.
3477 set dummy sendmail; ac_word=$2
3478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3479 echo "configure:3480: checking for $ac_word" >&5
3480 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3481   echo $ac_n "(cached) $ac_c" 1>&6
3482 else
3483   case "$SENDMAIL" in
3484   /*)
3485   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3486   ;;
3487   ?:/*)
3488   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3489   ;;
3490   *)
3491   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3492   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3493   for ac_dir in $ac_dummy; do 
3494     test -z "$ac_dir" && ac_dir=.
3495     if test -f $ac_dir/$ac_word; then
3496       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3497       break
3498     fi
3499   done
3500   IFS="$ac_save_ifs"
3501   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3502   ;;
3503 esac
3504 fi
3505 SENDMAIL="$ac_cv_path_SENDMAIL"
3506 if test -n "$SENDMAIL"; then
3507   echo "$ac_t""$SENDMAIL" 1>&6
3508 else
3509   echo "$ac_t""no" 1>&6
3510 fi
3511
3512 # Extract the first word of "vi", so it can be a program name with args.
3513 set dummy vi; ac_word=$2
3514 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3515 echo "configure:3516: checking for $ac_word" >&5
3516 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3517   echo $ac_n "(cached) $ac_c" 1>&6
3518 else
3519   case "$EDITOR" in
3520   /*)
3521   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3522   ;;
3523   ?:/*)
3524   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3525   ;;
3526   *)
3527   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3528   ac_dummy="$PATH:/usr/ucb"
3529   for ac_dir in $ac_dummy; do 
3530     test -z "$ac_dir" && ac_dir=.
3531     if test -f $ac_dir/$ac_word; then
3532       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3533       break
3534     fi
3535   done
3536   IFS="$ac_save_ifs"
3537   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3538   ;;
3539 esac
3540 fi
3541 EDITOR="$ac_cv_path_EDITOR"
3542 if test -n "$EDITOR"; then
3543   echo "$ac_t""$EDITOR" 1>&6
3544 else
3545   echo "$ac_t""no" 1>&6
3546 fi
3547
3548 # Extract the first word of "finger", so it can be a program name with args.
3549 set dummy finger; ac_word=$2
3550 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3551 echo "configure:3552: checking for $ac_word" >&5
3552 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3553   echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555   case "$FINGER" in
3556   /*)
3557   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3558   ;;
3559   ?:/*)
3560   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3561   ;;
3562   *)
3563   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3564   ac_dummy="$PATH:/usr/ucb"
3565   for ac_dir in $ac_dummy; do 
3566     test -z "$ac_dir" && ac_dir=.
3567     if test -f $ac_dir/$ac_word; then
3568       ac_cv_path_FINGER="$ac_dir/$ac_word"
3569       break
3570     fi
3571   done
3572   IFS="$ac_save_ifs"
3573   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3574   ;;
3575 esac
3576 fi
3577 FINGER="$ac_cv_path_FINGER"
3578 if test -n "$FINGER"; then
3579   echo "$ac_t""$FINGER" 1>&6
3580 else
3581   echo "$ac_t""no" 1>&6
3582 fi
3583
3584
3585 ol_link_perl=no
3586 if test $ol_enable_perl != no ; then
3587         # Extract the first word of "perl", so it can be a program name with args.
3588 set dummy perl; ac_word=$2
3589 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3590 echo "configure:3591: checking for $ac_word" >&5
3591 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3592   echo $ac_n "(cached) $ac_c" 1>&6
3593 else
3594   case "$PERLBIN" in
3595   /*)
3596   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3597   ;;
3598   ?:/*)
3599   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3600   ;;
3601   *)
3602   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3603   ac_dummy="$PATH"
3604   for ac_dir in $ac_dummy; do 
3605     test -z "$ac_dir" && ac_dir=.
3606     if test -f $ac_dir/$ac_word; then
3607       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3608       break
3609     fi
3610   done
3611   IFS="$ac_save_ifs"
3612   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3613   ;;
3614 esac
3615 fi
3616 PERLBIN="$ac_cv_path_PERLBIN"
3617 if test -n "$PERLBIN"; then
3618   echo "$ac_t""$PERLBIN" 1>&6
3619 else
3620   echo "$ac_t""no" 1>&6
3621 fi
3622
3623
3624         if test "no$PERLBIN" = "no" ; then
3625                 if test $ol_enable_perl = yes ; then
3626                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3627                 fi
3628
3629         else
3630                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3631                 if test x"$ol_with_perl_module" = "xstatic" ; then
3632                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3633                 else
3634                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3635                 fi
3636                                 ol_link_perl=yes
3637         fi
3638 fi
3639
3640 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3641 echo "configure:3642: checking how to run the C preprocessor" >&5
3642 # On Suns, sometimes $CPP names a directory.
3643 if test -n "$CPP" && test -d "$CPP"; then
3644   CPP=
3645 fi
3646 if test -z "$CPP"; then
3647 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3648   echo $ac_n "(cached) $ac_c" 1>&6
3649 else
3650     # This must be in double quotes, not single quotes, because CPP may get
3651   # substituted into the Makefile and "${CC-cc}" will confuse make.
3652   CPP="${CC-cc} -E"
3653   # On the NeXT, cc -E runs the code through the compiler's parser,
3654   # not just through cpp.
3655   cat > conftest.$ac_ext <<EOF
3656 #line 3657 "configure"
3657 #include "confdefs.h"
3658 #include <assert.h>
3659 Syntax Error
3660 EOF
3661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3662 { (eval echo configure:3663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3664 if test -z "$ac_err"; then
3665   :
3666 else
3667   echo "$ac_err" >&5
3668   echo "configure: failed program was:" >&5
3669   cat conftest.$ac_ext >&5
3670   rm -rf conftest*
3671   CPP="${CC-cc} -E -traditional-cpp"
3672   cat > conftest.$ac_ext <<EOF
3673 #line 3674 "configure"
3674 #include "confdefs.h"
3675 #include <assert.h>
3676 Syntax Error
3677 EOF
3678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3679 { (eval echo configure:3680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3681 if test -z "$ac_err"; then
3682   :
3683 else
3684   echo "$ac_err" >&5
3685   echo "configure: failed program was:" >&5
3686   cat conftest.$ac_ext >&5
3687   rm -rf conftest*
3688   CPP="${CC-cc} -nologo -E"
3689   cat > conftest.$ac_ext <<EOF
3690 #line 3691 "configure"
3691 #include "confdefs.h"
3692 #include <assert.h>
3693 Syntax Error
3694 EOF
3695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3696 { (eval echo configure:3697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3698 if test -z "$ac_err"; then
3699   :
3700 else
3701   echo "$ac_err" >&5
3702   echo "configure: failed program was:" >&5
3703   cat conftest.$ac_ext >&5
3704   rm -rf conftest*
3705   CPP=/lib/cpp
3706 fi
3707 rm -f conftest*
3708 fi
3709 rm -f conftest*
3710 fi
3711 rm -f conftest*
3712   ac_cv_prog_CPP="$CPP"
3713 fi
3714   CPP="$ac_cv_prog_CPP"
3715 else
3716   ac_cv_prog_CPP="$CPP"
3717 fi
3718 echo "$ac_t""$CPP" 1>&6
3719
3720
3721 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3722         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3723
3724 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3725         echo "configure: warning: programs compiled here do run here..." 1>&2
3726         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3727
3728 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3729         echo "configure: warning: programs compiled here do not run here..." 1>&2
3730         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3731 fi
3732
3733 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3734 echo "configure:3735: checking for AIX" >&5
3735 cat > conftest.$ac_ext <<EOF
3736 #line 3737 "configure"
3737 #include "confdefs.h"
3738 #ifdef _AIX
3739   yes
3740 #endif
3741
3742 EOF
3743 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3744   egrep "yes" >/dev/null 2>&1; then
3745   rm -rf conftest*
3746   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3747 #define _ALL_SOURCE 1
3748 EOF
3749
3750 else
3751   rm -rf conftest*
3752   echo "$ac_t""no" 1>&6
3753 fi
3754 rm -f conftest*
3755
3756
3757 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3758 echo "configure:3759: checking for POSIXized ISC" >&5
3759 if test -d /etc/conf/kconfig.d &&
3760   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3761 then
3762   echo "$ac_t""yes" 1>&6
3763   ISC=yes # If later tests want to check for ISC.
3764   cat >> confdefs.h <<\EOF
3765 #define _POSIX_SOURCE 1
3766 EOF
3767
3768   if test "$GCC" = yes; then
3769     CC="$CC -posix"
3770   else
3771     CC="$CC -Xp"
3772   fi
3773 else
3774   echo "$ac_t""no" 1>&6
3775   ISC=
3776 fi
3777
3778 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3779 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3780 echo "configure:3781: checking for minix/config.h" >&5
3781 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3782   echo $ac_n "(cached) $ac_c" 1>&6
3783 else
3784   cat > conftest.$ac_ext <<EOF
3785 #line 3786 "configure"
3786 #include "confdefs.h"
3787 #include <minix/config.h>
3788 EOF
3789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3790 { (eval echo configure:3791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3792 if test -z "$ac_err"; then
3793   rm -rf conftest*
3794   eval "ac_cv_header_$ac_safe=yes"
3795 else
3796   echo "$ac_err" >&5
3797   echo "configure: failed program was:" >&5
3798   cat conftest.$ac_ext >&5
3799   rm -rf conftest*
3800   eval "ac_cv_header_$ac_safe=no"
3801 fi
3802 rm -f conftest*
3803 fi
3804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3805   echo "$ac_t""yes" 1>&6
3806   MINIX=yes
3807 else
3808   echo "$ac_t""no" 1>&6
3809 MINIX=
3810 fi
3811
3812 if test "$MINIX" = yes; then
3813   cat >> confdefs.h <<\EOF
3814 #define _POSIX_SOURCE 1
3815 EOF
3816
3817   cat >> confdefs.h <<\EOF
3818 #define _POSIX_1_SOURCE 2
3819 EOF
3820
3821   cat >> confdefs.h <<\EOF
3822 #define _MINIX 1
3823 EOF
3824
3825 fi
3826
3827
3828 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3829 echo "configure:3830: checking for Cygwin environment" >&5
3830 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3831   echo $ac_n "(cached) $ac_c" 1>&6
3832 else
3833   cat > conftest.$ac_ext <<EOF
3834 #line 3835 "configure"
3835 #include "confdefs.h"
3836
3837 int main() {
3838
3839 #ifndef __CYGWIN__
3840 #define __CYGWIN__ __CYGWIN32__
3841 #endif
3842 return __CYGWIN__;
3843 ; return 0; }
3844 EOF
3845 if { (eval echo configure:3846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3846   rm -rf conftest*
3847   ac_cv_cygwin=yes
3848 else
3849   echo "configure: failed program was:" >&5
3850   cat conftest.$ac_ext >&5
3851   rm -rf conftest*
3852   ac_cv_cygwin=no
3853 fi
3854 rm -f conftest*
3855 fi
3856
3857 echo "$ac_t""$ac_cv_cygwin" 1>&6
3858 CYGWIN=
3859 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3860 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3861 echo "configure:3862: checking for mingw32 environment" >&5
3862 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3863   echo $ac_n "(cached) $ac_c" 1>&6
3864 else
3865   cat > conftest.$ac_ext <<EOF
3866 #line 3867 "configure"
3867 #include "confdefs.h"
3868
3869 int main() {
3870 return __MINGW32__;
3871 ; return 0; }
3872 EOF
3873 if { (eval echo configure:3874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3874   rm -rf conftest*
3875   ac_cv_mingw32=yes
3876 else
3877   echo "configure: failed program was:" >&5
3878   cat conftest.$ac_ext >&5
3879   rm -rf conftest*
3880   ac_cv_mingw32=no
3881 fi
3882 rm -f conftest*
3883 fi
3884
3885 echo "$ac_t""$ac_cv_mingw32" 1>&6
3886 MINGW32=
3887 test "$ac_cv_mingw32" = yes && MINGW32=yes
3888 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3889 echo "configure:3890: checking for EMX OS/2 environment" >&5
3890 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3891   echo $ac_n "(cached) $ac_c" 1>&6
3892 else
3893   cat > conftest.$ac_ext <<EOF
3894 #line 3895 "configure"
3895 #include "confdefs.h"
3896
3897 int main() {
3898 return __EMX__;
3899 ; return 0; }
3900 EOF
3901 if { (eval echo configure:3902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3902   rm -rf conftest*
3903   ac_cv_emxos2=yes
3904 else
3905   echo "configure: failed program was:" >&5
3906   cat conftest.$ac_ext >&5
3907   rm -rf conftest*
3908   ac_cv_emxos2=no
3909 fi
3910 rm -f conftest*
3911 fi
3912
3913 echo "$ac_t""$ac_cv_emxos2" 1>&6
3914 EMXOS2=
3915 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3916
3917
3918
3919 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3920 echo "configure:3921: checking for executable suffix" >&5
3921 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3922   echo $ac_n "(cached) $ac_c" 1>&6
3923 else
3924   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3925   ac_cv_exeext=.exe
3926 else
3927   rm -f conftest*
3928   echo 'int main () { return 0; }' > conftest.$ac_ext
3929   ac_cv_exeext=
3930   if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3931     for file in conftest.*; do
3932       case $file in
3933       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3934       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3935       esac
3936     done
3937   else
3938     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3939   fi
3940   rm -f conftest*
3941   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3942 fi
3943 fi
3944
3945 EXEEXT=""
3946 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3947 echo "$ac_t""${ac_cv_exeext}" 1>&6
3948 ac_exeext=$EXEEXT
3949
3950 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3951 echo "configure:3952: checking for object suffix" >&5
3952 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3953   echo $ac_n "(cached) $ac_c" 1>&6
3954 else
3955   rm -f conftest*
3956 echo 'int i = 1;' > conftest.$ac_ext
3957 if { (eval echo configure:3958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3958   for ac_file in conftest.*; do
3959     case $ac_file in
3960     *.c) ;;
3961     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3962     esac
3963   done
3964 else
3965   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3966 fi
3967 rm -f conftest*
3968 fi
3969
3970 echo "$ac_t""$ac_cv_objext" 1>&6
3971 OBJEXT=$ac_cv_objext
3972 ac_objext=$ac_cv_objext
3973
3974
3975 cat >> confdefs.h <<EOF
3976 #define EXEEXT "${EXEEXT}"
3977 EOF
3978
3979
3980 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3981 echo "configure:3982: checking for be_app in -lbe" >&5
3982 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3984   echo $ac_n "(cached) $ac_c" 1>&6
3985 else
3986   ac_save_LIBS="$LIBS"
3987 LIBS="-lbe -lroot -lnet $LIBS"
3988 cat > conftest.$ac_ext <<EOF
3989 #line 3990 "configure"
3990 #include "confdefs.h"
3991 /* Override any gcc2 internal prototype to avoid an error.  */
3992 /* We use char because int might match the return type of a gcc2
3993     builtin and then its argument prototype would still apply.  */
3994 char be_app();
3995
3996 int main() {
3997 be_app()
3998 ; return 0; }
3999 EOF
4000 if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4001   rm -rf conftest*
4002   eval "ac_cv_lib_$ac_lib_var=yes"
4003 else
4004   echo "configure: failed program was:" >&5
4005   cat conftest.$ac_ext >&5
4006   rm -rf conftest*
4007   eval "ac_cv_lib_$ac_lib_var=no"
4008 fi
4009 rm -f conftest*
4010 LIBS="$ac_save_LIBS"
4011
4012 fi
4013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4014   echo "$ac_t""yes" 1>&6
4015   LIBS="$LIBS -lbe -lroot -lnet"
4016 else
4017   echo "$ac_t""no" 1>&6
4018 :
4019 fi
4020
4021
4022
4023
4024
4025 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4026 echo "configure:4027: checking for ${CC-cc} option to accept ANSI C" >&5
4027 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4028   echo $ac_n "(cached) $ac_c" 1>&6
4029 else
4030   am_cv_prog_cc_stdc=no
4031 ac_save_CC="$CC"
4032 # Don't try gcc -ansi; that turns off useful extensions and
4033 # breaks some systems' header files.
4034 # AIX                   -qlanglvl=ansi
4035 # Ultrix and OSF/1      -std1
4036 # HP-UX 10.20 and later -Ae
4037 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4038 # SVR4                  -Xc -D__EXTENSIONS__
4039 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4040 do
4041   CC="$ac_save_CC $ac_arg"
4042   cat > conftest.$ac_ext <<EOF
4043 #line 4044 "configure"
4044 #include "confdefs.h"
4045 #include <stdarg.h>
4046 #include <stdio.h>
4047 #include <sys/types.h>
4048 #include <sys/stat.h>
4049 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4050 struct buf { int x; };
4051 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4052 static char *e (p, i)
4053      char **p;
4054      int i;
4055 {
4056   return p[i];
4057 }
4058 static char *f (char * (*g) (char **, int), char **p, ...)
4059 {
4060   char *s;
4061   va_list v;
4062   va_start (v,p);
4063   s = g (p, va_arg (v,int));
4064   va_end (v);
4065   return s;
4066 }
4067 int test (int i, double x);
4068 struct s1 {int (*f) (int a);};
4069 struct s2 {int (*f) (double a);};
4070 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4071 int argc;
4072 char **argv;
4073
4074 int main() {
4075
4076 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4077
4078 ; return 0; }
4079 EOF
4080 if { (eval echo configure:4081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4081   rm -rf conftest*
4082   am_cv_prog_cc_stdc="$ac_arg"; break
4083 else
4084   echo "configure: failed program was:" >&5
4085   cat conftest.$ac_ext >&5
4086 fi
4087 rm -f conftest*
4088 done
4089 CC="$ac_save_CC"
4090
4091 fi
4092
4093 if test -z "$am_cv_prog_cc_stdc"; then
4094   echo "$ac_t""none needed" 1>&6
4095 else
4096   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4097 fi
4098 case "x$am_cv_prog_cc_stdc" in
4099   x|xno) ;;
4100   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4101 esac
4102
4103 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4104         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4105 fi
4106
4107 # test for make depend flag
4108 OL_MKDEP=
4109 OL_MKDEP_FLAGS=
4110 if test -z "${MKDEP}"; then
4111         OL_MKDEP="${CC-cc}"
4112         if test -z "${MKDEP_FLAGS}"; then
4113                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4114 echo "configure:4115: checking for ${OL_MKDEP} depend flag" >&5
4115 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4116   echo $ac_n "(cached) $ac_c" 1>&6
4117 else
4118   
4119                         ol_cv_mkdep=no
4120                         for flag in "-M" "-xM"; do
4121                                 cat > conftest.c <<EOF
4122  noCode;
4123 EOF
4124                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4125                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4126                                 then
4127                                         if test ! -f conftest."${ac_object}" ; then
4128                                                 ol_cv_mkdep=$flag
4129                                                 OL_MKDEP_FLAGS="$flag"
4130                                                 break
4131                                         fi
4132                                 fi
4133                         done
4134                         rm -f conftest*
4135                 
4136 fi
4137
4138 echo "$ac_t""$ol_cv_mkdep" 1>&6
4139         else
4140                 cc_cv_mkdep=yes
4141                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4142         fi
4143 else
4144         cc_cv_mkdep=yes
4145         OL_MKDEP="${MKDEP}"
4146         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4147 fi
4148
4149
4150
4151 if test "${ol_cv_mkdep}" = no ; then
4152         # this will soon become an error
4153         echo "configure: warning: do not know how to generate dependencies" 1>&2
4154 fi
4155
4156 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4157 echo "configure:4158: checking for afopen in -ls" >&5
4158 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4159 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4160   echo $ac_n "(cached) $ac_c" 1>&6
4161 else
4162   ac_save_LIBS="$LIBS"
4163 LIBS="-ls  $LIBS"
4164 cat > conftest.$ac_ext <<EOF
4165 #line 4166 "configure"
4166 #include "confdefs.h"
4167 /* Override any gcc2 internal prototype to avoid an error.  */
4168 /* We use char because int might match the return type of a gcc2
4169     builtin and then its argument prototype would still apply.  */
4170 char afopen();
4171
4172 int main() {
4173 afopen()
4174 ; return 0; }
4175 EOF
4176 if { (eval echo configure:4177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4177   rm -rf conftest*
4178   eval "ac_cv_lib_$ac_lib_var=yes"
4179 else
4180   echo "configure: failed program was:" >&5
4181   cat conftest.$ac_ext >&5
4182   rm -rf conftest*
4183   eval "ac_cv_lib_$ac_lib_var=no"
4184 fi
4185 rm -f conftest*
4186 LIBS="$ac_save_LIBS"
4187
4188 fi
4189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4190   echo "$ac_t""yes" 1>&6
4191   
4192         AUTH_LIBS=-ls
4193         cat >> confdefs.h <<\EOF
4194 #define HAVE_AIX_SECURITY 1
4195 EOF
4196
4197
4198 else
4199   echo "$ac_t""no" 1>&6
4200 fi
4201
4202
4203 ol_link_modules=no
4204 if test $ol_enable_modules != no ; then
4205         for ac_hdr in ltdl.h
4206 do
4207 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4208 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4209 echo "configure:4210: checking for $ac_hdr" >&5
4210 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4211   echo $ac_n "(cached) $ac_c" 1>&6
4212 else
4213   cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216 #include <$ac_hdr>
4217 EOF
4218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4219 { (eval echo configure:4220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4221 if test -z "$ac_err"; then
4222   rm -rf conftest*
4223   eval "ac_cv_header_$ac_safe=yes"
4224 else
4225   echo "$ac_err" >&5
4226   echo "configure: failed program was:" >&5
4227   cat conftest.$ac_ext >&5
4228   rm -rf conftest*
4229   eval "ac_cv_header_$ac_safe=no"
4230 fi
4231 rm -f conftest*
4232 fi
4233 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4234   echo "$ac_t""yes" 1>&6
4235     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4236   cat >> confdefs.h <<EOF
4237 #define $ac_tr_hdr 1
4238 EOF
4239  
4240 else
4241   echo "$ac_t""no" 1>&6
4242 fi
4243 done
4244
4245
4246         if test $ac_cv_header_ltdl_h = no ; then
4247                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4248         fi
4249
4250         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4251 echo "configure:4252: checking for lt_dlinit in -lltdl" >&5
4252 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4253 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4254   echo $ac_n "(cached) $ac_c" 1>&6
4255 else
4256   ac_save_LIBS="$LIBS"
4257 LIBS="-lltdl  $LIBS"
4258 cat > conftest.$ac_ext <<EOF
4259 #line 4260 "configure"
4260 #include "confdefs.h"
4261 /* Override any gcc2 internal prototype to avoid an error.  */
4262 /* We use char because int might match the return type of a gcc2
4263     builtin and then its argument prototype would still apply.  */
4264 char lt_dlinit();
4265
4266 int main() {
4267 lt_dlinit()
4268 ; return 0; }
4269 EOF
4270 if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4271   rm -rf conftest*
4272   eval "ac_cv_lib_$ac_lib_var=yes"
4273 else
4274   echo "configure: failed program was:" >&5
4275   cat conftest.$ac_ext >&5
4276   rm -rf conftest*
4277   eval "ac_cv_lib_$ac_lib_var=no"
4278 fi
4279 rm -f conftest*
4280 LIBS="$ac_save_LIBS"
4281
4282 fi
4283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4284   echo "$ac_t""yes" 1>&6
4285   
4286             MODULES_LIBS=-lltdl
4287             cat >> confdefs.h <<\EOF
4288 #define HAVE_LIBLTDL 1
4289 EOF
4290
4291         
4292 else
4293   echo "$ac_t""no" 1>&6
4294 fi
4295
4296
4297         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4298                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4299         fi
4300         ol_link_modules=yes
4301 else
4302         ol_with_bdb2_module=static
4303         ol_with_dnssrv_module=static
4304         ol_with_ldap_module=static
4305         ol_with_ldbm_module=static
4306         ol_with_passwd_module=static
4307         ol_with_perl_module=static
4308         ol_with_shell_module=static
4309         ol_with_tcl_module=static
4310         ol_with_sql_module=static
4311 fi
4312
4313 # test for EBCDIC
4314 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4315 echo "configure:4316: checking for EBCDIC" >&5
4316 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4317   echo $ac_n "(cached) $ac_c" 1>&6
4318 else
4319   
4320         cat > conftest.$ac_ext <<EOF
4321 #line 4322 "configure"
4322 #include "confdefs.h"
4323
4324 #if !('M' == 0xd4)
4325 #include <__ASCII__/generate_error.h>
4326 #endif
4327
4328 EOF
4329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4330 { (eval echo configure:4331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4332 if test -z "$ac_err"; then
4333   rm -rf conftest*
4334   ol_cv_cpp_ebcdic=yes
4335 else
4336   echo "$ac_err" >&5
4337   echo "configure: failed program was:" >&5
4338   cat conftest.$ac_ext >&5
4339   rm -rf conftest*
4340   ol_cv_cpp_ebcdic=no
4341 fi
4342 rm -f conftest*
4343 fi
4344
4345 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4346 if test $ol_cv_cpp_ebcdic = yes ; then
4347         cat >> confdefs.h <<\EOF
4348 #define HAVE_EBCDIC 1
4349 EOF
4350
4351 fi
4352
4353 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4354 echo "configure:4355: checking for ANSI C header files" >&5
4355 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4356   echo $ac_n "(cached) $ac_c" 1>&6
4357 else
4358   cat > conftest.$ac_ext <<EOF
4359 #line 4360 "configure"
4360 #include "confdefs.h"
4361 #include <stdlib.h>
4362 #include <stdarg.h>
4363 #include <string.h>
4364 #include <float.h>
4365 EOF
4366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4367 { (eval echo configure:4368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4369 if test -z "$ac_err"; then
4370   rm -rf conftest*
4371   ol_cv_header_stdc=yes
4372 else
4373   echo "$ac_err" >&5
4374   echo "configure: failed program was:" >&5
4375   cat conftest.$ac_ext >&5
4376   rm -rf conftest*
4377   ol_cv_header_stdc=no
4378 fi
4379 rm -f conftest*
4380
4381 if test $ol_cv_header_stdc = yes; then
4382   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4383 cat > conftest.$ac_ext <<EOF
4384 #line 4385 "configure"
4385 #include "confdefs.h"
4386 #include <string.h>
4387 EOF
4388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4389   egrep "memchr" >/dev/null 2>&1; then
4390   :
4391 else
4392   rm -rf conftest*
4393   ol_cv_header_stdc=no
4394 fi
4395 rm -f conftest*
4396
4397 fi
4398
4399 if test $ol_cv_header_stdc = yes; then
4400   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4401 cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404 #include <stdlib.h>
4405 EOF
4406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4407   egrep "free" >/dev/null 2>&1; then
4408   :
4409 else
4410   rm -rf conftest*
4411   ol_cv_header_stdc=no
4412 fi
4413 rm -f conftest*
4414
4415 fi
4416
4417 if test $ol_cv_header_stdc = yes; then
4418   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4419 if test "$cross_compiling" = yes; then
4420   :
4421 else
4422   cat > conftest.$ac_ext <<EOF
4423 #line 4424 "configure"
4424 #include "confdefs.h"
4425 #include <ctype.h>
4426 #ifndef HAVE_EBCDIC
4427 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4428 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4429 #else
4430 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4431                 || ('j' <= (c) && (c) <= 'r') \
4432                 || ('s' <= (c) && (c) <= 'z'))
4433 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4434 #endif
4435 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4436 int main () { int i; for (i = 0; i < 256; i++)
4437 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4438 exit (0); }
4439
4440 EOF
4441 if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4442 then
4443   :
4444 else
4445   echo "configure: failed program was:" >&5
4446   cat conftest.$ac_ext >&5
4447   rm -fr conftest*
4448   ol_cv_header_stdc=no
4449 fi
4450 rm -fr conftest*
4451 fi
4452
4453 fi
4454 fi
4455
4456 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4457 if test $ol_cv_header_stdc = yes; then
4458   cat >> confdefs.h <<\EOF
4459 #define STDC_HEADERS 1
4460 EOF
4461
4462 fi
4463 ac_cv_header_stdc=disable
4464
4465
4466 if test $ol_cv_header_stdc != yes; then
4467         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4468 fi
4469
4470 ac_header_dirent=no
4471 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4472 do
4473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4474 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4475 echo "configure:4476: checking for $ac_hdr that defines DIR" >&5
4476 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4477   echo $ac_n "(cached) $ac_c" 1>&6
4478 else
4479   cat > conftest.$ac_ext <<EOF
4480 #line 4481 "configure"
4481 #include "confdefs.h"
4482 #include <sys/types.h>
4483 #include <$ac_hdr>
4484 int main() {
4485 DIR *dirp = 0;
4486 ; return 0; }
4487 EOF
4488 if { (eval echo configure:4489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4489   rm -rf conftest*
4490   eval "ac_cv_header_dirent_$ac_safe=yes"
4491 else
4492   echo "configure: failed program was:" >&5
4493   cat conftest.$ac_ext >&5
4494   rm -rf conftest*
4495   eval "ac_cv_header_dirent_$ac_safe=no"
4496 fi
4497 rm -f conftest*
4498 fi
4499 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4500   echo "$ac_t""yes" 1>&6
4501     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4502   cat >> confdefs.h <<EOF
4503 #define $ac_tr_hdr 1
4504 EOF
4505  ac_header_dirent=$ac_hdr; break
4506 else
4507   echo "$ac_t""no" 1>&6
4508 fi
4509 done
4510 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4511 if test $ac_header_dirent = dirent.h; then
4512 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4513 echo "configure:4514: checking for opendir in -ldir" >&5
4514 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4515 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4516   echo $ac_n "(cached) $ac_c" 1>&6
4517 else
4518   ac_save_LIBS="$LIBS"
4519 LIBS="-ldir  $LIBS"
4520 cat > conftest.$ac_ext <<EOF
4521 #line 4522 "configure"
4522 #include "confdefs.h"
4523 /* Override any gcc2 internal prototype to avoid an error.  */
4524 /* We use char because int might match the return type of a gcc2
4525     builtin and then its argument prototype would still apply.  */
4526 char opendir();
4527
4528 int main() {
4529 opendir()
4530 ; return 0; }
4531 EOF
4532 if { (eval echo configure:4533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4533   rm -rf conftest*
4534   eval "ac_cv_lib_$ac_lib_var=yes"
4535 else
4536   echo "configure: failed program was:" >&5
4537   cat conftest.$ac_ext >&5
4538   rm -rf conftest*
4539   eval "ac_cv_lib_$ac_lib_var=no"
4540 fi
4541 rm -f conftest*
4542 LIBS="$ac_save_LIBS"
4543
4544 fi
4545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4546   echo "$ac_t""yes" 1>&6
4547   LIBS="$LIBS -ldir"
4548 else
4549   echo "$ac_t""no" 1>&6
4550 fi
4551
4552 else
4553 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4554 echo "configure:4555: checking for opendir in -lx" >&5
4555 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4556 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4557   echo $ac_n "(cached) $ac_c" 1>&6
4558 else
4559   ac_save_LIBS="$LIBS"
4560 LIBS="-lx  $LIBS"
4561 cat > conftest.$ac_ext <<EOF
4562 #line 4563 "configure"
4563 #include "confdefs.h"
4564 /* Override any gcc2 internal prototype to avoid an error.  */
4565 /* We use char because int might match the return type of a gcc2
4566     builtin and then its argument prototype would still apply.  */
4567 char opendir();
4568
4569 int main() {
4570 opendir()
4571 ; return 0; }
4572 EOF
4573 if { (eval echo configure:4574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4574   rm -rf conftest*
4575   eval "ac_cv_lib_$ac_lib_var=yes"
4576 else
4577   echo "configure: failed program was:" >&5
4578   cat conftest.$ac_ext >&5
4579   rm -rf conftest*
4580   eval "ac_cv_lib_$ac_lib_var=no"
4581 fi
4582 rm -f conftest*
4583 LIBS="$ac_save_LIBS"
4584
4585 fi
4586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4587   echo "$ac_t""yes" 1>&6
4588   LIBS="$LIBS -lx"
4589 else
4590   echo "$ac_t""no" 1>&6
4591 fi
4592
4593 fi
4594
4595 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4596 echo "configure:4597: checking for sys/wait.h that is POSIX.1 compatible" >&5
4597 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4598   echo $ac_n "(cached) $ac_c" 1>&6
4599 else
4600   cat > conftest.$ac_ext <<EOF
4601 #line 4602 "configure"
4602 #include "confdefs.h"
4603 #include <sys/types.h>
4604 #include <sys/wait.h>
4605 #ifndef WEXITSTATUS
4606 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4607 #endif
4608 #ifndef WIFEXITED
4609 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4610 #endif
4611 int main() {
4612 int s;
4613 wait (&s);
4614 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4615 ; return 0; }
4616 EOF
4617 if { (eval echo configure:4618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4618   rm -rf conftest*
4619   ac_cv_header_sys_wait_h=yes
4620 else
4621   echo "configure: failed program was:" >&5
4622   cat conftest.$ac_ext >&5
4623   rm -rf conftest*
4624   ac_cv_header_sys_wait_h=no
4625 fi
4626 rm -f conftest*
4627 fi
4628
4629 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4630 if test $ac_cv_header_sys_wait_h = yes; then
4631   cat >> confdefs.h <<\EOF
4632 #define HAVE_SYS_WAIT_H 1
4633 EOF
4634
4635 fi
4636
4637 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4638 echo "configure:4639: checking POSIX termios" >&5
4639 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4640   echo $ac_n "(cached) $ac_c" 1>&6
4641 else
4642   cat > conftest.$ac_ext <<EOF
4643 #line 4644 "configure"
4644 #include "confdefs.h"
4645 #include <sys/types.h>
4646 #include <unistd.h>
4647 #include <termios.h>
4648 int main() {
4649 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4650    tcgetattr(0, 0);
4651 ; return 0; }
4652 EOF
4653 if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4654   rm -rf conftest*
4655   am_cv_sys_posix_termios=yes
4656 else
4657   echo "configure: failed program was:" >&5
4658   cat conftest.$ac_ext >&5
4659   rm -rf conftest*
4660   am_cv_sys_posix_termios=no
4661 fi
4662 rm -f conftest*
4663 fi
4664
4665 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4666
4667
4668  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4669 echo "configure:4670: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4670 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4671   echo $ac_n "(cached) $ac_c" 1>&6
4672 else
4673   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4674
4675   gwinsz_in_termios_h=no
4676   if test $am_cv_sys_posix_termios = yes; then
4677     cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 #include <sys/types.h>
4681 #     include <termios.h>
4682 #     ifdef TIOCGWINSZ
4683         yes
4684 #     endif
4685     
4686 EOF
4687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4688   egrep "yes" >/dev/null 2>&1; then
4689   rm -rf conftest*
4690   gwinsz_in_termios_h=yes
4691 fi
4692 rm -f conftest*
4693
4694   fi
4695
4696   if test $gwinsz_in_termios_h = no; then
4697     cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 #include <sys/types.h>
4701 #     include <sys/ioctl.h>
4702 #     ifdef TIOCGWINSZ
4703         yes
4704 #     endif
4705     
4706 EOF
4707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4708   egrep "yes" >/dev/null 2>&1; then
4709   rm -rf conftest*
4710   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4711 fi
4712 rm -f conftest*
4713
4714   fi
4715   
4716 fi
4717
4718 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4719   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4720     cat >> confdefs.h <<\EOF
4721 #define GWINSZ_IN_SYS_IOCTL 1
4722 EOF
4723
4724   fi
4725
4726 if test $am_cv_sys_posix_termios = yes ; then
4727         cat >> confdefs.h <<\EOF
4728 #define HAVE_POSIX_TERMIOS 1
4729 EOF
4730
4731 fi
4732
4733 for ac_hdr in \
4734         arpa/inet.h             \
4735         arpa/nameser.h  \
4736         assert.h                \
4737         conio.h                 \
4738         crypt.h                 \
4739         direct.h                \
4740         errno.h                 \
4741         fcntl.h                 \
4742         filio.h                 \
4743         getopt.h                \
4744         grp.h                   \
4745         io.h                    \
4746         libutil.h               \
4747         limits.h                \
4748         locale.h                \
4749         netinet/tcp.h   \
4750         malloc.h                \
4751         memory.h                \
4752         psap.h                  \
4753         pwd.h                   \
4754         process.h               \
4755         resolv.h                \
4756         sgtty.h                 \
4757         shadow.h                \
4758         stddef.h                \
4759         string.h                \
4760         strings.h               \
4761         sysexits.h              \
4762         sys/file.h              \
4763         sys/filio.h             \
4764         sys/errno.h             \
4765         sys/ioctl.h             \
4766         sys/param.h             \
4767         sys/resource.h  \
4768         sys/select.h    \
4769         sys/socket.h    \
4770         sys/syslog.h    \
4771         sys/time.h              \
4772         sys/types.h             \
4773         syslog.h                \
4774         termios.h               \
4775         unistd.h                \
4776         winsock.h               \
4777
4778 do
4779 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4780 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4781 echo "configure:4782: checking for $ac_hdr" >&5
4782 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788 #include <$ac_hdr>
4789 EOF
4790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4791 { (eval echo configure:4792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4793 if test -z "$ac_err"; then
4794   rm -rf conftest*
4795   eval "ac_cv_header_$ac_safe=yes"
4796 else
4797   echo "$ac_err" >&5
4798   echo "configure: failed program was:" >&5
4799   cat conftest.$ac_ext >&5
4800   rm -rf conftest*
4801   eval "ac_cv_header_$ac_safe=no"
4802 fi
4803 rm -f conftest*
4804 fi
4805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4806   echo "$ac_t""yes" 1>&6
4807     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4808   cat >> confdefs.h <<EOF
4809 #define $ac_tr_hdr 1
4810 EOF
4811  
4812 else
4813   echo "$ac_t""no" 1>&6
4814 fi
4815 done
4816
4817
4818
4819
4820 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4821 echo "configure:4822: checking for sigset in -lV3" >&5
4822 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4823 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4824   echo $ac_n "(cached) $ac_c" 1>&6
4825 else
4826   ac_save_LIBS="$LIBS"
4827 LIBS="-lV3  $LIBS"
4828 cat > conftest.$ac_ext <<EOF
4829 #line 4830 "configure"
4830 #include "confdefs.h"
4831 /* Override any gcc2 internal prototype to avoid an error.  */
4832 /* We use char because int might match the return type of a gcc2
4833     builtin and then its argument prototype would still apply.  */
4834 char sigset();
4835
4836 int main() {
4837 sigset()
4838 ; return 0; }
4839 EOF
4840 if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4841   rm -rf conftest*
4842   eval "ac_cv_lib_$ac_lib_var=yes"
4843 else
4844   echo "configure: failed program was:" >&5
4845   cat conftest.$ac_ext >&5
4846   rm -rf conftest*
4847   eval "ac_cv_lib_$ac_lib_var=no"
4848 fi
4849 rm -f conftest*
4850 LIBS="$ac_save_LIBS"
4851
4852 fi
4853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4854   echo "$ac_t""yes" 1>&6
4855     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4856     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4857   cat >> confdefs.h <<EOF
4858 #define $ac_tr_lib 1
4859 EOF
4860
4861   LIBS="-lV3 $LIBS"
4862
4863 else
4864   echo "$ac_t""no" 1>&6
4865 fi
4866
4867
4868 if test $ac_cv_header_winsock_h = yes; then
4869         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4870 echo "configure:4871: checking for winsock" >&5
4871 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4872   echo $ac_n "(cached) $ac_c" 1>&6
4873 else
4874   cat > conftest.$ac_ext <<EOF
4875 #line 4876 "configure"
4876 #include "confdefs.h"
4877 #include <winsock.h>
4878 int main() {
4879
4880                         socket(0,0,0);
4881                         select(0,NULL,NULL,NULL,NULL);
4882                         closesocket(0);
4883                         gethostname(NULL,0);
4884         
4885 ; return 0; }
4886 EOF
4887 if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4888   rm -rf conftest*
4889   ol_cv_winsock=yes
4890 else
4891   echo "configure: failed program was:" >&5
4892   cat conftest.$ac_ext >&5
4893   rm -rf conftest*
4894   ol_cv_winsock=no
4895 fi
4896 rm -f conftest*]
4897 fi
4898
4899 echo "$ac_t""$ol_cv_winsock" 1>&6
4900
4901         if test $ol_cv_winsock = yes ; then
4902                 cat >> confdefs.h <<\EOF
4903 #define HAVE_WINSOCK 1
4904 EOF
4905
4906                 ac_cv_func_socket=yes
4907                 ac_cv_func_select=yes
4908                 ac_cv_func_closesocket=yes
4909                 ac_cv_func_gethostname=yes
4910         fi
4911 fi
4912
4913
4914 echo $ac_n "checking for socket""... $ac_c" 1>&6
4915 echo "configure:4916: checking for socket" >&5
4916 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4917   echo $ac_n "(cached) $ac_c" 1>&6
4918 else
4919   cat > conftest.$ac_ext <<EOF
4920 #line 4921 "configure"
4921 #include "confdefs.h"
4922 /* System header to define __stub macros and hopefully few prototypes,
4923     which can conflict with char socket(); below.  */
4924 #include <assert.h>
4925 /* Override any gcc2 internal prototype to avoid an error.  */
4926 /* We use char because int might match the return type of a gcc2
4927     builtin and then its argument prototype would still apply.  */
4928 char socket();
4929 char (*f)();
4930
4931 int main() {
4932
4933 /* The GNU C library defines this for functions which it implements
4934     to always fail with ENOSYS.  Some functions are actually named
4935     something starting with __ and the normal name is an alias.  */
4936 #if defined (__stub_socket) || defined (__stub___socket)
4937 choke me
4938 #else
4939 f = socket;
4940 #endif
4941
4942 ; return 0; }
4943 EOF
4944 if { (eval echo configure:4945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4945   rm -rf conftest*
4946   eval "ac_cv_func_socket=yes"
4947 else
4948   echo "configure: failed program was:" >&5
4949   cat conftest.$ac_ext >&5
4950   rm -rf conftest*
4951   eval "ac_cv_func_socket=no"
4952 fi
4953 rm -f conftest*
4954 fi
4955
4956 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4957   echo "$ac_t""yes" 1>&6
4958   :
4959 else
4960   echo "$ac_t""no" 1>&6
4961         
4962         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4963 echo "configure:4964: checking for main in -lsocket" >&5
4964 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4965 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4966   echo $ac_n "(cached) $ac_c" 1>&6
4967 else
4968   ac_save_LIBS="$LIBS"
4969 LIBS="-lsocket  $LIBS"
4970 cat > conftest.$ac_ext <<EOF
4971 #line 4972 "configure"
4972 #include "confdefs.h"
4973
4974 int main() {
4975 main()
4976 ; return 0; }
4977 EOF
4978 if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4979   rm -rf conftest*
4980   eval "ac_cv_lib_$ac_lib_var=yes"
4981 else
4982   echo "configure: failed program was:" >&5
4983   cat conftest.$ac_ext >&5
4984   rm -rf conftest*
4985   eval "ac_cv_lib_$ac_lib_var=no"
4986 fi
4987 rm -f conftest*
4988 LIBS="$ac_save_LIBS"
4989
4990 fi
4991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4992   echo "$ac_t""yes" 1>&6
4993     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4994     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4995   cat >> confdefs.h <<EOF
4996 #define $ac_tr_lib 1
4997 EOF
4998
4999   LIBS="-lsocket $LIBS"
5000
5001 else
5002   echo "$ac_t""no" 1>&6
5003 fi
5004
5005         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5006 echo "configure:5007: checking for main in -lnet" >&5
5007 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5008 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5009   echo $ac_n "(cached) $ac_c" 1>&6
5010 else
5011   ac_save_LIBS="$LIBS"
5012 LIBS="-lnet  $LIBS"
5013 cat > conftest.$ac_ext <<EOF
5014 #line 5015 "configure"
5015 #include "confdefs.h"
5016
5017 int main() {
5018 main()
5019 ; return 0; }
5020 EOF
5021 if { (eval echo configure:5022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5022   rm -rf conftest*
5023   eval "ac_cv_lib_$ac_lib_var=yes"
5024 else
5025   echo "configure: failed program was:" >&5
5026   cat conftest.$ac_ext >&5
5027   rm -rf conftest*
5028   eval "ac_cv_lib_$ac_lib_var=no"
5029 fi
5030 rm -f conftest*
5031 LIBS="$ac_save_LIBS"
5032
5033 fi
5034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5035   echo "$ac_t""yes" 1>&6
5036     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5037     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5038   cat >> confdefs.h <<EOF
5039 #define $ac_tr_lib 1
5040 EOF
5041
5042   LIBS="-lnet $LIBS"
5043
5044 else
5045   echo "$ac_t""no" 1>&6
5046 fi
5047
5048         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5049 echo "configure:5050: checking for main in -lnsl_s" >&5
5050 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5051 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5052   echo $ac_n "(cached) $ac_c" 1>&6
5053 else
5054   ac_save_LIBS="$LIBS"
5055 LIBS="-lnsl_s  $LIBS"
5056 cat > conftest.$ac_ext <<EOF
5057 #line 5058 "configure"
5058 #include "confdefs.h"
5059
5060 int main() {
5061 main()
5062 ; return 0; }
5063 EOF
5064 if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5065   rm -rf conftest*
5066   eval "ac_cv_lib_$ac_lib_var=yes"
5067 else
5068   echo "configure: failed program was:" >&5
5069   cat conftest.$ac_ext >&5
5070   rm -rf conftest*
5071   eval "ac_cv_lib_$ac_lib_var=no"
5072 fi
5073 rm -f conftest*
5074 LIBS="$ac_save_LIBS"
5075
5076 fi
5077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5078   echo "$ac_t""yes" 1>&6
5079     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5080     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5081   cat >> confdefs.h <<EOF
5082 #define $ac_tr_lib 1
5083 EOF
5084
5085   LIBS="-lnsl_s $LIBS"
5086
5087 else
5088   echo "$ac_t""no" 1>&6
5089 fi
5090
5091         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5092 echo "configure:5093: checking for main in -lnsl" >&5
5093 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5094 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5095   echo $ac_n "(cached) $ac_c" 1>&6
5096 else
5097   ac_save_LIBS="$LIBS"
5098 LIBS="-lnsl  $LIBS"
5099 cat > conftest.$ac_ext <<EOF
5100 #line 5101 "configure"
5101 #include "confdefs.h"
5102
5103 int main() {
5104 main()
5105 ; return 0; }
5106 EOF
5107 if { (eval echo configure:5108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5108   rm -rf conftest*
5109   eval "ac_cv_lib_$ac_lib_var=yes"
5110 else
5111   echo "configure: failed program was:" >&5
5112   cat conftest.$ac_ext >&5
5113   rm -rf conftest*
5114   eval "ac_cv_lib_$ac_lib_var=no"
5115 fi
5116 rm -f conftest*
5117 LIBS="$ac_save_LIBS"
5118
5119 fi
5120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5121   echo "$ac_t""yes" 1>&6
5122     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5123     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5124   cat >> confdefs.h <<EOF
5125 #define $ac_tr_lib 1
5126 EOF
5127
5128   LIBS="-lnsl $LIBS"
5129
5130 else
5131   echo "$ac_t""no" 1>&6
5132 fi
5133
5134         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5135 echo "configure:5136: checking for socket in -linet" >&5
5136 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5138   echo $ac_n "(cached) $ac_c" 1>&6
5139 else
5140   ac_save_LIBS="$LIBS"
5141 LIBS="-linet  $LIBS"
5142 cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145 /* Override any gcc2 internal prototype to avoid an error.  */
5146 /* We use char because int might match the return type of a gcc2
5147     builtin and then its argument prototype would still apply.  */
5148 char socket();
5149
5150 int main() {
5151 socket()
5152 ; return 0; }
5153 EOF
5154 if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5155   rm -rf conftest*
5156   eval "ac_cv_lib_$ac_lib_var=yes"
5157 else
5158   echo "configure: failed program was:" >&5
5159   cat conftest.$ac_ext >&5
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=no"
5162 fi
5163 rm -f conftest*
5164 LIBS="$ac_save_LIBS"
5165
5166 fi
5167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5168   echo "$ac_t""yes" 1>&6
5169     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5171   cat >> confdefs.h <<EOF
5172 #define $ac_tr_lib 1
5173 EOF
5174
5175   LIBS="-linet $LIBS"
5176
5177 else
5178   echo "$ac_t""no" 1>&6
5179 fi
5180
5181         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5182 echo "configure:5183: checking for main in -lgen" >&5
5183 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5184 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5185   echo $ac_n "(cached) $ac_c" 1>&6
5186 else
5187   ac_save_LIBS="$LIBS"
5188 LIBS="-lgen  $LIBS"
5189 cat > conftest.$ac_ext <<EOF
5190 #line 5191 "configure"
5191 #include "confdefs.h"
5192
5193 int main() {
5194 main()
5195 ; return 0; }
5196 EOF
5197 if { (eval echo configure:5198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5198   rm -rf conftest*
5199   eval "ac_cv_lib_$ac_lib_var=yes"
5200 else
5201   echo "configure: failed program was:" >&5
5202   cat conftest.$ac_ext >&5
5203   rm -rf conftest*
5204   eval "ac_cv_lib_$ac_lib_var=no"
5205 fi
5206 rm -f conftest*
5207 LIBS="$ac_save_LIBS"
5208
5209 fi
5210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5211   echo "$ac_t""yes" 1>&6
5212     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5213     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5214   cat >> confdefs.h <<EOF
5215 #define $ac_tr_lib 1
5216 EOF
5217
5218   LIBS="-lgen $LIBS"
5219
5220 else
5221   echo "$ac_t""no" 1>&6
5222 fi
5223
5224
5225 fi
5226
5227
5228 echo $ac_n "checking for select""... $ac_c" 1>&6
5229 echo "configure:5230: checking for select" >&5
5230 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5231   echo $ac_n "(cached) $ac_c" 1>&6
5232 else
5233   cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236 /* System header to define __stub macros and hopefully few prototypes,
5237     which can conflict with char select(); below.  */
5238 #include <assert.h>
5239 /* Override any gcc2 internal prototype to avoid an error.  */
5240 /* We use char because int might match the return type of a gcc2
5241     builtin and then its argument prototype would still apply.  */
5242 char select();
5243 char (*f)();
5244
5245 int main() {
5246
5247 /* The GNU C library defines this for functions which it implements
5248     to always fail with ENOSYS.  Some functions are actually named
5249     something starting with __ and the normal name is an alias.  */
5250 #if defined (__stub_select) || defined (__stub___select)
5251 choke me
5252 #else
5253 f = select;
5254 #endif
5255
5256 ; return 0; }
5257 EOF
5258 if { (eval echo configure:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5259   rm -rf conftest*
5260   eval "ac_cv_func_select=yes"
5261 else
5262   echo "configure: failed program was:" >&5
5263   cat conftest.$ac_ext >&5
5264   rm -rf conftest*
5265   eval "ac_cv_func_select=no"
5266 fi
5267 rm -f conftest*
5268 fi
5269
5270 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5271   echo "$ac_t""yes" 1>&6
5272   :
5273 else
5274   echo "$ac_t""no" 1>&6
5275 { echo "configure: error: select() required." 1>&2; exit 1; }
5276 fi
5277
5278
5279 if test "${ac_cv_header_winsock_h}" != yes; then
5280                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5281 echo "configure:5282: checking types of arguments for select()" >&5
5282  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5283   echo $ac_n "(cached) $ac_c" 1>&6
5284 else
5285    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5286   echo $ac_n "(cached) $ac_c" 1>&6
5287 else
5288     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5289   echo $ac_n "(cached) $ac_c" 1>&6
5290 else
5291      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5292      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5293       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5294        cat > conftest.$ac_ext <<EOF
5295 #line 5296 "configure"
5296 #include "confdefs.h"
5297 #ifdef HAVE_SYS_TYPES_H
5298 #include <sys/types.h>
5299 #endif
5300 #ifdef HAVE_SYS_TIME_H
5301 #include <sys/time.h>
5302 #endif
5303 #ifdef HAVE_SYS_SELECT_H
5304 #include <sys/select.h>
5305 #endif
5306 #ifdef HAVE_SYS_SOCKET_H
5307 #include <sys/socket.h>
5308 #endif
5309 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);
5310 int main() {
5311
5312 ; return 0; }
5313 EOF
5314 if { (eval echo configure:5315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5315   rm -rf conftest*
5316           ac_not_found=no ; break 3
5317 else
5318   echo "configure: failed program was:" >&5
5319   cat conftest.$ac_ext >&5
5320   rm -rf conftest*
5321   ac_not_found=yes
5322 fi
5323 rm -f conftest*
5324       done
5325      done
5326     done
5327    
5328 fi
5329   
5330 fi
5331  
5332 fi
5333  if test "$ac_not_found" = yes; then
5334   ac_cv_func_select_arg1=int 
5335   ac_cv_func_select_arg234='int *' 
5336   ac_cv_func_select_arg5='struct timeval *'
5337  fi
5338  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5339  cat >> confdefs.h <<EOF
5340 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5341 EOF
5342
5343  cat >> confdefs.h <<EOF
5344 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5345 EOF
5346
5347  cat >> confdefs.h <<EOF
5348 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5349 EOF
5350
5351
5352 fi
5353
5354
5355 for ac_hdr in regex.h 
5356 do
5357 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5358 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5359 echo "configure:5360: checking for $ac_hdr" >&5
5360 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5361   echo $ac_n "(cached) $ac_c" 1>&6
5362 else
5363   cat > conftest.$ac_ext <<EOF
5364 #line 5365 "configure"
5365 #include "confdefs.h"
5366 #include <$ac_hdr>
5367 EOF
5368 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5369 { (eval echo configure:5370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5370 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5371 if test -z "$ac_err"; then
5372   rm -rf conftest*
5373   eval "ac_cv_header_$ac_safe=yes"
5374 else
5375   echo "$ac_err" >&5
5376   echo "configure: failed program was:" >&5
5377   cat conftest.$ac_ext >&5
5378   rm -rf conftest*
5379   eval "ac_cv_header_$ac_safe=no"
5380 fi
5381 rm -f conftest*
5382 fi
5383 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5384   echo "$ac_t""yes" 1>&6
5385     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5386   cat >> confdefs.h <<EOF
5387 #define $ac_tr_hdr 1
5388 EOF
5389  
5390 else
5391   echo "$ac_t""no" 1>&6
5392 fi
5393 done
5394
5395 if test "$ac_cv_header_regex_h" != yes ; then
5396         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5397 fi
5398 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5399 echo "configure:5400: checking for regfree" >&5
5400 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5401   echo $ac_n "(cached) $ac_c" 1>&6
5402 else
5403   cat > conftest.$ac_ext <<EOF
5404 #line 5405 "configure"
5405 #include "confdefs.h"
5406 /* System header to define __stub macros and hopefully few prototypes,
5407     which can conflict with char regfree(); below.  */
5408 #include <assert.h>
5409 /* Override any gcc2 internal prototype to avoid an error.  */
5410 /* We use char because int might match the return type of a gcc2
5411     builtin and then its argument prototype would still apply.  */
5412 char regfree();
5413 char (*f)();
5414
5415 int main() {
5416
5417 /* The GNU C library defines this for functions which it implements
5418     to always fail with ENOSYS.  Some functions are actually named
5419     something starting with __ and the normal name is an alias.  */
5420 #if defined (__stub_regfree) || defined (__stub___regfree)
5421 choke me
5422 #else
5423 f = regfree;
5424 #endif
5425
5426 ; return 0; }
5427 EOF
5428 if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5429   rm -rf conftest*
5430   eval "ac_cv_func_regfree=yes"
5431 else
5432   echo "configure: failed program was:" >&5
5433   cat conftest.$ac_ext >&5
5434   rm -rf conftest*
5435   eval "ac_cv_func_regfree=no"
5436 fi
5437 rm -f conftest*
5438 fi
5439
5440 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5441   echo "$ac_t""yes" 1>&6
5442   :
5443 else
5444   echo "$ac_t""no" 1>&6
5445 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5446 fi
5447
5448
5449
5450 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5451 echo "configure:5452: checking for compatible POSIX regex" >&5
5452 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5453   echo $ac_n "(cached) $ac_c" 1>&6
5454 else
5455   
5456         if test "$cross_compiling" = yes; then
5457   ol_cv_c_posix_regex=cross
5458 else
5459   cat > conftest.$ac_ext <<EOF
5460 #line 5461 "configure"
5461 #include "confdefs.h"
5462
5463 #include <sys/types.h>
5464 #include <regex.h>
5465 static char *pattern, *string;
5466 main()
5467 {
5468         int rc;
5469         regex_t re;
5470
5471         pattern = "^A";
5472
5473         if(regcomp(&re, pattern, 0)) {
5474                 return -1;
5475         }
5476         
5477         string = "ALL MATCH";
5478         
5479         rc = regexec(&re, string, 0, (void*)0, 0);
5480
5481         regfree(&re);
5482
5483         return rc;
5484 }
5485 EOF
5486 if { (eval echo configure:5487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5487 then
5488   ol_cv_c_posix_regex=yes
5489 else
5490   echo "configure: failed program was:" >&5
5491   cat conftest.$ac_ext >&5
5492   rm -fr conftest*
5493   ol_cv_c_posix_regex=no
5494 fi
5495 rm -fr conftest*
5496 fi
5497
5498 fi
5499
5500 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5501
5502 if test "$ol_cv_c_posix_regex" = no ; then
5503         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5504 fi
5505
5506 ol_link_dnssrv=no
5507 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5508 echo "configure:5509: checking for res_query" >&5
5509 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5510   echo $ac_n "(cached) $ac_c" 1>&6
5511 else
5512   cat > conftest.$ac_ext <<EOF
5513 #line 5514 "configure"
5514 #include "confdefs.h"
5515 /* System header to define __stub macros and hopefully few prototypes,
5516     which can conflict with char res_query(); below.  */
5517 #include <assert.h>
5518 /* Override any gcc2 internal prototype to avoid an error.  */
5519 /* We use char because int might match the return type of a gcc2
5520     builtin and then its argument prototype would still apply.  */
5521 char res_query();
5522 char (*f)();
5523
5524 int main() {
5525
5526 /* The GNU C library defines this for functions which it implements
5527     to always fail with ENOSYS.  Some functions are actually named
5528     something starting with __ and the normal name is an alias.  */
5529 #if defined (__stub_res_query) || defined (__stub___res_query)
5530 choke me
5531 #else
5532 f = res_query;
5533 #endif
5534
5535 ; return 0; }
5536 EOF
5537 if { (eval echo configure:5538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5538   rm -rf conftest*
5539   eval "ac_cv_func_res_query=yes"
5540 else
5541   echo "configure: failed program was:" >&5
5542   cat conftest.$ac_ext >&5
5543   rm -rf conftest*
5544   eval "ac_cv_func_res_query=no"
5545 fi
5546 rm -f conftest*
5547 fi
5548
5549 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5550   echo "$ac_t""yes" 1>&6
5551   :
5552 else
5553   echo "$ac_t""no" 1>&6
5554 fi
5555
5556 if test $ac_cv_func_res_query = no ; then 
5557         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5558 echo "configure:5559: checking for res_query in -lbind" >&5
5559 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5560 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5561   echo $ac_n "(cached) $ac_c" 1>&6
5562 else
5563   ac_save_LIBS="$LIBS"
5564 LIBS="-lbind  $LIBS"
5565 cat > conftest.$ac_ext <<EOF
5566 #line 5567 "configure"
5567 #include "confdefs.h"
5568 /* Override any gcc2 internal prototype to avoid an error.  */
5569 /* We use char because int might match the return type of a gcc2
5570     builtin and then its argument prototype would still apply.  */
5571 char res_query();
5572
5573 int main() {
5574 res_query()
5575 ; return 0; }
5576 EOF
5577 if { (eval echo configure:5578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5578   rm -rf conftest*
5579   eval "ac_cv_lib_$ac_lib_var=yes"
5580 else
5581   echo "configure: failed program was:" >&5
5582   cat conftest.$ac_ext >&5
5583   rm -rf conftest*
5584   eval "ac_cv_lib_$ac_lib_var=no"
5585 fi
5586 rm -f conftest*
5587 LIBS="$ac_save_LIBS"
5588
5589 fi
5590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5591   echo "$ac_t""yes" 1>&6
5592     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5593     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5594   cat >> confdefs.h <<EOF
5595 #define $ac_tr_lib 1
5596 EOF
5597
5598   LIBS="-lbind $LIBS"
5599
5600 else
5601   echo "$ac_t""no" 1>&6
5602 fi
5603
5604         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5605 fi
5606
5607 if test $ac_cv_func_res_query = no ; then 
5608         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5609 echo "configure:5610: checking for __res_query in -lbind" >&5
5610 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5611 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5612   echo $ac_n "(cached) $ac_c" 1>&6
5613 else
5614   ac_save_LIBS="$LIBS"
5615 LIBS="-lbind  $LIBS"
5616 cat > conftest.$ac_ext <<EOF
5617 #line 5618 "configure"
5618 #include "confdefs.h"
5619 /* Override any gcc2 internal prototype to avoid an error.  */
5620 /* We use char because int might match the return type of a gcc2
5621     builtin and then its argument prototype would still apply.  */
5622 char __res_query();
5623
5624 int main() {
5625 __res_query()
5626 ; return 0; }
5627 EOF
5628 if { (eval echo configure:5629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5629   rm -rf conftest*
5630   eval "ac_cv_lib_$ac_lib_var=yes"
5631 else
5632   echo "configure: failed program was:" >&5
5633   cat conftest.$ac_ext >&5
5634   rm -rf conftest*
5635   eval "ac_cv_lib_$ac_lib_var=no"
5636 fi
5637 rm -f conftest*
5638 LIBS="$ac_save_LIBS"
5639
5640 fi
5641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5642   echo "$ac_t""yes" 1>&6
5643     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5644     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5645   cat >> confdefs.h <<EOF
5646 #define $ac_tr_lib 1
5647 EOF
5648
5649   LIBS="-lbind $LIBS"
5650
5651 else
5652   echo "$ac_t""no" 1>&6
5653 fi
5654
5655         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5656 fi
5657
5658 if test $ac_cv_func_res_query = no ; then 
5659         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5660 echo "configure:5661: checking for res_query in -lresolv" >&5
5661 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5662 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5663   echo $ac_n "(cached) $ac_c" 1>&6
5664 else
5665   ac_save_LIBS="$LIBS"
5666 LIBS="-lresolv  $LIBS"
5667 cat > conftest.$ac_ext <<EOF
5668 #line 5669 "configure"
5669 #include "confdefs.h"
5670 /* Override any gcc2 internal prototype to avoid an error.  */
5671 /* We use char because int might match the return type of a gcc2
5672     builtin and then its argument prototype would still apply.  */
5673 char res_query();
5674
5675 int main() {
5676 res_query()
5677 ; return 0; }
5678 EOF
5679 if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5680   rm -rf conftest*
5681   eval "ac_cv_lib_$ac_lib_var=yes"
5682 else
5683   echo "configure: failed program was:" >&5
5684   cat conftest.$ac_ext >&5
5685   rm -rf conftest*
5686   eval "ac_cv_lib_$ac_lib_var=no"
5687 fi
5688 rm -f conftest*
5689 LIBS="$ac_save_LIBS"
5690
5691 fi
5692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5693   echo "$ac_t""yes" 1>&6
5694     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5695     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5696   cat >> confdefs.h <<EOF
5697 #define $ac_tr_lib 1
5698 EOF
5699
5700   LIBS="-lresolv $LIBS"
5701
5702 else
5703   echo "$ac_t""no" 1>&6
5704 fi
5705
5706         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5707 fi
5708
5709 if test "$ac_cv_func_res_query" = yes ; then
5710         cat >> confdefs.h <<\EOF
5711 #define HAVE_RES_QUERY 1
5712 EOF
5713
5714
5715         if test $ol_enable_dnssrv != no ; then
5716                 ol_link_dnssrv=yes
5717         fi
5718 fi
5719
5720 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5721         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5722 fi
5723
5724 if test $ol_enable_quipu != no ; then
5725         for ac_hdr in quipu/commonarg.h
5726 do
5727 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5728 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5729 echo "configure:5730: checking for $ac_hdr" >&5
5730 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5731   echo $ac_n "(cached) $ac_c" 1>&6
5732 else
5733   cat > conftest.$ac_ext <<EOF
5734 #line 5735 "configure"
5735 #include "confdefs.h"
5736 #include <$ac_hdr>
5737 EOF
5738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5739 { (eval echo configure:5740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5741 if test -z "$ac_err"; then
5742   rm -rf conftest*
5743   eval "ac_cv_header_$ac_safe=yes"
5744 else
5745   echo "$ac_err" >&5
5746   echo "configure: failed program was:" >&5
5747   cat conftest.$ac_ext >&5
5748   rm -rf conftest*
5749   eval "ac_cv_header_$ac_safe=no"
5750 fi
5751 rm -f conftest*
5752 fi
5753 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5754   echo "$ac_t""yes" 1>&6
5755     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5756   cat >> confdefs.h <<EOF
5757 #define $ac_tr_hdr 1
5758 EOF
5759  
5760 else
5761   echo "$ac_t""no" 1>&6
5762 fi
5763 done
5764
5765
5766         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5767                 BUILD_QUIPU=yes
5768         elif test $ol_enable_quipu = auto ; then
5769                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5770         else
5771                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5772         fi
5773 fi
5774
5775 ol_link_kbind=no
5776 ol_link_kpasswd=no
5777 ol_link_krb5=no
5778 ol_link_krb4=no
5779
5780 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5781         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5782
5783         for ac_hdr in krb5.h
5784 do
5785 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5786 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5787 echo "configure:5788: checking for $ac_hdr" >&5
5788 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5789   echo $ac_n "(cached) $ac_c" 1>&6
5790 else
5791   cat > conftest.$ac_ext <<EOF
5792 #line 5793 "configure"
5793 #include "confdefs.h"
5794 #include <$ac_hdr>
5795 EOF
5796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5797 { (eval echo configure:5798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5799 if test -z "$ac_err"; then
5800   rm -rf conftest*
5801   eval "ac_cv_header_$ac_safe=yes"
5802 else
5803   echo "$ac_err" >&5
5804   echo "configure: failed program was:" >&5
5805   cat conftest.$ac_ext >&5
5806   rm -rf conftest*
5807   eval "ac_cv_header_$ac_safe=no"
5808 fi
5809 rm -f conftest*
5810 fi
5811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5812   echo "$ac_t""yes" 1>&6
5813     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5814   cat >> confdefs.h <<EOF
5815 #define $ac_tr_hdr 1
5816 EOF
5817  
5818 else
5819   echo "$ac_t""no" 1>&6
5820 fi
5821 done
5822
5823
5824         if test $ac_cv_header_krb5_h = yes ; then
5825                                 for ac_hdr in heim_err.h
5826 do
5827 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5828 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5829 echo "configure:5830: checking for $ac_hdr" >&5
5830 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5831   echo $ac_n "(cached) $ac_c" 1>&6
5832 else
5833   cat > conftest.$ac_ext <<EOF
5834 #line 5835 "configure"
5835 #include "confdefs.h"
5836 #include <$ac_hdr>
5837 EOF
5838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5839 { (eval echo configure:5840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5841 if test -z "$ac_err"; then
5842   rm -rf conftest*
5843   eval "ac_cv_header_$ac_safe=yes"
5844 else
5845   echo "$ac_err" >&5
5846   echo "configure: failed program was:" >&5
5847   cat conftest.$ac_ext >&5
5848   rm -rf conftest*
5849   eval "ac_cv_header_$ac_safe=no"
5850 fi
5851 rm -f conftest*
5852 fi
5853 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5854   echo "$ac_t""yes" 1>&6
5855     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5856   cat >> confdefs.h <<EOF
5857 #define $ac_tr_hdr 1
5858 EOF
5859  
5860 else
5861   echo "$ac_t""no" 1>&6
5862 fi
5863 done
5864
5865                 if test $ac_cv_header_heim_err_h = yes ; then
5866                         krb5_impl=heimdal
5867                 else
5868                         krb5_impl=mit
5869                 fi
5870
5871                 if test $krb5_impl = mit; then
5872                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5873 echo "configure:5874: checking for main in -lkrb5" >&5
5874 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5875 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5876   echo $ac_n "(cached) $ac_c" 1>&6
5877 else
5878   ac_save_LIBS="$LIBS"
5879 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5880 cat > conftest.$ac_ext <<EOF
5881 #line 5882 "configure"
5882 #include "confdefs.h"
5883
5884 int main() {
5885 main()
5886 ; return 0; }
5887 EOF
5888 if { (eval echo configure:5889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5889   rm -rf conftest*
5890   eval "ac_cv_lib_$ac_lib_var=yes"
5891 else
5892   echo "configure: failed program was:" >&5
5893   cat conftest.$ac_ext >&5
5894   rm -rf conftest*
5895   eval "ac_cv_lib_$ac_lib_var=no"
5896 fi
5897 rm -f conftest*
5898 LIBS="$ac_save_LIBS"
5899
5900 fi
5901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5902   echo "$ac_t""yes" 1>&6
5903   have_krb5=yes
5904                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5905 else
5906   echo "$ac_t""no" 1>&6
5907 have_krb5=no
5908 fi
5909
5910
5911                 elif test $krb5_impl = heimdal; then
5912                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5913 echo "configure:5914: checking for main in -lkrb5" >&5
5914 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5915 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5916   echo $ac_n "(cached) $ac_c" 1>&6
5917 else
5918   ac_save_LIBS="$LIBS"
5919 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5920 cat > conftest.$ac_ext <<EOF
5921 #line 5922 "configure"
5922 #include "confdefs.h"
5923
5924 int main() {
5925 main()
5926 ; return 0; }
5927 EOF
5928 if { (eval echo configure:5929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5929   rm -rf conftest*
5930   eval "ac_cv_lib_$ac_lib_var=yes"
5931 else
5932   echo "configure: failed program was:" >&5
5933   cat conftest.$ac_ext >&5
5934   rm -rf conftest*
5935   eval "ac_cv_lib_$ac_lib_var=no"
5936 fi
5937 rm -f conftest*
5938 LIBS="$ac_save_LIBS"
5939
5940 fi
5941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5942   echo "$ac_t""yes" 1>&6
5943   have_krb5=yes
5944                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5945 else
5946   echo "$ac_t""no" 1>&6
5947 have_krb5=no
5948 fi
5949
5950
5951                         cat >> confdefs.h <<\EOF
5952 #define HAVE_HEIMDAL_KERBEROS 1
5953 EOF
5954
5955                 else
5956                         have_krb5=no
5957                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5958                 fi
5959
5960                 if test $have_krb5 = yes ; then
5961                         ol_link_krb5=yes
5962
5963                         cat >> confdefs.h <<\EOF
5964 #define HAVE_KRB5 1
5965 EOF
5966
5967
5968                         if test $ol_enable_kpasswd != no ; then
5969                                 ol_link_kpasswd=yes;
5970                         fi
5971
5972                         if test $ol_with_kerberos = k5only ; then
5973                                 ol_with_kerberos=found
5974                         fi
5975
5976                 elif test $ol_with_kerberos != auto ; then
5977                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5978                 fi
5979
5980         fi
5981 fi
5982
5983 if test $ol_link_krb5 = yes -a \
5984         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5985
5986         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5987 do
5988 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5989 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5990 echo "configure:5991: checking for $ac_hdr" >&5
5991 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5992   echo $ac_n "(cached) $ac_c" 1>&6
5993 else
5994   cat > conftest.$ac_ext <<EOF
5995 #line 5996 "configure"
5996 #include "confdefs.h"
5997 #include <$ac_hdr>
5998 EOF
5999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6000 { (eval echo configure:6001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6002 if test -z "$ac_err"; then
6003   rm -rf conftest*
6004   eval "ac_cv_header_$ac_safe=yes"
6005 else
6006   echo "$ac_err" >&5
6007   echo "configure: failed program was:" >&5
6008   cat conftest.$ac_ext >&5
6009   rm -rf conftest*
6010   eval "ac_cv_header_$ac_safe=no"
6011 fi
6012 rm -f conftest*
6013 fi
6014 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6015   echo "$ac_t""yes" 1>&6
6016     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6017   cat >> confdefs.h <<EOF
6018 #define $ac_tr_hdr 1
6019 EOF
6020  
6021 else
6022   echo "$ac_t""no" 1>&6
6023 fi
6024 done
6025
6026
6027         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6028                 if test $krb5_impl = mit; then
6029                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6030 echo "configure:6031: checking for main in -lkrb4" >&5
6031 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6032 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6033   echo $ac_n "(cached) $ac_c" 1>&6
6034 else
6035   ac_save_LIBS="$LIBS"
6036 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6037 cat > conftest.$ac_ext <<EOF
6038 #line 6039 "configure"
6039 #include "confdefs.h"
6040
6041 int main() {
6042 main()
6043 ; return 0; }
6044 EOF
6045 if { (eval echo configure:6046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6046   rm -rf conftest*
6047   eval "ac_cv_lib_$ac_lib_var=yes"
6048 else
6049   echo "configure: failed program was:" >&5
6050   cat conftest.$ac_ext >&5
6051   rm -rf conftest*
6052   eval "ac_cv_lib_$ac_lib_var=no"
6053 fi
6054 rm -f conftest*
6055 LIBS="$ac_save_LIBS"
6056
6057 fi
6058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6059   echo "$ac_t""yes" 1>&6
6060   have_k425=yes
6061                                 KRB4_LIBS="-lkrb4 -ldes425"
6062 else
6063   echo "$ac_t""no" 1>&6
6064 have_k425=no
6065 fi
6066
6067
6068                 elif test $krb5_impl = heimdal; then
6069                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6070 echo "configure:6071: checking for main in -lkrb4" >&5
6071 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6072 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6073   echo $ac_n "(cached) $ac_c" 1>&6
6074 else
6075   ac_save_LIBS="$LIBS"
6076 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6077 cat > conftest.$ac_ext <<EOF
6078 #line 6079 "configure"
6079 #include "confdefs.h"
6080
6081 int main() {
6082 main()
6083 ; return 0; }
6084 EOF
6085 if { (eval echo configure:6086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6086   rm -rf conftest*
6087   eval "ac_cv_lib_$ac_lib_var=yes"
6088 else
6089   echo "configure: failed program was:" >&5
6090   cat conftest.$ac_ext >&5
6091   rm -rf conftest*
6092   eval "ac_cv_lib_$ac_lib_var=no"
6093 fi
6094 rm -f conftest*
6095 LIBS="$ac_save_LIBS"
6096
6097 fi
6098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6099   echo "$ac_t""yes" 1>&6
6100   have_k425=yes
6101                                 KRB4_LIBS="-lkrb4"
6102 else
6103   echo "$ac_t""no" 1>&6
6104 have_k425=no
6105 fi
6106
6107
6108                 else
6109                         have_425=no
6110                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6111                 fi
6112
6113                 if test $have_k425 = yes ; then
6114                         ol_with_kerberos=found
6115                         ol_link_krb4=yes
6116
6117                         cat >> confdefs.h <<\EOF
6118 #define HAVE_KRB425 1
6119 EOF
6120
6121                         cat >> confdefs.h <<\EOF
6122 #define HAVE_KRB4 1
6123 EOF
6124
6125
6126                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6127 echo "configure:6128: checking for des_debug in Kerberos libraries" >&5
6128 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6129   echo $ac_n "(cached) $ac_c" 1>&6
6130 else
6131   
6132                                                                 save_LIBS="$LIBS"
6133                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6134                                 cat > conftest.$ac_ext <<EOF
6135 #line 6136 "configure"
6136 #include "confdefs.h"
6137
6138 #include <kerberosIV/krb.h>
6139 #include <kerberosIV/des.h>
6140 extern int des_debug;
6141
6142 int main() {
6143
6144 des_debug = 1;
6145
6146 ; return 0; }
6147 EOF
6148 if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6149   rm -rf conftest*
6150   ol_cv_var_des_debug=yes
6151 else
6152   echo "configure: failed program was:" >&5
6153   cat conftest.$ac_ext >&5
6154   rm -rf conftest*
6155   ol_cv_var_des_debug=no
6156 fi
6157 rm -f conftest*
6158                                                                 LIBS="$save_LIBS"
6159                         
6160 fi
6161
6162 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6163
6164                         if test $ol_cv_var_des_debug = yes ; then
6165                                 cat >> confdefs.h <<\EOF
6166 #define HAVE_DES_DEBUG 1
6167 EOF
6168
6169                         fi
6170
6171                         LIBS="$save_LIBS"
6172                 fi
6173         fi
6174 fi
6175
6176 if test $ol_link_krb5 = yes ; then
6177         ol_with_kerberos=found
6178 fi
6179
6180 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6181         -o $ol_with_kerberos = kth ; then
6182
6183         for ac_hdr in krb.h des.h krb-archaeology.h 
6184 do
6185 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6186 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6187 echo "configure:6188: checking for $ac_hdr" >&5
6188 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6189   echo $ac_n "(cached) $ac_c" 1>&6
6190 else
6191   cat > conftest.$ac_ext <<EOF
6192 #line 6193 "configure"
6193 #include "confdefs.h"
6194 #include <$ac_hdr>
6195 EOF
6196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6197 { (eval echo configure:6198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6199 if test -z "$ac_err"; then
6200   rm -rf conftest*
6201   eval "ac_cv_header_$ac_safe=yes"
6202 else
6203   echo "$ac_err" >&5
6204   echo "configure: failed program was:" >&5
6205   cat conftest.$ac_ext >&5
6206   rm -rf conftest*
6207   eval "ac_cv_header_$ac_safe=no"
6208 fi
6209 rm -f conftest*
6210 fi
6211 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6212   echo "$ac_t""yes" 1>&6
6213     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6214   cat >> confdefs.h <<EOF
6215 #define $ac_tr_hdr 1
6216 EOF
6217  
6218 else
6219   echo "$ac_t""no" 1>&6
6220 fi
6221 done
6222
6223
6224         if test $ac_cv_header_krb_h = yes ; then
6225                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6226 echo "configure:6227: checking for main in -lkrb" >&5
6227 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6228 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6229   echo $ac_n "(cached) $ac_c" 1>&6
6230 else
6231   ac_save_LIBS="$LIBS"
6232 LIBS="-lkrb -ldes $LIBS"
6233 cat > conftest.$ac_ext <<EOF
6234 #line 6235 "configure"
6235 #include "confdefs.h"
6236
6237 int main() {
6238 main()
6239 ; return 0; }
6240 EOF
6241 if { (eval echo configure:6242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6242   rm -rf conftest*
6243   eval "ac_cv_lib_$ac_lib_var=yes"
6244 else
6245   echo "configure: failed program was:" >&5
6246   cat conftest.$ac_ext >&5
6247   rm -rf conftest*
6248   eval "ac_cv_lib_$ac_lib_var=no"
6249 fi
6250 rm -f conftest*
6251 LIBS="$ac_save_LIBS"
6252
6253 fi
6254 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6255   echo "$ac_t""yes" 1>&6
6256   have_k4=yes
6257 else
6258   echo "$ac_t""no" 1>&6
6259 have_k4=no
6260 fi
6261
6262
6263                 if test $have_k4 = yes ; then
6264                         ol_with_kerberos=found
6265                         ol_link_krb4=yes
6266
6267                         cat >> confdefs.h <<\EOF
6268 #define HAVE_KRB4 1
6269 EOF
6270
6271
6272                         KRB4_LIBS="-lkrb -ldes"
6273
6274                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6275                                 cat >> confdefs.h <<\EOF
6276 #define HAVE_KTH_KERBEROS 1
6277 EOF
6278
6279                         fi
6280                 fi
6281         fi
6282 fi
6283
6284 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6285         ol_link_kpasswd=yes;
6286 fi
6287
6288 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6289         cat >> confdefs.h <<\EOF
6290 #define HAVE_KERBEROS 1
6291 EOF
6292
6293
6294 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6295         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6296 fi
6297
6298 ol_link_tls=no
6299 if test $ol_with_tls != no ; then
6300         
6301         for ac_hdr in openssl/ssl.h ssl.h
6302 do
6303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6304 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6305 echo "configure:6306: checking for $ac_hdr" >&5
6306 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6307   echo $ac_n "(cached) $ac_c" 1>&6
6308 else
6309   cat > conftest.$ac_ext <<EOF
6310 #line 6311 "configure"
6311 #include "confdefs.h"
6312 #include <$ac_hdr>
6313 EOF
6314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6315 { (eval echo configure:6316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6317 if test -z "$ac_err"; then
6318   rm -rf conftest*
6319   eval "ac_cv_header_$ac_safe=yes"
6320 else
6321   echo "$ac_err" >&5
6322   echo "configure: failed program was:" >&5
6323   cat conftest.$ac_ext >&5
6324   rm -rf conftest*
6325   eval "ac_cv_header_$ac_safe=no"
6326 fi
6327 rm -f conftest*
6328 fi
6329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6330   echo "$ac_t""yes" 1>&6
6331     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6332   cat >> confdefs.h <<EOF
6333 #define $ac_tr_hdr 1
6334 EOF
6335  
6336 else
6337   echo "$ac_t""no" 1>&6
6338 fi
6339 done
6340
6341         
6342         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6343                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6344 echo "configure:6345: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6345 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6346 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6347   echo $ac_n "(cached) $ac_c" 1>&6
6348 else
6349   ac_save_LIBS="$LIBS"
6350 LIBS="-lssl -lcrypto $LIBS"
6351 cat > conftest.$ac_ext <<EOF
6352 #line 6353 "configure"
6353 #include "confdefs.h"
6354 /* Override any gcc2 internal prototype to avoid an error.  */
6355 /* We use char because int might match the return type of a gcc2
6356     builtin and then its argument prototype would still apply.  */
6357 char SSLeay_add_ssl_algorithms();
6358
6359 int main() {
6360 SSLeay_add_ssl_algorithms()
6361 ; return 0; }
6362 EOF
6363 if { (eval echo configure:6364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6364   rm -rf conftest*
6365   eval "ac_cv_lib_$ac_lib_var=yes"
6366 else
6367   echo "configure: failed program was:" >&5
6368   cat conftest.$ac_ext >&5
6369   rm -rf conftest*
6370   eval "ac_cv_lib_$ac_lib_var=no"
6371 fi
6372 rm -f conftest*
6373 LIBS="$ac_save_LIBS"
6374
6375 fi
6376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6377   echo "$ac_t""yes" 1>&6
6378   have_ssleay=yes
6379                         need_rsaref=no
6380 else
6381   echo "$ac_t""no" 1>&6
6382 have_ssleay=no
6383 fi
6384
6385                         
6386                 if test $have_ssleay = no ; then
6387                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6388 echo "configure:6389: checking for SSL_library_init in -lssl" >&5
6389 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6391   echo $ac_n "(cached) $ac_c" 1>&6
6392 else
6393   ac_save_LIBS="$LIBS"
6394 LIBS="-lssl -lcrypto $LIBS"
6395 cat > conftest.$ac_ext <<EOF
6396 #line 6397 "configure"
6397 #include "confdefs.h"
6398 /* Override any gcc2 internal prototype to avoid an error.  */
6399 /* We use char because int might match the return type of a gcc2
6400     builtin and then its argument prototype would still apply.  */
6401 char SSL_library_init();
6402
6403 int main() {
6404 SSL_library_init()
6405 ; return 0; }
6406 EOF
6407 if { (eval echo configure:6408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6408   rm -rf conftest*
6409   eval "ac_cv_lib_$ac_lib_var=yes"
6410 else
6411   echo "configure: failed program was:" >&5
6412   cat conftest.$ac_ext >&5
6413   rm -rf conftest*
6414   eval "ac_cv_lib_$ac_lib_var=no"
6415 fi
6416 rm -f conftest*
6417 LIBS="$ac_save_LIBS"
6418
6419 fi
6420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6421   echo "$ac_t""yes" 1>&6
6422   have_ssleay=yes
6423                                 need_rsaref=no
6424 else
6425   echo "$ac_t""no" 1>&6
6426 have_ssleay=no
6427 fi
6428
6429                 fi
6430
6431                 if test $have_ssleay = no ; then
6432                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6433 echo "configure:6434: checking for ssl3_accept in -lssl" >&5
6434 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6435 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6436   echo $ac_n "(cached) $ac_c" 1>&6
6437 else
6438   ac_save_LIBS="$LIBS"
6439 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6440 cat > conftest.$ac_ext <<EOF
6441 #line 6442 "configure"
6442 #include "confdefs.h"
6443 /* Override any gcc2 internal prototype to avoid an error.  */
6444 /* We use char because int might match the return type of a gcc2
6445     builtin and then its argument prototype would still apply.  */
6446 char ssl3_accept();
6447
6448 int main() {
6449 ssl3_accept()
6450 ; return 0; }
6451 EOF
6452 if { (eval echo configure:6453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6453   rm -rf conftest*
6454   eval "ac_cv_lib_$ac_lib_var=yes"
6455 else
6456   echo "configure: failed program was:" >&5
6457   cat conftest.$ac_ext >&5
6458   rm -rf conftest*
6459   eval "ac_cv_lib_$ac_lib_var=no"
6460 fi
6461 rm -f conftest*
6462 LIBS="$ac_save_LIBS"
6463
6464 fi
6465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6466   echo "$ac_t""yes" 1>&6
6467   have_ssleay=yes
6468                                 need_rsaref=yes
6469 else
6470   echo "$ac_t""no" 1>&6
6471 have_ssleay=no
6472 fi
6473
6474                 fi
6475
6476                 if test $have_ssleay = yes ; then
6477                         ol_with_tls=found
6478                         ol_link_tls=yes
6479
6480                         cat >> confdefs.h <<\EOF
6481 #define HAVE_SSLEAY 1
6482 EOF
6483
6484
6485                         if test $need_rsaref = yes; then
6486                                 cat >> confdefs.h <<\EOF
6487 #define HAVE_RSAREF 1
6488 EOF
6489
6490
6491                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6492                         else
6493                                 TLS_LIBS="-lssl -lcrypto"
6494                         fi
6495                 fi
6496         fi
6497 fi
6498
6499 if test $ol_link_tls = yes ; then
6500         cat >> confdefs.h <<\EOF
6501 #define HAVE_TLS 1
6502 EOF
6503
6504 fi      
6505
6506 for ac_func in \
6507         ctime_r                 \
6508         gethostbyname_r gethostbyaddr_r \
6509
6510 do
6511 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6512 echo "configure:6513: checking for $ac_func" >&5
6513 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6514   echo $ac_n "(cached) $ac_c" 1>&6
6515 else
6516   cat > conftest.$ac_ext <<EOF
6517 #line 6518 "configure"
6518 #include "confdefs.h"
6519 /* System header to define __stub macros and hopefully few prototypes,
6520     which can conflict with char $ac_func(); below.  */
6521 #include <assert.h>
6522 /* Override any gcc2 internal prototype to avoid an error.  */
6523 /* We use char because int might match the return type of a gcc2
6524     builtin and then its argument prototype would still apply.  */
6525 char $ac_func();
6526 char (*f)();
6527
6528 int main() {
6529
6530 /* The GNU C library defines this for functions which it implements
6531     to always fail with ENOSYS.  Some functions are actually named
6532     something starting with __ and the normal name is an alias.  */
6533 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6534 choke me
6535 #else
6536 f = $ac_func;
6537 #endif
6538
6539 ; return 0; }
6540 EOF
6541 if { (eval echo configure:6542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6542   rm -rf conftest*
6543   eval "ac_cv_func_$ac_func=yes"
6544 else
6545   echo "configure: failed program was:" >&5
6546   cat conftest.$ac_ext >&5
6547   rm -rf conftest*
6548   eval "ac_cv_func_$ac_func=no"
6549 fi
6550 rm -f conftest*
6551 fi
6552
6553 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6554   echo "$ac_t""yes" 1>&6
6555     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6556   cat >> confdefs.h <<EOF
6557 #define $ac_tr_func 1
6558 EOF
6559  
6560 else
6561   echo "$ac_t""no" 1>&6
6562 fi
6563 done
6564
6565
6566 if test "$ac_cv_func_ctime_r" = no ; then
6567         ol_cv_func_ctime_r_nargs=0
6568 else
6569         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6570 echo "configure:6571: checking number of arguments of ctime_r" >&5
6571 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6572   echo $ac_n "(cached) $ac_c" 1>&6
6573 else
6574   cat > conftest.$ac_ext <<EOF
6575 #line 6576 "configure"
6576 #include "confdefs.h"
6577 #include <time.h>
6578 int main() {
6579 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6580 ; return 0; }
6581 EOF
6582 if { (eval echo configure:6583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6583   rm -rf conftest*
6584   ol_cv_func_ctime_r_nargs3=yes
6585 else
6586   echo "configure: failed program was:" >&5
6587   cat conftest.$ac_ext >&5
6588   rm -rf conftest*
6589   ol_cv_func_ctime_r_nargs3=no
6590 fi
6591 rm -f conftest*
6592
6593         cat > conftest.$ac_ext <<EOF
6594 #line 6595 "configure"
6595 #include "confdefs.h"
6596 #include <time.h>
6597 int main() {
6598 time_t ti; char *buffer; ctime_r(&ti,buffer);
6599 ; return 0; }
6600 EOF
6601 if { (eval echo configure:6602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6602   rm -rf conftest*
6603   ol_cv_func_ctime_r_nargs2=yes
6604 else
6605   echo "configure: failed program was:" >&5
6606   cat conftest.$ac_ext >&5
6607   rm -rf conftest*
6608   ol_cv_func_ctime_r_nargs2=no
6609 fi
6610 rm -f conftest*
6611
6612         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6613                 $ol_cv_func_ctime_r_nargs2 = no ; then
6614
6615                 ol_cv_func_ctime_r_nargs=3
6616
6617         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6618                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6619
6620                 ol_cv_func_ctime_r_nargs=2
6621
6622         else
6623                 ol_cv_func_ctime_r_nargs=0
6624         fi
6625   
6626 fi
6627
6628 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6629
6630   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6631         cat >> confdefs.h <<EOF
6632 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6633 EOF
6634
6635   fi
6636
6637 fi
6638
6639 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6640         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6641 echo "configure:6642: checking number of arguments of gethostbyname_r" >&5
6642 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6643   echo $ac_n "(cached) $ac_c" 1>&6
6644 else
6645   cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648 #include <sys/types.h>
6649 #include <sys/socket.h>
6650 #include <netinet/in.h>
6651 #include <netdb.h>
6652 #define BUFSIZE (sizeof(struct hostent)+10)
6653 int main() {
6654 struct hostent hent; char buffer[BUFSIZE];
6655                 int bufsize=BUFSIZE;int h_errno;
6656                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6657                         buffer, bufsize, &h_errno);
6658 ; return 0; }
6659 EOF
6660 if { (eval echo configure:6661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6661   rm -rf conftest*
6662   ol_cv_func_gethostbyname_r_nargs5=yes
6663 else
6664   echo "configure: failed program was:" >&5
6665   cat conftest.$ac_ext >&5
6666   rm -rf conftest*
6667   ol_cv_func_gethostbyname_r_nargs5=no
6668 fi
6669 rm -f conftest*
6670
6671         cat > conftest.$ac_ext <<EOF
6672 #line 6673 "configure"
6673 #include "confdefs.h"
6674 #include <sys/types.h>
6675 #include <sys/socket.h>
6676 #include <netinet/in.h>
6677 #include <netdb.h>
6678 #define BUFSIZE (sizeof(struct hostent)+10)
6679 int main() {
6680 struct hostent hent;struct hostent *rhent;
6681                 char buffer[BUFSIZE];
6682                 int bufsize=BUFSIZE;int h_errno;
6683                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6684                         &rhent, &h_errno);
6685 ; return 0; }
6686 EOF
6687 if { (eval echo configure:6688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6688   rm -rf conftest*
6689   ol_cv_func_gethostbyname_r_nargs6=yes
6690 else
6691   echo "configure: failed program was:" >&5
6692   cat conftest.$ac_ext >&5
6693   rm -rf conftest*
6694   ol_cv_func_gethostbyname_r_nargs6=no
6695 fi
6696 rm -f conftest*
6697
6698         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6699                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6700
6701                 ol_cv_func_gethostbyname_r_nargs=5
6702
6703         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6704                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6705
6706                 ol_cv_func_gethostbyname_r_nargs=6
6707
6708         else
6709                 ol_cv_func_gethostbyname_r_nargs=0
6710         fi
6711   
6712 fi
6713
6714 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6715   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6716         cat >> confdefs.h <<EOF
6717 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6718 EOF
6719
6720   fi
6721
6722 else
6723         ol_cv_func_gethostbyname_r_nargs=0
6724 fi
6725  
6726 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6727         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6728 echo "configure:6729: checking number of arguments of gethostbyaddr_r" >&5
6729 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6730   echo $ac_n "(cached) $ac_c" 1>&6
6731 else
6732   cat > conftest.$ac_ext <<EOF
6733 #line 6734 "configure"
6734 #include "confdefs.h"
6735 #include <sys/types.h>
6736 #include <sys/socket.h>
6737 #include <netinet/in.h>
6738 #include <netdb.h>
6739 #define BUFSIZE (sizeof(struct hostent)+10)
6740 int main() {
6741 struct hostent hent; char buffer[BUFSIZE]; 
6742             struct in_addr add;
6743             size_t alen=sizeof(struct in_addr);
6744             int bufsize=BUFSIZE;int h_errno;
6745                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6746                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6747 ; return 0; }
6748 EOF
6749 if { (eval echo configure:6750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6750   rm -rf conftest*
6751   ol_cv_func_gethostbyaddr_r_nargs7=yes
6752 else
6753   echo "configure: failed program was:" >&5
6754   cat conftest.$ac_ext >&5
6755   rm -rf conftest*
6756   ol_cv_func_gethostbyaddr_r_nargs7=no
6757 fi
6758 rm -f conftest*
6759
6760         cat > conftest.$ac_ext <<EOF
6761 #line 6762 "configure"
6762 #include "confdefs.h"
6763 #include <sys/types.h>
6764 #include <sys/socket.h>
6765 #include <netinet/in.h>
6766 #include <netdb.h>
6767 #define BUFSIZE (sizeof(struct hostent)+10)
6768 int main() {
6769 struct hostent hent;
6770                 struct hostent *rhent; char buffer[BUFSIZE]; 
6771                 struct in_addr add;
6772                 size_t alen=sizeof(struct in_addr);
6773                 int bufsize=BUFSIZE;int h_errno;
6774                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6775                         alen, AF_INET, &hent, buffer, bufsize, 
6776                         &rhent, &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_gethostbyaddr_r_nargs8=yes
6782 else
6783   echo "configure: failed program was:" >&5
6784   cat conftest.$ac_ext >&5
6785   rm -rf conftest*
6786   ol_cv_func_gethostbyaddr_r_nargs8=no
6787 fi
6788 rm -f conftest*
6789
6790         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6791                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6792
6793                 ol_cv_func_gethostbyaddr_r_nargs=7
6794
6795         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6796                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6797
6798                 ol_cv_func_gethostbyaddr_r_nargs=8
6799
6800         else
6801                 ol_cv_func_gethostbyaddr_r_nargs=0
6802         fi
6803   
6804 fi
6805
6806 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6807   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6808     cat >> confdefs.h <<EOF
6809 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6810 EOF
6811
6812   fi
6813
6814 else
6815         ol_cv_func_gethostbyaddr_r_nargs=0
6816 fi
6817
6818 if test "$ac_cv_func_ctime_r" = yes \
6819         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6820         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6821         -a "$ac_cv_func_gethostbyname_r" = yes \
6822         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6823         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6824         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6825         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6826         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6827         ; then
6828  
6829         cat >> confdefs.h <<\EOF
6830 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6831 EOF
6832
6833 fi
6834
6835 ol_link_threads=no
6836
6837 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6838         -o $ol_with_threads = nt ; then
6839
6840         
6841         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6842 echo "configure:6843: checking for NT Threads" >&5
6843 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6844   echo $ac_n "(cached) $ac_c" 1>&6
6845 else
6846   
6847                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6848 echo "configure:6849: checking for _beginthread" >&5
6849 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6850   echo $ac_n "(cached) $ac_c" 1>&6
6851 else
6852   cat > conftest.$ac_ext <<EOF
6853 #line 6854 "configure"
6854 #include "confdefs.h"
6855 /* System header to define __stub macros and hopefully few prototypes,
6856     which can conflict with char _beginthread(); below.  */
6857 #include <assert.h>
6858 /* Override any gcc2 internal prototype to avoid an error.  */
6859 /* We use char because int might match the return type of a gcc2
6860     builtin and then its argument prototype would still apply.  */
6861 char _beginthread();
6862 char (*f)();
6863
6864 int main() {
6865
6866 /* The GNU C library defines this for functions which it implements
6867     to always fail with ENOSYS.  Some functions are actually named
6868     something starting with __ and the normal name is an alias.  */
6869 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6870 choke me
6871 #else
6872 f = _beginthread;
6873 #endif
6874
6875 ; return 0; }
6876 EOF
6877 if { (eval echo configure:6878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6878   rm -rf conftest*
6879   eval "ac_cv_func__beginthread=yes"
6880 else
6881   echo "configure: failed program was:" >&5
6882   cat conftest.$ac_ext >&5
6883   rm -rf conftest*
6884   eval "ac_cv_func__beginthread=no"
6885 fi
6886 rm -f conftest*
6887 fi
6888
6889 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6890   echo "$ac_t""yes" 1>&6
6891   ol_cv_nt_threads=yes
6892 else
6893   echo "$ac_t""no" 1>&6
6894 ol_cv_nt_threads=no
6895 fi
6896
6897         
6898 fi
6899
6900 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6901
6902         if test $ol_cv_nt_threads = yes ; then
6903                 cat >> confdefs.h <<\EOF
6904 #define HAVE_NT_THREADS 1
6905 EOF
6906
6907         fi
6908
6909
6910         if test "$ol_cv_nt_threads" = yes ; then
6911         ol_link_threads=nt
6912         ol_with_threads=found
6913         ol_with_yielding_select=yes
6914
6915                 cat >> confdefs.h <<\EOF
6916 #define HAVE_NT_SERVICE_MANAGER 1
6917 EOF
6918
6919                 cat >> confdefs.h <<\EOF
6920 #define HAVE_NT_EVENT_LOG 1
6921 EOF
6922
6923         fi
6924
6925         if test $ol_with_threads = nt ; then
6926                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6927         fi
6928 fi
6929
6930 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6931         -o $ol_with_threads = posix ; then
6932
6933         for ac_hdr in pthread.h
6934 do
6935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6937 echo "configure:6938: checking for $ac_hdr" >&5
6938 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6939   echo $ac_n "(cached) $ac_c" 1>&6
6940 else
6941   cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944 #include <$ac_hdr>
6945 EOF
6946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6947 { (eval echo configure:6948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6949 if test -z "$ac_err"; then
6950   rm -rf conftest*
6951   eval "ac_cv_header_$ac_safe=yes"
6952 else
6953   echo "$ac_err" >&5
6954   echo "configure: failed program was:" >&5
6955   cat conftest.$ac_ext >&5
6956   rm -rf conftest*
6957   eval "ac_cv_header_$ac_safe=no"
6958 fi
6959 rm -f conftest*
6960 fi
6961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6962   echo "$ac_t""yes" 1>&6
6963     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6964   cat >> confdefs.h <<EOF
6965 #define $ac_tr_hdr 1
6966 EOF
6967  
6968 else
6969   echo "$ac_t""no" 1>&6
6970 fi
6971 done
6972
6973
6974         if test $ac_cv_header_pthread_h = yes ; then
6975                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6976 echo "configure:6977: checking POSIX thread version" >&5
6977 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6978   echo $ac_n "(cached) $ac_c" 1>&6
6979 else
6980   
6981         cat > conftest.$ac_ext <<EOF
6982 #line 6983 "configure"
6983 #include "confdefs.h"
6984
6985 #               include <pthread.h>
6986                 /* this check could be improved */
6987 #               ifdef PTHREAD_ONCE_INIT
6988                         pthread_version_final;
6989 #               endif
6990         
6991 EOF
6992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6993   egrep "pthread_version_final" >/dev/null 2>&1; then
6994   rm -rf conftest*
6995   ol_pthread_final=yes
6996 else
6997   rm -rf conftest*
6998   ol_pthread_final=no
6999 fi
7000 rm -f conftest*
7001
7002
7003         cat > conftest.$ac_ext <<EOF
7004 #line 7005 "configure"
7005 #include "confdefs.h"
7006
7007 #               include <pthread.h>
7008                 /* this check could be improved */
7009 #               ifdef pthread_once_init
7010                         pthread_version_draft4;
7011 #               endif
7012         
7013 EOF
7014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7015   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7016   rm -rf conftest*
7017   ol_pthread_draft4=yes
7018 else
7019   rm -rf conftest*
7020   ol_pthread_draft4=no
7021 fi
7022 rm -f conftest*
7023
7024
7025         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7026                 ol_cv_pthread_version=final
7027         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7028                 ol_cv_pthread_version=draft4
7029         else
7030                 ol_cv_pthread_version=unknown
7031         fi
7032
7033 fi
7034
7035 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7036
7037
7038                 if test $ol_cv_pthread_version = final ; then
7039                         cat >> confdefs.h <<\EOF
7040 #define HAVE_PTHREADS_FINAL 1
7041 EOF
7042
7043                 elif test $ol_cv_pthread_version = draft4 ; then
7044                         cat >> confdefs.h <<\EOF
7045 #define HAVE_PTHREADS_D4 1
7046 EOF
7047
7048                 else
7049                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7050                 fi
7051
7052                 # consider threads found
7053                 ol_with_threads=found
7054
7055                 
7056         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7057 echo "configure:7058: checking for LinuxThreads pthread.h" >&5
7058 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7059   echo $ac_n "(cached) $ac_c" 1>&6
7060 else
7061   cat > conftest.$ac_ext <<EOF
7062 #line 7063 "configure"
7063 #include "confdefs.h"
7064 #include <pthread.h>
7065 EOF
7066 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7067   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7068   rm -rf conftest*
7069   ol_cv_header_linux_threads=yes
7070 else
7071   rm -rf conftest*
7072   ol_cv_header_linux_threads=no
7073 fi
7074 rm -f conftest*
7075
7076                 
7077 fi
7078
7079 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7080         if test $ol_cv_header_linux_threads = yes; then
7081                 cat >> confdefs.h <<\EOF
7082 #define HAVE_LINUX_THREADS 1
7083 EOF
7084
7085         fi
7086
7087                 
7088         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7089 echo "configure:7090: checking for GNU Pth pthread.h" >&5
7090 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7091   echo $ac_n "(cached) $ac_c" 1>&6
7092 else
7093   cat > conftest.$ac_ext <<EOF
7094 #line 7095 "configure"
7095 #include "confdefs.h"
7096 #include <pthread.h>
7097 #ifdef _POSIX_THREAD_IS_GNU_PTH
7098         __gnu_pth__;
7099 #endif
7100
7101 EOF
7102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7103   egrep "__gnu_pth__" >/dev/null 2>&1; then
7104   rm -rf conftest*
7105   ol_cv_header_gnu_pth_pthread_h=yes
7106 else
7107   rm -rf conftest*
7108   ol_cv_header_gnu_pth_pthread_h=no
7109 fi
7110 rm -f conftest*
7111
7112                 
7113 fi
7114
7115 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7116
7117
7118                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7119                         for ac_hdr in sched.h
7120 do
7121 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7122 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7123 echo "configure:7124: checking for $ac_hdr" >&5
7124 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7125   echo $ac_n "(cached) $ac_c" 1>&6
7126 else
7127   cat > conftest.$ac_ext <<EOF
7128 #line 7129 "configure"
7129 #include "confdefs.h"
7130 #include <$ac_hdr>
7131 EOF
7132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7133 { (eval echo configure:7134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7135 if test -z "$ac_err"; then
7136   rm -rf conftest*
7137   eval "ac_cv_header_$ac_safe=yes"
7138 else
7139   echo "$ac_err" >&5
7140   echo "configure: failed program was:" >&5
7141   cat conftest.$ac_ext >&5
7142   rm -rf conftest*
7143   eval "ac_cv_header_$ac_safe=no"
7144 fi
7145 rm -f conftest*
7146 fi
7147 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7148   echo "$ac_t""yes" 1>&6
7149     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7150   cat >> confdefs.h <<EOF
7151 #define $ac_tr_hdr 1
7152 EOF
7153  
7154 else
7155   echo "$ac_t""no" 1>&6
7156 fi
7157 done
7158
7159                 fi
7160
7161                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7162                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7163 echo "configure:7164: checking for pthread_create in default libraries" >&5
7164 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7165   echo $ac_n "(cached) $ac_c" 1>&6
7166 else
7167   
7168                 if test "$cross_compiling" = yes; then
7169   cat > conftest.$ac_ext <<EOF
7170 #line 7171 "configure"
7171 #include "confdefs.h"
7172 /* pthread test headers */
7173 #include <pthread.h>
7174 #ifndef NULL
7175 #define NULL (void*)0
7176 #endif
7177
7178 static void *task(p)
7179         void *p;
7180 {
7181         return (void *) (p == NULL);
7182 }
7183
7184 int main() {
7185
7186         /* pthread test function */
7187         pthread_t t;
7188         int status;
7189 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7190         /* This system (e.g. AIX) defaults detached; must override */
7191         pthread_attr_t attr;
7192
7193         status = pthread_attr_init(&attr);
7194         if( status ) exit( status );
7195
7196         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7197         if( status ) exit( status );
7198
7199 #define ATTR    &attr
7200 #else
7201 #if HAVE_PTHREADS_D4
7202 #define ATTR    pthread_attr_default
7203 #else
7204 #define ATTR    NULL
7205 #endif
7206 #endif
7207         /* make sure pthread_create() isn't just a stub */
7208         status = pthread_create(&t, ATTR, task, NULL);
7209         if( status ) exit( status );
7210
7211         /* make sure pthread_detach() isn't just a stub */
7212 #if HAVE_PTHREADS_D4
7213         status = pthread_detach( &t );
7214 #else
7215         status = pthread_detach( t );
7216 #endif
7217
7218 #ifdef HAVE_LINUX_THREADS
7219         pthread_kill_other_threads_np();
7220 #endif
7221
7222         exit( status );
7223
7224 ; return 0; }
7225 EOF
7226 if { (eval echo configure:7227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7227   rm -rf conftest*
7228   ol_cv_pthread_create=yes
7229 else
7230   echo "configure: failed program was:" >&5
7231   cat conftest.$ac_ext >&5
7232   rm -rf conftest*
7233   ol_cv_pthread_create=no
7234 fi
7235 rm -f conftest*
7236 else
7237   cat > conftest.$ac_ext <<EOF
7238 #line 7239 "configure"
7239 #include "confdefs.h"
7240 /* pthread test headers */
7241 #include <pthread.h>
7242 #ifndef NULL
7243 #define NULL (void*)0
7244 #endif
7245
7246 static void *task(p)
7247         void *p;
7248 {
7249         return (void *) (p == NULL);
7250 }
7251
7252
7253 int main(argc, argv)
7254         int argc;
7255         char **argv;
7256 {
7257
7258         /* pthread test function */
7259         pthread_t t;
7260         int status;
7261 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7262         /* This system (e.g. AIX) defaults detached; must override */
7263         pthread_attr_t attr;
7264
7265         status = pthread_attr_init(&attr);
7266         if( status ) exit( status );
7267
7268         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7269         if( status ) exit( status );
7270
7271 #define ATTR    &attr
7272 #else
7273 #if HAVE_PTHREADS_D4
7274 #define ATTR    pthread_attr_default
7275 #else
7276 #define ATTR    NULL
7277 #endif
7278 #endif
7279         /* make sure pthread_create() isn't just a stub */
7280         status = pthread_create(&t, ATTR, task, NULL);
7281         if( status ) exit( status );
7282
7283         /* make sure pthread_detach() isn't just a stub */
7284 #if HAVE_PTHREADS_D4
7285         status = pthread_detach( &t );
7286 #else
7287         status = pthread_detach( t );
7288 #endif
7289
7290 #ifdef HAVE_LINUX_THREADS
7291         pthread_kill_other_threads_np();
7292 #endif
7293
7294         exit( status );
7295
7296 }
7297
7298 EOF
7299 if { (eval echo configure:7300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7300 then
7301   ol_cv_pthread_create=yes
7302 else
7303   echo "configure: failed program was:" >&5
7304   cat conftest.$ac_ext >&5
7305   rm -fr conftest*
7306   ol_cv_pthread_create=no
7307 fi
7308 rm -fr conftest*
7309 fi
7310
7311 fi
7312
7313 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7314
7315                 if test $ol_cv_pthread_create != no ; then
7316                         ol_link_threads=posix
7317                         ol_link_pthreads=""
7318                 fi
7319                 
7320                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7321 if test "$ol_link_threads" = no ; then
7322         # try -kthread
7323         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7324 echo "configure:7325: checking for pthread link with -kthread" >&5
7325 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7326   echo $ac_n "(cached) $ac_c" 1>&6
7327 else
7328   
7329                 # save the flags
7330                 ol_LIBS="$LIBS"
7331                 LIBS="-kthread $LIBS"
7332
7333                 if test "$cross_compiling" = yes; then
7334   cat > conftest.$ac_ext <<EOF
7335 #line 7336 "configure"
7336 #include "confdefs.h"
7337 /* pthread test headers */
7338 #include <pthread.h>
7339 #ifndef NULL
7340 #define NULL (void*)0
7341 #endif
7342
7343 static void *task(p)
7344         void *p;
7345 {
7346         return (void *) (p == NULL);
7347 }
7348
7349 int main() {
7350
7351         /* pthread test function */
7352         pthread_t t;
7353         int status;
7354 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7355         /* This system (e.g. AIX) defaults detached; must override */
7356         pthread_attr_t attr;
7357
7358         status = pthread_attr_init(&attr);
7359         if( status ) exit( status );
7360
7361         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7362         if( status ) exit( status );
7363
7364 #define ATTR    &attr
7365 #else
7366 #if HAVE_PTHREADS_D4
7367 #define ATTR    pthread_attr_default
7368 #else
7369 #define ATTR    NULL
7370 #endif
7371 #endif
7372         /* make sure pthread_create() isn't just a stub */
7373         status = pthread_create(&t, ATTR, task, NULL);
7374         if( status ) exit( status );
7375
7376         /* make sure pthread_detach() isn't just a stub */
7377 #if HAVE_PTHREADS_D4
7378         status = pthread_detach( &t );
7379 #else
7380         status = pthread_detach( t );
7381 #endif
7382
7383 #ifdef HAVE_LINUX_THREADS
7384         pthread_kill_other_threads_np();
7385 #endif
7386
7387         exit( status );
7388
7389 ; return 0; }
7390 EOF
7391 if { (eval echo configure:7392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7392   rm -rf conftest*
7393   ol_cv_pthread_kthread=yes
7394 else
7395   echo "configure: failed program was:" >&5
7396   cat conftest.$ac_ext >&5
7397   rm -rf conftest*
7398   ol_cv_pthread_kthread=no
7399 fi
7400 rm -f conftest*
7401 else
7402   cat > conftest.$ac_ext <<EOF
7403 #line 7404 "configure"
7404 #include "confdefs.h"
7405 /* pthread test headers */
7406 #include <pthread.h>
7407 #ifndef NULL
7408 #define NULL (void*)0
7409 #endif
7410
7411 static void *task(p)
7412         void *p;
7413 {
7414         return (void *) (p == NULL);
7415 }
7416
7417
7418 int main(argc, argv)
7419         int argc;
7420         char **argv;
7421 {
7422
7423         /* pthread test function */
7424         pthread_t t;
7425         int status;
7426 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7427         /* This system (e.g. AIX) defaults detached; must override */
7428         pthread_attr_t attr;
7429
7430         status = pthread_attr_init(&attr);
7431         if( status ) exit( status );
7432
7433         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7434         if( status ) exit( status );
7435
7436 #define ATTR    &attr
7437 #else
7438 #if HAVE_PTHREADS_D4
7439 #define ATTR    pthread_attr_default
7440 #else
7441 #define ATTR    NULL
7442 #endif
7443 #endif
7444         /* make sure pthread_create() isn't just a stub */
7445         status = pthread_create(&t, ATTR, task, NULL);
7446         if( status ) exit( status );
7447
7448         /* make sure pthread_detach() isn't just a stub */
7449 #if HAVE_PTHREADS_D4
7450         status = pthread_detach( &t );
7451 #else
7452         status = pthread_detach( t );
7453 #endif
7454
7455 #ifdef HAVE_LINUX_THREADS
7456         pthread_kill_other_threads_np();
7457 #endif
7458
7459         exit( status );
7460
7461 }
7462
7463 EOF
7464 if { (eval echo configure:7465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7465 then
7466   ol_cv_pthread_kthread=yes
7467 else
7468   echo "configure: failed program was:" >&5
7469   cat conftest.$ac_ext >&5
7470   rm -fr conftest*
7471   ol_cv_pthread_kthread=no
7472 fi
7473 rm -fr conftest*
7474 fi
7475
7476
7477                 # restore the LIBS
7478                 LIBS="$ol_LIBS"
7479         
7480 fi
7481
7482 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7483
7484         if test $ol_cv_pthread_kthread = yes ; then
7485                 ol_link_pthreads="-kthread"
7486                 ol_link_threads=posix
7487         fi
7488 fi
7489
7490                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7491 if test "$ol_link_threads" = no ; then
7492         # try -pthread
7493         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7494 echo "configure:7495: checking for pthread link with -pthread" >&5
7495 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7496   echo $ac_n "(cached) $ac_c" 1>&6
7497 else
7498   
7499                 # save the flags
7500                 ol_LIBS="$LIBS"
7501                 LIBS="-pthread $LIBS"
7502
7503                 if test "$cross_compiling" = yes; then
7504   cat > conftest.$ac_ext <<EOF
7505 #line 7506 "configure"
7506 #include "confdefs.h"
7507 /* pthread test headers */
7508 #include <pthread.h>
7509 #ifndef NULL
7510 #define NULL (void*)0
7511 #endif
7512
7513 static void *task(p)
7514         void *p;
7515 {
7516         return (void *) (p == NULL);
7517 }
7518
7519 int main() {
7520
7521         /* pthread test function */
7522         pthread_t t;
7523         int status;
7524 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7525         /* This system (e.g. AIX) defaults detached; must override */
7526         pthread_attr_t attr;
7527
7528         status = pthread_attr_init(&attr);
7529         if( status ) exit( status );
7530
7531         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7532         if( status ) exit( status );
7533
7534 #define ATTR    &attr
7535 #else
7536 #if HAVE_PTHREADS_D4
7537 #define ATTR    pthread_attr_default
7538 #else
7539 #define ATTR    NULL
7540 #endif
7541 #endif
7542         /* make sure pthread_create() isn't just a stub */
7543         status = pthread_create(&t, ATTR, task, NULL);
7544         if( status ) exit( status );
7545
7546         /* make sure pthread_detach() isn't just a stub */
7547 #if HAVE_PTHREADS_D4
7548         status = pthread_detach( &t );
7549 #else
7550         status = pthread_detach( t );
7551 #endif
7552
7553 #ifdef HAVE_LINUX_THREADS
7554         pthread_kill_other_threads_np();
7555 #endif
7556
7557         exit( status );
7558
7559 ; return 0; }
7560 EOF
7561 if { (eval echo configure:7562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7562   rm -rf conftest*
7563   ol_cv_pthread_pthread=yes
7564 else
7565   echo "configure: failed program was:" >&5
7566   cat conftest.$ac_ext >&5
7567   rm -rf conftest*
7568   ol_cv_pthread_pthread=no
7569 fi
7570 rm -f conftest*
7571 else
7572   cat > conftest.$ac_ext <<EOF
7573 #line 7574 "configure"
7574 #include "confdefs.h"
7575 /* pthread test headers */
7576 #include <pthread.h>
7577 #ifndef NULL
7578 #define NULL (void*)0
7579 #endif
7580
7581 static void *task(p)
7582         void *p;
7583 {
7584         return (void *) (p == NULL);
7585 }
7586
7587
7588 int main(argc, argv)
7589         int argc;
7590         char **argv;
7591 {
7592
7593         /* pthread test function */
7594         pthread_t t;
7595         int status;
7596 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7597         /* This system (e.g. AIX) defaults detached; must override */
7598         pthread_attr_t attr;
7599
7600         status = pthread_attr_init(&attr);
7601         if( status ) exit( status );
7602
7603         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7604         if( status ) exit( status );
7605
7606 #define ATTR    &attr
7607 #else
7608 #if HAVE_PTHREADS_D4
7609 #define ATTR    pthread_attr_default
7610 #else
7611 #define ATTR    NULL
7612 #endif
7613 #endif
7614         /* make sure pthread_create() isn't just a stub */
7615         status = pthread_create(&t, ATTR, task, NULL);
7616         if( status ) exit( status );
7617
7618         /* make sure pthread_detach() isn't just a stub */
7619 #if HAVE_PTHREADS_D4
7620         status = pthread_detach( &t );
7621 #else
7622         status = pthread_detach( t );
7623 #endif
7624
7625 #ifdef HAVE_LINUX_THREADS
7626         pthread_kill_other_threads_np();
7627 #endif
7628
7629         exit( status );
7630
7631 }
7632
7633 EOF
7634 if { (eval echo configure:7635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7635 then
7636   ol_cv_pthread_pthread=yes
7637 else
7638   echo "configure: failed program was:" >&5
7639   cat conftest.$ac_ext >&5
7640   rm -fr conftest*
7641   ol_cv_pthread_pthread=no
7642 fi
7643 rm -fr conftest*
7644 fi
7645
7646
7647                 # restore the LIBS
7648                 LIBS="$ol_LIBS"
7649         
7650 fi
7651
7652 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7653
7654         if test $ol_cv_pthread_pthread = yes ; then
7655                 ol_link_pthreads="-pthread"
7656                 ol_link_threads=posix
7657         fi
7658 fi
7659
7660                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7661 if test "$ol_link_threads" = no ; then
7662         # try -pthreads
7663         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7664 echo "configure:7665: checking for pthread link with -pthreads" >&5
7665 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7666   echo $ac_n "(cached) $ac_c" 1>&6
7667 else
7668   
7669                 # save the flags
7670                 ol_LIBS="$LIBS"
7671                 LIBS="-pthreads $LIBS"
7672
7673                 if test "$cross_compiling" = yes; then
7674   cat > conftest.$ac_ext <<EOF
7675 #line 7676 "configure"
7676 #include "confdefs.h"
7677 /* pthread test headers */
7678 #include <pthread.h>
7679 #ifndef NULL
7680 #define NULL (void*)0
7681 #endif
7682
7683 static void *task(p)
7684         void *p;
7685 {
7686         return (void *) (p == NULL);
7687 }
7688
7689 int main() {
7690
7691         /* pthread test function */
7692         pthread_t t;
7693         int status;
7694 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7695         /* This system (e.g. AIX) defaults detached; must override */
7696         pthread_attr_t attr;
7697
7698         status = pthread_attr_init(&attr);
7699         if( status ) exit( status );
7700
7701         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7702         if( status ) exit( status );
7703
7704 #define ATTR    &attr
7705 #else
7706 #if HAVE_PTHREADS_D4
7707 #define ATTR    pthread_attr_default
7708 #else
7709 #define ATTR    NULL
7710 #endif
7711 #endif
7712         /* make sure pthread_create() isn't just a stub */
7713         status = pthread_create(&t, ATTR, task, NULL);
7714         if( status ) exit( status );
7715
7716         /* make sure pthread_detach() isn't just a stub */
7717 #if HAVE_PTHREADS_D4
7718         status = pthread_detach( &t );
7719 #else
7720         status = pthread_detach( t );
7721 #endif
7722
7723 #ifdef HAVE_LINUX_THREADS
7724         pthread_kill_other_threads_np();
7725 #endif
7726
7727         exit( status );
7728
7729 ; return 0; }
7730 EOF
7731 if { (eval echo configure:7732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7732   rm -rf conftest*
7733   ol_cv_pthread_pthreads=yes
7734 else
7735   echo "configure: failed program was:" >&5
7736   cat conftest.$ac_ext >&5
7737   rm -rf conftest*
7738   ol_cv_pthread_pthreads=no
7739 fi
7740 rm -f conftest*
7741 else
7742   cat > conftest.$ac_ext <<EOF
7743 #line 7744 "configure"
7744 #include "confdefs.h"
7745 /* pthread test headers */
7746 #include <pthread.h>
7747 #ifndef NULL
7748 #define NULL (void*)0
7749 #endif
7750
7751 static void *task(p)
7752         void *p;
7753 {
7754         return (void *) (p == NULL);
7755 }
7756
7757
7758 int main(argc, argv)
7759         int argc;
7760         char **argv;
7761 {
7762
7763         /* pthread test function */
7764         pthread_t t;
7765         int status;
7766 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7767         /* This system (e.g. AIX) defaults detached; must override */
7768         pthread_attr_t attr;
7769
7770         status = pthread_attr_init(&attr);
7771         if( status ) exit( status );
7772
7773         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7774         if( status ) exit( status );
7775
7776 #define ATTR    &attr
7777 #else
7778 #if HAVE_PTHREADS_D4
7779 #define ATTR    pthread_attr_default
7780 #else
7781 #define ATTR    NULL
7782 #endif
7783 #endif
7784         /* make sure pthread_create() isn't just a stub */
7785         status = pthread_create(&t, ATTR, task, NULL);
7786         if( status ) exit( status );
7787
7788         /* make sure pthread_detach() isn't just a stub */
7789 #if HAVE_PTHREADS_D4
7790         status = pthread_detach( &t );
7791 #else
7792         status = pthread_detach( t );
7793 #endif
7794
7795 #ifdef HAVE_LINUX_THREADS
7796         pthread_kill_other_threads_np();
7797 #endif
7798
7799         exit( status );
7800
7801 }
7802
7803 EOF
7804 if { (eval echo configure:7805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7805 then
7806   ol_cv_pthread_pthreads=yes
7807 else
7808   echo "configure: failed program was:" >&5
7809   cat conftest.$ac_ext >&5
7810   rm -fr conftest*
7811   ol_cv_pthread_pthreads=no
7812 fi
7813 rm -fr conftest*
7814 fi
7815
7816
7817                 # restore the LIBS
7818                 LIBS="$ol_LIBS"
7819         
7820 fi
7821
7822 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7823
7824         if test $ol_cv_pthread_pthreads = yes ; then
7825                 ol_link_pthreads="-pthreads"
7826                 ol_link_threads=posix
7827         fi
7828 fi
7829
7830                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7831 if test "$ol_link_threads" = no ; then
7832         # try -mthreads
7833         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7834 echo "configure:7835: checking for pthread link with -mthreads" >&5
7835 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7836   echo $ac_n "(cached) $ac_c" 1>&6
7837 else
7838   
7839                 # save the flags
7840                 ol_LIBS="$LIBS"
7841                 LIBS="-mthreads $LIBS"
7842
7843                 if test "$cross_compiling" = yes; then
7844   cat > conftest.$ac_ext <<EOF
7845 #line 7846 "configure"
7846 #include "confdefs.h"
7847 /* pthread test headers */
7848 #include <pthread.h>
7849 #ifndef NULL
7850 #define NULL (void*)0
7851 #endif
7852
7853 static void *task(p)
7854         void *p;
7855 {
7856         return (void *) (p == NULL);
7857 }
7858
7859 int main() {
7860
7861         /* pthread test function */
7862         pthread_t t;
7863         int status;
7864 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7865         /* This system (e.g. AIX) defaults detached; must override */
7866         pthread_attr_t attr;
7867
7868         status = pthread_attr_init(&attr);
7869         if( status ) exit( status );
7870
7871         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7872         if( status ) exit( status );
7873
7874 #define ATTR    &attr
7875 #else
7876 #if HAVE_PTHREADS_D4
7877 #define ATTR    pthread_attr_default
7878 #else
7879 #define ATTR    NULL
7880 #endif
7881 #endif
7882         /* make sure pthread_create() isn't just a stub */
7883         status = pthread_create(&t, ATTR, task, NULL);
7884         if( status ) exit( status );
7885
7886         /* make sure pthread_detach() isn't just a stub */
7887 #if HAVE_PTHREADS_D4
7888         status = pthread_detach( &t );
7889 #else
7890         status = pthread_detach( t );
7891 #endif
7892
7893 #ifdef HAVE_LINUX_THREADS
7894         pthread_kill_other_threads_np();
7895 #endif
7896
7897         exit( status );
7898
7899 ; return 0; }
7900 EOF
7901 if { (eval echo configure:7902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7902   rm -rf conftest*
7903   ol_cv_pthread_mthreads=yes
7904 else
7905   echo "configure: failed program was:" >&5
7906   cat conftest.$ac_ext >&5
7907   rm -rf conftest*
7908   ol_cv_pthread_mthreads=no
7909 fi
7910 rm -f conftest*
7911 else
7912   cat > conftest.$ac_ext <<EOF
7913 #line 7914 "configure"
7914 #include "confdefs.h"
7915 /* pthread test headers */
7916 #include <pthread.h>
7917 #ifndef NULL
7918 #define NULL (void*)0
7919 #endif
7920
7921 static void *task(p)
7922         void *p;
7923 {
7924         return (void *) (p == NULL);
7925 }
7926
7927
7928 int main(argc, argv)
7929         int argc;
7930         char **argv;
7931 {
7932
7933         /* pthread test function */
7934         pthread_t t;
7935         int status;
7936 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7937         /* This system (e.g. AIX) defaults detached; must override */
7938         pthread_attr_t attr;
7939
7940         status = pthread_attr_init(&attr);
7941         if( status ) exit( status );
7942
7943         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7944         if( status ) exit( status );
7945
7946 #define ATTR    &attr
7947 #else
7948 #if HAVE_PTHREADS_D4
7949 #define ATTR    pthread_attr_default
7950 #else
7951 #define ATTR    NULL
7952 #endif
7953 #endif
7954         /* make sure pthread_create() isn't just a stub */
7955         status = pthread_create(&t, ATTR, task, NULL);
7956         if( status ) exit( status );
7957
7958         /* make sure pthread_detach() isn't just a stub */
7959 #if HAVE_PTHREADS_D4
7960         status = pthread_detach( &t );
7961 #else
7962         status = pthread_detach( t );
7963 #endif
7964
7965 #ifdef HAVE_LINUX_THREADS
7966         pthread_kill_other_threads_np();
7967 #endif
7968
7969         exit( status );
7970
7971 }
7972
7973 EOF
7974 if { (eval echo configure:7975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7975 then
7976   ol_cv_pthread_mthreads=yes
7977 else
7978   echo "configure: failed program was:" >&5
7979   cat conftest.$ac_ext >&5
7980   rm -fr conftest*
7981   ol_cv_pthread_mthreads=no
7982 fi
7983 rm -fr conftest*
7984 fi
7985
7986
7987                 # restore the LIBS
7988                 LIBS="$ol_LIBS"
7989         
7990 fi
7991
7992 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7993
7994         if test $ol_cv_pthread_mthreads = yes ; then
7995                 ol_link_pthreads="-mthreads"
7996                 ol_link_threads=posix
7997         fi
7998 fi
7999
8000                 # Pthread try link: -thread (ol_cv_pthread_thread)
8001 if test "$ol_link_threads" = no ; then
8002         # try -thread
8003         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8004 echo "configure:8005: checking for pthread link with -thread" >&5
8005 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8006   echo $ac_n "(cached) $ac_c" 1>&6
8007 else
8008   
8009                 # save the flags
8010                 ol_LIBS="$LIBS"
8011                 LIBS="-thread $LIBS"
8012
8013                 if test "$cross_compiling" = yes; then
8014   cat > conftest.$ac_ext <<EOF
8015 #line 8016 "configure"
8016 #include "confdefs.h"
8017 /* pthread test headers */
8018 #include <pthread.h>
8019 #ifndef NULL
8020 #define NULL (void*)0
8021 #endif
8022
8023 static void *task(p)
8024         void *p;
8025 {
8026         return (void *) (p == NULL);
8027 }
8028
8029 int main() {
8030
8031         /* pthread test function */
8032         pthread_t t;
8033         int status;
8034 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8035         /* This system (e.g. AIX) defaults detached; must override */
8036         pthread_attr_t attr;
8037
8038         status = pthread_attr_init(&attr);
8039         if( status ) exit( status );
8040
8041         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8042         if( status ) exit( status );
8043
8044 #define ATTR    &attr
8045 #else
8046 #if HAVE_PTHREADS_D4
8047 #define ATTR    pthread_attr_default
8048 #else
8049 #define ATTR    NULL
8050 #endif
8051 #endif
8052         /* make sure pthread_create() isn't just a stub */
8053         status = pthread_create(&t, ATTR, task, NULL);
8054         if( status ) exit( status );
8055
8056         /* make sure pthread_detach() isn't just a stub */
8057 #if HAVE_PTHREADS_D4
8058         status = pthread_detach( &t );
8059 #else
8060         status = pthread_detach( t );
8061 #endif
8062
8063 #ifdef HAVE_LINUX_THREADS
8064         pthread_kill_other_threads_np();
8065 #endif
8066
8067         exit( status );
8068
8069 ; return 0; }
8070 EOF
8071 if { (eval echo configure:8072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8072   rm -rf conftest*
8073   ol_cv_pthread_thread=yes
8074 else
8075   echo "configure: failed program was:" >&5
8076   cat conftest.$ac_ext >&5
8077   rm -rf conftest*
8078   ol_cv_pthread_thread=no
8079 fi
8080 rm -f conftest*
8081 else
8082   cat > conftest.$ac_ext <<EOF
8083 #line 8084 "configure"
8084 #include "confdefs.h"
8085 /* pthread test headers */
8086 #include <pthread.h>
8087 #ifndef NULL
8088 #define NULL (void*)0
8089 #endif
8090
8091 static void *task(p)
8092         void *p;
8093 {
8094         return (void *) (p == NULL);
8095 }
8096
8097
8098 int main(argc, argv)
8099         int argc;
8100         char **argv;
8101 {
8102
8103         /* pthread test function */
8104         pthread_t t;
8105         int status;
8106 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8107         /* This system (e.g. AIX) defaults detached; must override */
8108         pthread_attr_t attr;
8109
8110         status = pthread_attr_init(&attr);
8111         if( status ) exit( status );
8112
8113         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8114         if( status ) exit( status );
8115
8116 #define ATTR    &attr
8117 #else
8118 #if HAVE_PTHREADS_D4
8119 #define ATTR    pthread_attr_default
8120 #else
8121 #define ATTR    NULL
8122 #endif
8123 #endif
8124         /* make sure pthread_create() isn't just a stub */
8125         status = pthread_create(&t, ATTR, task, NULL);
8126         if( status ) exit( status );
8127
8128         /* make sure pthread_detach() isn't just a stub */
8129 #if HAVE_PTHREADS_D4
8130         status = pthread_detach( &t );
8131 #else
8132         status = pthread_detach( t );
8133 #endif
8134
8135 #ifdef HAVE_LINUX_THREADS
8136         pthread_kill_other_threads_np();
8137 #endif
8138
8139         exit( status );
8140
8141 }
8142
8143 EOF
8144 if { (eval echo configure:8145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8145 then
8146   ol_cv_pthread_thread=yes
8147 else
8148   echo "configure: failed program was:" >&5
8149   cat conftest.$ac_ext >&5
8150   rm -fr conftest*
8151   ol_cv_pthread_thread=no
8152 fi
8153 rm -fr conftest*
8154 fi
8155
8156
8157                 # restore the LIBS
8158                 LIBS="$ol_LIBS"
8159         
8160 fi
8161
8162 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8163
8164         if test $ol_cv_pthread_thread = yes ; then
8165                 ol_link_pthreads="-thread"
8166                 ol_link_threads=posix
8167         fi
8168 fi
8169
8170
8171                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8172 if test "$ol_link_threads" = no ; then
8173         # try -lpthread -lmach -lexc -lc_r
8174         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8175 echo "configure:8176: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8176 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8177   echo $ac_n "(cached) $ac_c" 1>&6
8178 else
8179   
8180                 # save the flags
8181                 ol_LIBS="$LIBS"
8182                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8183
8184                 if test "$cross_compiling" = yes; then
8185   cat > conftest.$ac_ext <<EOF
8186 #line 8187 "configure"
8187 #include "confdefs.h"
8188 /* pthread test headers */
8189 #include <pthread.h>
8190 #ifndef NULL
8191 #define NULL (void*)0
8192 #endif
8193
8194 static void *task(p)
8195         void *p;
8196 {
8197         return (void *) (p == NULL);
8198 }
8199
8200 int main() {
8201
8202         /* pthread test function */
8203         pthread_t t;
8204         int status;
8205 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8206         /* This system (e.g. AIX) defaults detached; must override */
8207         pthread_attr_t attr;
8208
8209         status = pthread_attr_init(&attr);
8210         if( status ) exit( status );
8211
8212         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8213         if( status ) exit( status );
8214
8215 #define ATTR    &attr
8216 #else
8217 #if HAVE_PTHREADS_D4
8218 #define ATTR    pthread_attr_default
8219 #else
8220 #define ATTR    NULL
8221 #endif
8222 #endif
8223         /* make sure pthread_create() isn't just a stub */
8224         status = pthread_create(&t, ATTR, task, NULL);
8225         if( status ) exit( status );
8226
8227         /* make sure pthread_detach() isn't just a stub */
8228 #if HAVE_PTHREADS_D4
8229         status = pthread_detach( &t );
8230 #else
8231         status = pthread_detach( t );
8232 #endif
8233
8234 #ifdef HAVE_LINUX_THREADS
8235         pthread_kill_other_threads_np();
8236 #endif
8237
8238         exit( status );
8239
8240 ; return 0; }
8241 EOF
8242 if { (eval echo configure:8243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8243   rm -rf conftest*
8244   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8245 else
8246   echo "configure: failed program was:" >&5
8247   cat conftest.$ac_ext >&5
8248   rm -rf conftest*
8249   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8250 fi
8251 rm -f conftest*
8252 else
8253   cat > conftest.$ac_ext <<EOF
8254 #line 8255 "configure"
8255 #include "confdefs.h"
8256 /* pthread test headers */
8257 #include <pthread.h>
8258 #ifndef NULL
8259 #define NULL (void*)0
8260 #endif
8261
8262 static void *task(p)
8263         void *p;
8264 {
8265         return (void *) (p == NULL);
8266 }
8267
8268
8269 int main(argc, argv)
8270         int argc;
8271         char **argv;
8272 {
8273
8274         /* pthread test function */
8275         pthread_t t;
8276         int status;
8277 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8278         /* This system (e.g. AIX) defaults detached; must override */
8279         pthread_attr_t attr;
8280
8281         status = pthread_attr_init(&attr);
8282         if( status ) exit( status );
8283
8284         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8285         if( status ) exit( status );
8286
8287 #define ATTR    &attr
8288 #else
8289 #if HAVE_PTHREADS_D4
8290 #define ATTR    pthread_attr_default
8291 #else
8292 #define ATTR    NULL
8293 #endif
8294 #endif
8295         /* make sure pthread_create() isn't just a stub */
8296         status = pthread_create(&t, ATTR, task, NULL);
8297         if( status ) exit( status );
8298
8299         /* make sure pthread_detach() isn't just a stub */
8300 #if HAVE_PTHREADS_D4
8301         status = pthread_detach( &t );
8302 #else
8303         status = pthread_detach( t );
8304 #endif
8305
8306 #ifdef HAVE_LINUX_THREADS
8307         pthread_kill_other_threads_np();
8308 #endif
8309
8310         exit( status );
8311
8312 }
8313
8314 EOF
8315 if { (eval echo configure:8316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8316 then
8317   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8318 else
8319   echo "configure: failed program was:" >&5
8320   cat conftest.$ac_ext >&5
8321   rm -fr conftest*
8322   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8323 fi
8324 rm -fr conftest*
8325 fi
8326
8327
8328                 # restore the LIBS
8329                 LIBS="$ol_LIBS"
8330         
8331 fi
8332
8333 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8334
8335         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8336                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8337                 ol_link_threads=posix
8338         fi
8339 fi
8340
8341                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8342 if test "$ol_link_threads" = no ; then
8343         # try -lpthread -lmach -lexc
8344         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8345 echo "configure:8346: checking for pthread link with -lpthread -lmach -lexc" >&5
8346 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8347   echo $ac_n "(cached) $ac_c" 1>&6
8348 else
8349   
8350                 # save the flags
8351                 ol_LIBS="$LIBS"
8352                 LIBS="-lpthread -lmach -lexc $LIBS"
8353
8354                 if test "$cross_compiling" = yes; then
8355   cat > conftest.$ac_ext <<EOF
8356 #line 8357 "configure"
8357 #include "confdefs.h"
8358 /* pthread test headers */
8359 #include <pthread.h>
8360 #ifndef NULL
8361 #define NULL (void*)0
8362 #endif
8363
8364 static void *task(p)
8365         void *p;
8366 {
8367         return (void *) (p == NULL);
8368 }
8369
8370 int main() {
8371
8372         /* pthread test function */
8373         pthread_t t;
8374         int status;
8375 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8376         /* This system (e.g. AIX) defaults detached; must override */
8377         pthread_attr_t attr;
8378
8379         status = pthread_attr_init(&attr);
8380         if( status ) exit( status );
8381
8382         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8383         if( status ) exit( status );
8384
8385 #define ATTR    &attr
8386 #else
8387 #if HAVE_PTHREADS_D4
8388 #define ATTR    pthread_attr_default
8389 #else
8390 #define ATTR    NULL
8391 #endif
8392 #endif
8393         /* make sure pthread_create() isn't just a stub */
8394         status = pthread_create(&t, ATTR, task, NULL);
8395         if( status ) exit( status );
8396
8397         /* make sure pthread_detach() isn't just a stub */
8398 #if HAVE_PTHREADS_D4
8399         status = pthread_detach( &t );
8400 #else
8401         status = pthread_detach( t );
8402 #endif
8403
8404 #ifdef HAVE_LINUX_THREADS
8405         pthread_kill_other_threads_np();
8406 #endif
8407
8408         exit( status );
8409
8410 ; return 0; }
8411 EOF
8412 if { (eval echo configure:8413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8413   rm -rf conftest*
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 -rf conftest*
8419   ol_cv_pthread_lpthread_lmach_lexc=no
8420 fi
8421 rm -f conftest*
8422 else
8423   cat > conftest.$ac_ext <<EOF
8424 #line 8425 "configure"
8425 #include "confdefs.h"
8426 /* pthread test headers */
8427 #include <pthread.h>
8428 #ifndef NULL
8429 #define NULL (void*)0
8430 #endif
8431
8432 static void *task(p)
8433         void *p;
8434 {
8435         return (void *) (p == NULL);
8436 }
8437
8438
8439 int main(argc, argv)
8440         int argc;
8441         char **argv;
8442 {
8443
8444         /* pthread test function */
8445         pthread_t t;
8446         int status;
8447 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8448         /* This system (e.g. AIX) defaults detached; must override */
8449         pthread_attr_t attr;
8450
8451         status = pthread_attr_init(&attr);
8452         if( status ) exit( status );
8453
8454         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8455         if( status ) exit( status );
8456
8457 #define ATTR    &attr
8458 #else
8459 #if HAVE_PTHREADS_D4
8460 #define ATTR    pthread_attr_default
8461 #else
8462 #define ATTR    NULL
8463 #endif
8464 #endif
8465         /* make sure pthread_create() isn't just a stub */
8466         status = pthread_create(&t, ATTR, task, NULL);
8467         if( status ) exit( status );
8468
8469         /* make sure pthread_detach() isn't just a stub */
8470 #if HAVE_PTHREADS_D4
8471         status = pthread_detach( &t );
8472 #else
8473         status = pthread_detach( t );
8474 #endif
8475
8476 #ifdef HAVE_LINUX_THREADS
8477         pthread_kill_other_threads_np();
8478 #endif
8479
8480         exit( status );
8481
8482 }
8483
8484 EOF
8485 if { (eval echo configure:8486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8486 then
8487   ol_cv_pthread_lpthread_lmach_lexc=yes
8488 else
8489   echo "configure: failed program was:" >&5
8490   cat conftest.$ac_ext >&5
8491   rm -fr conftest*
8492   ol_cv_pthread_lpthread_lmach_lexc=no
8493 fi
8494 rm -fr conftest*
8495 fi
8496
8497
8498                 # restore the LIBS
8499                 LIBS="$ol_LIBS"
8500         
8501 fi
8502
8503 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8504
8505         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8506                 ol_link_pthreads="-lpthread -lmach -lexc"
8507                 ol_link_threads=posix
8508         fi
8509 fi
8510
8511
8512                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8513 if test "$ol_link_threads" = no ; then
8514         # try -lpthread -Wl,-woff,85
8515         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8516 echo "configure:8517: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8517 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8518   echo $ac_n "(cached) $ac_c" 1>&6
8519 else
8520   
8521                 # save the flags
8522                 ol_LIBS="$LIBS"
8523                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8524
8525                 if test "$cross_compiling" = yes; then
8526   cat > conftest.$ac_ext <<EOF
8527 #line 8528 "configure"
8528 #include "confdefs.h"
8529 /* pthread test headers */
8530 #include <pthread.h>
8531 #ifndef NULL
8532 #define NULL (void*)0
8533 #endif
8534
8535 static void *task(p)
8536         void *p;
8537 {
8538         return (void *) (p == NULL);
8539 }
8540
8541 int main() {
8542
8543         /* pthread test function */
8544         pthread_t t;
8545         int status;
8546 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8547         /* This system (e.g. AIX) defaults detached; must override */
8548         pthread_attr_t attr;
8549
8550         status = pthread_attr_init(&attr);
8551         if( status ) exit( status );
8552
8553         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8554         if( status ) exit( status );
8555
8556 #define ATTR    &attr
8557 #else
8558 #if HAVE_PTHREADS_D4
8559 #define ATTR    pthread_attr_default
8560 #else
8561 #define ATTR    NULL
8562 #endif
8563 #endif
8564         /* make sure pthread_create() isn't just a stub */
8565         status = pthread_create(&t, ATTR, task, NULL);
8566         if( status ) exit( status );
8567
8568         /* make sure pthread_detach() isn't just a stub */
8569 #if HAVE_PTHREADS_D4
8570         status = pthread_detach( &t );
8571 #else
8572         status = pthread_detach( t );
8573 #endif
8574
8575 #ifdef HAVE_LINUX_THREADS
8576         pthread_kill_other_threads_np();
8577 #endif
8578
8579         exit( status );
8580
8581 ; return 0; }
8582 EOF
8583 if { (eval echo configure:8584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8584   rm -rf conftest*
8585   ol_cv_pthread_lib_lpthread_woff=yes
8586 else
8587   echo "configure: failed program was:" >&5
8588   cat conftest.$ac_ext >&5
8589   rm -rf conftest*
8590   ol_cv_pthread_lib_lpthread_woff=no
8591 fi
8592 rm -f conftest*
8593 else
8594   cat > conftest.$ac_ext <<EOF
8595 #line 8596 "configure"
8596 #include "confdefs.h"
8597 /* pthread test headers */
8598 #include <pthread.h>
8599 #ifndef NULL
8600 #define NULL (void*)0
8601 #endif
8602
8603 static void *task(p)
8604         void *p;
8605 {
8606         return (void *) (p == NULL);
8607 }
8608
8609
8610 int main(argc, argv)
8611         int argc;
8612         char **argv;
8613 {
8614
8615         /* pthread test function */
8616         pthread_t t;
8617         int status;
8618 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8619         /* This system (e.g. AIX) defaults detached; must override */
8620         pthread_attr_t attr;
8621
8622         status = pthread_attr_init(&attr);
8623         if( status ) exit( status );
8624
8625         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8626         if( status ) exit( status );
8627
8628 #define ATTR    &attr
8629 #else
8630 #if HAVE_PTHREADS_D4
8631 #define ATTR    pthread_attr_default
8632 #else
8633 #define ATTR    NULL
8634 #endif
8635 #endif
8636         /* make sure pthread_create() isn't just a stub */
8637         status = pthread_create(&t, ATTR, task, NULL);
8638         if( status ) exit( status );
8639
8640         /* make sure pthread_detach() isn't just a stub */
8641 #if HAVE_PTHREADS_D4
8642         status = pthread_detach( &t );
8643 #else
8644         status = pthread_detach( t );
8645 #endif
8646
8647 #ifdef HAVE_LINUX_THREADS
8648         pthread_kill_other_threads_np();
8649 #endif
8650
8651         exit( status );
8652
8653 }
8654
8655 EOF
8656 if { (eval echo configure:8657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8657 then
8658   ol_cv_pthread_lib_lpthread_woff=yes
8659 else
8660   echo "configure: failed program was:" >&5
8661   cat conftest.$ac_ext >&5
8662   rm -fr conftest*
8663   ol_cv_pthread_lib_lpthread_woff=no
8664 fi
8665 rm -fr conftest*
8666 fi
8667
8668
8669                 # restore the LIBS
8670                 LIBS="$ol_LIBS"
8671         
8672 fi
8673
8674 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8675
8676         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8677                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8678                 ol_link_threads=posix
8679         fi
8680 fi
8681
8682
8683                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8684 if test "$ol_link_threads" = no ; then
8685         # try -lpthread
8686         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8687 echo "configure:8688: checking for pthread link with -lpthread" >&5
8688 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8689   echo $ac_n "(cached) $ac_c" 1>&6
8690 else
8691   
8692                 # save the flags
8693                 ol_LIBS="$LIBS"
8694                 LIBS="-lpthread $LIBS"
8695
8696                 if test "$cross_compiling" = yes; then
8697   cat > conftest.$ac_ext <<EOF
8698 #line 8699 "configure"
8699 #include "confdefs.h"
8700 /* pthread test headers */
8701 #include <pthread.h>
8702 #ifndef NULL
8703 #define NULL (void*)0
8704 #endif
8705
8706 static void *task(p)
8707         void *p;
8708 {
8709         return (void *) (p == NULL);
8710 }
8711
8712 int main() {
8713
8714         /* pthread test function */
8715         pthread_t t;
8716         int status;
8717 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8718         /* This system (e.g. AIX) defaults detached; must override */
8719         pthread_attr_t attr;
8720
8721         status = pthread_attr_init(&attr);
8722         if( status ) exit( status );
8723
8724         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8725         if( status ) exit( status );
8726
8727 #define ATTR    &attr
8728 #else
8729 #if HAVE_PTHREADS_D4
8730 #define ATTR    pthread_attr_default
8731 #else
8732 #define ATTR    NULL
8733 #endif
8734 #endif
8735         /* make sure pthread_create() isn't just a stub */
8736         status = pthread_create(&t, ATTR, task, NULL);
8737         if( status ) exit( status );
8738
8739         /* make sure pthread_detach() isn't just a stub */
8740 #if HAVE_PTHREADS_D4
8741         status = pthread_detach( &t );
8742 #else
8743         status = pthread_detach( t );
8744 #endif
8745
8746 #ifdef HAVE_LINUX_THREADS
8747         pthread_kill_other_threads_np();
8748 #endif
8749
8750         exit( status );
8751
8752 ; return 0; }
8753 EOF
8754 if { (eval echo configure:8755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8755   rm -rf conftest*
8756   ol_cv_pthread_lpthread=yes
8757 else
8758   echo "configure: failed program was:" >&5
8759   cat conftest.$ac_ext >&5
8760   rm -rf conftest*
8761   ol_cv_pthread_lpthread=no
8762 fi
8763 rm -f conftest*
8764 else
8765   cat > conftest.$ac_ext <<EOF
8766 #line 8767 "configure"
8767 #include "confdefs.h"
8768 /* pthread test headers */
8769 #include <pthread.h>
8770 #ifndef NULL
8771 #define NULL (void*)0
8772 #endif
8773
8774 static void *task(p)
8775         void *p;
8776 {
8777         return (void *) (p == NULL);
8778 }
8779
8780
8781 int main(argc, argv)
8782         int argc;
8783         char **argv;
8784 {
8785
8786         /* pthread test function */
8787         pthread_t t;
8788         int status;
8789 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8790         /* This system (e.g. AIX) defaults detached; must override */
8791         pthread_attr_t attr;
8792
8793         status = pthread_attr_init(&attr);
8794         if( status ) exit( status );
8795
8796         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8797         if( status ) exit( status );
8798
8799 #define ATTR    &attr
8800 #else
8801 #if HAVE_PTHREADS_D4
8802 #define ATTR    pthread_attr_default
8803 #else
8804 #define ATTR    NULL
8805 #endif
8806 #endif
8807         /* make sure pthread_create() isn't just a stub */
8808         status = pthread_create(&t, ATTR, task, NULL);
8809         if( status ) exit( status );
8810
8811         /* make sure pthread_detach() isn't just a stub */
8812 #if HAVE_PTHREADS_D4
8813         status = pthread_detach( &t );
8814 #else
8815         status = pthread_detach( t );
8816 #endif
8817
8818 #ifdef HAVE_LINUX_THREADS
8819         pthread_kill_other_threads_np();
8820 #endif
8821
8822         exit( status );
8823
8824 }
8825
8826 EOF
8827 if { (eval echo configure:8828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8828 then
8829   ol_cv_pthread_lpthread=yes
8830 else
8831   echo "configure: failed program was:" >&5
8832   cat conftest.$ac_ext >&5
8833   rm -fr conftest*
8834   ol_cv_pthread_lpthread=no
8835 fi
8836 rm -fr conftest*
8837 fi
8838
8839
8840                 # restore the LIBS
8841                 LIBS="$ol_LIBS"
8842         
8843 fi
8844
8845 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8846
8847         if test $ol_cv_pthread_lpthread = yes ; then
8848                 ol_link_pthreads="-lpthread"
8849                 ol_link_threads=posix
8850         fi
8851 fi
8852
8853                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8854 if test "$ol_link_threads" = no ; then
8855         # try -lc_r
8856         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8857 echo "configure:8858: checking for pthread link with -lc_r" >&5
8858 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8859   echo $ac_n "(cached) $ac_c" 1>&6
8860 else
8861   
8862                 # save the flags
8863                 ol_LIBS="$LIBS"
8864                 LIBS="-lc_r $LIBS"
8865
8866                 if test "$cross_compiling" = yes; then
8867   cat > conftest.$ac_ext <<EOF
8868 #line 8869 "configure"
8869 #include "confdefs.h"
8870 /* pthread test headers */
8871 #include <pthread.h>
8872 #ifndef NULL
8873 #define NULL (void*)0
8874 #endif
8875
8876 static void *task(p)
8877         void *p;
8878 {
8879         return (void *) (p == NULL);
8880 }
8881
8882 int main() {
8883
8884         /* pthread test function */
8885         pthread_t t;
8886         int status;
8887 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8888         /* This system (e.g. AIX) defaults detached; must override */
8889         pthread_attr_t attr;
8890
8891         status = pthread_attr_init(&attr);
8892         if( status ) exit( status );
8893
8894         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8895         if( status ) exit( status );
8896
8897 #define ATTR    &attr
8898 #else
8899 #if HAVE_PTHREADS_D4
8900 #define ATTR    pthread_attr_default
8901 #else
8902 #define ATTR    NULL
8903 #endif
8904 #endif
8905         /* make sure pthread_create() isn't just a stub */
8906         status = pthread_create(&t, ATTR, task, NULL);
8907         if( status ) exit( status );
8908
8909         /* make sure pthread_detach() isn't just a stub */
8910 #if HAVE_PTHREADS_D4
8911         status = pthread_detach( &t );
8912 #else
8913         status = pthread_detach( t );
8914 #endif
8915
8916 #ifdef HAVE_LINUX_THREADS
8917         pthread_kill_other_threads_np();
8918 #endif
8919
8920         exit( status );
8921
8922 ; return 0; }
8923 EOF
8924 if { (eval echo configure:8925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8925   rm -rf conftest*
8926   ol_cv_pthread_lc_r=yes
8927 else
8928   echo "configure: failed program was:" >&5
8929   cat conftest.$ac_ext >&5
8930   rm -rf conftest*
8931   ol_cv_pthread_lc_r=no
8932 fi
8933 rm -f conftest*
8934 else
8935   cat > conftest.$ac_ext <<EOF
8936 #line 8937 "configure"
8937 #include "confdefs.h"
8938 /* pthread test headers */
8939 #include <pthread.h>
8940 #ifndef NULL
8941 #define NULL (void*)0
8942 #endif
8943
8944 static void *task(p)
8945         void *p;
8946 {
8947         return (void *) (p == NULL);
8948 }
8949
8950
8951 int main(argc, argv)
8952         int argc;
8953         char **argv;
8954 {
8955
8956         /* pthread test function */
8957         pthread_t t;
8958         int status;
8959 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8960         /* This system (e.g. AIX) defaults detached; must override */
8961         pthread_attr_t attr;
8962
8963         status = pthread_attr_init(&attr);
8964         if( status ) exit( status );
8965
8966         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8967         if( status ) exit( status );
8968
8969 #define ATTR    &attr
8970 #else
8971 #if HAVE_PTHREADS_D4
8972 #define ATTR    pthread_attr_default
8973 #else
8974 #define ATTR    NULL
8975 #endif
8976 #endif
8977         /* make sure pthread_create() isn't just a stub */
8978         status = pthread_create(&t, ATTR, task, NULL);
8979         if( status ) exit( status );
8980
8981         /* make sure pthread_detach() isn't just a stub */
8982 #if HAVE_PTHREADS_D4
8983         status = pthread_detach( &t );
8984 #else
8985         status = pthread_detach( t );
8986 #endif
8987
8988 #ifdef HAVE_LINUX_THREADS
8989         pthread_kill_other_threads_np();
8990 #endif
8991
8992         exit( status );
8993
8994 }
8995
8996 EOF
8997 if { (eval echo configure:8998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8998 then
8999   ol_cv_pthread_lc_r=yes
9000 else
9001   echo "configure: failed program was:" >&5
9002   cat conftest.$ac_ext >&5
9003   rm -fr conftest*
9004   ol_cv_pthread_lc_r=no
9005 fi
9006 rm -fr conftest*
9007 fi
9008
9009
9010                 # restore the LIBS
9011                 LIBS="$ol_LIBS"
9012         
9013 fi
9014
9015 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9016
9017         if test $ol_cv_pthread_lc_r = yes ; then
9018                 ol_link_pthreads="-lc_r"
9019                 ol_link_threads=posix
9020         fi
9021 fi
9022
9023
9024                 # Pthread try link: -threads (ol_cv_pthread_threads)
9025 if test "$ol_link_threads" = no ; then
9026         # try -threads
9027         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9028 echo "configure:9029: checking for pthread link with -threads" >&5
9029 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9030   echo $ac_n "(cached) $ac_c" 1>&6
9031 else
9032   
9033                 # save the flags
9034                 ol_LIBS="$LIBS"
9035                 LIBS="-threads $LIBS"
9036
9037                 if test "$cross_compiling" = yes; then
9038   cat > conftest.$ac_ext <<EOF
9039 #line 9040 "configure"
9040 #include "confdefs.h"
9041 /* pthread test headers */
9042 #include <pthread.h>
9043 #ifndef NULL
9044 #define NULL (void*)0
9045 #endif
9046
9047 static void *task(p)
9048         void *p;
9049 {
9050         return (void *) (p == NULL);
9051 }
9052
9053 int main() {
9054
9055         /* pthread test function */
9056         pthread_t t;
9057         int status;
9058 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9059         /* This system (e.g. AIX) defaults detached; must override */
9060         pthread_attr_t attr;
9061
9062         status = pthread_attr_init(&attr);
9063         if( status ) exit( status );
9064
9065         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9066         if( status ) exit( status );
9067
9068 #define ATTR    &attr
9069 #else
9070 #if HAVE_PTHREADS_D4
9071 #define ATTR    pthread_attr_default
9072 #else
9073 #define ATTR    NULL
9074 #endif
9075 #endif
9076         /* make sure pthread_create() isn't just a stub */
9077         status = pthread_create(&t, ATTR, task, NULL);
9078         if( status ) exit( status );
9079
9080         /* make sure pthread_detach() isn't just a stub */
9081 #if HAVE_PTHREADS_D4
9082         status = pthread_detach( &t );
9083 #else
9084         status = pthread_detach( t );
9085 #endif
9086
9087 #ifdef HAVE_LINUX_THREADS
9088         pthread_kill_other_threads_np();
9089 #endif
9090
9091         exit( status );
9092
9093 ; return 0; }
9094 EOF
9095 if { (eval echo configure:9096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9096   rm -rf conftest*
9097   ol_cv_pthread_threads=yes
9098 else
9099   echo "configure: failed program was:" >&5
9100   cat conftest.$ac_ext >&5
9101   rm -rf conftest*
9102   ol_cv_pthread_threads=no
9103 fi
9104 rm -f conftest*
9105 else
9106   cat > conftest.$ac_ext <<EOF
9107 #line 9108 "configure"
9108 #include "confdefs.h"
9109 /* pthread test headers */
9110 #include <pthread.h>
9111 #ifndef NULL
9112 #define NULL (void*)0
9113 #endif
9114
9115 static void *task(p)
9116         void *p;
9117 {
9118         return (void *) (p == NULL);
9119 }
9120
9121
9122 int main(argc, argv)
9123         int argc;
9124         char **argv;
9125 {
9126
9127         /* pthread test function */
9128         pthread_t t;
9129         int status;
9130 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9131         /* This system (e.g. AIX) defaults detached; must override */
9132         pthread_attr_t attr;
9133
9134         status = pthread_attr_init(&attr);
9135         if( status ) exit( status );
9136
9137         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9138         if( status ) exit( status );
9139
9140 #define ATTR    &attr
9141 #else
9142 #if HAVE_PTHREADS_D4
9143 #define ATTR    pthread_attr_default
9144 #else
9145 #define ATTR    NULL
9146 #endif
9147 #endif
9148         /* make sure pthread_create() isn't just a stub */
9149         status = pthread_create(&t, ATTR, task, NULL);
9150         if( status ) exit( status );
9151
9152         /* make sure pthread_detach() isn't just a stub */
9153 #if HAVE_PTHREADS_D4
9154         status = pthread_detach( &t );
9155 #else
9156         status = pthread_detach( t );
9157 #endif
9158
9159 #ifdef HAVE_LINUX_THREADS
9160         pthread_kill_other_threads_np();
9161 #endif
9162
9163         exit( status );
9164
9165 }
9166
9167 EOF
9168 if { (eval echo configure:9169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9169 then
9170   ol_cv_pthread_threads=yes
9171 else
9172   echo "configure: failed program was:" >&5
9173   cat conftest.$ac_ext >&5
9174   rm -fr conftest*
9175   ol_cv_pthread_threads=no
9176 fi
9177 rm -fr conftest*
9178 fi
9179
9180
9181                 # restore the LIBS
9182                 LIBS="$ol_LIBS"
9183         
9184 fi
9185
9186 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9187
9188         if test $ol_cv_pthread_threads = yes ; then
9189                 ol_link_pthreads="-threads"
9190                 ol_link_threads=posix
9191         fi
9192 fi
9193
9194
9195                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9196 if test "$ol_link_threads" = no ; then
9197         # try -lpthreads -lmach -lexc -lc_r
9198         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9199 echo "configure:9200: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9200 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9201   echo $ac_n "(cached) $ac_c" 1>&6
9202 else
9203   
9204                 # save the flags
9205                 ol_LIBS="$LIBS"
9206                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9207
9208                 if test "$cross_compiling" = yes; then
9209   cat > conftest.$ac_ext <<EOF
9210 #line 9211 "configure"
9211 #include "confdefs.h"
9212 /* pthread test headers */
9213 #include <pthread.h>
9214 #ifndef NULL
9215 #define NULL (void*)0
9216 #endif
9217
9218 static void *task(p)
9219         void *p;
9220 {
9221         return (void *) (p == NULL);
9222 }
9223
9224 int main() {
9225
9226         /* pthread test function */
9227         pthread_t t;
9228         int status;
9229 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9230         /* This system (e.g. AIX) defaults detached; must override */
9231         pthread_attr_t attr;
9232
9233         status = pthread_attr_init(&attr);
9234         if( status ) exit( status );
9235
9236         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9237         if( status ) exit( status );
9238
9239 #define ATTR    &attr
9240 #else
9241 #if HAVE_PTHREADS_D4
9242 #define ATTR    pthread_attr_default
9243 #else
9244 #define ATTR    NULL
9245 #endif
9246 #endif
9247         /* make sure pthread_create() isn't just a stub */
9248         status = pthread_create(&t, ATTR, task, NULL);
9249         if( status ) exit( status );
9250
9251         /* make sure pthread_detach() isn't just a stub */
9252 #if HAVE_PTHREADS_D4
9253         status = pthread_detach( &t );
9254 #else
9255         status = pthread_detach( t );
9256 #endif
9257
9258 #ifdef HAVE_LINUX_THREADS
9259         pthread_kill_other_threads_np();
9260 #endif
9261
9262         exit( status );
9263
9264 ; return 0; }
9265 EOF
9266 if { (eval echo configure:9267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9267   rm -rf conftest*
9268   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9269 else
9270   echo "configure: failed program was:" >&5
9271   cat conftest.$ac_ext >&5
9272   rm -rf conftest*
9273   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9274 fi
9275 rm -f conftest*
9276 else
9277   cat > conftest.$ac_ext <<EOF
9278 #line 9279 "configure"
9279 #include "confdefs.h"
9280 /* pthread test headers */
9281 #include <pthread.h>
9282 #ifndef NULL
9283 #define NULL (void*)0
9284 #endif
9285
9286 static void *task(p)
9287         void *p;
9288 {
9289         return (void *) (p == NULL);
9290 }
9291
9292
9293 int main(argc, argv)
9294         int argc;
9295         char **argv;
9296 {
9297
9298         /* pthread test function */
9299         pthread_t t;
9300         int status;
9301 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9302         /* This system (e.g. AIX) defaults detached; must override */
9303         pthread_attr_t attr;
9304
9305         status = pthread_attr_init(&attr);
9306         if( status ) exit( status );
9307
9308         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9309         if( status ) exit( status );
9310
9311 #define ATTR    &attr
9312 #else
9313 #if HAVE_PTHREADS_D4
9314 #define ATTR    pthread_attr_default
9315 #else
9316 #define ATTR    NULL
9317 #endif
9318 #endif
9319         /* make sure pthread_create() isn't just a stub */
9320         status = pthread_create(&t, ATTR, task, NULL);
9321         if( status ) exit( status );
9322
9323         /* make sure pthread_detach() isn't just a stub */
9324 #if HAVE_PTHREADS_D4
9325         status = pthread_detach( &t );
9326 #else
9327         status = pthread_detach( t );
9328 #endif
9329
9330 #ifdef HAVE_LINUX_THREADS
9331         pthread_kill_other_threads_np();
9332 #endif
9333
9334         exit( status );
9335
9336 }
9337
9338 EOF
9339 if { (eval echo configure:9340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9340 then
9341   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9342 else
9343   echo "configure: failed program was:" >&5
9344   cat conftest.$ac_ext >&5
9345   rm -fr conftest*
9346   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9347 fi
9348 rm -fr conftest*
9349 fi
9350
9351
9352                 # restore the LIBS
9353                 LIBS="$ol_LIBS"
9354         
9355 fi
9356
9357 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9358
9359         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9360                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9361                 ol_link_threads=posix
9362         fi
9363 fi
9364
9365                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9366 if test "$ol_link_threads" = no ; then
9367         # try -lpthreads -lmach -lexc
9368         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9369 echo "configure:9370: checking for pthread link with -lpthreads -lmach -lexc" >&5
9370 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9371   echo $ac_n "(cached) $ac_c" 1>&6
9372 else
9373   
9374                 # save the flags
9375                 ol_LIBS="$LIBS"
9376                 LIBS="-lpthreads -lmach -lexc $LIBS"
9377
9378                 if test "$cross_compiling" = yes; then
9379   cat > conftest.$ac_ext <<EOF
9380 #line 9381 "configure"
9381 #include "confdefs.h"
9382 /* pthread test headers */
9383 #include <pthread.h>
9384 #ifndef NULL
9385 #define NULL (void*)0
9386 #endif
9387
9388 static void *task(p)
9389         void *p;
9390 {
9391         return (void *) (p == NULL);
9392 }
9393
9394 int main() {
9395
9396         /* pthread test function */
9397         pthread_t t;
9398         int status;
9399 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9400         /* This system (e.g. AIX) defaults detached; must override */
9401         pthread_attr_t attr;
9402
9403         status = pthread_attr_init(&attr);
9404         if( status ) exit( status );
9405
9406         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9407         if( status ) exit( status );
9408
9409 #define ATTR    &attr
9410 #else
9411 #if HAVE_PTHREADS_D4
9412 #define ATTR    pthread_attr_default
9413 #else
9414 #define ATTR    NULL
9415 #endif
9416 #endif
9417         /* make sure pthread_create() isn't just a stub */
9418         status = pthread_create(&t, ATTR, task, NULL);
9419         if( status ) exit( status );
9420
9421         /* make sure pthread_detach() isn't just a stub */
9422 #if HAVE_PTHREADS_D4
9423         status = pthread_detach( &t );
9424 #else
9425         status = pthread_detach( t );
9426 #endif
9427
9428 #ifdef HAVE_LINUX_THREADS
9429         pthread_kill_other_threads_np();
9430 #endif
9431
9432         exit( status );
9433
9434 ; return 0; }
9435 EOF
9436 if { (eval echo configure:9437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9437   rm -rf conftest*
9438   ol_cv_pthread_lpthreads_lmach_lexc=yes
9439 else
9440   echo "configure: failed program was:" >&5
9441   cat conftest.$ac_ext >&5
9442   rm -rf conftest*
9443   ol_cv_pthread_lpthreads_lmach_lexc=no
9444 fi
9445 rm -f conftest*
9446 else
9447   cat > conftest.$ac_ext <<EOF
9448 #line 9449 "configure"
9449 #include "confdefs.h"
9450 /* pthread test headers */
9451 #include <pthread.h>
9452 #ifndef NULL
9453 #define NULL (void*)0
9454 #endif
9455
9456 static void *task(p)
9457         void *p;
9458 {
9459         return (void *) (p == NULL);
9460 }
9461
9462
9463 int main(argc, argv)
9464         int argc;
9465         char **argv;
9466 {
9467
9468         /* pthread test function */
9469         pthread_t t;
9470         int status;
9471 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9472         /* This system (e.g. AIX) defaults detached; must override */
9473         pthread_attr_t attr;
9474
9475         status = pthread_attr_init(&attr);
9476         if( status ) exit( status );
9477
9478         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9479         if( status ) exit( status );
9480
9481 #define ATTR    &attr
9482 #else
9483 #if HAVE_PTHREADS_D4
9484 #define ATTR    pthread_attr_default
9485 #else
9486 #define ATTR    NULL
9487 #endif
9488 #endif
9489         /* make sure pthread_create() isn't just a stub */
9490         status = pthread_create(&t, ATTR, task, NULL);
9491         if( status ) exit( status );
9492
9493         /* make sure pthread_detach() isn't just a stub */
9494 #if HAVE_PTHREADS_D4
9495         status = pthread_detach( &t );
9496 #else
9497         status = pthread_detach( t );
9498 #endif
9499
9500 #ifdef HAVE_LINUX_THREADS
9501         pthread_kill_other_threads_np();
9502 #endif
9503
9504         exit( status );
9505
9506 }
9507
9508 EOF
9509 if { (eval echo configure:9510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9510 then
9511   ol_cv_pthread_lpthreads_lmach_lexc=yes
9512 else
9513   echo "configure: failed program was:" >&5
9514   cat conftest.$ac_ext >&5
9515   rm -fr conftest*
9516   ol_cv_pthread_lpthreads_lmach_lexc=no
9517 fi
9518 rm -fr conftest*
9519 fi
9520
9521
9522                 # restore the LIBS
9523                 LIBS="$ol_LIBS"
9524         
9525 fi
9526
9527 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9528
9529         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9530                 ol_link_pthreads="-lpthreads -lmach -lexc"
9531                 ol_link_threads=posix
9532         fi
9533 fi
9534
9535                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9536 if test "$ol_link_threads" = no ; then
9537         # try -lpthreads -lexc
9538         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9539 echo "configure:9540: checking for pthread link with -lpthreads -lexc" >&5
9540 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9541   echo $ac_n "(cached) $ac_c" 1>&6
9542 else
9543   
9544                 # save the flags
9545                 ol_LIBS="$LIBS"
9546                 LIBS="-lpthreads -lexc $LIBS"
9547
9548                 if test "$cross_compiling" = yes; then
9549   cat > conftest.$ac_ext <<EOF
9550 #line 9551 "configure"
9551 #include "confdefs.h"
9552 /* pthread test headers */
9553 #include <pthread.h>
9554 #ifndef NULL
9555 #define NULL (void*)0
9556 #endif
9557
9558 static void *task(p)
9559         void *p;
9560 {
9561         return (void *) (p == NULL);
9562 }
9563
9564 int main() {
9565
9566         /* pthread test function */
9567         pthread_t t;
9568         int status;
9569 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9570         /* This system (e.g. AIX) defaults detached; must override */
9571         pthread_attr_t attr;
9572
9573         status = pthread_attr_init(&attr);
9574         if( status ) exit( status );
9575
9576         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9577         if( status ) exit( status );
9578
9579 #define ATTR    &attr
9580 #else
9581 #if HAVE_PTHREADS_D4
9582 #define ATTR    pthread_attr_default
9583 #else
9584 #define ATTR    NULL
9585 #endif
9586 #endif
9587         /* make sure pthread_create() isn't just a stub */
9588         status = pthread_create(&t, ATTR, task, NULL);
9589         if( status ) exit( status );
9590
9591         /* make sure pthread_detach() isn't just a stub */
9592 #if HAVE_PTHREADS_D4
9593         status = pthread_detach( &t );
9594 #else
9595         status = pthread_detach( t );
9596 #endif
9597
9598 #ifdef HAVE_LINUX_THREADS
9599         pthread_kill_other_threads_np();
9600 #endif
9601
9602         exit( status );
9603
9604 ; return 0; }
9605 EOF
9606 if { (eval echo configure:9607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9607   rm -rf conftest*
9608   ol_cv_pthread_lpthreads_lexc=yes
9609 else
9610   echo "configure: failed program was:" >&5
9611   cat conftest.$ac_ext >&5
9612   rm -rf conftest*
9613   ol_cv_pthread_lpthreads_lexc=no
9614 fi
9615 rm -f conftest*
9616 else
9617   cat > conftest.$ac_ext <<EOF
9618 #line 9619 "configure"
9619 #include "confdefs.h"
9620 /* pthread test headers */
9621 #include <pthread.h>
9622 #ifndef NULL
9623 #define NULL (void*)0
9624 #endif
9625
9626 static void *task(p)
9627         void *p;
9628 {
9629         return (void *) (p == NULL);
9630 }
9631
9632
9633 int main(argc, argv)
9634         int argc;
9635         char **argv;
9636 {
9637
9638         /* pthread test function */
9639         pthread_t t;
9640         int status;
9641 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9642         /* This system (e.g. AIX) defaults detached; must override */
9643         pthread_attr_t attr;
9644
9645         status = pthread_attr_init(&attr);
9646         if( status ) exit( status );
9647
9648         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9649         if( status ) exit( status );
9650
9651 #define ATTR    &attr
9652 #else
9653 #if HAVE_PTHREADS_D4
9654 #define ATTR    pthread_attr_default
9655 #else
9656 #define ATTR    NULL
9657 #endif
9658 #endif
9659         /* make sure pthread_create() isn't just a stub */
9660         status = pthread_create(&t, ATTR, task, NULL);
9661         if( status ) exit( status );
9662
9663         /* make sure pthread_detach() isn't just a stub */
9664 #if HAVE_PTHREADS_D4
9665         status = pthread_detach( &t );
9666 #else
9667         status = pthread_detach( t );
9668 #endif
9669
9670 #ifdef HAVE_LINUX_THREADS
9671         pthread_kill_other_threads_np();
9672 #endif
9673
9674         exit( status );
9675
9676 }
9677
9678 EOF
9679 if { (eval echo configure:9680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9680 then
9681   ol_cv_pthread_lpthreads_lexc=yes
9682 else
9683   echo "configure: failed program was:" >&5
9684   cat conftest.$ac_ext >&5
9685   rm -fr conftest*
9686   ol_cv_pthread_lpthreads_lexc=no
9687 fi
9688 rm -fr conftest*
9689 fi
9690
9691
9692                 # restore the LIBS
9693                 LIBS="$ol_LIBS"
9694         
9695 fi
9696
9697 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9698
9699         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9700                 ol_link_pthreads="-lpthreads -lexc"
9701                 ol_link_threads=posix
9702         fi
9703 fi
9704
9705
9706                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9707 if test "$ol_link_threads" = no ; then
9708         # try -lpthreads
9709         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9710 echo "configure:9711: checking for pthread link with -lpthreads" >&5
9711 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9712   echo $ac_n "(cached) $ac_c" 1>&6
9713 else
9714   
9715                 # save the flags
9716                 ol_LIBS="$LIBS"
9717                 LIBS="-lpthreads $LIBS"
9718
9719                 if test "$cross_compiling" = yes; then
9720   cat > conftest.$ac_ext <<EOF
9721 #line 9722 "configure"
9722 #include "confdefs.h"
9723 /* pthread test headers */
9724 #include <pthread.h>
9725 #ifndef NULL
9726 #define NULL (void*)0
9727 #endif
9728
9729 static void *task(p)
9730         void *p;
9731 {
9732         return (void *) (p == NULL);
9733 }
9734
9735 int main() {
9736
9737         /* pthread test function */
9738         pthread_t t;
9739         int status;
9740 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9741         /* This system (e.g. AIX) defaults detached; must override */
9742         pthread_attr_t attr;
9743
9744         status = pthread_attr_init(&attr);
9745         if( status ) exit( status );
9746
9747         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9748         if( status ) exit( status );
9749
9750 #define ATTR    &attr
9751 #else
9752 #if HAVE_PTHREADS_D4
9753 #define ATTR    pthread_attr_default
9754 #else
9755 #define ATTR    NULL
9756 #endif
9757 #endif
9758         /* make sure pthread_create() isn't just a stub */
9759         status = pthread_create(&t, ATTR, task, NULL);
9760         if( status ) exit( status );
9761
9762         /* make sure pthread_detach() isn't just a stub */
9763 #if HAVE_PTHREADS_D4
9764         status = pthread_detach( &t );
9765 #else
9766         status = pthread_detach( t );
9767 #endif
9768
9769 #ifdef HAVE_LINUX_THREADS
9770         pthread_kill_other_threads_np();
9771 #endif
9772
9773         exit( status );
9774
9775 ; return 0; }
9776 EOF
9777 if { (eval echo configure:9778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9778   rm -rf conftest*
9779   ol_cv_pthread_lib_lpthreads=yes
9780 else
9781   echo "configure: failed program was:" >&5
9782   cat conftest.$ac_ext >&5
9783   rm -rf conftest*
9784   ol_cv_pthread_lib_lpthreads=no
9785 fi
9786 rm -f conftest*
9787 else
9788   cat > conftest.$ac_ext <<EOF
9789 #line 9790 "configure"
9790 #include "confdefs.h"
9791 /* pthread test headers */
9792 #include <pthread.h>
9793 #ifndef NULL
9794 #define NULL (void*)0
9795 #endif
9796
9797 static void *task(p)
9798         void *p;
9799 {
9800         return (void *) (p == NULL);
9801 }
9802
9803
9804 int main(argc, argv)
9805         int argc;
9806         char **argv;
9807 {
9808
9809         /* pthread test function */
9810         pthread_t t;
9811         int status;
9812 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9813         /* This system (e.g. AIX) defaults detached; must override */
9814         pthread_attr_t attr;
9815
9816         status = pthread_attr_init(&attr);
9817         if( status ) exit( status );
9818
9819         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9820         if( status ) exit( status );
9821
9822 #define ATTR    &attr
9823 #else
9824 #if HAVE_PTHREADS_D4
9825 #define ATTR    pthread_attr_default
9826 #else
9827 #define ATTR    NULL
9828 #endif
9829 #endif
9830         /* make sure pthread_create() isn't just a stub */
9831         status = pthread_create(&t, ATTR, task, NULL);
9832         if( status ) exit( status );
9833
9834         /* make sure pthread_detach() isn't just a stub */
9835 #if HAVE_PTHREADS_D4
9836         status = pthread_detach( &t );
9837 #else
9838         status = pthread_detach( t );
9839 #endif
9840
9841 #ifdef HAVE_LINUX_THREADS
9842         pthread_kill_other_threads_np();
9843 #endif
9844
9845         exit( status );
9846
9847 }
9848
9849 EOF
9850 if { (eval echo configure:9851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9851 then
9852   ol_cv_pthread_lib_lpthreads=yes
9853 else
9854   echo "configure: failed program was:" >&5
9855   cat conftest.$ac_ext >&5
9856   rm -fr conftest*
9857   ol_cv_pthread_lib_lpthreads=no
9858 fi
9859 rm -fr conftest*
9860 fi
9861
9862
9863                 # restore the LIBS
9864                 LIBS="$ol_LIBS"
9865         
9866 fi
9867
9868 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9869
9870         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9871                 ol_link_pthreads="-lpthreads"
9872                 ol_link_threads=posix
9873         fi
9874 fi
9875
9876
9877                 if test $ol_link_threads != no ; then
9878                         cat >> confdefs.h <<\EOF
9879 #define HAVE_PTHREADS 1
9880 EOF
9881
9882
9883                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9884
9885                                                 save_CPPFLAGS="$CPPFLAGS"
9886                         save_LIBS="$LIBS"
9887                         LIBS="$LTHREAD_LIBS $LIBS"
9888
9889                                                                                                 for ac_func in sched_yield pthread_yield
9890 do
9891 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9892 echo "configure:9893: checking for $ac_func" >&5
9893 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9894   echo $ac_n "(cached) $ac_c" 1>&6
9895 else
9896   cat > conftest.$ac_ext <<EOF
9897 #line 9898 "configure"
9898 #include "confdefs.h"
9899 /* System header to define __stub macros and hopefully few prototypes,
9900     which can conflict with char $ac_func(); below.  */
9901 #include <assert.h>
9902 /* Override any gcc2 internal prototype to avoid an error.  */
9903 /* We use char because int might match the return type of a gcc2
9904     builtin and then its argument prototype would still apply.  */
9905 char $ac_func();
9906 char (*f)();
9907
9908 int main() {
9909
9910 /* The GNU C library defines this for functions which it implements
9911     to always fail with ENOSYS.  Some functions are actually named
9912     something starting with __ and the normal name is an alias.  */
9913 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9914 choke me
9915 #else
9916 f = $ac_func;
9917 #endif
9918
9919 ; return 0; }
9920 EOF
9921 if { (eval echo configure:9922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9922   rm -rf conftest*
9923   eval "ac_cv_func_$ac_func=yes"
9924 else
9925   echo "configure: failed program was:" >&5
9926   cat conftest.$ac_ext >&5
9927   rm -rf conftest*
9928   eval "ac_cv_func_$ac_func=no"
9929 fi
9930 rm -f conftest*
9931 fi
9932
9933 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9934   echo "$ac_t""yes" 1>&6
9935     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9936   cat >> confdefs.h <<EOF
9937 #define $ac_tr_func 1
9938 EOF
9939  
9940 else
9941   echo "$ac_t""no" 1>&6
9942 fi
9943 done
9944
9945
9946                         if test $ac_cv_func_sched_yield = no -a \
9947                                 $ac_cv_func_pthread_yield = no ; then
9948                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9949 echo "configure:9950: checking for sched_yield in -lrt" >&5
9950 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9951 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9952   echo $ac_n "(cached) $ac_c" 1>&6
9953 else
9954   ac_save_LIBS="$LIBS"
9955 LIBS="-lrt  $LIBS"
9956 cat > conftest.$ac_ext <<EOF
9957 #line 9958 "configure"
9958 #include "confdefs.h"
9959 /* Override any gcc2 internal prototype to avoid an error.  */
9960 /* We use char because int might match the return type of a gcc2
9961     builtin and then its argument prototype would still apply.  */
9962 char sched_yield();
9963
9964 int main() {
9965 sched_yield()
9966 ; return 0; }
9967 EOF
9968 if { (eval echo configure:9969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9969   rm -rf conftest*
9970   eval "ac_cv_lib_$ac_lib_var=yes"
9971 else
9972   echo "configure: failed program was:" >&5
9973   cat conftest.$ac_ext >&5
9974   rm -rf conftest*
9975   eval "ac_cv_lib_$ac_lib_var=no"
9976 fi
9977 rm -f conftest*
9978 LIBS="$ac_save_LIBS"
9979
9980 fi
9981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9982   echo "$ac_t""yes" 1>&6
9983   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9984                                         cat >> confdefs.h <<\EOF
9985 #define HAVE_SCHED_YIELD 1
9986 EOF
9987
9988                                         ac_cv_func_sched_yield=yes
9989 else
9990   echo "$ac_t""no" 1>&6
9991 ac_cv_func_sched_yield=no
9992 fi
9993
9994                         fi
9995                         if test $ac_cv_func_sched_yield = no -a \
9996                                 $ac_cv_func_pthread_yield = no ; then
9997                                                                                                 for ac_func in thr_yield
9998 do
9999 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10000 echo "configure:10001: checking for $ac_func" >&5
10001 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10002   echo $ac_n "(cached) $ac_c" 1>&6
10003 else
10004   cat > conftest.$ac_ext <<EOF
10005 #line 10006 "configure"
10006 #include "confdefs.h"
10007 /* System header to define __stub macros and hopefully few prototypes,
10008     which can conflict with char $ac_func(); below.  */
10009 #include <assert.h>
10010 /* Override any gcc2 internal prototype to avoid an error.  */
10011 /* We use char because int might match the return type of a gcc2
10012     builtin and then its argument prototype would still apply.  */
10013 char $ac_func();
10014 char (*f)();
10015
10016 int main() {
10017
10018 /* The GNU C library defines this for functions which it implements
10019     to always fail with ENOSYS.  Some functions are actually named
10020     something starting with __ and the normal name is an alias.  */
10021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10022 choke me
10023 #else
10024 f = $ac_func;
10025 #endif
10026
10027 ; return 0; }
10028 EOF
10029 if { (eval echo configure:10030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10030   rm -rf conftest*
10031   eval "ac_cv_func_$ac_func=yes"
10032 else
10033   echo "configure: failed program was:" >&5
10034   cat conftest.$ac_ext >&5
10035   rm -rf conftest*
10036   eval "ac_cv_func_$ac_func=no"
10037 fi
10038 rm -f conftest*
10039 fi
10040
10041 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10042   echo "$ac_t""yes" 1>&6
10043     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10044   cat >> confdefs.h <<EOF
10045 #define $ac_tr_func 1
10046 EOF
10047  
10048 else
10049   echo "$ac_t""no" 1>&6
10050 fi
10051 done
10052
10053                         fi
10054                         if test $ac_cv_func_sched_yield = no -a \
10055                                 $ac_cv_func_pthread_yield = no -a \
10056                                 "$ac_cv_func_thr_yield" = no ; then
10057                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10058                         fi
10059
10060                                                 for ac_func in pthread_kill
10061 do
10062 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10063 echo "configure:10064: checking for $ac_func" >&5
10064 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10065   echo $ac_n "(cached) $ac_c" 1>&6
10066 else
10067   cat > conftest.$ac_ext <<EOF
10068 #line 10069 "configure"
10069 #include "confdefs.h"
10070 /* System header to define __stub macros and hopefully few prototypes,
10071     which can conflict with char $ac_func(); below.  */
10072 #include <assert.h>
10073 /* Override any gcc2 internal prototype to avoid an error.  */
10074 /* We use char because int might match the return type of a gcc2
10075     builtin and then its argument prototype would still apply.  */
10076 char $ac_func();
10077 char (*f)();
10078
10079 int main() {
10080
10081 /* The GNU C library defines this for functions which it implements
10082     to always fail with ENOSYS.  Some functions are actually named
10083     something starting with __ and the normal name is an alias.  */
10084 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10085 choke me
10086 #else
10087 f = $ac_func;
10088 #endif
10089
10090 ; return 0; }
10091 EOF
10092 if { (eval echo configure:10093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10093   rm -rf conftest*
10094   eval "ac_cv_func_$ac_func=yes"
10095 else
10096   echo "configure: failed program was:" >&5
10097   cat conftest.$ac_ext >&5
10098   rm -rf conftest*
10099   eval "ac_cv_func_$ac_func=no"
10100 fi
10101 rm -f conftest*
10102 fi
10103
10104 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10105   echo "$ac_t""yes" 1>&6
10106     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10107   cat >> confdefs.h <<EOF
10108 #define $ac_tr_func 1
10109 EOF
10110  
10111 else
10112   echo "$ac_t""no" 1>&6
10113 fi
10114 done
10115
10116
10117                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10118 echo "configure:10119: checking for pthread_detach with <pthread.h>" >&5
10119 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10120   echo $ac_n "(cached) $ac_c" 1>&6
10121 else
10122   
10123                                                                 cat > conftest.$ac_ext <<EOF
10124 #line 10125 "configure"
10125 #include "confdefs.h"
10126
10127 #include <pthread.h>
10128 #ifndef NULL
10129 #define NULL (void*)0
10130 #endif
10131
10132 int main() {
10133 pthread_detach(NULL);
10134 ; return 0; }
10135 EOF
10136 if { (eval echo configure:10137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10137   rm -rf conftest*
10138   ol_cv_func_pthread_detach=yes
10139 else
10140   echo "configure: failed program was:" >&5
10141   cat conftest.$ac_ext >&5
10142   rm -rf conftest*
10143   ol_cv_func_pthread_detach=no
10144 fi
10145 rm -f conftest*
10146                         
10147 fi
10148
10149 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10150
10151                         if test $ol_cv_func_pthread_detach = no ; then
10152                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10153                         fi
10154
10155                         cat >> confdefs.h <<\EOF
10156 #define HAVE_PTHREAD_DETACH 1
10157 EOF
10158
10159
10160                                                 for ac_func in \
10161                                 pthread_setconcurrency \
10162                                 pthread_getconcurrency \
10163                                 thr_setconcurrency \
10164                                 thr_getconcurrency \
10165                         
10166 do
10167 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10168 echo "configure:10169: checking for $ac_func" >&5
10169 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10170   echo $ac_n "(cached) $ac_c" 1>&6
10171 else
10172   cat > conftest.$ac_ext <<EOF
10173 #line 10174 "configure"
10174 #include "confdefs.h"
10175 /* System header to define __stub macros and hopefully few prototypes,
10176     which can conflict with char $ac_func(); below.  */
10177 #include <assert.h>
10178 /* Override any gcc2 internal prototype to avoid an error.  */
10179 /* We use char because int might match the return type of a gcc2
10180     builtin and then its argument prototype would still apply.  */
10181 char $ac_func();
10182 char (*f)();
10183
10184 int main() {
10185
10186 /* The GNU C library defines this for functions which it implements
10187     to always fail with ENOSYS.  Some functions are actually named
10188     something starting with __ and the normal name is an alias.  */
10189 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10190 choke me
10191 #else
10192 f = $ac_func;
10193 #endif
10194
10195 ; return 0; }
10196 EOF
10197 if { (eval echo configure:10198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10198   rm -rf conftest*
10199   eval "ac_cv_func_$ac_func=yes"
10200 else
10201   echo "configure: failed program was:" >&5
10202   cat conftest.$ac_ext >&5
10203   rm -rf conftest*
10204   eval "ac_cv_func_$ac_func=no"
10205 fi
10206 rm -f conftest*
10207 fi
10208
10209 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10210   echo "$ac_t""yes" 1>&6
10211     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10212   cat >> confdefs.h <<EOF
10213 #define $ac_tr_func 1
10214 EOF
10215  
10216 else
10217   echo "$ac_t""no" 1>&6
10218 fi
10219 done
10220
10221
10222                         
10223         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10224 echo "configure:10225: checking for pthread_kill_other_threads_np" >&5
10225 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10226   echo $ac_n "(cached) $ac_c" 1>&6
10227 else
10228   cat > conftest.$ac_ext <<EOF
10229 #line 10230 "configure"
10230 #include "confdefs.h"
10231 /* System header to define __stub macros and hopefully few prototypes,
10232     which can conflict with char pthread_kill_other_threads_np(); below.  */
10233 #include <assert.h>
10234 /* Override any gcc2 internal prototype to avoid an error.  */
10235 /* We use char because int might match the return type of a gcc2
10236     builtin and then its argument prototype would still apply.  */
10237 char pthread_kill_other_threads_np();
10238 char (*f)();
10239
10240 int main() {
10241
10242 /* The GNU C library defines this for functions which it implements
10243     to always fail with ENOSYS.  Some functions are actually named
10244     something starting with __ and the normal name is an alias.  */
10245 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10246 choke me
10247 #else
10248 f = pthread_kill_other_threads_np;
10249 #endif
10250
10251 ; return 0; }
10252 EOF
10253 if { (eval echo configure:10254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10254   rm -rf conftest*
10255   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10256 else
10257   echo "configure: failed program was:" >&5
10258   cat conftest.$ac_ext >&5
10259   rm -rf conftest*
10260   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10261 fi
10262 rm -f conftest*
10263 fi
10264
10265 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10266   echo "$ac_t""yes" 1>&6
10267   :
10268 else
10269   echo "$ac_t""no" 1>&6
10270 fi
10271
10272         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10273 echo "configure:10274: checking for LinuxThreads implementation" >&5
10274 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10275   echo $ac_n "(cached) $ac_c" 1>&6
10276 else
10277   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10278 fi
10279
10280 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10281
10282                         
10283         
10284         
10285         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10286 echo "configure:10287: checking for LinuxThreads consistency" >&5
10287 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10288   echo $ac_n "(cached) $ac_c" 1>&6
10289 else
10290   
10291                 if test $ol_cv_header_linux_threads = yes -a \
10292                         $ol_cv_sys_linux_threads = yes; then
10293                         ol_cv_linux_threads=yes
10294                 elif test $ol_cv_header_linux_threads = no -a \
10295                         $ol_cv_sys_linux_threads = no; then
10296                         ol_cv_linux_threads=no
10297                 else
10298                         ol_cv_linux_threads=error
10299                 fi
10300         
10301 fi
10302
10303 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10304
10305
10306                         if test $ol_cv_linux_threads = error; then
10307                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10308                         fi
10309
10310                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10311 echo "configure:10312: checking if pthread_create() works" >&5
10312 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10313   echo $ac_n "(cached) $ac_c" 1>&6
10314 else
10315   
10316                         if test "$cross_compiling" = yes; then
10317                                 ol_cv_pthread_create_works=yes
10318 else
10319   cat > conftest.$ac_ext <<EOF
10320 #line 10321 "configure"
10321 #include "confdefs.h"
10322 /* pthread test headers */
10323 #include <pthread.h>
10324 #ifndef NULL
10325 #define NULL (void*)0
10326 #endif
10327
10328 static void *task(p)
10329         void *p;
10330 {
10331         return (void *) (p == NULL);
10332 }
10333
10334
10335 int main(argc, argv)
10336         int argc;
10337         char **argv;
10338 {
10339
10340         /* pthread test function */
10341         pthread_t t;
10342         int status;
10343 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10344         /* This system (e.g. AIX) defaults detached; must override */
10345         pthread_attr_t attr;
10346
10347         status = pthread_attr_init(&attr);
10348         if( status ) exit( status );
10349
10350         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10351         if( status ) exit( status );
10352
10353 #define ATTR    &attr
10354 #else
10355 #if HAVE_PTHREADS_D4
10356 #define ATTR    pthread_attr_default
10357 #else
10358 #define ATTR    NULL
10359 #endif
10360 #endif
10361         /* make sure pthread_create() isn't just a stub */
10362         status = pthread_create(&t, ATTR, task, NULL);
10363         if( status ) exit( status );
10364
10365         /* make sure pthread_detach() isn't just a stub */
10366 #if HAVE_PTHREADS_D4
10367         status = pthread_detach( &t );
10368 #else
10369         status = pthread_detach( t );
10370 #endif
10371
10372 #ifdef HAVE_LINUX_THREADS
10373         pthread_kill_other_threads_np();
10374 #endif
10375
10376         exit( status );
10377
10378 }
10379
10380 EOF
10381 if { (eval echo configure:10382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10382 then
10383   ol_cv_pthread_create_works=yes
10384 else
10385   echo "configure: failed program was:" >&5
10386   cat conftest.$ac_ext >&5
10387   rm -fr conftest*
10388   ol_cv_pthread_create_works=no
10389 fi
10390 rm -fr conftest*
10391 fi
10392
10393 fi
10394
10395 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10396
10397                         if test $ol_cv_pthread_create_works = no ; then
10398                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10399                         fi
10400
10401                                                 if test $ol_with_yielding_select = auto ; then
10402                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10403 echo "configure:10404: checking if select yields when using pthreads" >&5
10404 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10405   echo $ac_n "(cached) $ac_c" 1>&6
10406 else
10407   
10408                                 if test "$cross_compiling" = yes; then
10409   ol_cv_pthread_select_yields=cross
10410 else
10411   cat > conftest.$ac_ext <<EOF
10412 #line 10413 "configure"
10413 #include "confdefs.h"
10414
10415 #include <sys/types.h>
10416 #include <sys/time.h>
10417 #include <unistd.h>
10418 #include <pthread.h>
10419 #ifndef NULL
10420 #define NULL (void*) 0
10421 #endif
10422
10423 static int fildes[2];
10424
10425 static void *task(p)
10426         void *p;
10427 {
10428         int i;
10429         struct timeval tv;
10430
10431         fd_set rfds;
10432
10433         tv.tv_sec=10;
10434         tv.tv_usec=0;
10435
10436         FD_ZERO(&rfds);
10437         FD_SET(fildes[0], &rfds);
10438
10439         /* we're not interested in any fds */
10440         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10441
10442         if(i < 0) {
10443                 perror("select");
10444                 exit(10);
10445         }
10446
10447         exit(0); /* if we exit here, the select blocked the whole process */
10448 }
10449
10450 int main(argc, argv)
10451         int argc;
10452         char **argv;
10453 {
10454         pthread_t t;
10455
10456         /* create a pipe to select */
10457         if(pipe(&fildes[0])) {
10458                 perror("select");
10459                 exit(1);
10460         }
10461
10462 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10463         (void) pthread_setconcurrency(2);
10464 #else
10465 #ifdef HAVE_THR_SETCONCURRENCY
10466         /* Set Solaris LWP concurrency to 2 */
10467         thr_setconcurrency(2);
10468 #endif
10469 #endif
10470
10471 #if HAVE_PTHREADS_D4
10472         pthread_create(&t, pthread_attr_default, task, NULL);
10473 #else
10474         pthread_create(&t, NULL, task, NULL);
10475 #endif
10476
10477 #if HAVE_SCHED_YIELD
10478         sched_yield();  /* make sure task runs first */
10479 #else
10480 #ifdef HAVE_PTHREAD_YIELD
10481         pthread_yield();        /* make sure task runs first */
10482 #endif
10483 #endif
10484
10485         exit(2);
10486 }
10487 EOF
10488 if { (eval echo configure:10489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10489 then
10490   ol_cv_pthread_select_yields=no
10491 else
10492   echo "configure: failed program was:" >&5
10493   cat conftest.$ac_ext >&5
10494   rm -fr conftest*
10495   ol_cv_pthread_select_yields=yes
10496 fi
10497 rm -fr conftest*
10498 fi
10499
10500 fi
10501
10502 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10503
10504                                 if test $ol_cv_pthread_select_yields = cross ; then
10505                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10506                                 fi
10507
10508                                 if test $ol_cv_pthread_select_yields = yes ; then
10509                                         ol_with_yielding_select=yes
10510                                 fi
10511                         fi
10512
10513                                                 CPPFLAGS="$save_CPPFLAGS"
10514                         LIBS="$save_LIBS"
10515                 else
10516                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10517                 fi
10518         fi
10519
10520         if test $ol_with_threads = posix ; then
10521                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10522         fi
10523 fi
10524
10525 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10526         -o $ol_with_threads = mach ; then
10527
10528                 for ac_hdr in mach/cthreads.h
10529 do
10530 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10531 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10532 echo "configure:10533: checking for $ac_hdr" >&5
10533 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10534   echo $ac_n "(cached) $ac_c" 1>&6
10535 else
10536   cat > conftest.$ac_ext <<EOF
10537 #line 10538 "configure"
10538 #include "confdefs.h"
10539 #include <$ac_hdr>
10540 EOF
10541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10542 { (eval echo configure:10543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10544 if test -z "$ac_err"; then
10545   rm -rf conftest*
10546   eval "ac_cv_header_$ac_safe=yes"
10547 else
10548   echo "$ac_err" >&5
10549   echo "configure: failed program was:" >&5
10550   cat conftest.$ac_ext >&5
10551   rm -rf conftest*
10552   eval "ac_cv_header_$ac_safe=no"
10553 fi
10554 rm -f conftest*
10555 fi
10556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10557   echo "$ac_t""yes" 1>&6
10558     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10559   cat >> confdefs.h <<EOF
10560 #define $ac_tr_hdr 1
10561 EOF
10562  
10563 else
10564   echo "$ac_t""no" 1>&6
10565 fi
10566 done
10567
10568         if test $ac_cv_header_mach_cthreads_h = yes ; then
10569                 ol_with_threads=found
10570
10571                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10572 echo "configure:10573: checking for cthread_fork" >&5
10573 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10574   echo $ac_n "(cached) $ac_c" 1>&6
10575 else
10576   cat > conftest.$ac_ext <<EOF
10577 #line 10578 "configure"
10578 #include "confdefs.h"
10579 /* System header to define __stub macros and hopefully few prototypes,
10580     which can conflict with char cthread_fork(); below.  */
10581 #include <assert.h>
10582 /* Override any gcc2 internal prototype to avoid an error.  */
10583 /* We use char because int might match the return type of a gcc2
10584     builtin and then its argument prototype would still apply.  */
10585 char cthread_fork();
10586 char (*f)();
10587
10588 int main() {
10589
10590 /* The GNU C library defines this for functions which it implements
10591     to always fail with ENOSYS.  Some functions are actually named
10592     something starting with __ and the normal name is an alias.  */
10593 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10594 choke me
10595 #else
10596 f = cthread_fork;
10597 #endif
10598
10599 ; return 0; }
10600 EOF
10601 if { (eval echo configure:10602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10602   rm -rf conftest*
10603   eval "ac_cv_func_cthread_fork=yes"
10604 else
10605   echo "configure: failed program was:" >&5
10606   cat conftest.$ac_ext >&5
10607   rm -rf conftest*
10608   eval "ac_cv_func_cthread_fork=no"
10609 fi
10610 rm -f conftest*
10611 fi
10612
10613 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10614   echo "$ac_t""yes" 1>&6
10615   ol_link_threads=yes
10616 else
10617   echo "$ac_t""no" 1>&6
10618 fi
10619
10620
10621                 if test $ol_link_threads = no ; then
10622                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10623 echo "configure:10624: checking for cthread_fork with -all_load" >&5
10624 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10625   echo $ac_n "(cached) $ac_c" 1>&6
10626 else
10627   
10628                                                                 save_LIBS="$LIBS"
10629                                 LIBS="-all_load $LIBS"
10630                                 cat > conftest.$ac_ext <<EOF
10631 #line 10632 "configure"
10632 #include "confdefs.h"
10633 #include <mach/cthreads.h>
10634 int main() {
10635
10636                                         cthread_fork((void *)0, (void *)0);
10637                                         
10638 ; return 0; }
10639 EOF
10640 if { (eval echo configure:10641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10641   rm -rf conftest*
10642   ol_cv_cthread_all_load=yes
10643 else
10644   echo "configure: failed program was:" >&5
10645   cat conftest.$ac_ext >&5
10646   rm -rf conftest*
10647   ol_cv_cthread_all_load=no
10648 fi
10649 rm -f conftest*
10650                                                                 LIBS="$save_LIBS"
10651                         
10652 fi
10653
10654 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10655
10656                         if test $ol_cv_cthread_all_load = yes ; then
10657                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10658                                 ol_link_threads=mach
10659                         fi
10660                 fi
10661
10662                 if test $ol_link_threads != no ; then
10663                         : check for cthread specific functionality here
10664                         cat >> confdefs.h <<\EOF
10665 #define HAVE_MACH_CTHREADS 1
10666 EOF
10667
10668                 else
10669                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10670                 fi
10671         fi
10672
10673         if test $ol_with_threads = mach ; then
10674                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10675         fi
10676 fi
10677
10678 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10679         -o $ol_with_threads = pth ; then
10680
10681         for ac_hdr in pth.h
10682 do
10683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10684 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10685 echo "configure:10686: checking for $ac_hdr" >&5
10686 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10687   echo $ac_n "(cached) $ac_c" 1>&6
10688 else
10689   cat > conftest.$ac_ext <<EOF
10690 #line 10691 "configure"
10691 #include "confdefs.h"
10692 #include <$ac_hdr>
10693 EOF
10694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10695 { (eval echo configure:10696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10697 if test -z "$ac_err"; then
10698   rm -rf conftest*
10699   eval "ac_cv_header_$ac_safe=yes"
10700 else
10701   echo "$ac_err" >&5
10702   echo "configure: failed program was:" >&5
10703   cat conftest.$ac_ext >&5
10704   rm -rf conftest*
10705   eval "ac_cv_header_$ac_safe=no"
10706 fi
10707 rm -f conftest*
10708 fi
10709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10710   echo "$ac_t""yes" 1>&6
10711     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10712   cat >> confdefs.h <<EOF
10713 #define $ac_tr_hdr 1
10714 EOF
10715  
10716 else
10717   echo "$ac_t""no" 1>&6
10718 fi
10719 done
10720
10721
10722         if test $ac_cv_header_pth_h = yes ; then
10723                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10724 echo "configure:10725: checking for pth_version in -lpth" >&5
10725 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10726 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10727   echo $ac_n "(cached) $ac_c" 1>&6
10728 else
10729   ac_save_LIBS="$LIBS"
10730 LIBS="-lpth  $LIBS"
10731 cat > conftest.$ac_ext <<EOF
10732 #line 10733 "configure"
10733 #include "confdefs.h"
10734 /* Override any gcc2 internal prototype to avoid an error.  */
10735 /* We use char because int might match the return type of a gcc2
10736     builtin and then its argument prototype would still apply.  */
10737 char pth_version();
10738
10739 int main() {
10740 pth_version()
10741 ; return 0; }
10742 EOF
10743 if { (eval echo configure:10744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10744   rm -rf conftest*
10745   eval "ac_cv_lib_$ac_lib_var=yes"
10746 else
10747   echo "configure: failed program was:" >&5
10748   cat conftest.$ac_ext >&5
10749   rm -rf conftest*
10750   eval "ac_cv_lib_$ac_lib_var=no"
10751 fi
10752 rm -f conftest*
10753 LIBS="$ac_save_LIBS"
10754
10755 fi
10756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10757   echo "$ac_t""yes" 1>&6
10758   have_pth=yes
10759 else
10760   echo "$ac_t""no" 1>&6
10761 have_pth=no
10762 fi
10763
10764
10765                 if test $have_pth = yes ; then
10766                         cat >> confdefs.h <<\EOF
10767 #define HAVE_GNU_PTH 1
10768 EOF
10769
10770                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10771                         ol_link_threads=pth
10772
10773                         if test $ol_with_yielding_select = auto ; then
10774                                 ol_with_yielding_select=yes
10775                         fi
10776                 fi
10777         fi
10778 fi
10779
10780 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10781         -o $ol_with_threads = lwp ; then
10782
10783                 for ac_hdr in thread.h synch.h
10784 do
10785 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10786 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10787 echo "configure:10788: checking for $ac_hdr" >&5
10788 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10789   echo $ac_n "(cached) $ac_c" 1>&6
10790 else
10791   cat > conftest.$ac_ext <<EOF
10792 #line 10793 "configure"
10793 #include "confdefs.h"
10794 #include <$ac_hdr>
10795 EOF
10796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10797 { (eval echo configure:10798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10799 if test -z "$ac_err"; then
10800   rm -rf conftest*
10801   eval "ac_cv_header_$ac_safe=yes"
10802 else
10803   echo "$ac_err" >&5
10804   echo "configure: failed program was:" >&5
10805   cat conftest.$ac_ext >&5
10806   rm -rf conftest*
10807   eval "ac_cv_header_$ac_safe=no"
10808 fi
10809 rm -f conftest*
10810 fi
10811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10812   echo "$ac_t""yes" 1>&6
10813     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10814   cat >> confdefs.h <<EOF
10815 #define $ac_tr_hdr 1
10816 EOF
10817  
10818 else
10819   echo "$ac_t""no" 1>&6
10820 fi
10821 done
10822
10823         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10824                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10825 echo "configure:10826: checking for thr_create in -lthread" >&5
10826 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10827 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10828   echo $ac_n "(cached) $ac_c" 1>&6
10829 else
10830   ac_save_LIBS="$LIBS"
10831 LIBS="-lthread  $LIBS"
10832 cat > conftest.$ac_ext <<EOF
10833 #line 10834 "configure"
10834 #include "confdefs.h"
10835 /* Override any gcc2 internal prototype to avoid an error.  */
10836 /* We use char because int might match the return type of a gcc2
10837     builtin and then its argument prototype would still apply.  */
10838 char thr_create();
10839
10840 int main() {
10841 thr_create()
10842 ; return 0; }
10843 EOF
10844 if { (eval echo configure:10845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10845   rm -rf conftest*
10846   eval "ac_cv_lib_$ac_lib_var=yes"
10847 else
10848   echo "configure: failed program was:" >&5
10849   cat conftest.$ac_ext >&5
10850   rm -rf conftest*
10851   eval "ac_cv_lib_$ac_lib_var=no"
10852 fi
10853 rm -f conftest*
10854 LIBS="$ac_save_LIBS"
10855
10856 fi
10857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10858   echo "$ac_t""yes" 1>&6
10859   have_thr=yes
10860 else
10861   echo "$ac_t""no" 1>&6
10862 have_thr=no
10863 fi
10864
10865
10866                 if test $have_thr = yes ; then
10867                         cat >> confdefs.h <<\EOF
10868 #define HAVE_THR 1
10869 EOF
10870
10871                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10872                         ol_link_threads=thr
10873
10874                         if test $ol_with_yielding_select = auto ; then
10875                                 ol_with_yielding_select=yes
10876                         fi
10877
10878                                                 for ac_func in \
10879                                 thr_setconcurrency \
10880                                 thr_getconcurrency \
10881                         
10882 do
10883 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10884 echo "configure:10885: checking for $ac_func" >&5
10885 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10886   echo $ac_n "(cached) $ac_c" 1>&6
10887 else
10888   cat > conftest.$ac_ext <<EOF
10889 #line 10890 "configure"
10890 #include "confdefs.h"
10891 /* System header to define __stub macros and hopefully few prototypes,
10892     which can conflict with char $ac_func(); below.  */
10893 #include <assert.h>
10894 /* Override any gcc2 internal prototype to avoid an error.  */
10895 /* We use char because int might match the return type of a gcc2
10896     builtin and then its argument prototype would still apply.  */
10897 char $ac_func();
10898 char (*f)();
10899
10900 int main() {
10901
10902 /* The GNU C library defines this for functions which it implements
10903     to always fail with ENOSYS.  Some functions are actually named
10904     something starting with __ and the normal name is an alias.  */
10905 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10906 choke me
10907 #else
10908 f = $ac_func;
10909 #endif
10910
10911 ; return 0; }
10912 EOF
10913 if { (eval echo configure:10914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10914   rm -rf conftest*
10915   eval "ac_cv_func_$ac_func=yes"
10916 else
10917   echo "configure: failed program was:" >&5
10918   cat conftest.$ac_ext >&5
10919   rm -rf conftest*
10920   eval "ac_cv_func_$ac_func=no"
10921 fi
10922 rm -f conftest*
10923 fi
10924
10925 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10926   echo "$ac_t""yes" 1>&6
10927     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10928   cat >> confdefs.h <<EOF
10929 #define $ac_tr_func 1
10930 EOF
10931  
10932 else
10933   echo "$ac_t""no" 1>&6
10934 fi
10935 done
10936
10937                 fi
10938         fi
10939
10940                 for ac_hdr in lwp/lwp.h
10941 do
10942 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10943 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10944 echo "configure:10945: checking for $ac_hdr" >&5
10945 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10946   echo $ac_n "(cached) $ac_c" 1>&6
10947 else
10948   cat > conftest.$ac_ext <<EOF
10949 #line 10950 "configure"
10950 #include "confdefs.h"
10951 #include <$ac_hdr>
10952 EOF
10953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10954 { (eval echo configure:10955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10956 if test -z "$ac_err"; then
10957   rm -rf conftest*
10958   eval "ac_cv_header_$ac_safe=yes"
10959 else
10960   echo "$ac_err" >&5
10961   echo "configure: failed program was:" >&5
10962   cat conftest.$ac_ext >&5
10963   rm -rf conftest*
10964   eval "ac_cv_header_$ac_safe=no"
10965 fi
10966 rm -f conftest*
10967 fi
10968 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10969   echo "$ac_t""yes" 1>&6
10970     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10971   cat >> confdefs.h <<EOF
10972 #define $ac_tr_hdr 1
10973 EOF
10974  
10975 else
10976   echo "$ac_t""no" 1>&6
10977 fi
10978 done
10979
10980         if test $ac_cv_header_lwp_lwp_h = yes ; then
10981                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10982 echo "configure:10983: checking for lwp_create in -llwp" >&5
10983 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10984 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10985   echo $ac_n "(cached) $ac_c" 1>&6
10986 else
10987   ac_save_LIBS="$LIBS"
10988 LIBS="-llwp  $LIBS"
10989 cat > conftest.$ac_ext <<EOF
10990 #line 10991 "configure"
10991 #include "confdefs.h"
10992 /* Override any gcc2 internal prototype to avoid an error.  */
10993 /* We use char because int might match the return type of a gcc2
10994     builtin and then its argument prototype would still apply.  */
10995 char lwp_create();
10996
10997 int main() {
10998 lwp_create()
10999 ; return 0; }
11000 EOF
11001 if { (eval echo configure:11002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11002   rm -rf conftest*
11003   eval "ac_cv_lib_$ac_lib_var=yes"
11004 else
11005   echo "configure: failed program was:" >&5
11006   cat conftest.$ac_ext >&5
11007   rm -rf conftest*
11008   eval "ac_cv_lib_$ac_lib_var=no"
11009 fi
11010 rm -f conftest*
11011 LIBS="$ac_save_LIBS"
11012
11013 fi
11014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11015   echo "$ac_t""yes" 1>&6
11016   have_lwp=yes
11017 else
11018   echo "$ac_t""no" 1>&6
11019 have_lwp=no
11020 fi
11021
11022
11023                 if test $have_lwp = yes ; then
11024                         cat >> confdefs.h <<\EOF
11025 #define HAVE_LWP 1
11026 EOF
11027
11028                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11029                         ol_link_threads=lwp
11030
11031                         if test $ol_with_yielding_select = auto ; then
11032                                 ol_with_yielding_select=no
11033                         fi
11034                 fi
11035         fi
11036 fi
11037
11038 if test $ol_with_yielding_select = yes ; then
11039         cat >> confdefs.h <<\EOF
11040 #define HAVE_YIELDING_SELECT 1
11041 EOF
11042
11043 fi
11044
11045 if test $ol_with_threads = manual ; then
11046                 ol_link_threads=yes
11047
11048         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11049
11050         for ac_hdr in pthread.h sched.h
11051 do
11052 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11053 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11054 echo "configure:11055: checking for $ac_hdr" >&5
11055 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11056   echo $ac_n "(cached) $ac_c" 1>&6
11057 else
11058   cat > conftest.$ac_ext <<EOF
11059 #line 11060 "configure"
11060 #include "confdefs.h"
11061 #include <$ac_hdr>
11062 EOF
11063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11064 { (eval echo configure:11065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11065 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11066 if test -z "$ac_err"; then
11067   rm -rf conftest*
11068   eval "ac_cv_header_$ac_safe=yes"
11069 else
11070   echo "$ac_err" >&5
11071   echo "configure: failed program was:" >&5
11072   cat conftest.$ac_ext >&5
11073   rm -rf conftest*
11074   eval "ac_cv_header_$ac_safe=no"
11075 fi
11076 rm -f conftest*
11077 fi
11078 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11079   echo "$ac_t""yes" 1>&6
11080     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11081   cat >> confdefs.h <<EOF
11082 #define $ac_tr_hdr 1
11083 EOF
11084  
11085 else
11086   echo "$ac_t""no" 1>&6
11087 fi
11088 done
11089
11090         for ac_func in sched_yield pthread_yield
11091 do
11092 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11093 echo "configure:11094: checking for $ac_func" >&5
11094 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11095   echo $ac_n "(cached) $ac_c" 1>&6
11096 else
11097   cat > conftest.$ac_ext <<EOF
11098 #line 11099 "configure"
11099 #include "confdefs.h"
11100 /* System header to define __stub macros and hopefully few prototypes,
11101     which can conflict with char $ac_func(); below.  */
11102 #include <assert.h>
11103 /* Override any gcc2 internal prototype to avoid an error.  */
11104 /* We use char because int might match the return type of a gcc2
11105     builtin and then its argument prototype would still apply.  */
11106 char $ac_func();
11107 char (*f)();
11108
11109 int main() {
11110
11111 /* The GNU C library defines this for functions which it implements
11112     to always fail with ENOSYS.  Some functions are actually named
11113     something starting with __ and the normal name is an alias.  */
11114 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11115 choke me
11116 #else
11117 f = $ac_func;
11118 #endif
11119
11120 ; return 0; }
11121 EOF
11122 if { (eval echo configure:11123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11123   rm -rf conftest*
11124   eval "ac_cv_func_$ac_func=yes"
11125 else
11126   echo "configure: failed program was:" >&5
11127   cat conftest.$ac_ext >&5
11128   rm -rf conftest*
11129   eval "ac_cv_func_$ac_func=no"
11130 fi
11131 rm -f conftest*
11132 fi
11133
11134 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11135   echo "$ac_t""yes" 1>&6
11136     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11137   cat >> confdefs.h <<EOF
11138 #define $ac_tr_func 1
11139 EOF
11140  
11141 else
11142   echo "$ac_t""no" 1>&6
11143 fi
11144 done
11145
11146         
11147         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11148 echo "configure:11149: checking for LinuxThreads pthread.h" >&5
11149 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11150   echo $ac_n "(cached) $ac_c" 1>&6
11151 else
11152   cat > conftest.$ac_ext <<EOF
11153 #line 11154 "configure"
11154 #include "confdefs.h"
11155 #include <pthread.h>
11156 EOF
11157 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11158   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11159   rm -rf conftest*
11160   ol_cv_header_linux_threads=yes
11161 else
11162   rm -rf conftest*
11163   ol_cv_header_linux_threads=no
11164 fi
11165 rm -f conftest*
11166
11167                 
11168 fi
11169
11170 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11171         if test $ol_cv_header_linux_threads = yes; then
11172                 cat >> confdefs.h <<\EOF
11173 #define HAVE_LINUX_THREADS 1
11174 EOF
11175
11176         fi
11177
11178
11179         for ac_hdr in mach/cthreads.h
11180 do
11181 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11182 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11183 echo "configure:11184: checking for $ac_hdr" >&5
11184 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11185   echo $ac_n "(cached) $ac_c" 1>&6
11186 else
11187   cat > conftest.$ac_ext <<EOF
11188 #line 11189 "configure"
11189 #include "confdefs.h"
11190 #include <$ac_hdr>
11191 EOF
11192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11193 { (eval echo configure:11194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11195 if test -z "$ac_err"; then
11196   rm -rf conftest*
11197   eval "ac_cv_header_$ac_safe=yes"
11198 else
11199   echo "$ac_err" >&5
11200   echo "configure: failed program was:" >&5
11201   cat conftest.$ac_ext >&5
11202   rm -rf conftest*
11203   eval "ac_cv_header_$ac_safe=no"
11204 fi
11205 rm -f conftest*
11206 fi
11207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11208   echo "$ac_t""yes" 1>&6
11209     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11210   cat >> confdefs.h <<EOF
11211 #define $ac_tr_hdr 1
11212 EOF
11213  
11214 else
11215   echo "$ac_t""no" 1>&6
11216 fi
11217 done
11218
11219         for ac_hdr in lwp/lwp.h
11220 do
11221 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11222 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11223 echo "configure:11224: checking for $ac_hdr" >&5
11224 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11225   echo $ac_n "(cached) $ac_c" 1>&6
11226 else
11227   cat > conftest.$ac_ext <<EOF
11228 #line 11229 "configure"
11229 #include "confdefs.h"
11230 #include <$ac_hdr>
11231 EOF
11232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11233 { (eval echo configure:11234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11235 if test -z "$ac_err"; then
11236   rm -rf conftest*
11237   eval "ac_cv_header_$ac_safe=yes"
11238 else
11239   echo "$ac_err" >&5
11240   echo "configure: failed program was:" >&5
11241   cat conftest.$ac_ext >&5
11242   rm -rf conftest*
11243   eval "ac_cv_header_$ac_safe=no"
11244 fi
11245 rm -f conftest*
11246 fi
11247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11248   echo "$ac_t""yes" 1>&6
11249     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11250   cat >> confdefs.h <<EOF
11251 #define $ac_tr_hdr 1
11252 EOF
11253  
11254 else
11255   echo "$ac_t""no" 1>&6
11256 fi
11257 done
11258
11259         for ac_hdr in thread.h synch.h
11260 do
11261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11263 echo "configure:11264: checking for $ac_hdr" >&5
11264 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11265   echo $ac_n "(cached) $ac_c" 1>&6
11266 else
11267   cat > conftest.$ac_ext <<EOF
11268 #line 11269 "configure"
11269 #include "confdefs.h"
11270 #include <$ac_hdr>
11271 EOF
11272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11273 { (eval echo configure:11274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11275 if test -z "$ac_err"; then
11276   rm -rf conftest*
11277   eval "ac_cv_header_$ac_safe=yes"
11278 else
11279   echo "$ac_err" >&5
11280   echo "configure: failed program was:" >&5
11281   cat conftest.$ac_ext >&5
11282   rm -rf conftest*
11283   eval "ac_cv_header_$ac_safe=no"
11284 fi
11285 rm -f conftest*
11286 fi
11287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11288   echo "$ac_t""yes" 1>&6
11289     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11290   cat >> confdefs.h <<EOF
11291 #define $ac_tr_hdr 1
11292 EOF
11293  
11294 else
11295   echo "$ac_t""no" 1>&6
11296 fi
11297 done
11298
11299 fi
11300
11301 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11302                         cat >> confdefs.h <<\EOF
11303 #define REENTRANT 1
11304 EOF
11305
11306         cat >> confdefs.h <<\EOF
11307 #define _REENTRANT 1
11308 EOF
11309
11310         cat >> confdefs.h <<\EOF
11311 #define THREAD_SAFE 1
11312 EOF
11313
11314         cat >> confdefs.h <<\EOF
11315 #define _THREAD_SAFE 1
11316 EOF
11317
11318         cat >> confdefs.h <<\EOF
11319 #define THREADSAFE 1
11320 EOF
11321
11322         cat >> confdefs.h <<\EOF
11323 #define _THREADSAFE 1
11324 EOF
11325
11326         cat >> confdefs.h <<\EOF
11327 #define _SGI_MP_SOURCE 1
11328 EOF
11329
11330
11331                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11332 echo "configure:11333: checking for thread specific errno" >&5
11333 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11334   echo $ac_n "(cached) $ac_c" 1>&6
11335 else
11336   
11337                 cat > conftest.$ac_ext <<EOF
11338 #line 11339 "configure"
11339 #include "confdefs.h"
11340 #include <errno.h>
11341 int main() {
11342 errno = 0;
11343 ; return 0; }
11344 EOF
11345 if { (eval echo configure:11346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11346   rm -rf conftest*
11347   ol_cv_errno_thread_specific=yes
11348 else
11349   echo "configure: failed program was:" >&5
11350   cat conftest.$ac_ext >&5
11351   rm -rf conftest*
11352   ol_cv_errno_thread_specific=no
11353 fi
11354 rm -f conftest*
11355         
11356 fi
11357
11358 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11359
11360                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11361 echo "configure:11362: checking for thread specific h_errno" >&5
11362 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11363   echo $ac_n "(cached) $ac_c" 1>&6
11364 else
11365   
11366                 cat > conftest.$ac_ext <<EOF
11367 #line 11368 "configure"
11368 #include "confdefs.h"
11369 #include <netdb.h>
11370 int main() {
11371 h_errno = 0;
11372 ; return 0; }
11373 EOF
11374 if { (eval echo configure:11375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11375   rm -rf conftest*
11376   ol_cv_h_errno_thread_specific=yes
11377 else
11378   echo "configure: failed program was:" >&5
11379   cat conftest.$ac_ext >&5
11380   rm -rf conftest*
11381   ol_cv_h_errno_thread_specific=no
11382 fi
11383 rm -f conftest*
11384         
11385 fi
11386
11387 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11388
11389         if test $ol_cv_errno_thread_specific != yes \
11390                 -o $ol_cv_h_errno_thread_specific != yes ; then
11391                 LIBS="$LTHREAD_LIBS $LIBS"
11392                 LTHREAD_LIBS=""
11393         fi
11394
11395 fi  
11396
11397 if test $ol_link_threads = no ; then
11398         if test $ol_with_threads = yes ; then
11399                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11400         fi
11401
11402         if test $ol_with_threads = auto ; then
11403                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11404                 ol_with_threads=no
11405         fi
11406
11407         cat >> confdefs.h <<\EOF
11408 #define NO_THREADS 1
11409 EOF
11410
11411         LTHREAD_LIBS=""
11412 fi
11413
11414 if test $ol_link_threads != no ; then
11415         cat >> confdefs.h <<\EOF
11416 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11417 EOF
11418
11419 fi
11420
11421 ol_link_ldbm=no 
11422
11423 if test $ol_with_ldbm_api = auto \
11424         -o $ol_with_ldbm_api = berkeley \
11425         -o $ol_with_ldbm_api = bcompat ; then
11426
11427         if test $ol_with_ldbm_api = bcompat; then \
11428                 ol_cv_berkeley_db=no
11429 for ac_hdr in db_185.h db.h
11430 do
11431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11433 echo "configure:11434: checking for $ac_hdr" >&5
11434 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11435   echo $ac_n "(cached) $ac_c" 1>&6
11436 else
11437   cat > conftest.$ac_ext <<EOF
11438 #line 11439 "configure"
11439 #include "confdefs.h"
11440 #include <$ac_hdr>
11441 EOF
11442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11443 { (eval echo configure:11444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11445 if test -z "$ac_err"; then
11446   rm -rf conftest*
11447   eval "ac_cv_header_$ac_safe=yes"
11448 else
11449   echo "$ac_err" >&5
11450   echo "configure: failed program was:" >&5
11451   cat conftest.$ac_ext >&5
11452   rm -rf conftest*
11453   eval "ac_cv_header_$ac_safe=no"
11454 fi
11455 rm -f conftest*
11456 fi
11457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11458   echo "$ac_t""yes" 1>&6
11459     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11460   cat >> confdefs.h <<EOF
11461 #define $ac_tr_hdr 1
11462 EOF
11463  
11464 else
11465   echo "$ac_t""no" 1>&6
11466 fi
11467 done
11468
11469 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11470         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11471 echo "configure:11472: checking if Berkeley DB header compatibility" >&5
11472 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11473   echo $ac_n "(cached) $ac_c" 1>&6
11474 else
11475   
11476                 cat > conftest.$ac_ext <<EOF
11477 #line 11478 "configure"
11478 #include "confdefs.h"
11479
11480 #if HAVE_DB_185_H
11481 #       include <db_185.h>
11482 #else
11483 #       include <db.h>
11484 #endif
11485
11486  /* this check could be improved */
11487 #ifndef DB_VERSION_MAJOR
11488 #       define DB_VERSION_MAJOR 1
11489 #endif
11490
11491 #if DB_VERSION_MAJOR == 1 
11492         __db_version_1
11493 #endif
11494
11495 EOF
11496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11497   egrep "__db_version_1" >/dev/null 2>&1; then
11498   rm -rf conftest*
11499   ol_cv_header_db1=yes
11500 else
11501   rm -rf conftest*
11502   ol_cv_header_db1=no
11503 fi
11504 rm -f conftest*
11505
11506 fi
11507
11508 echo "$ac_t""$ol_cv_header_db1" 1>&6
11509
11510         if test ol_cv_header_db1=yes ; then
11511                 ol_cv_lib_db=no
11512 if test $ol_cv_lib_db = no ; then
11513         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11514 echo "configure:11515: checking for Berkeley DB link (default)" >&5
11515 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11516   echo $ac_n "(cached) $ac_c" 1>&6
11517 else
11518   
11519         ol_DB_LIB=
11520         ol_LIBS=$LIBS
11521         LIBS="$ol_DB_LIB $LIBS"
11522
11523         cat > conftest.$ac_ext <<EOF
11524 #line 11525 "configure"
11525 #include "confdefs.h"
11526
11527 #ifdef HAVE_DB_185_H
11528 # include <db_185.h>
11529 #else
11530 # include <db.h>
11531 #endif
11532
11533 #ifndef DB_VERSION_MAJOR
11534 # define DB_VERSION_MAJOR 1
11535 #endif
11536
11537 #ifndef NULL
11538 #define NULL ((void*)0)
11539 #endif
11540
11541 int main() {
11542
11543 #if DB_VERSION_MAJOR > 2
11544         db_env_create( NULL, 0 );
11545 #elif DB_VERSION_MAJOR > 1
11546         db_appexit( NULL );
11547 #else
11548         (void) dbopen( NULL, 0, 0, 0, NULL);
11549 #endif
11550
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   ol_cv_db_none=yes
11556 else
11557   echo "configure: failed program was:" >&5
11558   cat conftest.$ac_ext >&5
11559   rm -rf conftest*
11560   ol_cv_db_none=no
11561 fi
11562 rm -f conftest*
11563
11564         LIBS="$ol_LIBS"
11565
11566 fi
11567
11568 echo "$ac_t""$ol_cv_db_none" 1>&6
11569
11570         if test $ol_cv_db_none = yes ; then
11571                 ol_cv_lib_db=yes
11572         fi
11573 fi
11574
11575 if test $ol_cv_lib_db = no ; then
11576         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11577 echo "configure:11578: checking for Berkeley DB link (-ldb)" >&5
11578 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11579   echo $ac_n "(cached) $ac_c" 1>&6
11580 else
11581   
11582         ol_DB_LIB=-ldb
11583         ol_LIBS=$LIBS
11584         LIBS="$ol_DB_LIB $LIBS"
11585
11586         cat > conftest.$ac_ext <<EOF
11587 #line 11588 "configure"
11588 #include "confdefs.h"
11589
11590 #ifdef HAVE_DB_185_H
11591 # include <db_185.h>
11592 #else
11593 # include <db.h>
11594 #endif
11595
11596 #ifndef DB_VERSION_MAJOR
11597 # define DB_VERSION_MAJOR 1
11598 #endif
11599
11600 #ifndef NULL
11601 #define NULL ((void*)0)
11602 #endif
11603
11604 int main() {
11605
11606 #if DB_VERSION_MAJOR > 2
11607         db_env_create( NULL, 0 );
11608 #elif DB_VERSION_MAJOR > 1
11609         db_appexit( NULL );
11610 #else
11611         (void) dbopen( NULL, 0, 0, 0, NULL);
11612 #endif
11613
11614 ; return 0; }
11615 EOF
11616 if { (eval echo configure:11617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11617   rm -rf conftest*
11618   ol_cv_db_db=yes
11619 else
11620   echo "configure: failed program was:" >&5
11621   cat conftest.$ac_ext >&5
11622   rm -rf conftest*
11623   ol_cv_db_db=no
11624 fi
11625 rm -f conftest*
11626
11627         LIBS="$ol_LIBS"
11628
11629 fi
11630
11631 echo "$ac_t""$ol_cv_db_db" 1>&6
11632
11633         if test $ol_cv_db_db = yes ; then
11634                 ol_cv_lib_db=-ldb
11635         fi
11636 fi
11637
11638 if test $ol_cv_lib_db = no ; then
11639         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11640 echo "configure:11641: checking for Berkeley DB link (-ldb3)" >&5
11641 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11642   echo $ac_n "(cached) $ac_c" 1>&6
11643 else
11644   
11645         ol_DB_LIB=-ldb3
11646         ol_LIBS=$LIBS
11647         LIBS="$ol_DB_LIB $LIBS"
11648
11649         cat > conftest.$ac_ext <<EOF
11650 #line 11651 "configure"
11651 #include "confdefs.h"
11652
11653 #ifdef HAVE_DB_185_H
11654 # include <db_185.h>
11655 #else
11656 # include <db.h>
11657 #endif
11658
11659 #ifndef DB_VERSION_MAJOR
11660 # define DB_VERSION_MAJOR 1
11661 #endif
11662
11663 #ifndef NULL
11664 #define NULL ((void*)0)
11665 #endif
11666
11667 int main() {
11668
11669 #if DB_VERSION_MAJOR > 2
11670         db_env_create( NULL, 0 );
11671 #elif DB_VERSION_MAJOR > 1
11672         db_appexit( NULL );
11673 #else
11674         (void) dbopen( NULL, 0, 0, 0, NULL);
11675 #endif
11676
11677 ; return 0; }
11678 EOF
11679 if { (eval echo configure:11680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11680   rm -rf conftest*
11681   ol_cv_db_db3=yes
11682 else
11683   echo "configure: failed program was:" >&5
11684   cat conftest.$ac_ext >&5
11685   rm -rf conftest*
11686   ol_cv_db_db3=no
11687 fi
11688 rm -f conftest*
11689
11690         LIBS="$ol_LIBS"
11691
11692 fi
11693
11694 echo "$ac_t""$ol_cv_db_db3" 1>&6
11695
11696         if test $ol_cv_db_db3 = yes ; then
11697                 ol_cv_lib_db=-ldb3
11698         fi
11699 fi
11700
11701 if test $ol_cv_lib_db = no ; then
11702         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11703 echo "configure:11704: checking for Berkeley DB link (-ldb2)" >&5
11704 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11705   echo $ac_n "(cached) $ac_c" 1>&6
11706 else
11707   
11708         ol_DB_LIB=-ldb2
11709         ol_LIBS=$LIBS
11710         LIBS="$ol_DB_LIB $LIBS"
11711
11712         cat > conftest.$ac_ext <<EOF
11713 #line 11714 "configure"
11714 #include "confdefs.h"
11715
11716 #ifdef HAVE_DB_185_H
11717 # include <db_185.h>
11718 #else
11719 # include <db.h>
11720 #endif
11721
11722 #ifndef DB_VERSION_MAJOR
11723 # define DB_VERSION_MAJOR 1
11724 #endif
11725
11726 #ifndef NULL
11727 #define NULL ((void*)0)
11728 #endif
11729
11730 int main() {
11731
11732 #if DB_VERSION_MAJOR > 2
11733         db_env_create( NULL, 0 );
11734 #elif DB_VERSION_MAJOR > 1
11735         db_appexit( NULL );
11736 #else
11737         (void) dbopen( NULL, 0, 0, 0, NULL);
11738 #endif
11739
11740 ; return 0; }
11741 EOF
11742 if { (eval echo configure:11743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11743   rm -rf conftest*
11744   ol_cv_db_db2=yes
11745 else
11746   echo "configure: failed program was:" >&5
11747   cat conftest.$ac_ext >&5
11748   rm -rf conftest*
11749   ol_cv_db_db2=no
11750 fi
11751 rm -f conftest*
11752
11753         LIBS="$ol_LIBS"
11754
11755 fi
11756
11757 echo "$ac_t""$ol_cv_db_db2" 1>&6
11758
11759         if test $ol_cv_db_db2 = yes ; then
11760                 ol_cv_lib_db=-ldb2
11761         fi
11762 fi
11763
11764 if test $ol_cv_lib_db = no ; then
11765         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11766 echo "configure:11767: checking for Berkeley DB link (-ldb1)" >&5
11767 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11768   echo $ac_n "(cached) $ac_c" 1>&6
11769 else
11770   
11771         ol_DB_LIB=-ldb1
11772         ol_LIBS=$LIBS
11773         LIBS="$ol_DB_LIB $LIBS"
11774
11775         cat > conftest.$ac_ext <<EOF
11776 #line 11777 "configure"
11777 #include "confdefs.h"
11778
11779 #ifdef HAVE_DB_185_H
11780 # include <db_185.h>
11781 #else
11782 # include <db.h>
11783 #endif
11784
11785 #ifndef DB_VERSION_MAJOR
11786 # define DB_VERSION_MAJOR 1
11787 #endif
11788
11789 #ifndef NULL
11790 #define NULL ((void*)0)
11791 #endif
11792
11793 int main() {
11794
11795 #if DB_VERSION_MAJOR > 2
11796         db_env_create( NULL, 0 );
11797 #elif DB_VERSION_MAJOR > 1
11798         db_appexit( NULL );
11799 #else
11800         (void) dbopen( NULL, 0, 0, 0, NULL);
11801 #endif
11802
11803 ; return 0; }
11804 EOF
11805 if { (eval echo configure:11806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11806   rm -rf conftest*
11807   ol_cv_db_db1=yes
11808 else
11809   echo "configure: failed program was:" >&5
11810   cat conftest.$ac_ext >&5
11811   rm -rf conftest*
11812   ol_cv_db_db1=no
11813 fi
11814 rm -f conftest*
11815
11816         LIBS="$ol_LIBS"
11817
11818 fi
11819
11820 echo "$ac_t""$ol_cv_db_db1" 1>&6
11821
11822         if test $ol_cv_db_db1 = yes ; then
11823                 ol_cv_lib_db=-ldb1
11824         fi
11825 fi
11826
11827
11828                 if test "$ol_cv_lib_db" != no ; then
11829                         ol_cv_berkeley_db=yes
11830                 fi
11831         fi
11832 fi
11833
11834         else
11835                 ol_cv_berkeley_db=no
11836 for ac_hdr in db.h
11837 do
11838 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11839 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11840 echo "configure:11841: checking for $ac_hdr" >&5
11841 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11842   echo $ac_n "(cached) $ac_c" 1>&6
11843 else
11844   cat > conftest.$ac_ext <<EOF
11845 #line 11846 "configure"
11846 #include "confdefs.h"
11847 #include <$ac_hdr>
11848 EOF
11849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11850 { (eval echo configure:11851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11852 if test -z "$ac_err"; then
11853   rm -rf conftest*
11854   eval "ac_cv_header_$ac_safe=yes"
11855 else
11856   echo "$ac_err" >&5
11857   echo "configure: failed program was:" >&5
11858   cat conftest.$ac_ext >&5
11859   rm -rf conftest*
11860   eval "ac_cv_header_$ac_safe=no"
11861 fi
11862 rm -f conftest*
11863 fi
11864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11865   echo "$ac_t""yes" 1>&6
11866     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11867   cat >> confdefs.h <<EOF
11868 #define $ac_tr_hdr 1
11869 EOF
11870  
11871 else
11872   echo "$ac_t""no" 1>&6
11873 fi
11874 done
11875
11876 if test $ac_cv_header_db_h = yes; then
11877         ol_cv_lib_db=no
11878 if test $ol_cv_lib_db = no ; then
11879         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11880 echo "configure:11881: checking for Berkeley DB link (default)" >&5
11881 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11882   echo $ac_n "(cached) $ac_c" 1>&6
11883 else
11884   
11885         ol_DB_LIB=
11886         ol_LIBS=$LIBS
11887         LIBS="$ol_DB_LIB $LIBS"
11888
11889         cat > conftest.$ac_ext <<EOF
11890 #line 11891 "configure"
11891 #include "confdefs.h"
11892
11893 #ifdef HAVE_DB_185_H
11894 # include <db_185.h>
11895 #else
11896 # include <db.h>
11897 #endif
11898
11899 #ifndef DB_VERSION_MAJOR
11900 # define DB_VERSION_MAJOR 1
11901 #endif
11902
11903 #ifndef NULL
11904 #define NULL ((void*)0)
11905 #endif
11906
11907 int main() {
11908
11909 #if DB_VERSION_MAJOR > 2
11910         db_env_create( NULL, 0 );
11911 #elif DB_VERSION_MAJOR > 1
11912         db_appexit( NULL );
11913 #else
11914         (void) dbopen( NULL, 0, 0, 0, NULL);
11915 #endif
11916
11917 ; return 0; }
11918 EOF
11919 if { (eval echo configure:11920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11920   rm -rf conftest*
11921   ol_cv_db_none=yes
11922 else
11923   echo "configure: failed program was:" >&5
11924   cat conftest.$ac_ext >&5
11925   rm -rf conftest*
11926   ol_cv_db_none=no
11927 fi
11928 rm -f conftest*
11929
11930         LIBS="$ol_LIBS"
11931
11932 fi
11933
11934 echo "$ac_t""$ol_cv_db_none" 1>&6
11935
11936         if test $ol_cv_db_none = yes ; then
11937                 ol_cv_lib_db=yes
11938         fi
11939 fi
11940
11941 if test $ol_cv_lib_db = no ; then
11942         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11943 echo "configure:11944: checking for Berkeley DB link (-ldb)" >&5
11944 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11945   echo $ac_n "(cached) $ac_c" 1>&6
11946 else
11947   
11948         ol_DB_LIB=-ldb
11949         ol_LIBS=$LIBS
11950         LIBS="$ol_DB_LIB $LIBS"
11951
11952         cat > conftest.$ac_ext <<EOF
11953 #line 11954 "configure"
11954 #include "confdefs.h"
11955
11956 #ifdef HAVE_DB_185_H
11957 # include <db_185.h>
11958 #else
11959 # include <db.h>
11960 #endif
11961
11962 #ifndef DB_VERSION_MAJOR
11963 # define DB_VERSION_MAJOR 1
11964 #endif
11965
11966 #ifndef NULL
11967 #define NULL ((void*)0)
11968 #endif
11969
11970 int main() {
11971
11972 #if DB_VERSION_MAJOR > 2
11973         db_env_create( NULL, 0 );
11974 #elif DB_VERSION_MAJOR > 1
11975         db_appexit( NULL );
11976 #else
11977         (void) dbopen( NULL, 0, 0, 0, NULL);
11978 #endif
11979
11980 ; return 0; }
11981 EOF
11982 if { (eval echo configure:11983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11983   rm -rf conftest*
11984   ol_cv_db_db=yes
11985 else
11986   echo "configure: failed program was:" >&5
11987   cat conftest.$ac_ext >&5
11988   rm -rf conftest*
11989   ol_cv_db_db=no
11990 fi
11991 rm -f conftest*
11992
11993         LIBS="$ol_LIBS"
11994
11995 fi
11996
11997 echo "$ac_t""$ol_cv_db_db" 1>&6
11998
11999         if test $ol_cv_db_db = yes ; then
12000                 ol_cv_lib_db=-ldb
12001         fi
12002 fi
12003
12004 if test $ol_cv_lib_db = no ; then
12005         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12006 echo "configure:12007: checking for Berkeley DB link (-ldb3)" >&5
12007 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12008   echo $ac_n "(cached) $ac_c" 1>&6
12009 else
12010   
12011         ol_DB_LIB=-ldb3
12012         ol_LIBS=$LIBS
12013         LIBS="$ol_DB_LIB $LIBS"
12014
12015         cat > conftest.$ac_ext <<EOF
12016 #line 12017 "configure"
12017 #include "confdefs.h"
12018
12019 #ifdef HAVE_DB_185_H
12020 # include <db_185.h>
12021 #else
12022 # include <db.h>
12023 #endif
12024
12025 #ifndef DB_VERSION_MAJOR
12026 # define DB_VERSION_MAJOR 1
12027 #endif
12028
12029 #ifndef NULL
12030 #define NULL ((void*)0)
12031 #endif
12032
12033 int main() {
12034
12035 #if DB_VERSION_MAJOR > 2
12036         db_env_create( NULL, 0 );
12037 #elif DB_VERSION_MAJOR > 1
12038         db_appexit( NULL );
12039 #else
12040         (void) dbopen( NULL, 0, 0, 0, NULL);
12041 #endif
12042
12043 ; return 0; }
12044 EOF
12045 if { (eval echo configure:12046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12046   rm -rf conftest*
12047   ol_cv_db_db3=yes
12048 else
12049   echo "configure: failed program was:" >&5
12050   cat conftest.$ac_ext >&5
12051   rm -rf conftest*
12052   ol_cv_db_db3=no
12053 fi
12054 rm -f conftest*
12055
12056         LIBS="$ol_LIBS"
12057
12058 fi
12059
12060 echo "$ac_t""$ol_cv_db_db3" 1>&6
12061
12062         if test $ol_cv_db_db3 = yes ; then
12063                 ol_cv_lib_db=-ldb3
12064         fi
12065 fi
12066
12067 if test $ol_cv_lib_db = no ; then
12068         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12069 echo "configure:12070: checking for Berkeley DB link (-ldb2)" >&5
12070 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12071   echo $ac_n "(cached) $ac_c" 1>&6
12072 else
12073   
12074         ol_DB_LIB=-ldb2
12075         ol_LIBS=$LIBS
12076         LIBS="$ol_DB_LIB $LIBS"
12077
12078         cat > conftest.$ac_ext <<EOF
12079 #line 12080 "configure"
12080 #include "confdefs.h"
12081
12082 #ifdef HAVE_DB_185_H
12083 # include <db_185.h>
12084 #else
12085 # include <db.h>
12086 #endif
12087
12088 #ifndef DB_VERSION_MAJOR
12089 # define DB_VERSION_MAJOR 1
12090 #endif
12091
12092 #ifndef NULL
12093 #define NULL ((void*)0)
12094 #endif
12095
12096 int main() {
12097
12098 #if DB_VERSION_MAJOR > 2
12099         db_env_create( NULL, 0 );
12100 #elif DB_VERSION_MAJOR > 1
12101         db_appexit( NULL );
12102 #else
12103         (void) dbopen( NULL, 0, 0, 0, NULL);
12104 #endif
12105
12106 ; return 0; }
12107 EOF
12108 if { (eval echo configure:12109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12109   rm -rf conftest*
12110   ol_cv_db_db2=yes
12111 else
12112   echo "configure: failed program was:" >&5
12113   cat conftest.$ac_ext >&5
12114   rm -rf conftest*
12115   ol_cv_db_db2=no
12116 fi
12117 rm -f conftest*
12118
12119         LIBS="$ol_LIBS"
12120
12121 fi
12122
12123 echo "$ac_t""$ol_cv_db_db2" 1>&6
12124
12125         if test $ol_cv_db_db2 = yes ; then
12126                 ol_cv_lib_db=-ldb2
12127         fi
12128 fi
12129
12130 if test $ol_cv_lib_db = no ; then
12131         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12132 echo "configure:12133: checking for Berkeley DB link (-ldb1)" >&5
12133 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12134   echo $ac_n "(cached) $ac_c" 1>&6
12135 else
12136   
12137         ol_DB_LIB=-ldb1
12138         ol_LIBS=$LIBS
12139         LIBS="$ol_DB_LIB $LIBS"
12140
12141         cat > conftest.$ac_ext <<EOF
12142 #line 12143 "configure"
12143 #include "confdefs.h"
12144
12145 #ifdef HAVE_DB_185_H
12146 # include <db_185.h>
12147 #else
12148 # include <db.h>
12149 #endif
12150
12151 #ifndef DB_VERSION_MAJOR
12152 # define DB_VERSION_MAJOR 1
12153 #endif
12154
12155 #ifndef NULL
12156 #define NULL ((void*)0)
12157 #endif
12158
12159 int main() {
12160
12161 #if DB_VERSION_MAJOR > 2
12162         db_env_create( NULL, 0 );
12163 #elif DB_VERSION_MAJOR > 1
12164         db_appexit( NULL );
12165 #else
12166         (void) dbopen( NULL, 0, 0, 0, NULL);
12167 #endif
12168
12169 ; return 0; }
12170 EOF
12171 if { (eval echo configure:12172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12172   rm -rf conftest*
12173   ol_cv_db_db1=yes
12174 else
12175   echo "configure: failed program was:" >&5
12176   cat conftest.$ac_ext >&5
12177   rm -rf conftest*
12178   ol_cv_db_db1=no
12179 fi
12180 rm -f conftest*
12181
12182         LIBS="$ol_LIBS"
12183
12184 fi
12185
12186 echo "$ac_t""$ol_cv_db_db1" 1>&6
12187
12188         if test $ol_cv_db_db1 = yes ; then
12189                 ol_cv_lib_db=-ldb1
12190         fi
12191 fi
12192
12193
12194         if test "$ol_cv_lib_db" != no ; then
12195                 ol_cv_berkeley_db=yes
12196                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12197 echo "configure:12198: checking for Berkeley DB thread support" >&5
12198 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12199   echo $ac_n "(cached) $ac_c" 1>&6
12200 else
12201   
12202         ol_LIBS="$LIBS"
12203         if test $ol_cv_lib_db != yes ; then
12204                 LIBS="$ol_cv_lib_db"
12205         fi
12206
12207         if test "$cross_compiling" = yes; then
12208   ol_cv_berkeley_db_thread=cross
12209 else
12210   cat > conftest.$ac_ext <<EOF
12211 #line 12212 "configure"
12212 #include "confdefs.h"
12213
12214 #ifdef HAVE_DB_185_H
12215         choke me;
12216 #else
12217 #include <db.h>
12218 #endif
12219 #ifndef NULL
12220 #define NULL ((void *)0)
12221 #endif
12222 main()
12223 {
12224         int rc;
12225         u_int32_t flags = DB_CREATE | DB_THREAD;
12226
12227
12228 #if DB_VERSION_MAJOR > 2
12229         DB_ENV *env = NULL;
12230
12231         rc = db_env_create( &env, 0 );
12232
12233         if( rc == 0 ) {
12234                 rc = env->open( env, NULL, NULL, flags, 0 );
12235         }
12236
12237 #else
12238         DB_ENV env;
12239         memset( &env, '\0', sizeof(env) );
12240
12241         rc = db_appinit( NULL, NULL, &env, flags );
12242
12243         if( rc == 0 ) {
12244                 db_appexit( &env );
12245         }
12246 #endif
12247
12248         return rc;
12249 }
12250 EOF
12251 if { (eval echo configure:12252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12252 then
12253   ol_cv_berkeley_db_thread=yes
12254 else
12255   echo "configure: failed program was:" >&5
12256   cat conftest.$ac_ext >&5
12257   rm -fr conftest*
12258   ol_cv_berkeley_db_thread=no
12259 fi
12260 rm -fr conftest*
12261 fi
12262
12263
12264         LIBS="$ol_LIBS"
12265
12266         if test $ol_cv_berkeley_db_thread != no ; then
12267                 cat >> confdefs.h <<\EOF
12268 #define HAVE_BERKELEY_DB_THREAD 1
12269 EOF
12270
12271         fi
12272
12273 fi
12274
12275 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12276         fi
12277 fi
12278
12279         fi
12280
12281         if test $ol_cv_berkeley_db != no ; then
12282                 cat >> confdefs.h <<\EOF
12283 #define HAVE_BERKELEY_DB 1
12284 EOF
12285
12286
12287                 ol_link_ldbm=berkeley
12288                 ol_with_ldbm_api=db
12289
12290                 if test $ol_with_ldbm_type = hash ; then
12291                         cat >> confdefs.h <<\EOF
12292 #define LDBM_USE_DBHASH 1
12293 EOF
12294
12295                 else
12296                         cat >> confdefs.h <<\EOF
12297 #define LDBM_USE_DBBTREE 1
12298 EOF
12299
12300                 fi
12301
12302                                                 if test $ol_cv_lib_db != yes ; then
12303                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12304                 fi
12305         fi
12306 fi
12307
12308 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12309         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12310         ol_with_ldbm_api=none
12311 fi
12312
12313 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12314         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12315 echo "configure:12316: checking for MDBM library" >&5
12316 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12317   echo $ac_n "(cached) $ac_c" 1>&6
12318 else
12319         ol_LIBS="$LIBS"
12320         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12321 echo "configure:12322: checking for mdbm_set_chain" >&5
12322 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12323   echo $ac_n "(cached) $ac_c" 1>&6
12324 else
12325   cat > conftest.$ac_ext <<EOF
12326 #line 12327 "configure"
12327 #include "confdefs.h"
12328 /* System header to define __stub macros and hopefully few prototypes,
12329     which can conflict with char mdbm_set_chain(); below.  */
12330 #include <assert.h>
12331 /* Override any gcc2 internal prototype to avoid an error.  */
12332 /* We use char because int might match the return type of a gcc2
12333     builtin and then its argument prototype would still apply.  */
12334 char mdbm_set_chain();
12335 char (*f)();
12336
12337 int main() {
12338
12339 /* The GNU C library defines this for functions which it implements
12340     to always fail with ENOSYS.  Some functions are actually named
12341     something starting with __ and the normal name is an alias.  */
12342 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12343 choke me
12344 #else
12345 f = mdbm_set_chain;
12346 #endif
12347
12348 ; return 0; }
12349 EOF
12350 if { (eval echo configure:12351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12351   rm -rf conftest*
12352   eval "ac_cv_func_mdbm_set_chain=yes"
12353 else
12354   echo "configure: failed program was:" >&5
12355   cat conftest.$ac_ext >&5
12356   rm -rf conftest*
12357   eval "ac_cv_func_mdbm_set_chain=no"
12358 fi
12359 rm -f conftest*
12360 fi
12361
12362 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12363   echo "$ac_t""yes" 1>&6
12364   ol_cv_lib_mdbm=yes
12365 else
12366   echo "$ac_t""no" 1>&6
12367
12368                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12369 echo "configure:12370: checking for mdbm_set_chain in -lmdbm" >&5
12370 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12371 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12372   echo $ac_n "(cached) $ac_c" 1>&6
12373 else
12374   ac_save_LIBS="$LIBS"
12375 LIBS="-lmdbm  $LIBS"
12376 cat > conftest.$ac_ext <<EOF
12377 #line 12378 "configure"
12378 #include "confdefs.h"
12379 /* Override any gcc2 internal prototype to avoid an error.  */
12380 /* We use char because int might match the return type of a gcc2
12381     builtin and then its argument prototype would still apply.  */
12382 char mdbm_set_chain();
12383
12384 int main() {
12385 mdbm_set_chain()
12386 ; return 0; }
12387 EOF
12388 if { (eval echo configure:12389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12389   rm -rf conftest*
12390   eval "ac_cv_lib_$ac_lib_var=yes"
12391 else
12392   echo "configure: failed program was:" >&5
12393   cat conftest.$ac_ext >&5
12394   rm -rf conftest*
12395   eval "ac_cv_lib_$ac_lib_var=no"
12396 fi
12397 rm -f conftest*
12398 LIBS="$ac_save_LIBS"
12399
12400 fi
12401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12402   echo "$ac_t""yes" 1>&6
12403   ol_cv_lib_mdbm=-lmdbm
12404 else
12405   echo "$ac_t""no" 1>&6
12406 ol_cv_lib_mdbm=no
12407 fi
12408
12409         
12410 fi
12411
12412         LIBS="$ol_LIBS"
12413
12414 fi
12415
12416 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12417
12418
12419  for ac_hdr in mdbm.h
12420 do
12421 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12422 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12423 echo "configure:12424: checking for $ac_hdr" >&5
12424 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12425   echo $ac_n "(cached) $ac_c" 1>&6
12426 else
12427   cat > conftest.$ac_ext <<EOF
12428 #line 12429 "configure"
12429 #include "confdefs.h"
12430 #include <$ac_hdr>
12431 EOF
12432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12433 { (eval echo configure:12434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12435 if test -z "$ac_err"; then
12436   rm -rf conftest*
12437   eval "ac_cv_header_$ac_safe=yes"
12438 else
12439   echo "$ac_err" >&5
12440   echo "configure: failed program was:" >&5
12441   cat conftest.$ac_ext >&5
12442   rm -rf conftest*
12443   eval "ac_cv_header_$ac_safe=no"
12444 fi
12445 rm -f conftest*
12446 fi
12447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12448   echo "$ac_t""yes" 1>&6
12449     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12450   cat >> confdefs.h <<EOF
12451 #define $ac_tr_hdr 1
12452 EOF
12453  
12454 else
12455   echo "$ac_t""no" 1>&6
12456 fi
12457 done
12458
12459  echo $ac_n "checking for db""... $ac_c" 1>&6
12460 echo "configure:12461: checking for db" >&5
12461 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12462   echo $ac_n "(cached) $ac_c" 1>&6
12463 else
12464   
12465         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12466                 ol_cv_mdbm=no
12467         else
12468                 ol_cv_mdbm=yes
12469         fi
12470
12471 fi
12472
12473 echo "$ac_t""$ol_cv_mdbm" 1>&6
12474  if test $ol_cv_mdbm = yes ; then
12475         cat >> confdefs.h <<\EOF
12476 #define HAVE_MDBM 1
12477 EOF
12478
12479  fi
12480
12481
12482         if test $ol_cv_mdbm = yes ; then
12483                 ol_link_ldbm=mdbm
12484                 ol_with_ldbm_api=mdbm
12485                 if test $ol_cv_lib_mdbm != yes ; then
12486                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12487                 fi
12488         fi
12489 fi
12490
12491 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12492         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12493 echo "configure:12494: checking for GDBM library" >&5
12494 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12495   echo $ac_n "(cached) $ac_c" 1>&6
12496 else
12497         ol_LIBS="$LIBS"
12498         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12499 echo "configure:12500: checking for gdbm_open" >&5
12500 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12501   echo $ac_n "(cached) $ac_c" 1>&6
12502 else
12503   cat > conftest.$ac_ext <<EOF
12504 #line 12505 "configure"
12505 #include "confdefs.h"
12506 /* System header to define __stub macros and hopefully few prototypes,
12507     which can conflict with char gdbm_open(); below.  */
12508 #include <assert.h>
12509 /* Override any gcc2 internal prototype to avoid an error.  */
12510 /* We use char because int might match the return type of a gcc2
12511     builtin and then its argument prototype would still apply.  */
12512 char gdbm_open();
12513 char (*f)();
12514
12515 int main() {
12516
12517 /* The GNU C library defines this for functions which it implements
12518     to always fail with ENOSYS.  Some functions are actually named
12519     something starting with __ and the normal name is an alias.  */
12520 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12521 choke me
12522 #else
12523 f = gdbm_open;
12524 #endif
12525
12526 ; return 0; }
12527 EOF
12528 if { (eval echo configure:12529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12529   rm -rf conftest*
12530   eval "ac_cv_func_gdbm_open=yes"
12531 else
12532   echo "configure: failed program was:" >&5
12533   cat conftest.$ac_ext >&5
12534   rm -rf conftest*
12535   eval "ac_cv_func_gdbm_open=no"
12536 fi
12537 rm -f conftest*
12538 fi
12539
12540 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12541   echo "$ac_t""yes" 1>&6
12542   ol_cv_lib_gdbm=yes
12543 else
12544   echo "$ac_t""no" 1>&6
12545
12546                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12547 echo "configure:12548: checking for gdbm_open in -lgdbm" >&5
12548 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12549 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12550   echo $ac_n "(cached) $ac_c" 1>&6
12551 else
12552   ac_save_LIBS="$LIBS"
12553 LIBS="-lgdbm  $LIBS"
12554 cat > conftest.$ac_ext <<EOF
12555 #line 12556 "configure"
12556 #include "confdefs.h"
12557 /* Override any gcc2 internal prototype to avoid an error.  */
12558 /* We use char because int might match the return type of a gcc2
12559     builtin and then its argument prototype would still apply.  */
12560 char gdbm_open();
12561
12562 int main() {
12563 gdbm_open()
12564 ; return 0; }
12565 EOF
12566 if { (eval echo configure:12567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12567   rm -rf conftest*
12568   eval "ac_cv_lib_$ac_lib_var=yes"
12569 else
12570   echo "configure: failed program was:" >&5
12571   cat conftest.$ac_ext >&5
12572   rm -rf conftest*
12573   eval "ac_cv_lib_$ac_lib_var=no"
12574 fi
12575 rm -f conftest*
12576 LIBS="$ac_save_LIBS"
12577
12578 fi
12579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12580   echo "$ac_t""yes" 1>&6
12581   ol_cv_lib_gdbm=-lgdbm
12582 else
12583   echo "$ac_t""no" 1>&6
12584 ol_cv_lib_gdbm=no
12585 fi
12586
12587         
12588 fi
12589
12590         LIBS="$ol_LIBS"
12591
12592 fi
12593
12594 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12595
12596
12597  for ac_hdr in gdbm.h
12598 do
12599 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12600 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12601 echo "configure:12602: checking for $ac_hdr" >&5
12602 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12603   echo $ac_n "(cached) $ac_c" 1>&6
12604 else
12605   cat > conftest.$ac_ext <<EOF
12606 #line 12607 "configure"
12607 #include "confdefs.h"
12608 #include <$ac_hdr>
12609 EOF
12610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12611 { (eval echo configure:12612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12613 if test -z "$ac_err"; then
12614   rm -rf conftest*
12615   eval "ac_cv_header_$ac_safe=yes"
12616 else
12617   echo "$ac_err" >&5
12618   echo "configure: failed program was:" >&5
12619   cat conftest.$ac_ext >&5
12620   rm -rf conftest*
12621   eval "ac_cv_header_$ac_safe=no"
12622 fi
12623 rm -f conftest*
12624 fi
12625 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12626   echo "$ac_t""yes" 1>&6
12627     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12628   cat >> confdefs.h <<EOF
12629 #define $ac_tr_hdr 1
12630 EOF
12631  
12632 else
12633   echo "$ac_t""no" 1>&6
12634 fi
12635 done
12636
12637  echo $ac_n "checking for db""... $ac_c" 1>&6
12638 echo "configure:12639: checking for db" >&5
12639 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12640   echo $ac_n "(cached) $ac_c" 1>&6
12641 else
12642   
12643         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12644                 ol_cv_gdbm=no
12645         else
12646                 ol_cv_gdbm=yes
12647         fi
12648
12649 fi
12650
12651 echo "$ac_t""$ol_cv_gdbm" 1>&6
12652  if test $ol_cv_gdbm = yes ; then
12653         cat >> confdefs.h <<\EOF
12654 #define HAVE_GDBM 1
12655 EOF
12656
12657  fi
12658
12659
12660         if test $ol_cv_gdbm = yes ; then
12661                 ol_link_ldbm=gdbm
12662                 ol_with_ldbm_api=gdbm
12663
12664                 if test $ol_cv_lib_gdbm != yes ; then
12665                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12666                 fi
12667         fi
12668 fi
12669
12670 if test $ol_with_ldbm_api = ndbm ; then
12671         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12672 echo "configure:12673: checking for NDBM library" >&5
12673 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12674   echo $ac_n "(cached) $ac_c" 1>&6
12675 else
12676         ol_LIBS="$LIBS"
12677         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12678 echo "configure:12679: checking for dbm_open" >&5
12679 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12680   echo $ac_n "(cached) $ac_c" 1>&6
12681 else
12682   cat > conftest.$ac_ext <<EOF
12683 #line 12684 "configure"
12684 #include "confdefs.h"
12685 /* System header to define __stub macros and hopefully few prototypes,
12686     which can conflict with char dbm_open(); below.  */
12687 #include <assert.h>
12688 /* Override any gcc2 internal prototype to avoid an error.  */
12689 /* We use char because int might match the return type of a gcc2
12690     builtin and then its argument prototype would still apply.  */
12691 char dbm_open();
12692 char (*f)();
12693
12694 int main() {
12695
12696 /* The GNU C library defines this for functions which it implements
12697     to always fail with ENOSYS.  Some functions are actually named
12698     something starting with __ and the normal name is an alias.  */
12699 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12700 choke me
12701 #else
12702 f = dbm_open;
12703 #endif
12704
12705 ; return 0; }
12706 EOF
12707 if { (eval echo configure:12708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12708   rm -rf conftest*
12709   eval "ac_cv_func_dbm_open=yes"
12710 else
12711   echo "configure: failed program was:" >&5
12712   cat conftest.$ac_ext >&5
12713   rm -rf conftest*
12714   eval "ac_cv_func_dbm_open=no"
12715 fi
12716 rm -f conftest*
12717 fi
12718
12719 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12720   echo "$ac_t""yes" 1>&6
12721   ol_cv_lib_ndbm=yes
12722 else
12723   echo "$ac_t""no" 1>&6
12724
12725                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12726 echo "configure:12727: checking for dbm_open in -lndbm" >&5
12727 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12728 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12729   echo $ac_n "(cached) $ac_c" 1>&6
12730 else
12731   ac_save_LIBS="$LIBS"
12732 LIBS="-lndbm  $LIBS"
12733 cat > conftest.$ac_ext <<EOF
12734 #line 12735 "configure"
12735 #include "confdefs.h"
12736 /* Override any gcc2 internal prototype to avoid an error.  */
12737 /* We use char because int might match the return type of a gcc2
12738     builtin and then its argument prototype would still apply.  */
12739 char dbm_open();
12740
12741 int main() {
12742 dbm_open()
12743 ; return 0; }
12744 EOF
12745 if { (eval echo configure:12746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12746   rm -rf conftest*
12747   eval "ac_cv_lib_$ac_lib_var=yes"
12748 else
12749   echo "configure: failed program was:" >&5
12750   cat conftest.$ac_ext >&5
12751   rm -rf conftest*
12752   eval "ac_cv_lib_$ac_lib_var=no"
12753 fi
12754 rm -f conftest*
12755 LIBS="$ac_save_LIBS"
12756
12757 fi
12758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12759   echo "$ac_t""yes" 1>&6
12760   ol_cv_lib_ndbm=-lndbm
12761 else
12762   echo "$ac_t""no" 1>&6
12763
12764                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12765 echo "configure:12766: checking for dbm_open in -ldbm" >&5
12766 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12767 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12768   echo $ac_n "(cached) $ac_c" 1>&6
12769 else
12770   ac_save_LIBS="$LIBS"
12771 LIBS="-ldbm  $LIBS"
12772 cat > conftest.$ac_ext <<EOF
12773 #line 12774 "configure"
12774 #include "confdefs.h"
12775 /* Override any gcc2 internal prototype to avoid an error.  */
12776 /* We use char because int might match the return type of a gcc2
12777     builtin and then its argument prototype would still apply.  */
12778 char dbm_open();
12779
12780 int main() {
12781 dbm_open()
12782 ; return 0; }
12783 EOF
12784 if { (eval echo configure:12785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12785   rm -rf conftest*
12786   eval "ac_cv_lib_$ac_lib_var=yes"
12787 else
12788   echo "configure: failed program was:" >&5
12789   cat conftest.$ac_ext >&5
12790   rm -rf conftest*
12791   eval "ac_cv_lib_$ac_lib_var=no"
12792 fi
12793 rm -f conftest*
12794 LIBS="$ac_save_LIBS"
12795
12796 fi
12797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12798   echo "$ac_t""yes" 1>&6
12799   ol_cv_lib_ndbm=-ldbm
12800 else
12801   echo "$ac_t""no" 1>&6
12802 ol_cv_lib_ndbm=no
12803 fi
12804                 
12805 fi
12806
12807         
12808 fi
12809
12810         LIBS="$ol_LIBS"
12811
12812 fi
12813
12814 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12815
12816
12817  for ac_hdr in ndbm.h
12818 do
12819 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12820 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12821 echo "configure:12822: checking for $ac_hdr" >&5
12822 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12823   echo $ac_n "(cached) $ac_c" 1>&6
12824 else
12825   cat > conftest.$ac_ext <<EOF
12826 #line 12827 "configure"
12827 #include "confdefs.h"
12828 #include <$ac_hdr>
12829 EOF
12830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12831 { (eval echo configure:12832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12833 if test -z "$ac_err"; then
12834   rm -rf conftest*
12835   eval "ac_cv_header_$ac_safe=yes"
12836 else
12837   echo "$ac_err" >&5
12838   echo "configure: failed program was:" >&5
12839   cat conftest.$ac_ext >&5
12840   rm -rf conftest*
12841   eval "ac_cv_header_$ac_safe=no"
12842 fi
12843 rm -f conftest*
12844 fi
12845 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12846   echo "$ac_t""yes" 1>&6
12847     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12848   cat >> confdefs.h <<EOF
12849 #define $ac_tr_hdr 1
12850 EOF
12851  
12852 else
12853   echo "$ac_t""no" 1>&6
12854 fi
12855 done
12856
12857  echo $ac_n "checking for db""... $ac_c" 1>&6
12858 echo "configure:12859: checking for db" >&5
12859 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12860   echo $ac_n "(cached) $ac_c" 1>&6
12861 else
12862   
12863         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12864                 ol_cv_ndbm=no
12865         else
12866                 ol_cv_ndbm=yes
12867         fi
12868
12869 fi
12870
12871 echo "$ac_t""$ol_cv_ndbm" 1>&6
12872  if test $ol_cv_ndbm = yes ; then
12873         cat >> confdefs.h <<\EOF
12874 #define HAVE_NDBM 1
12875 EOF
12876
12877  fi
12878
12879
12880         if test $ol_cv_ndbm = yes ; then
12881                 ol_link_ldbm=ndbm
12882                 ol_with_ldbm_api=ndbm
12883
12884                 if test $ol_cv_lib_ndbm != yes ; then
12885                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12886                 fi
12887         fi
12888 fi
12889
12890 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12891         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12892         if test $ol_enable_ldbm = yes ; then
12893                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12894         fi
12895
12896         echo "configure: warning: disabling LDBM" 1>&2
12897         ol_enable_ldbm=no
12898 fi
12899
12900 ol_link_bdb2=no
12901 if test $ol_enable_bdb2 != no ; then
12902         if test $ol_enable_bdb2 = yes -a $ol_link_ldbm != berkeley ; then
12903                 { echo "configure: error: BDB2 requires LDBM BerkeleyDB 2" 1>&2; exit 1; }
12904         elif test $ol_link_ldbm = berkeley ; then
12905                 ol_link_bdb2=$ol_link_ldbm
12906         fi
12907 fi
12908
12909 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12910         LINK_BINS_DYNAMIC="yes"
12911 else
12912         LINK_BINS_DYNAMIC="no"
12913 fi
12914
12915 if test $ol_enable_wrappers != no ; then
12916         for ac_hdr in tcpd.h
12917 do
12918 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12919 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12920 echo "configure:12921: checking for $ac_hdr" >&5
12921 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12922   echo $ac_n "(cached) $ac_c" 1>&6
12923 else
12924   cat > conftest.$ac_ext <<EOF
12925 #line 12926 "configure"
12926 #include "confdefs.h"
12927 #include <$ac_hdr>
12928 EOF
12929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12930 { (eval echo configure:12931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12931 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12932 if test -z "$ac_err"; then
12933   rm -rf conftest*
12934   eval "ac_cv_header_$ac_safe=yes"
12935 else
12936   echo "$ac_err" >&5
12937   echo "configure: failed program was:" >&5
12938   cat conftest.$ac_ext >&5
12939   rm -rf conftest*
12940   eval "ac_cv_header_$ac_safe=no"
12941 fi
12942 rm -f conftest*
12943 fi
12944 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12945   echo "$ac_t""yes" 1>&6
12946     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12947   cat >> confdefs.h <<EOF
12948 #define $ac_tr_hdr 1
12949 EOF
12950  
12951 else
12952   echo "$ac_t""no" 1>&6
12953 fi
12954 done
12955
12956
12957         if test $ac_cv_header_tcpd_h != yes ; then
12958                 have_wrappers=no
12959         else
12960                 cat > conftest.$ac_ext <<EOF
12961 #line 12962 "configure"
12962 #include "confdefs.h"
12963
12964 int allow_severity = 0;
12965 int deny_severity  = 0;
12966                 
12967 int main() {
12968 hosts_access()
12969 ; return 0; }
12970 EOF
12971 if { (eval echo configure:12972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12972   rm -rf conftest*
12973   have_wrappers=yes
12974 else
12975   echo "configure: failed program was:" >&5
12976   cat conftest.$ac_ext >&5
12977   rm -rf conftest*
12978   have_wrappers=no
12979 fi
12980 rm -f conftest*
12981         fi
12982
12983         if test $have_wrappers = yes ; then
12984                 cat >> confdefs.h <<\EOF
12985 #define HAVE_TCPD 1
12986 EOF
12987
12988                 WRAP_LIBS="-lwrap"
12989
12990                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12991 echo "configure:12992: checking for main in -lnsl" >&5
12992 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12993 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12994   echo $ac_n "(cached) $ac_c" 1>&6
12995 else
12996   ac_save_LIBS="$LIBS"
12997 LIBS="-lnsl  $LIBS"
12998 cat > conftest.$ac_ext <<EOF
12999 #line 13000 "configure"
13000 #include "confdefs.h"
13001
13002 int main() {
13003 main()
13004 ; return 0; }
13005 EOF
13006 if { (eval echo configure:13007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13007   rm -rf conftest*
13008   eval "ac_cv_lib_$ac_lib_var=yes"
13009 else
13010   echo "configure: failed program was:" >&5
13011   cat conftest.$ac_ext >&5
13012   rm -rf conftest*
13013   eval "ac_cv_lib_$ac_lib_var=no"
13014 fi
13015 rm -f conftest*
13016 LIBS="$ac_save_LIBS"
13017
13018 fi
13019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13020   echo "$ac_t""yes" 1>&6
13021     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13022     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13023   cat >> confdefs.h <<EOF
13024 #define $ac_tr_lib 1
13025 EOF
13026
13027   LIBS="-lnsl $LIBS"
13028
13029 else
13030   echo "$ac_t""no" 1>&6
13031 fi
13032
13033         else
13034                 echo "configure: warning: could not find -lwrap" 1>&2
13035                 if test $ol_enable_wrappers = yes ; then
13036                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13037                 fi
13038
13039                 echo "configure: warning: disabling wrappers support" 1>&2
13040                 ol_enable_wrappers=no
13041                 WRAP_LIBS=""
13042         fi
13043 fi
13044
13045 if test $ol_enable_syslog != no ; then
13046         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13047 echo "configure:13048: checking for openlog" >&5
13048 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13049   echo $ac_n "(cached) $ac_c" 1>&6
13050 else
13051   cat > conftest.$ac_ext <<EOF
13052 #line 13053 "configure"
13053 #include "confdefs.h"
13054 /* System header to define __stub macros and hopefully few prototypes,
13055     which can conflict with char openlog(); below.  */
13056 #include <assert.h>
13057 /* Override any gcc2 internal prototype to avoid an error.  */
13058 /* We use char because int might match the return type of a gcc2
13059     builtin and then its argument prototype would still apply.  */
13060 char openlog();
13061 char (*f)();
13062
13063 int main() {
13064
13065 /* The GNU C library defines this for functions which it implements
13066     to always fail with ENOSYS.  Some functions are actually named
13067     something starting with __ and the normal name is an alias.  */
13068 #if defined (__stub_openlog) || defined (__stub___openlog)
13069 choke me
13070 #else
13071 f = openlog;
13072 #endif
13073
13074 ; return 0; }
13075 EOF
13076 if { (eval echo configure:13077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13077   rm -rf conftest*
13078   eval "ac_cv_func_openlog=yes"
13079 else
13080   echo "configure: failed program was:" >&5
13081   cat conftest.$ac_ext >&5
13082   rm -rf conftest*
13083   eval "ac_cv_func_openlog=no"
13084 fi
13085 rm -f conftest*
13086 fi
13087
13088 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13089   echo "$ac_t""yes" 1>&6
13090   :
13091 else
13092   echo "$ac_t""no" 1>&6
13093 fi
13094
13095         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13096                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13097         fi
13098         ol_enable_syslog=$ac_cv_func_openlog
13099 fi
13100
13101 if test $ol_enable_tcl != no ; then
13102         for ac_hdr in tcl.h
13103 do
13104 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13105 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13106 echo "configure:13107: checking for $ac_hdr" >&5
13107 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13108   echo $ac_n "(cached) $ac_c" 1>&6
13109 else
13110   cat > conftest.$ac_ext <<EOF
13111 #line 13112 "configure"
13112 #include "confdefs.h"
13113 #include <$ac_hdr>
13114 EOF
13115 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13116 { (eval echo configure:13117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13117 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13118 if test -z "$ac_err"; then
13119   rm -rf conftest*
13120   eval "ac_cv_header_$ac_safe=yes"
13121 else
13122   echo "$ac_err" >&5
13123   echo "configure: failed program was:" >&5
13124   cat conftest.$ac_ext >&5
13125   rm -rf conftest*
13126   eval "ac_cv_header_$ac_safe=no"
13127 fi
13128 rm -f conftest*
13129 fi
13130 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13131   echo "$ac_t""yes" 1>&6
13132     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13133   cat >> confdefs.h <<EOF
13134 #define $ac_tr_hdr 1
13135 EOF
13136  
13137 else
13138   echo "$ac_t""no" 1>&6
13139 fi
13140 done
13141
13142
13143         if test $ac_cv_header_tcl_h != yes ; then
13144                 have_tcl=no
13145         else
13146                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13147                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13148 echo "configure:13149: checking for main in -l$lib" >&5
13149 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13151   echo $ac_n "(cached) $ac_c" 1>&6
13152 else
13153   ac_save_LIBS="$LIBS"
13154 LIBS="-l$lib  $LIBS"
13155 cat > conftest.$ac_ext <<EOF
13156 #line 13157 "configure"
13157 #include "confdefs.h"
13158
13159 int main() {
13160 main()
13161 ; return 0; }
13162 EOF
13163 if { (eval echo configure:13164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13164   rm -rf conftest*
13165   eval "ac_cv_lib_$ac_lib_var=yes"
13166 else
13167   echo "configure: failed program was:" >&5
13168   cat conftest.$ac_ext >&5
13169   rm -rf conftest*
13170   eval "ac_cv_lib_$ac_lib_var=no"
13171 fi
13172 rm -f conftest*
13173 LIBS="$ac_save_LIBS"
13174
13175 fi
13176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13177   echo "$ac_t""yes" 1>&6
13178   have_tcl=yes
13179                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13180                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13181                            else
13182                                MOD_TCL_LIB="-l${lib}"
13183                            fi;break
13184 else
13185   echo "$ac_t""no" 1>&6
13186 have_tcl=no
13187 fi
13188
13189                 done
13190         fi
13191
13192         if test $have_tcl != yes ; then
13193                 echo "configure: warning: could not find -ltcl" 1>&2
13194                 if test $ol_enable_tcl = yes ; then
13195                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13196                 fi
13197
13198                 ol_enable_tcl=no
13199         fi
13200 fi
13201
13202 ol_link_termcap=no
13203 for ac_hdr in termcap.h ncurses.h
13204 do
13205 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13206 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13207 echo "configure:13208: checking for $ac_hdr" >&5
13208 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13209   echo $ac_n "(cached) $ac_c" 1>&6
13210 else
13211   cat > conftest.$ac_ext <<EOF
13212 #line 13213 "configure"
13213 #include "confdefs.h"
13214 #include <$ac_hdr>
13215 EOF
13216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13217 { (eval echo configure:13218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13219 if test -z "$ac_err"; then
13220   rm -rf conftest*
13221   eval "ac_cv_header_$ac_safe=yes"
13222 else
13223   echo "$ac_err" >&5
13224   echo "configure: failed program was:" >&5
13225   cat conftest.$ac_ext >&5
13226   rm -rf conftest*
13227   eval "ac_cv_header_$ac_safe=no"
13228 fi
13229 rm -f conftest*
13230 fi
13231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13232   echo "$ac_t""yes" 1>&6
13233     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13234   cat >> confdefs.h <<EOF
13235 #define $ac_tr_hdr 1
13236 EOF
13237  
13238 else
13239   echo "$ac_t""no" 1>&6
13240 fi
13241 done
13242
13243
13244 if test $ol_link_termcap = no ; then
13245         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13246 echo "configure:13247: checking for tputs in -ltermcap" >&5
13247 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13248 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13249   echo $ac_n "(cached) $ac_c" 1>&6
13250 else
13251   ac_save_LIBS="$LIBS"
13252 LIBS="-ltermcap  $LIBS"
13253 cat > conftest.$ac_ext <<EOF
13254 #line 13255 "configure"
13255 #include "confdefs.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 tputs();
13260
13261 int main() {
13262 tputs()
13263 ; return 0; }
13264 EOF
13265 if { (eval echo configure:13266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13266   rm -rf conftest*
13267   eval "ac_cv_lib_$ac_lib_var=yes"
13268 else
13269   echo "configure: failed program was:" >&5
13270   cat conftest.$ac_ext >&5
13271   rm -rf conftest*
13272   eval "ac_cv_lib_$ac_lib_var=no"
13273 fi
13274 rm -f conftest*
13275 LIBS="$ac_save_LIBS"
13276
13277 fi
13278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13279   echo "$ac_t""yes" 1>&6
13280   have_termcap=yes
13281 else
13282   echo "$ac_t""no" 1>&6
13283 have_termcap=no
13284 fi
13285
13286         if test $have_termcap = yes ; then
13287                 cat >> confdefs.h <<\EOF
13288 #define HAVE_TERMCAP 1
13289 EOF
13290
13291                 ol_link_termcap=yes
13292                 TERMCAP_LIBS=-ltermcap
13293         fi
13294 fi
13295
13296 if test $ol_link_termcap = no ; then
13297         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13298 echo "configure:13299: checking for initscr in -lncurses" >&5
13299 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13300 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13301   echo $ac_n "(cached) $ac_c" 1>&6
13302 else
13303   ac_save_LIBS="$LIBS"
13304 LIBS="-lncurses  $LIBS"
13305 cat > conftest.$ac_ext <<EOF
13306 #line 13307 "configure"
13307 #include "confdefs.h"
13308 /* Override any gcc2 internal prototype to avoid an error.  */
13309 /* We use char because int might match the return type of a gcc2
13310     builtin and then its argument prototype would still apply.  */
13311 char initscr();
13312
13313 int main() {
13314 initscr()
13315 ; return 0; }
13316 EOF
13317 if { (eval echo configure:13318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13318   rm -rf conftest*
13319   eval "ac_cv_lib_$ac_lib_var=yes"
13320 else
13321   echo "configure: failed program was:" >&5
13322   cat conftest.$ac_ext >&5
13323   rm -rf conftest*
13324   eval "ac_cv_lib_$ac_lib_var=no"
13325 fi
13326 rm -f conftest*
13327 LIBS="$ac_save_LIBS"
13328
13329 fi
13330 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13331   echo "$ac_t""yes" 1>&6
13332   have_ncurses=yes
13333 else
13334   echo "$ac_t""no" 1>&6
13335 have_ncurses=no
13336 fi
13337
13338         if test $have_ncurses = yes ; then
13339                 cat >> confdefs.h <<\EOF
13340 #define HAVE_NCURSES 1
13341 EOF
13342
13343                 ol_link_termcap=yes
13344                 TERMCAP_LIBS=-lncurses
13345         fi
13346 fi
13347
13348 if test $ol_link_termcap = no ; then
13349         cat >> confdefs.h <<\EOF
13350 #define NO_TERMCAP 1
13351 EOF
13352
13353         TERMCAP_LIBS=
13354 fi
13355
13356 ol_link_sasl=no
13357 ol_link_spasswd=no
13358 if test $ol_with_cyrus_sasl != no ; then
13359         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13360 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13361 echo "configure:13362: checking for sasl.h" >&5
13362 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13363   echo $ac_n "(cached) $ac_c" 1>&6
13364 else
13365   cat > conftest.$ac_ext <<EOF
13366 #line 13367 "configure"
13367 #include "confdefs.h"
13368 #include <sasl.h>
13369 EOF
13370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13371 { (eval echo configure:13372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13373 if test -z "$ac_err"; then
13374   rm -rf conftest*
13375   eval "ac_cv_header_$ac_safe=yes"
13376 else
13377   echo "$ac_err" >&5
13378   echo "configure: failed program was:" >&5
13379   cat conftest.$ac_ext >&5
13380   rm -rf conftest*
13381   eval "ac_cv_header_$ac_safe=no"
13382 fi
13383 rm -f conftest*
13384 fi
13385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13386   echo "$ac_t""yes" 1>&6
13387   :
13388 else
13389   echo "$ac_t""no" 1>&6
13390 fi
13391
13392
13393         if test $ac_cv_header_sasl_h = yes ; then
13394                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13395 echo "configure:13396: checking for sasl_client_init in -lsasl" >&5
13396 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13397 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13398   echo $ac_n "(cached) $ac_c" 1>&6
13399 else
13400   ac_save_LIBS="$LIBS"
13401 LIBS="-lsasl  $LIBS"
13402 cat > conftest.$ac_ext <<EOF
13403 #line 13404 "configure"
13404 #include "confdefs.h"
13405 /* Override any gcc2 internal prototype to avoid an error.  */
13406 /* We use char because int might match the return type of a gcc2
13407     builtin and then its argument prototype would still apply.  */
13408 char sasl_client_init();
13409
13410 int main() {
13411 sasl_client_init()
13412 ; return 0; }
13413 EOF
13414 if { (eval echo configure:13415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13415   rm -rf conftest*
13416   eval "ac_cv_lib_$ac_lib_var=yes"
13417 else
13418   echo "configure: failed program was:" >&5
13419   cat conftest.$ac_ext >&5
13420   rm -rf conftest*
13421   eval "ac_cv_lib_$ac_lib_var=no"
13422 fi
13423 rm -f conftest*
13424 LIBS="$ac_save_LIBS"
13425
13426 fi
13427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13428   echo "$ac_t""yes" 1>&6
13429   have_cyrus_sasl=yes
13430 else
13431   echo "$ac_t""no" 1>&6
13432 have_cyrus_sasl=no
13433 fi
13434
13435
13436                 if test $have_cyrus_sasl != no ; then
13437                         SASL_LIBS="-lsasl"
13438                         cat >> confdefs.h <<\EOF
13439 #define HAVE_CYRUS_SASL 1
13440 EOF
13441
13442                         ol_link_sasl=yes
13443                 fi
13444         fi
13445
13446         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13447                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13448         fi
13449 fi
13450
13451 if test $cross_compiling != yes ; then
13452         dev=no
13453         if test -r /dev/urandom ; then
13454                 dev="/dev/urandom";
13455         elif test -r /idev/urandom ; then
13456                 dev="/idev/urandom";
13457         elif test -r /dev/srandom ; then
13458                 dev="/dev/srandom";
13459         elif test -r /dev/random ; then
13460                 dev="/dev/random";
13461         elif test -r /idev/random ; then
13462                 dev="/idev/random";
13463         fi
13464
13465         if test $dev != no ; then
13466                 cat >> confdefs.h <<EOF
13467 #define URANDOM_DEVICE "$dev"
13468 EOF
13469
13470         fi
13471 fi
13472
13473 ol_link_fetch=no
13474 if test $ol_with_fetch != no ; then
13475         ol_LIBS=$LIBS
13476 LIBS="-lfetch -lcom_err $LIBS"
13477 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13478 echo "configure:13479: checking fetch(3) library" >&5
13479 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13480   echo $ac_n "(cached) $ac_c" 1>&6
13481 else
13482   
13483         cat > conftest.$ac_ext <<EOF
13484 #line 13485 "configure"
13485 #include "confdefs.h"
13486
13487 #include <sys/param.h>
13488 #include <stdio.h>
13489 #include <fetch.h>
13490 int main() {
13491 struct url *u = fetchParseURL("file:///"); 
13492 ; return 0; }
13493 EOF
13494 if { (eval echo configure:13495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13495   rm -rf conftest*
13496   ol_cv_lib_fetch=yes
13497 else
13498   echo "configure: failed program was:" >&5
13499   cat conftest.$ac_ext >&5
13500   rm -rf conftest*
13501   ol_cv_lib_fetch=no
13502 fi
13503 rm -f conftest*
13504 fi
13505
13506 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13507 LIBS=$ol_LIBS
13508 if test $ol_cv_lib_fetch != no ; then
13509         ol_link_fetch="-lfetch -lcom_err"
13510         cat >> confdefs.h <<\EOF
13511 #define HAVE_FETCH 1
13512 EOF
13513
13514 fi
13515
13516
13517         if test $ol_cv_lib_fetch != no ; then
13518                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13519                 ol_link_fetch=freebsd
13520
13521         elif test $ol_with_fetch != auto ; then
13522                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13523         fi 
13524 fi
13525
13526 ol_link_readline=no
13527 if test $ol_with_readline != no ; then
13528         for ac_hdr in readline/readline.h readline/history.h
13529 do
13530 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13531 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13532 echo "configure:13533: checking for $ac_hdr" >&5
13533 if eval "test \"\${ac_cv_header_$ac_safe+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 <$ac_hdr>
13540 EOF
13541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13542 { (eval echo configure:13543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13544 if test -z "$ac_err"; then
13545   rm -rf conftest*
13546   eval "ac_cv_header_$ac_safe=yes"
13547 else
13548   echo "$ac_err" >&5
13549   echo "configure: failed program was:" >&5
13550   cat conftest.$ac_ext >&5
13551   rm -rf conftest*
13552   eval "ac_cv_header_$ac_safe=no"
13553 fi
13554 rm -f conftest*
13555 fi
13556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13557   echo "$ac_t""yes" 1>&6
13558     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13559   cat >> confdefs.h <<EOF
13560 #define $ac_tr_hdr 1
13561 EOF
13562  
13563 else
13564   echo "$ac_t""no" 1>&6
13565 fi
13566 done
13567
13568
13569         if test $ac_cv_header_readline_readline_h = yes ; then
13570                 save_LIBS="$LIBS"
13571                 LIBS="$TERMCAP_LIBS $LIBS"
13572                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13573 echo "configure:13574: checking for readline in -lreadline" >&5
13574 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13575 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13576   echo $ac_n "(cached) $ac_c" 1>&6
13577 else
13578   ac_save_LIBS="$LIBS"
13579 LIBS="-lreadline  $LIBS"
13580 cat > conftest.$ac_ext <<EOF
13581 #line 13582 "configure"
13582 #include "confdefs.h"
13583 /* Override any gcc2 internal prototype to avoid an error.  */
13584 /* We use char because int might match the return type of a gcc2
13585     builtin and then its argument prototype would still apply.  */
13586 char readline();
13587
13588 int main() {
13589 readline()
13590 ; return 0; }
13591 EOF
13592 if { (eval echo configure:13593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13593   rm -rf conftest*
13594   eval "ac_cv_lib_$ac_lib_var=yes"
13595 else
13596   echo "configure: failed program was:" >&5
13597   cat conftest.$ac_ext >&5
13598   rm -rf conftest*
13599   eval "ac_cv_lib_$ac_lib_var=no"
13600 fi
13601 rm -f conftest*
13602 LIBS="$ac_save_LIBS"
13603
13604 fi
13605 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13606   echo "$ac_t""yes" 1>&6
13607   have_readline=yes
13608 else
13609   echo "$ac_t""no" 1>&6
13610 have_readline=no
13611 fi
13612
13613                 LIBS="$save_LIBS"
13614                         
13615                 if test $have_readline = yes ; then
13616                         ol_with_readline=found
13617                         ol_link_readline=yes
13618
13619                         READLINE_LIBS="-lreadline"
13620                 fi
13621         fi
13622 fi
13623
13624 if test $ol_link_readline = yes ; then
13625         cat >> confdefs.h <<\EOF
13626 #define HAVE_READLINE 1
13627 EOF
13628
13629 fi
13630
13631
13632 if test $ol_enable_crypt != no ; then
13633         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13634 echo "configure:13635: checking for crypt" >&5
13635 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13636   echo $ac_n "(cached) $ac_c" 1>&6
13637 else
13638   cat > conftest.$ac_ext <<EOF
13639 #line 13640 "configure"
13640 #include "confdefs.h"
13641 /* System header to define __stub macros and hopefully few prototypes,
13642     which can conflict with char crypt(); below.  */
13643 #include <assert.h>
13644 /* Override any gcc2 internal prototype to avoid an error.  */
13645 /* We use char because int might match the return type of a gcc2
13646     builtin and then its argument prototype would still apply.  */
13647 char crypt();
13648 char (*f)();
13649
13650 int main() {
13651
13652 /* The GNU C library defines this for functions which it implements
13653     to always fail with ENOSYS.  Some functions are actually named
13654     something starting with __ and the normal name is an alias.  */
13655 #if defined (__stub_crypt) || defined (__stub___crypt)
13656 choke me
13657 #else
13658 f = crypt;
13659 #endif
13660
13661 ; return 0; }
13662 EOF
13663 if { (eval echo configure:13664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13664   rm -rf conftest*
13665   eval "ac_cv_func_crypt=yes"
13666 else
13667   echo "configure: failed program was:" >&5
13668   cat conftest.$ac_ext >&5
13669   rm -rf conftest*
13670   eval "ac_cv_func_crypt=no"
13671 fi
13672 rm -f conftest*
13673 fi
13674
13675 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13676   echo "$ac_t""yes" 1>&6
13677   have_crypt=yes
13678 else
13679   echo "$ac_t""no" 1>&6
13680
13681                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13682 echo "configure:13683: checking for crypt in -lcrypt" >&5
13683 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13684 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13685   echo $ac_n "(cached) $ac_c" 1>&6
13686 else
13687   ac_save_LIBS="$LIBS"
13688 LIBS="-lcrypt  $LIBS"
13689 cat > conftest.$ac_ext <<EOF
13690 #line 13691 "configure"
13691 #include "confdefs.h"
13692 /* Override any gcc2 internal prototype to avoid an error.  */
13693 /* We use char because int might match the return type of a gcc2
13694     builtin and then its argument prototype would still apply.  */
13695 char crypt();
13696
13697 int main() {
13698 crypt()
13699 ; return 0; }
13700 EOF
13701 if { (eval echo configure:13702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13702   rm -rf conftest*
13703   eval "ac_cv_lib_$ac_lib_var=yes"
13704 else
13705   echo "configure: failed program was:" >&5
13706   cat conftest.$ac_ext >&5
13707   rm -rf conftest*
13708   eval "ac_cv_lib_$ac_lib_var=no"
13709 fi
13710 rm -f conftest*
13711 LIBS="$ac_save_LIBS"
13712
13713 fi
13714 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13715   echo "$ac_t""yes" 1>&6
13716   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13717                         have_crypt=yes
13718 else
13719   echo "$ac_t""no" 1>&6
13720 have_crypt=no
13721 fi
13722
13723 fi
13724
13725
13726         if test $have_crypt = yes ; then
13727                 cat >> confdefs.h <<\EOF
13728 #define HAVE_CRYPT 1
13729 EOF
13730
13731         else
13732                 echo "configure: warning: could not find crypt" 1>&2
13733                 if test $ol_enable_crypt = yes ; then
13734                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13735                 fi
13736
13737                 echo "configure: warning: disabling crypt support" 1>&2
13738                 ol_enable_crypt=no
13739         fi
13740 fi
13741
13742 if test $ol_enable_proctitle != no ; then
13743         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13744 echo "configure:13745: checking for setproctitle" >&5
13745 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13746   echo $ac_n "(cached) $ac_c" 1>&6
13747 else
13748   cat > conftest.$ac_ext <<EOF
13749 #line 13750 "configure"
13750 #include "confdefs.h"
13751 /* System header to define __stub macros and hopefully few prototypes,
13752     which can conflict with char setproctitle(); below.  */
13753 #include <assert.h>
13754 /* Override any gcc2 internal prototype to avoid an error.  */
13755 /* We use char because int might match the return type of a gcc2
13756     builtin and then its argument prototype would still apply.  */
13757 char setproctitle();
13758 char (*f)();
13759
13760 int main() {
13761
13762 /* The GNU C library defines this for functions which it implements
13763     to always fail with ENOSYS.  Some functions are actually named
13764     something starting with __ and the normal name is an alias.  */
13765 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13766 choke me
13767 #else
13768 f = setproctitle;
13769 #endif
13770
13771 ; return 0; }
13772 EOF
13773 if { (eval echo configure:13774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13774   rm -rf conftest*
13775   eval "ac_cv_func_setproctitle=yes"
13776 else
13777   echo "configure: failed program was:" >&5
13778   cat conftest.$ac_ext >&5
13779   rm -rf conftest*
13780   eval "ac_cv_func_setproctitle=no"
13781 fi
13782 rm -f conftest*
13783 fi
13784
13785 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13786   echo "$ac_t""yes" 1>&6
13787   have_setproctitle=yes
13788 else
13789   echo "$ac_t""no" 1>&6
13790
13791                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13792 echo "configure:13793: checking for setproctitle in -lutil" >&5
13793 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13795   echo $ac_n "(cached) $ac_c" 1>&6
13796 else
13797   ac_save_LIBS="$LIBS"
13798 LIBS="-lutil  $LIBS"
13799 cat > conftest.$ac_ext <<EOF
13800 #line 13801 "configure"
13801 #include "confdefs.h"
13802 /* Override any gcc2 internal prototype to avoid an error.  */
13803 /* We use char because int might match the return type of a gcc2
13804     builtin and then its argument prototype would still apply.  */
13805 char setproctitle();
13806
13807 int main() {
13808 setproctitle()
13809 ; return 0; }
13810 EOF
13811 if { (eval echo configure:13812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13812   rm -rf conftest*
13813   eval "ac_cv_lib_$ac_lib_var=yes"
13814 else
13815   echo "configure: failed program was:" >&5
13816   cat conftest.$ac_ext >&5
13817   rm -rf conftest*
13818   eval "ac_cv_lib_$ac_lib_var=no"
13819 fi
13820 rm -f conftest*
13821 LIBS="$ac_save_LIBS"
13822
13823 fi
13824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13825   echo "$ac_t""yes" 1>&6
13826   have_setproctitle=yes
13827                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13828 else
13829   echo "$ac_t""no" 1>&6
13830 have_setproctitle=no
13831                         LIBOBJS="$LIBOBJS setproctitle.o"
13832                         LIBSRCS="$LIBSRCS setproctitle.c"
13833 fi
13834
13835 fi
13836
13837
13838         if test $have_setproctitle = yes ; then
13839                 cat >> confdefs.h <<\EOF
13840 #define HAVE_SETPROCTITLE 1
13841 EOF
13842
13843         fi
13844 fi
13845
13846 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13847 echo "configure:13848: checking for ANSI C header files" >&5
13848 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13849   echo $ac_n "(cached) $ac_c" 1>&6
13850 else
13851   cat > conftest.$ac_ext <<EOF
13852 #line 13853 "configure"
13853 #include "confdefs.h"
13854 #include <stdlib.h>
13855 #include <stdarg.h>
13856 #include <string.h>
13857 #include <float.h>
13858 EOF
13859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13860 { (eval echo configure:13861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13862 if test -z "$ac_err"; then
13863   rm -rf conftest*
13864   ac_cv_header_stdc=yes
13865 else
13866   echo "$ac_err" >&5
13867   echo "configure: failed program was:" >&5
13868   cat conftest.$ac_ext >&5
13869   rm -rf conftest*
13870   ac_cv_header_stdc=no
13871 fi
13872 rm -f conftest*
13873
13874 if test $ac_cv_header_stdc = yes; then
13875   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13876 cat > conftest.$ac_ext <<EOF
13877 #line 13878 "configure"
13878 #include "confdefs.h"
13879 #include <string.h>
13880 EOF
13881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13882   egrep "memchr" >/dev/null 2>&1; then
13883   :
13884 else
13885   rm -rf conftest*
13886   ac_cv_header_stdc=no
13887 fi
13888 rm -f conftest*
13889
13890 fi
13891
13892 if test $ac_cv_header_stdc = yes; then
13893   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13894 cat > conftest.$ac_ext <<EOF
13895 #line 13896 "configure"
13896 #include "confdefs.h"
13897 #include <stdlib.h>
13898 EOF
13899 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13900   egrep "free" >/dev/null 2>&1; then
13901   :
13902 else
13903   rm -rf conftest*
13904   ac_cv_header_stdc=no
13905 fi
13906 rm -f conftest*
13907
13908 fi
13909
13910 if test $ac_cv_header_stdc = yes; then
13911   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13912 if test "$cross_compiling" = yes; then
13913   :
13914 else
13915   cat > conftest.$ac_ext <<EOF
13916 #line 13917 "configure"
13917 #include "confdefs.h"
13918 #include <ctype.h>
13919 #if ((' ' & 0x0FF) == 0x020)
13920 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13921 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13922 #else
13923 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13924  || ('j' <= (c) && (c) <= 'r') \
13925  || ('s' <= (c) && (c) <= 'z'))
13926 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13927 #endif
13928 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13929 int main () { int i; for (i = 0; i < 256; i++)
13930 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13931 exit (0); }
13932
13933 EOF
13934 if { (eval echo configure:13935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13935 then
13936   :
13937 else
13938   echo "configure: failed program was:" >&5
13939   cat conftest.$ac_ext >&5
13940   rm -fr conftest*
13941   ac_cv_header_stdc=no
13942 fi
13943 rm -fr conftest*
13944 fi
13945
13946 fi
13947 fi
13948
13949 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13950 if test $ac_cv_header_stdc = yes; then
13951   cat >> confdefs.h <<\EOF
13952 #define STDC_HEADERS 1
13953 EOF
13954
13955 fi
13956
13957 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13958 echo "configure:13959: checking for mode_t" >&5
13959 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13960   echo $ac_n "(cached) $ac_c" 1>&6
13961 else
13962   cat > conftest.$ac_ext <<EOF
13963 #line 13964 "configure"
13964 #include "confdefs.h"
13965 #include <sys/types.h>
13966 #if STDC_HEADERS
13967 #include <stdlib.h>
13968 #include <stddef.h>
13969 #endif
13970
13971 EOF
13972 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13973   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13974   rm -rf conftest*
13975   eval "ac_cv_type_mode_t=yes"
13976 else
13977   rm -rf conftest*
13978   eval "ac_cv_type_mode_t=no"
13979 fi
13980 rm -f conftest*
13981
13982 fi
13983 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13984   echo "$ac_t""yes" 1>&6
13985 else
13986   echo "$ac_t""no" 1>&6
13987   cat >> confdefs.h <<EOF
13988 #define mode_t int
13989 EOF
13990
13991 fi
13992
13993 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13994 echo "configure:13995: checking for off_t" >&5
13995 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13996   echo $ac_n "(cached) $ac_c" 1>&6
13997 else
13998   cat > conftest.$ac_ext <<EOF
13999 #line 14000 "configure"
14000 #include "confdefs.h"
14001 #include <sys/types.h>
14002 #if STDC_HEADERS
14003 #include <stdlib.h>
14004 #include <stddef.h>
14005 #endif
14006
14007 EOF
14008 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14009   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14010   rm -rf conftest*
14011   eval "ac_cv_type_off_t=yes"
14012 else
14013   rm -rf conftest*
14014   eval "ac_cv_type_off_t=no"
14015 fi
14016 rm -f conftest*
14017
14018 fi
14019 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14020   echo "$ac_t""yes" 1>&6
14021 else
14022   echo "$ac_t""no" 1>&6
14023   cat >> confdefs.h <<EOF
14024 #define off_t long
14025 EOF
14026
14027 fi
14028
14029 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14030 echo "configure:14031: checking for pid_t" >&5
14031 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14032   echo $ac_n "(cached) $ac_c" 1>&6
14033 else
14034   cat > conftest.$ac_ext <<EOF
14035 #line 14036 "configure"
14036 #include "confdefs.h"
14037 #include <sys/types.h>
14038 #if STDC_HEADERS
14039 #include <stdlib.h>
14040 #include <stddef.h>
14041 #endif
14042
14043 EOF
14044 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14045   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14046   rm -rf conftest*
14047   eval "ac_cv_type_pid_t=yes"
14048 else
14049   rm -rf conftest*
14050   eval "ac_cv_type_pid_t=no"
14051 fi
14052 rm -f conftest*
14053
14054 fi
14055 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14056   echo "$ac_t""yes" 1>&6
14057 else
14058   echo "$ac_t""no" 1>&6
14059   cat >> confdefs.h <<EOF
14060 #define pid_t int
14061 EOF
14062
14063 fi
14064
14065 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14066 echo "configure:14067: checking for ptrdiff_t" >&5
14067 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14068   echo $ac_n "(cached) $ac_c" 1>&6
14069 else
14070   cat > conftest.$ac_ext <<EOF
14071 #line 14072 "configure"
14072 #include "confdefs.h"
14073 #include <stddef.h>
14074 int main() {
14075 ptrdiff_t p
14076 ; return 0; }
14077 EOF
14078 if { (eval echo configure:14079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14079   rm -rf conftest*
14080   am_cv_type_ptrdiff_t=yes
14081 else
14082   echo "configure: failed program was:" >&5
14083   cat conftest.$ac_ext >&5
14084   rm -rf conftest*
14085   am_cv_type_ptrdiff_t=no
14086 fi
14087 rm -f conftest*
14088 fi
14089
14090 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14091    if test $am_cv_type_ptrdiff_t = yes; then
14092      cat >> confdefs.h <<\EOF
14093 #define HAVE_PTRDIFF_T 1
14094 EOF
14095
14096    fi
14097
14098 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14099 echo "configure:14100: checking return type of signal handlers" >&5
14100 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14101   echo $ac_n "(cached) $ac_c" 1>&6
14102 else
14103   cat > conftest.$ac_ext <<EOF
14104 #line 14105 "configure"
14105 #include "confdefs.h"
14106 #include <sys/types.h>
14107 #include <signal.h>
14108 #ifdef signal
14109 #undef signal
14110 #endif
14111 #ifdef __cplusplus
14112 extern "C" void (*signal (int, void (*)(int)))(int);
14113 #else
14114 void (*signal ()) ();
14115 #endif
14116
14117 int main() {
14118 int i;
14119 ; return 0; }
14120 EOF
14121 if { (eval echo configure:14122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14122   rm -rf conftest*
14123   ac_cv_type_signal=void
14124 else
14125   echo "configure: failed program was:" >&5
14126   cat conftest.$ac_ext >&5
14127   rm -rf conftest*
14128   ac_cv_type_signal=int
14129 fi
14130 rm -f conftest*
14131 fi
14132
14133 echo "$ac_t""$ac_cv_type_signal" 1>&6
14134 cat >> confdefs.h <<EOF
14135 #define RETSIGTYPE $ac_cv_type_signal
14136 EOF
14137
14138
14139 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14140 echo "configure:14141: checking for size_t" >&5
14141 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14142   echo $ac_n "(cached) $ac_c" 1>&6
14143 else
14144   cat > conftest.$ac_ext <<EOF
14145 #line 14146 "configure"
14146 #include "confdefs.h"
14147 #include <sys/types.h>
14148 #if STDC_HEADERS
14149 #include <stdlib.h>
14150 #include <stddef.h>
14151 #endif
14152
14153 EOF
14154 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14155   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14156   rm -rf conftest*
14157   eval "ac_cv_type_size_t=yes"
14158 else
14159   rm -rf conftest*
14160   eval "ac_cv_type_size_t=no"
14161 fi
14162 rm -f conftest*
14163
14164 fi
14165 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14166   echo "$ac_t""yes" 1>&6
14167 else
14168   echo "$ac_t""no" 1>&6
14169   cat >> confdefs.h <<EOF
14170 #define size_t unsigned
14171 EOF
14172
14173 fi
14174
14175
14176 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14177 echo "configure:14178: checking for ssize_t" >&5
14178 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14179   echo $ac_n "(cached) $ac_c" 1>&6
14180 else
14181   cat > conftest.$ac_ext <<EOF
14182 #line 14183 "configure"
14183 #include "confdefs.h"
14184 #include <sys/types.h>
14185 #if STDC_HEADERS
14186 #include <stdlib.h>
14187 #include <stddef.h>
14188 #endif
14189
14190 EOF
14191 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14192   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14193   rm -rf conftest*
14194   eval "ac_cv_type_ssize_t=yes"
14195 else
14196   rm -rf conftest*
14197   eval "ac_cv_type_ssize_t=no"
14198 fi
14199 rm -f conftest*
14200
14201 fi
14202 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14203   echo "$ac_t""yes" 1>&6
14204 else
14205   echo "$ac_t""no" 1>&6
14206   cat >> confdefs.h <<EOF
14207 #define ssize_t signed int
14208 EOF
14209
14210 fi
14211
14212 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14213 echo "configure:14214: checking for caddr_t" >&5
14214 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14215   echo $ac_n "(cached) $ac_c" 1>&6
14216 else
14217   cat > conftest.$ac_ext <<EOF
14218 #line 14219 "configure"
14219 #include "confdefs.h"
14220 #include <sys/types.h>
14221 #if STDC_HEADERS
14222 #include <stdlib.h>
14223 #include <stddef.h>
14224 #endif
14225
14226 EOF
14227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14228   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14229   rm -rf conftest*
14230   eval "ac_cv_type_caddr_t=yes"
14231 else
14232   rm -rf conftest*
14233   eval "ac_cv_type_caddr_t=no"
14234 fi
14235 rm -f conftest*
14236
14237 fi
14238 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14239   echo "$ac_t""yes" 1>&6
14240 else
14241   echo "$ac_t""no" 1>&6
14242   cat >> confdefs.h <<EOF
14243 #define caddr_t char *
14244 EOF
14245
14246 fi
14247
14248
14249 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14250 echo "configure:14251: checking for socklen_t" >&5
14251 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14252   echo $ac_n "(cached) $ac_c" 1>&6
14253 else
14254   cat > conftest.$ac_ext <<EOF
14255 #line 14256 "configure"
14256 #include "confdefs.h"
14257
14258 #ifdef HAVE_SYS_TYPES_H
14259 #include <sys/types.h>
14260 #endif
14261 #ifdef HAVE_SYS_SOCKET_H
14262 #include <sys/socket.h>
14263 #endif
14264
14265 int main() {
14266 socklen_t len;
14267 ; return 0; }
14268 EOF
14269 if { (eval echo configure:14270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14270   rm -rf conftest*
14271   ol_cv_type_socklen_t=yes
14272 else
14273   echo "configure: failed program was:" >&5
14274   cat conftest.$ac_ext >&5
14275   rm -rf conftest*
14276   ol_cv_type_socklen_t=no
14277 fi
14278 rm -f conftest*
14279 fi
14280
14281 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14282   if test $ol_cv_type_socklen_t = no; then
14283     cat >> confdefs.h <<\EOF
14284 #define socklen_t int
14285 EOF
14286
14287   fi
14288  
14289 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14290 echo "configure:14291: checking for member st_blksize in aggregate type struct stat" >&5
14291 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14292   echo $ac_n "(cached) $ac_c" 1>&6
14293 else
14294   cat > conftest.$ac_ext <<EOF
14295 #line 14296 "configure"
14296 #include "confdefs.h"
14297 #include <sys/types.h>
14298 #include <sys/stat.h>
14299 int main() {
14300 struct stat foo; foo.st_blksize;
14301 ; return 0; }
14302 EOF
14303 if { (eval echo configure:14304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14304   rm -rf conftest*
14305   ac_cv_c_struct_member_st_blksize=yes
14306 else
14307   echo "configure: failed program was:" >&5
14308   cat conftest.$ac_ext >&5
14309   rm -rf conftest*
14310   ac_cv_c_struct_member_st_blksize=no
14311 fi
14312 rm -f conftest*
14313 fi
14314
14315 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14316 st_blksize="$ac_cv_c_struct_member_st_blksize"
14317 if test $ac_cv_c_struct_member_st_blksize = yes; then
14318   cat >> confdefs.h <<\EOF
14319 #define HAVE_ST_BLKSIZE 1
14320 EOF
14321
14322 fi
14323
14324 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14325 echo "configure:14326: checking whether time.h and sys/time.h may both be included" >&5
14326 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14327   echo $ac_n "(cached) $ac_c" 1>&6
14328 else
14329   cat > conftest.$ac_ext <<EOF
14330 #line 14331 "configure"
14331 #include "confdefs.h"
14332 #include <sys/types.h>
14333 #include <sys/time.h>
14334 #include <time.h>
14335 int main() {
14336 struct tm *tp;
14337 ; return 0; }
14338 EOF
14339 if { (eval echo configure:14340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14340   rm -rf conftest*
14341   ac_cv_header_time=yes
14342 else
14343   echo "configure: failed program was:" >&5
14344   cat conftest.$ac_ext >&5
14345   rm -rf conftest*
14346   ac_cv_header_time=no
14347 fi
14348 rm -f conftest*
14349 fi
14350
14351 echo "$ac_t""$ac_cv_header_time" 1>&6
14352 if test $ac_cv_header_time = yes; then
14353   cat >> confdefs.h <<\EOF
14354 #define TIME_WITH_SYS_TIME 1
14355 EOF
14356
14357 fi
14358
14359 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14360 echo "configure:14361: checking whether struct tm is in sys/time.h or time.h" >&5
14361 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14362   echo $ac_n "(cached) $ac_c" 1>&6
14363 else
14364   cat > conftest.$ac_ext <<EOF
14365 #line 14366 "configure"
14366 #include "confdefs.h"
14367 #include <sys/types.h>
14368 #include <time.h>
14369 int main() {
14370 struct tm *tp; tp->tm_sec;
14371 ; return 0; }
14372 EOF
14373 if { (eval echo configure:14374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14374   rm -rf conftest*
14375   ac_cv_struct_tm=time.h
14376 else
14377   echo "configure: failed program was:" >&5
14378   cat conftest.$ac_ext >&5
14379   rm -rf conftest*
14380   ac_cv_struct_tm=sys/time.h
14381 fi
14382 rm -f conftest*
14383 fi
14384
14385 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14386 if test $ac_cv_struct_tm = sys/time.h; then
14387   cat >> confdefs.h <<\EOF
14388 #define TM_IN_SYS_TIME 1
14389 EOF
14390
14391 fi
14392
14393 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14394 echo "configure:14395: checking for uid_t in sys/types.h" >&5
14395 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14396   echo $ac_n "(cached) $ac_c" 1>&6
14397 else
14398   cat > conftest.$ac_ext <<EOF
14399 #line 14400 "configure"
14400 #include "confdefs.h"
14401 #include <sys/types.h>
14402 EOF
14403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14404   egrep "uid_t" >/dev/null 2>&1; then
14405   rm -rf conftest*
14406   ac_cv_type_uid_t=yes
14407 else
14408   rm -rf conftest*
14409   ac_cv_type_uid_t=no
14410 fi
14411 rm -f conftest*
14412
14413 fi
14414
14415 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14416 if test $ac_cv_type_uid_t = no; then
14417   cat >> confdefs.h <<\EOF
14418 #define uid_t int
14419 EOF
14420
14421   cat >> confdefs.h <<\EOF
14422 #define gid_t int
14423 EOF
14424
14425 fi
14426
14427 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14428 echo "configure:14429: checking for sig_atomic_t" >&5
14429 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14430   echo $ac_n "(cached) $ac_c" 1>&6
14431 else
14432   cat > conftest.$ac_ext <<EOF
14433 #line 14434 "configure"
14434 #include "confdefs.h"
14435 #include <signal.h>
14436 int main() {
14437 sig_atomic_t atomic;
14438 ; return 0; }
14439 EOF
14440 if { (eval echo configure:14441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14441   rm -rf conftest*
14442   ol_cv_type_sig_atomic_t=yes
14443 else
14444   echo "configure: failed program was:" >&5
14445   cat conftest.$ac_ext >&5
14446   rm -rf conftest*
14447   ol_cv_type_sig_atomic_t=no
14448 fi
14449 rm -f conftest*
14450 fi
14451
14452 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14453   if test $ol_cv_type_sig_atomic_t = no; then
14454     cat >> confdefs.h <<\EOF
14455 #define sig_atomic_t int
14456 EOF
14457
14458   fi
14459  
14460
14461
14462 # test for pw_gecos in struct passwd
14463 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14464 echo "configure:14465: checking struct passwd for pw_gecos" >&5
14465 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14466   echo $ac_n "(cached) $ac_c" 1>&6
14467 else
14468   
14469         cat > conftest.$ac_ext <<EOF
14470 #line 14471 "configure"
14471 #include "confdefs.h"
14472 #include <pwd.h>
14473 int main() {
14474
14475         struct passwd pwd;
14476         pwd.pw_gecos = pwd.pw_name;
14477
14478 ; return 0; }
14479 EOF
14480 if { (eval echo configure:14481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14481   rm -rf conftest*
14482   ol_cv_struct_passwd_pw_gecos=yes
14483 else
14484   echo "configure: failed program was:" >&5
14485   cat conftest.$ac_ext >&5
14486   rm -rf conftest*
14487   ol_cv_struct_passwd_pw_gecos=no
14488 fi
14489 rm -f conftest*
14490 fi
14491
14492 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14493 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14494         cat >> confdefs.h <<\EOF
14495 #define HAVE_PW_GECOS 1
14496 EOF
14497
14498 fi
14499
14500 # test for pw_passwd in struct passwd
14501 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14502 echo "configure:14503: checking struct passwd for pw_passwd" >&5
14503 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14504   echo $ac_n "(cached) $ac_c" 1>&6
14505 else
14506   
14507         cat > conftest.$ac_ext <<EOF
14508 #line 14509 "configure"
14509 #include "confdefs.h"
14510 #include <pwd.h>
14511 int main() {
14512
14513         struct passwd pwd;
14514         pwd.pw_passwd = pwd.pw_name;
14515
14516 ; return 0; }
14517 EOF
14518 if { (eval echo configure:14519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14519   rm -rf conftest*
14520   ol_cv_struct_passwd_pw_passwd=yes
14521 else
14522   echo "configure: failed program was:" >&5
14523   cat conftest.$ac_ext >&5
14524   rm -rf conftest*
14525   ol_cv_struct_passwd_pw_passwd=no
14526 fi
14527 rm -f conftest*
14528 fi
14529
14530 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14531 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14532         cat >> confdefs.h <<\EOF
14533 #define HAVE_PW_PASSWD 1
14534 EOF
14535
14536 fi
14537
14538
14539 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14540 echo "configure:14541: checking if toupper() requires islower()" >&5
14541 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14542   echo $ac_n "(cached) $ac_c" 1>&6
14543 else
14544   
14545         if test "$cross_compiling" = yes; then
14546   ol_cv_c_upper_lower=safe
14547 else
14548   cat > conftest.$ac_ext <<EOF
14549 #line 14550 "configure"
14550 #include "confdefs.h"
14551
14552 #include <ctype.h>
14553 main()
14554 {
14555         if ('C' == toupper('C'))
14556                 exit(0);
14557         else
14558                 exit(1);
14559 }
14560 EOF
14561 if { (eval echo configure:14562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14562 then
14563   ol_cv_c_upper_lower=no
14564 else
14565   echo "configure: failed program was:" >&5
14566   cat conftest.$ac_ext >&5
14567   rm -fr conftest*
14568   ol_cv_c_upper_lower=yes
14569 fi
14570 rm -fr conftest*
14571 fi
14572
14573 fi
14574
14575 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14576 if test $ol_cv_c_upper_lower != no ; then
14577         cat >> confdefs.h <<\EOF
14578 #define C_UPPER_LOWER 1
14579 EOF
14580
14581 fi
14582
14583 echo $ac_n "checking for working const""... $ac_c" 1>&6
14584 echo "configure:14585: checking for working const" >&5
14585 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14586   echo $ac_n "(cached) $ac_c" 1>&6
14587 else
14588   cat > conftest.$ac_ext <<EOF
14589 #line 14590 "configure"
14590 #include "confdefs.h"
14591
14592 int main() {
14593
14594 /* Ultrix mips cc rejects this.  */
14595 typedef int charset[2]; const charset x;
14596 /* SunOS 4.1.1 cc rejects this.  */
14597 char const *const *ccp;
14598 char **p;
14599 /* NEC SVR4.0.2 mips cc rejects this.  */
14600 struct point {int x, y;};
14601 static struct point const zero = {0,0};
14602 /* AIX XL C 1.02.0.0 rejects this.
14603    It does not let you subtract one const X* pointer from another in an arm
14604    of an if-expression whose if-part is not a constant expression */
14605 const char *g = "string";
14606 ccp = &g + (g ? g-g : 0);
14607 /* HPUX 7.0 cc rejects these. */
14608 ++ccp;
14609 p = (char**) ccp;
14610 ccp = (char const *const *) p;
14611 { /* SCO 3.2v4 cc rejects this.  */
14612   char *t;
14613   char const *s = 0 ? (char *) 0 : (char const *) 0;
14614
14615   *t++ = 0;
14616 }
14617 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14618   int x[] = {25, 17};
14619   const int *foo = &x[0];
14620   ++foo;
14621 }
14622 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14623   typedef const int *iptr;
14624   iptr p = 0;
14625   ++p;
14626 }
14627 { /* AIX XL C 1.02.0.0 rejects this saying
14628      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14629   struct s { int j; const int *ap[3]; };
14630   struct s *b; b->j = 5;
14631 }
14632 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14633   const int foo = 10;
14634 }
14635
14636 ; return 0; }
14637 EOF
14638 if { (eval echo configure:14639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14639   rm -rf conftest*
14640   ac_cv_c_const=yes
14641 else
14642   echo "configure: failed program was:" >&5
14643   cat conftest.$ac_ext >&5
14644   rm -rf conftest*
14645   ac_cv_c_const=no
14646 fi
14647 rm -f conftest*
14648 fi
14649
14650 echo "$ac_t""$ac_cv_c_const" 1>&6
14651 if test $ac_cv_c_const = no; then
14652   cat >> confdefs.h <<\EOF
14653 #define const 
14654 EOF
14655
14656 fi
14657
14658 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14659 echo "configure:14660: checking if compiler understands volatile" >&5
14660 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14661   echo $ac_n "(cached) $ac_c" 1>&6
14662 else
14663   cat > conftest.$ac_ext <<EOF
14664 #line 14665 "configure"
14665 #include "confdefs.h"
14666 int x, y, z;
14667 int main() {
14668 volatile int a; int * volatile b = x ? &y : &z;
14669       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14670       *b = 0;
14671 ; return 0; }
14672 EOF
14673 if { (eval echo configure:14674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14674   rm -rf conftest*
14675   ol_cv_c_volatile=yes
14676 else
14677   echo "configure: failed program was:" >&5
14678   cat conftest.$ac_ext >&5
14679   rm -rf conftest*
14680   ol_cv_c_volatile=no
14681 fi
14682 rm -f conftest*
14683 fi
14684
14685 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14686   if test $ol_cv_c_volatile = yes; then
14687     : 
14688   else
14689     cat >> confdefs.h <<\EOF
14690 #define volatile 
14691 EOF
14692
14693   fi
14694  
14695
14696 if test $cross_compiling = yes ; then
14697         cat >> confdefs.h <<\EOF
14698 #define CROSS_COMPILING 1
14699 EOF
14700
14701 else
14702         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14703 echo "configure:14704: checking whether byte ordering is bigendian" >&5
14704 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14705   echo $ac_n "(cached) $ac_c" 1>&6
14706 else
14707   ac_cv_c_bigendian=unknown
14708 # See if sys/param.h defines the BYTE_ORDER macro.
14709 cat > conftest.$ac_ext <<EOF
14710 #line 14711 "configure"
14711 #include "confdefs.h"
14712 #include <sys/types.h>
14713 #include <sys/param.h>
14714 int main() {
14715
14716 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14717  bogus endian macros
14718 #endif
14719 ; return 0; }
14720 EOF
14721 if { (eval echo configure:14722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14722   rm -rf conftest*
14723   # It does; now see whether it defined to BIG_ENDIAN or not.
14724 cat > conftest.$ac_ext <<EOF
14725 #line 14726 "configure"
14726 #include "confdefs.h"
14727 #include <sys/types.h>
14728 #include <sys/param.h>
14729 int main() {
14730
14731 #if BYTE_ORDER != BIG_ENDIAN
14732  not big endian
14733 #endif
14734 ; return 0; }
14735 EOF
14736 if { (eval echo configure:14737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14737   rm -rf conftest*
14738   ac_cv_c_bigendian=yes
14739 else
14740   echo "configure: failed program was:" >&5
14741   cat conftest.$ac_ext >&5
14742   rm -rf conftest*
14743   ac_cv_c_bigendian=no
14744 fi
14745 rm -f conftest*
14746 else
14747   echo "configure: failed program was:" >&5
14748   cat conftest.$ac_ext >&5
14749 fi
14750 rm -f conftest*
14751 if test $ac_cv_c_bigendian = unknown; then
14752 if test "$cross_compiling" = yes; then
14753     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14754 else
14755   cat > conftest.$ac_ext <<EOF
14756 #line 14757 "configure"
14757 #include "confdefs.h"
14758 main () {
14759   /* Are we little or big endian?  From Harbison&Steele.  */
14760   union
14761   {
14762     long l;
14763     char c[sizeof (long)];
14764   } u;
14765   u.l = 1;
14766   exit (u.c[sizeof (long) - 1] == 1);
14767 }
14768 EOF
14769 if { (eval echo configure:14770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14770 then
14771   ac_cv_c_bigendian=no
14772 else
14773   echo "configure: failed program was:" >&5
14774   cat conftest.$ac_ext >&5
14775   rm -fr conftest*
14776   ac_cv_c_bigendian=yes
14777 fi
14778 rm -fr conftest*
14779 fi
14780
14781 fi
14782 fi
14783
14784 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14785 if test $ac_cv_c_bigendian = yes; then
14786   cat >> confdefs.h <<\EOF
14787 #define WORDS_BIGENDIAN 1
14788 EOF
14789
14790 fi
14791
14792 fi
14793
14794 echo $ac_n "checking size of short""... $ac_c" 1>&6
14795 echo "configure:14796: checking size of short" >&5 
14796 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14797   echo $ac_n "(cached) $ac_c" 1>&6
14798 else
14799   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14800   cat > conftest.$ac_ext <<EOF
14801 #line 14802 "configure"
14802 #include "confdefs.h"
14803 #include "confdefs.h" 
14804 #include <sys/types.h> 
14805  
14806
14807 int main() {
14808 switch (0) case 0: case (sizeof (short) == $ac_size):;
14809 ; return 0; }
14810 EOF
14811 if { (eval echo configure:14812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14812   rm -rf conftest*
14813   ac_cv_sizeof_short=$ac_size
14814 else
14815   echo "configure: failed program was:" >&5
14816   cat conftest.$ac_ext >&5
14817 fi
14818 rm -f conftest* 
14819   if test x$ac_cv_sizeof_short != x ; then break; fi 
14820 done 
14821
14822 fi
14823  
14824 if test x$ac_cv_sizeof_short = x ; then 
14825   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14826 fi 
14827 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14828 cat >> confdefs.h <<EOF
14829 #define SIZEOF_SHORT $ac_cv_sizeof_short
14830 EOF
14831  
14832  
14833 echo $ac_n "checking size of int""... $ac_c" 1>&6
14834 echo "configure:14835: checking size of int" >&5 
14835 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14836   echo $ac_n "(cached) $ac_c" 1>&6
14837 else
14838   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14839   cat > conftest.$ac_ext <<EOF
14840 #line 14841 "configure"
14841 #include "confdefs.h"
14842 #include "confdefs.h" 
14843 #include <sys/types.h> 
14844  
14845
14846 int main() {
14847 switch (0) case 0: case (sizeof (int) == $ac_size):;
14848 ; return 0; }
14849 EOF
14850 if { (eval echo configure:14851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14851   rm -rf conftest*
14852   ac_cv_sizeof_int=$ac_size
14853 else
14854   echo "configure: failed program was:" >&5
14855   cat conftest.$ac_ext >&5
14856 fi
14857 rm -f conftest* 
14858   if test x$ac_cv_sizeof_int != x ; then break; fi 
14859 done 
14860
14861 fi
14862  
14863 if test x$ac_cv_sizeof_int = x ; then 
14864   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14865 fi 
14866 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14867 cat >> confdefs.h <<EOF
14868 #define SIZEOF_INT $ac_cv_sizeof_int
14869 EOF
14870  
14871  
14872 echo $ac_n "checking size of long""... $ac_c" 1>&6
14873 echo "configure:14874: checking size of long" >&5 
14874 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14875   echo $ac_n "(cached) $ac_c" 1>&6
14876 else
14877   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14878   cat > conftest.$ac_ext <<EOF
14879 #line 14880 "configure"
14880 #include "confdefs.h"
14881 #include "confdefs.h" 
14882 #include <sys/types.h> 
14883  
14884
14885 int main() {
14886 switch (0) case 0: case (sizeof (long) == $ac_size):;
14887 ; return 0; }
14888 EOF
14889 if { (eval echo configure:14890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14890   rm -rf conftest*
14891   ac_cv_sizeof_long=$ac_size
14892 else
14893   echo "configure: failed program was:" >&5
14894   cat conftest.$ac_ext >&5
14895 fi
14896 rm -f conftest* 
14897   if test x$ac_cv_sizeof_long != x ; then break; fi 
14898 done 
14899
14900 fi
14901  
14902 if test x$ac_cv_sizeof_long = x ; then 
14903   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14904 fi 
14905 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14906 cat >> confdefs.h <<EOF
14907 #define SIZEOF_LONG $ac_cv_sizeof_long
14908 EOF
14909  
14910
14911
14912 if test "$ac_cv_sizeof_int" -lt 4 ; then
14913         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14914
14915         cat >> confdefs.h <<\EOF
14916 #define LBER_INT_T long
14917 EOF
14918
14919 else
14920         cat >> confdefs.h <<\EOF
14921 #define LBER_INT_T int
14922 EOF
14923
14924 fi
14925
14926 cat >> confdefs.h <<\EOF
14927 #define LBER_LEN_T long
14928 EOF
14929
14930 cat >> confdefs.h <<\EOF
14931 #define LBER_SOCKET_T int
14932 EOF
14933
14934 cat >> confdefs.h <<\EOF
14935 #define LBER_TAG_T long
14936 EOF
14937
14938
14939 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14940 echo "configure:14941: checking for 8-bit clean memcmp" >&5
14941 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14942   echo $ac_n "(cached) $ac_c" 1>&6
14943 else
14944   if test "$cross_compiling" = yes; then
14945   ac_cv_func_memcmp_clean=no
14946 else
14947   cat > conftest.$ac_ext <<EOF
14948 #line 14949 "configure"
14949 #include "confdefs.h"
14950
14951 main()
14952 {
14953   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14954   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14955 }
14956
14957 EOF
14958 if { (eval echo configure:14959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14959 then
14960   ac_cv_func_memcmp_clean=yes
14961 else
14962   echo "configure: failed program was:" >&5
14963   cat conftest.$ac_ext >&5
14964   rm -fr conftest*
14965   ac_cv_func_memcmp_clean=no
14966 fi
14967 rm -fr conftest*
14968 fi
14969
14970 fi
14971
14972 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14973 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14974
14975 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14976 echo "configure:14977: checking for strftime" >&5
14977 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14978   echo $ac_n "(cached) $ac_c" 1>&6
14979 else
14980   cat > conftest.$ac_ext <<EOF
14981 #line 14982 "configure"
14982 #include "confdefs.h"
14983 /* System header to define __stub macros and hopefully few prototypes,
14984     which can conflict with char strftime(); below.  */
14985 #include <assert.h>
14986 /* Override any gcc2 internal prototype to avoid an error.  */
14987 /* We use char because int might match the return type of a gcc2
14988     builtin and then its argument prototype would still apply.  */
14989 char strftime();
14990 char (*f)();
14991
14992 int main() {
14993
14994 /* The GNU C library defines this for functions which it implements
14995     to always fail with ENOSYS.  Some functions are actually named
14996     something starting with __ and the normal name is an alias.  */
14997 #if defined (__stub_strftime) || defined (__stub___strftime)
14998 choke me
14999 #else
15000 f = strftime;
15001 #endif
15002
15003 ; return 0; }
15004 EOF
15005 if { (eval echo configure:15006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15006   rm -rf conftest*
15007   eval "ac_cv_func_strftime=yes"
15008 else
15009   echo "configure: failed program was:" >&5
15010   cat conftest.$ac_ext >&5
15011   rm -rf conftest*
15012   eval "ac_cv_func_strftime=no"
15013 fi
15014 rm -f conftest*
15015 fi
15016
15017 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15018   echo "$ac_t""yes" 1>&6
15019   cat >> confdefs.h <<\EOF
15020 #define HAVE_STRFTIME 1
15021 EOF
15022
15023 else
15024   echo "$ac_t""no" 1>&6
15025 # strftime is in -lintl on SCO UNIX.
15026 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15027 echo "configure:15028: checking for strftime in -lintl" >&5
15028 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15029 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15030   echo $ac_n "(cached) $ac_c" 1>&6
15031 else
15032   ac_save_LIBS="$LIBS"
15033 LIBS="-lintl  $LIBS"
15034 cat > conftest.$ac_ext <<EOF
15035 #line 15036 "configure"
15036 #include "confdefs.h"
15037 /* Override any gcc2 internal prototype to avoid an error.  */
15038 /* We use char because int might match the return type of a gcc2
15039     builtin and then its argument prototype would still apply.  */
15040 char strftime();
15041
15042 int main() {
15043 strftime()
15044 ; return 0; }
15045 EOF
15046 if { (eval echo configure:15047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15047   rm -rf conftest*
15048   eval "ac_cv_lib_$ac_lib_var=yes"
15049 else
15050   echo "configure: failed program was:" >&5
15051   cat conftest.$ac_ext >&5
15052   rm -rf conftest*
15053   eval "ac_cv_lib_$ac_lib_var=no"
15054 fi
15055 rm -f conftest*
15056 LIBS="$ac_save_LIBS"
15057
15058 fi
15059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15060   echo "$ac_t""yes" 1>&6
15061   cat >> confdefs.h <<\EOF
15062 #define HAVE_STRFTIME 1
15063 EOF
15064
15065 LIBS="-lintl $LIBS"
15066 else
15067   echo "$ac_t""no" 1>&6
15068 fi
15069
15070 fi
15071
15072
15073 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15074 echo "configure:15075: checking for inet_aton()" >&5
15075 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15076   echo $ac_n "(cached) $ac_c" 1>&6
15077 else
15078   cat > conftest.$ac_ext <<EOF
15079 #line 15080 "configure"
15080 #include "confdefs.h"
15081
15082 #ifdef HAVE_SYS_TYPES_H
15083 #       include <sys/types.h>
15084 #endif
15085 #ifdef HAVE_SYS_SOCKET_H
15086 #       include <sys/socket.h>
15087 #       ifdef HAVE_SYS_SELECT_H
15088 #               include <sys/select.h>
15089 #       endif
15090 #       include <netinet/in.h>
15091 #       ifdef HAVE_ARPA_INET_H
15092 #               include <arpa/inet.h>
15093 #       endif
15094 #endif
15095
15096 int main() {
15097 struct in_addr in;
15098 int rc = inet_aton( "255.255.255.255", &in );
15099 ; return 0; }
15100 EOF
15101 if { (eval echo configure:15102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15102   rm -rf conftest*
15103   ol_cv_func_inet_aton=yes
15104 else
15105   echo "configure: failed program was:" >&5
15106   cat conftest.$ac_ext >&5
15107   rm -rf conftest*
15108   ol_cv_func_inet_aton=no
15109 fi
15110 rm -f conftest*
15111 fi
15112
15113 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15114   if test $ol_cv_func_inet_aton != no; then
15115     cat >> confdefs.h <<\EOF
15116 #define HAVE_INET_ATON 1
15117 EOF
15118
15119   fi
15120  
15121
15122 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15123 echo "configure:15124: checking for _spawnlp" >&5
15124 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15125   echo $ac_n "(cached) $ac_c" 1>&6
15126 else
15127   cat > conftest.$ac_ext <<EOF
15128 #line 15129 "configure"
15129 #include "confdefs.h"
15130 /* System header to define __stub macros and hopefully few prototypes,
15131     which can conflict with char _spawnlp(); below.  */
15132 #include <assert.h>
15133 /* Override any gcc2 internal prototype to avoid an error.  */
15134 /* We use char because int might match the return type of a gcc2
15135     builtin and then its argument prototype would still apply.  */
15136 char _spawnlp();
15137 char (*f)();
15138
15139 int main() {
15140
15141 /* The GNU C library defines this for functions which it implements
15142     to always fail with ENOSYS.  Some functions are actually named
15143     something starting with __ and the normal name is an alias.  */
15144 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15145 choke me
15146 #else
15147 f = _spawnlp;
15148 #endif
15149
15150 ; return 0; }
15151 EOF
15152 if { (eval echo configure:15153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15153   rm -rf conftest*
15154   eval "ac_cv_func__spawnlp=yes"
15155 else
15156   echo "configure: failed program was:" >&5
15157   cat conftest.$ac_ext >&5
15158   rm -rf conftest*
15159   eval "ac_cv_func__spawnlp=no"
15160 fi
15161 rm -f conftest*
15162 fi
15163
15164 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15165   echo "$ac_t""yes" 1>&6
15166   cat >> confdefs.h <<\EOF
15167 #define HAVE_SPAWNLP 1
15168 EOF
15169
15170 else
15171   echo "$ac_t""no" 1>&6
15172 fi
15173
15174
15175 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15176 echo "configure:15177: checking for _snprintf" >&5
15177 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15178   echo $ac_n "(cached) $ac_c" 1>&6
15179 else
15180   cat > conftest.$ac_ext <<EOF
15181 #line 15182 "configure"
15182 #include "confdefs.h"
15183 /* System header to define __stub macros and hopefully few prototypes,
15184     which can conflict with char _snprintf(); below.  */
15185 #include <assert.h>
15186 /* Override any gcc2 internal prototype to avoid an error.  */
15187 /* We use char because int might match the return type of a gcc2
15188     builtin and then its argument prototype would still apply.  */
15189 char _snprintf();
15190 char (*f)();
15191
15192 int main() {
15193
15194 /* The GNU C library defines this for functions which it implements
15195     to always fail with ENOSYS.  Some functions are actually named
15196     something starting with __ and the normal name is an alias.  */
15197 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15198 choke me
15199 #else
15200 f = _snprintf;
15201 #endif
15202
15203 ; return 0; }
15204 EOF
15205 if { (eval echo configure:15206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15206   rm -rf conftest*
15207   eval "ac_cv_func__snprintf=yes"
15208 else
15209   echo "configure: failed program was:" >&5
15210   cat conftest.$ac_ext >&5
15211   rm -rf conftest*
15212   eval "ac_cv_func__snprintf=no"
15213 fi
15214 rm -f conftest*
15215 fi
15216
15217 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15218   echo "$ac_t""yes" 1>&6
15219   ac_cv_func_snprintf=yes
15220         cat >> confdefs.h <<\EOF
15221 #define snprintf _snprintf
15222 EOF
15223
15224
15225 else
15226   echo "$ac_t""no" 1>&6
15227 fi
15228
15229
15230 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15231 echo "configure:15232: checking for _vsnprintf" >&5
15232 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15233   echo $ac_n "(cached) $ac_c" 1>&6
15234 else
15235   cat > conftest.$ac_ext <<EOF
15236 #line 15237 "configure"
15237 #include "confdefs.h"
15238 /* System header to define __stub macros and hopefully few prototypes,
15239     which can conflict with char _vsnprintf(); below.  */
15240 #include <assert.h>
15241 /* Override any gcc2 internal prototype to avoid an error.  */
15242 /* We use char because int might match the return type of a gcc2
15243     builtin and then its argument prototype would still apply.  */
15244 char _vsnprintf();
15245 char (*f)();
15246
15247 int main() {
15248
15249 /* The GNU C library defines this for functions which it implements
15250     to always fail with ENOSYS.  Some functions are actually named
15251     something starting with __ and the normal name is an alias.  */
15252 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15253 choke me
15254 #else
15255 f = _vsnprintf;
15256 #endif
15257
15258 ; return 0; }
15259 EOF
15260 if { (eval echo configure:15261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15261   rm -rf conftest*
15262   eval "ac_cv_func__vsnprintf=yes"
15263 else
15264   echo "configure: failed program was:" >&5
15265   cat conftest.$ac_ext >&5
15266   rm -rf conftest*
15267   eval "ac_cv_func__vsnprintf=no"
15268 fi
15269 rm -f conftest*
15270 fi
15271
15272 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15273   echo "$ac_t""yes" 1>&6
15274   ac_cv_func_vsnprintf=yes
15275         cat >> confdefs.h <<\EOF
15276 #define vsnprintf _vsnprintf
15277 EOF
15278
15279
15280 else
15281   echo "$ac_t""no" 1>&6
15282 fi
15283
15284
15285 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15286 echo "configure:15287: checking for vprintf" >&5
15287 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15288   echo $ac_n "(cached) $ac_c" 1>&6
15289 else
15290   cat > conftest.$ac_ext <<EOF
15291 #line 15292 "configure"
15292 #include "confdefs.h"
15293 /* System header to define __stub macros and hopefully few prototypes,
15294     which can conflict with char vprintf(); below.  */
15295 #include <assert.h>
15296 /* Override any gcc2 internal prototype to avoid an error.  */
15297 /* We use char because int might match the return type of a gcc2
15298     builtin and then its argument prototype would still apply.  */
15299 char vprintf();
15300 char (*f)();
15301
15302 int main() {
15303
15304 /* The GNU C library defines this for functions which it implements
15305     to always fail with ENOSYS.  Some functions are actually named
15306     something starting with __ and the normal name is an alias.  */
15307 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15308 choke me
15309 #else
15310 f = vprintf;
15311 #endif
15312
15313 ; return 0; }
15314 EOF
15315 if { (eval echo configure:15316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15316   rm -rf conftest*
15317   eval "ac_cv_func_vprintf=yes"
15318 else
15319   echo "configure: failed program was:" >&5
15320   cat conftest.$ac_ext >&5
15321   rm -rf conftest*
15322   eval "ac_cv_func_vprintf=no"
15323 fi
15324 rm -f conftest*
15325 fi
15326
15327 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15328   echo "$ac_t""yes" 1>&6
15329   cat >> confdefs.h <<\EOF
15330 #define HAVE_VPRINTF 1
15331 EOF
15332
15333 else
15334   echo "$ac_t""no" 1>&6
15335 fi
15336
15337 if test "$ac_cv_func_vprintf" != yes; then
15338 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15339 echo "configure:15340: checking for _doprnt" >&5
15340 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15341   echo $ac_n "(cached) $ac_c" 1>&6
15342 else
15343   cat > conftest.$ac_ext <<EOF
15344 #line 15345 "configure"
15345 #include "confdefs.h"
15346 /* System header to define __stub macros and hopefully few prototypes,
15347     which can conflict with char _doprnt(); below.  */
15348 #include <assert.h>
15349 /* Override any gcc2 internal prototype to avoid an error.  */
15350 /* We use char because int might match the return type of a gcc2
15351     builtin and then its argument prototype would still apply.  */
15352 char _doprnt();
15353 char (*f)();
15354
15355 int main() {
15356
15357 /* The GNU C library defines this for functions which it implements
15358     to always fail with ENOSYS.  Some functions are actually named
15359     something starting with __ and the normal name is an alias.  */
15360 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15361 choke me
15362 #else
15363 f = _doprnt;
15364 #endif
15365
15366 ; return 0; }
15367 EOF
15368 if { (eval echo configure:15369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15369   rm -rf conftest*
15370   eval "ac_cv_func__doprnt=yes"
15371 else
15372   echo "configure: failed program was:" >&5
15373   cat conftest.$ac_ext >&5
15374   rm -rf conftest*
15375   eval "ac_cv_func__doprnt=no"
15376 fi
15377 rm -f conftest*
15378 fi
15379
15380 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15381   echo "$ac_t""yes" 1>&6
15382   cat >> confdefs.h <<\EOF
15383 #define HAVE_DOPRNT 1
15384 EOF
15385
15386 else
15387   echo "$ac_t""no" 1>&6
15388 fi
15389
15390 fi
15391
15392
15393 if test $ac_cv_func_vprintf = yes ; then
15394                 for ac_func in vsnprintf vsprintf
15395 do
15396 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15397 echo "configure:15398: checking for $ac_func" >&5
15398 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15399   echo $ac_n "(cached) $ac_c" 1>&6
15400 else
15401   cat > conftest.$ac_ext <<EOF
15402 #line 15403 "configure"
15403 #include "confdefs.h"
15404 /* System header to define __stub macros and hopefully few prototypes,
15405     which can conflict with char $ac_func(); below.  */
15406 #include <assert.h>
15407 /* Override any gcc2 internal prototype to avoid an error.  */
15408 /* We use char because int might match the return type of a gcc2
15409     builtin and then its argument prototype would still apply.  */
15410 char $ac_func();
15411 char (*f)();
15412
15413 int main() {
15414
15415 /* The GNU C library defines this for functions which it implements
15416     to always fail with ENOSYS.  Some functions are actually named
15417     something starting with __ and the normal name is an alias.  */
15418 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15419 choke me
15420 #else
15421 f = $ac_func;
15422 #endif
15423
15424 ; return 0; }
15425 EOF
15426 if { (eval echo configure:15427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15427   rm -rf conftest*
15428   eval "ac_cv_func_$ac_func=yes"
15429 else
15430   echo "configure: failed program was:" >&5
15431   cat conftest.$ac_ext >&5
15432   rm -rf conftest*
15433   eval "ac_cv_func_$ac_func=no"
15434 fi
15435 rm -f conftest*
15436 fi
15437
15438 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15439   echo "$ac_t""yes" 1>&6
15440     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15441   cat >> confdefs.h <<EOF
15442 #define $ac_tr_func 1
15443 EOF
15444  
15445 else
15446   echo "$ac_t""no" 1>&6
15447 fi
15448 done
15449
15450 fi
15451
15452 for ac_func in \
15453         bcopy                   \
15454         closesocket             \
15455         chroot                  \
15456         endgrent                \
15457         endpwent                \
15458         flock                   \
15459         getdtablesize   \
15460         getgrgid                \
15461         gethostname             \
15462         getpass                 \
15463         getpassphrase   \
15464         getpwuid                \
15465         getpwnam                \
15466         getspnam                \
15467         gettimeofday    \
15468         initgroups              \
15469         lockf                   \
15470         memcpy                  \
15471         memmove                 \
15472         mkstemp                 \
15473         pipe                    \
15474         read                    \
15475         recv                    \
15476         recvfrom                \
15477         setpwfile               \
15478         setgid                  \
15479         setegid                 \
15480         setsid                  \
15481         setuid                  \
15482         seteuid                 \
15483         sigaction               \
15484         signal                  \
15485         sigset                  \
15486         snprintf                \
15487         strdup                  \
15488         strerror                \
15489         strpbrk                 \
15490         strrchr                 \
15491         strsep                  \
15492         strstr                  \
15493         strtol                  \
15494         strtoul                 \
15495         strspn                  \
15496         sysconf                 \
15497         waitpid                 \
15498         wait4                   \
15499         write                   \
15500         send                    \
15501         sendto                  \
15502
15503 do
15504 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15505 echo "configure:15506: checking for $ac_func" >&5
15506 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15507   echo $ac_n "(cached) $ac_c" 1>&6
15508 else
15509   cat > conftest.$ac_ext <<EOF
15510 #line 15511 "configure"
15511 #include "confdefs.h"
15512 /* System header to define __stub macros and hopefully few prototypes,
15513     which can conflict with char $ac_func(); below.  */
15514 #include <assert.h>
15515 /* Override any gcc2 internal prototype to avoid an error.  */
15516 /* We use char because int might match the return type of a gcc2
15517     builtin and then its argument prototype would still apply.  */
15518 char $ac_func();
15519 char (*f)();
15520
15521 int main() {
15522
15523 /* The GNU C library defines this for functions which it implements
15524     to always fail with ENOSYS.  Some functions are actually named
15525     something starting with __ and the normal name is an alias.  */
15526 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15527 choke me
15528 #else
15529 f = $ac_func;
15530 #endif
15531
15532 ; return 0; }
15533 EOF
15534 if { (eval echo configure:15535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15535   rm -rf conftest*
15536   eval "ac_cv_func_$ac_func=yes"
15537 else
15538   echo "configure: failed program was:" >&5
15539   cat conftest.$ac_ext >&5
15540   rm -rf conftest*
15541   eval "ac_cv_func_$ac_func=no"
15542 fi
15543 rm -f conftest*
15544 fi
15545
15546 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15547   echo "$ac_t""yes" 1>&6
15548     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15549   cat >> confdefs.h <<EOF
15550 #define $ac_tr_func 1
15551 EOF
15552  
15553 else
15554   echo "$ac_t""no" 1>&6
15555 fi
15556 done
15557
15558
15559 for ac_func in getopt tempnam
15560 do
15561 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15562 echo "configure:15563: checking for $ac_func" >&5
15563 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15564   echo $ac_n "(cached) $ac_c" 1>&6
15565 else
15566   cat > conftest.$ac_ext <<EOF
15567 #line 15568 "configure"
15568 #include "confdefs.h"
15569 /* System header to define __stub macros and hopefully few prototypes,
15570     which can conflict with char $ac_func(); below.  */
15571 #include <assert.h>
15572 /* Override any gcc2 internal prototype to avoid an error.  */
15573 /* We use char because int might match the return type of a gcc2
15574     builtin and then its argument prototype would still apply.  */
15575 char $ac_func();
15576 char (*f)();
15577
15578 int main() {
15579
15580 /* The GNU C library defines this for functions which it implements
15581     to always fail with ENOSYS.  Some functions are actually named
15582     something starting with __ and the normal name is an alias.  */
15583 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15584 choke me
15585 #else
15586 f = $ac_func;
15587 #endif
15588
15589 ; return 0; }
15590 EOF
15591 if { (eval echo configure:15592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15592   rm -rf conftest*
15593   eval "ac_cv_func_$ac_func=yes"
15594 else
15595   echo "configure: failed program was:" >&5
15596   cat conftest.$ac_ext >&5
15597   rm -rf conftest*
15598   eval "ac_cv_func_$ac_func=no"
15599 fi
15600 rm -f conftest*
15601 fi
15602
15603 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15604   echo "$ac_t""yes" 1>&6
15605     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15606   cat >> confdefs.h <<EOF
15607 #define $ac_tr_func 1
15608 EOF
15609  
15610 else
15611   echo "$ac_t""no" 1>&6
15612 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15613 fi
15614 done
15615
15616
15617
15618 if test "$ac_cv_func_getopt" != yes; then
15619     LIBSRCS="$LIBSRCS getopt.c"
15620 fi
15621
15622 if test "$ac_cv_func_tempnam" != yes; then
15623     LIBSRCS="$LIBSRCS tempnam.c"
15624 fi
15625
15626 # Check Configuration
15627 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15628 echo "configure:15629: checking declaration of sys_errlist" >&5
15629 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15630   echo $ac_n "(cached) $ac_c" 1>&6
15631 else
15632   
15633         cat > conftest.$ac_ext <<EOF
15634 #line 15635 "configure"
15635 #include "confdefs.h"
15636
15637 #include <stdio.h>
15638 #include <sys/types.h>
15639 #include <errno.h>
15640 #ifdef WINNT
15641 #include <stdlib.h>
15642 #endif 
15643 int main() {
15644 char *c = (char *) *sys_errlist
15645 ; return 0; }
15646 EOF
15647 if { (eval echo configure:15648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15648   rm -rf conftest*
15649   ol_cv_dcl_sys_errlist=yes
15650         ol_cv_have_sys_errlist=yes
15651 else
15652   echo "configure: failed program was:" >&5
15653   cat conftest.$ac_ext >&5
15654   rm -rf conftest*
15655   ol_cv_dcl_sys_errlist=no
15656 fi
15657 rm -f conftest*
15658 fi
15659
15660 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15661 #
15662 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15663 if test $ol_cv_dcl_sys_errlist = no ; then
15664         cat >> confdefs.h <<\EOF
15665 #define DECL_SYS_ERRLIST 1
15666 EOF
15667
15668
15669         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15670 echo "configure:15671: checking existence of sys_errlist" >&5
15671 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15672   echo $ac_n "(cached) $ac_c" 1>&6
15673 else
15674   
15675                 cat > conftest.$ac_ext <<EOF
15676 #line 15677 "configure"
15677 #include "confdefs.h"
15678 #include <errno.h>
15679 int main() {
15680 char *c = (char *) *sys_errlist
15681 ; return 0; }
15682 EOF
15683 if { (eval echo configure:15684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15684   rm -rf conftest*
15685   ol_cv_have_sys_errlist=yes
15686 else
15687   echo "configure: failed program was:" >&5
15688   cat conftest.$ac_ext >&5
15689   rm -rf conftest*
15690   ol_cv_have_sys_errlist=no
15691 fi
15692 rm -f conftest*
15693 fi
15694
15695 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15696 fi
15697 if test $ol_cv_have_sys_errlist = yes ; then
15698         cat >> confdefs.h <<\EOF
15699 #define HAVE_SYS_ERRLIST 1
15700 EOF
15701
15702 fi
15703
15704
15705
15706 if test "$ol_enable_debug" != no ; then
15707         cat >> confdefs.h <<\EOF
15708 #define LDAP_DEBUG 1
15709 EOF
15710
15711 fi
15712 if test "$ol_enable_syslog" = yes ; then
15713         cat >> confdefs.h <<\EOF
15714 #define LDAP_SYSLOG 1
15715 EOF
15716
15717 fi
15718 if test "$ol_enable_libui" = yes ; then
15719         cat >> confdefs.h <<\EOF
15720 #define LDAP_LIBUI 1
15721 EOF
15722
15723 fi
15724 if test "$ol_enable_cache" = no ; then
15725         cat >> confdefs.h <<\EOF
15726 #define LDAP_NOCACHE 1
15727 EOF
15728
15729 fi
15730 if test "$ol_link_kbind" != no ; then
15731         cat >> confdefs.h <<\EOF
15732 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15733 EOF
15734
15735 fi
15736 if test "$ol_enable_proctitle" != no ; then
15737         cat >> confdefs.h <<\EOF
15738 #define LDAP_PROCTITLE 1
15739 EOF
15740
15741 fi
15742 if test "$ol_enable_referrals" != no ; then
15743         cat >> confdefs.h <<\EOF
15744 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15745 EOF
15746
15747 fi
15748 if test "$ol_enable_cldap" != no ; then
15749         cat >> confdefs.h <<\EOF
15750 #define LDAP_CONNECTIONLESS 1
15751 EOF
15752
15753 fi
15754 if test "$ol_enable_ldapi" != no; then
15755         cat >> confdefs.h <<\EOF
15756 #define USE_PF_LOCAL 1
15757 EOF
15758
15759 fi
15760
15761 if test "$ol_enable_cleartext" != no ; then
15762         cat >> confdefs.h <<\EOF
15763 #define SLAPD_CLEARTEXT 1
15764 EOF
15765
15766 fi
15767 if test "$ol_enable_crypt" != no ; then
15768         cat >> confdefs.h <<\EOF
15769 #define SLAPD_CRYPT 1
15770 EOF
15771
15772 fi
15773 if test "$ol_link_kpasswd" != no ; then
15774         cat >> confdefs.h <<\EOF
15775 #define SLAPD_KPASSWD 1
15776 EOF
15777
15778 fi
15779 if test "$ol_link_spasswd" != no ; then
15780         cat >> confdefs.h <<\EOF
15781 #define SLAPD_SPASSWD 1
15782 EOF
15783
15784 fi
15785 if test "$ol_enable_multimaster" != no ; then
15786         cat >> confdefs.h <<\EOF
15787 #define SLAPD_MULTIMASTER 1
15788 EOF
15789
15790 fi
15791 if test "$ol_enable_phonetic" != no ; then
15792         cat >> confdefs.h <<\EOF
15793 #define SLAPD_PHONETIC 1
15794 EOF
15795
15796 fi
15797 if test "$ol_enable_rlookups" != no ; then
15798         cat >> confdefs.h <<\EOF
15799 #define SLAPD_RLOOKUPS 1
15800 EOF
15801
15802 fi
15803 if test "$ol_enable_aci" != no ; then
15804         cat >> confdefs.h <<\EOF
15805 #define SLAPD_ACI_ENABLED 1
15806 EOF
15807
15808 fi
15809
15810 if test "$ol_link_modules" != no ; then
15811         cat >> confdefs.h <<\EOF
15812 #define SLAPD_MODULES 1
15813 EOF
15814
15815         BUILD_SLAPD=yes
15816         SLAPD_MODULES_LDFLAGS="-dlopen self"
15817 fi
15818
15819 if test "$ol_link_bdb2" != no ; then
15820         cat >> confdefs.h <<\EOF
15821 #define SLAPD_BDB2 1
15822 EOF
15823
15824         BUILD_SLAPD=yes
15825         BUILD_BDB2=yes
15826         if test "$ol_with_bdb2_module" != static ; then
15827                 cat >> confdefs.h <<\EOF
15828 #define SLAPD_BDB2_DYNAMIC 1
15829 EOF
15830
15831                 BUILD_BDB2=mod
15832                 BUILD_BDB2_DYNAMIC=shared
15833                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15834         fi
15835 fi
15836
15837 if test "$ol_link_dnssrv" != no ; then
15838         cat >> confdefs.h <<\EOF
15839 #define SLAPD_DNSSRV 1
15840 EOF
15841
15842         BUILD_SLAPD=yes
15843         BUILD_DNSSRV=yes
15844         if test "$ol_with_dnssrv_module" != static ; then
15845                 cat >> confdefs.h <<\EOF
15846 #define SLAPD_DNSSRV_DYNAMIC 1
15847 EOF
15848
15849                 BUILD_DNSSRV=mod
15850                 BUILD_DNSSRV_DYNAMIC=shared
15851                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15852         fi
15853 fi
15854
15855 if test "$ol_enable_ldap" != no ; then
15856         cat >> confdefs.h <<\EOF
15857 #define SLAPD_LDAP 1
15858 EOF
15859
15860         BUILD_SLAPD=yes
15861         BUILD_LDAP=yes
15862         if test "$ol_with_ldap_module" != static ; then
15863                 cat >> confdefs.h <<\EOF
15864 #define SLAPD_LDAP_DYNAMIC 1
15865 EOF
15866
15867                 BUILD_LDAP=mod
15868                 BUILD_LDAP_DYNAMIC=shared
15869                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15870         fi
15871 fi
15872
15873 if test "$ol_link_ldbm" != no ; then
15874         cat >> confdefs.h <<\EOF
15875 #define SLAPD_LDBM 1
15876 EOF
15877
15878         BUILD_SLAPD=yes
15879         BUILD_LDBM=yes
15880         if test "$ol_with_ldbm_module" != static ; then
15881                 cat >> confdefs.h <<\EOF
15882 #define SLAPD_LDBM_DYNAMIC 1
15883 EOF
15884
15885                 BUILD_LDBM=mod
15886                 BUILD_LDBM_DYNAMIC=shared
15887                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15888         fi
15889 fi
15890
15891 if test "$ol_enable_passwd" != no ; then
15892         cat >> confdefs.h <<\EOF
15893 #define SLAPD_PASSWD 1
15894 EOF
15895
15896         BUILD_SLAPD=yes
15897         BUILD_PASSWD=yes
15898         if test "$ol_with_passwd_module" != static ; then
15899                 cat >> confdefs.h <<\EOF
15900 #define SLAPD_PASSWD_DYNAMIC 1
15901 EOF
15902
15903                 BUILD_PASSWD=mod
15904                 BUILD_PASSWD_DYNAMIC=shared
15905                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15906         fi
15907 fi
15908
15909 if test "$ol_link_perl" != no ; then
15910         cat >> confdefs.h <<\EOF
15911 #define SLAPD_PERL 1
15912 EOF
15913
15914         BUILD_SLAPD=yes
15915         BUILD_PERL=yes
15916         if test "$ol_with_perl_module" != static ; then
15917                 cat >> confdefs.h <<\EOF
15918 #define SLAPD_PERL_DYNAMIC 1
15919 EOF
15920
15921                 BUILD_PERL=mod
15922                 BUILD_PERL_DYNAMIC=shared
15923                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15924         fi
15925 fi
15926
15927 if test "$ol_enable_shell" != no ; then
15928         cat >> confdefs.h <<\EOF
15929 #define SLAPD_SHELL 1
15930 EOF
15931
15932         BUILD_SLAPD=yes
15933         BUILD_SHELL=yes
15934         if test "$ol_with_shell_module" != static ; then
15935                 cat >> confdefs.h <<\EOF
15936 #define SLAPD_SHELL_DYNAMIC 1
15937 EOF
15938
15939                 BUILD_SHELL=mod
15940                 BUILD_SHELL_DYNAMIC=shared
15941                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15942         fi
15943 fi
15944
15945 if test "$ol_enable_tcl" != no ; then
15946         cat >> confdefs.h <<\EOF
15947 #define SLAPD_TCL 1
15948 EOF
15949
15950         BUILD_SLAPD=yes
15951         BUILD_TCL=yes
15952         if test "$ol_with_tcl_module" != static; then
15953                 cat >> confdefs.h <<\EOF
15954 #define SLAPD_TCL_DYNAMIC 1
15955 EOF
15956
15957                 BUILD_TCL=mod
15958                 BUILD_TCL_DYNAMIC=shared
15959                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15960         fi
15961 fi
15962
15963 if test "$ol_enable_sql" != no ; then
15964         cat >> confdefs.h <<\EOF
15965 #define SLAPD_SQL 1
15966 EOF
15967
15968         BUILD_SLAPD=yes
15969         BUILD_SQL=yes
15970         SLAPD_SQL_LIBS=-liodbc
15971         if test "$ol_with_sql_module" != static; then
15972                 cat >> confdefs.h <<\EOF
15973 #define SLAPD_SQL_DYNAMIC 1
15974 EOF
15975
15976                 BUILD_SQL=mod
15977                 BUILD_SQL_DYNAMIC=shared
15978                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15979         fi
15980 fi
15981
15982 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15983         $BUILD_SLAPD = yes ; then
15984         BUILD_SLURPD=yes
15985 fi
15986
15987
15988 if test "$LINK_BINS_DYNAMIC" = yes; then
15989     LIB_LINKAGE=DYN
15990     LT_LIB_LINKAGE=shared
15991 else
15992     LIB_LINKAGE=STAT
15993     LT_LIB_LINKAGE=static
15994 fi
15995
15996 if test "$ac_cv_mingw32" = yes ; then
15997     PLAT=NT
15998     DYN_EXT=dll
15999 else
16000     PLAT=UNIX
16001     DYN_EXT=so
16002 fi
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012   
16013   
16014   
16015   
16016   
16017   
16018   
16019   
16020   
16021   
16022   
16023   
16024   
16025   
16026   
16027   
16028   
16029   
16030   
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067 trap '' 1 2 15
16068
16069 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16070
16071 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16072 # Let make expand exec_prefix.
16073 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16074
16075 # Any assignment to VPATH causes Sun make to only execute
16076 # the first set of double-colon rules, so remove it if not needed.
16077 # If there is a colon in the path, we need to keep it.
16078 if test "x$srcdir" = x.; then
16079   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16080 fi
16081
16082 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16083
16084 DEFS=-DHAVE_CONFIG_H
16085
16086 # Without the "./", some shells look in PATH for config.status.
16087 : ${CONFIG_STATUS=./config.status}
16088
16089 echo creating $CONFIG_STATUS
16090 rm -f $CONFIG_STATUS
16091 cat > $CONFIG_STATUS <<EOF
16092 #! /bin/sh
16093 # Generated automatically by configure.
16094 # Run this file to recreate the current configuration.
16095 # This directory was configured as follows,
16096 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16097 #
16098 # $0 $ac_configure_args
16099 #
16100 # Compiler output produced by configure, useful for debugging
16101 # configure, is in ./config.log if it exists.
16102
16103 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16104 for ac_option
16105 do
16106   case "\$ac_option" in
16107   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16108     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16109     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16110   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16111     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16112     exit 0 ;;
16113   -help | --help | --hel | --he | --h)
16114     echo "\$ac_cs_usage"; exit 0 ;;
16115   *) echo "\$ac_cs_usage"; exit 1 ;;
16116   esac
16117 done
16118
16119 ac_given_srcdir=$srcdir
16120 ac_given_INSTALL="$INSTALL"
16121
16122 trap 'rm -fr `echo "\
16123 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16124 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16125 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16126 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16127 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16128 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16129 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16130 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16131 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16132 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16133 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16134 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16135 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16136 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16137 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16138 include/Makefile:build/top.mk:include/Makefile.in \
16139 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16140 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16141 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16142 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16143 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16144 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16145 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16146 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16147 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16148 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16149 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16150 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16151 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16152 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16153 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16154 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16155 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16156 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16157 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16158 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16159 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16160 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16161 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16162 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16163 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16164 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16165 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16166 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16167  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16168 EOF
16169 cat >> $CONFIG_STATUS <<EOF
16170
16171 # Protect against being on the right side of a sed subst in config.status.
16172 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16173  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16174 $ac_vpsub
16175 $extrasub
16176 s%@SHELL@%$SHELL%g
16177 s%@CFLAGS@%$CFLAGS%g
16178 s%@CPPFLAGS@%$CPPFLAGS%g
16179 s%@CXXFLAGS@%$CXXFLAGS%g
16180 s%@FFLAGS@%$FFLAGS%g
16181 s%@DEFS@%$DEFS%g
16182 s%@LDFLAGS@%$LDFLAGS%g
16183 s%@LIBS@%$LIBS%g
16184 s%@exec_prefix@%$exec_prefix%g
16185 s%@prefix@%$prefix%g
16186 s%@program_transform_name@%$program_transform_name%g
16187 s%@bindir@%$bindir%g
16188 s%@sbindir@%$sbindir%g
16189 s%@libexecdir@%$libexecdir%g
16190 s%@datadir@%$datadir%g
16191 s%@sysconfdir@%$sysconfdir%g
16192 s%@sharedstatedir@%$sharedstatedir%g
16193 s%@localstatedir@%$localstatedir%g
16194 s%@libdir@%$libdir%g
16195 s%@includedir@%$includedir%g
16196 s%@oldincludedir@%$oldincludedir%g
16197 s%@infodir@%$infodir%g
16198 s%@mandir@%$mandir%g
16199 s%@host@%$host%g
16200 s%@host_alias@%$host_alias%g
16201 s%@host_cpu@%$host_cpu%g
16202 s%@host_vendor@%$host_vendor%g
16203 s%@host_os@%$host_os%g
16204 s%@target@%$target%g
16205 s%@target_alias@%$target_alias%g
16206 s%@target_cpu@%$target_cpu%g
16207 s%@target_vendor@%$target_vendor%g
16208 s%@target_os@%$target_os%g
16209 s%@build@%$build%g
16210 s%@build_alias@%$build_alias%g
16211 s%@build_cpu@%$build_cpu%g
16212 s%@build_vendor@%$build_vendor%g
16213 s%@build_os@%$build_os%g
16214 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16215 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16216 s%@INSTALL_DATA@%$INSTALL_DATA%g
16217 s%@PACKAGE@%$PACKAGE%g
16218 s%@VERSION@%$VERSION%g
16219 s%@ACLOCAL@%$ACLOCAL%g
16220 s%@AUTOCONF@%$AUTOCONF%g
16221 s%@AUTOMAKE@%$AUTOMAKE%g
16222 s%@AUTOHEADER@%$AUTOHEADER%g
16223 s%@MAKEINFO@%$MAKEINFO%g
16224 s%@install_sh@%$install_sh%g
16225 s%@AMTAR@%$AMTAR%g
16226 s%@AWK@%$AWK%g
16227 s%@AMTARFLAGS@%$AMTARFLAGS%g
16228 s%@SET_MAKE@%$SET_MAKE%g
16229 s%@top_builddir@%$top_builddir%g
16230 s%@ldap_subdir@%$ldap_subdir%g
16231 s%@CC@%$CC%g
16232 s%@RANLIB@%$RANLIB%g
16233 s%@LN_S@%$LN_S%g
16234 s%@DLLTOOL@%$DLLTOOL%g
16235 s%@AS@%$AS%g
16236 s%@OBJDUMP@%$OBJDUMP%g
16237 s%@LIBTOOL@%$LIBTOOL%g
16238 s%@LN_H@%$LN_H%g
16239 s%@SENDMAIL@%$SENDMAIL%g
16240 s%@EDITOR@%$EDITOR%g
16241 s%@FINGER@%$FINGER%g
16242 s%@PERLBIN@%$PERLBIN%g
16243 s%@CPP@%$CPP%g
16244 s%@EXEEXT@%$EXEEXT%g
16245 s%@OBJEXT@%$OBJEXT%g
16246 s%@OL_MKDEP@%$OL_MKDEP%g
16247 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16248 s%@LIBOBJS@%$LIBOBJS%g
16249 s%@LIBSRCS@%$LIBSRCS%g
16250 s%@PLAT@%$PLAT%g
16251 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16252 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16253 s%@DYN_EXT@%$DYN_EXT%g
16254 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16255 s%@BUILD_BDB2@%$BUILD_BDB2%g
16256 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16257 s%@BUILD_LDAP@%$BUILD_LDAP%g
16258 s%@BUILD_LDBM@%$BUILD_LDBM%g
16259 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16260 s%@BUILD_PERL@%$BUILD_PERL%g
16261 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16262 s%@BUILD_SHELL@%$BUILD_SHELL%g
16263 s%@BUILD_SQL@%$BUILD_SQL%g
16264 s%@BUILD_TCL@%$BUILD_TCL%g
16265 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
16266 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16267 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16268 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16269 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16270 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16271 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16272 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16273 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16274 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16275 s%@LDAP_LIBS@%$LDAP_LIBS%g
16276 s%@LDIF_LIBS@%$LDIF_LIBS%g
16277 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16278 s%@QUIPU_LIBS@%$QUIPU_LIBS%g
16279 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16280 s%@LDBM_LIBS@%$LDBM_LIBS%g
16281 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16282 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16283 s%@WRAP_LIBS@%$WRAP_LIBS%g
16284 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16285 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16286 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16287 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16288 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16289 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16290 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16291 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16292 s%@KRB4_LIBS@%$KRB4_LIBS%g
16293 s%@KRB5_LIBS@%$KRB5_LIBS%g
16294 s%@READLINE_LIBS@%$READLINE_LIBS%g
16295 s%@SASL_LIBS@%$SASL_LIBS%g
16296 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16297 s%@TLS_LIBS@%$TLS_LIBS%g
16298 s%@MODULES_LIBS@%$MODULES_LIBS%g
16299 s%@AUTH_LIBS@%$AUTH_LIBS%g
16300 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16301 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16302 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16303
16304 CEOF
16305 EOF
16306
16307 cat >> $CONFIG_STATUS <<\EOF
16308
16309 # Split the substitutions into bite-sized pieces for seds with
16310 # small command number limits, like on Digital OSF/1 and HP-UX.
16311 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16312 ac_file=1 # Number of current file.
16313 ac_beg=1 # First line for current file.
16314 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16315 ac_more_lines=:
16316 ac_sed_cmds=""
16317 while $ac_more_lines; do
16318   if test $ac_beg -gt 1; then
16319     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16320   else
16321     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16322   fi
16323   if test ! -s conftest.s$ac_file; then
16324     ac_more_lines=false
16325     rm -f conftest.s$ac_file
16326   else
16327     if test -z "$ac_sed_cmds"; then
16328       ac_sed_cmds="sed -f conftest.s$ac_file"
16329     else
16330       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16331     fi
16332     ac_file=`expr $ac_file + 1`
16333     ac_beg=$ac_end
16334     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16335   fi
16336 done
16337 if test -z "$ac_sed_cmds"; then
16338   ac_sed_cmds=cat
16339 fi
16340 EOF
16341
16342 cat >> $CONFIG_STATUS <<EOF
16343
16344 CONFIG_FILES=\${CONFIG_FILES-"\
16345 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16346 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16347 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16348 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16349 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16350 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16351 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16352 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16353 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16354 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16355 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16356 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16357 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16358 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16359 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16360 include/Makefile:build/top.mk:include/Makefile.in \
16361 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16362 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16363 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16364 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16365 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16366 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16367 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16368 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16369 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16370 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16371 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16372 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16373 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16374 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16375 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16376 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16377 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16378 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16379 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16380 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16381 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16382 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16383 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16384 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16385 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16386 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16387 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16388 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16389 "}
16390 EOF
16391 cat >> $CONFIG_STATUS <<\EOF
16392 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16393   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16394   case "$ac_file" in
16395   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16396        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16397   *) ac_file_in="${ac_file}.in" ;;
16398   esac
16399
16400   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16401
16402   # Remove last slash and all that follows it.  Not all systems have dirname.
16403   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16404   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16405     # The file is in a subdirectory.
16406     test ! -d "$ac_dir" && mkdir "$ac_dir"
16407     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16408     # A "../" for each directory in $ac_dir_suffix.
16409     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16410   else
16411     ac_dir_suffix= ac_dots=
16412   fi
16413
16414   case "$ac_given_srcdir" in
16415   .)  srcdir=.
16416       if test -z "$ac_dots"; then top_srcdir=.
16417       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16418   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16419   *) # Relative path.
16420     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16421     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16422   esac
16423
16424   case "$ac_given_INSTALL" in
16425   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16426   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16427   esac
16428
16429   echo creating "$ac_file"
16430   rm -f "$ac_file"
16431   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16432   case "$ac_file" in
16433   *[Mm]akefile*) ac_comsub="1i\\
16434 # $configure_input" ;;
16435   *) ac_comsub= ;;
16436   esac
16437
16438   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16439   sed -e "$ac_comsub
16440 s%@configure_input@%$configure_input%g
16441 s%@srcdir@%$srcdir%g
16442 s%@top_srcdir@%$top_srcdir%g
16443 s%@INSTALL@%$INSTALL%g
16444 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16445 fi; done
16446 rm -f conftest.s*
16447
16448 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16449 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16450 #
16451 # ac_d sets the value in "#define NAME VALUE" lines.
16452 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16453 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16454 ac_dC='\3'
16455 ac_dD='%g'
16456 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16457 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16458 ac_uB='\([      ]\)%\1#\2define\3'
16459 ac_uC=' '
16460 ac_uD='\4%g'
16461 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16462 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16463 ac_eB='$%\1#\2define\3'
16464 ac_eC=' '
16465 ac_eD='%g'
16466
16467 if test "${CONFIG_HEADERS+set}" != set; then
16468 EOF
16469 cat >> $CONFIG_STATUS <<EOF
16470   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16471 EOF
16472 cat >> $CONFIG_STATUS <<\EOF
16473 fi
16474 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16475   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16476   case "$ac_file" in
16477   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16478        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16479   *) ac_file_in="${ac_file}.in" ;;
16480   esac
16481
16482   echo creating $ac_file
16483
16484   rm -f conftest.frag conftest.in conftest.out
16485   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16486   cat $ac_file_inputs > conftest.in
16487
16488 EOF
16489
16490 # Transform confdefs.h into a sed script conftest.vals that substitutes
16491 # the proper values into config.h.in to produce config.h.  And first:
16492 # Protect against being on the right side of a sed subst in config.status.
16493 # Protect against being in an unquoted here document in config.status.
16494 rm -f conftest.vals
16495 cat > conftest.hdr <<\EOF
16496 s/[\\&%]/\\&/g
16497 s%[\\$`]%\\&%g
16498 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16499 s%ac_d%ac_u%gp
16500 s%ac_u%ac_e%gp
16501 EOF
16502 sed -n -f conftest.hdr confdefs.h > conftest.vals
16503 rm -f conftest.hdr
16504
16505 # This sed command replaces #undef with comments.  This is necessary, for
16506 # example, in the case of _POSIX_SOURCE, which is predefined and required
16507 # on some systems where configure will not decide to define it.
16508 cat >> conftest.vals <<\EOF
16509 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16510 EOF
16511
16512 # Break up conftest.vals because some shells have a limit on
16513 # the size of here documents, and old seds have small limits too.
16514
16515 rm -f conftest.tail
16516 while :
16517 do
16518   ac_lines=`grep -c . conftest.vals`
16519   # grep -c gives empty output for an empty file on some AIX systems.
16520   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16521   # Write a limited-size here document to conftest.frag.
16522   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16523   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16524   echo 'CEOF
16525   sed -f conftest.frag conftest.in > conftest.out
16526   rm -f conftest.in
16527   mv conftest.out conftest.in
16528 ' >> $CONFIG_STATUS
16529   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16530   rm -f conftest.vals
16531   mv conftest.tail conftest.vals
16532 done
16533 rm -f conftest.vals
16534
16535 cat >> $CONFIG_STATUS <<\EOF
16536   rm -f conftest.frag conftest.h
16537   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16538   cat conftest.in >> conftest.h
16539   rm -f conftest.in
16540   if cmp -s $ac_file conftest.h 2>/dev/null; then
16541     echo "$ac_file is unchanged"
16542     rm -f conftest.h
16543   else
16544     # Remove last slash and all that follows it.  Not all systems have dirname.
16545       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16546       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16547       # The file is in a subdirectory.
16548       test ! -d "$ac_dir" && mkdir "$ac_dir"
16549     fi
16550     rm -f $ac_file
16551     mv conftest.h $ac_file
16552   fi
16553 fi; done
16554
16555 EOF
16556 cat >> $CONFIG_STATUS <<EOF
16557
16558 EOF
16559 cat >> $CONFIG_STATUS <<\EOF
16560
16561 date > stamp-h
16562 echo Please \"make depend\" to build dependencies
16563
16564 exit 0
16565 EOF
16566 chmod +x $CONFIG_STATUS
16567 rm -fr confdefs* $ac_clean_files
16568 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16569