]> git.sur5r.net Git - openldap/blob - configure
Regen
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.315 2000/06/18 17:36:48 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (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-ipv6         enable IPv6 support (auto)"
45 ac_help="$ac_help
46   --enable-unix         enable UNIX domain socket support (auto)"
47 ac_help="$ac_help
48   --enable-x-compile    enable cross compiling (no)"
49 ac_help="$ac_help
50   --with-cyrus-sasl     with Cyrus SASL support (auto)"
51 ac_help="$ac_help
52   --with-fetch          with fetch URL support (auto)"
53 ac_help="$ac_help
54   --with-kerberos       with support (auto)"
55 ac_help="$ac_help
56   --with-readline       with readline support (auto)"
57 ac_help="$ac_help
58   --with-threads        use threads (auto)"
59 ac_help="$ac_help
60   --with-tls            with TLS/SSL support (auto)"
61 ac_help="$ac_help
62   --with-yielding-select        with implicitly yielding select (auto)"
63 ac_help="$ac_help
64 SLAPD (Standalone LDAP Daemon) Options:"
65 ac_help="$ac_help
66   --enable-slapd        enable building slapd (yes)"
67 ac_help="$ac_help
68     --enable-cleartext  enable cleartext passwords (yes)"
69 ac_help="$ac_help
70     --enable-crypt      enable crypt(3) passwords (auto)"
71 ac_help="$ac_help
72     --enable-kpasswd    enable kerberos password verification (no)"
73 ac_help="$ac_help
74     --enable-spasswd    enable (Cyrus) SASL password verification (no)"
75 ac_help="$ac_help
76     --enable-modules    enable dynamic module support (no)"
77 ac_help="$ac_help
78     --enable-multimaster        enable multimaster replication (no)"
79 ac_help="$ac_help
80     --enable-phonetic   enable phonetic/soundex (no)"
81 ac_help="$ac_help
82     --enable-quipu      build quipu migration tools (no)"
83 ac_help="$ac_help
84     --enable-rlookups   enable reverse lookups (auto)"
85 ac_help="$ac_help
86     --enable-aci        enable per-object ACIs (no)"
87 ac_help="$ac_help
88     --enable-wrappers   enable tcp wrapper support (no)"
89 ac_help="$ac_help
90     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
91 ac_help="$ac_help
92     --enable-dnssrv     enable dnssrv backend (no)"
93 ac_help="$ac_help
94       --with-dnssrv-module      module type (static)"
95 ac_help="$ac_help
96     --enable-ldap       enable ldap backend (no)"
97 ac_help="$ac_help
98       --with-ldap-module        module type (static)"
99 ac_help="$ac_help
100     --enable-ldbm       enable ldbm backend (yes)"
101 ac_help="$ac_help
102       --with-ldbm-api   use LDBM API (auto)"
103 ac_help="$ac_help
104       --with-ldbm-module        module type (static)"
105 ac_help="$ac_help
106       --with-ldbm-type  use LDBM type (auto)"
107 ac_help="$ac_help
108     --enable-passwd     enable passwd backend (no)"
109 ac_help="$ac_help
110       --with-passwd-module      module type (static)"
111 ac_help="$ac_help
112     --enable-perl       enable perl backend (no)"
113 ac_help="$ac_help
114       --with-perl-module        module type (static)"
115 ac_help="$ac_help
116     --enable-shell      enable shell backend (no)"
117 ac_help="$ac_help
118       --with-shell-module       module type (static)"
119 ac_help="$ac_help
120     --enable-sql        enable sql backend (no)"
121 ac_help="$ac_help
122       --with-sql-module module type (static)"
123 ac_help="$ac_help
124     --enable-tcl        enable tcl backend (no)"
125 ac_help="$ac_help
126       --with-tcl-module module type (static)"
127 ac_help="$ac_help
128 SLURPD (Replication Daemon) Options:"
129 ac_help="$ac_help
130   --enable-slurpd       enable building slurpd (auto)"
131 ac_help="$ac_help
132 Library Generation & Linking Options"
133 ac_help="$ac_help
134   --enable-static[=PKGS]  build static libraries [default=yes]"
135 ac_help="$ac_help
136   --enable-shared[=PKGS]  build shared libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
139 ac_help="$ac_help
140   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
141 ac_help="$ac_help
142   --disable-libtool-lock  avoid locking (might break parallel builds)"
143
144 # Initialize some variables set by options.
145 # The variables have the same names as the options, with
146 # dashes changed to underlines.
147 build=NONE
148 cache_file=./config.cache
149 exec_prefix=NONE
150 host=NONE
151 no_create=
152 nonopt=NONE
153 no_recursion=
154 prefix=NONE
155 program_prefix=NONE
156 program_suffix=NONE
157 program_transform_name=s,x,x,
158 silent=
159 site=
160 srcdir=
161 target=NONE
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165 bindir='${exec_prefix}/bin'
166 sbindir='${exec_prefix}/sbin'
167 libexecdir='${exec_prefix}/libexec'
168 datadir='${prefix}/share'
169 sysconfdir='${prefix}/etc'
170 sharedstatedir='${prefix}/com'
171 localstatedir='${prefix}/var'
172 libdir='${exec_prefix}/lib'
173 includedir='${prefix}/include'
174 oldincludedir='/usr/include'
175 infodir='${prefix}/info'
176 mandir='${prefix}/man'
177
178 # Initialize some other variables.
179 subdirs=
180 MFLAGS= MAKEFLAGS=
181 SHELL=${CONFIG_SHELL-/bin/sh}
182 # Maximum number of lines to put in a shell here document.
183 ac_max_here_lines=12
184
185 ac_prev=
186 for ac_option
187 do
188
189   # If the previous option needs an argument, assign it.
190   if test -n "$ac_prev"; then
191     eval "$ac_prev=\$ac_option"
192     ac_prev=
193     continue
194   fi
195
196   case "$ac_option" in
197   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
198   *) ac_optarg= ;;
199   esac
200
201   # Accept the important Cygnus configure options, so we can diagnose typos.
202
203   case "$ac_option" in
204
205   -bindir | --bindir | --bindi | --bind | --bin | --bi)
206     ac_prev=bindir ;;
207   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
208     bindir="$ac_optarg" ;;
209
210   -build | --build | --buil | --bui | --bu)
211     ac_prev=build ;;
212   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
213     build="$ac_optarg" ;;
214
215   -cache-file | --cache-file | --cache-fil | --cache-fi \
216   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
217     ac_prev=cache_file ;;
218   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
219   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
220     cache_file="$ac_optarg" ;;
221
222   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
223     ac_prev=datadir ;;
224   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
225   | --da=*)
226     datadir="$ac_optarg" ;;
227
228   -disable-* | --disable-*)
229     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
230     # Reject names that are not valid shell variable names.
231     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
232       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
233     fi
234     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
235     eval "enable_${ac_feature}=no" ;;
236
237   -enable-* | --enable-*)
238     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
239     # Reject names that are not valid shell variable names.
240     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
241       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
242     fi
243     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
244     case "$ac_option" in
245       *=*) ;;
246       *) ac_optarg=yes ;;
247     esac
248     eval "enable_${ac_feature}='$ac_optarg'" ;;
249
250   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
251   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
252   | --exec | --exe | --ex)
253     ac_prev=exec_prefix ;;
254   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
255   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
256   | --exec=* | --exe=* | --ex=*)
257     exec_prefix="$ac_optarg" ;;
258
259   -gas | --gas | --ga | --g)
260     # Obsolete; use --with-gas.
261     with_gas=yes ;;
262
263   -help | --help | --hel | --he)
264     # Omit some internal or obsolete options to make the list less imposing.
265     # This message is too long to be a string in the A/UX 3.1 sh.
266     cat << EOF
267 Usage: configure [options] [host]
268 Options: [defaults in brackets after descriptions]
269 Configuration:
270   --cache-file=FILE       cache test results in FILE
271   --help                  print this message
272   --no-create             do not create output files
273   --quiet, --silent       do not print \`checking...' messages
274   --version               print the version of autoconf that created configure
275 Directory and file names:
276   --prefix=PREFIX         install architecture-independent files in PREFIX
277                           [$ac_default_prefix]
278   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
279                           [same as prefix]
280   --bindir=DIR            user executables in DIR [EPREFIX/bin]
281   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
282   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
283   --datadir=DIR           read-only architecture-independent data in DIR
284                           [PREFIX/share]
285   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
286   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
287                           [PREFIX/com]
288   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
289   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
290   --includedir=DIR        C header files in DIR [PREFIX/include]
291   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
292   --infodir=DIR           info documentation in DIR [PREFIX/info]
293   --mandir=DIR            man documentation in DIR [PREFIX/man]
294   --srcdir=DIR            find the sources in DIR [configure dir or ..]
295   --program-prefix=PREFIX prepend PREFIX to installed program names
296   --program-suffix=SUFFIX append SUFFIX to installed program names
297   --program-transform-name=PROGRAM
298                           run sed PROGRAM on installed program names
299 EOF
300     cat << EOF
301 Host type:
302   --build=BUILD           configure for building on BUILD [BUILD=HOST]
303   --host=HOST             configure for HOST [guessed]
304   --target=TARGET         configure for TARGET [TARGET=HOST]
305 Features and packages:
306   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
307   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
308   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
309   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
310   --x-includes=DIR        X include files are in DIR
311   --x-libraries=DIR       X library files are in DIR
312 EOF
313     if test -n "$ac_help"; then
314       echo "--enable and --with options recognized:$ac_help"
315     fi
316     exit 0 ;;
317
318   -host | --host | --hos | --ho)
319     ac_prev=host ;;
320   -host=* | --host=* | --hos=* | --ho=*)
321     host="$ac_optarg" ;;
322
323   -includedir | --includedir | --includedi | --included | --include \
324   | --includ | --inclu | --incl | --inc)
325     ac_prev=includedir ;;
326   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
327   | --includ=* | --inclu=* | --incl=* | --inc=*)
328     includedir="$ac_optarg" ;;
329
330   -infodir | --infodir | --infodi | --infod | --info | --inf)
331     ac_prev=infodir ;;
332   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
333     infodir="$ac_optarg" ;;
334
335   -libdir | --libdir | --libdi | --libd)
336     ac_prev=libdir ;;
337   -libdir=* | --libdir=* | --libdi=* | --libd=*)
338     libdir="$ac_optarg" ;;
339
340   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
341   | --libexe | --libex | --libe)
342     ac_prev=libexecdir ;;
343   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
344   | --libexe=* | --libex=* | --libe=*)
345     libexecdir="$ac_optarg" ;;
346
347   -localstatedir | --localstatedir | --localstatedi | --localstated \
348   | --localstate | --localstat | --localsta | --localst \
349   | --locals | --local | --loca | --loc | --lo)
350     ac_prev=localstatedir ;;
351   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
352   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
353   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
354     localstatedir="$ac_optarg" ;;
355
356   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
357     ac_prev=mandir ;;
358   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
359     mandir="$ac_optarg" ;;
360
361   -nfp | --nfp | --nf)
362     # Obsolete; use --without-fp.
363     with_fp=no ;;
364
365   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
366   | --no-cr | --no-c)
367     no_create=yes ;;
368
369   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
370   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
371     no_recursion=yes ;;
372
373   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
374   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
375   | --oldin | --oldi | --old | --ol | --o)
376     ac_prev=oldincludedir ;;
377   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
378   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
379   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
380     oldincludedir="$ac_optarg" ;;
381
382   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
383     ac_prev=prefix ;;
384   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
385     prefix="$ac_optarg" ;;
386
387   -program-prefix | --program-prefix | --program-prefi | --program-pref \
388   | --program-pre | --program-pr | --program-p)
389     ac_prev=program_prefix ;;
390   -program-prefix=* | --program-prefix=* | --program-prefi=* \
391   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
392     program_prefix="$ac_optarg" ;;
393
394   -program-suffix | --program-suffix | --program-suffi | --program-suff \
395   | --program-suf | --program-su | --program-s)
396     ac_prev=program_suffix ;;
397   -program-suffix=* | --program-suffix=* | --program-suffi=* \
398   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
399     program_suffix="$ac_optarg" ;;
400
401   -program-transform-name | --program-transform-name \
402   | --program-transform-nam | --program-transform-na \
403   | --program-transform-n | --program-transform- \
404   | --program-transform | --program-transfor \
405   | --program-transfo | --program-transf \
406   | --program-trans | --program-tran \
407   | --progr-tra | --program-tr | --program-t)
408     ac_prev=program_transform_name ;;
409   -program-transform-name=* | --program-transform-name=* \
410   | --program-transform-nam=* | --program-transform-na=* \
411   | --program-transform-n=* | --program-transform-=* \
412   | --program-transform=* | --program-transfor=* \
413   | --program-transfo=* | --program-transf=* \
414   | --program-trans=* | --program-tran=* \
415   | --progr-tra=* | --program-tr=* | --program-t=*)
416     program_transform_name="$ac_optarg" ;;
417
418   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
419   | -silent | --silent | --silen | --sile | --sil)
420     silent=yes ;;
421
422   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
423     ac_prev=sbindir ;;
424   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
425   | --sbi=* | --sb=*)
426     sbindir="$ac_optarg" ;;
427
428   -sharedstatedir | --sharedstatedir | --sharedstatedi \
429   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
430   | --sharedst | --shareds | --shared | --share | --shar \
431   | --sha | --sh)
432     ac_prev=sharedstatedir ;;
433   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
434   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
435   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
436   | --sha=* | --sh=*)
437     sharedstatedir="$ac_optarg" ;;
438
439   -site | --site | --sit)
440     ac_prev=site ;;
441   -site=* | --site=* | --sit=*)
442     site="$ac_optarg" ;;
443
444   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
445     ac_prev=srcdir ;;
446   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
447     srcdir="$ac_optarg" ;;
448
449   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
450   | --syscon | --sysco | --sysc | --sys | --sy)
451     ac_prev=sysconfdir ;;
452   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
453   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
454     sysconfdir="$ac_optarg" ;;
455
456   -target | --target | --targe | --targ | --tar | --ta | --t)
457     ac_prev=target ;;
458   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
459     target="$ac_optarg" ;;
460
461   -v | -verbose | --verbose | --verbos | --verbo | --verb)
462     verbose=yes ;;
463
464   -version | --version | --versio | --versi | --vers)
465     echo "configure generated by autoconf version 2.13.1"
466     exit 0 ;;
467
468   -with-* | --with-*)
469     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
470     # Reject names that are not valid shell variable names.
471     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
472       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
473     fi
474     ac_package=`echo $ac_package| sed 's/-/_/g'`
475     case "$ac_option" in
476       *=*) ;;
477       *) ac_optarg=yes ;;
478     esac
479     eval "with_${ac_package}='$ac_optarg'" ;;
480
481   -without-* | --without-*)
482     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
483     # Reject names that are not valid shell variable names.
484     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
485       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
486     fi
487     ac_package=`echo $ac_package| sed 's/-/_/g'`
488     eval "with_${ac_package}=no" ;;
489
490   --x)
491     # Obsolete; use --with-x.
492     with_x=yes ;;
493
494   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
495   | --x-incl | --x-inc | --x-in | --x-i)
496     ac_prev=x_includes ;;
497   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
498   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
499     x_includes="$ac_optarg" ;;
500
501   -x-libraries | --x-libraries | --x-librarie | --x-librari \
502   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
503     ac_prev=x_libraries ;;
504   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
505   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
506     x_libraries="$ac_optarg" ;;
507
508   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
509     ;;
510
511   *)
512     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
513       echo "configure: warning: $ac_option: invalid host type" 1>&2
514     fi
515     if test "x$nonopt" != xNONE; then
516       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
517     fi
518     nonopt="$ac_option"
519     ;;
520
521   esac
522 done
523
524 if test -n "$ac_prev"; then
525   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
526 fi
527
528 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
529
530 # File descriptor usage:
531 # 0 standard input
532 # 1 file creation
533 # 2 errors and warnings
534 # 3 some systems may open it to /dev/tty
535 # 4 used on the Kubota Titan
536 # 6 checking for... messages and results
537 # 5 compiler messages saved in config.log
538 if test "$silent" = yes; then
539   exec 6>/dev/null
540 else
541   exec 6>&1
542 fi
543 exec 5>./config.log
544
545 echo "\
546 This file contains any messages produced by compilers while
547 running configure, to aid debugging if configure makes a mistake.
548 " 1>&5
549
550 # Strip out --no-create and --no-recursion so they do not pile up.
551 # Also quote any args containing shell metacharacters.
552 ac_configure_args=
553 for ac_arg
554 do
555   case "$ac_arg" in
556   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
557   | --no-cr | --no-c) ;;
558   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
559   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
560   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
561   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
562   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
563   esac
564 done
565
566 # NLS nuisances.
567 # Only set these to C if already set.  These must not be set unconditionally
568 # because not all systems understand e.g. LANG=C (notably SCO).
569 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
570 # Non-C LC_CTYPE values break the ctype check.
571 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
572 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
573 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
574 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
575
576 # confdefs.h avoids OS command line length limits that DEFS can exceed.
577 rm -rf conftest* confdefs.h
578 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
579 echo > confdefs.h
580
581 # A filename unique to this package, relative to the directory that
582 # configure is in, which we can look for to find out if srcdir is correct.
583 ac_unique_file=build/version
584
585 # Find the source files, if location was not specified.
586 if test -z "$srcdir"; then
587   ac_srcdir_defaulted=yes
588   # Try the directory containing this script, then its parent.
589   ac_prog=$0
590   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
591   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
592   srcdir=$ac_confdir
593   if test ! -r $srcdir/$ac_unique_file; then
594     srcdir=..
595   fi
596 else
597   ac_srcdir_defaulted=no
598 fi
599 if test ! -r $srcdir/$ac_unique_file; then
600   if test "$ac_srcdir_defaulted" = yes; then
601     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
602   else
603     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
604   fi
605 fi
606 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
607
608 # Prefer explicitly selected file to automatically selected ones.
609 if test -z "$CONFIG_SITE"; then
610   if test "x$prefix" != xNONE; then
611     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
612   else
613     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
614   fi
615 fi
616 for ac_site_file in $CONFIG_SITE; do
617   if test -r "$ac_site_file"; then
618     echo "loading site script $ac_site_file"
619     . "$ac_site_file"
620   fi
621 done
622
623
624 ac_ext=c
625 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
626 ac_cpp='$CPP $CPPFLAGS'
627 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
628 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
629 cross_compiling=$ac_cv_prog_cc_cross
630
631 ac_exeext=
632 ac_objext=o
633 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
634   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
635   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
636     ac_n= ac_c='
637 ' ac_t='        '
638   else
639     ac_n=-n ac_c= ac_t=
640   fi
641 else
642   ac_n= ac_c='\c' ac_t=
643 fi
644
645
646 # set unset (borrowed from autoconf 2.14a)
647 if (unset FOO) >/dev/null 2>&1; then
648   ol_unset=unset
649 else
650   ol_unset=false
651 fi
652 # unset CDPATH
653 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
654
655 ac_aux_dir=
656 for ac_dir in build $srcdir/build; do
657   if test -f $ac_dir/install-sh; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/install-sh -c"
660     break
661   elif test -f $ac_dir/install.sh; then
662     ac_aux_dir=$ac_dir
663     ac_install_sh="$ac_aux_dir/install.sh -c"
664     break
665   elif test -f $ac_dir/shtool; then
666     ac_aux_dir=$ac_dir
667     ac_install_sh="$ac_aux_dir/shtool install -c"
668     break
669   fi
670 done
671 if test -z "$ac_aux_dir"; then
672   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
673 fi
674 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
675 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
676 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
677
678 OL_VERSION=`cat $ac_aux_dir/version`
679 if test -z "$OL_VERSION"; then
680         { echo "configure: error: could not determine version" 1>&2; exit 1; }
681 fi
682
683 echo "Configuring OpenLDAP $OL_VERSION ..."
684
685
686 echo $ac_n "checking host system type""... $ac_c" 1>&6
687 echo "configure:688: checking host system type" >&5
688 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
689
690 # Make sure we can run config.sub.
691   if $ac_config_sub sun4 >/dev/null 2>&1; then :
692     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
693   fi
694
695   ac_cv_host_alias=$host
696   case "$ac_cv_host_alias" in
697   NONE)
698     case $nonopt in
699     NONE)
700       if ac_cv_host_alias=`$ac_config_guess`; then :
701       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
702       fi ;;
703     *) ac_cv_host_alias=$nonopt ;;
704     esac ;;
705   esac
706
707   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
708   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 else
712   echo $ac_n "(cached) $ac_c" 1>&6
713 fi
714
715 echo "$ac_t""$ac_cv_host" 1>&6
716
717 host=$ac_cv_host
718 host_alias=$ac_cv_host_alias
719 host_cpu=$ac_cv_host_cpu
720 host_vendor=$ac_cv_host_vendor
721 host_os=$ac_cv_host_os
722
723
724
725
726
727 echo $ac_n "checking target system type""... $ac_c" 1>&6
728 echo "configure:729: checking target system type" >&5
729 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
730
731 # Make sure we can run config.sub.
732   if $ac_config_sub sun4 >/dev/null 2>&1; then :
733     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
734   fi
735
736   ac_cv_target_alias=$target
737   case "$ac_cv_target_alias" in
738   NONE)
739     case $nonopt in
740     NONE)
741       ac_cv_target_alias=$host_alias ;;
742
743     *) ac_cv_target_alias=$nonopt ;;
744     esac ;;
745   esac
746
747   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
748   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
749   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
750   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
751 else
752   echo $ac_n "(cached) $ac_c" 1>&6
753 fi
754
755 echo "$ac_t""$ac_cv_target" 1>&6
756
757 target=$ac_cv_target
758 target_alias=$ac_cv_target_alias
759 target_cpu=$ac_cv_target_cpu
760 target_vendor=$ac_cv_target_vendor
761 target_os=$ac_cv_target_os
762
763
764
765
766
767 echo $ac_n "checking build system type""... $ac_c" 1>&6
768 echo "configure:769: checking build system type" >&5
769 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
770
771 # Make sure we can run config.sub.
772   if $ac_config_sub sun4 >/dev/null 2>&1; then :
773     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
774   fi
775
776   ac_cv_build_alias=$build
777   case "$ac_cv_build_alias" in
778   NONE)
779     case $nonopt in
780     NONE)
781       ac_cv_build_alias=$host_alias ;;
782
783     *) ac_cv_build_alias=$nonopt ;;
784     esac ;;
785   esac
786
787   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
788   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
789   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
790   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
791 else
792   echo $ac_n "(cached) $ac_c" 1>&6
793 fi
794
795 echo "$ac_t""$ac_cv_build" 1>&6
796
797 build=$ac_cv_build
798 build_alias=$ac_cv_build_alias
799 build_cpu=$ac_cv_build_cpu
800 build_vendor=$ac_cv_build_vendor
801 build_os=$ac_cv_build_os
802
803
804
805
806
807 # Do some error checking and defaulting for the host and target type.
808 # The inputs are:
809 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
810 #
811 # The rules are:
812 # 1. You are not allowed to specify --host, --target, and nonopt at the
813 #    same time.
814 # 2. Host defaults to nonopt.
815 # 3. If nonopt is not specified, then host defaults to the current host,
816 #    as determined by config.guess.
817 # 4. Target and build default to nonopt.
818 # 5. If nonopt is not specified, then target and build default to host.
819
820 # The aliases save the names the user supplied, while $host etc.
821 # will get canonicalized.
822 case $host---$target---$nonopt in
823 NONE---*---* | *---NONE---* | *---*---NONE) ;;
824 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
825 esac
826
827 test "$host_alias" != "$target_alias" &&
828   test "$program_prefix$program_suffix$program_transform_name" = \
829     NONENONEs,x,x, &&
830   program_prefix=${target_alias}-
831
832
833 # Find a good install program.  We prefer a C program (faster),
834 # so one script is as good as another.  But avoid the broken or
835 # incompatible versions:
836 # SysV /etc/install, /usr/sbin/install
837 # SunOS /usr/etc/install
838 # IRIX /sbin/install
839 # AIX /bin/install
840 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
841 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
842 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
843 # ./install, which can be erroneously created by make from ./install.sh.
844 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
845 echo "configure:846: checking for a BSD compatible install" >&5
846 if test -z "$INSTALL"; then
847 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
848   echo $ac_n "(cached) $ac_c" 1>&6
849 else
850     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
851   for ac_dir in $PATH; do
852     # Account for people who put trailing slashes in PATH elements.
853     case "$ac_dir/" in
854     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
855     *)
856       # OSF1 and SCO ODT 3.0 have their own names for install.
857       # Don't use installbsd from OSF since it installs stuff as root
858       # by default.
859       for ac_prog in ginstall scoinst install; do
860         if test -f $ac_dir/$ac_prog; then
861           if test $ac_prog = install &&
862             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
863             # AIX install.  It has an incompatible calling convention.
864             :
865           elif test $ac_prog = install &&
866             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
867             # program-specific install script used by HP pwplus--don't use.
868             :
869           else
870             ac_cv_path_install="$ac_dir/$ac_prog -c"
871             break 2
872           fi
873         fi
874       done
875       ;;
876     esac
877   done
878   IFS="$ac_save_IFS"
879
880 fi
881   if test "${ac_cv_path_install+set}" = set; then
882     INSTALL="$ac_cv_path_install"
883   else
884     # As a last resort, use the slow shell script.  We don't cache a
885     # path for INSTALL within a source directory, because that will
886     # break other packages using the cache if that directory is
887     # removed, or if the path is relative.
888     INSTALL="$ac_install_sh"
889   fi
890 fi
891 echo "$ac_t""$INSTALL" 1>&6
892
893 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
894 # It thinks the first close brace ends the variable substitution.
895 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
896
897 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
898
899 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
900
901 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
902 echo "configure:903: checking whether build environment is sane" >&5
903 # Just in case
904 sleep 1
905 echo timestamp > conftestfile
906 # Do `set' in a subshell so we don't clobber the current shell's
907 # arguments.  Must try -L first in case configure is actually a
908 # symlink; some systems play weird games with the mod time of symlinks
909 # (eg FreeBSD returns the mod time of the symlink's containing
910 # directory).
911 if (
912    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
913    if test "$*" = "X"; then
914       # -L didn't work.
915       set X `ls -t $srcdir/configure conftestfile`
916    fi
917    if test "$*" != "X $srcdir/configure conftestfile" \
918       && test "$*" != "X conftestfile $srcdir/configure"; then
919
920       # If neither matched, then we have a broken ls.  This can happen
921       # if, for instance, CONFIG_SHELL is bash and it inherits a
922       # broken ls alias from the environment.  This has actually
923       # happened.  Such a system could not be considered "sane".
924       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
925 alias in your environment" 1>&2; exit 1; }
926    fi
927
928    test "$2" = conftestfile
929    )
930 then
931    # Ok.
932    :
933 else
934    { echo "configure: error: newly created file is older than distributed files!
935 Check your system clock" 1>&2; exit 1; }
936 fi
937 rm -f conftest*
938 echo "$ac_t""yes" 1>&6
939 if test "$program_transform_name" = s,x,x,; then
940   program_transform_name=
941 else
942   # Double any \ or $.  echo might interpret backslashes.
943   cat <<\EOF_SED > conftestsed
944 s,\\,\\\\,g; s,\$,$$,g
945 EOF_SED
946   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
947   rm -f conftestsed
948 fi
949 test "$program_prefix" != NONE &&
950   program_transform_name="s,^,${program_prefix},;$program_transform_name"
951 # Use a double $ so make ignores it.
952 test "$program_suffix" != NONE &&
953   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
954
955 # sed with no file args requires a program.
956 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
957
958 for ac_prog in mawk gawk nawk awk
959 do
960 # Extract the first word of "$ac_prog", so it can be a program name with args.
961 set dummy $ac_prog; ac_word=$2
962 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
963 echo "configure:964: checking for $ac_word" >&5
964 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
965   echo $ac_n "(cached) $ac_c" 1>&6
966 else
967   if test -n "$AWK"; then
968   ac_cv_prog_AWK="$AWK" # Let the user override the test.
969 else
970   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
971   ac_dummy="$PATH"
972   for ac_dir in $ac_dummy; do
973     test -z "$ac_dir" && ac_dir=.
974     if test -f $ac_dir/$ac_word; then
975       ac_cv_prog_AWK="$ac_prog"
976       break
977     fi
978   done
979   IFS="$ac_save_ifs"
980 fi
981 fi
982 AWK="$ac_cv_prog_AWK"
983 if test -n "$AWK"; then
984   echo "$ac_t""$AWK" 1>&6
985 else
986   echo "$ac_t""no" 1>&6
987 fi
988
989 test -n "$AWK" && break
990 done
991
992 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
993 echo "configure:994: checking whether ${MAKE-make} sets \${MAKE}" >&5
994 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
995 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
996   echo $ac_n "(cached) $ac_c" 1>&6
997 else
998   cat > conftestmake <<\EOF
999 all:
1000         @echo 'ac_maketemp="${MAKE}"'
1001 EOF
1002 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1003 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1004 if test -n "$ac_maketemp"; then
1005   eval ac_cv_prog_make_${ac_make}_set=yes
1006 else
1007   eval ac_cv_prog_make_${ac_make}_set=no
1008 fi
1009 rm -f conftestmake
1010 fi
1011 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1012   echo "$ac_t""yes" 1>&6
1013   SET_MAKE=
1014 else
1015   echo "$ac_t""no" 1>&6
1016   SET_MAKE="MAKE=${MAKE-make}"
1017 fi
1018
1019
1020
1021 PACKAGE=OpenLDAP
1022
1023 VERSION=$OL_VERSION
1024
1025 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1026   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1027 fi
1028
1029
1030
1031 missing_dir=`cd $ac_aux_dir && pwd`
1032 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1033 echo "configure:1034: checking for working aclocal" >&5
1034 # Run test in a subshell; some versions of sh will print an error if
1035 # an executable is not found, even if stderr is redirected.
1036 # Redirect stdin to placate older versions of autoconf.  Sigh.
1037 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1038    ACLOCAL=aclocal
1039    echo "$ac_t""found" 1>&6
1040 else
1041    ACLOCAL="$missing_dir/missing aclocal"
1042    echo "$ac_t""missing" 1>&6
1043 fi
1044
1045 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1046 echo "configure:1047: checking for working autoconf" >&5
1047 # Run test in a subshell; some versions of sh will print an error if
1048 # an executable is not found, even if stderr is redirected.
1049 # Redirect stdin to placate older versions of autoconf.  Sigh.
1050 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1051    AUTOCONF=autoconf
1052    echo "$ac_t""found" 1>&6
1053 else
1054    AUTOCONF="$missing_dir/missing autoconf"
1055    echo "$ac_t""missing" 1>&6
1056 fi
1057
1058 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1059 echo "configure:1060: checking for working automake" >&5
1060 # Run test in a subshell; some versions of sh will print an error if
1061 # an executable is not found, even if stderr is redirected.
1062 # Redirect stdin to placate older versions of autoconf.  Sigh.
1063 if (automake --version) < /dev/null > /dev/null 2>&1; then
1064    AUTOMAKE=automake
1065    echo "$ac_t""found" 1>&6
1066 else
1067    AUTOMAKE="$missing_dir/missing automake"
1068    echo "$ac_t""missing" 1>&6
1069 fi
1070
1071 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1072 echo "configure:1073: checking for working autoheader" >&5
1073 # Run test in a subshell; some versions of sh will print an error if
1074 # an executable is not found, even if stderr is redirected.
1075 # Redirect stdin to placate older versions of autoconf.  Sigh.
1076 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1077    AUTOHEADER=autoheader
1078    echo "$ac_t""found" 1>&6
1079 else
1080    AUTOHEADER="$missing_dir/missing autoheader"
1081    echo "$ac_t""missing" 1>&6
1082 fi
1083
1084 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1085 echo "configure:1086: checking for working makeinfo" >&5
1086 # Run test in a subshell; some versions of sh will print an error if
1087 # an executable is not found, even if stderr is redirected.
1088 # Redirect stdin to placate older versions of autoconf.  Sigh.
1089 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1090    MAKEINFO=makeinfo
1091    echo "$ac_t""found" 1>&6
1092 else
1093    MAKEINFO="$missing_dir/missing makeinfo"
1094    echo "$ac_t""missing" 1>&6
1095 fi
1096
1097 install_sh="$missing_dir/install-sh"
1098 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1099
1100 for ac_prog in gnutar gtar tar
1101 do
1102 # Extract the first word of "$ac_prog", so it can be a program name with args.
1103 set dummy $ac_prog; ac_word=$2
1104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1105 echo "configure:1106: checking for $ac_word" >&5
1106 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1107   echo $ac_n "(cached) $ac_c" 1>&6
1108 else
1109   if test -n "$AMTAR"; then
1110   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1111 else
1112   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1113   ac_dummy="$PATH"
1114   for ac_dir in $ac_dummy; do
1115     test -z "$ac_dir" && ac_dir=.
1116     if test -f $ac_dir/$ac_word; then
1117       ac_cv_prog_AMTAR="$ac_prog"
1118       break
1119     fi
1120   done
1121   IFS="$ac_save_ifs"
1122 fi
1123 fi
1124 AMTAR="$ac_cv_prog_AMTAR"
1125 if test -n "$AMTAR"; then
1126   echo "$ac_t""$AMTAR" 1>&6
1127 else
1128   echo "$ac_t""no" 1>&6
1129 fi
1130
1131 test -n "$AMTAR" && break
1132 done
1133
1134
1135 AMTARFLAGS=
1136 if test -n "$AMTAR"; then
1137   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1138         AMTARFLAGS=o
1139   fi
1140 fi
1141
1142
1143
1144 cat >> confdefs.h <<EOF
1145 #define OPENLDAP_PACKAGE "$PACKAGE"
1146 EOF
1147
1148 cat >> confdefs.h <<EOF
1149 #define OPENLDAP_VERSION "$VERSION"
1150 EOF
1151
1152
1153
1154
1155 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1156 echo "configure:1157: checking configure arguments" >&5
1157
1158
1159 top_builddir=`pwd`
1160
1161 ldap_subdir="/openldap"
1162
1163 # Check whether --with-subdir or --without-subdir was given.
1164 if test "${with_subdir+set}" = set; then
1165   withval="$with_subdir"
1166   case "$withval" in
1167         no) ldap_subdir=""
1168                 ;;
1169         yes)
1170                 ;;
1171         /*|\\*)
1172                 ldap_subdir="$withval"
1173                 ;;
1174         *)
1175                 ldap_subdir="/$withval"
1176                 ;;
1177 esac
1178
1179 fi
1180
1181
1182 # OpenLDAP --enable-debug
1183         # Check whether --enable-debug or --disable-debug was given.
1184 if test "${enable_debug+set}" = set; then
1185   enableval="$enable_debug"
1186   
1187         ol_arg=invalid
1188         for ol_val in auto yes no ; do
1189                 if test "$enableval" = "$ol_val" ; then
1190                         ol_arg="$ol_val"
1191                 fi
1192         done
1193         if test "$ol_arg" = "invalid" ; then
1194                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1195         fi
1196         ol_enable_debug="$ol_arg"
1197
1198 else
1199         ol_enable_debug="yes"
1200 fi
1201 # end --enable-debug
1202 # OpenLDAP --enable-syslog
1203         # Check whether --enable-syslog or --disable-syslog was given.
1204 if test "${enable_syslog+set}" = set; then
1205   enableval="$enable_syslog"
1206   
1207         ol_arg=invalid
1208         for ol_val in auto yes no ; do
1209                 if test "$enableval" = "$ol_val" ; then
1210                         ol_arg="$ol_val"
1211                 fi
1212         done
1213         if test "$ol_arg" = "invalid" ; then
1214                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1215         fi
1216         ol_enable_syslog="$ol_arg"
1217
1218 else
1219         ol_enable_syslog="auto"
1220 fi
1221 # end --enable-syslog
1222 # OpenLDAP --enable-proctitle
1223         # Check whether --enable-proctitle or --disable-proctitle was given.
1224 if test "${enable_proctitle+set}" = set; then
1225   enableval="$enable_proctitle"
1226   
1227         ol_arg=invalid
1228         for ol_val in auto yes no ; do
1229                 if test "$enableval" = "$ol_val" ; then
1230                         ol_arg="$ol_val"
1231                 fi
1232         done
1233         if test "$ol_arg" = "invalid" ; then
1234                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1235         fi
1236         ol_enable_proctitle="$ol_arg"
1237
1238 else
1239         ol_enable_proctitle="yes"
1240 fi
1241 # end --enable-proctitle
1242 # OpenLDAP --enable-cache
1243         # Check whether --enable-cache or --disable-cache was given.
1244 if test "${enable_cache+set}" = set; then
1245   enableval="$enable_cache"
1246   
1247         ol_arg=invalid
1248         for ol_val in auto yes no ; do
1249                 if test "$enableval" = "$ol_val" ; then
1250                         ol_arg="$ol_val"
1251                 fi
1252         done
1253         if test "$ol_arg" = "invalid" ; then
1254                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1255         fi
1256         ol_enable_cache="$ol_arg"
1257
1258 else
1259         ol_enable_cache="yes"
1260 fi
1261 # end --enable-cache
1262 # OpenLDAP --enable-referrals
1263         # Check whether --enable-referrals or --disable-referrals was given.
1264 if test "${enable_referrals+set}" = set; then
1265   enableval="$enable_referrals"
1266   
1267         ol_arg=invalid
1268         for ol_val in auto yes no ; do
1269                 if test "$enableval" = "$ol_val" ; then
1270                         ol_arg="$ol_val"
1271                 fi
1272         done
1273         if test "$ol_arg" = "invalid" ; then
1274                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1275         fi
1276         ol_enable_referrals="$ol_arg"
1277
1278 else
1279         ol_enable_referrals="yes"
1280 fi
1281 # end --enable-referrals
1282 # OpenLDAP --enable-kbind
1283         # Check whether --enable-kbind or --disable-kbind was given.
1284 if test "${enable_kbind+set}" = set; then
1285   enableval="$enable_kbind"
1286   
1287         ol_arg=invalid
1288         for ol_val in auto yes no ; do
1289                 if test "$enableval" = "$ol_val" ; then
1290                         ol_arg="$ol_val"
1291                 fi
1292         done
1293         if test "$ol_arg" = "invalid" ; then
1294                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1295         fi
1296         ol_enable_kbind="$ol_arg"
1297
1298 else
1299         ol_enable_kbind="auto"
1300 fi
1301 # end --enable-kbind
1302 # OpenLDAP --enable-cldap
1303         # Check whether --enable-cldap or --disable-cldap was given.
1304 if test "${enable_cldap+set}" = set; then
1305   enableval="$enable_cldap"
1306   
1307         ol_arg=invalid
1308         for ol_val in auto yes no ; do
1309                 if test "$enableval" = "$ol_val" ; then
1310                         ol_arg="$ol_val"
1311                 fi
1312         done
1313         if test "$ol_arg" = "invalid" ; then
1314                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1315         fi
1316         ol_enable_cldap="$ol_arg"
1317
1318 else
1319         ol_enable_cldap="no"
1320 fi
1321 # end --enable-cldap
1322 # OpenLDAP --enable-ipv6
1323         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1324 if test "${enable_ipv6+set}" = set; then
1325   enableval="$enable_ipv6"
1326   
1327         ol_arg=invalid
1328         for ol_val in auto yes no ; do
1329                 if test "$enableval" = "$ol_val" ; then
1330                         ol_arg="$ol_val"
1331                 fi
1332         done
1333         if test "$ol_arg" = "invalid" ; then
1334                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1335         fi
1336         ol_enable_ipv6="$ol_arg"
1337
1338 else
1339         ol_enable_ipv6="auto"
1340 fi
1341 # end --enable-ipv6
1342 # OpenLDAP --enable-unix
1343         # Check whether --enable-unix or --disable-unix was given.
1344 if test "${enable_unix+set}" = set; then
1345   enableval="$enable_unix"
1346   
1347         ol_arg=invalid
1348         for ol_val in auto yes no ; do
1349                 if test "$enableval" = "$ol_val" ; then
1350                         ol_arg="$ol_val"
1351                 fi
1352         done
1353         if test "$ol_arg" = "invalid" ; then
1354                 { echo "configure: error: bad value $enableval for --enable-unix" 1>&2; exit 1; }
1355         fi
1356         ol_enable_unix="$ol_arg"
1357
1358 else
1359         ol_enable_unix="auto"
1360 fi
1361 # end --enable-unix
1362 # OpenLDAP --enable-x_compile
1363         # Check whether --enable-x_compile or --disable-x_compile was given.
1364 if test "${enable_x_compile+set}" = set; then
1365   enableval="$enable_x_compile"
1366   
1367         ol_arg=invalid
1368         for ol_val in yes no ; do
1369                 if test "$enableval" = "$ol_val" ; then
1370                         ol_arg="$ol_val"
1371                 fi
1372         done
1373         if test "$ol_arg" = "invalid" ; then
1374                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1375         fi
1376         ol_enable_x_compile="$ol_arg"
1377
1378 else
1379         ol_enable_x_compile="no"
1380 fi
1381 # end --enable-x_compile
1382
1383
1384 # OpenLDAP --with-cyrus_sasl
1385         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1386 if test "${with_cyrus_sasl+set}" = set; then
1387   withval="$with_cyrus_sasl"
1388   
1389         ol_arg=invalid
1390         for ol_val in auto yes no  ; do
1391                 if test "$withval" = "$ol_val" ; then
1392                         ol_arg="$ol_val"
1393                 fi
1394         done
1395         if test "$ol_arg" = "invalid" ; then
1396                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1397         fi
1398         ol_with_cyrus_sasl="$ol_arg"
1399
1400 else
1401         ol_with_cyrus_sasl="auto"
1402 fi
1403 # end --with-cyrus_sasl
1404
1405 # OpenLDAP --with-fetch
1406         # Check whether --with-fetch or --without-fetch was given.
1407 if test "${with_fetch+set}" = set; then
1408   withval="$with_fetch"
1409   
1410         ol_arg=invalid
1411         for ol_val in auto yes no  ; do
1412                 if test "$withval" = "$ol_val" ; then
1413                         ol_arg="$ol_val"
1414                 fi
1415         done
1416         if test "$ol_arg" = "invalid" ; then
1417                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1418         fi
1419         ol_with_fetch="$ol_arg"
1420
1421 else
1422         ol_with_fetch="auto"
1423 fi
1424 # end --with-fetch
1425
1426 # OpenLDAP --with-kerberos
1427         # Check whether --with-kerberos or --without-kerberos was given.
1428 if test "${with_kerberos+set}" = set; then
1429   withval="$with_kerberos"
1430   
1431         ol_arg=invalid
1432         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1433                 if test "$withval" = "$ol_val" ; then
1434                         ol_arg="$ol_val"
1435                 fi
1436         done
1437         if test "$ol_arg" = "invalid" ; then
1438                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1439         fi
1440         ol_with_kerberos="$ol_arg"
1441
1442 else
1443         ol_with_kerberos="auto"
1444 fi
1445 # end --with-kerberos
1446
1447 # OpenLDAP --with-readline
1448         # Check whether --with-readline or --without-readline was given.
1449 if test "${with_readline+set}" = set; then
1450   withval="$with_readline"
1451   
1452         ol_arg=invalid
1453         for ol_val in auto yes no  ; do
1454                 if test "$withval" = "$ol_val" ; then
1455                         ol_arg="$ol_val"
1456                 fi
1457         done
1458         if test "$ol_arg" = "invalid" ; then
1459                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1460         fi
1461         ol_with_readline="$ol_arg"
1462
1463 else
1464         ol_with_readline="auto"
1465 fi
1466 # end --with-readline
1467
1468 # OpenLDAP --with-threads
1469         # Check whether --with-threads or --without-threads was given.
1470 if test "${with_threads+set}" = set; then
1471   withval="$with_threads"
1472   
1473         ol_arg=invalid
1474         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1475                 if test "$withval" = "$ol_val" ; then
1476                         ol_arg="$ol_val"
1477                 fi
1478         done
1479         if test "$ol_arg" = "invalid" ; then
1480                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1481         fi
1482         ol_with_threads="$ol_arg"
1483
1484 else
1485         ol_with_threads="auto"
1486 fi
1487 # end --with-threads
1488
1489 # OpenLDAP --with-tls
1490         # Check whether --with-tls or --without-tls was given.
1491 if test "${with_tls+set}" = set; then
1492   withval="$with_tls"
1493   
1494         ol_arg=invalid
1495         for ol_val in auto ssleay openssl yes no  ; do
1496                 if test "$withval" = "$ol_val" ; then
1497                         ol_arg="$ol_val"
1498                 fi
1499         done
1500         if test "$ol_arg" = "invalid" ; then
1501                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1502         fi
1503         ol_with_tls="$ol_arg"
1504
1505 else
1506         ol_with_tls="auto"
1507 fi
1508 # end --with-tls
1509
1510 # OpenLDAP --with-yielding_select
1511         # Check whether --with-yielding_select or --without-yielding_select was given.
1512 if test "${with_yielding_select+set}" = set; then
1513   withval="$with_yielding_select"
1514   
1515         ol_arg=invalid
1516         for ol_val in auto yes no manual  ; do
1517                 if test "$withval" = "$ol_val" ; then
1518                         ol_arg="$ol_val"
1519                 fi
1520         done
1521         if test "$ol_arg" = "invalid" ; then
1522                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1523         fi
1524         ol_with_yielding_select="$ol_arg"
1525
1526 else
1527         ol_with_yielding_select="auto"
1528 fi
1529 # end --with-yielding_select
1530
1531
1532
1533 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1534 if test "${with_xxslapdoptions+set}" = set; then
1535   withval="$with_xxslapdoptions"
1536   :
1537 fi
1538
1539 # OpenLDAP --enable-slapd
1540         # Check whether --enable-slapd or --disable-slapd was given.
1541 if test "${enable_slapd+set}" = set; then
1542   enableval="$enable_slapd"
1543   
1544         ol_arg=invalid
1545         for ol_val in auto yes no ; do
1546                 if test "$enableval" = "$ol_val" ; then
1547                         ol_arg="$ol_val"
1548                 fi
1549         done
1550         if test "$ol_arg" = "invalid" ; then
1551                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1552         fi
1553         ol_enable_slapd="$ol_arg"
1554
1555 else
1556         ol_enable_slapd="yes"
1557 fi
1558 # end --enable-slapd
1559 # OpenLDAP --enable-cleartext
1560         # Check whether --enable-cleartext or --disable-cleartext was given.
1561 if test "${enable_cleartext+set}" = set; then
1562   enableval="$enable_cleartext"
1563   
1564         ol_arg=invalid
1565         for ol_val in auto yes no ; do
1566                 if test "$enableval" = "$ol_val" ; then
1567                         ol_arg="$ol_val"
1568                 fi
1569         done
1570         if test "$ol_arg" = "invalid" ; then
1571                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1572         fi
1573         ol_enable_cleartext="$ol_arg"
1574
1575 else
1576         ol_enable_cleartext="yes"
1577 fi
1578 # end --enable-cleartext
1579 # OpenLDAP --enable-crypt
1580         # Check whether --enable-crypt or --disable-crypt was given.
1581 if test "${enable_crypt+set}" = set; then
1582   enableval="$enable_crypt"
1583   
1584         ol_arg=invalid
1585         for ol_val in auto yes no ; do
1586                 if test "$enableval" = "$ol_val" ; then
1587                         ol_arg="$ol_val"
1588                 fi
1589         done
1590         if test "$ol_arg" = "invalid" ; then
1591                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1592         fi
1593         ol_enable_crypt="$ol_arg"
1594
1595 else
1596         ol_enable_crypt="auto"
1597 fi
1598 # end --enable-crypt
1599 # OpenLDAP --enable-kpasswd
1600         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1601 if test "${enable_kpasswd+set}" = set; then
1602   enableval="$enable_kpasswd"
1603   
1604         ol_arg=invalid
1605         for ol_val in auto yes no ; do
1606                 if test "$enableval" = "$ol_val" ; then
1607                         ol_arg="$ol_val"
1608                 fi
1609         done
1610         if test "$ol_arg" = "invalid" ; then
1611                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1612         fi
1613         ol_enable_kpasswd="$ol_arg"
1614
1615 else
1616         ol_enable_kpasswd="no"
1617 fi
1618 # end --enable-kpasswd
1619 # OpenLDAP --enable-spasswd
1620         # Check whether --enable-spasswd or --disable-spasswd was given.
1621 if test "${enable_spasswd+set}" = set; then
1622   enableval="$enable_spasswd"
1623   
1624         ol_arg=invalid
1625         for ol_val in auto yes no ; do
1626                 if test "$enableval" = "$ol_val" ; then
1627                         ol_arg="$ol_val"
1628                 fi
1629         done
1630         if test "$ol_arg" = "invalid" ; then
1631                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1632         fi
1633         ol_enable_spasswd="$ol_arg"
1634
1635 else
1636         ol_enable_spasswd="no"
1637 fi
1638 # end --enable-spasswd
1639 # OpenLDAP --enable-modules
1640         # Check whether --enable-modules or --disable-modules was given.
1641 if test "${enable_modules+set}" = set; then
1642   enableval="$enable_modules"
1643   
1644         ol_arg=invalid
1645         for ol_val in auto yes no ; do
1646                 if test "$enableval" = "$ol_val" ; then
1647                         ol_arg="$ol_val"
1648                 fi
1649         done
1650         if test "$ol_arg" = "invalid" ; then
1651                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1652         fi
1653         ol_enable_modules="$ol_arg"
1654
1655 else
1656         ol_enable_modules="no"
1657 fi
1658 # end --enable-modules
1659 # OpenLDAP --enable-multimaster
1660         # Check whether --enable-multimaster or --disable-multimaster was given.
1661 if test "${enable_multimaster+set}" = set; then
1662   enableval="$enable_multimaster"
1663   
1664         ol_arg=invalid
1665         for ol_val in auto yes no ; do
1666                 if test "$enableval" = "$ol_val" ; then
1667                         ol_arg="$ol_val"
1668                 fi
1669         done
1670         if test "$ol_arg" = "invalid" ; then
1671                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1672         fi
1673         ol_enable_multimaster="$ol_arg"
1674
1675 else
1676         ol_enable_multimaster="no"
1677 fi
1678 # end --enable-multimaster
1679 # OpenLDAP --enable-phonetic
1680         # Check whether --enable-phonetic or --disable-phonetic was given.
1681 if test "${enable_phonetic+set}" = set; then
1682   enableval="$enable_phonetic"
1683   
1684         ol_arg=invalid
1685         for ol_val in auto yes no ; do
1686                 if test "$enableval" = "$ol_val" ; then
1687                         ol_arg="$ol_val"
1688                 fi
1689         done
1690         if test "$ol_arg" = "invalid" ; then
1691                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1692         fi
1693         ol_enable_phonetic="$ol_arg"
1694
1695 else
1696         ol_enable_phonetic="no"
1697 fi
1698 # end --enable-phonetic
1699 # OpenLDAP --enable-quipu
1700         # Check whether --enable-quipu or --disable-quipu was given.
1701 if test "${enable_quipu+set}" = set; then
1702   enableval="$enable_quipu"
1703   
1704         ol_arg=invalid
1705         for ol_val in auto yes no ; do
1706                 if test "$enableval" = "$ol_val" ; then
1707                         ol_arg="$ol_val"
1708                 fi
1709         done
1710         if test "$ol_arg" = "invalid" ; then
1711                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1712         fi
1713         ol_enable_quipu="$ol_arg"
1714
1715 else
1716         ol_enable_quipu="no"
1717 fi
1718 # end --enable-quipu
1719 # OpenLDAP --enable-rlookups
1720         # Check whether --enable-rlookups or --disable-rlookups was given.
1721 if test "${enable_rlookups+set}" = set; then
1722   enableval="$enable_rlookups"
1723   
1724         ol_arg=invalid
1725         for ol_val in auto yes no ; do
1726                 if test "$enableval" = "$ol_val" ; then
1727                         ol_arg="$ol_val"
1728                 fi
1729         done
1730         if test "$ol_arg" = "invalid" ; then
1731                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1732         fi
1733         ol_enable_rlookups="$ol_arg"
1734
1735 else
1736         ol_enable_rlookups="auto"
1737 fi
1738 # end --enable-rlookups
1739 # OpenLDAP --enable-aci
1740         # Check whether --enable-aci or --disable-aci was given.
1741 if test "${enable_aci+set}" = set; then
1742   enableval="$enable_aci"
1743   
1744         ol_arg=invalid
1745         for ol_val in auto yes no ; do
1746                 if test "$enableval" = "$ol_val" ; then
1747                         ol_arg="$ol_val"
1748                 fi
1749         done
1750         if test "$ol_arg" = "invalid" ; then
1751                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1752         fi
1753         ol_enable_aci="$ol_arg"
1754
1755 else
1756         ol_enable_aci="no"
1757 fi
1758 # end --enable-aci
1759 # OpenLDAP --enable-wrappers
1760         # Check whether --enable-wrappers or --disable-wrappers was given.
1761 if test "${enable_wrappers+set}" = set; then
1762   enableval="$enable_wrappers"
1763   
1764         ol_arg=invalid
1765         for ol_val in auto yes no ; do
1766                 if test "$enableval" = "$ol_val" ; then
1767                         ol_arg="$ol_val"
1768                 fi
1769         done
1770         if test "$ol_arg" = "invalid" ; then
1771                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1772         fi
1773         ol_enable_wrappers="$ol_arg"
1774
1775 else
1776         ol_enable_wrappers="no"
1777 fi
1778 # end --enable-wrappers
1779 # OpenLDAP --enable-dynamic
1780         # Check whether --enable-dynamic or --disable-dynamic was given.
1781 if test "${enable_dynamic+set}" = set; then
1782   enableval="$enable_dynamic"
1783   
1784         ol_arg=invalid
1785         for ol_val in auto yes no ; do
1786                 if test "$enableval" = "$ol_val" ; then
1787                         ol_arg="$ol_val"
1788                 fi
1789         done
1790         if test "$ol_arg" = "invalid" ; then
1791                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1792         fi
1793         ol_enable_dynamic="$ol_arg"
1794
1795 else
1796         ol_enable_dynamic="no"
1797 fi
1798 # end --enable-dynamic
1799
1800 # OpenLDAP --enable-dnssrv
1801         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1802 if test "${enable_dnssrv+set}" = set; then
1803   enableval="$enable_dnssrv"
1804   
1805         ol_arg=invalid
1806         for ol_val in auto yes no ; do
1807                 if test "$enableval" = "$ol_val" ; then
1808                         ol_arg="$ol_val"
1809                 fi
1810         done
1811         if test "$ol_arg" = "invalid" ; then
1812                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1813         fi
1814         ol_enable_dnssrv="$ol_arg"
1815
1816 else
1817         ol_enable_dnssrv="no"
1818 fi
1819 # end --enable-dnssrv
1820 # OpenLDAP --with-dnssrv_module
1821         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1822 if test "${with_dnssrv_module+set}" = set; then
1823   withval="$with_dnssrv_module"
1824   
1825         ol_arg=invalid
1826         for ol_val in static dynamic ; do
1827                 if test "$withval" = "$ol_val" ; then
1828                         ol_arg="$ol_val"
1829                 fi
1830         done
1831         if test "$ol_arg" = "invalid" ; then
1832                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1833         fi
1834         ol_with_dnssrv_module="$ol_arg"
1835
1836 else
1837         ol_with_dnssrv_module="static"
1838 fi
1839 # end --with-dnssrv_module
1840
1841 # OpenLDAP --enable-ldap
1842         # Check whether --enable-ldap or --disable-ldap was given.
1843 if test "${enable_ldap+set}" = set; then
1844   enableval="$enable_ldap"
1845   
1846         ol_arg=invalid
1847         for ol_val in auto yes no ; do
1848                 if test "$enableval" = "$ol_val" ; then
1849                         ol_arg="$ol_val"
1850                 fi
1851         done
1852         if test "$ol_arg" = "invalid" ; then
1853                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1854         fi
1855         ol_enable_ldap="$ol_arg"
1856
1857 else
1858         ol_enable_ldap="no"
1859 fi
1860 # end --enable-ldap
1861 # OpenLDAP --with-ldap_module
1862         # Check whether --with-ldap_module or --without-ldap_module was given.
1863 if test "${with_ldap_module+set}" = set; then
1864   withval="$with_ldap_module"
1865   
1866         ol_arg=invalid
1867         for ol_val in static dynamic ; do
1868                 if test "$withval" = "$ol_val" ; then
1869                         ol_arg="$ol_val"
1870                 fi
1871         done
1872         if test "$ol_arg" = "invalid" ; then
1873                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1874         fi
1875         ol_with_ldap_module="$ol_arg"
1876
1877 else
1878         ol_with_ldap_module="static"
1879 fi
1880 # end --with-ldap_module
1881
1882 # OpenLDAP --enable-ldbm
1883         # Check whether --enable-ldbm or --disable-ldbm was given.
1884 if test "${enable_ldbm+set}" = set; then
1885   enableval="$enable_ldbm"
1886   
1887         ol_arg=invalid
1888         for ol_val in auto yes no ; do
1889                 if test "$enableval" = "$ol_val" ; then
1890                         ol_arg="$ol_val"
1891                 fi
1892         done
1893         if test "$ol_arg" = "invalid" ; then
1894                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1895         fi
1896         ol_enable_ldbm="$ol_arg"
1897
1898 else
1899         ol_enable_ldbm="yes"
1900 fi
1901 # end --enable-ldbm
1902 # OpenLDAP --with-ldbm_api
1903         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1904 if test "${with_ldbm_api+set}" = set; then
1905   withval="$with_ldbm_api"
1906   
1907         ol_arg=invalid
1908         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1909                 if test "$withval" = "$ol_val" ; then
1910                         ol_arg="$ol_val"
1911                 fi
1912         done
1913         if test "$ol_arg" = "invalid" ; then
1914                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1915         fi
1916         ol_with_ldbm_api="$ol_arg"
1917
1918 else
1919         ol_with_ldbm_api="auto"
1920 fi
1921 # end --with-ldbm_api
1922
1923 # OpenLDAP --with-ldbm_module
1924         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1925 if test "${with_ldbm_module+set}" = set; then
1926   withval="$with_ldbm_module"
1927   
1928         ol_arg=invalid
1929         for ol_val in static dynamic ; do
1930                 if test "$withval" = "$ol_val" ; then
1931                         ol_arg="$ol_val"
1932                 fi
1933         done
1934         if test "$ol_arg" = "invalid" ; then
1935                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1936         fi
1937         ol_with_ldbm_module="$ol_arg"
1938
1939 else
1940         ol_with_ldbm_module="static"
1941 fi
1942 # end --with-ldbm_module
1943
1944 # OpenLDAP --with-ldbm_type
1945         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1946 if test "${with_ldbm_type+set}" = set; then
1947   withval="$with_ldbm_type"
1948   
1949         ol_arg=invalid
1950         for ol_val in auto btree hash ; do
1951                 if test "$withval" = "$ol_val" ; then
1952                         ol_arg="$ol_val"
1953                 fi
1954         done
1955         if test "$ol_arg" = "invalid" ; then
1956                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1957         fi
1958         ol_with_ldbm_type="$ol_arg"
1959
1960 else
1961         ol_with_ldbm_type="auto"
1962 fi
1963 # end --with-ldbm_type
1964
1965 # OpenLDAP --enable-passwd
1966         # Check whether --enable-passwd or --disable-passwd was given.
1967 if test "${enable_passwd+set}" = set; then
1968   enableval="$enable_passwd"
1969   
1970         ol_arg=invalid
1971         for ol_val in auto yes no ; do
1972                 if test "$enableval" = "$ol_val" ; then
1973                         ol_arg="$ol_val"
1974                 fi
1975         done
1976         if test "$ol_arg" = "invalid" ; then
1977                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1978         fi
1979         ol_enable_passwd="$ol_arg"
1980
1981 else
1982         ol_enable_passwd="no"
1983 fi
1984 # end --enable-passwd
1985 # OpenLDAP --with-passwd_module
1986         # Check whether --with-passwd_module or --without-passwd_module was given.
1987 if test "${with_passwd_module+set}" = set; then
1988   withval="$with_passwd_module"
1989   
1990         ol_arg=invalid
1991         for ol_val in static dynamic ; do
1992                 if test "$withval" = "$ol_val" ; then
1993                         ol_arg="$ol_val"
1994                 fi
1995         done
1996         if test "$ol_arg" = "invalid" ; then
1997                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1998         fi
1999         ol_with_passwd_module="$ol_arg"
2000
2001 else
2002         ol_with_passwd_module="static"
2003 fi
2004 # end --with-passwd_module
2005
2006 # OpenLDAP --enable-perl
2007         # Check whether --enable-perl or --disable-perl was given.
2008 if test "${enable_perl+set}" = set; then
2009   enableval="$enable_perl"
2010   
2011         ol_arg=invalid
2012         for ol_val in auto yes no ; do
2013                 if test "$enableval" = "$ol_val" ; then
2014                         ol_arg="$ol_val"
2015                 fi
2016         done
2017         if test "$ol_arg" = "invalid" ; then
2018                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2019         fi
2020         ol_enable_perl="$ol_arg"
2021
2022 else
2023         ol_enable_perl="no"
2024 fi
2025 # end --enable-perl
2026 # OpenLDAP --with-perl_module
2027         # Check whether --with-perl_module or --without-perl_module was given.
2028 if test "${with_perl_module+set}" = set; then
2029   withval="$with_perl_module"
2030   
2031         ol_arg=invalid
2032         for ol_val in static dynamic ; do
2033                 if test "$withval" = "$ol_val" ; then
2034                         ol_arg="$ol_val"
2035                 fi
2036         done
2037         if test "$ol_arg" = "invalid" ; then
2038                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2039         fi
2040         ol_with_perl_module="$ol_arg"
2041
2042 else
2043         ol_with_perl_module="static"
2044 fi
2045 # end --with-perl_module
2046
2047 # OpenLDAP --enable-shell
2048         # Check whether --enable-shell or --disable-shell was given.
2049 if test "${enable_shell+set}" = set; then
2050   enableval="$enable_shell"
2051   
2052         ol_arg=invalid
2053         for ol_val in auto yes no ; do
2054                 if test "$enableval" = "$ol_val" ; then
2055                         ol_arg="$ol_val"
2056                 fi
2057         done
2058         if test "$ol_arg" = "invalid" ; then
2059                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2060         fi
2061         ol_enable_shell="$ol_arg"
2062
2063 else
2064         ol_enable_shell="no"
2065 fi
2066 # end --enable-shell
2067 # OpenLDAP --with-shell_module
2068         # Check whether --with-shell_module or --without-shell_module was given.
2069 if test "${with_shell_module+set}" = set; then
2070   withval="$with_shell_module"
2071   
2072         ol_arg=invalid
2073         for ol_val in static dynamic ; do
2074                 if test "$withval" = "$ol_val" ; then
2075                         ol_arg="$ol_val"
2076                 fi
2077         done
2078         if test "$ol_arg" = "invalid" ; then
2079                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2080         fi
2081         ol_with_shell_module="$ol_arg"
2082
2083 else
2084         ol_with_shell_module="static"
2085 fi
2086 # end --with-shell_module
2087
2088 # OpenLDAP --enable-sql
2089         # Check whether --enable-sql or --disable-sql was given.
2090 if test "${enable_sql+set}" = set; then
2091   enableval="$enable_sql"
2092   
2093         ol_arg=invalid
2094         for ol_val in auto yes no ; do
2095                 if test "$enableval" = "$ol_val" ; then
2096                         ol_arg="$ol_val"
2097                 fi
2098         done
2099         if test "$ol_arg" = "invalid" ; then
2100                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2101         fi
2102         ol_enable_sql="$ol_arg"
2103
2104 else
2105         ol_enable_sql="no"
2106 fi
2107 # end --enable-sql
2108 # OpenLDAP --with-sql_module
2109         # Check whether --with-sql_module or --without-sql_module was given.
2110 if test "${with_sql_module+set}" = set; then
2111   withval="$with_sql_module"
2112   
2113         ol_arg=invalid
2114         for ol_val in static dynamic ; do
2115                 if test "$withval" = "$ol_val" ; then
2116                         ol_arg="$ol_val"
2117                 fi
2118         done
2119         if test "$ol_arg" = "invalid" ; then
2120                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2121         fi
2122         ol_with_sql_module="$ol_arg"
2123
2124 else
2125         ol_with_sql_module="static"
2126 fi
2127 # end --with-sql_module
2128
2129 # OpenLDAP --enable-tcl
2130         # Check whether --enable-tcl or --disable-tcl was given.
2131 if test "${enable_tcl+set}" = set; then
2132   enableval="$enable_tcl"
2133   
2134         ol_arg=invalid
2135         for ol_val in auto yes no ; do
2136                 if test "$enableval" = "$ol_val" ; then
2137                         ol_arg="$ol_val"
2138                 fi
2139         done
2140         if test "$ol_arg" = "invalid" ; then
2141                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2142         fi
2143         ol_enable_tcl="$ol_arg"
2144
2145 else
2146         ol_enable_tcl="no"
2147 fi
2148 # end --enable-tcl
2149 # OpenLDAP --with-tcl_module
2150         # Check whether --with-tcl_module or --without-tcl_module was given.
2151 if test "${with_tcl_module+set}" = set; then
2152   withval="$with_tcl_module"
2153   
2154         ol_arg=invalid
2155         for ol_val in static dynamic ; do
2156                 if test "$withval" = "$ol_val" ; then
2157                         ol_arg="$ol_val"
2158                 fi
2159         done
2160         if test "$ol_arg" = "invalid" ; then
2161                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2162         fi
2163         ol_with_tcl_module="$ol_arg"
2164
2165 else
2166         ol_with_tcl_module="static"
2167 fi
2168 # end --with-tcl_module
2169
2170
2171 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2172 if test "${with_xxslurpdoptions+set}" = set; then
2173   withval="$with_xxslurpdoptions"
2174   :
2175 fi
2176
2177 # OpenLDAP --enable-slurpd
2178         # Check whether --enable-slurpd or --disable-slurpd was given.
2179 if test "${enable_slurpd+set}" = set; then
2180   enableval="$enable_slurpd"
2181   
2182         ol_arg=invalid
2183         for ol_val in auto yes no ; do
2184                 if test "$enableval" = "$ol_val" ; then
2185                         ol_arg="$ol_val"
2186                 fi
2187         done
2188         if test "$ol_arg" = "invalid" ; then
2189                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2190         fi
2191         ol_enable_slurpd="$ol_arg"
2192
2193 else
2194         ol_enable_slurpd="auto"
2195 fi
2196 # end --enable-slurpd
2197
2198 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2199 if test "${with_xxliboptions+set}" = set; then
2200   withval="$with_xxliboptions"
2201   :
2202 fi
2203
2204 # Check whether --enable-static or --disable-static was given.
2205 if test "${enable_static+set}" = set; then
2206   enableval="$enable_static"
2207   p=${PACKAGE-default}
2208 case "$enableval" in
2209 yes) enable_static=yes ;;
2210 no) enable_static=no ;;
2211 *)
2212   enable_static=no
2213   # Look at the argument we got.  We use all the common list separators.
2214   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2215   for pkg in $enableval; do
2216     if test "X$pkg" = "X$p"; then
2217       enable_static=yes
2218     fi
2219   done
2220   IFS="$ac_save_ifs"
2221   ;;
2222 esac
2223 else
2224   enable_static=yes
2225 fi
2226
2227 # Check whether --enable-shared or --disable-shared was given.
2228 if test "${enable_shared+set}" = set; then
2229   enableval="$enable_shared"
2230   p=${PACKAGE-default}
2231 case "$enableval" in
2232 yes) enable_shared=yes ;;
2233 no) enable_shared=no ;;
2234 *)
2235   enable_shared=no
2236   # Look at the argument we got.  We use all the common list separators.
2237   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2238   for pkg in $enableval; do
2239     if test "X$pkg" = "X$p"; then
2240       enable_shared=yes
2241     fi
2242   done
2243   IFS="$ac_save_ifs"
2244   ;;
2245 esac
2246 else
2247   enable_shared=yes
2248 fi
2249
2250
2251
2252 # validate options
2253 if test $ol_enable_slapd = no ; then
2254                 if test $ol_enable_dnssrv = yes ; then
2255                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2256         fi
2257         if test $ol_enable_ldap = yes ; then
2258                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2259         fi
2260         if test $ol_enable_ldbm = yes ; then
2261                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2262         fi
2263         if test $ol_enable_passwd = yes ; then
2264                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2265         fi
2266         if test $ol_enable_perl = yes ; then
2267                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2268         fi
2269         if test $ol_enable_shell = yes ; then
2270                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2271         fi
2272         if test $ol_enable_tcl = yes ; then
2273                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2274         fi
2275         if test $ol_enable_sql = yes ; then
2276                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2277         fi
2278         if test $ol_enable_modules = yes ; then
2279                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2280         fi
2281         if test $ol_enable_multimaster = yes ; then
2282                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2283         fi
2284         if test $ol_enable_wrappers = yes ; then
2285                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2286         fi
2287         if test $ol_enable_phonetic = yes ; then
2288                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2289         fi
2290         if test $ol_enable_quipu = yes ; then
2291                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2292         fi
2293         if test $ol_enable_rlookups = yes ; then
2294                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2295         fi
2296         if test $ol_enable_aci = yes ; then
2297                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2298         fi
2299         if test $ol_with_ldbm_api != auto ; then
2300                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2301         fi
2302         if test $ol_with_ldbm_type != auto ; then
2303                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2304         fi
2305         if test $ol_with_dnssrv_module != static ; then
2306                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2307         fi
2308         if test $ol_with_ldap_module != static ; then
2309                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2310         fi
2311         if test $ol_with_ldbm_module != static ; then
2312                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2313         fi
2314         if test $ol_with_passwd_module != static ; then
2315                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2316         fi
2317         if test $ol_with_perl_module != static ; then
2318                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2319         fi
2320         if test $ol_with_shell_module != static ; then
2321                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2322         fi
2323         if test $ol_with_tcl_module != static ; then
2324                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2325         fi
2326         if test $ol_with_sql_module != static ; then
2327                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2328         fi
2329         if test $ol_enable_slurpd = yes ; then
2330                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2331         fi
2332
2333         # force settings to no
2334         ol_enable_dnssrv=no
2335         ol_enable_ldap=no
2336         ol_enable_ldbm=no
2337         ol_enable_passwd=no
2338         ol_enable_perl=no
2339         ol_enable_shell=no
2340         ol_enable_tcl=no
2341         ol_enable_sql=no
2342
2343         ol_enable_modules=no
2344         ol_enable_multimaster=no
2345         ol_enable_phonetic=no
2346         ol_enable_quipu=no
2347         ol_enable_rlookups=no
2348         ol_enable_aci=no
2349         ol_enable_wrappers=no
2350         ol_enable_dynamic=no
2351
2352         ol_with_ldbm_api=no
2353         ol_with_ldbm_type=no
2354
2355         ol_with_dnssrv_module=static
2356         ol_with_ldap_module=static
2357         ol_with_ldbm_module=static
2358         ol_with_passwd_module=static
2359         ol_with_perl_module=static
2360         ol_with_shell_module=static
2361         ol_with_tcl_module=static
2362         ol_with_sql_module=static
2363
2364         ol_enable_slurpd=no
2365
2366 elif test $ol_enable_ldbm = no ; then
2367         
2368         if test $ol_with_ldbm_api != auto ; then
2369                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2370         fi
2371
2372         if test $ol_with_ldbm_type != auto ; then
2373                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2374         fi
2375
2376         if test $ol_with_ldbm_module != static ; then
2377                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2378         fi
2379
2380         if test $ol_enable_modules != yes -a \
2381                 $ol_enable_dnssrv = no -a \
2382                 $ol_enable_ldap = no -a \
2383                 $ol_enable_passwd = no -a \
2384                 $ol_enable_perl = no -a \
2385                 $ol_enable_shell = no -a \
2386                 $ol_enable_sql = no -a \
2387                 $ol_enable_tcl = no ; then
2388                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2389         fi
2390
2391         ol_with_ldbm_api=no
2392         ol_with_ldbm_type=no
2393         ol_with_ldbm_module=static
2394
2395 else
2396                 if test $ol_with_ldbm_api = gdbm -a \
2397                 $ol_with_ldbm_type = btree ; then
2398                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2399         fi
2400         if test $ol_with_ldbm_api = mdbm -a \
2401                 $ol_with_ldbm_type = btree ; then
2402                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2403         fi
2404         if test $ol_with_ldbm_api = ndbm -a \
2405                 $ol_with_ldbm_type = btree ; then
2406                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2407         fi
2408 fi
2409
2410 if test $ol_enable_slurpd = yes ; then
2411                 if test $ol_with_threads = no ; then
2412                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2413         fi
2414 fi
2415
2416 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2417         if test $ol_with_kerberos = no ; then
2418                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2419         fi
2420 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2421         if test $ol_with_kerberos != auto ; then
2422                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2423         else
2424                 ol_with_kerberos=no
2425         fi
2426 fi
2427
2428 if test $ol_enable_spasswd = yes ; then
2429         if test $ol_with_cyrus_sasl = no ; then
2430                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2431         fi
2432         ol_link_spasswd=yes
2433 fi
2434
2435 echo "$ac_t""done" 1>&6
2436
2437 LDAP_LIBS=
2438 LDIF_LIBS=
2439 LDBM_LIBS=
2440 LTHREAD_LIBS=
2441 LUTIL_LIBS=
2442
2443 QUIPU_LIBS=
2444 SLAPD_LIBS=
2445 SLURPD_LIBS=
2446
2447 BUILD_SLAPD=no
2448 BUILD_SLURPD=no
2449
2450 BUILD_QUIPU=no
2451 BUILD_THREAD=no
2452
2453 BUILD_DNSSRV=no
2454 BUILD_LDAP=no
2455 BUILD_LDBM=no
2456 BUILD_PASSWD=no
2457 BUILD_PERL=no
2458 BUILD_SHELL=no
2459 BUILD_SQL=no
2460 BUILD_TCL=no
2461
2462 BUILD_DNSSRV_DYNAMIC=static
2463 BUILD_LDAP_DYNAMIC=static
2464 BUILD_LDBM_DYNAMIC=static
2465 BUILD_PASSWD_DYNAMIC=static
2466 BUILD_PERL_DYNAMIC=static
2467 BUILD_SHELL_DYNAMIC=static
2468 BUILD_TCL_DYNAMIC=static
2469 BUILD_SQL_DYNAMIC=static
2470
2471 SLAPD_MODULES_LDFLAGS=
2472 SLAPD_MODULES_CPPFLAGS=
2473 SLAPD_MODULES_LIST=
2474
2475 SLAPD_PERL_LDFLAGS=
2476 MOD_PERL_LDFLAGS=
2477 PERL_CPPFLAGS=
2478
2479 SLAPD_SQL_LDFLAGS=
2480 SLAPD_SQL_LIBS=
2481 SLAPD_SQL_INCLUDES=
2482
2483 MOD_TCL_LIB=
2484 KRB4_LIBS=
2485 KRB5_LIBS=
2486 READLINE_LIBS=
2487 SASL_LIBS=
2488 TERMCAP_LIBS=
2489 TLS_LIBS=
2490 MODULES_LIBS=
2491 AUTH_LIBS=
2492
2493
2494
2495 cat >> confdefs.h <<\EOF
2496 #define HAVE_MKVERSION 1
2497 EOF
2498
2499
2500
2501
2502 ol_aix_threads=no
2503 case "$target" in
2504 *-*-aix*)       if test -z "$CC" ; then
2505                 case "$ol_with_threads" in
2506                 auto | yes |  posix) ol_aix_threads=yes ;;
2507                 esac
2508         fi
2509 ;;
2510 esac
2511
2512 if test $ol_aix_threads = yes ; then
2513         if test -z "${CC}" ; then
2514                 for ac_prog in cc_r xlc_r cc
2515 do
2516 # Extract the first word of "$ac_prog", so it can be a program name with args.
2517 set dummy $ac_prog; ac_word=$2
2518 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2519 echo "configure:2520: checking for $ac_word" >&5
2520 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2521   echo $ac_n "(cached) $ac_c" 1>&6
2522 else
2523   if test -n "$CC"; then
2524   ac_cv_prog_CC="$CC" # Let the user override the test.
2525 else
2526   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2527   ac_dummy="$PATH"
2528   for ac_dir in $ac_dummy; do
2529     test -z "$ac_dir" && ac_dir=.
2530     if test -f $ac_dir/$ac_word; then
2531       ac_cv_prog_CC="$ac_prog"
2532       break
2533     fi
2534   done
2535   IFS="$ac_save_ifs"
2536 fi
2537 fi
2538 CC="$ac_cv_prog_CC"
2539 if test -n "$CC"; then
2540   echo "$ac_t""$CC" 1>&6
2541 else
2542   echo "$ac_t""no" 1>&6
2543 fi
2544
2545 test -n "$CC" && break
2546 done
2547
2548
2549                 if test "$CC" = cc ; then
2550                                                 if test $ol_with_threads != auto ; then
2551                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2552                         else
2553                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2554                         fi
2555                         ol_with_threads=no
2556                 fi
2557         fi
2558
2559         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2560                 ol_with_threads=posix
2561                 ol_cv_pthread_create=yes
2562         fi
2563 fi
2564
2565 if test -z "${CC}"; then
2566         for ac_prog in cc
2567 do
2568 # Extract the first word of "$ac_prog", so it can be a program name with args.
2569 set dummy $ac_prog; ac_word=$2
2570 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2571 echo "configure:2572: checking for $ac_word" >&5
2572 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2573   echo $ac_n "(cached) $ac_c" 1>&6
2574 else
2575   if test -n "$CC"; then
2576   ac_cv_prog_CC="$CC" # Let the user override the test.
2577 else
2578   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2579   ac_dummy="$PATH"
2580   for ac_dir in $ac_dummy; do
2581     test -z "$ac_dir" && ac_dir=.
2582     if test -f $ac_dir/$ac_word; then
2583       ac_cv_prog_CC="$ac_prog"
2584       break
2585     fi
2586   done
2587   IFS="$ac_save_ifs"
2588 fi
2589 fi
2590 CC="$ac_cv_prog_CC"
2591 if test -n "$CC"; then
2592   echo "$ac_t""$CC" 1>&6
2593 else
2594   echo "$ac_t""no" 1>&6
2595 fi
2596
2597 test -n "$CC" && break
2598 done
2599
2600 fi
2601
2602
2603
2604
2605 # Check whether --enable-fast-install or --disable-fast-install was given.
2606 if test "${enable_fast_install+set}" = set; then
2607   enableval="$enable_fast_install"
2608   p=${PACKAGE-default}
2609 case "$enableval" in
2610 yes) enable_fast_install=yes ;;
2611 no) enable_fast_install=no ;;
2612 *)
2613   enable_fast_install=no
2614   # Look at the argument we got.  We use all the common list separators.
2615   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2616   for pkg in $enableval; do
2617     if test "X$pkg" = "X$p"; then
2618       enable_fast_install=yes
2619     fi
2620   done
2621   IFS="$ac_save_ifs"
2622   ;;
2623 esac
2624 else
2625   enable_fast_install=yes
2626 fi
2627
2628 # Extract the first word of "ranlib", so it can be a program name with args.
2629 set dummy ranlib; ac_word=$2
2630 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2631 echo "configure:2632: checking for $ac_word" >&5
2632 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2633   echo $ac_n "(cached) $ac_c" 1>&6
2634 else
2635   if test -n "$RANLIB"; then
2636   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2637 else
2638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2639   ac_dummy="$PATH"
2640   for ac_dir in $ac_dummy; do
2641     test -z "$ac_dir" && ac_dir=.
2642     if test -f $ac_dir/$ac_word; then
2643       ac_cv_prog_RANLIB="ranlib"
2644       break
2645     fi
2646   done
2647   IFS="$ac_save_ifs"
2648   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2649 fi
2650 fi
2651 RANLIB="$ac_cv_prog_RANLIB"
2652 if test -n "$RANLIB"; then
2653   echo "$ac_t""$RANLIB" 1>&6
2654 else
2655   echo "$ac_t""no" 1>&6
2656 fi
2657
2658 # Extract the first word of "gcc", so it can be a program name with args.
2659 set dummy gcc; ac_word=$2
2660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2661 echo "configure:2662: checking for $ac_word" >&5
2662 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2663   echo $ac_n "(cached) $ac_c" 1>&6
2664 else
2665   if test -n "$CC"; then
2666   ac_cv_prog_CC="$CC" # Let the user override the test.
2667 else
2668   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2669   ac_dummy="$PATH"
2670   for ac_dir in $ac_dummy; do
2671     test -z "$ac_dir" && ac_dir=.
2672     if test -f $ac_dir/$ac_word; then
2673       ac_cv_prog_CC="gcc"
2674       break
2675     fi
2676   done
2677   IFS="$ac_save_ifs"
2678 fi
2679 fi
2680 CC="$ac_cv_prog_CC"
2681 if test -n "$CC"; then
2682   echo "$ac_t""$CC" 1>&6
2683 else
2684   echo "$ac_t""no" 1>&6
2685 fi
2686
2687 if test -z "$CC"; then
2688   # Extract the first word of "cc", so it can be a program name with args.
2689 set dummy cc; ac_word=$2
2690 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2691 echo "configure:2692: checking for $ac_word" >&5
2692 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2693   echo $ac_n "(cached) $ac_c" 1>&6
2694 else
2695   if test -n "$CC"; then
2696   ac_cv_prog_CC="$CC" # Let the user override the test.
2697 else
2698   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2699   ac_prog_rejected=no
2700   ac_dummy="$PATH"
2701   for ac_dir in $ac_dummy; do
2702     test -z "$ac_dir" && ac_dir=.
2703     if test -f $ac_dir/$ac_word; then
2704       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2705         ac_prog_rejected=yes
2706         continue
2707       fi
2708       ac_cv_prog_CC="cc"
2709       break
2710     fi
2711   done
2712   IFS="$ac_save_ifs"
2713 if test $ac_prog_rejected = yes; then
2714   # We found a bogon in the path, so make sure we never use it.
2715   set dummy $ac_cv_prog_CC
2716   shift
2717   if test $# -gt 0; then
2718     # We chose a different compiler from the bogus one.
2719     # However, it has the same basename, so the bogon will be chosen
2720     # first if we set CC to just the basename; use the full file name.
2721     shift
2722     set dummy "$ac_dir/$ac_word" "$@"
2723     shift
2724     ac_cv_prog_CC="$@"
2725   fi
2726 fi
2727 fi
2728 fi
2729 CC="$ac_cv_prog_CC"
2730 if test -n "$CC"; then
2731   echo "$ac_t""$CC" 1>&6
2732 else
2733   echo "$ac_t""no" 1>&6
2734 fi
2735
2736   if test -z "$CC"; then
2737     case "`uname -s`" in
2738     *win32* | *WIN32* | *CYGWIN*)
2739       # Extract the first word of "cl", so it can be a program name with args.
2740 set dummy cl; ac_word=$2
2741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2742 echo "configure:2743: checking for $ac_word" >&5
2743 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2744   echo $ac_n "(cached) $ac_c" 1>&6
2745 else
2746   if test -n "$CC"; then
2747   ac_cv_prog_CC="$CC" # Let the user override the test.
2748 else
2749   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2750   ac_dummy="$PATH"
2751   for ac_dir in $ac_dummy; do
2752     test -z "$ac_dir" && ac_dir=.
2753     if test -f $ac_dir/$ac_word; then
2754       ac_cv_prog_CC="cl"
2755       break
2756     fi
2757   done
2758   IFS="$ac_save_ifs"
2759 fi
2760 fi
2761 CC="$ac_cv_prog_CC"
2762 if test -n "$CC"; then
2763   echo "$ac_t""$CC" 1>&6
2764 else
2765   echo "$ac_t""no" 1>&6
2766 fi
2767  ;;
2768     esac
2769   fi
2770   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2771 fi
2772
2773 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2774 echo "configure:2775: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2775
2776 ac_ext=c
2777 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2778 ac_cpp='$CPP $CPPFLAGS'
2779 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2780 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2781 cross_compiling=$ac_cv_prog_cc_cross
2782
2783 cat > conftest.$ac_ext << EOF
2784
2785 #line 2786 "configure"
2786 #include "confdefs.h"
2787
2788 main(){return(0);}
2789 EOF
2790 if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2791   ac_cv_prog_cc_works=yes
2792   # If we can't run a trivial program, we are probably using a cross compiler.
2793   if (./conftest; exit) 2>/dev/null; then
2794     ac_cv_prog_cc_cross=no
2795   else
2796     ac_cv_prog_cc_cross=yes
2797   fi
2798 else
2799   echo "configure: failed program was:" >&5
2800   cat conftest.$ac_ext >&5
2801   ac_cv_prog_cc_works=no
2802 fi
2803 rm -fr conftest*
2804 ac_ext=c
2805 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2806 ac_cpp='$CPP $CPPFLAGS'
2807 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2808 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2809 cross_compiling=$ac_cv_prog_cc_cross
2810
2811 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2812 if test $ac_cv_prog_cc_works = no; then
2813   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2814 fi
2815 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2816 echo "configure:2817: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2817 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2818 cross_compiling=$ac_cv_prog_cc_cross
2819
2820 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2821 echo "configure:2822: checking whether we are using GNU C" >&5
2822 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2823   echo $ac_n "(cached) $ac_c" 1>&6
2824 else
2825   cat > conftest.c <<EOF
2826 #ifdef __GNUC__
2827   yes;
2828 #endif
2829 EOF
2830 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2831   ac_cv_prog_gcc=yes
2832 else
2833   ac_cv_prog_gcc=no
2834 fi
2835 fi
2836
2837 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2838
2839 if test $ac_cv_prog_gcc = yes; then
2840   GCC=yes
2841 else
2842   GCC=
2843 fi
2844
2845 ac_test_CFLAGS="${CFLAGS+set}"
2846 ac_save_CFLAGS="$CFLAGS"
2847 CFLAGS=
2848 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2849 echo "configure:2850: checking whether ${CC-cc} accepts -g" >&5
2850 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2851   echo $ac_n "(cached) $ac_c" 1>&6
2852 else
2853   echo 'void f(){}' > conftest.c
2854 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2855   ac_cv_prog_cc_g=yes
2856 else
2857   ac_cv_prog_cc_g=no
2858 fi
2859 rm -f conftest*
2860
2861 fi
2862
2863 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2864 if test "$ac_test_CFLAGS" = set; then
2865   CFLAGS="$ac_save_CFLAGS"
2866 elif test $ac_cv_prog_cc_g = yes; then
2867   if test "$GCC" = yes; then
2868     CFLAGS="-g -O2"
2869   else
2870     CFLAGS="-g"
2871   fi
2872 else
2873   if test "$GCC" = yes; then
2874     CFLAGS="-O2"
2875   else
2876     CFLAGS=
2877   fi
2878 fi
2879
2880 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2881 if test "${with_gnu_ld+set}" = set; then
2882   withval="$with_gnu_ld"
2883   test "$withval" = no || with_gnu_ld=yes
2884 else
2885   with_gnu_ld=no
2886 fi
2887
2888 ac_prog=ld
2889 if test "$ac_cv_prog_gcc" = yes; then
2890   # Check if gcc -print-prog-name=ld gives a path.
2891   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2892 echo "configure:2893: checking for ld used by GCC" >&5
2893   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2894   case "$ac_prog" in
2895     # Accept absolute paths.
2896     [\\/]* | [A-Za-z]:[\\/]*)
2897       re_direlt='/[^/][^/]*/\.\./'
2898       # Canonicalize the path of ld
2899       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2900       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2901         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2902       done
2903       test -z "$LD" && LD="$ac_prog"
2904       ;;
2905   "")
2906     # If it fails, then pretend we aren't using GCC.
2907     ac_prog=ld
2908     ;;
2909   *)
2910     # If it is relative, then search for the first ld in PATH.
2911     with_gnu_ld=unknown
2912     ;;
2913   esac
2914 elif test "$with_gnu_ld" = yes; then
2915   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2916 echo "configure:2917: checking for GNU ld" >&5
2917 else
2918   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2919 echo "configure:2920: checking for non-GNU ld" >&5
2920 fi
2921 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2922   echo $ac_n "(cached) $ac_c" 1>&6
2923 else
2924   if test -z "$LD"; then
2925   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2926   for ac_dir in $PATH; do
2927     test -z "$ac_dir" && ac_dir=.
2928     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2929       ac_cv_path_LD="$ac_dir/$ac_prog"
2930       # Check to see if the program is GNU ld.  I'd rather use --version,
2931       # but apparently some GNU ld's only accept -v.
2932       # Break only if it was the GNU/non-GNU ld that we prefer.
2933       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2934         test "$with_gnu_ld" != no && break
2935       else
2936         test "$with_gnu_ld" != yes && break
2937       fi
2938     fi
2939   done
2940   IFS="$ac_save_ifs"
2941 else
2942   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2943 fi
2944 fi
2945
2946 LD="$ac_cv_path_LD"
2947 if test -n "$LD"; then
2948   echo "$ac_t""$LD" 1>&6
2949 else
2950   echo "$ac_t""no" 1>&6
2951 fi
2952 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2953 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2954 echo "configure:2955: checking if the linker ($LD) is GNU ld" >&5
2955 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2956   echo $ac_n "(cached) $ac_c" 1>&6
2957 else
2958   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2959 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2960   ac_cv_prog_gnu_ld=yes
2961 else
2962   ac_cv_prog_gnu_ld=no
2963 fi
2964 fi
2965
2966 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2967
2968
2969 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2970 echo "configure:2971: checking for BSD-compatible nm" >&5
2971 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2972   echo $ac_n "(cached) $ac_c" 1>&6
2973 else
2974   if test -n "$NM"; then
2975   # Let the user override the test.
2976   ac_cv_path_NM="$NM"
2977 else
2978   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2979   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2980     test -z "$ac_dir" && ac_dir=.
2981     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2982       # Check to see if the nm accepts a BSD-compat flag.
2983       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2984       #   nm: unknown option "B" ignored
2985       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2986         ac_cv_path_NM="$ac_dir/nm -B"
2987         break
2988       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2989         ac_cv_path_NM="$ac_dir/nm -p"
2990         break
2991       else
2992         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2993         continue # so that we can try to find one that supports BSD flags
2994       fi
2995     fi
2996   done
2997   IFS="$ac_save_ifs"
2998   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2999 fi
3000 fi
3001
3002 NM="$ac_cv_path_NM"
3003 echo "$ac_t""$NM" 1>&6
3004
3005 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3006 echo "configure:3007: checking whether ln -s works" >&5
3007 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3008   echo $ac_n "(cached) $ac_c" 1>&6
3009 else
3010   rm -f conftestdata
3011 if ln -s X conftestdata 2>/dev/null
3012 then
3013   rm -f conftestdata
3014   ac_cv_prog_LN_S="ln -s"
3015 else
3016   ac_cv_prog_LN_S=ln
3017 fi
3018 fi
3019 LN_S="$ac_cv_prog_LN_S"
3020 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3021   echo "$ac_t""yes" 1>&6
3022 else
3023   echo "$ac_t""no" 1>&6
3024 fi
3025
3026 if test $host != $build; then
3027   ac_tool_prefix=${host_alias}-
3028 else
3029   ac_tool_prefix=
3030 fi
3031
3032
3033 case "$target" in
3034 NONE) lt_target="$host" ;;
3035 *) lt_target="$target" ;;
3036 esac
3037
3038 # Check for any special flags to pass to ltconfig.
3039 libtool_flags="--cache-file=$cache_file"
3040 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3041 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3042 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3043 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3044 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3045 libtool_flags="$libtool_flags --enable-dlopen"
3046 libtool_flags="$libtool_flags --enable-win32-dll"
3047 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3048 if test "${enable_libtool_lock+set}" = set; then
3049   enableval="$enable_libtool_lock"
3050   :
3051 fi
3052
3053 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3054 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3055
3056 # Some flags need to be propagated to the compiler or linker for good
3057 # libtool support.
3058 case "$lt_target" in
3059 *-*-irix6*)
3060   # Find out which ABI we are using.
3061   echo '#line 3062 "configure"' > conftest.$ac_ext
3062   if { (eval echo configure:3063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3063     case "`/usr/bin/file conftest.o`" in
3064     *32-bit*)
3065       LD="${LD-ld} -32"
3066       ;;
3067     *N32*)
3068       LD="${LD-ld} -n32"
3069       ;;
3070     *64-bit*)
3071       LD="${LD-ld} -64"
3072       ;;
3073     esac
3074   fi
3075   rm -rf conftest*
3076   ;;
3077
3078 *-*-sco3.2v5*)
3079   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3080   SAVE_CFLAGS="$CFLAGS"
3081   CFLAGS="$CFLAGS -belf"
3082   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3083 echo "configure:3084: checking whether the C compiler needs -belf" >&5
3084 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3085   echo $ac_n "(cached) $ac_c" 1>&6
3086 else
3087   cat > conftest.$ac_ext <<EOF
3088 #line 3089 "configure"
3089 #include "confdefs.h"
3090
3091 int main() {
3092
3093 ; return 0; }
3094 EOF
3095 if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3096   rm -rf conftest*
3097   lt_cv_cc_needs_belf=yes
3098 else
3099   echo "configure: failed program was:" >&5
3100   cat conftest.$ac_ext >&5
3101   rm -rf conftest*
3102   lt_cv_cc_needs_belf=no
3103 fi
3104 rm -f conftest*
3105 fi
3106
3107 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3108   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3109     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3110     CFLAGS="$SAVE_CFLAGS"
3111   fi
3112   ;;
3113
3114 *-*-cygwin* | *-*-mingw*)
3115   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3116 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3118 echo "configure:3119: checking for $ac_word" >&5
3119 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3120   echo $ac_n "(cached) $ac_c" 1>&6
3121 else
3122   if test -n "$DLLTOOL"; then
3123   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3124 else
3125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3126   ac_dummy="$PATH"
3127   for ac_dir in $ac_dummy; do
3128     test -z "$ac_dir" && ac_dir=.
3129     if test -f $ac_dir/$ac_word; then
3130       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3131       break
3132     fi
3133   done
3134   IFS="$ac_save_ifs"
3135 fi
3136 fi
3137 DLLTOOL="$ac_cv_prog_DLLTOOL"
3138 if test -n "$DLLTOOL"; then
3139   echo "$ac_t""$DLLTOOL" 1>&6
3140 else
3141   echo "$ac_t""no" 1>&6
3142 fi
3143
3144
3145 if test -z "$ac_cv_prog_DLLTOOL"; then
3146 if test -n "$ac_tool_prefix"; then
3147   # Extract the first word of "dlltool", so it can be a program name with args.
3148 set dummy dlltool; ac_word=$2
3149 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3150 echo "configure:3151: checking for $ac_word" >&5
3151 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3152   echo $ac_n "(cached) $ac_c" 1>&6
3153 else
3154   if test -n "$DLLTOOL"; then
3155   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3156 else
3157   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3158   ac_dummy="$PATH"
3159   for ac_dir in $ac_dummy; do
3160     test -z "$ac_dir" && ac_dir=.
3161     if test -f $ac_dir/$ac_word; then
3162       ac_cv_prog_DLLTOOL="dlltool"
3163       break
3164     fi
3165   done
3166   IFS="$ac_save_ifs"
3167   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3168 fi
3169 fi
3170 DLLTOOL="$ac_cv_prog_DLLTOOL"
3171 if test -n "$DLLTOOL"; then
3172   echo "$ac_t""$DLLTOOL" 1>&6
3173 else
3174   echo "$ac_t""no" 1>&6
3175 fi
3176
3177 else
3178   DLLTOOL="false"
3179 fi
3180 fi
3181
3182   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3183 set dummy ${ac_tool_prefix}as; ac_word=$2
3184 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3185 echo "configure:3186: checking for $ac_word" >&5
3186 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3187   echo $ac_n "(cached) $ac_c" 1>&6
3188 else
3189   if test -n "$AS"; then
3190   ac_cv_prog_AS="$AS" # Let the user override the test.
3191 else
3192   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3193   ac_dummy="$PATH"
3194   for ac_dir in $ac_dummy; do
3195     test -z "$ac_dir" && ac_dir=.
3196     if test -f $ac_dir/$ac_word; then
3197       ac_cv_prog_AS="${ac_tool_prefix}as"
3198       break
3199     fi
3200   done
3201   IFS="$ac_save_ifs"
3202 fi
3203 fi
3204 AS="$ac_cv_prog_AS"
3205 if test -n "$AS"; then
3206   echo "$ac_t""$AS" 1>&6
3207 else
3208   echo "$ac_t""no" 1>&6
3209 fi
3210
3211
3212 if test -z "$ac_cv_prog_AS"; then
3213 if test -n "$ac_tool_prefix"; then
3214   # Extract the first word of "as", so it can be a program name with args.
3215 set dummy as; ac_word=$2
3216 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3217 echo "configure:3218: checking for $ac_word" >&5
3218 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3219   echo $ac_n "(cached) $ac_c" 1>&6
3220 else
3221   if test -n "$AS"; then
3222   ac_cv_prog_AS="$AS" # Let the user override the test.
3223 else
3224   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3225   ac_dummy="$PATH"
3226   for ac_dir in $ac_dummy; do
3227     test -z "$ac_dir" && ac_dir=.
3228     if test -f $ac_dir/$ac_word; then
3229       ac_cv_prog_AS="as"
3230       break
3231     fi
3232   done
3233   IFS="$ac_save_ifs"
3234   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3235 fi
3236 fi
3237 AS="$ac_cv_prog_AS"
3238 if test -n "$AS"; then
3239   echo "$ac_t""$AS" 1>&6
3240 else
3241   echo "$ac_t""no" 1>&6
3242 fi
3243
3244 else
3245   AS="false"
3246 fi
3247 fi
3248
3249   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3250 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3251 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3252 echo "configure:3253: checking for $ac_word" >&5
3253 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3254   echo $ac_n "(cached) $ac_c" 1>&6
3255 else
3256   if test -n "$OBJDUMP"; then
3257   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3258 else
3259   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3260   ac_dummy="$PATH"
3261   for ac_dir in $ac_dummy; do
3262     test -z "$ac_dir" && ac_dir=.
3263     if test -f $ac_dir/$ac_word; then
3264       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3265       break
3266     fi
3267   done
3268   IFS="$ac_save_ifs"
3269 fi
3270 fi
3271 OBJDUMP="$ac_cv_prog_OBJDUMP"
3272 if test -n "$OBJDUMP"; then
3273   echo "$ac_t""$OBJDUMP" 1>&6
3274 else
3275   echo "$ac_t""no" 1>&6
3276 fi
3277
3278
3279 if test -z "$ac_cv_prog_OBJDUMP"; then
3280 if test -n "$ac_tool_prefix"; then
3281   # Extract the first word of "objdump", so it can be a program name with args.
3282 set dummy objdump; ac_word=$2
3283 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3284 echo "configure:3285: checking for $ac_word" >&5
3285 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3286   echo $ac_n "(cached) $ac_c" 1>&6
3287 else
3288   if test -n "$OBJDUMP"; then
3289   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3290 else
3291   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3292   ac_dummy="$PATH"
3293   for ac_dir in $ac_dummy; do
3294     test -z "$ac_dir" && ac_dir=.
3295     if test -f $ac_dir/$ac_word; then
3296       ac_cv_prog_OBJDUMP="objdump"
3297       break
3298     fi
3299   done
3300   IFS="$ac_save_ifs"
3301   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3302 fi
3303 fi
3304 OBJDUMP="$ac_cv_prog_OBJDUMP"
3305 if test -n "$OBJDUMP"; then
3306   echo "$ac_t""$OBJDUMP" 1>&6
3307 else
3308   echo "$ac_t""no" 1>&6
3309 fi
3310
3311 else
3312   OBJDUMP="false"
3313 fi
3314 fi
3315
3316   ;;
3317
3318 esac
3319
3320
3321 # Save cache, so that ltconfig can load it
3322
3323
3324 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3325 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3326 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3327 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3328 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3329 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3330 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3331 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3332
3333 # Reload cache, that may have been modified by ltconfig
3334
3335
3336 # This can be used to rebuild libtool when needed
3337 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3338
3339 # Always use our own libtool.
3340 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3341
3342 # Redirect the config.log output again, so that the ltconfig log is not
3343 # clobbered by the next message.
3344 exec 5>>./config.log
3345
3346
3347 for ac_prog in mawk gawk nawk awk
3348 do
3349 # Extract the first word of "$ac_prog", so it can be a program name with args.
3350 set dummy $ac_prog; ac_word=$2
3351 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3352 echo "configure:3353: checking for $ac_word" >&5
3353 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3354   echo $ac_n "(cached) $ac_c" 1>&6
3355 else
3356   if test -n "$AWK"; then
3357   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3358 else
3359   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3360   ac_dummy="$PATH"
3361   for ac_dir in $ac_dummy; do
3362     test -z "$ac_dir" && ac_dir=.
3363     if test -f $ac_dir/$ac_word; then
3364       ac_cv_prog_AWK="$ac_prog"
3365       break
3366     fi
3367   done
3368   IFS="$ac_save_ifs"
3369 fi
3370 fi
3371 AWK="$ac_cv_prog_AWK"
3372 if test -n "$AWK"; then
3373   echo "$ac_t""$AWK" 1>&6
3374 else
3375   echo "$ac_t""no" 1>&6
3376 fi
3377
3378 test -n "$AWK" && break
3379 done
3380
3381 # test for ln hardlink support
3382 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3383 echo "configure:3384: checking whether ln works" >&5
3384 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3385   echo $ac_n "(cached) $ac_c" 1>&6
3386 else
3387   rm -f conftest.src conftest.dst
3388 echo "conftest" > conftest.src
3389 if ln conftest.src conftest.dst 2>/dev/null
3390 then
3391   ol_cv_prog_LN_H="ln"
3392 else
3393   ol_cv_prog_LN_H="cp"
3394 fi
3395 rm -f conftest.src conftest.dst
3396
3397 fi
3398 LN_H="$ol_cv_prog_LN_H"
3399 if test "$ol_cv_prog_LN_H" = "ln"; then
3400         echo "$ac_t""yes" 1>&6
3401 else
3402         echo "$ac_t""no" 1>&6
3403 fi
3404
3405 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3406 echo "configure:3407: checking whether ln -s works" >&5
3407 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   rm -f conftestdata
3411 if ln -s X conftestdata 2>/dev/null
3412 then
3413   rm -f conftestdata
3414   ac_cv_prog_LN_S="ln -s"
3415 else
3416   ac_cv_prog_LN_S=ln
3417 fi
3418 fi
3419 LN_S="$ac_cv_prog_LN_S"
3420 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3421   echo "$ac_t""yes" 1>&6
3422 else
3423   echo "$ac_t""no" 1>&6
3424 fi
3425
3426
3427 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3428         LN_S="$LN_H"
3429 fi
3430
3431 # Extract the first word of "sendmail", so it can be a program name with args.
3432 set dummy sendmail; ac_word=$2
3433 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3434 echo "configure:3435: checking for $ac_word" >&5
3435 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3436   echo $ac_n "(cached) $ac_c" 1>&6
3437 else
3438   case "$SENDMAIL" in
3439   /*)
3440   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3441   ;;
3442   ?:/*)
3443   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3444   ;;
3445   *)
3446   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3447   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3448   for ac_dir in $ac_dummy; do 
3449     test -z "$ac_dir" && ac_dir=.
3450     if test -f $ac_dir/$ac_word; then
3451       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3452       break
3453     fi
3454   done
3455   IFS="$ac_save_ifs"
3456   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3457   ;;
3458 esac
3459 fi
3460 SENDMAIL="$ac_cv_path_SENDMAIL"
3461 if test -n "$SENDMAIL"; then
3462   echo "$ac_t""$SENDMAIL" 1>&6
3463 else
3464   echo "$ac_t""no" 1>&6
3465 fi
3466
3467 # Extract the first word of "vi", so it can be a program name with args.
3468 set dummy vi; ac_word=$2
3469 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3470 echo "configure:3471: checking for $ac_word" >&5
3471 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3472   echo $ac_n "(cached) $ac_c" 1>&6
3473 else
3474   case "$EDITOR" in
3475   /*)
3476   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3477   ;;
3478   ?:/*)
3479   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3480   ;;
3481   *)
3482   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3483   ac_dummy="$PATH:/usr/ucb"
3484   for ac_dir in $ac_dummy; do 
3485     test -z "$ac_dir" && ac_dir=.
3486     if test -f $ac_dir/$ac_word; then
3487       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3488       break
3489     fi
3490   done
3491   IFS="$ac_save_ifs"
3492   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3493   ;;
3494 esac
3495 fi
3496 EDITOR="$ac_cv_path_EDITOR"
3497 if test -n "$EDITOR"; then
3498   echo "$ac_t""$EDITOR" 1>&6
3499 else
3500   echo "$ac_t""no" 1>&6
3501 fi
3502
3503 # Extract the first word of "finger", so it can be a program name with args.
3504 set dummy finger; ac_word=$2
3505 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3506 echo "configure:3507: checking for $ac_word" >&5
3507 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3508   echo $ac_n "(cached) $ac_c" 1>&6
3509 else
3510   case "$FINGER" in
3511   /*)
3512   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3513   ;;
3514   ?:/*)
3515   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3516   ;;
3517   *)
3518   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3519   ac_dummy="$PATH:/usr/ucb"
3520   for ac_dir in $ac_dummy; do 
3521     test -z "$ac_dir" && ac_dir=.
3522     if test -f $ac_dir/$ac_word; then
3523       ac_cv_path_FINGER="$ac_dir/$ac_word"
3524       break
3525     fi
3526   done
3527   IFS="$ac_save_ifs"
3528   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3529   ;;
3530 esac
3531 fi
3532 FINGER="$ac_cv_path_FINGER"
3533 if test -n "$FINGER"; then
3534   echo "$ac_t""$FINGER" 1>&6
3535 else
3536   echo "$ac_t""no" 1>&6
3537 fi
3538
3539
3540 ol_link_perl=no
3541 if test $ol_enable_perl != no ; then
3542         # Extract the first word of "perl", so it can be a program name with args.
3543 set dummy perl; ac_word=$2
3544 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3545 echo "configure:3546: checking for $ac_word" >&5
3546 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3547   echo $ac_n "(cached) $ac_c" 1>&6
3548 else
3549   case "$PERLBIN" in
3550   /*)
3551   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3552   ;;
3553   ?:/*)
3554   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3555   ;;
3556   *)
3557   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3558   ac_dummy="$PATH"
3559   for ac_dir in $ac_dummy; do 
3560     test -z "$ac_dir" && ac_dir=.
3561     if test -f $ac_dir/$ac_word; then
3562       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3563       break
3564     fi
3565   done
3566   IFS="$ac_save_ifs"
3567   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3568   ;;
3569 esac
3570 fi
3571 PERLBIN="$ac_cv_path_PERLBIN"
3572 if test -n "$PERLBIN"; then
3573   echo "$ac_t""$PERLBIN" 1>&6
3574 else
3575   echo "$ac_t""no" 1>&6
3576 fi
3577
3578
3579         if test "no$PERLBIN" = "no" ; then
3580                 if test $ol_enable_perl = yes ; then
3581                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3582                 fi
3583
3584         else
3585                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3586                 if test x"$ol_with_perl_module" = "xstatic" ; then
3587                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3588                 else
3589                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3590                 fi
3591                                 ol_link_perl=yes
3592         fi
3593 fi
3594
3595 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3596 echo "configure:3597: checking how to run the C preprocessor" >&5
3597 # On Suns, sometimes $CPP names a directory.
3598 if test -n "$CPP" && test -d "$CPP"; then
3599   CPP=
3600 fi
3601 if test -z "$CPP"; then
3602 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3603   echo $ac_n "(cached) $ac_c" 1>&6
3604 else
3605     # This must be in double quotes, not single quotes, because CPP may get
3606   # substituted into the Makefile and "${CC-cc}" will confuse make.
3607   CPP="${CC-cc} -E"
3608   # On the NeXT, cc -E runs the code through the compiler's parser,
3609   # not just through cpp.
3610   cat > conftest.$ac_ext <<EOF
3611 #line 3612 "configure"
3612 #include "confdefs.h"
3613 #include <assert.h>
3614 Syntax Error
3615 EOF
3616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3617 { (eval echo configure:3618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3619 if test -z "$ac_err"; then
3620   :
3621 else
3622   echo "$ac_err" >&5
3623   echo "configure: failed program was:" >&5
3624   cat conftest.$ac_ext >&5
3625   rm -rf conftest*
3626   CPP="${CC-cc} -E -traditional-cpp"
3627   cat > conftest.$ac_ext <<EOF
3628 #line 3629 "configure"
3629 #include "confdefs.h"
3630 #include <assert.h>
3631 Syntax Error
3632 EOF
3633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3634 { (eval echo configure:3635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3635 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3636 if test -z "$ac_err"; then
3637   :
3638 else
3639   echo "$ac_err" >&5
3640   echo "configure: failed program was:" >&5
3641   cat conftest.$ac_ext >&5
3642   rm -rf conftest*
3643   CPP="${CC-cc} -nologo -E"
3644   cat > conftest.$ac_ext <<EOF
3645 #line 3646 "configure"
3646 #include "confdefs.h"
3647 #include <assert.h>
3648 Syntax Error
3649 EOF
3650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3651 { (eval echo configure:3652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3653 if test -z "$ac_err"; then
3654   :
3655 else
3656   echo "$ac_err" >&5
3657   echo "configure: failed program was:" >&5
3658   cat conftest.$ac_ext >&5
3659   rm -rf conftest*
3660   CPP=/lib/cpp
3661 fi
3662 rm -f conftest*
3663 fi
3664 rm -f conftest*
3665 fi
3666 rm -f conftest*
3667   ac_cv_prog_CPP="$CPP"
3668 fi
3669   CPP="$ac_cv_prog_CPP"
3670 else
3671   ac_cv_prog_CPP="$CPP"
3672 fi
3673 echo "$ac_t""$CPP" 1>&6
3674
3675
3676 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3677         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3678
3679 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3680         echo "configure: warning: programs compiled here do run here..." 1>&2
3681         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3682
3683 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3684         echo "configure: warning: programs compiled here do not run here..." 1>&2
3685         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3686 fi
3687
3688 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3689 echo "configure:3690: checking for AIX" >&5
3690 cat > conftest.$ac_ext <<EOF
3691 #line 3692 "configure"
3692 #include "confdefs.h"
3693 #ifdef _AIX
3694   yes
3695 #endif
3696
3697 EOF
3698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3699   egrep "yes" >/dev/null 2>&1; then
3700   rm -rf conftest*
3701   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3702 #define _ALL_SOURCE 1
3703 EOF
3704
3705 else
3706   rm -rf conftest*
3707   echo "$ac_t""no" 1>&6
3708 fi
3709 rm -f conftest*
3710
3711
3712 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3713 echo "configure:3714: checking for POSIXized ISC" >&5
3714 if test -d /etc/conf/kconfig.d &&
3715   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3716 then
3717   echo "$ac_t""yes" 1>&6
3718   ISC=yes # If later tests want to check for ISC.
3719   cat >> confdefs.h <<\EOF
3720 #define _POSIX_SOURCE 1
3721 EOF
3722
3723   if test "$GCC" = yes; then
3724     CC="$CC -posix"
3725   else
3726     CC="$CC -Xp"
3727   fi
3728 else
3729   echo "$ac_t""no" 1>&6
3730   ISC=
3731 fi
3732
3733 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3734 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3735 echo "configure:3736: checking for minix/config.h" >&5
3736 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3737   echo $ac_n "(cached) $ac_c" 1>&6
3738 else
3739   cat > conftest.$ac_ext <<EOF
3740 #line 3741 "configure"
3741 #include "confdefs.h"
3742 #include <minix/config.h>
3743 EOF
3744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3745 { (eval echo configure:3746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3747 if test -z "$ac_err"; then
3748   rm -rf conftest*
3749   eval "ac_cv_header_$ac_safe=yes"
3750 else
3751   echo "$ac_err" >&5
3752   echo "configure: failed program was:" >&5
3753   cat conftest.$ac_ext >&5
3754   rm -rf conftest*
3755   eval "ac_cv_header_$ac_safe=no"
3756 fi
3757 rm -f conftest*
3758 fi
3759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3760   echo "$ac_t""yes" 1>&6
3761   MINIX=yes
3762 else
3763   echo "$ac_t""no" 1>&6
3764 MINIX=
3765 fi
3766
3767 if test "$MINIX" = yes; then
3768   cat >> confdefs.h <<\EOF
3769 #define _POSIX_SOURCE 1
3770 EOF
3771
3772   cat >> confdefs.h <<\EOF
3773 #define _POSIX_1_SOURCE 2
3774 EOF
3775
3776   cat >> confdefs.h <<\EOF
3777 #define _MINIX 1
3778 EOF
3779
3780 fi
3781
3782
3783 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3784 echo "configure:3785: checking for Cygwin environment" >&5
3785 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3786   echo $ac_n "(cached) $ac_c" 1>&6
3787 else
3788   cat > conftest.$ac_ext <<EOF
3789 #line 3790 "configure"
3790 #include "confdefs.h"
3791
3792 int main() {
3793
3794 #ifndef __CYGWIN__
3795 #define __CYGWIN__ __CYGWIN32__
3796 #endif
3797 return __CYGWIN__;
3798 ; return 0; }
3799 EOF
3800 if { (eval echo configure:3801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3801   rm -rf conftest*
3802   ac_cv_cygwin=yes
3803 else
3804   echo "configure: failed program was:" >&5
3805   cat conftest.$ac_ext >&5
3806   rm -rf conftest*
3807   ac_cv_cygwin=no
3808 fi
3809 rm -f conftest*
3810 fi
3811
3812 echo "$ac_t""$ac_cv_cygwin" 1>&6
3813 CYGWIN=
3814 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3815 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3816 echo "configure:3817: checking for mingw32 environment" >&5
3817 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3818   echo $ac_n "(cached) $ac_c" 1>&6
3819 else
3820   cat > conftest.$ac_ext <<EOF
3821 #line 3822 "configure"
3822 #include "confdefs.h"
3823
3824 int main() {
3825 return __MINGW32__;
3826 ; return 0; }
3827 EOF
3828 if { (eval echo configure:3829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3829   rm -rf conftest*
3830   ac_cv_mingw32=yes
3831 else
3832   echo "configure: failed program was:" >&5
3833   cat conftest.$ac_ext >&5
3834   rm -rf conftest*
3835   ac_cv_mingw32=no
3836 fi
3837 rm -f conftest*
3838 fi
3839
3840 echo "$ac_t""$ac_cv_mingw32" 1>&6
3841 MINGW32=
3842 test "$ac_cv_mingw32" = yes && MINGW32=yes
3843 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3844 echo "configure:3845: checking for EMX OS/2 environment" >&5
3845 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3846   echo $ac_n "(cached) $ac_c" 1>&6
3847 else
3848   cat > conftest.$ac_ext <<EOF
3849 #line 3850 "configure"
3850 #include "confdefs.h"
3851
3852 int main() {
3853 return __EMX__;
3854 ; return 0; }
3855 EOF
3856 if { (eval echo configure:3857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3857   rm -rf conftest*
3858   ac_cv_emxos2=yes
3859 else
3860   echo "configure: failed program was:" >&5
3861   cat conftest.$ac_ext >&5
3862   rm -rf conftest*
3863   ac_cv_emxos2=no
3864 fi
3865 rm -f conftest*
3866 fi
3867
3868 echo "$ac_t""$ac_cv_emxos2" 1>&6
3869 EMXOS2=
3870 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3871
3872
3873
3874 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3875 echo "configure:3876: checking for executable suffix" >&5
3876 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3877   echo $ac_n "(cached) $ac_c" 1>&6
3878 else
3879   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3880   ac_cv_exeext=.exe
3881 else
3882   rm -f conftest*
3883   echo 'int main () { return 0; }' > conftest.$ac_ext
3884   ac_cv_exeext=
3885   if { (eval echo configure:3886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3886     for file in conftest.*; do
3887       case $file in
3888       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3889       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3890       esac
3891     done
3892   else
3893     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3894   fi
3895   rm -f conftest*
3896   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3897 fi
3898 fi
3899
3900 EXEEXT=""
3901 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3902 echo "$ac_t""${ac_cv_exeext}" 1>&6
3903 ac_exeext=$EXEEXT
3904
3905 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3906 echo "configure:3907: checking for object suffix" >&5
3907 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3908   echo $ac_n "(cached) $ac_c" 1>&6
3909 else
3910   rm -f conftest*
3911 echo 'int i = 1;' > conftest.$ac_ext
3912 if { (eval echo configure:3913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3913   for ac_file in conftest.*; do
3914     case $ac_file in
3915     *.c) ;;
3916     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3917     esac
3918   done
3919 else
3920   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3921 fi
3922 rm -f conftest*
3923 fi
3924
3925 echo "$ac_t""$ac_cv_objext" 1>&6
3926 OBJEXT=$ac_cv_objext
3927 ac_objext=$ac_cv_objext
3928
3929
3930 cat >> confdefs.h <<EOF
3931 #define EXEEXT "${EXEEXT}"
3932 EOF
3933
3934
3935 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3936 echo "configure:3937: checking for be_app in -lbe" >&5
3937 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3939   echo $ac_n "(cached) $ac_c" 1>&6
3940 else
3941   ac_save_LIBS="$LIBS"
3942 LIBS="-lbe -lroot -lnet $LIBS"
3943 cat > conftest.$ac_ext <<EOF
3944 #line 3945 "configure"
3945 #include "confdefs.h"
3946 /* Override any gcc2 internal prototype to avoid an error.  */
3947 /* We use char because int might match the return type of a gcc2
3948     builtin and then its argument prototype would still apply.  */
3949 char be_app();
3950
3951 int main() {
3952 be_app()
3953 ; return 0; }
3954 EOF
3955 if { (eval echo configure:3956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3956   rm -rf conftest*
3957   eval "ac_cv_lib_$ac_lib_var=yes"
3958 else
3959   echo "configure: failed program was:" >&5
3960   cat conftest.$ac_ext >&5
3961   rm -rf conftest*
3962   eval "ac_cv_lib_$ac_lib_var=no"
3963 fi
3964 rm -f conftest*
3965 LIBS="$ac_save_LIBS"
3966
3967 fi
3968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3969   echo "$ac_t""yes" 1>&6
3970   LIBS="$LIBS -lbe -lroot -lnet"
3971 else
3972   echo "$ac_t""no" 1>&6
3973 :
3974 fi
3975
3976
3977
3978
3979
3980 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3981 echo "configure:3982: checking for ${CC-cc} option to accept ANSI C" >&5
3982 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3983   echo $ac_n "(cached) $ac_c" 1>&6
3984 else
3985   am_cv_prog_cc_stdc=no
3986 ac_save_CC="$CC"
3987 # Don't try gcc -ansi; that turns off useful extensions and
3988 # breaks some systems' header files.
3989 # AIX                   -qlanglvl=ansi
3990 # Ultrix and OSF/1      -std1
3991 # HP-UX 10.20 and later -Ae
3992 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3993 # SVR4                  -Xc -D__EXTENSIONS__
3994 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3995 do
3996   CC="$ac_save_CC $ac_arg"
3997   cat > conftest.$ac_ext <<EOF
3998 #line 3999 "configure"
3999 #include "confdefs.h"
4000 #include <stdarg.h>
4001 #include <stdio.h>
4002 #include <sys/types.h>
4003 #include <sys/stat.h>
4004 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4005 struct buf { int x; };
4006 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4007 static char *e (p, i)
4008      char **p;
4009      int i;
4010 {
4011   return p[i];
4012 }
4013 static char *f (char * (*g) (char **, int), char **p, ...)
4014 {
4015   char *s;
4016   va_list v;
4017   va_start (v,p);
4018   s = g (p, va_arg (v,int));
4019   va_end (v);
4020   return s;
4021 }
4022 int test (int i, double x);
4023 struct s1 {int (*f) (int a);};
4024 struct s2 {int (*f) (double a);};
4025 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4026 int argc;
4027 char **argv;
4028
4029 int main() {
4030
4031 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4032
4033 ; return 0; }
4034 EOF
4035 if { (eval echo configure:4036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4036   rm -rf conftest*
4037   am_cv_prog_cc_stdc="$ac_arg"; break
4038 else
4039   echo "configure: failed program was:" >&5
4040   cat conftest.$ac_ext >&5
4041 fi
4042 rm -f conftest*
4043 done
4044 CC="$ac_save_CC"
4045
4046 fi
4047
4048 if test -z "$am_cv_prog_cc_stdc"; then
4049   echo "$ac_t""none needed" 1>&6
4050 else
4051   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4052 fi
4053 case "x$am_cv_prog_cc_stdc" in
4054   x|xno) ;;
4055   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4056 esac
4057
4058 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4059         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4060 fi
4061
4062 # test for make depend flag
4063 OL_MKDEP=
4064 OL_MKDEP_FLAGS=
4065 if test -z "${MKDEP}"; then
4066         OL_MKDEP="${CC-cc}"
4067         if test -z "${MKDEP_FLAGS}"; then
4068                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4069 echo "configure:4070: checking for ${OL_MKDEP} depend flag" >&5
4070 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4071   echo $ac_n "(cached) $ac_c" 1>&6
4072 else
4073   
4074                         ol_cv_mkdep=no
4075                         for flag in "-M" "-xM"; do
4076                                 cat > conftest.c <<EOF
4077  noCode;
4078 EOF
4079                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4080                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4081                                 then
4082                                         if test ! -f conftest."${ac_object}" ; then
4083                                                 ol_cv_mkdep=$flag
4084                                                 OL_MKDEP_FLAGS="$flag"
4085                                                 break
4086                                         fi
4087                                 fi
4088                         done
4089                         rm -f conftest*
4090                 
4091 fi
4092
4093 echo "$ac_t""$ol_cv_mkdep" 1>&6
4094         else
4095                 cc_cv_mkdep=yes
4096                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4097         fi
4098 else
4099         cc_cv_mkdep=yes
4100         OL_MKDEP="${MKDEP}"
4101         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4102 fi
4103
4104
4105
4106 if test "${ol_cv_mkdep}" = no ; then
4107         # this will soon become an error
4108         echo "configure: warning: do not know how to generate dependencies" 1>&2
4109 fi
4110
4111 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4112 echo "configure:4113: checking for afopen in -ls" >&5
4113 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4114 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4115   echo $ac_n "(cached) $ac_c" 1>&6
4116 else
4117   ac_save_LIBS="$LIBS"
4118 LIBS="-ls  $LIBS"
4119 cat > conftest.$ac_ext <<EOF
4120 #line 4121 "configure"
4121 #include "confdefs.h"
4122 /* Override any gcc2 internal prototype to avoid an error.  */
4123 /* We use char because int might match the return type of a gcc2
4124     builtin and then its argument prototype would still apply.  */
4125 char afopen();
4126
4127 int main() {
4128 afopen()
4129 ; return 0; }
4130 EOF
4131 if { (eval echo configure:4132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4132   rm -rf conftest*
4133   eval "ac_cv_lib_$ac_lib_var=yes"
4134 else
4135   echo "configure: failed program was:" >&5
4136   cat conftest.$ac_ext >&5
4137   rm -rf conftest*
4138   eval "ac_cv_lib_$ac_lib_var=no"
4139 fi
4140 rm -f conftest*
4141 LIBS="$ac_save_LIBS"
4142
4143 fi
4144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4145   echo "$ac_t""yes" 1>&6
4146   
4147         AUTH_LIBS=-ls
4148         cat >> confdefs.h <<\EOF
4149 #define HAVE_AIX_SECURITY 1
4150 EOF
4151
4152
4153 else
4154   echo "$ac_t""no" 1>&6
4155 fi
4156
4157
4158
4159 for ac_func in getaddrinfo 
4160 do
4161 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4162 echo "configure:4163: checking for $ac_func" >&5
4163 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
4164   echo $ac_n "(cached) $ac_c" 1>&6
4165 else
4166   cat > conftest.$ac_ext <<EOF
4167 #line 4168 "configure"
4168 #include "confdefs.h"
4169 /* System header to define __stub macros and hopefully few prototypes,
4170     which can conflict with char $ac_func(); below.  */
4171 #include <assert.h>
4172 /* Override any gcc2 internal prototype to avoid an error.  */
4173 /* We use char because int might match the return type of a gcc2
4174     builtin and then its argument prototype would still apply.  */
4175 char $ac_func();
4176 char (*f)();
4177
4178 int main() {
4179
4180 /* The GNU C library defines this for functions which it implements
4181     to always fail with ENOSYS.  Some functions are actually named
4182     something starting with __ and the normal name is an alias.  */
4183 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4184 choke me
4185 #else
4186 f = $ac_func;
4187 #endif
4188
4189 ; return 0; }
4190 EOF
4191 if { (eval echo configure:4192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4192   rm -rf conftest*
4193   eval "ac_cv_func_$ac_func=yes"
4194 else
4195   echo "configure: failed program was:" >&5
4196   cat conftest.$ac_ext >&5
4197   rm -rf conftest*
4198   eval "ac_cv_func_$ac_func=no"
4199 fi
4200 rm -f conftest*
4201 fi
4202
4203 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4204   echo "$ac_t""yes" 1>&6
4205     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4206   cat >> confdefs.h <<EOF
4207 #define $ac_tr_func 1
4208 EOF
4209  
4210 else
4211   echo "$ac_t""no" 1>&6
4212 fi
4213 done
4214
4215
4216 if test $ac_cv_func_getaddrinfo = no ; then
4217         if test $ol_enable_ipv6 = yes ; then
4218                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
4219         fi
4220         ol_enable_ipv6=no
4221 fi
4222
4223 if test $ol_enable_unix != no ; then
4224         for ac_hdr in sys/un.h 
4225 do
4226 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4227 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4228 echo "configure:4229: checking for $ac_hdr" >&5
4229 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4230   echo $ac_n "(cached) $ac_c" 1>&6
4231 else
4232   cat > conftest.$ac_ext <<EOF
4233 #line 4234 "configure"
4234 #include "confdefs.h"
4235 #include <$ac_hdr>
4236 EOF
4237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4238 { (eval echo configure:4239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4240 if test -z "$ac_err"; then
4241   rm -rf conftest*
4242   eval "ac_cv_header_$ac_safe=yes"
4243 else
4244   echo "$ac_err" >&5
4245   echo "configure: failed program was:" >&5
4246   cat conftest.$ac_ext >&5
4247   rm -rf conftest*
4248   eval "ac_cv_header_$ac_safe=no"
4249 fi
4250 rm -f conftest*
4251 fi
4252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4253   echo "$ac_t""yes" 1>&6
4254     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4255   cat >> confdefs.h <<EOF
4256 #define $ac_tr_hdr 1
4257 EOF
4258  
4259 else
4260   echo "$ac_t""no" 1>&6
4261 fi
4262 done
4263
4264
4265         if test $ol_enable_unix = auto ; then
4266                 ol_enable_unix=$ac_cv_header_sys_un_h
4267         elif test $ac_cv_header_sys_un_h = no ; then
4268                 { echo "configure: error: UNIX domain support requires sys/un.h" 1>&2; exit 1; }
4269         fi
4270 fi
4271
4272 ol_link_modules=no
4273 if test $ol_enable_modules != no ; then
4274         for ac_hdr in ltdl.h
4275 do
4276 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4277 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4278 echo "configure:4279: checking for $ac_hdr" >&5
4279 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4280   echo $ac_n "(cached) $ac_c" 1>&6
4281 else
4282   cat > conftest.$ac_ext <<EOF
4283 #line 4284 "configure"
4284 #include "confdefs.h"
4285 #include <$ac_hdr>
4286 EOF
4287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4288 { (eval echo configure:4289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4290 if test -z "$ac_err"; then
4291   rm -rf conftest*
4292   eval "ac_cv_header_$ac_safe=yes"
4293 else
4294   echo "$ac_err" >&5
4295   echo "configure: failed program was:" >&5
4296   cat conftest.$ac_ext >&5
4297   rm -rf conftest*
4298   eval "ac_cv_header_$ac_safe=no"
4299 fi
4300 rm -f conftest*
4301 fi
4302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4303   echo "$ac_t""yes" 1>&6
4304     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4305   cat >> confdefs.h <<EOF
4306 #define $ac_tr_hdr 1
4307 EOF
4308  
4309 else
4310   echo "$ac_t""no" 1>&6
4311 fi
4312 done
4313
4314
4315         if test $ac_cv_header_ltdl_h = no ; then
4316                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4317         fi
4318
4319         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4320 echo "configure:4321: checking for lt_dlinit in -lltdl" >&5
4321 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4322 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4323   echo $ac_n "(cached) $ac_c" 1>&6
4324 else
4325   ac_save_LIBS="$LIBS"
4326 LIBS="-lltdl  $LIBS"
4327 cat > conftest.$ac_ext <<EOF
4328 #line 4329 "configure"
4329 #include "confdefs.h"
4330 /* Override any gcc2 internal prototype to avoid an error.  */
4331 /* We use char because int might match the return type of a gcc2
4332     builtin and then its argument prototype would still apply.  */
4333 char lt_dlinit();
4334
4335 int main() {
4336 lt_dlinit()
4337 ; return 0; }
4338 EOF
4339 if { (eval echo configure:4340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4340   rm -rf conftest*
4341   eval "ac_cv_lib_$ac_lib_var=yes"
4342 else
4343   echo "configure: failed program was:" >&5
4344   cat conftest.$ac_ext >&5
4345   rm -rf conftest*
4346   eval "ac_cv_lib_$ac_lib_var=no"
4347 fi
4348 rm -f conftest*
4349 LIBS="$ac_save_LIBS"
4350
4351 fi
4352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4353   echo "$ac_t""yes" 1>&6
4354   
4355             MODULES_LIBS=-lltdl
4356             cat >> confdefs.h <<\EOF
4357 #define HAVE_LIBLTDL 1
4358 EOF
4359
4360         
4361 else
4362   echo "$ac_t""no" 1>&6
4363 fi
4364
4365
4366         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4367                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4368         fi
4369         ol_link_modules=yes
4370 else
4371         ol_with_dnssrv_module=static
4372         ol_with_ldap_module=static
4373         ol_with_ldbm_module=static
4374         ol_with_passwd_module=static
4375         ol_with_perl_module=static
4376         ol_with_shell_module=static
4377         ol_with_tcl_module=static
4378         ol_with_sql_module=static
4379 fi
4380
4381 # test for EBCDIC
4382 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4383 echo "configure:4384: checking for EBCDIC" >&5
4384 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4385   echo $ac_n "(cached) $ac_c" 1>&6
4386 else
4387   
4388         cat > conftest.$ac_ext <<EOF
4389 #line 4390 "configure"
4390 #include "confdefs.h"
4391
4392 #if !('M' == 0xd4)
4393 #include <__ASCII__/generate_error.h>
4394 #endif
4395
4396 EOF
4397 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4398 { (eval echo configure:4399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4399 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4400 if test -z "$ac_err"; then
4401   rm -rf conftest*
4402   ol_cv_cpp_ebcdic=yes
4403 else
4404   echo "$ac_err" >&5
4405   echo "configure: failed program was:" >&5
4406   cat conftest.$ac_ext >&5
4407   rm -rf conftest*
4408   ol_cv_cpp_ebcdic=no
4409 fi
4410 rm -f conftest*
4411 fi
4412
4413 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4414 if test $ol_cv_cpp_ebcdic = yes ; then
4415         cat >> confdefs.h <<\EOF
4416 #define HAVE_EBCDIC 1
4417 EOF
4418
4419 fi
4420
4421 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4422 echo "configure:4423: checking for ANSI C header files" >&5
4423 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4424   echo $ac_n "(cached) $ac_c" 1>&6
4425 else
4426   cat > conftest.$ac_ext <<EOF
4427 #line 4428 "configure"
4428 #include "confdefs.h"
4429 #include <stdlib.h>
4430 #include <stdarg.h>
4431 #include <string.h>
4432 #include <float.h>
4433 EOF
4434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4435 { (eval echo configure:4436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4437 if test -z "$ac_err"; then
4438   rm -rf conftest*
4439   ol_cv_header_stdc=yes
4440 else
4441   echo "$ac_err" >&5
4442   echo "configure: failed program was:" >&5
4443   cat conftest.$ac_ext >&5
4444   rm -rf conftest*
4445   ol_cv_header_stdc=no
4446 fi
4447 rm -f conftest*
4448
4449 if test $ol_cv_header_stdc = yes; then
4450   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4451 cat > conftest.$ac_ext <<EOF
4452 #line 4453 "configure"
4453 #include "confdefs.h"
4454 #include <string.h>
4455 EOF
4456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4457   egrep "memchr" >/dev/null 2>&1; then
4458   :
4459 else
4460   rm -rf conftest*
4461   ol_cv_header_stdc=no
4462 fi
4463 rm -f conftest*
4464
4465 fi
4466
4467 if test $ol_cv_header_stdc = yes; then
4468   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4469 cat > conftest.$ac_ext <<EOF
4470 #line 4471 "configure"
4471 #include "confdefs.h"
4472 #include <stdlib.h>
4473 EOF
4474 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4475   egrep "free" >/dev/null 2>&1; then
4476   :
4477 else
4478   rm -rf conftest*
4479   ol_cv_header_stdc=no
4480 fi
4481 rm -f conftest*
4482
4483 fi
4484
4485 if test $ol_cv_header_stdc = yes; then
4486   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4487 if test "$cross_compiling" = yes; then
4488   :
4489 else
4490   cat > conftest.$ac_ext <<EOF
4491 #line 4492 "configure"
4492 #include "confdefs.h"
4493 #include <ctype.h>
4494 #ifndef HAVE_EBCDIC
4495 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4496 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4497 #else
4498 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4499                 || ('j' <= (c) && (c) <= 'r') \
4500                 || ('s' <= (c) && (c) <= 'z'))
4501 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4502 #endif
4503 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4504 int main () { int i; for (i = 0; i < 256; i++)
4505 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4506 exit (0); }
4507
4508 EOF
4509 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4510 then
4511   :
4512 else
4513   echo "configure: failed program was:" >&5
4514   cat conftest.$ac_ext >&5
4515   rm -fr conftest*
4516   ol_cv_header_stdc=no
4517 fi
4518 rm -fr conftest*
4519 fi
4520
4521 fi
4522 fi
4523
4524 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4525 if test $ol_cv_header_stdc = yes; then
4526   cat >> confdefs.h <<\EOF
4527 #define STDC_HEADERS 1
4528 EOF
4529
4530 fi
4531 ac_cv_header_stdc=disable
4532
4533
4534 if test $ol_cv_header_stdc != yes; then
4535         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4536 fi
4537
4538 ac_header_dirent=no
4539 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4540 do
4541 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4542 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4543 echo "configure:4544: checking for $ac_hdr that defines DIR" >&5
4544 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4545   echo $ac_n "(cached) $ac_c" 1>&6
4546 else
4547   cat > conftest.$ac_ext <<EOF
4548 #line 4549 "configure"
4549 #include "confdefs.h"
4550 #include <sys/types.h>
4551 #include <$ac_hdr>
4552 int main() {
4553 DIR *dirp = 0;
4554 ; return 0; }
4555 EOF
4556 if { (eval echo configure:4557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4557   rm -rf conftest*
4558   eval "ac_cv_header_dirent_$ac_safe=yes"
4559 else
4560   echo "configure: failed program was:" >&5
4561   cat conftest.$ac_ext >&5
4562   rm -rf conftest*
4563   eval "ac_cv_header_dirent_$ac_safe=no"
4564 fi
4565 rm -f conftest*
4566 fi
4567 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4568   echo "$ac_t""yes" 1>&6
4569     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4570   cat >> confdefs.h <<EOF
4571 #define $ac_tr_hdr 1
4572 EOF
4573  ac_header_dirent=$ac_hdr; break
4574 else
4575   echo "$ac_t""no" 1>&6
4576 fi
4577 done
4578 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4579 if test $ac_header_dirent = dirent.h; then
4580 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4581 echo "configure:4582: checking for opendir in -ldir" >&5
4582 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4583 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4584   echo $ac_n "(cached) $ac_c" 1>&6
4585 else
4586   ac_save_LIBS="$LIBS"
4587 LIBS="-ldir  $LIBS"
4588 cat > conftest.$ac_ext <<EOF
4589 #line 4590 "configure"
4590 #include "confdefs.h"
4591 /* Override any gcc2 internal prototype to avoid an error.  */
4592 /* We use char because int might match the return type of a gcc2
4593     builtin and then its argument prototype would still apply.  */
4594 char opendir();
4595
4596 int main() {
4597 opendir()
4598 ; return 0; }
4599 EOF
4600 if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4601   rm -rf conftest*
4602   eval "ac_cv_lib_$ac_lib_var=yes"
4603 else
4604   echo "configure: failed program was:" >&5
4605   cat conftest.$ac_ext >&5
4606   rm -rf conftest*
4607   eval "ac_cv_lib_$ac_lib_var=no"
4608 fi
4609 rm -f conftest*
4610 LIBS="$ac_save_LIBS"
4611
4612 fi
4613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4614   echo "$ac_t""yes" 1>&6
4615   LIBS="$LIBS -ldir"
4616 else
4617   echo "$ac_t""no" 1>&6
4618 fi
4619
4620 else
4621 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4622 echo "configure:4623: checking for opendir in -lx" >&5
4623 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4624 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4625   echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627   ac_save_LIBS="$LIBS"
4628 LIBS="-lx  $LIBS"
4629 cat > conftest.$ac_ext <<EOF
4630 #line 4631 "configure"
4631 #include "confdefs.h"
4632 /* Override any gcc2 internal prototype to avoid an error.  */
4633 /* We use char because int might match the return type of a gcc2
4634     builtin and then its argument prototype would still apply.  */
4635 char opendir();
4636
4637 int main() {
4638 opendir()
4639 ; return 0; }
4640 EOF
4641 if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4642   rm -rf conftest*
4643   eval "ac_cv_lib_$ac_lib_var=yes"
4644 else
4645   echo "configure: failed program was:" >&5
4646   cat conftest.$ac_ext >&5
4647   rm -rf conftest*
4648   eval "ac_cv_lib_$ac_lib_var=no"
4649 fi
4650 rm -f conftest*
4651 LIBS="$ac_save_LIBS"
4652
4653 fi
4654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4655   echo "$ac_t""yes" 1>&6
4656   LIBS="$LIBS -lx"
4657 else
4658   echo "$ac_t""no" 1>&6
4659 fi
4660
4661 fi
4662
4663 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4664 echo "configure:4665: checking for sys/wait.h that is POSIX.1 compatible" >&5
4665 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4666   echo $ac_n "(cached) $ac_c" 1>&6
4667 else
4668   cat > conftest.$ac_ext <<EOF
4669 #line 4670 "configure"
4670 #include "confdefs.h"
4671 #include <sys/types.h>
4672 #include <sys/wait.h>
4673 #ifndef WEXITSTATUS
4674 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4675 #endif
4676 #ifndef WIFEXITED
4677 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4678 #endif
4679 int main() {
4680 int s;
4681 wait (&s);
4682 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4683 ; return 0; }
4684 EOF
4685 if { (eval echo configure:4686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4686   rm -rf conftest*
4687   ac_cv_header_sys_wait_h=yes
4688 else
4689   echo "configure: failed program was:" >&5
4690   cat conftest.$ac_ext >&5
4691   rm -rf conftest*
4692   ac_cv_header_sys_wait_h=no
4693 fi
4694 rm -f conftest*
4695 fi
4696
4697 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4698 if test $ac_cv_header_sys_wait_h = yes; then
4699   cat >> confdefs.h <<\EOF
4700 #define HAVE_SYS_WAIT_H 1
4701 EOF
4702
4703 fi
4704
4705 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4706 echo "configure:4707: checking POSIX termios" >&5
4707 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4708   echo $ac_n "(cached) $ac_c" 1>&6
4709 else
4710   cat > conftest.$ac_ext <<EOF
4711 #line 4712 "configure"
4712 #include "confdefs.h"
4713 #include <sys/types.h>
4714 #include <unistd.h>
4715 #include <termios.h>
4716 int main() {
4717 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4718    tcgetattr(0, 0);
4719 ; return 0; }
4720 EOF
4721 if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4722   rm -rf conftest*
4723   am_cv_sys_posix_termios=yes
4724 else
4725   echo "configure: failed program was:" >&5
4726   cat conftest.$ac_ext >&5
4727   rm -rf conftest*
4728   am_cv_sys_posix_termios=no
4729 fi
4730 rm -f conftest*
4731 fi
4732
4733 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4734
4735
4736  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4737 echo "configure:4738: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4738 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4739   echo $ac_n "(cached) $ac_c" 1>&6
4740 else
4741   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4742
4743   gwinsz_in_termios_h=no
4744   if test $am_cv_sys_posix_termios = yes; then
4745     cat > conftest.$ac_ext <<EOF
4746 #line 4747 "configure"
4747 #include "confdefs.h"
4748 #include <sys/types.h>
4749 #     include <termios.h>
4750 #     ifdef TIOCGWINSZ
4751         yes
4752 #     endif
4753     
4754 EOF
4755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4756   egrep "yes" >/dev/null 2>&1; then
4757   rm -rf conftest*
4758   gwinsz_in_termios_h=yes
4759 fi
4760 rm -f conftest*
4761
4762   fi
4763
4764   if test $gwinsz_in_termios_h = no; then
4765     cat > conftest.$ac_ext <<EOF
4766 #line 4767 "configure"
4767 #include "confdefs.h"
4768 #include <sys/types.h>
4769 #     include <sys/ioctl.h>
4770 #     ifdef TIOCGWINSZ
4771         yes
4772 #     endif
4773     
4774 EOF
4775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4776   egrep "yes" >/dev/null 2>&1; then
4777   rm -rf conftest*
4778   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4779 fi
4780 rm -f conftest*
4781
4782   fi
4783   
4784 fi
4785
4786 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4787   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4788     cat >> confdefs.h <<\EOF
4789 #define GWINSZ_IN_SYS_IOCTL 1
4790 EOF
4791
4792   fi
4793
4794 if test $am_cv_sys_posix_termios = yes ; then
4795         cat >> confdefs.h <<\EOF
4796 #define HAVE_POSIX_TERMIOS 1
4797 EOF
4798
4799 fi
4800
4801 for ac_hdr in \
4802         arpa/inet.h             \
4803         arpa/nameser.h  \
4804         assert.h                \
4805         conio.h                 \
4806         crypt.h                 \
4807         direct.h                \
4808         errno.h                 \
4809         fcntl.h                 \
4810         filio.h                 \
4811         getopt.h                \
4812         grp.h                   \
4813         io.h                    \
4814         libutil.h               \
4815         limits.h                \
4816         locale.h                \
4817         netinet/tcp.h   \
4818         malloc.h                \
4819         memory.h                \
4820         psap.h                  \
4821         pwd.h                   \
4822         process.h               \
4823         resolv.h                \
4824         sgtty.h                 \
4825         shadow.h                \
4826         stddef.h                \
4827         string.h                \
4828         strings.h               \
4829         sysexits.h              \
4830         sys/file.h              \
4831         sys/filio.h             \
4832         sys/errno.h             \
4833         sys/ioctl.h             \
4834         sys/param.h             \
4835         sys/resource.h  \
4836         sys/select.h    \
4837         sys/socket.h    \
4838         sys/syslog.h    \
4839         sys/time.h              \
4840         sys/types.h             \
4841         syslog.h                \
4842         termios.h               \
4843         unistd.h                \
4844         winsock.h               \
4845
4846 do
4847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4849 echo "configure:4850: checking for $ac_hdr" >&5
4850 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4851   echo $ac_n "(cached) $ac_c" 1>&6
4852 else
4853   cat > conftest.$ac_ext <<EOF
4854 #line 4855 "configure"
4855 #include "confdefs.h"
4856 #include <$ac_hdr>
4857 EOF
4858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4859 { (eval echo configure:4860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4861 if test -z "$ac_err"; then
4862   rm -rf conftest*
4863   eval "ac_cv_header_$ac_safe=yes"
4864 else
4865   echo "$ac_err" >&5
4866   echo "configure: failed program was:" >&5
4867   cat conftest.$ac_ext >&5
4868   rm -rf conftest*
4869   eval "ac_cv_header_$ac_safe=no"
4870 fi
4871 rm -f conftest*
4872 fi
4873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4874   echo "$ac_t""yes" 1>&6
4875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4876   cat >> confdefs.h <<EOF
4877 #define $ac_tr_hdr 1
4878 EOF
4879  
4880 else
4881   echo "$ac_t""no" 1>&6
4882 fi
4883 done
4884
4885
4886
4887
4888 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4889 echo "configure:4890: checking for sigset in -lV3" >&5
4890 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4891 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4892   echo $ac_n "(cached) $ac_c" 1>&6
4893 else
4894   ac_save_LIBS="$LIBS"
4895 LIBS="-lV3  $LIBS"
4896 cat > conftest.$ac_ext <<EOF
4897 #line 4898 "configure"
4898 #include "confdefs.h"
4899 /* Override any gcc2 internal prototype to avoid an error.  */
4900 /* We use char because int might match the return type of a gcc2
4901     builtin and then its argument prototype would still apply.  */
4902 char sigset();
4903
4904 int main() {
4905 sigset()
4906 ; return 0; }
4907 EOF
4908 if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4909   rm -rf conftest*
4910   eval "ac_cv_lib_$ac_lib_var=yes"
4911 else
4912   echo "configure: failed program was:" >&5
4913   cat conftest.$ac_ext >&5
4914   rm -rf conftest*
4915   eval "ac_cv_lib_$ac_lib_var=no"
4916 fi
4917 rm -f conftest*
4918 LIBS="$ac_save_LIBS"
4919
4920 fi
4921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4922   echo "$ac_t""yes" 1>&6
4923     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4924     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4925   cat >> confdefs.h <<EOF
4926 #define $ac_tr_lib 1
4927 EOF
4928
4929   LIBS="-lV3 $LIBS"
4930
4931 else
4932   echo "$ac_t""no" 1>&6
4933 fi
4934
4935
4936 if test $ac_cv_header_winsock_h = yes; then
4937         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4938 echo "configure:4939: checking for winsock" >&5
4939 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4940   echo $ac_n "(cached) $ac_c" 1>&6
4941 else
4942   cat > conftest.$ac_ext <<EOF
4943 #line 4944 "configure"
4944 #include "confdefs.h"
4945 #include <winsock.h>
4946 int main() {
4947
4948                         socket(0,0,0);
4949                         select(0,NULL,NULL,NULL,NULL);
4950                         closesocket(0);
4951                         gethostname(NULL,0);
4952         
4953 ; return 0; }
4954 EOF
4955 if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4956   rm -rf conftest*
4957   ol_cv_winsock=yes
4958 else
4959   echo "configure: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   rm -rf conftest*
4962   ol_cv_winsock=no
4963 fi
4964 rm -f conftest*]
4965 fi
4966
4967 echo "$ac_t""$ol_cv_winsock" 1>&6
4968
4969         if test $ol_cv_winsock = yes ; then
4970                 cat >> confdefs.h <<\EOF
4971 #define HAVE_WINSOCK 1
4972 EOF
4973
4974                 ac_cv_func_socket=yes
4975                 ac_cv_func_select=yes
4976                 ac_cv_func_closesocket=yes
4977                 ac_cv_func_gethostname=yes
4978         fi
4979 fi
4980
4981
4982 echo $ac_n "checking for socket""... $ac_c" 1>&6
4983 echo "configure:4984: checking for socket" >&5
4984 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4985   echo $ac_n "(cached) $ac_c" 1>&6
4986 else
4987   cat > conftest.$ac_ext <<EOF
4988 #line 4989 "configure"
4989 #include "confdefs.h"
4990 /* System header to define __stub macros and hopefully few prototypes,
4991     which can conflict with char socket(); below.  */
4992 #include <assert.h>
4993 /* Override any gcc2 internal prototype to avoid an error.  */
4994 /* We use char because int might match the return type of a gcc2
4995     builtin and then its argument prototype would still apply.  */
4996 char socket();
4997 char (*f)();
4998
4999 int main() {
5000
5001 /* The GNU C library defines this for functions which it implements
5002     to always fail with ENOSYS.  Some functions are actually named
5003     something starting with __ and the normal name is an alias.  */
5004 #if defined (__stub_socket) || defined (__stub___socket)
5005 choke me
5006 #else
5007 f = socket;
5008 #endif
5009
5010 ; return 0; }
5011 EOF
5012 if { (eval echo configure:5013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5013   rm -rf conftest*
5014   eval "ac_cv_func_socket=yes"
5015 else
5016   echo "configure: failed program was:" >&5
5017   cat conftest.$ac_ext >&5
5018   rm -rf conftest*
5019   eval "ac_cv_func_socket=no"
5020 fi
5021 rm -f conftest*
5022 fi
5023
5024 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5025   echo "$ac_t""yes" 1>&6
5026   :
5027 else
5028   echo "$ac_t""no" 1>&6
5029         
5030         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5031 echo "configure:5032: checking for main in -lsocket" >&5
5032 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5034   echo $ac_n "(cached) $ac_c" 1>&6
5035 else
5036   ac_save_LIBS="$LIBS"
5037 LIBS="-lsocket  $LIBS"
5038 cat > conftest.$ac_ext <<EOF
5039 #line 5040 "configure"
5040 #include "confdefs.h"
5041
5042 int main() {
5043 main()
5044 ; return 0; }
5045 EOF
5046 if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5047   rm -rf conftest*
5048   eval "ac_cv_lib_$ac_lib_var=yes"
5049 else
5050   echo "configure: failed program was:" >&5
5051   cat conftest.$ac_ext >&5
5052   rm -rf conftest*
5053   eval "ac_cv_lib_$ac_lib_var=no"
5054 fi
5055 rm -f conftest*
5056 LIBS="$ac_save_LIBS"
5057
5058 fi
5059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5060   echo "$ac_t""yes" 1>&6
5061     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5062     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5063   cat >> confdefs.h <<EOF
5064 #define $ac_tr_lib 1
5065 EOF
5066
5067   LIBS="-lsocket $LIBS"
5068
5069 else
5070   echo "$ac_t""no" 1>&6
5071 fi
5072
5073         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5074 echo "configure:5075: checking for main in -lnet" >&5
5075 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5076 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5077   echo $ac_n "(cached) $ac_c" 1>&6
5078 else
5079   ac_save_LIBS="$LIBS"
5080 LIBS="-lnet  $LIBS"
5081 cat > conftest.$ac_ext <<EOF
5082 #line 5083 "configure"
5083 #include "confdefs.h"
5084
5085 int main() {
5086 main()
5087 ; return 0; }
5088 EOF
5089 if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5090   rm -rf conftest*
5091   eval "ac_cv_lib_$ac_lib_var=yes"
5092 else
5093   echo "configure: failed program was:" >&5
5094   cat conftest.$ac_ext >&5
5095   rm -rf conftest*
5096   eval "ac_cv_lib_$ac_lib_var=no"
5097 fi
5098 rm -f conftest*
5099 LIBS="$ac_save_LIBS"
5100
5101 fi
5102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5103   echo "$ac_t""yes" 1>&6
5104     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5105     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5106   cat >> confdefs.h <<EOF
5107 #define $ac_tr_lib 1
5108 EOF
5109
5110   LIBS="-lnet $LIBS"
5111
5112 else
5113   echo "$ac_t""no" 1>&6
5114 fi
5115
5116         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5117 echo "configure:5118: checking for main in -lnsl_s" >&5
5118 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5120   echo $ac_n "(cached) $ac_c" 1>&6
5121 else
5122   ac_save_LIBS="$LIBS"
5123 LIBS="-lnsl_s  $LIBS"
5124 cat > conftest.$ac_ext <<EOF
5125 #line 5126 "configure"
5126 #include "confdefs.h"
5127
5128 int main() {
5129 main()
5130 ; return 0; }
5131 EOF
5132 if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5133   rm -rf conftest*
5134   eval "ac_cv_lib_$ac_lib_var=yes"
5135 else
5136   echo "configure: failed program was:" >&5
5137   cat conftest.$ac_ext >&5
5138   rm -rf conftest*
5139   eval "ac_cv_lib_$ac_lib_var=no"
5140 fi
5141 rm -f conftest*
5142 LIBS="$ac_save_LIBS"
5143
5144 fi
5145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5146   echo "$ac_t""yes" 1>&6
5147     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5148     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5149   cat >> confdefs.h <<EOF
5150 #define $ac_tr_lib 1
5151 EOF
5152
5153   LIBS="-lnsl_s $LIBS"
5154
5155 else
5156   echo "$ac_t""no" 1>&6
5157 fi
5158
5159         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5160 echo "configure:5161: checking for main in -lnsl" >&5
5161 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5162 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5163   echo $ac_n "(cached) $ac_c" 1>&6
5164 else
5165   ac_save_LIBS="$LIBS"
5166 LIBS="-lnsl  $LIBS"
5167 cat > conftest.$ac_ext <<EOF
5168 #line 5169 "configure"
5169 #include "confdefs.h"
5170
5171 int main() {
5172 main()
5173 ; return 0; }
5174 EOF
5175 if { (eval echo configure:5176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5176   rm -rf conftest*
5177   eval "ac_cv_lib_$ac_lib_var=yes"
5178 else
5179   echo "configure: failed program was:" >&5
5180   cat conftest.$ac_ext >&5
5181   rm -rf conftest*
5182   eval "ac_cv_lib_$ac_lib_var=no"
5183 fi
5184 rm -f conftest*
5185 LIBS="$ac_save_LIBS"
5186
5187 fi
5188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5189   echo "$ac_t""yes" 1>&6
5190     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5191     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5192   cat >> confdefs.h <<EOF
5193 #define $ac_tr_lib 1
5194 EOF
5195
5196   LIBS="-lnsl $LIBS"
5197
5198 else
5199   echo "$ac_t""no" 1>&6
5200 fi
5201
5202         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5203 echo "configure:5204: checking for socket in -linet" >&5
5204 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5205 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5206   echo $ac_n "(cached) $ac_c" 1>&6
5207 else
5208   ac_save_LIBS="$LIBS"
5209 LIBS="-linet  $LIBS"
5210 cat > conftest.$ac_ext <<EOF
5211 #line 5212 "configure"
5212 #include "confdefs.h"
5213 /* Override any gcc2 internal prototype to avoid an error.  */
5214 /* We use char because int might match the return type of a gcc2
5215     builtin and then its argument prototype would still apply.  */
5216 char socket();
5217
5218 int main() {
5219 socket()
5220 ; return 0; }
5221 EOF
5222 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5223   rm -rf conftest*
5224   eval "ac_cv_lib_$ac_lib_var=yes"
5225 else
5226   echo "configure: failed program was:" >&5
5227   cat conftest.$ac_ext >&5
5228   rm -rf conftest*
5229   eval "ac_cv_lib_$ac_lib_var=no"
5230 fi
5231 rm -f conftest*
5232 LIBS="$ac_save_LIBS"
5233
5234 fi
5235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5236   echo "$ac_t""yes" 1>&6
5237     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5238     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5239   cat >> confdefs.h <<EOF
5240 #define $ac_tr_lib 1
5241 EOF
5242
5243   LIBS="-linet $LIBS"
5244
5245 else
5246   echo "$ac_t""no" 1>&6
5247 fi
5248
5249         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5250 echo "configure:5251: checking for main in -lgen" >&5
5251 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5253   echo $ac_n "(cached) $ac_c" 1>&6
5254 else
5255   ac_save_LIBS="$LIBS"
5256 LIBS="-lgen  $LIBS"
5257 cat > conftest.$ac_ext <<EOF
5258 #line 5259 "configure"
5259 #include "confdefs.h"
5260
5261 int main() {
5262 main()
5263 ; return 0; }
5264 EOF
5265 if { (eval echo configure:5266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5266   rm -rf conftest*
5267   eval "ac_cv_lib_$ac_lib_var=yes"
5268 else
5269   echo "configure: failed program was:" >&5
5270   cat conftest.$ac_ext >&5
5271   rm -rf conftest*
5272   eval "ac_cv_lib_$ac_lib_var=no"
5273 fi
5274 rm -f conftest*
5275 LIBS="$ac_save_LIBS"
5276
5277 fi
5278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5279   echo "$ac_t""yes" 1>&6
5280     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5281     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5282   cat >> confdefs.h <<EOF
5283 #define $ac_tr_lib 1
5284 EOF
5285
5286   LIBS="-lgen $LIBS"
5287
5288 else
5289   echo "$ac_t""no" 1>&6
5290 fi
5291
5292
5293 fi
5294
5295
5296 echo $ac_n "checking for select""... $ac_c" 1>&6
5297 echo "configure:5298: checking for select" >&5
5298 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5299   echo $ac_n "(cached) $ac_c" 1>&6
5300 else
5301   cat > conftest.$ac_ext <<EOF
5302 #line 5303 "configure"
5303 #include "confdefs.h"
5304 /* System header to define __stub macros and hopefully few prototypes,
5305     which can conflict with char select(); below.  */
5306 #include <assert.h>
5307 /* Override any gcc2 internal prototype to avoid an error.  */
5308 /* We use char because int might match the return type of a gcc2
5309     builtin and then its argument prototype would still apply.  */
5310 char select();
5311 char (*f)();
5312
5313 int main() {
5314
5315 /* The GNU C library defines this for functions which it implements
5316     to always fail with ENOSYS.  Some functions are actually named
5317     something starting with __ and the normal name is an alias.  */
5318 #if defined (__stub_select) || defined (__stub___select)
5319 choke me
5320 #else
5321 f = select;
5322 #endif
5323
5324 ; return 0; }
5325 EOF
5326 if { (eval echo configure:5327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5327   rm -rf conftest*
5328   eval "ac_cv_func_select=yes"
5329 else
5330   echo "configure: failed program was:" >&5
5331   cat conftest.$ac_ext >&5
5332   rm -rf conftest*
5333   eval "ac_cv_func_select=no"
5334 fi
5335 rm -f conftest*
5336 fi
5337
5338 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5339   echo "$ac_t""yes" 1>&6
5340   :
5341 else
5342   echo "$ac_t""no" 1>&6
5343 { echo "configure: error: select() required." 1>&2; exit 1; }
5344 fi
5345
5346
5347 if test "${ac_cv_header_winsock_h}" != yes; then
5348                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5349 echo "configure:5350: checking types of arguments for select()" >&5
5350  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5351   echo $ac_n "(cached) $ac_c" 1>&6
5352 else
5353    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5354   echo $ac_n "(cached) $ac_c" 1>&6
5355 else
5356     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5357   echo $ac_n "(cached) $ac_c" 1>&6
5358 else
5359      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5360      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5361       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5362        cat > conftest.$ac_ext <<EOF
5363 #line 5364 "configure"
5364 #include "confdefs.h"
5365 #ifdef HAVE_SYS_TYPES_H
5366 #include <sys/types.h>
5367 #endif
5368 #ifdef HAVE_SYS_TIME_H
5369 #include <sys/time.h>
5370 #endif
5371 #ifdef HAVE_SYS_SELECT_H
5372 #include <sys/select.h>
5373 #endif
5374 #ifdef HAVE_SYS_SOCKET_H
5375 #include <sys/socket.h>
5376 #endif
5377 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);
5378 int main() {
5379
5380 ; return 0; }
5381 EOF
5382 if { (eval echo configure:5383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5383   rm -rf conftest*
5384           ac_not_found=no ; break 3
5385 else
5386   echo "configure: failed program was:" >&5
5387   cat conftest.$ac_ext >&5
5388   rm -rf conftest*
5389   ac_not_found=yes
5390 fi
5391 rm -f conftest*
5392       done
5393      done
5394     done
5395    
5396 fi
5397   
5398 fi
5399  
5400 fi
5401  if test "$ac_not_found" = yes; then
5402   ac_cv_func_select_arg1=int 
5403   ac_cv_func_select_arg234='int *' 
5404   ac_cv_func_select_arg5='struct timeval *'
5405  fi
5406  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5407  cat >> confdefs.h <<EOF
5408 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5409 EOF
5410
5411  cat >> confdefs.h <<EOF
5412 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5413 EOF
5414
5415  cat >> confdefs.h <<EOF
5416 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5417 EOF
5418
5419
5420 fi
5421
5422
5423 for ac_hdr in regex.h 
5424 do
5425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5427 echo "configure:5428: checking for $ac_hdr" >&5
5428 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5429   echo $ac_n "(cached) $ac_c" 1>&6
5430 else
5431   cat > conftest.$ac_ext <<EOF
5432 #line 5433 "configure"
5433 #include "confdefs.h"
5434 #include <$ac_hdr>
5435 EOF
5436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5437 { (eval echo configure:5438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5439 if test -z "$ac_err"; then
5440   rm -rf conftest*
5441   eval "ac_cv_header_$ac_safe=yes"
5442 else
5443   echo "$ac_err" >&5
5444   echo "configure: failed program was:" >&5
5445   cat conftest.$ac_ext >&5
5446   rm -rf conftest*
5447   eval "ac_cv_header_$ac_safe=no"
5448 fi
5449 rm -f conftest*
5450 fi
5451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5452   echo "$ac_t""yes" 1>&6
5453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5454   cat >> confdefs.h <<EOF
5455 #define $ac_tr_hdr 1
5456 EOF
5457  
5458 else
5459   echo "$ac_t""no" 1>&6
5460 fi
5461 done
5462
5463 if test "$ac_cv_header_regex_h" != yes ; then
5464         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5465 fi
5466 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5467 echo "configure:5468: checking for regfree" >&5
5468 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5469   echo $ac_n "(cached) $ac_c" 1>&6
5470 else
5471   cat > conftest.$ac_ext <<EOF
5472 #line 5473 "configure"
5473 #include "confdefs.h"
5474 /* System header to define __stub macros and hopefully few prototypes,
5475     which can conflict with char regfree(); below.  */
5476 #include <assert.h>
5477 /* Override any gcc2 internal prototype to avoid an error.  */
5478 /* We use char because int might match the return type of a gcc2
5479     builtin and then its argument prototype would still apply.  */
5480 char regfree();
5481 char (*f)();
5482
5483 int main() {
5484
5485 /* The GNU C library defines this for functions which it implements
5486     to always fail with ENOSYS.  Some functions are actually named
5487     something starting with __ and the normal name is an alias.  */
5488 #if defined (__stub_regfree) || defined (__stub___regfree)
5489 choke me
5490 #else
5491 f = regfree;
5492 #endif
5493
5494 ; return 0; }
5495 EOF
5496 if { (eval echo configure:5497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5497   rm -rf conftest*
5498   eval "ac_cv_func_regfree=yes"
5499 else
5500   echo "configure: failed program was:" >&5
5501   cat conftest.$ac_ext >&5
5502   rm -rf conftest*
5503   eval "ac_cv_func_regfree=no"
5504 fi
5505 rm -f conftest*
5506 fi
5507
5508 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5509   echo "$ac_t""yes" 1>&6
5510   :
5511 else
5512   echo "$ac_t""no" 1>&6
5513 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5514 fi
5515
5516
5517
5518 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5519 echo "configure:5520: checking for compatible POSIX regex" >&5
5520 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5521   echo $ac_n "(cached) $ac_c" 1>&6
5522 else
5523   
5524         if test "$cross_compiling" = yes; then
5525   ol_cv_c_posix_regex=cross
5526 else
5527   cat > conftest.$ac_ext <<EOF
5528 #line 5529 "configure"
5529 #include "confdefs.h"
5530
5531 #include <sys/types.h>
5532 #include <regex.h>
5533 static char *pattern, *string;
5534 main()
5535 {
5536         int rc;
5537         regex_t re;
5538
5539         pattern = "^A";
5540
5541         if(regcomp(&re, pattern, 0)) {
5542                 return -1;
5543         }
5544         
5545         string = "ALL MATCH";
5546         
5547         rc = regexec(&re, string, 0, (void*)0, 0);
5548
5549         regfree(&re);
5550
5551         return rc;
5552 }
5553 EOF
5554 if { (eval echo configure:5555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5555 then
5556   ol_cv_c_posix_regex=yes
5557 else
5558   echo "configure: failed program was:" >&5
5559   cat conftest.$ac_ext >&5
5560   rm -fr conftest*
5561   ol_cv_c_posix_regex=no
5562 fi
5563 rm -fr conftest*
5564 fi
5565
5566 fi
5567
5568 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5569
5570 if test "$ol_cv_c_posix_regex" = no ; then
5571         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5572 fi
5573
5574 ol_link_dnssrv=no
5575 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5576 echo "configure:5577: checking for res_query" >&5
5577 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5578   echo $ac_n "(cached) $ac_c" 1>&6
5579 else
5580   cat > conftest.$ac_ext <<EOF
5581 #line 5582 "configure"
5582 #include "confdefs.h"
5583 /* System header to define __stub macros and hopefully few prototypes,
5584     which can conflict with char res_query(); below.  */
5585 #include <assert.h>
5586 /* Override any gcc2 internal prototype to avoid an error.  */
5587 /* We use char because int might match the return type of a gcc2
5588     builtin and then its argument prototype would still apply.  */
5589 char res_query();
5590 char (*f)();
5591
5592 int main() {
5593
5594 /* The GNU C library defines this for functions which it implements
5595     to always fail with ENOSYS.  Some functions are actually named
5596     something starting with __ and the normal name is an alias.  */
5597 #if defined (__stub_res_query) || defined (__stub___res_query)
5598 choke me
5599 #else
5600 f = res_query;
5601 #endif
5602
5603 ; return 0; }
5604 EOF
5605 if { (eval echo configure:5606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5606   rm -rf conftest*
5607   eval "ac_cv_func_res_query=yes"
5608 else
5609   echo "configure: failed program was:" >&5
5610   cat conftest.$ac_ext >&5
5611   rm -rf conftest*
5612   eval "ac_cv_func_res_query=no"
5613 fi
5614 rm -f conftest*
5615 fi
5616
5617 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5618   echo "$ac_t""yes" 1>&6
5619   :
5620 else
5621   echo "$ac_t""no" 1>&6
5622 fi
5623
5624 if test $ac_cv_func_res_query = no ; then 
5625         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5626 echo "configure:5627: checking for res_query in -lbind" >&5
5627 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5629   echo $ac_n "(cached) $ac_c" 1>&6
5630 else
5631   ac_save_LIBS="$LIBS"
5632 LIBS="-lbind  $LIBS"
5633 cat > conftest.$ac_ext <<EOF
5634 #line 5635 "configure"
5635 #include "confdefs.h"
5636 /* Override any gcc2 internal prototype to avoid an error.  */
5637 /* We use char because int might match the return type of a gcc2
5638     builtin and then its argument prototype would still apply.  */
5639 char res_query();
5640
5641 int main() {
5642 res_query()
5643 ; return 0; }
5644 EOF
5645 if { (eval echo configure:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5646   rm -rf conftest*
5647   eval "ac_cv_lib_$ac_lib_var=yes"
5648 else
5649   echo "configure: failed program was:" >&5
5650   cat conftest.$ac_ext >&5
5651   rm -rf conftest*
5652   eval "ac_cv_lib_$ac_lib_var=no"
5653 fi
5654 rm -f conftest*
5655 LIBS="$ac_save_LIBS"
5656
5657 fi
5658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5659   echo "$ac_t""yes" 1>&6
5660     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5661     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5662   cat >> confdefs.h <<EOF
5663 #define $ac_tr_lib 1
5664 EOF
5665
5666   LIBS="-lbind $LIBS"
5667
5668 else
5669   echo "$ac_t""no" 1>&6
5670 fi
5671
5672         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5673 fi
5674
5675 if test $ac_cv_func_res_query = no ; then 
5676         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5677 echo "configure:5678: checking for __res_query in -lbind" >&5
5678 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5679 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5680   echo $ac_n "(cached) $ac_c" 1>&6
5681 else
5682   ac_save_LIBS="$LIBS"
5683 LIBS="-lbind  $LIBS"
5684 cat > conftest.$ac_ext <<EOF
5685 #line 5686 "configure"
5686 #include "confdefs.h"
5687 /* Override any gcc2 internal prototype to avoid an error.  */
5688 /* We use char because int might match the return type of a gcc2
5689     builtin and then its argument prototype would still apply.  */
5690 char __res_query();
5691
5692 int main() {
5693 __res_query()
5694 ; return 0; }
5695 EOF
5696 if { (eval echo configure:5697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5697   rm -rf conftest*
5698   eval "ac_cv_lib_$ac_lib_var=yes"
5699 else
5700   echo "configure: failed program was:" >&5
5701   cat conftest.$ac_ext >&5
5702   rm -rf conftest*
5703   eval "ac_cv_lib_$ac_lib_var=no"
5704 fi
5705 rm -f conftest*
5706 LIBS="$ac_save_LIBS"
5707
5708 fi
5709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5710   echo "$ac_t""yes" 1>&6
5711     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5712     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5713   cat >> confdefs.h <<EOF
5714 #define $ac_tr_lib 1
5715 EOF
5716
5717   LIBS="-lbind $LIBS"
5718
5719 else
5720   echo "$ac_t""no" 1>&6
5721 fi
5722
5723         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5724 fi
5725
5726 if test $ac_cv_func_res_query = no ; then 
5727         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5728 echo "configure:5729: checking for res_query in -lresolv" >&5
5729 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5730 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5731   echo $ac_n "(cached) $ac_c" 1>&6
5732 else
5733   ac_save_LIBS="$LIBS"
5734 LIBS="-lresolv  $LIBS"
5735 cat > conftest.$ac_ext <<EOF
5736 #line 5737 "configure"
5737 #include "confdefs.h"
5738 /* Override any gcc2 internal prototype to avoid an error.  */
5739 /* We use char because int might match the return type of a gcc2
5740     builtin and then its argument prototype would still apply.  */
5741 char res_query();
5742
5743 int main() {
5744 res_query()
5745 ; return 0; }
5746 EOF
5747 if { (eval echo configure:5748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5748   rm -rf conftest*
5749   eval "ac_cv_lib_$ac_lib_var=yes"
5750 else
5751   echo "configure: failed program was:" >&5
5752   cat conftest.$ac_ext >&5
5753   rm -rf conftest*
5754   eval "ac_cv_lib_$ac_lib_var=no"
5755 fi
5756 rm -f conftest*
5757 LIBS="$ac_save_LIBS"
5758
5759 fi
5760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5761   echo "$ac_t""yes" 1>&6
5762     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5763     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5764   cat >> confdefs.h <<EOF
5765 #define $ac_tr_lib 1
5766 EOF
5767
5768   LIBS="-lresolv $LIBS"
5769
5770 else
5771   echo "$ac_t""no" 1>&6
5772 fi
5773
5774         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5775 fi
5776
5777 if test "$ac_cv_func_res_query" = yes ; then
5778         cat >> confdefs.h <<\EOF
5779 #define HAVE_RES_QUERY 1
5780 EOF
5781
5782
5783         if test $ol_enable_dnssrv != no ; then
5784                 ol_link_dnssrv=yes
5785         fi
5786 fi
5787
5788 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5789         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5790 fi
5791
5792 if test $ol_enable_quipu != no ; then
5793         for ac_hdr in quipu/commonarg.h
5794 do
5795 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5796 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5797 echo "configure:5798: checking for $ac_hdr" >&5
5798 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5799   echo $ac_n "(cached) $ac_c" 1>&6
5800 else
5801   cat > conftest.$ac_ext <<EOF
5802 #line 5803 "configure"
5803 #include "confdefs.h"
5804 #include <$ac_hdr>
5805 EOF
5806 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5807 { (eval echo configure:5808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5808 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5809 if test -z "$ac_err"; then
5810   rm -rf conftest*
5811   eval "ac_cv_header_$ac_safe=yes"
5812 else
5813   echo "$ac_err" >&5
5814   echo "configure: failed program was:" >&5
5815   cat conftest.$ac_ext >&5
5816   rm -rf conftest*
5817   eval "ac_cv_header_$ac_safe=no"
5818 fi
5819 rm -f conftest*
5820 fi
5821 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5822   echo "$ac_t""yes" 1>&6
5823     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5824   cat >> confdefs.h <<EOF
5825 #define $ac_tr_hdr 1
5826 EOF
5827  
5828 else
5829   echo "$ac_t""no" 1>&6
5830 fi
5831 done
5832
5833
5834         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5835                 BUILD_QUIPU=yes
5836         elif test $ol_enable_quipu = auto ; then
5837                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5838         else
5839                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5840         fi
5841 fi
5842
5843 ol_link_kbind=no
5844 ol_link_kpasswd=no
5845 ol_link_krb5=no
5846 ol_link_krb4=no
5847
5848 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5849         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5850
5851         for ac_hdr in krb5.h
5852 do
5853 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5854 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5855 echo "configure:5856: checking for $ac_hdr" >&5
5856 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5857   echo $ac_n "(cached) $ac_c" 1>&6
5858 else
5859   cat > conftest.$ac_ext <<EOF
5860 #line 5861 "configure"
5861 #include "confdefs.h"
5862 #include <$ac_hdr>
5863 EOF
5864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5865 { (eval echo configure:5866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5867 if test -z "$ac_err"; then
5868   rm -rf conftest*
5869   eval "ac_cv_header_$ac_safe=yes"
5870 else
5871   echo "$ac_err" >&5
5872   echo "configure: failed program was:" >&5
5873   cat conftest.$ac_ext >&5
5874   rm -rf conftest*
5875   eval "ac_cv_header_$ac_safe=no"
5876 fi
5877 rm -f conftest*
5878 fi
5879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5880   echo "$ac_t""yes" 1>&6
5881     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5882   cat >> confdefs.h <<EOF
5883 #define $ac_tr_hdr 1
5884 EOF
5885  
5886 else
5887   echo "$ac_t""no" 1>&6
5888 fi
5889 done
5890
5891
5892         if test $ac_cv_header_krb5_h = yes ; then
5893                                 for ac_hdr in heim_err.h
5894 do
5895 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5896 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5897 echo "configure:5898: checking for $ac_hdr" >&5
5898 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5899   echo $ac_n "(cached) $ac_c" 1>&6
5900 else
5901   cat > conftest.$ac_ext <<EOF
5902 #line 5903 "configure"
5903 #include "confdefs.h"
5904 #include <$ac_hdr>
5905 EOF
5906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5907 { (eval echo configure:5908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5909 if test -z "$ac_err"; then
5910   rm -rf conftest*
5911   eval "ac_cv_header_$ac_safe=yes"
5912 else
5913   echo "$ac_err" >&5
5914   echo "configure: failed program was:" >&5
5915   cat conftest.$ac_ext >&5
5916   rm -rf conftest*
5917   eval "ac_cv_header_$ac_safe=no"
5918 fi
5919 rm -f conftest*
5920 fi
5921 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5922   echo "$ac_t""yes" 1>&6
5923     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5924   cat >> confdefs.h <<EOF
5925 #define $ac_tr_hdr 1
5926 EOF
5927  
5928 else
5929   echo "$ac_t""no" 1>&6
5930 fi
5931 done
5932
5933                 if test $ac_cv_header_heim_err_h = yes ; then
5934                         krb5_impl=heimdal
5935                 else
5936                         krb5_impl=mit
5937                 fi
5938
5939                 if test $krb5_impl = mit; then
5940                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5941 echo "configure:5942: checking for main in -lkrb5" >&5
5942 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5943 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5944   echo $ac_n "(cached) $ac_c" 1>&6
5945 else
5946   ac_save_LIBS="$LIBS"
5947 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5948 cat > conftest.$ac_ext <<EOF
5949 #line 5950 "configure"
5950 #include "confdefs.h"
5951
5952 int main() {
5953 main()
5954 ; return 0; }
5955 EOF
5956 if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5957   rm -rf conftest*
5958   eval "ac_cv_lib_$ac_lib_var=yes"
5959 else
5960   echo "configure: failed program was:" >&5
5961   cat conftest.$ac_ext >&5
5962   rm -rf conftest*
5963   eval "ac_cv_lib_$ac_lib_var=no"
5964 fi
5965 rm -f conftest*
5966 LIBS="$ac_save_LIBS"
5967
5968 fi
5969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5970   echo "$ac_t""yes" 1>&6
5971   have_krb5=yes
5972                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5973 else
5974   echo "$ac_t""no" 1>&6
5975 have_krb5=no
5976 fi
5977
5978
5979                 elif test $krb5_impl = heimdal; then
5980                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5981 echo "configure:5982: checking for main in -lkrb5" >&5
5982 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5984   echo $ac_n "(cached) $ac_c" 1>&6
5985 else
5986   ac_save_LIBS="$LIBS"
5987 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5988 cat > conftest.$ac_ext <<EOF
5989 #line 5990 "configure"
5990 #include "confdefs.h"
5991
5992 int main() {
5993 main()
5994 ; return 0; }
5995 EOF
5996 if { (eval echo configure:5997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5997   rm -rf conftest*
5998   eval "ac_cv_lib_$ac_lib_var=yes"
5999 else
6000   echo "configure: failed program was:" >&5
6001   cat conftest.$ac_ext >&5
6002   rm -rf conftest*
6003   eval "ac_cv_lib_$ac_lib_var=no"
6004 fi
6005 rm -f conftest*
6006 LIBS="$ac_save_LIBS"
6007
6008 fi
6009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6010   echo "$ac_t""yes" 1>&6
6011   have_krb5=yes
6012                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6013 else
6014   echo "$ac_t""no" 1>&6
6015 have_krb5=no
6016 fi
6017
6018
6019                         cat >> confdefs.h <<\EOF
6020 #define HAVE_HEIMDAL_KERBEROS 1
6021 EOF
6022
6023                 else
6024                         have_krb5=no
6025                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6026                 fi
6027
6028                 if test $have_krb5 = yes ; then
6029                         ol_link_krb5=yes
6030
6031                         cat >> confdefs.h <<\EOF
6032 #define HAVE_KRB5 1
6033 EOF
6034
6035
6036                         if test $ol_enable_kpasswd != no ; then
6037                                 ol_link_kpasswd=yes;
6038                         fi
6039
6040                         if test $ol_with_kerberos = k5only ; then
6041                                 ol_with_kerberos=found
6042                         fi
6043
6044                 elif test $ol_with_kerberos != auto ; then
6045                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6046                 fi
6047
6048         fi
6049 fi
6050
6051 if test $ol_link_krb5 = yes -a \
6052         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6053
6054         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6055 do
6056 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6057 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6058 echo "configure:6059: checking for $ac_hdr" >&5
6059 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6060   echo $ac_n "(cached) $ac_c" 1>&6
6061 else
6062   cat > conftest.$ac_ext <<EOF
6063 #line 6064 "configure"
6064 #include "confdefs.h"
6065 #include <$ac_hdr>
6066 EOF
6067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6068 { (eval echo configure:6069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6070 if test -z "$ac_err"; then
6071   rm -rf conftest*
6072   eval "ac_cv_header_$ac_safe=yes"
6073 else
6074   echo "$ac_err" >&5
6075   echo "configure: failed program was:" >&5
6076   cat conftest.$ac_ext >&5
6077   rm -rf conftest*
6078   eval "ac_cv_header_$ac_safe=no"
6079 fi
6080 rm -f conftest*
6081 fi
6082 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6083   echo "$ac_t""yes" 1>&6
6084     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6085   cat >> confdefs.h <<EOF
6086 #define $ac_tr_hdr 1
6087 EOF
6088  
6089 else
6090   echo "$ac_t""no" 1>&6
6091 fi
6092 done
6093
6094
6095         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6096                 if test $krb5_impl = mit; then
6097                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6098 echo "configure:6099: checking for main in -lkrb4" >&5
6099 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6100 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6101   echo $ac_n "(cached) $ac_c" 1>&6
6102 else
6103   ac_save_LIBS="$LIBS"
6104 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6105 cat > conftest.$ac_ext <<EOF
6106 #line 6107 "configure"
6107 #include "confdefs.h"
6108
6109 int main() {
6110 main()
6111 ; return 0; }
6112 EOF
6113 if { (eval echo configure:6114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6114   rm -rf conftest*
6115   eval "ac_cv_lib_$ac_lib_var=yes"
6116 else
6117   echo "configure: failed program was:" >&5
6118   cat conftest.$ac_ext >&5
6119   rm -rf conftest*
6120   eval "ac_cv_lib_$ac_lib_var=no"
6121 fi
6122 rm -f conftest*
6123 LIBS="$ac_save_LIBS"
6124
6125 fi
6126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6127   echo "$ac_t""yes" 1>&6
6128   have_k425=yes
6129                                 KRB4_LIBS="-lkrb4 -ldes425"
6130 else
6131   echo "$ac_t""no" 1>&6
6132 have_k425=no
6133 fi
6134
6135
6136                 elif test $krb5_impl = heimdal; then
6137                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6138 echo "configure:6139: checking for main in -lkrb4" >&5
6139 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6140 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6141   echo $ac_n "(cached) $ac_c" 1>&6
6142 else
6143   ac_save_LIBS="$LIBS"
6144 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6145 cat > conftest.$ac_ext <<EOF
6146 #line 6147 "configure"
6147 #include "confdefs.h"
6148
6149 int main() {
6150 main()
6151 ; return 0; }
6152 EOF
6153 if { (eval echo configure:6154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6154   rm -rf conftest*
6155   eval "ac_cv_lib_$ac_lib_var=yes"
6156 else
6157   echo "configure: failed program was:" >&5
6158   cat conftest.$ac_ext >&5
6159   rm -rf conftest*
6160   eval "ac_cv_lib_$ac_lib_var=no"
6161 fi
6162 rm -f conftest*
6163 LIBS="$ac_save_LIBS"
6164
6165 fi
6166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6167   echo "$ac_t""yes" 1>&6
6168   have_k425=yes
6169                                 KRB4_LIBS="-lkrb4"
6170 else
6171   echo "$ac_t""no" 1>&6
6172 have_k425=no
6173 fi
6174
6175
6176                 else
6177                         have_425=no
6178                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6179                 fi
6180
6181                 if test $have_k425 = yes ; then
6182                         ol_with_kerberos=found
6183                         ol_link_krb4=yes
6184
6185                         cat >> confdefs.h <<\EOF
6186 #define HAVE_KRB425 1
6187 EOF
6188
6189                         cat >> confdefs.h <<\EOF
6190 #define HAVE_KRB4 1
6191 EOF
6192
6193
6194                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6195 echo "configure:6196: checking for des_debug in Kerberos libraries" >&5
6196 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6197   echo $ac_n "(cached) $ac_c" 1>&6
6198 else
6199   
6200                                                                 save_LIBS="$LIBS"
6201                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6202                                 cat > conftest.$ac_ext <<EOF
6203 #line 6204 "configure"
6204 #include "confdefs.h"
6205
6206 #include <kerberosIV/krb.h>
6207 #include <kerberosIV/des.h>
6208 extern int des_debug;
6209
6210 int main() {
6211
6212 des_debug = 1;
6213
6214 ; return 0; }
6215 EOF
6216 if { (eval echo configure:6217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6217   rm -rf conftest*
6218   ol_cv_var_des_debug=yes
6219 else
6220   echo "configure: failed program was:" >&5
6221   cat conftest.$ac_ext >&5
6222   rm -rf conftest*
6223   ol_cv_var_des_debug=no
6224 fi
6225 rm -f conftest*
6226                                                                 LIBS="$save_LIBS"
6227                         
6228 fi
6229
6230 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6231
6232                         if test $ol_cv_var_des_debug = yes ; then
6233                                 cat >> confdefs.h <<\EOF
6234 #define HAVE_DES_DEBUG 1
6235 EOF
6236
6237                         fi
6238
6239                         LIBS="$save_LIBS"
6240                 fi
6241         fi
6242 fi
6243
6244 if test $ol_link_krb5 = yes ; then
6245         ol_with_kerberos=found
6246 fi
6247
6248 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6249         -o $ol_with_kerberos = kth ; then
6250
6251         for ac_hdr in krb.h des.h krb-archaeology.h 
6252 do
6253 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6254 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6255 echo "configure:6256: checking for $ac_hdr" >&5
6256 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6257   echo $ac_n "(cached) $ac_c" 1>&6
6258 else
6259   cat > conftest.$ac_ext <<EOF
6260 #line 6261 "configure"
6261 #include "confdefs.h"
6262 #include <$ac_hdr>
6263 EOF
6264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6265 { (eval echo configure:6266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6267 if test -z "$ac_err"; then
6268   rm -rf conftest*
6269   eval "ac_cv_header_$ac_safe=yes"
6270 else
6271   echo "$ac_err" >&5
6272   echo "configure: failed program was:" >&5
6273   cat conftest.$ac_ext >&5
6274   rm -rf conftest*
6275   eval "ac_cv_header_$ac_safe=no"
6276 fi
6277 rm -f conftest*
6278 fi
6279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6280   echo "$ac_t""yes" 1>&6
6281     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6282   cat >> confdefs.h <<EOF
6283 #define $ac_tr_hdr 1
6284 EOF
6285  
6286 else
6287   echo "$ac_t""no" 1>&6
6288 fi
6289 done
6290
6291
6292         if test $ac_cv_header_krb_h = yes ; then
6293                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6294 echo "configure:6295: checking for main in -lkrb" >&5
6295 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6296 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6297   echo $ac_n "(cached) $ac_c" 1>&6
6298 else
6299   ac_save_LIBS="$LIBS"
6300 LIBS="-lkrb -ldes $LIBS"
6301 cat > conftest.$ac_ext <<EOF
6302 #line 6303 "configure"
6303 #include "confdefs.h"
6304
6305 int main() {
6306 main()
6307 ; return 0; }
6308 EOF
6309 if { (eval echo configure:6310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6310   rm -rf conftest*
6311   eval "ac_cv_lib_$ac_lib_var=yes"
6312 else
6313   echo "configure: failed program was:" >&5
6314   cat conftest.$ac_ext >&5
6315   rm -rf conftest*
6316   eval "ac_cv_lib_$ac_lib_var=no"
6317 fi
6318 rm -f conftest*
6319 LIBS="$ac_save_LIBS"
6320
6321 fi
6322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6323   echo "$ac_t""yes" 1>&6
6324   have_k4=yes
6325 else
6326   echo "$ac_t""no" 1>&6
6327 have_k4=no
6328 fi
6329
6330
6331                 if test $have_k4 = yes ; then
6332                         ol_with_kerberos=found
6333                         ol_link_krb4=yes
6334
6335                         cat >> confdefs.h <<\EOF
6336 #define HAVE_KRB4 1
6337 EOF
6338
6339
6340                         KRB4_LIBS="-lkrb -ldes"
6341
6342                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6343                                 cat >> confdefs.h <<\EOF
6344 #define HAVE_KTH_KERBEROS 1
6345 EOF
6346
6347                         fi
6348                 fi
6349         fi
6350 fi
6351
6352 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6353         ol_link_kpasswd=yes;
6354 fi
6355
6356 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6357         cat >> confdefs.h <<\EOF
6358 #define HAVE_KERBEROS 1
6359 EOF
6360
6361
6362 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6363         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6364 fi
6365
6366 ol_link_tls=no
6367 if test $ol_with_tls != no ; then
6368         
6369         for ac_hdr in openssl/ssl.h ssl.h
6370 do
6371 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6372 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6373 echo "configure:6374: checking for $ac_hdr" >&5
6374 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6375   echo $ac_n "(cached) $ac_c" 1>&6
6376 else
6377   cat > conftest.$ac_ext <<EOF
6378 #line 6379 "configure"
6379 #include "confdefs.h"
6380 #include <$ac_hdr>
6381 EOF
6382 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6383 { (eval echo configure:6384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6384 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6385 if test -z "$ac_err"; then
6386   rm -rf conftest*
6387   eval "ac_cv_header_$ac_safe=yes"
6388 else
6389   echo "$ac_err" >&5
6390   echo "configure: failed program was:" >&5
6391   cat conftest.$ac_ext >&5
6392   rm -rf conftest*
6393   eval "ac_cv_header_$ac_safe=no"
6394 fi
6395 rm -f conftest*
6396 fi
6397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6398   echo "$ac_t""yes" 1>&6
6399     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6400   cat >> confdefs.h <<EOF
6401 #define $ac_tr_hdr 1
6402 EOF
6403  
6404 else
6405   echo "$ac_t""no" 1>&6
6406 fi
6407 done
6408
6409         
6410         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6411                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6412 echo "configure:6413: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6413 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6414 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6415   echo $ac_n "(cached) $ac_c" 1>&6
6416 else
6417   ac_save_LIBS="$LIBS"
6418 LIBS="-lssl -lcrypto $LIBS"
6419 cat > conftest.$ac_ext <<EOF
6420 #line 6421 "configure"
6421 #include "confdefs.h"
6422 /* Override any gcc2 internal prototype to avoid an error.  */
6423 /* We use char because int might match the return type of a gcc2
6424     builtin and then its argument prototype would still apply.  */
6425 char SSLeay_add_ssl_algorithms();
6426
6427 int main() {
6428 SSLeay_add_ssl_algorithms()
6429 ; return 0; }
6430 EOF
6431 if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6432   rm -rf conftest*
6433   eval "ac_cv_lib_$ac_lib_var=yes"
6434 else
6435   echo "configure: failed program was:" >&5
6436   cat conftest.$ac_ext >&5
6437   rm -rf conftest*
6438   eval "ac_cv_lib_$ac_lib_var=no"
6439 fi
6440 rm -f conftest*
6441 LIBS="$ac_save_LIBS"
6442
6443 fi
6444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6445   echo "$ac_t""yes" 1>&6
6446   have_ssleay=yes
6447                         need_rsaref=no
6448 else
6449   echo "$ac_t""no" 1>&6
6450 have_ssleay=no
6451 fi
6452
6453                         
6454                 if test $have_ssleay = no ; then
6455                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6456 echo "configure:6457: checking for SSL_library_init in -lssl" >&5
6457 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6458 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6459   echo $ac_n "(cached) $ac_c" 1>&6
6460 else
6461   ac_save_LIBS="$LIBS"
6462 LIBS="-lssl -lcrypto $LIBS"
6463 cat > conftest.$ac_ext <<EOF
6464 #line 6465 "configure"
6465 #include "confdefs.h"
6466 /* Override any gcc2 internal prototype to avoid an error.  */
6467 /* We use char because int might match the return type of a gcc2
6468     builtin and then its argument prototype would still apply.  */
6469 char SSL_library_init();
6470
6471 int main() {
6472 SSL_library_init()
6473 ; return 0; }
6474 EOF
6475 if { (eval echo configure:6476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6476   rm -rf conftest*
6477   eval "ac_cv_lib_$ac_lib_var=yes"
6478 else
6479   echo "configure: failed program was:" >&5
6480   cat conftest.$ac_ext >&5
6481   rm -rf conftest*
6482   eval "ac_cv_lib_$ac_lib_var=no"
6483 fi
6484 rm -f conftest*
6485 LIBS="$ac_save_LIBS"
6486
6487 fi
6488 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6489   echo "$ac_t""yes" 1>&6
6490   have_ssleay=yes
6491                                 need_rsaref=no
6492 else
6493   echo "$ac_t""no" 1>&6
6494 have_ssleay=no
6495 fi
6496
6497                 fi
6498
6499                 if test $have_ssleay = no ; then
6500                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6501 echo "configure:6502: checking for ssl3_accept in -lssl" >&5
6502 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6503 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6504   echo $ac_n "(cached) $ac_c" 1>&6
6505 else
6506   ac_save_LIBS="$LIBS"
6507 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6508 cat > conftest.$ac_ext <<EOF
6509 #line 6510 "configure"
6510 #include "confdefs.h"
6511 /* Override any gcc2 internal prototype to avoid an error.  */
6512 /* We use char because int might match the return type of a gcc2
6513     builtin and then its argument prototype would still apply.  */
6514 char ssl3_accept();
6515
6516 int main() {
6517 ssl3_accept()
6518 ; return 0; }
6519 EOF
6520 if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6521   rm -rf conftest*
6522   eval "ac_cv_lib_$ac_lib_var=yes"
6523 else
6524   echo "configure: failed program was:" >&5
6525   cat conftest.$ac_ext >&5
6526   rm -rf conftest*
6527   eval "ac_cv_lib_$ac_lib_var=no"
6528 fi
6529 rm -f conftest*
6530 LIBS="$ac_save_LIBS"
6531
6532 fi
6533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6534   echo "$ac_t""yes" 1>&6
6535   have_ssleay=yes
6536                                 need_rsaref=yes
6537 else
6538   echo "$ac_t""no" 1>&6
6539 have_ssleay=no
6540 fi
6541
6542                 fi
6543
6544                 if test $have_ssleay = yes ; then
6545                         ol_with_tls=found
6546                         ol_link_tls=yes
6547
6548                         cat >> confdefs.h <<\EOF
6549 #define HAVE_SSLEAY 1
6550 EOF
6551
6552
6553                         if test $need_rsaref = yes; then
6554                                 cat >> confdefs.h <<\EOF
6555 #define HAVE_RSAREF 1
6556 EOF
6557
6558
6559                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6560                         else
6561                                 TLS_LIBS="-lssl -lcrypto"
6562                         fi
6563                 fi
6564         fi
6565 fi
6566
6567 if test $ol_link_tls = yes ; then
6568         cat >> confdefs.h <<\EOF
6569 #define HAVE_TLS 1
6570 EOF
6571
6572 fi      
6573
6574 for ac_func in \
6575         ctime_r                 \
6576         gethostbyname_r gethostbyaddr_r \
6577
6578 do
6579 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6580 echo "configure:6581: checking for $ac_func" >&5
6581 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6582   echo $ac_n "(cached) $ac_c" 1>&6
6583 else
6584   cat > conftest.$ac_ext <<EOF
6585 #line 6586 "configure"
6586 #include "confdefs.h"
6587 /* System header to define __stub macros and hopefully few prototypes,
6588     which can conflict with char $ac_func(); below.  */
6589 #include <assert.h>
6590 /* Override any gcc2 internal prototype to avoid an error.  */
6591 /* We use char because int might match the return type of a gcc2
6592     builtin and then its argument prototype would still apply.  */
6593 char $ac_func();
6594 char (*f)();
6595
6596 int main() {
6597
6598 /* The GNU C library defines this for functions which it implements
6599     to always fail with ENOSYS.  Some functions are actually named
6600     something starting with __ and the normal name is an alias.  */
6601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6602 choke me
6603 #else
6604 f = $ac_func;
6605 #endif
6606
6607 ; return 0; }
6608 EOF
6609 if { (eval echo configure:6610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6610   rm -rf conftest*
6611   eval "ac_cv_func_$ac_func=yes"
6612 else
6613   echo "configure: failed program was:" >&5
6614   cat conftest.$ac_ext >&5
6615   rm -rf conftest*
6616   eval "ac_cv_func_$ac_func=no"
6617 fi
6618 rm -f conftest*
6619 fi
6620
6621 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6622   echo "$ac_t""yes" 1>&6
6623     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6624   cat >> confdefs.h <<EOF
6625 #define $ac_tr_func 1
6626 EOF
6627  
6628 else
6629   echo "$ac_t""no" 1>&6
6630 fi
6631 done
6632
6633
6634 if test "$ac_cv_func_ctime_r" = no ; then
6635         ol_cv_func_ctime_r_nargs=0
6636 else
6637         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6638 echo "configure:6639: checking number of arguments of ctime_r" >&5
6639 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6640   echo $ac_n "(cached) $ac_c" 1>&6
6641 else
6642   cat > conftest.$ac_ext <<EOF
6643 #line 6644 "configure"
6644 #include "confdefs.h"
6645 #include <time.h>
6646 int main() {
6647 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6648 ; return 0; }
6649 EOF
6650 if { (eval echo configure:6651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6651   rm -rf conftest*
6652   ol_cv_func_ctime_r_nargs3=yes
6653 else
6654   echo "configure: failed program was:" >&5
6655   cat conftest.$ac_ext >&5
6656   rm -rf conftest*
6657   ol_cv_func_ctime_r_nargs3=no
6658 fi
6659 rm -f conftest*
6660
6661         cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 #include <time.h>
6665 int main() {
6666 time_t ti; char *buffer; ctime_r(&ti,buffer);
6667 ; return 0; }
6668 EOF
6669 if { (eval echo configure:6670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6670   rm -rf conftest*
6671   ol_cv_func_ctime_r_nargs2=yes
6672 else
6673   echo "configure: failed program was:" >&5
6674   cat conftest.$ac_ext >&5
6675   rm -rf conftest*
6676   ol_cv_func_ctime_r_nargs2=no
6677 fi
6678 rm -f conftest*
6679
6680         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6681                 $ol_cv_func_ctime_r_nargs2 = no ; then
6682
6683                 ol_cv_func_ctime_r_nargs=3
6684
6685         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6686                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6687
6688                 ol_cv_func_ctime_r_nargs=2
6689
6690         else
6691                 ol_cv_func_ctime_r_nargs=0
6692         fi
6693   
6694 fi
6695
6696 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6697
6698   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6699         cat >> confdefs.h <<EOF
6700 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6701 EOF
6702
6703   fi
6704
6705 fi
6706
6707 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6708         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6709 echo "configure:6710: checking number of arguments of gethostbyname_r" >&5
6710 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6711   echo $ac_n "(cached) $ac_c" 1>&6
6712 else
6713   cat > conftest.$ac_ext <<EOF
6714 #line 6715 "configure"
6715 #include "confdefs.h"
6716 #include <sys/types.h>
6717 #include <sys/socket.h>
6718 #include <netinet/in.h>
6719 #include <netdb.h>
6720 #define BUFSIZE (sizeof(struct hostent)+10)
6721 int main() {
6722 struct hostent hent; char buffer[BUFSIZE];
6723                 int bufsize=BUFSIZE;int h_errno;
6724                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6725                         buffer, bufsize, &h_errno);
6726 ; return 0; }
6727 EOF
6728 if { (eval echo configure:6729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6729   rm -rf conftest*
6730   ol_cv_func_gethostbyname_r_nargs5=yes
6731 else
6732   echo "configure: failed program was:" >&5
6733   cat conftest.$ac_ext >&5
6734   rm -rf conftest*
6735   ol_cv_func_gethostbyname_r_nargs5=no
6736 fi
6737 rm -f conftest*
6738
6739         cat > conftest.$ac_ext <<EOF
6740 #line 6741 "configure"
6741 #include "confdefs.h"
6742 #include <sys/types.h>
6743 #include <sys/socket.h>
6744 #include <netinet/in.h>
6745 #include <netdb.h>
6746 #define BUFSIZE (sizeof(struct hostent)+10)
6747 int main() {
6748 struct hostent hent;struct hostent *rhent;
6749                 char buffer[BUFSIZE];
6750                 int bufsize=BUFSIZE;int h_errno;
6751                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6752                         &rhent, &h_errno);
6753 ; return 0; }
6754 EOF
6755 if { (eval echo configure:6756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6756   rm -rf conftest*
6757   ol_cv_func_gethostbyname_r_nargs6=yes
6758 else
6759   echo "configure: failed program was:" >&5
6760   cat conftest.$ac_ext >&5
6761   rm -rf conftest*
6762   ol_cv_func_gethostbyname_r_nargs6=no
6763 fi
6764 rm -f conftest*
6765
6766         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6767                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6768
6769                 ol_cv_func_gethostbyname_r_nargs=5
6770
6771         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6772                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6773
6774                 ol_cv_func_gethostbyname_r_nargs=6
6775
6776         else
6777                 ol_cv_func_gethostbyname_r_nargs=0
6778         fi
6779   
6780 fi
6781
6782 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6783   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6784         cat >> confdefs.h <<EOF
6785 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6786 EOF
6787
6788   fi
6789
6790 else
6791         ol_cv_func_gethostbyname_r_nargs=0
6792 fi
6793  
6794 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6795         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6796 echo "configure:6797: checking number of arguments of gethostbyaddr_r" >&5
6797 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6798   echo $ac_n "(cached) $ac_c" 1>&6
6799 else
6800   cat > conftest.$ac_ext <<EOF
6801 #line 6802 "configure"
6802 #include "confdefs.h"
6803 #include <sys/types.h>
6804 #include <sys/socket.h>
6805 #include <netinet/in.h>
6806 #include <netdb.h>
6807 #define BUFSIZE (sizeof(struct hostent)+10)
6808 int main() {
6809 struct hostent hent; char buffer[BUFSIZE]; 
6810             struct in_addr add;
6811             size_t alen=sizeof(struct in_addr);
6812             int bufsize=BUFSIZE;int h_errno;
6813                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6814                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6815 ; return 0; }
6816 EOF
6817 if { (eval echo configure:6818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6818   rm -rf conftest*
6819   ol_cv_func_gethostbyaddr_r_nargs7=yes
6820 else
6821   echo "configure: failed program was:" >&5
6822   cat conftest.$ac_ext >&5
6823   rm -rf conftest*
6824   ol_cv_func_gethostbyaddr_r_nargs7=no
6825 fi
6826 rm -f conftest*
6827
6828         cat > conftest.$ac_ext <<EOF
6829 #line 6830 "configure"
6830 #include "confdefs.h"
6831 #include <sys/types.h>
6832 #include <sys/socket.h>
6833 #include <netinet/in.h>
6834 #include <netdb.h>
6835 #define BUFSIZE (sizeof(struct hostent)+10)
6836 int main() {
6837 struct hostent hent;
6838                 struct hostent *rhent; char buffer[BUFSIZE]; 
6839                 struct in_addr add;
6840                 size_t alen=sizeof(struct in_addr);
6841                 int bufsize=BUFSIZE;int h_errno;
6842                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6843                         alen, AF_INET, &hent, buffer, bufsize, 
6844                         &rhent, &h_errno);
6845 ; return 0; }
6846 EOF
6847 if { (eval echo configure:6848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6848   rm -rf conftest*
6849   ol_cv_func_gethostbyaddr_r_nargs8=yes
6850 else
6851   echo "configure: failed program was:" >&5
6852   cat conftest.$ac_ext >&5
6853   rm -rf conftest*
6854   ol_cv_func_gethostbyaddr_r_nargs8=no
6855 fi
6856 rm -f conftest*
6857
6858         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6859                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6860
6861                 ol_cv_func_gethostbyaddr_r_nargs=7
6862
6863         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6864                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6865
6866                 ol_cv_func_gethostbyaddr_r_nargs=8
6867
6868         else
6869                 ol_cv_func_gethostbyaddr_r_nargs=0
6870         fi
6871   
6872 fi
6873
6874 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6875   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6876     cat >> confdefs.h <<EOF
6877 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6878 EOF
6879
6880   fi
6881
6882 else
6883         ol_cv_func_gethostbyaddr_r_nargs=0
6884 fi
6885
6886 if test "$ac_cv_func_ctime_r" = yes \
6887         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6888         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6889         -a "$ac_cv_func_gethostbyname_r" = yes \
6890         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6891         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6892         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6893         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6894         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6895         ; then
6896  
6897         cat >> confdefs.h <<\EOF
6898 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6899 EOF
6900
6901 fi
6902
6903 ol_link_threads=no
6904
6905 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6906         -o $ol_with_threads = nt ; then
6907
6908         
6909         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6910 echo "configure:6911: checking for NT Threads" >&5
6911 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6912   echo $ac_n "(cached) $ac_c" 1>&6
6913 else
6914   
6915                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6916 echo "configure:6917: checking for _beginthread" >&5
6917 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6918   echo $ac_n "(cached) $ac_c" 1>&6
6919 else
6920   cat > conftest.$ac_ext <<EOF
6921 #line 6922 "configure"
6922 #include "confdefs.h"
6923 /* System header to define __stub macros and hopefully few prototypes,
6924     which can conflict with char _beginthread(); below.  */
6925 #include <assert.h>
6926 /* Override any gcc2 internal prototype to avoid an error.  */
6927 /* We use char because int might match the return type of a gcc2
6928     builtin and then its argument prototype would still apply.  */
6929 char _beginthread();
6930 char (*f)();
6931
6932 int main() {
6933
6934 /* The GNU C library defines this for functions which it implements
6935     to always fail with ENOSYS.  Some functions are actually named
6936     something starting with __ and the normal name is an alias.  */
6937 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6938 choke me
6939 #else
6940 f = _beginthread;
6941 #endif
6942
6943 ; return 0; }
6944 EOF
6945 if { (eval echo configure:6946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6946   rm -rf conftest*
6947   eval "ac_cv_func__beginthread=yes"
6948 else
6949   echo "configure: failed program was:" >&5
6950   cat conftest.$ac_ext >&5
6951   rm -rf conftest*
6952   eval "ac_cv_func__beginthread=no"
6953 fi
6954 rm -f conftest*
6955 fi
6956
6957 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6958   echo "$ac_t""yes" 1>&6
6959   ol_cv_nt_threads=yes
6960 else
6961   echo "$ac_t""no" 1>&6
6962 ol_cv_nt_threads=no
6963 fi
6964
6965         
6966 fi
6967
6968 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6969
6970         if test $ol_cv_nt_threads = yes ; then
6971                 cat >> confdefs.h <<\EOF
6972 #define HAVE_NT_THREADS 1
6973 EOF
6974
6975         fi
6976
6977
6978         if test "$ol_cv_nt_threads" = yes ; then
6979         ol_link_threads=nt
6980         ol_with_threads=found
6981         ol_with_yielding_select=yes
6982
6983                 cat >> confdefs.h <<\EOF
6984 #define HAVE_NT_SERVICE_MANAGER 1
6985 EOF
6986
6987                 cat >> confdefs.h <<\EOF
6988 #define HAVE_NT_EVENT_LOG 1
6989 EOF
6990
6991         fi
6992
6993         if test $ol_with_threads = nt ; then
6994                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6995         fi
6996 fi
6997
6998 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6999         -o $ol_with_threads = posix ; then
7000
7001         for ac_hdr in pthread.h
7002 do
7003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7004 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7005 echo "configure:7006: checking for $ac_hdr" >&5
7006 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7007   echo $ac_n "(cached) $ac_c" 1>&6
7008 else
7009   cat > conftest.$ac_ext <<EOF
7010 #line 7011 "configure"
7011 #include "confdefs.h"
7012 #include <$ac_hdr>
7013 EOF
7014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7015 { (eval echo configure:7016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7017 if test -z "$ac_err"; then
7018   rm -rf conftest*
7019   eval "ac_cv_header_$ac_safe=yes"
7020 else
7021   echo "$ac_err" >&5
7022   echo "configure: failed program was:" >&5
7023   cat conftest.$ac_ext >&5
7024   rm -rf conftest*
7025   eval "ac_cv_header_$ac_safe=no"
7026 fi
7027 rm -f conftest*
7028 fi
7029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7030   echo "$ac_t""yes" 1>&6
7031     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7032   cat >> confdefs.h <<EOF
7033 #define $ac_tr_hdr 1
7034 EOF
7035  
7036 else
7037   echo "$ac_t""no" 1>&6
7038 fi
7039 done
7040
7041
7042         if test $ac_cv_header_pthread_h = yes ; then
7043                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7044 echo "configure:7045: checking POSIX thread version" >&5
7045 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7046   echo $ac_n "(cached) $ac_c" 1>&6
7047 else
7048   
7049         cat > conftest.$ac_ext <<EOF
7050 #line 7051 "configure"
7051 #include "confdefs.h"
7052
7053 #               include <pthread.h>
7054                 /* this check could be improved */
7055 #               ifdef PTHREAD_ONCE_INIT
7056                         pthread_version_final;
7057 #               endif
7058         
7059 EOF
7060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7061   egrep "pthread_version_final" >/dev/null 2>&1; then
7062   rm -rf conftest*
7063   ol_pthread_final=yes
7064 else
7065   rm -rf conftest*
7066   ol_pthread_final=no
7067 fi
7068 rm -f conftest*
7069
7070
7071         cat > conftest.$ac_ext <<EOF
7072 #line 7073 "configure"
7073 #include "confdefs.h"
7074
7075 #               include <pthread.h>
7076                 /* this check could be improved */
7077 #               ifdef pthread_once_init
7078                         pthread_version_draft4;
7079 #               endif
7080         
7081 EOF
7082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7083   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7084   rm -rf conftest*
7085   ol_pthread_draft4=yes
7086 else
7087   rm -rf conftest*
7088   ol_pthread_draft4=no
7089 fi
7090 rm -f conftest*
7091
7092
7093         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7094                 ol_cv_pthread_version=final
7095         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7096                 ol_cv_pthread_version=draft4
7097         else
7098                 ol_cv_pthread_version=unknown
7099         fi
7100
7101 fi
7102
7103 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7104
7105
7106                 if test $ol_cv_pthread_version = final ; then
7107                         cat >> confdefs.h <<\EOF
7108 #define HAVE_PTHREADS_FINAL 1
7109 EOF
7110
7111                 elif test $ol_cv_pthread_version = draft4 ; then
7112                         cat >> confdefs.h <<\EOF
7113 #define HAVE_PTHREADS_D4 1
7114 EOF
7115
7116                 else
7117                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7118                 fi
7119
7120                 # consider threads found
7121                 ol_with_threads=found
7122
7123                 
7124         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7125 echo "configure:7126: checking for LinuxThreads pthread.h" >&5
7126 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7127   echo $ac_n "(cached) $ac_c" 1>&6
7128 else
7129   cat > conftest.$ac_ext <<EOF
7130 #line 7131 "configure"
7131 #include "confdefs.h"
7132 #include <pthread.h>
7133 EOF
7134 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7135   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7136   rm -rf conftest*
7137   ol_cv_header_linux_threads=yes
7138 else
7139   rm -rf conftest*
7140   ol_cv_header_linux_threads=no
7141 fi
7142 rm -f conftest*
7143
7144                 
7145 fi
7146
7147 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7148         if test $ol_cv_header_linux_threads = yes; then
7149                 cat >> confdefs.h <<\EOF
7150 #define HAVE_LINUX_THREADS 1
7151 EOF
7152
7153         fi
7154
7155                 
7156         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7157 echo "configure:7158: checking for GNU Pth pthread.h" >&5
7158 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7159   echo $ac_n "(cached) $ac_c" 1>&6
7160 else
7161   cat > conftest.$ac_ext <<EOF
7162 #line 7163 "configure"
7163 #include "confdefs.h"
7164 #include <pthread.h>
7165 #ifdef _POSIX_THREAD_IS_GNU_PTH
7166         __gnu_pth__;
7167 #endif
7168
7169 EOF
7170 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7171   egrep "__gnu_pth__" >/dev/null 2>&1; then
7172   rm -rf conftest*
7173   ol_cv_header_gnu_pth_pthread_h=yes
7174 else
7175   rm -rf conftest*
7176   ol_cv_header_gnu_pth_pthread_h=no
7177 fi
7178 rm -f conftest*
7179
7180                 
7181 fi
7182
7183 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7184
7185
7186                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7187                         for ac_hdr in sched.h
7188 do
7189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7191 echo "configure:7192: checking for $ac_hdr" >&5
7192 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7193   echo $ac_n "(cached) $ac_c" 1>&6
7194 else
7195   cat > conftest.$ac_ext <<EOF
7196 #line 7197 "configure"
7197 #include "confdefs.h"
7198 #include <$ac_hdr>
7199 EOF
7200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7201 { (eval echo configure:7202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7203 if test -z "$ac_err"; then
7204   rm -rf conftest*
7205   eval "ac_cv_header_$ac_safe=yes"
7206 else
7207   echo "$ac_err" >&5
7208   echo "configure: failed program was:" >&5
7209   cat conftest.$ac_ext >&5
7210   rm -rf conftest*
7211   eval "ac_cv_header_$ac_safe=no"
7212 fi
7213 rm -f conftest*
7214 fi
7215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7216   echo "$ac_t""yes" 1>&6
7217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7218   cat >> confdefs.h <<EOF
7219 #define $ac_tr_hdr 1
7220 EOF
7221  
7222 else
7223   echo "$ac_t""no" 1>&6
7224 fi
7225 done
7226
7227                 fi
7228
7229                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7230                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7231 echo "configure:7232: checking for pthread_create in default libraries" >&5
7232 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7233   echo $ac_n "(cached) $ac_c" 1>&6
7234 else
7235   
7236                 if test "$cross_compiling" = yes; then
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 int main() {
7253
7254         /* pthread test function */
7255         pthread_t t;
7256         int status;
7257 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7258         /* This system (e.g. AIX) defaults detached; must override */
7259         pthread_attr_t attr;
7260
7261         status = pthread_attr_init(&attr);
7262         if( status ) exit( status );
7263
7264         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7265         if( status ) exit( status );
7266
7267 #define ATTR    &attr
7268 #else
7269 #if HAVE_PTHREADS_D4
7270 #define ATTR    pthread_attr_default
7271 #else
7272 #define ATTR    NULL
7273 #endif
7274 #endif
7275         /* make sure pthread_create() isn't just a stub */
7276         status = pthread_create(&t, ATTR, task, NULL);
7277         if( status ) exit( status );
7278
7279         /* make sure pthread_detach() isn't just a stub */
7280 #if HAVE_PTHREADS_D4
7281         status = pthread_detach( &t );
7282 #else
7283         status = pthread_detach( t );
7284 #endif
7285
7286 #ifdef HAVE_LINUX_THREADS
7287         pthread_kill_other_threads_np();
7288 #endif
7289
7290         exit( status );
7291
7292 ; return 0; }
7293 EOF
7294 if { (eval echo configure:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7295   rm -rf conftest*
7296   ol_cv_pthread_create=yes
7297 else
7298   echo "configure: failed program was:" >&5
7299   cat conftest.$ac_ext >&5
7300   rm -rf conftest*
7301   ol_cv_pthread_create=no
7302 fi
7303 rm -f conftest*
7304 else
7305   cat > conftest.$ac_ext <<EOF
7306 #line 7307 "configure"
7307 #include "confdefs.h"
7308 /* pthread test headers */
7309 #include <pthread.h>
7310 #ifndef NULL
7311 #define NULL (void*)0
7312 #endif
7313
7314 static void *task(p)
7315         void *p;
7316 {
7317         return (void *) (p == NULL);
7318 }
7319
7320
7321 int main(argc, argv)
7322         int argc;
7323         char **argv;
7324 {
7325
7326         /* pthread test function */
7327         pthread_t t;
7328         int status;
7329 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7330         /* This system (e.g. AIX) defaults detached; must override */
7331         pthread_attr_t attr;
7332
7333         status = pthread_attr_init(&attr);
7334         if( status ) exit( status );
7335
7336         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7337         if( status ) exit( status );
7338
7339 #define ATTR    &attr
7340 #else
7341 #if HAVE_PTHREADS_D4
7342 #define ATTR    pthread_attr_default
7343 #else
7344 #define ATTR    NULL
7345 #endif
7346 #endif
7347         /* make sure pthread_create() isn't just a stub */
7348         status = pthread_create(&t, ATTR, task, NULL);
7349         if( status ) exit( status );
7350
7351         /* make sure pthread_detach() isn't just a stub */
7352 #if HAVE_PTHREADS_D4
7353         status = pthread_detach( &t );
7354 #else
7355         status = pthread_detach( t );
7356 #endif
7357
7358 #ifdef HAVE_LINUX_THREADS
7359         pthread_kill_other_threads_np();
7360 #endif
7361
7362         exit( status );
7363
7364 }
7365
7366 EOF
7367 if { (eval echo configure:7368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7368 then
7369   ol_cv_pthread_create=yes
7370 else
7371   echo "configure: failed program was:" >&5
7372   cat conftest.$ac_ext >&5
7373   rm -fr conftest*
7374   ol_cv_pthread_create=no
7375 fi
7376 rm -fr conftest*
7377 fi
7378
7379 fi
7380
7381 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7382
7383                 if test $ol_cv_pthread_create != no ; then
7384                         ol_link_threads=posix
7385                         ol_link_pthreads=""
7386                 fi
7387                 
7388                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7389 if test "$ol_link_threads" = no ; then
7390         # try -kthread
7391         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7392 echo "configure:7393: checking for pthread link with -kthread" >&5
7393 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7394   echo $ac_n "(cached) $ac_c" 1>&6
7395 else
7396   
7397                 # save the flags
7398                 ol_LIBS="$LIBS"
7399                 LIBS="-kthread $LIBS"
7400
7401                 if test "$cross_compiling" = yes; then
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 int main() {
7418
7419         /* pthread test function */
7420         pthread_t t;
7421         int status;
7422 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7423         /* This system (e.g. AIX) defaults detached; must override */
7424         pthread_attr_t attr;
7425
7426         status = pthread_attr_init(&attr);
7427         if( status ) exit( status );
7428
7429         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7430         if( status ) exit( status );
7431
7432 #define ATTR    &attr
7433 #else
7434 #if HAVE_PTHREADS_D4
7435 #define ATTR    pthread_attr_default
7436 #else
7437 #define ATTR    NULL
7438 #endif
7439 #endif
7440         /* make sure pthread_create() isn't just a stub */
7441         status = pthread_create(&t, ATTR, task, NULL);
7442         if( status ) exit( status );
7443
7444         /* make sure pthread_detach() isn't just a stub */
7445 #if HAVE_PTHREADS_D4
7446         status = pthread_detach( &t );
7447 #else
7448         status = pthread_detach( t );
7449 #endif
7450
7451 #ifdef HAVE_LINUX_THREADS
7452         pthread_kill_other_threads_np();
7453 #endif
7454
7455         exit( status );
7456
7457 ; return 0; }
7458 EOF
7459 if { (eval echo configure:7460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7460   rm -rf conftest*
7461   ol_cv_pthread_kthread=yes
7462 else
7463   echo "configure: failed program was:" >&5
7464   cat conftest.$ac_ext >&5
7465   rm -rf conftest*
7466   ol_cv_pthread_kthread=no
7467 fi
7468 rm -f conftest*
7469 else
7470   cat > conftest.$ac_ext <<EOF
7471 #line 7472 "configure"
7472 #include "confdefs.h"
7473 /* pthread test headers */
7474 #include <pthread.h>
7475 #ifndef NULL
7476 #define NULL (void*)0
7477 #endif
7478
7479 static void *task(p)
7480         void *p;
7481 {
7482         return (void *) (p == NULL);
7483 }
7484
7485
7486 int main(argc, argv)
7487         int argc;
7488         char **argv;
7489 {
7490
7491         /* pthread test function */
7492         pthread_t t;
7493         int status;
7494 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7495         /* This system (e.g. AIX) defaults detached; must override */
7496         pthread_attr_t attr;
7497
7498         status = pthread_attr_init(&attr);
7499         if( status ) exit( status );
7500
7501         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7502         if( status ) exit( status );
7503
7504 #define ATTR    &attr
7505 #else
7506 #if HAVE_PTHREADS_D4
7507 #define ATTR    pthread_attr_default
7508 #else
7509 #define ATTR    NULL
7510 #endif
7511 #endif
7512         /* make sure pthread_create() isn't just a stub */
7513         status = pthread_create(&t, ATTR, task, NULL);
7514         if( status ) exit( status );
7515
7516         /* make sure pthread_detach() isn't just a stub */
7517 #if HAVE_PTHREADS_D4
7518         status = pthread_detach( &t );
7519 #else
7520         status = pthread_detach( t );
7521 #endif
7522
7523 #ifdef HAVE_LINUX_THREADS
7524         pthread_kill_other_threads_np();
7525 #endif
7526
7527         exit( status );
7528
7529 }
7530
7531 EOF
7532 if { (eval echo configure:7533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7533 then
7534   ol_cv_pthread_kthread=yes
7535 else
7536   echo "configure: failed program was:" >&5
7537   cat conftest.$ac_ext >&5
7538   rm -fr conftest*
7539   ol_cv_pthread_kthread=no
7540 fi
7541 rm -fr conftest*
7542 fi
7543
7544
7545                 # restore the LIBS
7546                 LIBS="$ol_LIBS"
7547         
7548 fi
7549
7550 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7551
7552         if test $ol_cv_pthread_kthread = yes ; then
7553                 ol_link_pthreads="-kthread"
7554                 ol_link_threads=posix
7555         fi
7556 fi
7557
7558                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7559 if test "$ol_link_threads" = no ; then
7560         # try -pthread
7561         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7562 echo "configure:7563: checking for pthread link with -pthread" >&5
7563 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7564   echo $ac_n "(cached) $ac_c" 1>&6
7565 else
7566   
7567                 # save the flags
7568                 ol_LIBS="$LIBS"
7569                 LIBS="-pthread $LIBS"
7570
7571                 if test "$cross_compiling" = yes; then
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 int main() {
7588
7589         /* pthread test function */
7590         pthread_t t;
7591         int status;
7592 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7593         /* This system (e.g. AIX) defaults detached; must override */
7594         pthread_attr_t attr;
7595
7596         status = pthread_attr_init(&attr);
7597         if( status ) exit( status );
7598
7599         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7600         if( status ) exit( status );
7601
7602 #define ATTR    &attr
7603 #else
7604 #if HAVE_PTHREADS_D4
7605 #define ATTR    pthread_attr_default
7606 #else
7607 #define ATTR    NULL
7608 #endif
7609 #endif
7610         /* make sure pthread_create() isn't just a stub */
7611         status = pthread_create(&t, ATTR, task, NULL);
7612         if( status ) exit( status );
7613
7614         /* make sure pthread_detach() isn't just a stub */
7615 #if HAVE_PTHREADS_D4
7616         status = pthread_detach( &t );
7617 #else
7618         status = pthread_detach( t );
7619 #endif
7620
7621 #ifdef HAVE_LINUX_THREADS
7622         pthread_kill_other_threads_np();
7623 #endif
7624
7625         exit( status );
7626
7627 ; return 0; }
7628 EOF
7629 if { (eval echo configure:7630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7630   rm -rf conftest*
7631   ol_cv_pthread_pthread=yes
7632 else
7633   echo "configure: failed program was:" >&5
7634   cat conftest.$ac_ext >&5
7635   rm -rf conftest*
7636   ol_cv_pthread_pthread=no
7637 fi
7638 rm -f conftest*
7639 else
7640   cat > conftest.$ac_ext <<EOF
7641 #line 7642 "configure"
7642 #include "confdefs.h"
7643 /* pthread test headers */
7644 #include <pthread.h>
7645 #ifndef NULL
7646 #define NULL (void*)0
7647 #endif
7648
7649 static void *task(p)
7650         void *p;
7651 {
7652         return (void *) (p == NULL);
7653 }
7654
7655
7656 int main(argc, argv)
7657         int argc;
7658         char **argv;
7659 {
7660
7661         /* pthread test function */
7662         pthread_t t;
7663         int status;
7664 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7665         /* This system (e.g. AIX) defaults detached; must override */
7666         pthread_attr_t attr;
7667
7668         status = pthread_attr_init(&attr);
7669         if( status ) exit( status );
7670
7671         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7672         if( status ) exit( status );
7673
7674 #define ATTR    &attr
7675 #else
7676 #if HAVE_PTHREADS_D4
7677 #define ATTR    pthread_attr_default
7678 #else
7679 #define ATTR    NULL
7680 #endif
7681 #endif
7682         /* make sure pthread_create() isn't just a stub */
7683         status = pthread_create(&t, ATTR, task, NULL);
7684         if( status ) exit( status );
7685
7686         /* make sure pthread_detach() isn't just a stub */
7687 #if HAVE_PTHREADS_D4
7688         status = pthread_detach( &t );
7689 #else
7690         status = pthread_detach( t );
7691 #endif
7692
7693 #ifdef HAVE_LINUX_THREADS
7694         pthread_kill_other_threads_np();
7695 #endif
7696
7697         exit( status );
7698
7699 }
7700
7701 EOF
7702 if { (eval echo configure:7703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7703 then
7704   ol_cv_pthread_pthread=yes
7705 else
7706   echo "configure: failed program was:" >&5
7707   cat conftest.$ac_ext >&5
7708   rm -fr conftest*
7709   ol_cv_pthread_pthread=no
7710 fi
7711 rm -fr conftest*
7712 fi
7713
7714
7715                 # restore the LIBS
7716                 LIBS="$ol_LIBS"
7717         
7718 fi
7719
7720 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7721
7722         if test $ol_cv_pthread_pthread = yes ; then
7723                 ol_link_pthreads="-pthread"
7724                 ol_link_threads=posix
7725         fi
7726 fi
7727
7728                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7729 if test "$ol_link_threads" = no ; then
7730         # try -pthreads
7731         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7732 echo "configure:7733: checking for pthread link with -pthreads" >&5
7733 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7734   echo $ac_n "(cached) $ac_c" 1>&6
7735 else
7736   
7737                 # save the flags
7738                 ol_LIBS="$LIBS"
7739                 LIBS="-pthreads $LIBS"
7740
7741                 if test "$cross_compiling" = yes; then
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 int main() {
7758
7759         /* pthread test function */
7760         pthread_t t;
7761         int status;
7762 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7763         /* This system (e.g. AIX) defaults detached; must override */
7764         pthread_attr_t attr;
7765
7766         status = pthread_attr_init(&attr);
7767         if( status ) exit( status );
7768
7769         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7770         if( status ) exit( status );
7771
7772 #define ATTR    &attr
7773 #else
7774 #if HAVE_PTHREADS_D4
7775 #define ATTR    pthread_attr_default
7776 #else
7777 #define ATTR    NULL
7778 #endif
7779 #endif
7780         /* make sure pthread_create() isn't just a stub */
7781         status = pthread_create(&t, ATTR, task, NULL);
7782         if( status ) exit( status );
7783
7784         /* make sure pthread_detach() isn't just a stub */
7785 #if HAVE_PTHREADS_D4
7786         status = pthread_detach( &t );
7787 #else
7788         status = pthread_detach( t );
7789 #endif
7790
7791 #ifdef HAVE_LINUX_THREADS
7792         pthread_kill_other_threads_np();
7793 #endif
7794
7795         exit( status );
7796
7797 ; return 0; }
7798 EOF
7799 if { (eval echo configure:7800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7800   rm -rf conftest*
7801   ol_cv_pthread_pthreads=yes
7802 else
7803   echo "configure: failed program was:" >&5
7804   cat conftest.$ac_ext >&5
7805   rm -rf conftest*
7806   ol_cv_pthread_pthreads=no
7807 fi
7808 rm -f conftest*
7809 else
7810   cat > conftest.$ac_ext <<EOF
7811 #line 7812 "configure"
7812 #include "confdefs.h"
7813 /* pthread test headers */
7814 #include <pthread.h>
7815 #ifndef NULL
7816 #define NULL (void*)0
7817 #endif
7818
7819 static void *task(p)
7820         void *p;
7821 {
7822         return (void *) (p == NULL);
7823 }
7824
7825
7826 int main(argc, argv)
7827         int argc;
7828         char **argv;
7829 {
7830
7831         /* pthread test function */
7832         pthread_t t;
7833         int status;
7834 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7835         /* This system (e.g. AIX) defaults detached; must override */
7836         pthread_attr_t attr;
7837
7838         status = pthread_attr_init(&attr);
7839         if( status ) exit( status );
7840
7841         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7842         if( status ) exit( status );
7843
7844 #define ATTR    &attr
7845 #else
7846 #if HAVE_PTHREADS_D4
7847 #define ATTR    pthread_attr_default
7848 #else
7849 #define ATTR    NULL
7850 #endif
7851 #endif
7852         /* make sure pthread_create() isn't just a stub */
7853         status = pthread_create(&t, ATTR, task, NULL);
7854         if( status ) exit( status );
7855
7856         /* make sure pthread_detach() isn't just a stub */
7857 #if HAVE_PTHREADS_D4
7858         status = pthread_detach( &t );
7859 #else
7860         status = pthread_detach( t );
7861 #endif
7862
7863 #ifdef HAVE_LINUX_THREADS
7864         pthread_kill_other_threads_np();
7865 #endif
7866
7867         exit( status );
7868
7869 }
7870
7871 EOF
7872 if { (eval echo configure:7873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7873 then
7874   ol_cv_pthread_pthreads=yes
7875 else
7876   echo "configure: failed program was:" >&5
7877   cat conftest.$ac_ext >&5
7878   rm -fr conftest*
7879   ol_cv_pthread_pthreads=no
7880 fi
7881 rm -fr conftest*
7882 fi
7883
7884
7885                 # restore the LIBS
7886                 LIBS="$ol_LIBS"
7887         
7888 fi
7889
7890 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7891
7892         if test $ol_cv_pthread_pthreads = yes ; then
7893                 ol_link_pthreads="-pthreads"
7894                 ol_link_threads=posix
7895         fi
7896 fi
7897
7898                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7899 if test "$ol_link_threads" = no ; then
7900         # try -mthreads
7901         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7902 echo "configure:7903: checking for pthread link with -mthreads" >&5
7903 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7904   echo $ac_n "(cached) $ac_c" 1>&6
7905 else
7906   
7907                 # save the flags
7908                 ol_LIBS="$LIBS"
7909                 LIBS="-mthreads $LIBS"
7910
7911                 if test "$cross_compiling" = yes; then
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 int main() {
7928
7929         /* pthread test function */
7930         pthread_t t;
7931         int status;
7932 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7933         /* This system (e.g. AIX) defaults detached; must override */
7934         pthread_attr_t attr;
7935
7936         status = pthread_attr_init(&attr);
7937         if( status ) exit( status );
7938
7939         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7940         if( status ) exit( status );
7941
7942 #define ATTR    &attr
7943 #else
7944 #if HAVE_PTHREADS_D4
7945 #define ATTR    pthread_attr_default
7946 #else
7947 #define ATTR    NULL
7948 #endif
7949 #endif
7950         /* make sure pthread_create() isn't just a stub */
7951         status = pthread_create(&t, ATTR, task, NULL);
7952         if( status ) exit( status );
7953
7954         /* make sure pthread_detach() isn't just a stub */
7955 #if HAVE_PTHREADS_D4
7956         status = pthread_detach( &t );
7957 #else
7958         status = pthread_detach( t );
7959 #endif
7960
7961 #ifdef HAVE_LINUX_THREADS
7962         pthread_kill_other_threads_np();
7963 #endif
7964
7965         exit( status );
7966
7967 ; return 0; }
7968 EOF
7969 if { (eval echo configure:7970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7970   rm -rf conftest*
7971   ol_cv_pthread_mthreads=yes
7972 else
7973   echo "configure: failed program was:" >&5
7974   cat conftest.$ac_ext >&5
7975   rm -rf conftest*
7976   ol_cv_pthread_mthreads=no
7977 fi
7978 rm -f conftest*
7979 else
7980   cat > conftest.$ac_ext <<EOF
7981 #line 7982 "configure"
7982 #include "confdefs.h"
7983 /* pthread test headers */
7984 #include <pthread.h>
7985 #ifndef NULL
7986 #define NULL (void*)0
7987 #endif
7988
7989 static void *task(p)
7990         void *p;
7991 {
7992         return (void *) (p == NULL);
7993 }
7994
7995
7996 int main(argc, argv)
7997         int argc;
7998         char **argv;
7999 {
8000
8001         /* pthread test function */
8002         pthread_t t;
8003         int status;
8004 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8005         /* This system (e.g. AIX) defaults detached; must override */
8006         pthread_attr_t attr;
8007
8008         status = pthread_attr_init(&attr);
8009         if( status ) exit( status );
8010
8011         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8012         if( status ) exit( status );
8013
8014 #define ATTR    &attr
8015 #else
8016 #if HAVE_PTHREADS_D4
8017 #define ATTR    pthread_attr_default
8018 #else
8019 #define ATTR    NULL
8020 #endif
8021 #endif
8022         /* make sure pthread_create() isn't just a stub */
8023         status = pthread_create(&t, ATTR, task, NULL);
8024         if( status ) exit( status );
8025
8026         /* make sure pthread_detach() isn't just a stub */
8027 #if HAVE_PTHREADS_D4
8028         status = pthread_detach( &t );
8029 #else
8030         status = pthread_detach( t );
8031 #endif
8032
8033 #ifdef HAVE_LINUX_THREADS
8034         pthread_kill_other_threads_np();
8035 #endif
8036
8037         exit( status );
8038
8039 }
8040
8041 EOF
8042 if { (eval echo configure:8043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8043 then
8044   ol_cv_pthread_mthreads=yes
8045 else
8046   echo "configure: failed program was:" >&5
8047   cat conftest.$ac_ext >&5
8048   rm -fr conftest*
8049   ol_cv_pthread_mthreads=no
8050 fi
8051 rm -fr conftest*
8052 fi
8053
8054
8055                 # restore the LIBS
8056                 LIBS="$ol_LIBS"
8057         
8058 fi
8059
8060 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8061
8062         if test $ol_cv_pthread_mthreads = yes ; then
8063                 ol_link_pthreads="-mthreads"
8064                 ol_link_threads=posix
8065         fi
8066 fi
8067
8068                 # Pthread try link: -thread (ol_cv_pthread_thread)
8069 if test "$ol_link_threads" = no ; then
8070         # try -thread
8071         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8072 echo "configure:8073: checking for pthread link with -thread" >&5
8073 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8074   echo $ac_n "(cached) $ac_c" 1>&6
8075 else
8076   
8077                 # save the flags
8078                 ol_LIBS="$LIBS"
8079                 LIBS="-thread $LIBS"
8080
8081                 if test "$cross_compiling" = yes; then
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 int main() {
8098
8099         /* pthread test function */
8100         pthread_t t;
8101         int status;
8102 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8103         /* This system (e.g. AIX) defaults detached; must override */
8104         pthread_attr_t attr;
8105
8106         status = pthread_attr_init(&attr);
8107         if( status ) exit( status );
8108
8109         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8110         if( status ) exit( status );
8111
8112 #define ATTR    &attr
8113 #else
8114 #if HAVE_PTHREADS_D4
8115 #define ATTR    pthread_attr_default
8116 #else
8117 #define ATTR    NULL
8118 #endif
8119 #endif
8120         /* make sure pthread_create() isn't just a stub */
8121         status = pthread_create(&t, ATTR, task, NULL);
8122         if( status ) exit( status );
8123
8124         /* make sure pthread_detach() isn't just a stub */
8125 #if HAVE_PTHREADS_D4
8126         status = pthread_detach( &t );
8127 #else
8128         status = pthread_detach( t );
8129 #endif
8130
8131 #ifdef HAVE_LINUX_THREADS
8132         pthread_kill_other_threads_np();
8133 #endif
8134
8135         exit( status );
8136
8137 ; return 0; }
8138 EOF
8139 if { (eval echo configure:8140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8140   rm -rf conftest*
8141   ol_cv_pthread_thread=yes
8142 else
8143   echo "configure: failed program was:" >&5
8144   cat conftest.$ac_ext >&5
8145   rm -rf conftest*
8146   ol_cv_pthread_thread=no
8147 fi
8148 rm -f conftest*
8149 else
8150   cat > conftest.$ac_ext <<EOF
8151 #line 8152 "configure"
8152 #include "confdefs.h"
8153 /* pthread test headers */
8154 #include <pthread.h>
8155 #ifndef NULL
8156 #define NULL (void*)0
8157 #endif
8158
8159 static void *task(p)
8160         void *p;
8161 {
8162         return (void *) (p == NULL);
8163 }
8164
8165
8166 int main(argc, argv)
8167         int argc;
8168         char **argv;
8169 {
8170
8171         /* pthread test function */
8172         pthread_t t;
8173         int status;
8174 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8175         /* This system (e.g. AIX) defaults detached; must override */
8176         pthread_attr_t attr;
8177
8178         status = pthread_attr_init(&attr);
8179         if( status ) exit( status );
8180
8181         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8182         if( status ) exit( status );
8183
8184 #define ATTR    &attr
8185 #else
8186 #if HAVE_PTHREADS_D4
8187 #define ATTR    pthread_attr_default
8188 #else
8189 #define ATTR    NULL
8190 #endif
8191 #endif
8192         /* make sure pthread_create() isn't just a stub */
8193         status = pthread_create(&t, ATTR, task, NULL);
8194         if( status ) exit( status );
8195
8196         /* make sure pthread_detach() isn't just a stub */
8197 #if HAVE_PTHREADS_D4
8198         status = pthread_detach( &t );
8199 #else
8200         status = pthread_detach( t );
8201 #endif
8202
8203 #ifdef HAVE_LINUX_THREADS
8204         pthread_kill_other_threads_np();
8205 #endif
8206
8207         exit( status );
8208
8209 }
8210
8211 EOF
8212 if { (eval echo configure:8213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8213 then
8214   ol_cv_pthread_thread=yes
8215 else
8216   echo "configure: failed program was:" >&5
8217   cat conftest.$ac_ext >&5
8218   rm -fr conftest*
8219   ol_cv_pthread_thread=no
8220 fi
8221 rm -fr conftest*
8222 fi
8223
8224
8225                 # restore the LIBS
8226                 LIBS="$ol_LIBS"
8227         
8228 fi
8229
8230 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8231
8232         if test $ol_cv_pthread_thread = yes ; then
8233                 ol_link_pthreads="-thread"
8234                 ol_link_threads=posix
8235         fi
8236 fi
8237
8238
8239                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8240 if test "$ol_link_threads" = no ; then
8241         # try -lpthread -lmach -lexc -lc_r
8242         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8243 echo "configure:8244: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8244 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8245   echo $ac_n "(cached) $ac_c" 1>&6
8246 else
8247   
8248                 # save the flags
8249                 ol_LIBS="$LIBS"
8250                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8251
8252                 if test "$cross_compiling" = yes; then
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 int main() {
8269
8270         /* pthread test function */
8271         pthread_t t;
8272         int status;
8273 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8274         /* This system (e.g. AIX) defaults detached; must override */
8275         pthread_attr_t attr;
8276
8277         status = pthread_attr_init(&attr);
8278         if( status ) exit( status );
8279
8280         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8281         if( status ) exit( status );
8282
8283 #define ATTR    &attr
8284 #else
8285 #if HAVE_PTHREADS_D4
8286 #define ATTR    pthread_attr_default
8287 #else
8288 #define ATTR    NULL
8289 #endif
8290 #endif
8291         /* make sure pthread_create() isn't just a stub */
8292         status = pthread_create(&t, ATTR, task, NULL);
8293         if( status ) exit( status );
8294
8295         /* make sure pthread_detach() isn't just a stub */
8296 #if HAVE_PTHREADS_D4
8297         status = pthread_detach( &t );
8298 #else
8299         status = pthread_detach( t );
8300 #endif
8301
8302 #ifdef HAVE_LINUX_THREADS
8303         pthread_kill_other_threads_np();
8304 #endif
8305
8306         exit( status );
8307
8308 ; return 0; }
8309 EOF
8310 if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8311   rm -rf conftest*
8312   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8313 else
8314   echo "configure: failed program was:" >&5
8315   cat conftest.$ac_ext >&5
8316   rm -rf conftest*
8317   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8318 fi
8319 rm -f conftest*
8320 else
8321   cat > conftest.$ac_ext <<EOF
8322 #line 8323 "configure"
8323 #include "confdefs.h"
8324 /* pthread test headers */
8325 #include <pthread.h>
8326 #ifndef NULL
8327 #define NULL (void*)0
8328 #endif
8329
8330 static void *task(p)
8331         void *p;
8332 {
8333         return (void *) (p == NULL);
8334 }
8335
8336
8337 int main(argc, argv)
8338         int argc;
8339         char **argv;
8340 {
8341
8342         /* pthread test function */
8343         pthread_t t;
8344         int status;
8345 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8346         /* This system (e.g. AIX) defaults detached; must override */
8347         pthread_attr_t attr;
8348
8349         status = pthread_attr_init(&attr);
8350         if( status ) exit( status );
8351
8352         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8353         if( status ) exit( status );
8354
8355 #define ATTR    &attr
8356 #else
8357 #if HAVE_PTHREADS_D4
8358 #define ATTR    pthread_attr_default
8359 #else
8360 #define ATTR    NULL
8361 #endif
8362 #endif
8363         /* make sure pthread_create() isn't just a stub */
8364         status = pthread_create(&t, ATTR, task, NULL);
8365         if( status ) exit( status );
8366
8367         /* make sure pthread_detach() isn't just a stub */
8368 #if HAVE_PTHREADS_D4
8369         status = pthread_detach( &t );
8370 #else
8371         status = pthread_detach( t );
8372 #endif
8373
8374 #ifdef HAVE_LINUX_THREADS
8375         pthread_kill_other_threads_np();
8376 #endif
8377
8378         exit( status );
8379
8380 }
8381
8382 EOF
8383 if { (eval echo configure:8384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8384 then
8385   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8386 else
8387   echo "configure: failed program was:" >&5
8388   cat conftest.$ac_ext >&5
8389   rm -fr conftest*
8390   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8391 fi
8392 rm -fr conftest*
8393 fi
8394
8395
8396                 # restore the LIBS
8397                 LIBS="$ol_LIBS"
8398         
8399 fi
8400
8401 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8402
8403         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8404                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8405                 ol_link_threads=posix
8406         fi
8407 fi
8408
8409                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8410 if test "$ol_link_threads" = no ; then
8411         # try -lpthread -lmach -lexc
8412         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8413 echo "configure:8414: checking for pthread link with -lpthread -lmach -lexc" >&5
8414 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8415   echo $ac_n "(cached) $ac_c" 1>&6
8416 else
8417   
8418                 # save the flags
8419                 ol_LIBS="$LIBS"
8420                 LIBS="-lpthread -lmach -lexc $LIBS"
8421
8422                 if test "$cross_compiling" = yes; then
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 int main() {
8439
8440         /* pthread test function */
8441         pthread_t t;
8442         int status;
8443 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8444         /* This system (e.g. AIX) defaults detached; must override */
8445         pthread_attr_t attr;
8446
8447         status = pthread_attr_init(&attr);
8448         if( status ) exit( status );
8449
8450         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8451         if( status ) exit( status );
8452
8453 #define ATTR    &attr
8454 #else
8455 #if HAVE_PTHREADS_D4
8456 #define ATTR    pthread_attr_default
8457 #else
8458 #define ATTR    NULL
8459 #endif
8460 #endif
8461         /* make sure pthread_create() isn't just a stub */
8462         status = pthread_create(&t, ATTR, task, NULL);
8463         if( status ) exit( status );
8464
8465         /* make sure pthread_detach() isn't just a stub */
8466 #if HAVE_PTHREADS_D4
8467         status = pthread_detach( &t );
8468 #else
8469         status = pthread_detach( t );
8470 #endif
8471
8472 #ifdef HAVE_LINUX_THREADS
8473         pthread_kill_other_threads_np();
8474 #endif
8475
8476         exit( status );
8477
8478 ; return 0; }
8479 EOF
8480 if { (eval echo configure:8481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8481   rm -rf conftest*
8482   ol_cv_pthread_lpthread_lmach_lexc=yes
8483 else
8484   echo "configure: failed program was:" >&5
8485   cat conftest.$ac_ext >&5
8486   rm -rf conftest*
8487   ol_cv_pthread_lpthread_lmach_lexc=no
8488 fi
8489 rm -f conftest*
8490 else
8491   cat > conftest.$ac_ext <<EOF
8492 #line 8493 "configure"
8493 #include "confdefs.h"
8494 /* pthread test headers */
8495 #include <pthread.h>
8496 #ifndef NULL
8497 #define NULL (void*)0
8498 #endif
8499
8500 static void *task(p)
8501         void *p;
8502 {
8503         return (void *) (p == NULL);
8504 }
8505
8506
8507 int main(argc, argv)
8508         int argc;
8509         char **argv;
8510 {
8511
8512         /* pthread test function */
8513         pthread_t t;
8514         int status;
8515 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8516         /* This system (e.g. AIX) defaults detached; must override */
8517         pthread_attr_t attr;
8518
8519         status = pthread_attr_init(&attr);
8520         if( status ) exit( status );
8521
8522         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8523         if( status ) exit( status );
8524
8525 #define ATTR    &attr
8526 #else
8527 #if HAVE_PTHREADS_D4
8528 #define ATTR    pthread_attr_default
8529 #else
8530 #define ATTR    NULL
8531 #endif
8532 #endif
8533         /* make sure pthread_create() isn't just a stub */
8534         status = pthread_create(&t, ATTR, task, NULL);
8535         if( status ) exit( status );
8536
8537         /* make sure pthread_detach() isn't just a stub */
8538 #if HAVE_PTHREADS_D4
8539         status = pthread_detach( &t );
8540 #else
8541         status = pthread_detach( t );
8542 #endif
8543
8544 #ifdef HAVE_LINUX_THREADS
8545         pthread_kill_other_threads_np();
8546 #endif
8547
8548         exit( status );
8549
8550 }
8551
8552 EOF
8553 if { (eval echo configure:8554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8554 then
8555   ol_cv_pthread_lpthread_lmach_lexc=yes
8556 else
8557   echo "configure: failed program was:" >&5
8558   cat conftest.$ac_ext >&5
8559   rm -fr conftest*
8560   ol_cv_pthread_lpthread_lmach_lexc=no
8561 fi
8562 rm -fr conftest*
8563 fi
8564
8565
8566                 # restore the LIBS
8567                 LIBS="$ol_LIBS"
8568         
8569 fi
8570
8571 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8572
8573         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8574                 ol_link_pthreads="-lpthread -lmach -lexc"
8575                 ol_link_threads=posix
8576         fi
8577 fi
8578
8579
8580                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8581 if test "$ol_link_threads" = no ; then
8582         # try -lpthread -Wl,-woff,85
8583         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8584 echo "configure:8585: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8585 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8586   echo $ac_n "(cached) $ac_c" 1>&6
8587 else
8588   
8589                 # save the flags
8590                 ol_LIBS="$LIBS"
8591                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8592
8593                 if test "$cross_compiling" = yes; then
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 int main() {
8610
8611         /* pthread test function */
8612         pthread_t t;
8613         int status;
8614 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8615         /* This system (e.g. AIX) defaults detached; must override */
8616         pthread_attr_t attr;
8617
8618         status = pthread_attr_init(&attr);
8619         if( status ) exit( status );
8620
8621         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8622         if( status ) exit( status );
8623
8624 #define ATTR    &attr
8625 #else
8626 #if HAVE_PTHREADS_D4
8627 #define ATTR    pthread_attr_default
8628 #else
8629 #define ATTR    NULL
8630 #endif
8631 #endif
8632         /* make sure pthread_create() isn't just a stub */
8633         status = pthread_create(&t, ATTR, task, NULL);
8634         if( status ) exit( status );
8635
8636         /* make sure pthread_detach() isn't just a stub */
8637 #if HAVE_PTHREADS_D4
8638         status = pthread_detach( &t );
8639 #else
8640         status = pthread_detach( t );
8641 #endif
8642
8643 #ifdef HAVE_LINUX_THREADS
8644         pthread_kill_other_threads_np();
8645 #endif
8646
8647         exit( status );
8648
8649 ; return 0; }
8650 EOF
8651 if { (eval echo configure:8652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8652   rm -rf conftest*
8653   ol_cv_pthread_lib_lpthread_woff=yes
8654 else
8655   echo "configure: failed program was:" >&5
8656   cat conftest.$ac_ext >&5
8657   rm -rf conftest*
8658   ol_cv_pthread_lib_lpthread_woff=no
8659 fi
8660 rm -f conftest*
8661 else
8662   cat > conftest.$ac_ext <<EOF
8663 #line 8664 "configure"
8664 #include "confdefs.h"
8665 /* pthread test headers */
8666 #include <pthread.h>
8667 #ifndef NULL
8668 #define NULL (void*)0
8669 #endif
8670
8671 static void *task(p)
8672         void *p;
8673 {
8674         return (void *) (p == NULL);
8675 }
8676
8677
8678 int main(argc, argv)
8679         int argc;
8680         char **argv;
8681 {
8682
8683         /* pthread test function */
8684         pthread_t t;
8685         int status;
8686 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8687         /* This system (e.g. AIX) defaults detached; must override */
8688         pthread_attr_t attr;
8689
8690         status = pthread_attr_init(&attr);
8691         if( status ) exit( status );
8692
8693         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8694         if( status ) exit( status );
8695
8696 #define ATTR    &attr
8697 #else
8698 #if HAVE_PTHREADS_D4
8699 #define ATTR    pthread_attr_default
8700 #else
8701 #define ATTR    NULL
8702 #endif
8703 #endif
8704         /* make sure pthread_create() isn't just a stub */
8705         status = pthread_create(&t, ATTR, task, NULL);
8706         if( status ) exit( status );
8707
8708         /* make sure pthread_detach() isn't just a stub */
8709 #if HAVE_PTHREADS_D4
8710         status = pthread_detach( &t );
8711 #else
8712         status = pthread_detach( t );
8713 #endif
8714
8715 #ifdef HAVE_LINUX_THREADS
8716         pthread_kill_other_threads_np();
8717 #endif
8718
8719         exit( status );
8720
8721 }
8722
8723 EOF
8724 if { (eval echo configure:8725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8725 then
8726   ol_cv_pthread_lib_lpthread_woff=yes
8727 else
8728   echo "configure: failed program was:" >&5
8729   cat conftest.$ac_ext >&5
8730   rm -fr conftest*
8731   ol_cv_pthread_lib_lpthread_woff=no
8732 fi
8733 rm -fr conftest*
8734 fi
8735
8736
8737                 # restore the LIBS
8738                 LIBS="$ol_LIBS"
8739         
8740 fi
8741
8742 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8743
8744         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8745                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8746                 ol_link_threads=posix
8747         fi
8748 fi
8749
8750
8751                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8752 if test "$ol_link_threads" = no ; then
8753         # try -lpthread
8754         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8755 echo "configure:8756: checking for pthread link with -lpthread" >&5
8756 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8757   echo $ac_n "(cached) $ac_c" 1>&6
8758 else
8759   
8760                 # save the flags
8761                 ol_LIBS="$LIBS"
8762                 LIBS="-lpthread $LIBS"
8763
8764                 if test "$cross_compiling" = yes; then
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 int main() {
8781
8782         /* pthread test function */
8783         pthread_t t;
8784         int status;
8785 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8786         /* This system (e.g. AIX) defaults detached; must override */
8787         pthread_attr_t attr;
8788
8789         status = pthread_attr_init(&attr);
8790         if( status ) exit( status );
8791
8792         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8793         if( status ) exit( status );
8794
8795 #define ATTR    &attr
8796 #else
8797 #if HAVE_PTHREADS_D4
8798 #define ATTR    pthread_attr_default
8799 #else
8800 #define ATTR    NULL
8801 #endif
8802 #endif
8803         /* make sure pthread_create() isn't just a stub */
8804         status = pthread_create(&t, ATTR, task, NULL);
8805         if( status ) exit( status );
8806
8807         /* make sure pthread_detach() isn't just a stub */
8808 #if HAVE_PTHREADS_D4
8809         status = pthread_detach( &t );
8810 #else
8811         status = pthread_detach( t );
8812 #endif
8813
8814 #ifdef HAVE_LINUX_THREADS
8815         pthread_kill_other_threads_np();
8816 #endif
8817
8818         exit( status );
8819
8820 ; return 0; }
8821 EOF
8822 if { (eval echo configure:8823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8823   rm -rf conftest*
8824   ol_cv_pthread_lpthread=yes
8825 else
8826   echo "configure: failed program was:" >&5
8827   cat conftest.$ac_ext >&5
8828   rm -rf conftest*
8829   ol_cv_pthread_lpthread=no
8830 fi
8831 rm -f conftest*
8832 else
8833   cat > conftest.$ac_ext <<EOF
8834 #line 8835 "configure"
8835 #include "confdefs.h"
8836 /* pthread test headers */
8837 #include <pthread.h>
8838 #ifndef NULL
8839 #define NULL (void*)0
8840 #endif
8841
8842 static void *task(p)
8843         void *p;
8844 {
8845         return (void *) (p == NULL);
8846 }
8847
8848
8849 int main(argc, argv)
8850         int argc;
8851         char **argv;
8852 {
8853
8854         /* pthread test function */
8855         pthread_t t;
8856         int status;
8857 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8858         /* This system (e.g. AIX) defaults detached; must override */
8859         pthread_attr_t attr;
8860
8861         status = pthread_attr_init(&attr);
8862         if( status ) exit( status );
8863
8864         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8865         if( status ) exit( status );
8866
8867 #define ATTR    &attr
8868 #else
8869 #if HAVE_PTHREADS_D4
8870 #define ATTR    pthread_attr_default
8871 #else
8872 #define ATTR    NULL
8873 #endif
8874 #endif
8875         /* make sure pthread_create() isn't just a stub */
8876         status = pthread_create(&t, ATTR, task, NULL);
8877         if( status ) exit( status );
8878
8879         /* make sure pthread_detach() isn't just a stub */
8880 #if HAVE_PTHREADS_D4
8881         status = pthread_detach( &t );
8882 #else
8883         status = pthread_detach( t );
8884 #endif
8885
8886 #ifdef HAVE_LINUX_THREADS
8887         pthread_kill_other_threads_np();
8888 #endif
8889
8890         exit( status );
8891
8892 }
8893
8894 EOF
8895 if { (eval echo configure:8896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8896 then
8897   ol_cv_pthread_lpthread=yes
8898 else
8899   echo "configure: failed program was:" >&5
8900   cat conftest.$ac_ext >&5
8901   rm -fr conftest*
8902   ol_cv_pthread_lpthread=no
8903 fi
8904 rm -fr conftest*
8905 fi
8906
8907
8908                 # restore the LIBS
8909                 LIBS="$ol_LIBS"
8910         
8911 fi
8912
8913 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8914
8915         if test $ol_cv_pthread_lpthread = yes ; then
8916                 ol_link_pthreads="-lpthread"
8917                 ol_link_threads=posix
8918         fi
8919 fi
8920
8921                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8922 if test "$ol_link_threads" = no ; then
8923         # try -lc_r
8924         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8925 echo "configure:8926: checking for pthread link with -lc_r" >&5
8926 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8927   echo $ac_n "(cached) $ac_c" 1>&6
8928 else
8929   
8930                 # save the flags
8931                 ol_LIBS="$LIBS"
8932                 LIBS="-lc_r $LIBS"
8933
8934                 if test "$cross_compiling" = yes; then
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 int main() {
8951
8952         /* pthread test function */
8953         pthread_t t;
8954         int status;
8955 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8956         /* This system (e.g. AIX) defaults detached; must override */
8957         pthread_attr_t attr;
8958
8959         status = pthread_attr_init(&attr);
8960         if( status ) exit( status );
8961
8962         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8963         if( status ) exit( status );
8964
8965 #define ATTR    &attr
8966 #else
8967 #if HAVE_PTHREADS_D4
8968 #define ATTR    pthread_attr_default
8969 #else
8970 #define ATTR    NULL
8971 #endif
8972 #endif
8973         /* make sure pthread_create() isn't just a stub */
8974         status = pthread_create(&t, ATTR, task, NULL);
8975         if( status ) exit( status );
8976
8977         /* make sure pthread_detach() isn't just a stub */
8978 #if HAVE_PTHREADS_D4
8979         status = pthread_detach( &t );
8980 #else
8981         status = pthread_detach( t );
8982 #endif
8983
8984 #ifdef HAVE_LINUX_THREADS
8985         pthread_kill_other_threads_np();
8986 #endif
8987
8988         exit( status );
8989
8990 ; return 0; }
8991 EOF
8992 if { (eval echo configure:8993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8993   rm -rf conftest*
8994   ol_cv_pthread_lc_r=yes
8995 else
8996   echo "configure: failed program was:" >&5
8997   cat conftest.$ac_ext >&5
8998   rm -rf conftest*
8999   ol_cv_pthread_lc_r=no
9000 fi
9001 rm -f conftest*
9002 else
9003   cat > conftest.$ac_ext <<EOF
9004 #line 9005 "configure"
9005 #include "confdefs.h"
9006 /* pthread test headers */
9007 #include <pthread.h>
9008 #ifndef NULL
9009 #define NULL (void*)0
9010 #endif
9011
9012 static void *task(p)
9013         void *p;
9014 {
9015         return (void *) (p == NULL);
9016 }
9017
9018
9019 int main(argc, argv)
9020         int argc;
9021         char **argv;
9022 {
9023
9024         /* pthread test function */
9025         pthread_t t;
9026         int status;
9027 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9028         /* This system (e.g. AIX) defaults detached; must override */
9029         pthread_attr_t attr;
9030
9031         status = pthread_attr_init(&attr);
9032         if( status ) exit( status );
9033
9034         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9035         if( status ) exit( status );
9036
9037 #define ATTR    &attr
9038 #else
9039 #if HAVE_PTHREADS_D4
9040 #define ATTR    pthread_attr_default
9041 #else
9042 #define ATTR    NULL
9043 #endif
9044 #endif
9045         /* make sure pthread_create() isn't just a stub */
9046         status = pthread_create(&t, ATTR, task, NULL);
9047         if( status ) exit( status );
9048
9049         /* make sure pthread_detach() isn't just a stub */
9050 #if HAVE_PTHREADS_D4
9051         status = pthread_detach( &t );
9052 #else
9053         status = pthread_detach( t );
9054 #endif
9055
9056 #ifdef HAVE_LINUX_THREADS
9057         pthread_kill_other_threads_np();
9058 #endif
9059
9060         exit( status );
9061
9062 }
9063
9064 EOF
9065 if { (eval echo configure:9066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9066 then
9067   ol_cv_pthread_lc_r=yes
9068 else
9069   echo "configure: failed program was:" >&5
9070   cat conftest.$ac_ext >&5
9071   rm -fr conftest*
9072   ol_cv_pthread_lc_r=no
9073 fi
9074 rm -fr conftest*
9075 fi
9076
9077
9078                 # restore the LIBS
9079                 LIBS="$ol_LIBS"
9080         
9081 fi
9082
9083 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9084
9085         if test $ol_cv_pthread_lc_r = yes ; then
9086                 ol_link_pthreads="-lc_r"
9087                 ol_link_threads=posix
9088         fi
9089 fi
9090
9091
9092                 # Pthread try link: -threads (ol_cv_pthread_threads)
9093 if test "$ol_link_threads" = no ; then
9094         # try -threads
9095         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9096 echo "configure:9097: checking for pthread link with -threads" >&5
9097 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9098   echo $ac_n "(cached) $ac_c" 1>&6
9099 else
9100   
9101                 # save the flags
9102                 ol_LIBS="$LIBS"
9103                 LIBS="-threads $LIBS"
9104
9105                 if test "$cross_compiling" = yes; then
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 int main() {
9122
9123         /* pthread test function */
9124         pthread_t t;
9125         int status;
9126 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9127         /* This system (e.g. AIX) defaults detached; must override */
9128         pthread_attr_t attr;
9129
9130         status = pthread_attr_init(&attr);
9131         if( status ) exit( status );
9132
9133         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9134         if( status ) exit( status );
9135
9136 #define ATTR    &attr
9137 #else
9138 #if HAVE_PTHREADS_D4
9139 #define ATTR    pthread_attr_default
9140 #else
9141 #define ATTR    NULL
9142 #endif
9143 #endif
9144         /* make sure pthread_create() isn't just a stub */
9145         status = pthread_create(&t, ATTR, task, NULL);
9146         if( status ) exit( status );
9147
9148         /* make sure pthread_detach() isn't just a stub */
9149 #if HAVE_PTHREADS_D4
9150         status = pthread_detach( &t );
9151 #else
9152         status = pthread_detach( t );
9153 #endif
9154
9155 #ifdef HAVE_LINUX_THREADS
9156         pthread_kill_other_threads_np();
9157 #endif
9158
9159         exit( status );
9160
9161 ; return 0; }
9162 EOF
9163 if { (eval echo configure:9164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9164   rm -rf conftest*
9165   ol_cv_pthread_threads=yes
9166 else
9167   echo "configure: failed program was:" >&5
9168   cat conftest.$ac_ext >&5
9169   rm -rf conftest*
9170   ol_cv_pthread_threads=no
9171 fi
9172 rm -f conftest*
9173 else
9174   cat > conftest.$ac_ext <<EOF
9175 #line 9176 "configure"
9176 #include "confdefs.h"
9177 /* pthread test headers */
9178 #include <pthread.h>
9179 #ifndef NULL
9180 #define NULL (void*)0
9181 #endif
9182
9183 static void *task(p)
9184         void *p;
9185 {
9186         return (void *) (p == NULL);
9187 }
9188
9189
9190 int main(argc, argv)
9191         int argc;
9192         char **argv;
9193 {
9194
9195         /* pthread test function */
9196         pthread_t t;
9197         int status;
9198 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9199         /* This system (e.g. AIX) defaults detached; must override */
9200         pthread_attr_t attr;
9201
9202         status = pthread_attr_init(&attr);
9203         if( status ) exit( status );
9204
9205         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9206         if( status ) exit( status );
9207
9208 #define ATTR    &attr
9209 #else
9210 #if HAVE_PTHREADS_D4
9211 #define ATTR    pthread_attr_default
9212 #else
9213 #define ATTR    NULL
9214 #endif
9215 #endif
9216         /* make sure pthread_create() isn't just a stub */
9217         status = pthread_create(&t, ATTR, task, NULL);
9218         if( status ) exit( status );
9219
9220         /* make sure pthread_detach() isn't just a stub */
9221 #if HAVE_PTHREADS_D4
9222         status = pthread_detach( &t );
9223 #else
9224         status = pthread_detach( t );
9225 #endif
9226
9227 #ifdef HAVE_LINUX_THREADS
9228         pthread_kill_other_threads_np();
9229 #endif
9230
9231         exit( status );
9232
9233 }
9234
9235 EOF
9236 if { (eval echo configure:9237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9237 then
9238   ol_cv_pthread_threads=yes
9239 else
9240   echo "configure: failed program was:" >&5
9241   cat conftest.$ac_ext >&5
9242   rm -fr conftest*
9243   ol_cv_pthread_threads=no
9244 fi
9245 rm -fr conftest*
9246 fi
9247
9248
9249                 # restore the LIBS
9250                 LIBS="$ol_LIBS"
9251         
9252 fi
9253
9254 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9255
9256         if test $ol_cv_pthread_threads = yes ; then
9257                 ol_link_pthreads="-threads"
9258                 ol_link_threads=posix
9259         fi
9260 fi
9261
9262
9263                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9264 if test "$ol_link_threads" = no ; then
9265         # try -lpthreads -lmach -lexc -lc_r
9266         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9267 echo "configure:9268: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9268 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9269   echo $ac_n "(cached) $ac_c" 1>&6
9270 else
9271   
9272                 # save the flags
9273                 ol_LIBS="$LIBS"
9274                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9275
9276                 if test "$cross_compiling" = yes; then
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 int main() {
9293
9294         /* pthread test function */
9295         pthread_t t;
9296         int status;
9297 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9298         /* This system (e.g. AIX) defaults detached; must override */
9299         pthread_attr_t attr;
9300
9301         status = pthread_attr_init(&attr);
9302         if( status ) exit( status );
9303
9304         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9305         if( status ) exit( status );
9306
9307 #define ATTR    &attr
9308 #else
9309 #if HAVE_PTHREADS_D4
9310 #define ATTR    pthread_attr_default
9311 #else
9312 #define ATTR    NULL
9313 #endif
9314 #endif
9315         /* make sure pthread_create() isn't just a stub */
9316         status = pthread_create(&t, ATTR, task, NULL);
9317         if( status ) exit( status );
9318
9319         /* make sure pthread_detach() isn't just a stub */
9320 #if HAVE_PTHREADS_D4
9321         status = pthread_detach( &t );
9322 #else
9323         status = pthread_detach( t );
9324 #endif
9325
9326 #ifdef HAVE_LINUX_THREADS
9327         pthread_kill_other_threads_np();
9328 #endif
9329
9330         exit( status );
9331
9332 ; return 0; }
9333 EOF
9334 if { (eval echo configure:9335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9335   rm -rf conftest*
9336   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9337 else
9338   echo "configure: failed program was:" >&5
9339   cat conftest.$ac_ext >&5
9340   rm -rf conftest*
9341   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9342 fi
9343 rm -f conftest*
9344 else
9345   cat > conftest.$ac_ext <<EOF
9346 #line 9347 "configure"
9347 #include "confdefs.h"
9348 /* pthread test headers */
9349 #include <pthread.h>
9350 #ifndef NULL
9351 #define NULL (void*)0
9352 #endif
9353
9354 static void *task(p)
9355         void *p;
9356 {
9357         return (void *) (p == NULL);
9358 }
9359
9360
9361 int main(argc, argv)
9362         int argc;
9363         char **argv;
9364 {
9365
9366         /* pthread test function */
9367         pthread_t t;
9368         int status;
9369 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9370         /* This system (e.g. AIX) defaults detached; must override */
9371         pthread_attr_t attr;
9372
9373         status = pthread_attr_init(&attr);
9374         if( status ) exit( status );
9375
9376         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9377         if( status ) exit( status );
9378
9379 #define ATTR    &attr
9380 #else
9381 #if HAVE_PTHREADS_D4
9382 #define ATTR    pthread_attr_default
9383 #else
9384 #define ATTR    NULL
9385 #endif
9386 #endif
9387         /* make sure pthread_create() isn't just a stub */
9388         status = pthread_create(&t, ATTR, task, NULL);
9389         if( status ) exit( status );
9390
9391         /* make sure pthread_detach() isn't just a stub */
9392 #if HAVE_PTHREADS_D4
9393         status = pthread_detach( &t );
9394 #else
9395         status = pthread_detach( t );
9396 #endif
9397
9398 #ifdef HAVE_LINUX_THREADS
9399         pthread_kill_other_threads_np();
9400 #endif
9401
9402         exit( status );
9403
9404 }
9405
9406 EOF
9407 if { (eval echo configure:9408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9408 then
9409   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9410 else
9411   echo "configure: failed program was:" >&5
9412   cat conftest.$ac_ext >&5
9413   rm -fr conftest*
9414   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9415 fi
9416 rm -fr conftest*
9417 fi
9418
9419
9420                 # restore the LIBS
9421                 LIBS="$ol_LIBS"
9422         
9423 fi
9424
9425 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9426
9427         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9428                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9429                 ol_link_threads=posix
9430         fi
9431 fi
9432
9433                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9434 if test "$ol_link_threads" = no ; then
9435         # try -lpthreads -lmach -lexc
9436         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9437 echo "configure:9438: checking for pthread link with -lpthreads -lmach -lexc" >&5
9438 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9439   echo $ac_n "(cached) $ac_c" 1>&6
9440 else
9441   
9442                 # save the flags
9443                 ol_LIBS="$LIBS"
9444                 LIBS="-lpthreads -lmach -lexc $LIBS"
9445
9446                 if test "$cross_compiling" = yes; then
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 int main() {
9463
9464         /* pthread test function */
9465         pthread_t t;
9466         int status;
9467 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9468         /* This system (e.g. AIX) defaults detached; must override */
9469         pthread_attr_t attr;
9470
9471         status = pthread_attr_init(&attr);
9472         if( status ) exit( status );
9473
9474         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9475         if( status ) exit( status );
9476
9477 #define ATTR    &attr
9478 #else
9479 #if HAVE_PTHREADS_D4
9480 #define ATTR    pthread_attr_default
9481 #else
9482 #define ATTR    NULL
9483 #endif
9484 #endif
9485         /* make sure pthread_create() isn't just a stub */
9486         status = pthread_create(&t, ATTR, task, NULL);
9487         if( status ) exit( status );
9488
9489         /* make sure pthread_detach() isn't just a stub */
9490 #if HAVE_PTHREADS_D4
9491         status = pthread_detach( &t );
9492 #else
9493         status = pthread_detach( t );
9494 #endif
9495
9496 #ifdef HAVE_LINUX_THREADS
9497         pthread_kill_other_threads_np();
9498 #endif
9499
9500         exit( status );
9501
9502 ; return 0; }
9503 EOF
9504 if { (eval echo configure:9505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9505   rm -rf conftest*
9506   ol_cv_pthread_lpthreads_lmach_lexc=yes
9507 else
9508   echo "configure: failed program was:" >&5
9509   cat conftest.$ac_ext >&5
9510   rm -rf conftest*
9511   ol_cv_pthread_lpthreads_lmach_lexc=no
9512 fi
9513 rm -f conftest*
9514 else
9515   cat > conftest.$ac_ext <<EOF
9516 #line 9517 "configure"
9517 #include "confdefs.h"
9518 /* pthread test headers */
9519 #include <pthread.h>
9520 #ifndef NULL
9521 #define NULL (void*)0
9522 #endif
9523
9524 static void *task(p)
9525         void *p;
9526 {
9527         return (void *) (p == NULL);
9528 }
9529
9530
9531 int main(argc, argv)
9532         int argc;
9533         char **argv;
9534 {
9535
9536         /* pthread test function */
9537         pthread_t t;
9538         int status;
9539 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9540         /* This system (e.g. AIX) defaults detached; must override */
9541         pthread_attr_t attr;
9542
9543         status = pthread_attr_init(&attr);
9544         if( status ) exit( status );
9545
9546         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9547         if( status ) exit( status );
9548
9549 #define ATTR    &attr
9550 #else
9551 #if HAVE_PTHREADS_D4
9552 #define ATTR    pthread_attr_default
9553 #else
9554 #define ATTR    NULL
9555 #endif
9556 #endif
9557         /* make sure pthread_create() isn't just a stub */
9558         status = pthread_create(&t, ATTR, task, NULL);
9559         if( status ) exit( status );
9560
9561         /* make sure pthread_detach() isn't just a stub */
9562 #if HAVE_PTHREADS_D4
9563         status = pthread_detach( &t );
9564 #else
9565         status = pthread_detach( t );
9566 #endif
9567
9568 #ifdef HAVE_LINUX_THREADS
9569         pthread_kill_other_threads_np();
9570 #endif
9571
9572         exit( status );
9573
9574 }
9575
9576 EOF
9577 if { (eval echo configure:9578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9578 then
9579   ol_cv_pthread_lpthreads_lmach_lexc=yes
9580 else
9581   echo "configure: failed program was:" >&5
9582   cat conftest.$ac_ext >&5
9583   rm -fr conftest*
9584   ol_cv_pthread_lpthreads_lmach_lexc=no
9585 fi
9586 rm -fr conftest*
9587 fi
9588
9589
9590                 # restore the LIBS
9591                 LIBS="$ol_LIBS"
9592         
9593 fi
9594
9595 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9596
9597         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9598                 ol_link_pthreads="-lpthreads -lmach -lexc"
9599                 ol_link_threads=posix
9600         fi
9601 fi
9602
9603                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9604 if test "$ol_link_threads" = no ; then
9605         # try -lpthreads -lexc
9606         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9607 echo "configure:9608: checking for pthread link with -lpthreads -lexc" >&5
9608 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9609   echo $ac_n "(cached) $ac_c" 1>&6
9610 else
9611   
9612                 # save the flags
9613                 ol_LIBS="$LIBS"
9614                 LIBS="-lpthreads -lexc $LIBS"
9615
9616                 if test "$cross_compiling" = yes; then
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 int main() {
9633
9634         /* pthread test function */
9635         pthread_t t;
9636         int status;
9637 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9638         /* This system (e.g. AIX) defaults detached; must override */
9639         pthread_attr_t attr;
9640
9641         status = pthread_attr_init(&attr);
9642         if( status ) exit( status );
9643
9644         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9645         if( status ) exit( status );
9646
9647 #define ATTR    &attr
9648 #else
9649 #if HAVE_PTHREADS_D4
9650 #define ATTR    pthread_attr_default
9651 #else
9652 #define ATTR    NULL
9653 #endif
9654 #endif
9655         /* make sure pthread_create() isn't just a stub */
9656         status = pthread_create(&t, ATTR, task, NULL);
9657         if( status ) exit( status );
9658
9659         /* make sure pthread_detach() isn't just a stub */
9660 #if HAVE_PTHREADS_D4
9661         status = pthread_detach( &t );
9662 #else
9663         status = pthread_detach( t );
9664 #endif
9665
9666 #ifdef HAVE_LINUX_THREADS
9667         pthread_kill_other_threads_np();
9668 #endif
9669
9670         exit( status );
9671
9672 ; return 0; }
9673 EOF
9674 if { (eval echo configure:9675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9675   rm -rf conftest*
9676   ol_cv_pthread_lpthreads_lexc=yes
9677 else
9678   echo "configure: failed program was:" >&5
9679   cat conftest.$ac_ext >&5
9680   rm -rf conftest*
9681   ol_cv_pthread_lpthreads_lexc=no
9682 fi
9683 rm -f conftest*
9684 else
9685   cat > conftest.$ac_ext <<EOF
9686 #line 9687 "configure"
9687 #include "confdefs.h"
9688 /* pthread test headers */
9689 #include <pthread.h>
9690 #ifndef NULL
9691 #define NULL (void*)0
9692 #endif
9693
9694 static void *task(p)
9695         void *p;
9696 {
9697         return (void *) (p == NULL);
9698 }
9699
9700
9701 int main(argc, argv)
9702         int argc;
9703         char **argv;
9704 {
9705
9706         /* pthread test function */
9707         pthread_t t;
9708         int status;
9709 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9710         /* This system (e.g. AIX) defaults detached; must override */
9711         pthread_attr_t attr;
9712
9713         status = pthread_attr_init(&attr);
9714         if( status ) exit( status );
9715
9716         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9717         if( status ) exit( status );
9718
9719 #define ATTR    &attr
9720 #else
9721 #if HAVE_PTHREADS_D4
9722 #define ATTR    pthread_attr_default
9723 #else
9724 #define ATTR    NULL
9725 #endif
9726 #endif
9727         /* make sure pthread_create() isn't just a stub */
9728         status = pthread_create(&t, ATTR, task, NULL);
9729         if( status ) exit( status );
9730
9731         /* make sure pthread_detach() isn't just a stub */
9732 #if HAVE_PTHREADS_D4
9733         status = pthread_detach( &t );
9734 #else
9735         status = pthread_detach( t );
9736 #endif
9737
9738 #ifdef HAVE_LINUX_THREADS
9739         pthread_kill_other_threads_np();
9740 #endif
9741
9742         exit( status );
9743
9744 }
9745
9746 EOF
9747 if { (eval echo configure:9748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9748 then
9749   ol_cv_pthread_lpthreads_lexc=yes
9750 else
9751   echo "configure: failed program was:" >&5
9752   cat conftest.$ac_ext >&5
9753   rm -fr conftest*
9754   ol_cv_pthread_lpthreads_lexc=no
9755 fi
9756 rm -fr conftest*
9757 fi
9758
9759
9760                 # restore the LIBS
9761                 LIBS="$ol_LIBS"
9762         
9763 fi
9764
9765 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9766
9767         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9768                 ol_link_pthreads="-lpthreads -lexc"
9769                 ol_link_threads=posix
9770         fi
9771 fi
9772
9773
9774                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9775 if test "$ol_link_threads" = no ; then
9776         # try -lpthreads
9777         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9778 echo "configure:9779: checking for pthread link with -lpthreads" >&5
9779 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9780   echo $ac_n "(cached) $ac_c" 1>&6
9781 else
9782   
9783                 # save the flags
9784                 ol_LIBS="$LIBS"
9785                 LIBS="-lpthreads $LIBS"
9786
9787                 if test "$cross_compiling" = yes; then
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 int main() {
9804
9805         /* pthread test function */
9806         pthread_t t;
9807         int status;
9808 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9809         /* This system (e.g. AIX) defaults detached; must override */
9810         pthread_attr_t attr;
9811
9812         status = pthread_attr_init(&attr);
9813         if( status ) exit( status );
9814
9815         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9816         if( status ) exit( status );
9817
9818 #define ATTR    &attr
9819 #else
9820 #if HAVE_PTHREADS_D4
9821 #define ATTR    pthread_attr_default
9822 #else
9823 #define ATTR    NULL
9824 #endif
9825 #endif
9826         /* make sure pthread_create() isn't just a stub */
9827         status = pthread_create(&t, ATTR, task, NULL);
9828         if( status ) exit( status );
9829
9830         /* make sure pthread_detach() isn't just a stub */
9831 #if HAVE_PTHREADS_D4
9832         status = pthread_detach( &t );
9833 #else
9834         status = pthread_detach( t );
9835 #endif
9836
9837 #ifdef HAVE_LINUX_THREADS
9838         pthread_kill_other_threads_np();
9839 #endif
9840
9841         exit( status );
9842
9843 ; return 0; }
9844 EOF
9845 if { (eval echo configure:9846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9846   rm -rf conftest*
9847   ol_cv_pthread_lib_lpthreads=yes
9848 else
9849   echo "configure: failed program was:" >&5
9850   cat conftest.$ac_ext >&5
9851   rm -rf conftest*
9852   ol_cv_pthread_lib_lpthreads=no
9853 fi
9854 rm -f conftest*
9855 else
9856   cat > conftest.$ac_ext <<EOF
9857 #line 9858 "configure"
9858 #include "confdefs.h"
9859 /* pthread test headers */
9860 #include <pthread.h>
9861 #ifndef NULL
9862 #define NULL (void*)0
9863 #endif
9864
9865 static void *task(p)
9866         void *p;
9867 {
9868         return (void *) (p == NULL);
9869 }
9870
9871
9872 int main(argc, argv)
9873         int argc;
9874         char **argv;
9875 {
9876
9877         /* pthread test function */
9878         pthread_t t;
9879         int status;
9880 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9881         /* This system (e.g. AIX) defaults detached; must override */
9882         pthread_attr_t attr;
9883
9884         status = pthread_attr_init(&attr);
9885         if( status ) exit( status );
9886
9887         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9888         if( status ) exit( status );
9889
9890 #define ATTR    &attr
9891 #else
9892 #if HAVE_PTHREADS_D4
9893 #define ATTR    pthread_attr_default
9894 #else
9895 #define ATTR    NULL
9896 #endif
9897 #endif
9898         /* make sure pthread_create() isn't just a stub */
9899         status = pthread_create(&t, ATTR, task, NULL);
9900         if( status ) exit( status );
9901
9902         /* make sure pthread_detach() isn't just a stub */
9903 #if HAVE_PTHREADS_D4
9904         status = pthread_detach( &t );
9905 #else
9906         status = pthread_detach( t );
9907 #endif
9908
9909 #ifdef HAVE_LINUX_THREADS
9910         pthread_kill_other_threads_np();
9911 #endif
9912
9913         exit( status );
9914
9915 }
9916
9917 EOF
9918 if { (eval echo configure:9919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9919 then
9920   ol_cv_pthread_lib_lpthreads=yes
9921 else
9922   echo "configure: failed program was:" >&5
9923   cat conftest.$ac_ext >&5
9924   rm -fr conftest*
9925   ol_cv_pthread_lib_lpthreads=no
9926 fi
9927 rm -fr conftest*
9928 fi
9929
9930
9931                 # restore the LIBS
9932                 LIBS="$ol_LIBS"
9933         
9934 fi
9935
9936 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9937
9938         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9939                 ol_link_pthreads="-lpthreads"
9940                 ol_link_threads=posix
9941         fi
9942 fi
9943
9944
9945                 if test $ol_link_threads != no ; then
9946                         cat >> confdefs.h <<\EOF
9947 #define HAVE_PTHREADS 1
9948 EOF
9949
9950
9951                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9952
9953                                                 save_CPPFLAGS="$CPPFLAGS"
9954                         save_LIBS="$LIBS"
9955                         LIBS="$LTHREAD_LIBS $LIBS"
9956
9957                                                                                                 for ac_func in sched_yield pthread_yield
9958 do
9959 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9960 echo "configure:9961: checking for $ac_func" >&5
9961 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9962   echo $ac_n "(cached) $ac_c" 1>&6
9963 else
9964   cat > conftest.$ac_ext <<EOF
9965 #line 9966 "configure"
9966 #include "confdefs.h"
9967 /* System header to define __stub macros and hopefully few prototypes,
9968     which can conflict with char $ac_func(); below.  */
9969 #include <assert.h>
9970 /* Override any gcc2 internal prototype to avoid an error.  */
9971 /* We use char because int might match the return type of a gcc2
9972     builtin and then its argument prototype would still apply.  */
9973 char $ac_func();
9974 char (*f)();
9975
9976 int main() {
9977
9978 /* The GNU C library defines this for functions which it implements
9979     to always fail with ENOSYS.  Some functions are actually named
9980     something starting with __ and the normal name is an alias.  */
9981 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9982 choke me
9983 #else
9984 f = $ac_func;
9985 #endif
9986
9987 ; return 0; }
9988 EOF
9989 if { (eval echo configure:9990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9990   rm -rf conftest*
9991   eval "ac_cv_func_$ac_func=yes"
9992 else
9993   echo "configure: failed program was:" >&5
9994   cat conftest.$ac_ext >&5
9995   rm -rf conftest*
9996   eval "ac_cv_func_$ac_func=no"
9997 fi
9998 rm -f conftest*
9999 fi
10000
10001 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10002   echo "$ac_t""yes" 1>&6
10003     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10004   cat >> confdefs.h <<EOF
10005 #define $ac_tr_func 1
10006 EOF
10007  
10008 else
10009   echo "$ac_t""no" 1>&6
10010 fi
10011 done
10012
10013
10014                         if test $ac_cv_func_sched_yield = no -a \
10015                                 $ac_cv_func_pthread_yield = no ; then
10016                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10017 echo "configure:10018: checking for sched_yield in -lrt" >&5
10018 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10019 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10020   echo $ac_n "(cached) $ac_c" 1>&6
10021 else
10022   ac_save_LIBS="$LIBS"
10023 LIBS="-lrt  $LIBS"
10024 cat > conftest.$ac_ext <<EOF
10025 #line 10026 "configure"
10026 #include "confdefs.h"
10027 /* Override any gcc2 internal prototype to avoid an error.  */
10028 /* We use char because int might match the return type of a gcc2
10029     builtin and then its argument prototype would still apply.  */
10030 char sched_yield();
10031
10032 int main() {
10033 sched_yield()
10034 ; return 0; }
10035 EOF
10036 if { (eval echo configure:10037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10037   rm -rf conftest*
10038   eval "ac_cv_lib_$ac_lib_var=yes"
10039 else
10040   echo "configure: failed program was:" >&5
10041   cat conftest.$ac_ext >&5
10042   rm -rf conftest*
10043   eval "ac_cv_lib_$ac_lib_var=no"
10044 fi
10045 rm -f conftest*
10046 LIBS="$ac_save_LIBS"
10047
10048 fi
10049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10050   echo "$ac_t""yes" 1>&6
10051   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10052                                         cat >> confdefs.h <<\EOF
10053 #define HAVE_SCHED_YIELD 1
10054 EOF
10055
10056                                         ac_cv_func_sched_yield=yes
10057 else
10058   echo "$ac_t""no" 1>&6
10059 ac_cv_func_sched_yield=no
10060 fi
10061
10062                         fi
10063                         if test $ac_cv_func_sched_yield = no -a \
10064                                 $ac_cv_func_pthread_yield = no ; then
10065                                                                                                 for ac_func in thr_yield
10066 do
10067 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10068 echo "configure:10069: checking for $ac_func" >&5
10069 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10070   echo $ac_n "(cached) $ac_c" 1>&6
10071 else
10072   cat > conftest.$ac_ext <<EOF
10073 #line 10074 "configure"
10074 #include "confdefs.h"
10075 /* System header to define __stub macros and hopefully few prototypes,
10076     which can conflict with char $ac_func(); below.  */
10077 #include <assert.h>
10078 /* Override any gcc2 internal prototype to avoid an error.  */
10079 /* We use char because int might match the return type of a gcc2
10080     builtin and then its argument prototype would still apply.  */
10081 char $ac_func();
10082 char (*f)();
10083
10084 int main() {
10085
10086 /* The GNU C library defines this for functions which it implements
10087     to always fail with ENOSYS.  Some functions are actually named
10088     something starting with __ and the normal name is an alias.  */
10089 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10090 choke me
10091 #else
10092 f = $ac_func;
10093 #endif
10094
10095 ; return 0; }
10096 EOF
10097 if { (eval echo configure:10098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10098   rm -rf conftest*
10099   eval "ac_cv_func_$ac_func=yes"
10100 else
10101   echo "configure: failed program was:" >&5
10102   cat conftest.$ac_ext >&5
10103   rm -rf conftest*
10104   eval "ac_cv_func_$ac_func=no"
10105 fi
10106 rm -f conftest*
10107 fi
10108
10109 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10110   echo "$ac_t""yes" 1>&6
10111     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10112   cat >> confdefs.h <<EOF
10113 #define $ac_tr_func 1
10114 EOF
10115  
10116 else
10117   echo "$ac_t""no" 1>&6
10118 fi
10119 done
10120
10121                         fi
10122                         if test $ac_cv_func_sched_yield = no -a \
10123                                 $ac_cv_func_pthread_yield = no -a \
10124                                 "$ac_cv_func_thr_yield" = no ; then
10125                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10126                         fi
10127
10128                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10129 do
10130 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10131 echo "configure:10132: checking for $ac_func" >&5
10132 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10133   echo $ac_n "(cached) $ac_c" 1>&6
10134 else
10135   cat > conftest.$ac_ext <<EOF
10136 #line 10137 "configure"
10137 #include "confdefs.h"
10138 /* System header to define __stub macros and hopefully few prototypes,
10139     which can conflict with char $ac_func(); below.  */
10140 #include <assert.h>
10141 /* Override any gcc2 internal prototype to avoid an error.  */
10142 /* We use char because int might match the return type of a gcc2
10143     builtin and then its argument prototype would still apply.  */
10144 char $ac_func();
10145 char (*f)();
10146
10147 int main() {
10148
10149 /* The GNU C library defines this for functions which it implements
10150     to always fail with ENOSYS.  Some functions are actually named
10151     something starting with __ and the normal name is an alias.  */
10152 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10153 choke me
10154 #else
10155 f = $ac_func;
10156 #endif
10157
10158 ; return 0; }
10159 EOF
10160 if { (eval echo configure:10161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10161   rm -rf conftest*
10162   eval "ac_cv_func_$ac_func=yes"
10163 else
10164   echo "configure: failed program was:" >&5
10165   cat conftest.$ac_ext >&5
10166   rm -rf conftest*
10167   eval "ac_cv_func_$ac_func=no"
10168 fi
10169 rm -f conftest*
10170 fi
10171
10172 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10173   echo "$ac_t""yes" 1>&6
10174     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10175   cat >> confdefs.h <<EOF
10176 #define $ac_tr_func 1
10177 EOF
10178  
10179 else
10180   echo "$ac_t""no" 1>&6
10181 fi
10182 done
10183
10184
10185                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10186 echo "configure:10187: checking for pthread_detach with <pthread.h>" >&5
10187 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10188   echo $ac_n "(cached) $ac_c" 1>&6
10189 else
10190   
10191                                                                 cat > conftest.$ac_ext <<EOF
10192 #line 10193 "configure"
10193 #include "confdefs.h"
10194
10195 #include <pthread.h>
10196 #ifndef NULL
10197 #define NULL (void*)0
10198 #endif
10199
10200 int main() {
10201 pthread_detach(NULL);
10202 ; return 0; }
10203 EOF
10204 if { (eval echo configure:10205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10205   rm -rf conftest*
10206   ol_cv_func_pthread_detach=yes
10207 else
10208   echo "configure: failed program was:" >&5
10209   cat conftest.$ac_ext >&5
10210   rm -rf conftest*
10211   ol_cv_func_pthread_detach=no
10212 fi
10213 rm -f conftest*
10214                         
10215 fi
10216
10217 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10218
10219                         if test $ol_cv_func_pthread_detach = no ; then
10220                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10221                         fi
10222
10223                         cat >> confdefs.h <<\EOF
10224 #define HAVE_PTHREAD_DETACH 1
10225 EOF
10226
10227
10228                                                 for ac_func in \
10229                                 pthread_setconcurrency \
10230                                 pthread_getconcurrency \
10231                                 thr_setconcurrency \
10232                                 thr_getconcurrency \
10233                         
10234 do
10235 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10236 echo "configure:10237: checking for $ac_func" >&5
10237 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10238   echo $ac_n "(cached) $ac_c" 1>&6
10239 else
10240   cat > conftest.$ac_ext <<EOF
10241 #line 10242 "configure"
10242 #include "confdefs.h"
10243 /* System header to define __stub macros and hopefully few prototypes,
10244     which can conflict with char $ac_func(); below.  */
10245 #include <assert.h>
10246 /* Override any gcc2 internal prototype to avoid an error.  */
10247 /* We use char because int might match the return type of a gcc2
10248     builtin and then its argument prototype would still apply.  */
10249 char $ac_func();
10250 char (*f)();
10251
10252 int main() {
10253
10254 /* The GNU C library defines this for functions which it implements
10255     to always fail with ENOSYS.  Some functions are actually named
10256     something starting with __ and the normal name is an alias.  */
10257 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10258 choke me
10259 #else
10260 f = $ac_func;
10261 #endif
10262
10263 ; return 0; }
10264 EOF
10265 if { (eval echo configure:10266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10266   rm -rf conftest*
10267   eval "ac_cv_func_$ac_func=yes"
10268 else
10269   echo "configure: failed program was:" >&5
10270   cat conftest.$ac_ext >&5
10271   rm -rf conftest*
10272   eval "ac_cv_func_$ac_func=no"
10273 fi
10274 rm -f conftest*
10275 fi
10276
10277 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10278   echo "$ac_t""yes" 1>&6
10279     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10280   cat >> confdefs.h <<EOF
10281 #define $ac_tr_func 1
10282 EOF
10283  
10284 else
10285   echo "$ac_t""no" 1>&6
10286 fi
10287 done
10288
10289
10290                         
10291         for ac_func in pthread_kill_other_threads_np
10292 do
10293 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10294 echo "configure:10295: checking for $ac_func" >&5
10295 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10296   echo $ac_n "(cached) $ac_c" 1>&6
10297 else
10298   cat > conftest.$ac_ext <<EOF
10299 #line 10300 "configure"
10300 #include "confdefs.h"
10301 /* System header to define __stub macros and hopefully few prototypes,
10302     which can conflict with char $ac_func(); below.  */
10303 #include <assert.h>
10304 /* Override any gcc2 internal prototype to avoid an error.  */
10305 /* We use char because int might match the return type of a gcc2
10306     builtin and then its argument prototype would still apply.  */
10307 char $ac_func();
10308 char (*f)();
10309
10310 int main() {
10311
10312 /* The GNU C library defines this for functions which it implements
10313     to always fail with ENOSYS.  Some functions are actually named
10314     something starting with __ and the normal name is an alias.  */
10315 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10316 choke me
10317 #else
10318 f = $ac_func;
10319 #endif
10320
10321 ; return 0; }
10322 EOF
10323 if { (eval echo configure:10324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10324   rm -rf conftest*
10325   eval "ac_cv_func_$ac_func=yes"
10326 else
10327   echo "configure: failed program was:" >&5
10328   cat conftest.$ac_ext >&5
10329   rm -rf conftest*
10330   eval "ac_cv_func_$ac_func=no"
10331 fi
10332 rm -f conftest*
10333 fi
10334
10335 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10336   echo "$ac_t""yes" 1>&6
10337     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10338   cat >> confdefs.h <<EOF
10339 #define $ac_tr_func 1
10340 EOF
10341  
10342 else
10343   echo "$ac_t""no" 1>&6
10344 fi
10345 done
10346
10347         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10348 echo "configure:10349: checking for LinuxThreads implementation" >&5
10349 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10350   echo $ac_n "(cached) $ac_c" 1>&6
10351 else
10352   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10353 fi
10354
10355 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10356
10357                         
10358         
10359         
10360         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10361 echo "configure:10362: checking for LinuxThreads consistency" >&5
10362 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10363   echo $ac_n "(cached) $ac_c" 1>&6
10364 else
10365   
10366                 if test $ol_cv_header_linux_threads = yes -a \
10367                         $ol_cv_sys_linux_threads = yes; then
10368                         ol_cv_linux_threads=yes
10369                 elif test $ol_cv_header_linux_threads = no -a \
10370                         $ol_cv_sys_linux_threads = no; then
10371                         ol_cv_linux_threads=no
10372                 else
10373                         ol_cv_linux_threads=error
10374                 fi
10375         
10376 fi
10377
10378 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10379
10380
10381                         if test $ol_cv_linux_threads = error; then
10382                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10383                         fi
10384
10385                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10386 echo "configure:10387: checking if pthread_create() works" >&5
10387 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10388   echo $ac_n "(cached) $ac_c" 1>&6
10389 else
10390   
10391                         if test "$cross_compiling" = yes; then
10392                                 ol_cv_pthread_create_works=yes
10393 else
10394   cat > conftest.$ac_ext <<EOF
10395 #line 10396 "configure"
10396 #include "confdefs.h"
10397 /* pthread test headers */
10398 #include <pthread.h>
10399 #ifndef NULL
10400 #define NULL (void*)0
10401 #endif
10402
10403 static void *task(p)
10404         void *p;
10405 {
10406         return (void *) (p == NULL);
10407 }
10408
10409
10410 int main(argc, argv)
10411         int argc;
10412         char **argv;
10413 {
10414
10415         /* pthread test function */
10416         pthread_t t;
10417         int status;
10418 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10419         /* This system (e.g. AIX) defaults detached; must override */
10420         pthread_attr_t attr;
10421
10422         status = pthread_attr_init(&attr);
10423         if( status ) exit( status );
10424
10425         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10426         if( status ) exit( status );
10427
10428 #define ATTR    &attr
10429 #else
10430 #if HAVE_PTHREADS_D4
10431 #define ATTR    pthread_attr_default
10432 #else
10433 #define ATTR    NULL
10434 #endif
10435 #endif
10436         /* make sure pthread_create() isn't just a stub */
10437         status = pthread_create(&t, ATTR, task, NULL);
10438         if( status ) exit( status );
10439
10440         /* make sure pthread_detach() isn't just a stub */
10441 #if HAVE_PTHREADS_D4
10442         status = pthread_detach( &t );
10443 #else
10444         status = pthread_detach( t );
10445 #endif
10446
10447 #ifdef HAVE_LINUX_THREADS
10448         pthread_kill_other_threads_np();
10449 #endif
10450
10451         exit( status );
10452
10453 }
10454
10455 EOF
10456 if { (eval echo configure:10457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10457 then
10458   ol_cv_pthread_create_works=yes
10459 else
10460   echo "configure: failed program was:" >&5
10461   cat conftest.$ac_ext >&5
10462   rm -fr conftest*
10463   ol_cv_pthread_create_works=no
10464 fi
10465 rm -fr conftest*
10466 fi
10467
10468 fi
10469
10470 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10471
10472                         if test $ol_cv_pthread_create_works = no ; then
10473                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10474                         fi
10475
10476                                                 if test $ol_with_yielding_select = auto ; then
10477                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10478 echo "configure:10479: checking if select yields when using pthreads" >&5
10479 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10480   echo $ac_n "(cached) $ac_c" 1>&6
10481 else
10482   
10483                                 if test "$cross_compiling" = yes; then
10484   ol_cv_pthread_select_yields=cross
10485 else
10486   cat > conftest.$ac_ext <<EOF
10487 #line 10488 "configure"
10488 #include "confdefs.h"
10489
10490 #include <sys/types.h>
10491 #include <sys/time.h>
10492 #include <unistd.h>
10493 #include <pthread.h>
10494 #ifndef NULL
10495 #define NULL (void*) 0
10496 #endif
10497
10498 static int fildes[2];
10499
10500 static void *task(p)
10501         void *p;
10502 {
10503         int i;
10504         struct timeval tv;
10505
10506         fd_set rfds;
10507
10508         tv.tv_sec=10;
10509         tv.tv_usec=0;
10510
10511         FD_ZERO(&rfds);
10512         FD_SET(fildes[0], &rfds);
10513
10514         /* we're not interested in any fds */
10515         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10516
10517         if(i < 0) {
10518                 perror("select");
10519                 exit(10);
10520         }
10521
10522         exit(0); /* if we exit here, the select blocked the whole process */
10523 }
10524
10525 int main(argc, argv)
10526         int argc;
10527         char **argv;
10528 {
10529         pthread_t t;
10530
10531         /* create a pipe to select */
10532         if(pipe(&fildes[0])) {
10533                 perror("select");
10534                 exit(1);
10535         }
10536
10537 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10538         (void) pthread_setconcurrency(2);
10539 #else
10540 #ifdef HAVE_THR_SETCONCURRENCY
10541         /* Set Solaris LWP concurrency to 2 */
10542         thr_setconcurrency(2);
10543 #endif
10544 #endif
10545
10546 #if HAVE_PTHREADS_D4
10547         pthread_create(&t, pthread_attr_default, task, NULL);
10548 #else
10549         pthread_create(&t, NULL, task, NULL);
10550 #endif
10551
10552 #if HAVE_SCHED_YIELD
10553         sched_yield();  /* make sure task runs first */
10554 #else
10555 #ifdef HAVE_PTHREAD_YIELD
10556         pthread_yield();        /* make sure task runs first */
10557 #endif
10558 #endif
10559
10560         exit(2);
10561 }
10562 EOF
10563 if { (eval echo configure:10564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10564 then
10565   ol_cv_pthread_select_yields=no
10566 else
10567   echo "configure: failed program was:" >&5
10568   cat conftest.$ac_ext >&5
10569   rm -fr conftest*
10570   ol_cv_pthread_select_yields=yes
10571 fi
10572 rm -fr conftest*
10573 fi
10574
10575 fi
10576
10577 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10578
10579                                 if test $ol_cv_pthread_select_yields = cross ; then
10580                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10581                                 fi
10582
10583                                 if test $ol_cv_pthread_select_yields = yes ; then
10584                                         ol_with_yielding_select=yes
10585                                 fi
10586                         fi
10587
10588                                                 CPPFLAGS="$save_CPPFLAGS"
10589                         LIBS="$save_LIBS"
10590                 else
10591                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10592                 fi
10593         fi
10594
10595         if test $ol_with_threads = posix ; then
10596                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10597         fi
10598 fi
10599
10600 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10601         -o $ol_with_threads = mach ; then
10602
10603                 for ac_hdr in mach/cthreads.h
10604 do
10605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10607 echo "configure:10608: checking for $ac_hdr" >&5
10608 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10609   echo $ac_n "(cached) $ac_c" 1>&6
10610 else
10611   cat > conftest.$ac_ext <<EOF
10612 #line 10613 "configure"
10613 #include "confdefs.h"
10614 #include <$ac_hdr>
10615 EOF
10616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10617 { (eval echo configure:10618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10619 if test -z "$ac_err"; then
10620   rm -rf conftest*
10621   eval "ac_cv_header_$ac_safe=yes"
10622 else
10623   echo "$ac_err" >&5
10624   echo "configure: failed program was:" >&5
10625   cat conftest.$ac_ext >&5
10626   rm -rf conftest*
10627   eval "ac_cv_header_$ac_safe=no"
10628 fi
10629 rm -f conftest*
10630 fi
10631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10632   echo "$ac_t""yes" 1>&6
10633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10634   cat >> confdefs.h <<EOF
10635 #define $ac_tr_hdr 1
10636 EOF
10637  
10638 else
10639   echo "$ac_t""no" 1>&6
10640 fi
10641 done
10642
10643         if test $ac_cv_header_mach_cthreads_h = yes ; then
10644                 ol_with_threads=found
10645
10646                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10647 echo "configure:10648: checking for cthread_fork" >&5
10648 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10649   echo $ac_n "(cached) $ac_c" 1>&6
10650 else
10651   cat > conftest.$ac_ext <<EOF
10652 #line 10653 "configure"
10653 #include "confdefs.h"
10654 /* System header to define __stub macros and hopefully few prototypes,
10655     which can conflict with char cthread_fork(); below.  */
10656 #include <assert.h>
10657 /* Override any gcc2 internal prototype to avoid an error.  */
10658 /* We use char because int might match the return type of a gcc2
10659     builtin and then its argument prototype would still apply.  */
10660 char cthread_fork();
10661 char (*f)();
10662
10663 int main() {
10664
10665 /* The GNU C library defines this for functions which it implements
10666     to always fail with ENOSYS.  Some functions are actually named
10667     something starting with __ and the normal name is an alias.  */
10668 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10669 choke me
10670 #else
10671 f = cthread_fork;
10672 #endif
10673
10674 ; return 0; }
10675 EOF
10676 if { (eval echo configure:10677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10677   rm -rf conftest*
10678   eval "ac_cv_func_cthread_fork=yes"
10679 else
10680   echo "configure: failed program was:" >&5
10681   cat conftest.$ac_ext >&5
10682   rm -rf conftest*
10683   eval "ac_cv_func_cthread_fork=no"
10684 fi
10685 rm -f conftest*
10686 fi
10687
10688 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10689   echo "$ac_t""yes" 1>&6
10690   ol_link_threads=yes
10691 else
10692   echo "$ac_t""no" 1>&6
10693 fi
10694
10695
10696                 if test $ol_link_threads = no ; then
10697                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10698 echo "configure:10699: checking for cthread_fork with -all_load" >&5
10699 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10700   echo $ac_n "(cached) $ac_c" 1>&6
10701 else
10702   
10703                                                                 save_LIBS="$LIBS"
10704                                 LIBS="-all_load $LIBS"
10705                                 cat > conftest.$ac_ext <<EOF
10706 #line 10707 "configure"
10707 #include "confdefs.h"
10708 #include <mach/cthreads.h>
10709 int main() {
10710
10711                                         cthread_fork((void *)0, (void *)0);
10712                                         
10713 ; return 0; }
10714 EOF
10715 if { (eval echo configure:10716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10716   rm -rf conftest*
10717   ol_cv_cthread_all_load=yes
10718 else
10719   echo "configure: failed program was:" >&5
10720   cat conftest.$ac_ext >&5
10721   rm -rf conftest*
10722   ol_cv_cthread_all_load=no
10723 fi
10724 rm -f conftest*
10725                                                                 LIBS="$save_LIBS"
10726                         
10727 fi
10728
10729 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10730
10731                         if test $ol_cv_cthread_all_load = yes ; then
10732                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10733                                 ol_link_threads=mach
10734                         fi
10735                 fi
10736
10737                 if test $ol_link_threads != no ; then
10738                         : check for cthread specific functionality here
10739                         cat >> confdefs.h <<\EOF
10740 #define HAVE_MACH_CTHREADS 1
10741 EOF
10742
10743                 else
10744                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10745                 fi
10746         fi
10747
10748         if test $ol_with_threads = mach ; then
10749                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10750         fi
10751 fi
10752
10753 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10754         -o $ol_with_threads = pth ; then
10755
10756         for ac_hdr in pth.h
10757 do
10758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10760 echo "configure:10761: checking for $ac_hdr" >&5
10761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10762   echo $ac_n "(cached) $ac_c" 1>&6
10763 else
10764   cat > conftest.$ac_ext <<EOF
10765 #line 10766 "configure"
10766 #include "confdefs.h"
10767 #include <$ac_hdr>
10768 EOF
10769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10770 { (eval echo configure:10771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10772 if test -z "$ac_err"; then
10773   rm -rf conftest*
10774   eval "ac_cv_header_$ac_safe=yes"
10775 else
10776   echo "$ac_err" >&5
10777   echo "configure: failed program was:" >&5
10778   cat conftest.$ac_ext >&5
10779   rm -rf conftest*
10780   eval "ac_cv_header_$ac_safe=no"
10781 fi
10782 rm -f conftest*
10783 fi
10784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10785   echo "$ac_t""yes" 1>&6
10786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10787   cat >> confdefs.h <<EOF
10788 #define $ac_tr_hdr 1
10789 EOF
10790  
10791 else
10792   echo "$ac_t""no" 1>&6
10793 fi
10794 done
10795
10796
10797         if test $ac_cv_header_pth_h = yes ; then
10798                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10799 echo "configure:10800: checking for pth_version in -lpth" >&5
10800 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10801 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10802   echo $ac_n "(cached) $ac_c" 1>&6
10803 else
10804   ac_save_LIBS="$LIBS"
10805 LIBS="-lpth  $LIBS"
10806 cat > conftest.$ac_ext <<EOF
10807 #line 10808 "configure"
10808 #include "confdefs.h"
10809 /* Override any gcc2 internal prototype to avoid an error.  */
10810 /* We use char because int might match the return type of a gcc2
10811     builtin and then its argument prototype would still apply.  */
10812 char pth_version();
10813
10814 int main() {
10815 pth_version()
10816 ; return 0; }
10817 EOF
10818 if { (eval echo configure:10819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10819   rm -rf conftest*
10820   eval "ac_cv_lib_$ac_lib_var=yes"
10821 else
10822   echo "configure: failed program was:" >&5
10823   cat conftest.$ac_ext >&5
10824   rm -rf conftest*
10825   eval "ac_cv_lib_$ac_lib_var=no"
10826 fi
10827 rm -f conftest*
10828 LIBS="$ac_save_LIBS"
10829
10830 fi
10831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10832   echo "$ac_t""yes" 1>&6
10833   have_pth=yes
10834 else
10835   echo "$ac_t""no" 1>&6
10836 have_pth=no
10837 fi
10838
10839
10840                 if test $have_pth = yes ; then
10841                         cat >> confdefs.h <<\EOF
10842 #define HAVE_GNU_PTH 1
10843 EOF
10844
10845                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10846                         ol_link_threads=pth
10847
10848                         if test $ol_with_yielding_select = auto ; then
10849                                 ol_with_yielding_select=yes
10850                         fi
10851                 fi
10852         fi
10853 fi
10854
10855 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10856         -o $ol_with_threads = lwp ; then
10857
10858                 for ac_hdr in thread.h synch.h
10859 do
10860 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10861 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10862 echo "configure:10863: checking for $ac_hdr" >&5
10863 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10864   echo $ac_n "(cached) $ac_c" 1>&6
10865 else
10866   cat > conftest.$ac_ext <<EOF
10867 #line 10868 "configure"
10868 #include "confdefs.h"
10869 #include <$ac_hdr>
10870 EOF
10871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10872 { (eval echo configure:10873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10874 if test -z "$ac_err"; then
10875   rm -rf conftest*
10876   eval "ac_cv_header_$ac_safe=yes"
10877 else
10878   echo "$ac_err" >&5
10879   echo "configure: failed program was:" >&5
10880   cat conftest.$ac_ext >&5
10881   rm -rf conftest*
10882   eval "ac_cv_header_$ac_safe=no"
10883 fi
10884 rm -f conftest*
10885 fi
10886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10887   echo "$ac_t""yes" 1>&6
10888     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10889   cat >> confdefs.h <<EOF
10890 #define $ac_tr_hdr 1
10891 EOF
10892  
10893 else
10894   echo "$ac_t""no" 1>&6
10895 fi
10896 done
10897
10898         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10899                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10900 echo "configure:10901: checking for thr_create in -lthread" >&5
10901 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10902 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10903   echo $ac_n "(cached) $ac_c" 1>&6
10904 else
10905   ac_save_LIBS="$LIBS"
10906 LIBS="-lthread  $LIBS"
10907 cat > conftest.$ac_ext <<EOF
10908 #line 10909 "configure"
10909 #include "confdefs.h"
10910 /* Override any gcc2 internal prototype to avoid an error.  */
10911 /* We use char because int might match the return type of a gcc2
10912     builtin and then its argument prototype would still apply.  */
10913 char thr_create();
10914
10915 int main() {
10916 thr_create()
10917 ; return 0; }
10918 EOF
10919 if { (eval echo configure:10920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10920   rm -rf conftest*
10921   eval "ac_cv_lib_$ac_lib_var=yes"
10922 else
10923   echo "configure: failed program was:" >&5
10924   cat conftest.$ac_ext >&5
10925   rm -rf conftest*
10926   eval "ac_cv_lib_$ac_lib_var=no"
10927 fi
10928 rm -f conftest*
10929 LIBS="$ac_save_LIBS"
10930
10931 fi
10932 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10933   echo "$ac_t""yes" 1>&6
10934   have_thr=yes
10935 else
10936   echo "$ac_t""no" 1>&6
10937 have_thr=no
10938 fi
10939
10940
10941                 if test $have_thr = yes ; then
10942                         cat >> confdefs.h <<\EOF
10943 #define HAVE_THR 1
10944 EOF
10945
10946                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10947                         ol_link_threads=thr
10948
10949                         if test $ol_with_yielding_select = auto ; then
10950                                 ol_with_yielding_select=yes
10951                         fi
10952
10953                                                 for ac_func in \
10954                                 thr_setconcurrency \
10955                                 thr_getconcurrency \
10956                         
10957 do
10958 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10959 echo "configure:10960: checking for $ac_func" >&5
10960 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10961   echo $ac_n "(cached) $ac_c" 1>&6
10962 else
10963   cat > conftest.$ac_ext <<EOF
10964 #line 10965 "configure"
10965 #include "confdefs.h"
10966 /* System header to define __stub macros and hopefully few prototypes,
10967     which can conflict with char $ac_func(); below.  */
10968 #include <assert.h>
10969 /* Override any gcc2 internal prototype to avoid an error.  */
10970 /* We use char because int might match the return type of a gcc2
10971     builtin and then its argument prototype would still apply.  */
10972 char $ac_func();
10973 char (*f)();
10974
10975 int main() {
10976
10977 /* The GNU C library defines this for functions which it implements
10978     to always fail with ENOSYS.  Some functions are actually named
10979     something starting with __ and the normal name is an alias.  */
10980 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10981 choke me
10982 #else
10983 f = $ac_func;
10984 #endif
10985
10986 ; return 0; }
10987 EOF
10988 if { (eval echo configure:10989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10989   rm -rf conftest*
10990   eval "ac_cv_func_$ac_func=yes"
10991 else
10992   echo "configure: failed program was:" >&5
10993   cat conftest.$ac_ext >&5
10994   rm -rf conftest*
10995   eval "ac_cv_func_$ac_func=no"
10996 fi
10997 rm -f conftest*
10998 fi
10999
11000 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11001   echo "$ac_t""yes" 1>&6
11002     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11003   cat >> confdefs.h <<EOF
11004 #define $ac_tr_func 1
11005 EOF
11006  
11007 else
11008   echo "$ac_t""no" 1>&6
11009 fi
11010 done
11011
11012                 fi
11013         fi
11014
11015                 for ac_hdr in lwp/lwp.h
11016 do
11017 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11018 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11019 echo "configure:11020: checking for $ac_hdr" >&5
11020 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11021   echo $ac_n "(cached) $ac_c" 1>&6
11022 else
11023   cat > conftest.$ac_ext <<EOF
11024 #line 11025 "configure"
11025 #include "confdefs.h"
11026 #include <$ac_hdr>
11027 EOF
11028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11029 { (eval echo configure:11030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11031 if test -z "$ac_err"; then
11032   rm -rf conftest*
11033   eval "ac_cv_header_$ac_safe=yes"
11034 else
11035   echo "$ac_err" >&5
11036   echo "configure: failed program was:" >&5
11037   cat conftest.$ac_ext >&5
11038   rm -rf conftest*
11039   eval "ac_cv_header_$ac_safe=no"
11040 fi
11041 rm -f conftest*
11042 fi
11043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11044   echo "$ac_t""yes" 1>&6
11045     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11046   cat >> confdefs.h <<EOF
11047 #define $ac_tr_hdr 1
11048 EOF
11049  
11050 else
11051   echo "$ac_t""no" 1>&6
11052 fi
11053 done
11054
11055         if test $ac_cv_header_lwp_lwp_h = yes ; then
11056                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11057 echo "configure:11058: checking for lwp_create in -llwp" >&5
11058 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11059 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11060   echo $ac_n "(cached) $ac_c" 1>&6
11061 else
11062   ac_save_LIBS="$LIBS"
11063 LIBS="-llwp  $LIBS"
11064 cat > conftest.$ac_ext <<EOF
11065 #line 11066 "configure"
11066 #include "confdefs.h"
11067 /* Override any gcc2 internal prototype to avoid an error.  */
11068 /* We use char because int might match the return type of a gcc2
11069     builtin and then its argument prototype would still apply.  */
11070 char lwp_create();
11071
11072 int main() {
11073 lwp_create()
11074 ; return 0; }
11075 EOF
11076 if { (eval echo configure:11077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11077   rm -rf conftest*
11078   eval "ac_cv_lib_$ac_lib_var=yes"
11079 else
11080   echo "configure: failed program was:" >&5
11081   cat conftest.$ac_ext >&5
11082   rm -rf conftest*
11083   eval "ac_cv_lib_$ac_lib_var=no"
11084 fi
11085 rm -f conftest*
11086 LIBS="$ac_save_LIBS"
11087
11088 fi
11089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11090   echo "$ac_t""yes" 1>&6
11091   have_lwp=yes
11092 else
11093   echo "$ac_t""no" 1>&6
11094 have_lwp=no
11095 fi
11096
11097
11098                 if test $have_lwp = yes ; then
11099                         cat >> confdefs.h <<\EOF
11100 #define HAVE_LWP 1
11101 EOF
11102
11103                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11104                         ol_link_threads=lwp
11105
11106                         if test $ol_with_yielding_select = auto ; then
11107                                 ol_with_yielding_select=no
11108                         fi
11109                 fi
11110         fi
11111 fi
11112
11113 if test $ol_with_yielding_select = yes ; then
11114         cat >> confdefs.h <<\EOF
11115 #define HAVE_YIELDING_SELECT 1
11116 EOF
11117
11118 fi
11119
11120 if test $ol_with_threads = manual ; then
11121                 ol_link_threads=yes
11122
11123         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11124
11125         for ac_hdr in pthread.h sched.h
11126 do
11127 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11128 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11129 echo "configure:11130: checking for $ac_hdr" >&5
11130 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11131   echo $ac_n "(cached) $ac_c" 1>&6
11132 else
11133   cat > conftest.$ac_ext <<EOF
11134 #line 11135 "configure"
11135 #include "confdefs.h"
11136 #include <$ac_hdr>
11137 EOF
11138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11139 { (eval echo configure:11140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11141 if test -z "$ac_err"; then
11142   rm -rf conftest*
11143   eval "ac_cv_header_$ac_safe=yes"
11144 else
11145   echo "$ac_err" >&5
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148   rm -rf conftest*
11149   eval "ac_cv_header_$ac_safe=no"
11150 fi
11151 rm -f conftest*
11152 fi
11153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11154   echo "$ac_t""yes" 1>&6
11155     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11156   cat >> confdefs.h <<EOF
11157 #define $ac_tr_hdr 1
11158 EOF
11159  
11160 else
11161   echo "$ac_t""no" 1>&6
11162 fi
11163 done
11164
11165         for ac_func in sched_yield pthread_yield
11166 do
11167 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11168 echo "configure:11169: checking for $ac_func" >&5
11169 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11170   echo $ac_n "(cached) $ac_c" 1>&6
11171 else
11172   cat > conftest.$ac_ext <<EOF
11173 #line 11174 "configure"
11174 #include "confdefs.h"
11175 /* System header to define __stub macros and hopefully few prototypes,
11176     which can conflict with char $ac_func(); below.  */
11177 #include <assert.h>
11178 /* Override any gcc2 internal prototype to avoid an error.  */
11179 /* We use char because int might match the return type of a gcc2
11180     builtin and then its argument prototype would still apply.  */
11181 char $ac_func();
11182 char (*f)();
11183
11184 int main() {
11185
11186 /* The GNU C library defines this for functions which it implements
11187     to always fail with ENOSYS.  Some functions are actually named
11188     something starting with __ and the normal name is an alias.  */
11189 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11190 choke me
11191 #else
11192 f = $ac_func;
11193 #endif
11194
11195 ; return 0; }
11196 EOF
11197 if { (eval echo configure:11198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11198   rm -rf conftest*
11199   eval "ac_cv_func_$ac_func=yes"
11200 else
11201   echo "configure: failed program was:" >&5
11202   cat conftest.$ac_ext >&5
11203   rm -rf conftest*
11204   eval "ac_cv_func_$ac_func=no"
11205 fi
11206 rm -f conftest*
11207 fi
11208
11209 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11210   echo "$ac_t""yes" 1>&6
11211     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11212   cat >> confdefs.h <<EOF
11213 #define $ac_tr_func 1
11214 EOF
11215  
11216 else
11217   echo "$ac_t""no" 1>&6
11218 fi
11219 done
11220
11221         
11222         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11223 echo "configure:11224: checking for LinuxThreads pthread.h" >&5
11224 if eval "test \"\${ol_cv_header_linux_threads+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 <pthread.h>
11231 EOF
11232 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11233   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11234   rm -rf conftest*
11235   ol_cv_header_linux_threads=yes
11236 else
11237   rm -rf conftest*
11238   ol_cv_header_linux_threads=no
11239 fi
11240 rm -f conftest*
11241
11242                 
11243 fi
11244
11245 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11246         if test $ol_cv_header_linux_threads = yes; then
11247                 cat >> confdefs.h <<\EOF
11248 #define HAVE_LINUX_THREADS 1
11249 EOF
11250
11251         fi
11252
11253
11254         for ac_hdr in mach/cthreads.h
11255 do
11256 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11257 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11258 echo "configure:11259: checking for $ac_hdr" >&5
11259 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11260   echo $ac_n "(cached) $ac_c" 1>&6
11261 else
11262   cat > conftest.$ac_ext <<EOF
11263 #line 11264 "configure"
11264 #include "confdefs.h"
11265 #include <$ac_hdr>
11266 EOF
11267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11268 { (eval echo configure:11269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11270 if test -z "$ac_err"; then
11271   rm -rf conftest*
11272   eval "ac_cv_header_$ac_safe=yes"
11273 else
11274   echo "$ac_err" >&5
11275   echo "configure: failed program was:" >&5
11276   cat conftest.$ac_ext >&5
11277   rm -rf conftest*
11278   eval "ac_cv_header_$ac_safe=no"
11279 fi
11280 rm -f conftest*
11281 fi
11282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11283   echo "$ac_t""yes" 1>&6
11284     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11285   cat >> confdefs.h <<EOF
11286 #define $ac_tr_hdr 1
11287 EOF
11288  
11289 else
11290   echo "$ac_t""no" 1>&6
11291 fi
11292 done
11293
11294         for ac_hdr in lwp/lwp.h
11295 do
11296 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11297 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11298 echo "configure:11299: checking for $ac_hdr" >&5
11299 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11300   echo $ac_n "(cached) $ac_c" 1>&6
11301 else
11302   cat > conftest.$ac_ext <<EOF
11303 #line 11304 "configure"
11304 #include "confdefs.h"
11305 #include <$ac_hdr>
11306 EOF
11307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11308 { (eval echo configure:11309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11310 if test -z "$ac_err"; then
11311   rm -rf conftest*
11312   eval "ac_cv_header_$ac_safe=yes"
11313 else
11314   echo "$ac_err" >&5
11315   echo "configure: failed program was:" >&5
11316   cat conftest.$ac_ext >&5
11317   rm -rf conftest*
11318   eval "ac_cv_header_$ac_safe=no"
11319 fi
11320 rm -f conftest*
11321 fi
11322 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11323   echo "$ac_t""yes" 1>&6
11324     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11325   cat >> confdefs.h <<EOF
11326 #define $ac_tr_hdr 1
11327 EOF
11328  
11329 else
11330   echo "$ac_t""no" 1>&6
11331 fi
11332 done
11333
11334         for ac_hdr in thread.h synch.h
11335 do
11336 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11337 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11338 echo "configure:11339: checking for $ac_hdr" >&5
11339 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11340   echo $ac_n "(cached) $ac_c" 1>&6
11341 else
11342   cat > conftest.$ac_ext <<EOF
11343 #line 11344 "configure"
11344 #include "confdefs.h"
11345 #include <$ac_hdr>
11346 EOF
11347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11348 { (eval echo configure:11349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11350 if test -z "$ac_err"; then
11351   rm -rf conftest*
11352   eval "ac_cv_header_$ac_safe=yes"
11353 else
11354   echo "$ac_err" >&5
11355   echo "configure: failed program was:" >&5
11356   cat conftest.$ac_ext >&5
11357   rm -rf conftest*
11358   eval "ac_cv_header_$ac_safe=no"
11359 fi
11360 rm -f conftest*
11361 fi
11362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11363   echo "$ac_t""yes" 1>&6
11364     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11365   cat >> confdefs.h <<EOF
11366 #define $ac_tr_hdr 1
11367 EOF
11368  
11369 else
11370   echo "$ac_t""no" 1>&6
11371 fi
11372 done
11373
11374 fi
11375
11376 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11377                         cat >> confdefs.h <<\EOF
11378 #define REENTRANT 1
11379 EOF
11380
11381         cat >> confdefs.h <<\EOF
11382 #define _REENTRANT 1
11383 EOF
11384
11385         cat >> confdefs.h <<\EOF
11386 #define THREAD_SAFE 1
11387 EOF
11388
11389         cat >> confdefs.h <<\EOF
11390 #define _THREAD_SAFE 1
11391 EOF
11392
11393         cat >> confdefs.h <<\EOF
11394 #define THREADSAFE 1
11395 EOF
11396
11397         cat >> confdefs.h <<\EOF
11398 #define _THREADSAFE 1
11399 EOF
11400
11401         cat >> confdefs.h <<\EOF
11402 #define _SGI_MP_SOURCE 1
11403 EOF
11404
11405
11406                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11407 echo "configure:11408: checking for thread specific errno" >&5
11408 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11409   echo $ac_n "(cached) $ac_c" 1>&6
11410 else
11411   
11412                 cat > conftest.$ac_ext <<EOF
11413 #line 11414 "configure"
11414 #include "confdefs.h"
11415 #include <errno.h>
11416 int main() {
11417 errno = 0;
11418 ; return 0; }
11419 EOF
11420 if { (eval echo configure:11421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11421   rm -rf conftest*
11422   ol_cv_errno_thread_specific=yes
11423 else
11424   echo "configure: failed program was:" >&5
11425   cat conftest.$ac_ext >&5
11426   rm -rf conftest*
11427   ol_cv_errno_thread_specific=no
11428 fi
11429 rm -f conftest*
11430         
11431 fi
11432
11433 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11434
11435                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11436 echo "configure:11437: checking for thread specific h_errno" >&5
11437 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11438   echo $ac_n "(cached) $ac_c" 1>&6
11439 else
11440   
11441                 cat > conftest.$ac_ext <<EOF
11442 #line 11443 "configure"
11443 #include "confdefs.h"
11444 #include <netdb.h>
11445 int main() {
11446 h_errno = 0;
11447 ; return 0; }
11448 EOF
11449 if { (eval echo configure:11450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11450   rm -rf conftest*
11451   ol_cv_h_errno_thread_specific=yes
11452 else
11453   echo "configure: failed program was:" >&5
11454   cat conftest.$ac_ext >&5
11455   rm -rf conftest*
11456   ol_cv_h_errno_thread_specific=no
11457 fi
11458 rm -f conftest*
11459         
11460 fi
11461
11462 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11463
11464         if test $ol_cv_errno_thread_specific != yes \
11465                 -o $ol_cv_h_errno_thread_specific != yes ; then
11466                 LIBS="$LTHREAD_LIBS $LIBS"
11467                 LTHREAD_LIBS=""
11468         fi
11469
11470 fi  
11471
11472 if test $ol_link_threads = no ; then
11473         if test $ol_with_threads = yes ; then
11474                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11475         fi
11476
11477         if test $ol_with_threads = auto ; then
11478                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11479                 ol_with_threads=no
11480         fi
11481
11482         cat >> confdefs.h <<\EOF
11483 #define NO_THREADS 1
11484 EOF
11485
11486         LTHREAD_LIBS=""
11487 fi
11488
11489 if test $ol_link_threads != no ; then
11490         cat >> confdefs.h <<\EOF
11491 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11492 EOF
11493
11494 fi
11495
11496 ol_link_ldbm=no 
11497
11498 if test $ol_with_ldbm_api = auto \
11499         -o $ol_with_ldbm_api = berkeley \
11500         -o $ol_with_ldbm_api = bcompat ; then
11501
11502         if test $ol_with_ldbm_api = bcompat; then \
11503                 ol_cv_berkeley_db=no
11504 for ac_hdr in db_185.h db.h
11505 do
11506 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11507 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11508 echo "configure:11509: checking for $ac_hdr" >&5
11509 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11510   echo $ac_n "(cached) $ac_c" 1>&6
11511 else
11512   cat > conftest.$ac_ext <<EOF
11513 #line 11514 "configure"
11514 #include "confdefs.h"
11515 #include <$ac_hdr>
11516 EOF
11517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11518 { (eval echo configure:11519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11520 if test -z "$ac_err"; then
11521   rm -rf conftest*
11522   eval "ac_cv_header_$ac_safe=yes"
11523 else
11524   echo "$ac_err" >&5
11525   echo "configure: failed program was:" >&5
11526   cat conftest.$ac_ext >&5
11527   rm -rf conftest*
11528   eval "ac_cv_header_$ac_safe=no"
11529 fi
11530 rm -f conftest*
11531 fi
11532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11533   echo "$ac_t""yes" 1>&6
11534     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11535   cat >> confdefs.h <<EOF
11536 #define $ac_tr_hdr 1
11537 EOF
11538  
11539 else
11540   echo "$ac_t""no" 1>&6
11541 fi
11542 done
11543
11544 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11545         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11546 echo "configure:11547: checking if Berkeley DB header compatibility" >&5
11547 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11548   echo $ac_n "(cached) $ac_c" 1>&6
11549 else
11550   
11551                 cat > conftest.$ac_ext <<EOF
11552 #line 11553 "configure"
11553 #include "confdefs.h"
11554
11555 #if HAVE_DB_185_H
11556 #       include <db_185.h>
11557 #else
11558 #       include <db.h>
11559 #endif
11560
11561  /* this check could be improved */
11562 #ifndef DB_VERSION_MAJOR
11563 #       define DB_VERSION_MAJOR 1
11564 #endif
11565
11566 #if DB_VERSION_MAJOR == 1 
11567         __db_version_1
11568 #endif
11569
11570 EOF
11571 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11572   egrep "__db_version_1" >/dev/null 2>&1; then
11573   rm -rf conftest*
11574   ol_cv_header_db1=yes
11575 else
11576   rm -rf conftest*
11577   ol_cv_header_db1=no
11578 fi
11579 rm -f conftest*
11580
11581 fi
11582
11583 echo "$ac_t""$ol_cv_header_db1" 1>&6
11584
11585         if test ol_cv_header_db1=yes ; then
11586                 ol_cv_lib_db=no
11587 if test $ol_cv_lib_db = no ; then
11588         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11589 echo "configure:11590: checking for Berkeley DB link (default)" >&5
11590 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11591   echo $ac_n "(cached) $ac_c" 1>&6
11592 else
11593   
11594         ol_DB_LIB=
11595         ol_LIBS=$LIBS
11596         LIBS="$ol_DB_LIB $LIBS"
11597
11598         cat > conftest.$ac_ext <<EOF
11599 #line 11600 "configure"
11600 #include "confdefs.h"
11601
11602 #ifdef HAVE_DB_185_H
11603 # include <db_185.h>
11604 #else
11605 # include <db.h>
11606 #endif
11607
11608 #ifndef DB_VERSION_MAJOR
11609 # define DB_VERSION_MAJOR 1
11610 #endif
11611
11612 #ifndef NULL
11613 #define NULL ((void*)0)
11614 #endif
11615
11616 int main() {
11617
11618 #if DB_VERSION_MAJOR > 2
11619         db_env_create( NULL, 0 );
11620 #elif DB_VERSION_MAJOR > 1
11621         db_appexit( NULL );
11622 #else
11623         (void) dbopen( NULL, 0, 0, 0, NULL);
11624 #endif
11625
11626 ; return 0; }
11627 EOF
11628 if { (eval echo configure:11629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11629   rm -rf conftest*
11630   ol_cv_db_none=yes
11631 else
11632   echo "configure: failed program was:" >&5
11633   cat conftest.$ac_ext >&5
11634   rm -rf conftest*
11635   ol_cv_db_none=no
11636 fi
11637 rm -f conftest*
11638
11639         LIBS="$ol_LIBS"
11640
11641 fi
11642
11643 echo "$ac_t""$ol_cv_db_none" 1>&6
11644
11645         if test $ol_cv_db_none = yes ; then
11646                 ol_cv_lib_db=yes
11647         fi
11648 fi
11649
11650 if test $ol_cv_lib_db = no ; then
11651         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11652 echo "configure:11653: checking for Berkeley DB link (-ldb)" >&5
11653 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11654   echo $ac_n "(cached) $ac_c" 1>&6
11655 else
11656   
11657         ol_DB_LIB=-ldb
11658         ol_LIBS=$LIBS
11659         LIBS="$ol_DB_LIB $LIBS"
11660
11661         cat > conftest.$ac_ext <<EOF
11662 #line 11663 "configure"
11663 #include "confdefs.h"
11664
11665 #ifdef HAVE_DB_185_H
11666 # include <db_185.h>
11667 #else
11668 # include <db.h>
11669 #endif
11670
11671 #ifndef DB_VERSION_MAJOR
11672 # define DB_VERSION_MAJOR 1
11673 #endif
11674
11675 #ifndef NULL
11676 #define NULL ((void*)0)
11677 #endif
11678
11679 int main() {
11680
11681 #if DB_VERSION_MAJOR > 2
11682         db_env_create( NULL, 0 );
11683 #elif DB_VERSION_MAJOR > 1
11684         db_appexit( NULL );
11685 #else
11686         (void) dbopen( NULL, 0, 0, 0, NULL);
11687 #endif
11688
11689 ; return 0; }
11690 EOF
11691 if { (eval echo configure:11692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11692   rm -rf conftest*
11693   ol_cv_db_db=yes
11694 else
11695   echo "configure: failed program was:" >&5
11696   cat conftest.$ac_ext >&5
11697   rm -rf conftest*
11698   ol_cv_db_db=no
11699 fi
11700 rm -f conftest*
11701
11702         LIBS="$ol_LIBS"
11703
11704 fi
11705
11706 echo "$ac_t""$ol_cv_db_db" 1>&6
11707
11708         if test $ol_cv_db_db = yes ; then
11709                 ol_cv_lib_db=-ldb
11710         fi
11711 fi
11712
11713 if test $ol_cv_lib_db = no ; then
11714         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11715 echo "configure:11716: checking for Berkeley DB link (-ldb3)" >&5
11716 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11717   echo $ac_n "(cached) $ac_c" 1>&6
11718 else
11719   
11720         ol_DB_LIB=-ldb3
11721         ol_LIBS=$LIBS
11722         LIBS="$ol_DB_LIB $LIBS"
11723
11724         cat > conftest.$ac_ext <<EOF
11725 #line 11726 "configure"
11726 #include "confdefs.h"
11727
11728 #ifdef HAVE_DB_185_H
11729 # include <db_185.h>
11730 #else
11731 # include <db.h>
11732 #endif
11733
11734 #ifndef DB_VERSION_MAJOR
11735 # define DB_VERSION_MAJOR 1
11736 #endif
11737
11738 #ifndef NULL
11739 #define NULL ((void*)0)
11740 #endif
11741
11742 int main() {
11743
11744 #if DB_VERSION_MAJOR > 2
11745         db_env_create( NULL, 0 );
11746 #elif DB_VERSION_MAJOR > 1
11747         db_appexit( NULL );
11748 #else
11749         (void) dbopen( NULL, 0, 0, 0, NULL);
11750 #endif
11751
11752 ; return 0; }
11753 EOF
11754 if { (eval echo configure:11755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11755   rm -rf conftest*
11756   ol_cv_db_db3=yes
11757 else
11758   echo "configure: failed program was:" >&5
11759   cat conftest.$ac_ext >&5
11760   rm -rf conftest*
11761   ol_cv_db_db3=no
11762 fi
11763 rm -f conftest*
11764
11765         LIBS="$ol_LIBS"
11766
11767 fi
11768
11769 echo "$ac_t""$ol_cv_db_db3" 1>&6
11770
11771         if test $ol_cv_db_db3 = yes ; then
11772                 ol_cv_lib_db=-ldb3
11773         fi
11774 fi
11775
11776 if test $ol_cv_lib_db = no ; then
11777         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11778 echo "configure:11779: checking for Berkeley DB link (-ldb2)" >&5
11779 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11780   echo $ac_n "(cached) $ac_c" 1>&6
11781 else
11782   
11783         ol_DB_LIB=-ldb2
11784         ol_LIBS=$LIBS
11785         LIBS="$ol_DB_LIB $LIBS"
11786
11787         cat > conftest.$ac_ext <<EOF
11788 #line 11789 "configure"
11789 #include "confdefs.h"
11790
11791 #ifdef HAVE_DB_185_H
11792 # include <db_185.h>
11793 #else
11794 # include <db.h>
11795 #endif
11796
11797 #ifndef DB_VERSION_MAJOR
11798 # define DB_VERSION_MAJOR 1
11799 #endif
11800
11801 #ifndef NULL
11802 #define NULL ((void*)0)
11803 #endif
11804
11805 int main() {
11806
11807 #if DB_VERSION_MAJOR > 2
11808         db_env_create( NULL, 0 );
11809 #elif DB_VERSION_MAJOR > 1
11810         db_appexit( NULL );
11811 #else
11812         (void) dbopen( NULL, 0, 0, 0, NULL);
11813 #endif
11814
11815 ; return 0; }
11816 EOF
11817 if { (eval echo configure:11818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11818   rm -rf conftest*
11819   ol_cv_db_db2=yes
11820 else
11821   echo "configure: failed program was:" >&5
11822   cat conftest.$ac_ext >&5
11823   rm -rf conftest*
11824   ol_cv_db_db2=no
11825 fi
11826 rm -f conftest*
11827
11828         LIBS="$ol_LIBS"
11829
11830 fi
11831
11832 echo "$ac_t""$ol_cv_db_db2" 1>&6
11833
11834         if test $ol_cv_db_db2 = yes ; then
11835                 ol_cv_lib_db=-ldb2
11836         fi
11837 fi
11838
11839 if test $ol_cv_lib_db = no ; then
11840         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11841 echo "configure:11842: checking for Berkeley DB link (-ldb1)" >&5
11842 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11843   echo $ac_n "(cached) $ac_c" 1>&6
11844 else
11845   
11846         ol_DB_LIB=-ldb1
11847         ol_LIBS=$LIBS
11848         LIBS="$ol_DB_LIB $LIBS"
11849
11850         cat > conftest.$ac_ext <<EOF
11851 #line 11852 "configure"
11852 #include "confdefs.h"
11853
11854 #ifdef HAVE_DB_185_H
11855 # include <db_185.h>
11856 #else
11857 # include <db.h>
11858 #endif
11859
11860 #ifndef DB_VERSION_MAJOR
11861 # define DB_VERSION_MAJOR 1
11862 #endif
11863
11864 #ifndef NULL
11865 #define NULL ((void*)0)
11866 #endif
11867
11868 int main() {
11869
11870 #if DB_VERSION_MAJOR > 2
11871         db_env_create( NULL, 0 );
11872 #elif DB_VERSION_MAJOR > 1
11873         db_appexit( NULL );
11874 #else
11875         (void) dbopen( NULL, 0, 0, 0, NULL);
11876 #endif
11877
11878 ; return 0; }
11879 EOF
11880 if { (eval echo configure:11881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11881   rm -rf conftest*
11882   ol_cv_db_db1=yes
11883 else
11884   echo "configure: failed program was:" >&5
11885   cat conftest.$ac_ext >&5
11886   rm -rf conftest*
11887   ol_cv_db_db1=no
11888 fi
11889 rm -f conftest*
11890
11891         LIBS="$ol_LIBS"
11892
11893 fi
11894
11895 echo "$ac_t""$ol_cv_db_db1" 1>&6
11896
11897         if test $ol_cv_db_db1 = yes ; then
11898                 ol_cv_lib_db=-ldb1
11899         fi
11900 fi
11901
11902
11903                 if test "$ol_cv_lib_db" != no ; then
11904                         ol_cv_berkeley_db=yes
11905                 fi
11906         fi
11907 fi
11908
11909         else
11910                 ol_cv_berkeley_db=no
11911 for ac_hdr in db.h
11912 do
11913 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11914 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11915 echo "configure:11916: checking for $ac_hdr" >&5
11916 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11917   echo $ac_n "(cached) $ac_c" 1>&6
11918 else
11919   cat > conftest.$ac_ext <<EOF
11920 #line 11921 "configure"
11921 #include "confdefs.h"
11922 #include <$ac_hdr>
11923 EOF
11924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11925 { (eval echo configure:11926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11927 if test -z "$ac_err"; then
11928   rm -rf conftest*
11929   eval "ac_cv_header_$ac_safe=yes"
11930 else
11931   echo "$ac_err" >&5
11932   echo "configure: failed program was:" >&5
11933   cat conftest.$ac_ext >&5
11934   rm -rf conftest*
11935   eval "ac_cv_header_$ac_safe=no"
11936 fi
11937 rm -f conftest*
11938 fi
11939 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11940   echo "$ac_t""yes" 1>&6
11941     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11942   cat >> confdefs.h <<EOF
11943 #define $ac_tr_hdr 1
11944 EOF
11945  
11946 else
11947   echo "$ac_t""no" 1>&6
11948 fi
11949 done
11950
11951 if test $ac_cv_header_db_h = yes; then
11952         ol_cv_lib_db=no
11953 if test $ol_cv_lib_db = no ; then
11954         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11955 echo "configure:11956: checking for Berkeley DB link (default)" >&5
11956 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11957   echo $ac_n "(cached) $ac_c" 1>&6
11958 else
11959   
11960         ol_DB_LIB=
11961         ol_LIBS=$LIBS
11962         LIBS="$ol_DB_LIB $LIBS"
11963
11964         cat > conftest.$ac_ext <<EOF
11965 #line 11966 "configure"
11966 #include "confdefs.h"
11967
11968 #ifdef HAVE_DB_185_H
11969 # include <db_185.h>
11970 #else
11971 # include <db.h>
11972 #endif
11973
11974 #ifndef DB_VERSION_MAJOR
11975 # define DB_VERSION_MAJOR 1
11976 #endif
11977
11978 #ifndef NULL
11979 #define NULL ((void*)0)
11980 #endif
11981
11982 int main() {
11983
11984 #if DB_VERSION_MAJOR > 2
11985         db_env_create( NULL, 0 );
11986 #elif DB_VERSION_MAJOR > 1
11987         db_appexit( NULL );
11988 #else
11989         (void) dbopen( NULL, 0, 0, 0, NULL);
11990 #endif
11991
11992 ; return 0; }
11993 EOF
11994 if { (eval echo configure:11995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11995   rm -rf conftest*
11996   ol_cv_db_none=yes
11997 else
11998   echo "configure: failed program was:" >&5
11999   cat conftest.$ac_ext >&5
12000   rm -rf conftest*
12001   ol_cv_db_none=no
12002 fi
12003 rm -f conftest*
12004
12005         LIBS="$ol_LIBS"
12006
12007 fi
12008
12009 echo "$ac_t""$ol_cv_db_none" 1>&6
12010
12011         if test $ol_cv_db_none = yes ; then
12012                 ol_cv_lib_db=yes
12013         fi
12014 fi
12015
12016 if test $ol_cv_lib_db = no ; then
12017         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12018 echo "configure:12019: checking for Berkeley DB link (-ldb)" >&5
12019 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12020   echo $ac_n "(cached) $ac_c" 1>&6
12021 else
12022   
12023         ol_DB_LIB=-ldb
12024         ol_LIBS=$LIBS
12025         LIBS="$ol_DB_LIB $LIBS"
12026
12027         cat > conftest.$ac_ext <<EOF
12028 #line 12029 "configure"
12029 #include "confdefs.h"
12030
12031 #ifdef HAVE_DB_185_H
12032 # include <db_185.h>
12033 #else
12034 # include <db.h>
12035 #endif
12036
12037 #ifndef DB_VERSION_MAJOR
12038 # define DB_VERSION_MAJOR 1
12039 #endif
12040
12041 #ifndef NULL
12042 #define NULL ((void*)0)
12043 #endif
12044
12045 int main() {
12046
12047 #if DB_VERSION_MAJOR > 2
12048         db_env_create( NULL, 0 );
12049 #elif DB_VERSION_MAJOR > 1
12050         db_appexit( NULL );
12051 #else
12052         (void) dbopen( NULL, 0, 0, 0, NULL);
12053 #endif
12054
12055 ; return 0; }
12056 EOF
12057 if { (eval echo configure:12058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12058   rm -rf conftest*
12059   ol_cv_db_db=yes
12060 else
12061   echo "configure: failed program was:" >&5
12062   cat conftest.$ac_ext >&5
12063   rm -rf conftest*
12064   ol_cv_db_db=no
12065 fi
12066 rm -f conftest*
12067
12068         LIBS="$ol_LIBS"
12069
12070 fi
12071
12072 echo "$ac_t""$ol_cv_db_db" 1>&6
12073
12074         if test $ol_cv_db_db = yes ; then
12075                 ol_cv_lib_db=-ldb
12076         fi
12077 fi
12078
12079 if test $ol_cv_lib_db = no ; then
12080         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12081 echo "configure:12082: checking for Berkeley DB link (-ldb3)" >&5
12082 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12083   echo $ac_n "(cached) $ac_c" 1>&6
12084 else
12085   
12086         ol_DB_LIB=-ldb3
12087         ol_LIBS=$LIBS
12088         LIBS="$ol_DB_LIB $LIBS"
12089
12090         cat > conftest.$ac_ext <<EOF
12091 #line 12092 "configure"
12092 #include "confdefs.h"
12093
12094 #ifdef HAVE_DB_185_H
12095 # include <db_185.h>
12096 #else
12097 # include <db.h>
12098 #endif
12099
12100 #ifndef DB_VERSION_MAJOR
12101 # define DB_VERSION_MAJOR 1
12102 #endif
12103
12104 #ifndef NULL
12105 #define NULL ((void*)0)
12106 #endif
12107
12108 int main() {
12109
12110 #if DB_VERSION_MAJOR > 2
12111         db_env_create( NULL, 0 );
12112 #elif DB_VERSION_MAJOR > 1
12113         db_appexit( NULL );
12114 #else
12115         (void) dbopen( NULL, 0, 0, 0, NULL);
12116 #endif
12117
12118 ; return 0; }
12119 EOF
12120 if { (eval echo configure:12121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12121   rm -rf conftest*
12122   ol_cv_db_db3=yes
12123 else
12124   echo "configure: failed program was:" >&5
12125   cat conftest.$ac_ext >&5
12126   rm -rf conftest*
12127   ol_cv_db_db3=no
12128 fi
12129 rm -f conftest*
12130
12131         LIBS="$ol_LIBS"
12132
12133 fi
12134
12135 echo "$ac_t""$ol_cv_db_db3" 1>&6
12136
12137         if test $ol_cv_db_db3 = yes ; then
12138                 ol_cv_lib_db=-ldb3
12139         fi
12140 fi
12141
12142 if test $ol_cv_lib_db = no ; then
12143         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12144 echo "configure:12145: checking for Berkeley DB link (-ldb2)" >&5
12145 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12146   echo $ac_n "(cached) $ac_c" 1>&6
12147 else
12148   
12149         ol_DB_LIB=-ldb2
12150         ol_LIBS=$LIBS
12151         LIBS="$ol_DB_LIB $LIBS"
12152
12153         cat > conftest.$ac_ext <<EOF
12154 #line 12155 "configure"
12155 #include "confdefs.h"
12156
12157 #ifdef HAVE_DB_185_H
12158 # include <db_185.h>
12159 #else
12160 # include <db.h>
12161 #endif
12162
12163 #ifndef DB_VERSION_MAJOR
12164 # define DB_VERSION_MAJOR 1
12165 #endif
12166
12167 #ifndef NULL
12168 #define NULL ((void*)0)
12169 #endif
12170
12171 int main() {
12172
12173 #if DB_VERSION_MAJOR > 2
12174         db_env_create( NULL, 0 );
12175 #elif DB_VERSION_MAJOR > 1
12176         db_appexit( NULL );
12177 #else
12178         (void) dbopen( NULL, 0, 0, 0, NULL);
12179 #endif
12180
12181 ; return 0; }
12182 EOF
12183 if { (eval echo configure:12184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12184   rm -rf conftest*
12185   ol_cv_db_db2=yes
12186 else
12187   echo "configure: failed program was:" >&5
12188   cat conftest.$ac_ext >&5
12189   rm -rf conftest*
12190   ol_cv_db_db2=no
12191 fi
12192 rm -f conftest*
12193
12194         LIBS="$ol_LIBS"
12195
12196 fi
12197
12198 echo "$ac_t""$ol_cv_db_db2" 1>&6
12199
12200         if test $ol_cv_db_db2 = yes ; then
12201                 ol_cv_lib_db=-ldb2
12202         fi
12203 fi
12204
12205 if test $ol_cv_lib_db = no ; then
12206         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12207 echo "configure:12208: checking for Berkeley DB link (-ldb1)" >&5
12208 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12209   echo $ac_n "(cached) $ac_c" 1>&6
12210 else
12211   
12212         ol_DB_LIB=-ldb1
12213         ol_LIBS=$LIBS
12214         LIBS="$ol_DB_LIB $LIBS"
12215
12216         cat > conftest.$ac_ext <<EOF
12217 #line 12218 "configure"
12218 #include "confdefs.h"
12219
12220 #ifdef HAVE_DB_185_H
12221 # include <db_185.h>
12222 #else
12223 # include <db.h>
12224 #endif
12225
12226 #ifndef DB_VERSION_MAJOR
12227 # define DB_VERSION_MAJOR 1
12228 #endif
12229
12230 #ifndef NULL
12231 #define NULL ((void*)0)
12232 #endif
12233
12234 int main() {
12235
12236 #if DB_VERSION_MAJOR > 2
12237         db_env_create( NULL, 0 );
12238 #elif DB_VERSION_MAJOR > 1
12239         db_appexit( NULL );
12240 #else
12241         (void) dbopen( NULL, 0, 0, 0, NULL);
12242 #endif
12243
12244 ; return 0; }
12245 EOF
12246 if { (eval echo configure:12247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12247   rm -rf conftest*
12248   ol_cv_db_db1=yes
12249 else
12250   echo "configure: failed program was:" >&5
12251   cat conftest.$ac_ext >&5
12252   rm -rf conftest*
12253   ol_cv_db_db1=no
12254 fi
12255 rm -f conftest*
12256
12257         LIBS="$ol_LIBS"
12258
12259 fi
12260
12261 echo "$ac_t""$ol_cv_db_db1" 1>&6
12262
12263         if test $ol_cv_db_db1 = yes ; then
12264                 ol_cv_lib_db=-ldb1
12265         fi
12266 fi
12267
12268
12269         if test "$ol_cv_lib_db" != no ; then
12270                 ol_cv_berkeley_db=yes
12271                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12272 echo "configure:12273: checking for Berkeley DB thread support" >&5
12273 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12274   echo $ac_n "(cached) $ac_c" 1>&6
12275 else
12276   
12277         ol_LIBS="$LIBS"
12278         if test $ol_cv_lib_db != yes ; then
12279                 LIBS="$ol_cv_lib_db"
12280         fi
12281
12282         if test "$cross_compiling" = yes; then
12283   ol_cv_berkeley_db_thread=cross
12284 else
12285   cat > conftest.$ac_ext <<EOF
12286 #line 12287 "configure"
12287 #include "confdefs.h"
12288
12289 #ifdef HAVE_DB_185_H
12290         choke me;
12291 #else
12292 #include <db.h>
12293 #endif
12294 #ifndef NULL
12295 #define NULL ((void *)0)
12296 #endif
12297 main()
12298 {
12299         int rc;
12300         u_int32_t flags = DB_CREATE | DB_THREAD;
12301
12302
12303 #if DB_VERSION_MAJOR > 2
12304         DB_ENV *env = NULL;
12305
12306         rc = db_env_create( &env, 0 );
12307
12308         if( rc == 0 ) {
12309                 rc = env->open( env, NULL, NULL, flags, 0 );
12310         }
12311
12312 #else
12313         DB_ENV env;
12314         memset( &env, '\0', sizeof(env) );
12315
12316         rc = db_appinit( NULL, NULL, &env, flags );
12317
12318         if( rc == 0 ) {
12319                 db_appexit( &env );
12320         }
12321 #endif
12322
12323         return rc;
12324 }
12325 EOF
12326 if { (eval echo configure:12327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12327 then
12328   ol_cv_berkeley_db_thread=yes
12329 else
12330   echo "configure: failed program was:" >&5
12331   cat conftest.$ac_ext >&5
12332   rm -fr conftest*
12333   ol_cv_berkeley_db_thread=no
12334 fi
12335 rm -fr conftest*
12336 fi
12337
12338
12339         LIBS="$ol_LIBS"
12340
12341         if test $ol_cv_berkeley_db_thread != no ; then
12342                 cat >> confdefs.h <<\EOF
12343 #define HAVE_BERKELEY_DB_THREAD 1
12344 EOF
12345
12346         fi
12347
12348 fi
12349
12350 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12351         fi
12352 fi
12353
12354         fi
12355
12356         if test $ol_cv_berkeley_db != no ; then
12357                 cat >> confdefs.h <<\EOF
12358 #define HAVE_BERKELEY_DB 1
12359 EOF
12360
12361
12362                 ol_link_ldbm=berkeley
12363                 ol_with_ldbm_api=db
12364
12365                 if test $ol_with_ldbm_type = hash ; then
12366                         cat >> confdefs.h <<\EOF
12367 #define LDBM_USE_DBHASH 1
12368 EOF
12369
12370                 else
12371                         cat >> confdefs.h <<\EOF
12372 #define LDBM_USE_DBBTREE 1
12373 EOF
12374
12375                 fi
12376
12377                                                 if test $ol_cv_lib_db != yes ; then
12378                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12379                 fi
12380         fi
12381 fi
12382
12383 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12384         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12385         ol_with_ldbm_api=none
12386 fi
12387
12388 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12389         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12390 echo "configure:12391: checking for MDBM library" >&5
12391 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12392   echo $ac_n "(cached) $ac_c" 1>&6
12393 else
12394         ol_LIBS="$LIBS"
12395         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12396 echo "configure:12397: checking for mdbm_set_chain" >&5
12397 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12398   echo $ac_n "(cached) $ac_c" 1>&6
12399 else
12400   cat > conftest.$ac_ext <<EOF
12401 #line 12402 "configure"
12402 #include "confdefs.h"
12403 /* System header to define __stub macros and hopefully few prototypes,
12404     which can conflict with char mdbm_set_chain(); below.  */
12405 #include <assert.h>
12406 /* Override any gcc2 internal prototype to avoid an error.  */
12407 /* We use char because int might match the return type of a gcc2
12408     builtin and then its argument prototype would still apply.  */
12409 char mdbm_set_chain();
12410 char (*f)();
12411
12412 int main() {
12413
12414 /* The GNU C library defines this for functions which it implements
12415     to always fail with ENOSYS.  Some functions are actually named
12416     something starting with __ and the normal name is an alias.  */
12417 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12418 choke me
12419 #else
12420 f = mdbm_set_chain;
12421 #endif
12422
12423 ; return 0; }
12424 EOF
12425 if { (eval echo configure:12426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12426   rm -rf conftest*
12427   eval "ac_cv_func_mdbm_set_chain=yes"
12428 else
12429   echo "configure: failed program was:" >&5
12430   cat conftest.$ac_ext >&5
12431   rm -rf conftest*
12432   eval "ac_cv_func_mdbm_set_chain=no"
12433 fi
12434 rm -f conftest*
12435 fi
12436
12437 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12438   echo "$ac_t""yes" 1>&6
12439   ol_cv_lib_mdbm=yes
12440 else
12441   echo "$ac_t""no" 1>&6
12442
12443                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12444 echo "configure:12445: checking for mdbm_set_chain in -lmdbm" >&5
12445 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12446 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12447   echo $ac_n "(cached) $ac_c" 1>&6
12448 else
12449   ac_save_LIBS="$LIBS"
12450 LIBS="-lmdbm  $LIBS"
12451 cat > conftest.$ac_ext <<EOF
12452 #line 12453 "configure"
12453 #include "confdefs.h"
12454 /* Override any gcc2 internal prototype to avoid an error.  */
12455 /* We use char because int might match the return type of a gcc2
12456     builtin and then its argument prototype would still apply.  */
12457 char mdbm_set_chain();
12458
12459 int main() {
12460 mdbm_set_chain()
12461 ; return 0; }
12462 EOF
12463 if { (eval echo configure:12464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12464   rm -rf conftest*
12465   eval "ac_cv_lib_$ac_lib_var=yes"
12466 else
12467   echo "configure: failed program was:" >&5
12468   cat conftest.$ac_ext >&5
12469   rm -rf conftest*
12470   eval "ac_cv_lib_$ac_lib_var=no"
12471 fi
12472 rm -f conftest*
12473 LIBS="$ac_save_LIBS"
12474
12475 fi
12476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12477   echo "$ac_t""yes" 1>&6
12478   ol_cv_lib_mdbm=-lmdbm
12479 else
12480   echo "$ac_t""no" 1>&6
12481 ol_cv_lib_mdbm=no
12482 fi
12483
12484         
12485 fi
12486
12487         LIBS="$ol_LIBS"
12488
12489 fi
12490
12491 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12492
12493
12494  for ac_hdr in mdbm.h
12495 do
12496 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12497 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12498 echo "configure:12499: checking for $ac_hdr" >&5
12499 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12500   echo $ac_n "(cached) $ac_c" 1>&6
12501 else
12502   cat > conftest.$ac_ext <<EOF
12503 #line 12504 "configure"
12504 #include "confdefs.h"
12505 #include <$ac_hdr>
12506 EOF
12507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12508 { (eval echo configure:12509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12510 if test -z "$ac_err"; then
12511   rm -rf conftest*
12512   eval "ac_cv_header_$ac_safe=yes"
12513 else
12514   echo "$ac_err" >&5
12515   echo "configure: failed program was:" >&5
12516   cat conftest.$ac_ext >&5
12517   rm -rf conftest*
12518   eval "ac_cv_header_$ac_safe=no"
12519 fi
12520 rm -f conftest*
12521 fi
12522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12523   echo "$ac_t""yes" 1>&6
12524     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12525   cat >> confdefs.h <<EOF
12526 #define $ac_tr_hdr 1
12527 EOF
12528  
12529 else
12530   echo "$ac_t""no" 1>&6
12531 fi
12532 done
12533
12534  echo $ac_n "checking for db""... $ac_c" 1>&6
12535 echo "configure:12536: checking for db" >&5
12536 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12537   echo $ac_n "(cached) $ac_c" 1>&6
12538 else
12539   
12540         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12541                 ol_cv_mdbm=no
12542         else
12543                 ol_cv_mdbm=yes
12544         fi
12545
12546 fi
12547
12548 echo "$ac_t""$ol_cv_mdbm" 1>&6
12549  if test $ol_cv_mdbm = yes ; then
12550         cat >> confdefs.h <<\EOF
12551 #define HAVE_MDBM 1
12552 EOF
12553
12554  fi
12555
12556
12557         if test $ol_cv_mdbm = yes ; then
12558                 ol_link_ldbm=mdbm
12559                 ol_with_ldbm_api=mdbm
12560                 if test $ol_cv_lib_mdbm != yes ; then
12561                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12562                 fi
12563         fi
12564 fi
12565
12566 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12567         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12568 echo "configure:12569: checking for GDBM library" >&5
12569 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12570   echo $ac_n "(cached) $ac_c" 1>&6
12571 else
12572         ol_LIBS="$LIBS"
12573         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12574 echo "configure:12575: checking for gdbm_open" >&5
12575 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12576   echo $ac_n "(cached) $ac_c" 1>&6
12577 else
12578   cat > conftest.$ac_ext <<EOF
12579 #line 12580 "configure"
12580 #include "confdefs.h"
12581 /* System header to define __stub macros and hopefully few prototypes,
12582     which can conflict with char gdbm_open(); below.  */
12583 #include <assert.h>
12584 /* Override any gcc2 internal prototype to avoid an error.  */
12585 /* We use char because int might match the return type of a gcc2
12586     builtin and then its argument prototype would still apply.  */
12587 char gdbm_open();
12588 char (*f)();
12589
12590 int main() {
12591
12592 /* The GNU C library defines this for functions which it implements
12593     to always fail with ENOSYS.  Some functions are actually named
12594     something starting with __ and the normal name is an alias.  */
12595 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12596 choke me
12597 #else
12598 f = gdbm_open;
12599 #endif
12600
12601 ; return 0; }
12602 EOF
12603 if { (eval echo configure:12604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12604   rm -rf conftest*
12605   eval "ac_cv_func_gdbm_open=yes"
12606 else
12607   echo "configure: failed program was:" >&5
12608   cat conftest.$ac_ext >&5
12609   rm -rf conftest*
12610   eval "ac_cv_func_gdbm_open=no"
12611 fi
12612 rm -f conftest*
12613 fi
12614
12615 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12616   echo "$ac_t""yes" 1>&6
12617   ol_cv_lib_gdbm=yes
12618 else
12619   echo "$ac_t""no" 1>&6
12620
12621                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12622 echo "configure:12623: checking for gdbm_open in -lgdbm" >&5
12623 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12624 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12625   echo $ac_n "(cached) $ac_c" 1>&6
12626 else
12627   ac_save_LIBS="$LIBS"
12628 LIBS="-lgdbm  $LIBS"
12629 cat > conftest.$ac_ext <<EOF
12630 #line 12631 "configure"
12631 #include "confdefs.h"
12632 /* Override any gcc2 internal prototype to avoid an error.  */
12633 /* We use char because int might match the return type of a gcc2
12634     builtin and then its argument prototype would still apply.  */
12635 char gdbm_open();
12636
12637 int main() {
12638 gdbm_open()
12639 ; return 0; }
12640 EOF
12641 if { (eval echo configure:12642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12642   rm -rf conftest*
12643   eval "ac_cv_lib_$ac_lib_var=yes"
12644 else
12645   echo "configure: failed program was:" >&5
12646   cat conftest.$ac_ext >&5
12647   rm -rf conftest*
12648   eval "ac_cv_lib_$ac_lib_var=no"
12649 fi
12650 rm -f conftest*
12651 LIBS="$ac_save_LIBS"
12652
12653 fi
12654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12655   echo "$ac_t""yes" 1>&6
12656   ol_cv_lib_gdbm=-lgdbm
12657 else
12658   echo "$ac_t""no" 1>&6
12659 ol_cv_lib_gdbm=no
12660 fi
12661
12662         
12663 fi
12664
12665         LIBS="$ol_LIBS"
12666
12667 fi
12668
12669 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12670
12671
12672  for ac_hdr in gdbm.h
12673 do
12674 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12675 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12676 echo "configure:12677: checking for $ac_hdr" >&5
12677 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12678   echo $ac_n "(cached) $ac_c" 1>&6
12679 else
12680   cat > conftest.$ac_ext <<EOF
12681 #line 12682 "configure"
12682 #include "confdefs.h"
12683 #include <$ac_hdr>
12684 EOF
12685 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12686 { (eval echo configure:12687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12687 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12688 if test -z "$ac_err"; then
12689   rm -rf conftest*
12690   eval "ac_cv_header_$ac_safe=yes"
12691 else
12692   echo "$ac_err" >&5
12693   echo "configure: failed program was:" >&5
12694   cat conftest.$ac_ext >&5
12695   rm -rf conftest*
12696   eval "ac_cv_header_$ac_safe=no"
12697 fi
12698 rm -f conftest*
12699 fi
12700 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12701   echo "$ac_t""yes" 1>&6
12702     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12703   cat >> confdefs.h <<EOF
12704 #define $ac_tr_hdr 1
12705 EOF
12706  
12707 else
12708   echo "$ac_t""no" 1>&6
12709 fi
12710 done
12711
12712  echo $ac_n "checking for db""... $ac_c" 1>&6
12713 echo "configure:12714: checking for db" >&5
12714 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12715   echo $ac_n "(cached) $ac_c" 1>&6
12716 else
12717   
12718         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12719                 ol_cv_gdbm=no
12720         else
12721                 ol_cv_gdbm=yes
12722         fi
12723
12724 fi
12725
12726 echo "$ac_t""$ol_cv_gdbm" 1>&6
12727  if test $ol_cv_gdbm = yes ; then
12728         cat >> confdefs.h <<\EOF
12729 #define HAVE_GDBM 1
12730 EOF
12731
12732  fi
12733
12734
12735         if test $ol_cv_gdbm = yes ; then
12736                 ol_link_ldbm=gdbm
12737                 ol_with_ldbm_api=gdbm
12738
12739                 if test $ol_cv_lib_gdbm != yes ; then
12740                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12741                 fi
12742         fi
12743 fi
12744
12745 if test $ol_with_ldbm_api = ndbm ; then
12746         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12747 echo "configure:12748: checking for NDBM library" >&5
12748 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12749   echo $ac_n "(cached) $ac_c" 1>&6
12750 else
12751         ol_LIBS="$LIBS"
12752         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12753 echo "configure:12754: checking for dbm_open" >&5
12754 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12755   echo $ac_n "(cached) $ac_c" 1>&6
12756 else
12757   cat > conftest.$ac_ext <<EOF
12758 #line 12759 "configure"
12759 #include "confdefs.h"
12760 /* System header to define __stub macros and hopefully few prototypes,
12761     which can conflict with char dbm_open(); below.  */
12762 #include <assert.h>
12763 /* Override any gcc2 internal prototype to avoid an error.  */
12764 /* We use char because int might match the return type of a gcc2
12765     builtin and then its argument prototype would still apply.  */
12766 char dbm_open();
12767 char (*f)();
12768
12769 int main() {
12770
12771 /* The GNU C library defines this for functions which it implements
12772     to always fail with ENOSYS.  Some functions are actually named
12773     something starting with __ and the normal name is an alias.  */
12774 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12775 choke me
12776 #else
12777 f = dbm_open;
12778 #endif
12779
12780 ; return 0; }
12781 EOF
12782 if { (eval echo configure:12783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12783   rm -rf conftest*
12784   eval "ac_cv_func_dbm_open=yes"
12785 else
12786   echo "configure: failed program was:" >&5
12787   cat conftest.$ac_ext >&5
12788   rm -rf conftest*
12789   eval "ac_cv_func_dbm_open=no"
12790 fi
12791 rm -f conftest*
12792 fi
12793
12794 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12795   echo "$ac_t""yes" 1>&6
12796   ol_cv_lib_ndbm=yes
12797 else
12798   echo "$ac_t""no" 1>&6
12799
12800                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12801 echo "configure:12802: checking for dbm_open in -lndbm" >&5
12802 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12803 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12804   echo $ac_n "(cached) $ac_c" 1>&6
12805 else
12806   ac_save_LIBS="$LIBS"
12807 LIBS="-lndbm  $LIBS"
12808 cat > conftest.$ac_ext <<EOF
12809 #line 12810 "configure"
12810 #include "confdefs.h"
12811 /* Override any gcc2 internal prototype to avoid an error.  */
12812 /* We use char because int might match the return type of a gcc2
12813     builtin and then its argument prototype would still apply.  */
12814 char dbm_open();
12815
12816 int main() {
12817 dbm_open()
12818 ; return 0; }
12819 EOF
12820 if { (eval echo configure:12821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12821   rm -rf conftest*
12822   eval "ac_cv_lib_$ac_lib_var=yes"
12823 else
12824   echo "configure: failed program was:" >&5
12825   cat conftest.$ac_ext >&5
12826   rm -rf conftest*
12827   eval "ac_cv_lib_$ac_lib_var=no"
12828 fi
12829 rm -f conftest*
12830 LIBS="$ac_save_LIBS"
12831
12832 fi
12833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12834   echo "$ac_t""yes" 1>&6
12835   ol_cv_lib_ndbm=-lndbm
12836 else
12837   echo "$ac_t""no" 1>&6
12838
12839                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12840 echo "configure:12841: checking for dbm_open in -ldbm" >&5
12841 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12842 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12843   echo $ac_n "(cached) $ac_c" 1>&6
12844 else
12845   ac_save_LIBS="$LIBS"
12846 LIBS="-ldbm  $LIBS"
12847 cat > conftest.$ac_ext <<EOF
12848 #line 12849 "configure"
12849 #include "confdefs.h"
12850 /* Override any gcc2 internal prototype to avoid an error.  */
12851 /* We use char because int might match the return type of a gcc2
12852     builtin and then its argument prototype would still apply.  */
12853 char dbm_open();
12854
12855 int main() {
12856 dbm_open()
12857 ; return 0; }
12858 EOF
12859 if { (eval echo configure:12860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12860   rm -rf conftest*
12861   eval "ac_cv_lib_$ac_lib_var=yes"
12862 else
12863   echo "configure: failed program was:" >&5
12864   cat conftest.$ac_ext >&5
12865   rm -rf conftest*
12866   eval "ac_cv_lib_$ac_lib_var=no"
12867 fi
12868 rm -f conftest*
12869 LIBS="$ac_save_LIBS"
12870
12871 fi
12872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12873   echo "$ac_t""yes" 1>&6
12874   ol_cv_lib_ndbm=-ldbm
12875 else
12876   echo "$ac_t""no" 1>&6
12877 ol_cv_lib_ndbm=no
12878 fi
12879                 
12880 fi
12881
12882         
12883 fi
12884
12885         LIBS="$ol_LIBS"
12886
12887 fi
12888
12889 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12890
12891
12892  for ac_hdr in ndbm.h
12893 do
12894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12896 echo "configure:12897: checking for $ac_hdr" >&5
12897 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12898   echo $ac_n "(cached) $ac_c" 1>&6
12899 else
12900   cat > conftest.$ac_ext <<EOF
12901 #line 12902 "configure"
12902 #include "confdefs.h"
12903 #include <$ac_hdr>
12904 EOF
12905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12906 { (eval echo configure:12907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12908 if test -z "$ac_err"; then
12909   rm -rf conftest*
12910   eval "ac_cv_header_$ac_safe=yes"
12911 else
12912   echo "$ac_err" >&5
12913   echo "configure: failed program was:" >&5
12914   cat conftest.$ac_ext >&5
12915   rm -rf conftest*
12916   eval "ac_cv_header_$ac_safe=no"
12917 fi
12918 rm -f conftest*
12919 fi
12920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12921   echo "$ac_t""yes" 1>&6
12922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12923   cat >> confdefs.h <<EOF
12924 #define $ac_tr_hdr 1
12925 EOF
12926  
12927 else
12928   echo "$ac_t""no" 1>&6
12929 fi
12930 done
12931
12932  echo $ac_n "checking for db""... $ac_c" 1>&6
12933 echo "configure:12934: checking for db" >&5
12934 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12935   echo $ac_n "(cached) $ac_c" 1>&6
12936 else
12937   
12938         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12939                 ol_cv_ndbm=no
12940         else
12941                 ol_cv_ndbm=yes
12942         fi
12943
12944 fi
12945
12946 echo "$ac_t""$ol_cv_ndbm" 1>&6
12947  if test $ol_cv_ndbm = yes ; then
12948         cat >> confdefs.h <<\EOF
12949 #define HAVE_NDBM 1
12950 EOF
12951
12952  fi
12953
12954
12955         if test $ol_cv_ndbm = yes ; then
12956                 ol_link_ldbm=ndbm
12957                 ol_with_ldbm_api=ndbm
12958
12959                 if test $ol_cv_lib_ndbm != yes ; then
12960                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12961                 fi
12962         fi
12963 fi
12964
12965 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12966         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12967         if test $ol_enable_ldbm = yes ; then
12968                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12969         fi
12970
12971         echo "configure: warning: disabling LDBM" 1>&2
12972         ol_enable_ldbm=no
12973 fi
12974
12975 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12976         LINK_BINS_DYNAMIC="yes"
12977 else
12978         LINK_BINS_DYNAMIC="no"
12979 fi
12980
12981 if test $ol_enable_wrappers != no ; then
12982         for ac_hdr in tcpd.h
12983 do
12984 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12985 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12986 echo "configure:12987: checking for $ac_hdr" >&5
12987 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12988   echo $ac_n "(cached) $ac_c" 1>&6
12989 else
12990   cat > conftest.$ac_ext <<EOF
12991 #line 12992 "configure"
12992 #include "confdefs.h"
12993 #include <$ac_hdr>
12994 EOF
12995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12996 { (eval echo configure:12997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12998 if test -z "$ac_err"; then
12999   rm -rf conftest*
13000   eval "ac_cv_header_$ac_safe=yes"
13001 else
13002   echo "$ac_err" >&5
13003   echo "configure: failed program was:" >&5
13004   cat conftest.$ac_ext >&5
13005   rm -rf conftest*
13006   eval "ac_cv_header_$ac_safe=no"
13007 fi
13008 rm -f conftest*
13009 fi
13010 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13011   echo "$ac_t""yes" 1>&6
13012     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13013   cat >> confdefs.h <<EOF
13014 #define $ac_tr_hdr 1
13015 EOF
13016  
13017 else
13018   echo "$ac_t""no" 1>&6
13019 fi
13020 done
13021
13022
13023         if test $ac_cv_header_tcpd_h != yes ; then
13024                 have_wrappers=no
13025         else
13026                 cat > conftest.$ac_ext <<EOF
13027 #line 13028 "configure"
13028 #include "confdefs.h"
13029
13030 int allow_severity = 0;
13031 int deny_severity  = 0;
13032                 
13033 int main() {
13034 hosts_access()
13035 ; return 0; }
13036 EOF
13037 if { (eval echo configure:13038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13038   rm -rf conftest*
13039   have_wrappers=yes
13040 else
13041   echo "configure: failed program was:" >&5
13042   cat conftest.$ac_ext >&5
13043   rm -rf conftest*
13044   have_wrappers=no
13045 fi
13046 rm -f conftest*
13047         fi
13048
13049         if test $have_wrappers = yes ; then
13050                 cat >> confdefs.h <<\EOF
13051 #define HAVE_TCPD 1
13052 EOF
13053
13054                 WRAP_LIBS="-lwrap"
13055
13056                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13057 echo "configure:13058: checking for main in -lnsl" >&5
13058 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13059 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13060   echo $ac_n "(cached) $ac_c" 1>&6
13061 else
13062   ac_save_LIBS="$LIBS"
13063 LIBS="-lnsl  $LIBS"
13064 cat > conftest.$ac_ext <<EOF
13065 #line 13066 "configure"
13066 #include "confdefs.h"
13067
13068 int main() {
13069 main()
13070 ; return 0; }
13071 EOF
13072 if { (eval echo configure:13073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13073   rm -rf conftest*
13074   eval "ac_cv_lib_$ac_lib_var=yes"
13075 else
13076   echo "configure: failed program was:" >&5
13077   cat conftest.$ac_ext >&5
13078   rm -rf conftest*
13079   eval "ac_cv_lib_$ac_lib_var=no"
13080 fi
13081 rm -f conftest*
13082 LIBS="$ac_save_LIBS"
13083
13084 fi
13085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13086   echo "$ac_t""yes" 1>&6
13087     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13088     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13089   cat >> confdefs.h <<EOF
13090 #define $ac_tr_lib 1
13091 EOF
13092
13093   LIBS="-lnsl $LIBS"
13094
13095 else
13096   echo "$ac_t""no" 1>&6
13097 fi
13098
13099         else
13100                 echo "configure: warning: could not find -lwrap" 1>&2
13101                 if test $ol_enable_wrappers = yes ; then
13102                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13103                 fi
13104
13105                 echo "configure: warning: disabling wrappers support" 1>&2
13106                 ol_enable_wrappers=no
13107                 WRAP_LIBS=""
13108         fi
13109 fi
13110
13111 if test $ol_enable_syslog != no ; then
13112         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13113 echo "configure:13114: checking for openlog" >&5
13114 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13115   echo $ac_n "(cached) $ac_c" 1>&6
13116 else
13117   cat > conftest.$ac_ext <<EOF
13118 #line 13119 "configure"
13119 #include "confdefs.h"
13120 /* System header to define __stub macros and hopefully few prototypes,
13121     which can conflict with char openlog(); below.  */
13122 #include <assert.h>
13123 /* Override any gcc2 internal prototype to avoid an error.  */
13124 /* We use char because int might match the return type of a gcc2
13125     builtin and then its argument prototype would still apply.  */
13126 char openlog();
13127 char (*f)();
13128
13129 int main() {
13130
13131 /* The GNU C library defines this for functions which it implements
13132     to always fail with ENOSYS.  Some functions are actually named
13133     something starting with __ and the normal name is an alias.  */
13134 #if defined (__stub_openlog) || defined (__stub___openlog)
13135 choke me
13136 #else
13137 f = openlog;
13138 #endif
13139
13140 ; return 0; }
13141 EOF
13142 if { (eval echo configure:13143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13143   rm -rf conftest*
13144   eval "ac_cv_func_openlog=yes"
13145 else
13146   echo "configure: failed program was:" >&5
13147   cat conftest.$ac_ext >&5
13148   rm -rf conftest*
13149   eval "ac_cv_func_openlog=no"
13150 fi
13151 rm -f conftest*
13152 fi
13153
13154 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13155   echo "$ac_t""yes" 1>&6
13156   :
13157 else
13158   echo "$ac_t""no" 1>&6
13159 fi
13160
13161         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13162                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13163         fi
13164         ol_enable_syslog=$ac_cv_func_openlog
13165 fi
13166
13167 if test $ol_enable_tcl != no ; then
13168         for ac_hdr in tcl.h
13169 do
13170 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13171 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13172 echo "configure:13173: checking for $ac_hdr" >&5
13173 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13174   echo $ac_n "(cached) $ac_c" 1>&6
13175 else
13176   cat > conftest.$ac_ext <<EOF
13177 #line 13178 "configure"
13178 #include "confdefs.h"
13179 #include <$ac_hdr>
13180 EOF
13181 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13182 { (eval echo configure:13183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13183 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13184 if test -z "$ac_err"; then
13185   rm -rf conftest*
13186   eval "ac_cv_header_$ac_safe=yes"
13187 else
13188   echo "$ac_err" >&5
13189   echo "configure: failed program was:" >&5
13190   cat conftest.$ac_ext >&5
13191   rm -rf conftest*
13192   eval "ac_cv_header_$ac_safe=no"
13193 fi
13194 rm -f conftest*
13195 fi
13196 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13197   echo "$ac_t""yes" 1>&6
13198     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13199   cat >> confdefs.h <<EOF
13200 #define $ac_tr_hdr 1
13201 EOF
13202  
13203 else
13204   echo "$ac_t""no" 1>&6
13205 fi
13206 done
13207
13208
13209         if test $ac_cv_header_tcl_h != yes ; then
13210                 have_tcl=no
13211         else
13212                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13213                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13214 echo "configure:13215: checking for main in -l$lib" >&5
13215 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13216 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13217   echo $ac_n "(cached) $ac_c" 1>&6
13218 else
13219   ac_save_LIBS="$LIBS"
13220 LIBS="-l$lib  $LIBS"
13221 cat > conftest.$ac_ext <<EOF
13222 #line 13223 "configure"
13223 #include "confdefs.h"
13224
13225 int main() {
13226 main()
13227 ; return 0; }
13228 EOF
13229 if { (eval echo configure:13230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13230   rm -rf conftest*
13231   eval "ac_cv_lib_$ac_lib_var=yes"
13232 else
13233   echo "configure: failed program was:" >&5
13234   cat conftest.$ac_ext >&5
13235   rm -rf conftest*
13236   eval "ac_cv_lib_$ac_lib_var=no"
13237 fi
13238 rm -f conftest*
13239 LIBS="$ac_save_LIBS"
13240
13241 fi
13242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13243   echo "$ac_t""yes" 1>&6
13244   have_tcl=yes
13245                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13246                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13247                            else
13248                                MOD_TCL_LIB="-l${lib}"
13249                            fi;break
13250 else
13251   echo "$ac_t""no" 1>&6
13252 have_tcl=no
13253 fi
13254
13255                 done
13256         fi
13257
13258         if test $have_tcl != yes ; then
13259                 echo "configure: warning: could not find -ltcl" 1>&2
13260                 if test $ol_enable_tcl = yes ; then
13261                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13262                 fi
13263
13264                 ol_enable_tcl=no
13265         fi
13266 fi
13267
13268 ol_link_termcap=no
13269 for ac_hdr in termcap.h ncurses.h
13270 do
13271 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13272 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13273 echo "configure:13274: checking for $ac_hdr" >&5
13274 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13275   echo $ac_n "(cached) $ac_c" 1>&6
13276 else
13277   cat > conftest.$ac_ext <<EOF
13278 #line 13279 "configure"
13279 #include "confdefs.h"
13280 #include <$ac_hdr>
13281 EOF
13282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13283 { (eval echo configure:13284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13285 if test -z "$ac_err"; then
13286   rm -rf conftest*
13287   eval "ac_cv_header_$ac_safe=yes"
13288 else
13289   echo "$ac_err" >&5
13290   echo "configure: failed program was:" >&5
13291   cat conftest.$ac_ext >&5
13292   rm -rf conftest*
13293   eval "ac_cv_header_$ac_safe=no"
13294 fi
13295 rm -f conftest*
13296 fi
13297 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13298   echo "$ac_t""yes" 1>&6
13299     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13300   cat >> confdefs.h <<EOF
13301 #define $ac_tr_hdr 1
13302 EOF
13303  
13304 else
13305   echo "$ac_t""no" 1>&6
13306 fi
13307 done
13308
13309
13310 if test $ol_link_termcap = no ; then
13311         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13312 echo "configure:13313: checking for tputs in -ltermcap" >&5
13313 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13314 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13315   echo $ac_n "(cached) $ac_c" 1>&6
13316 else
13317   ac_save_LIBS="$LIBS"
13318 LIBS="-ltermcap  $LIBS"
13319 cat > conftest.$ac_ext <<EOF
13320 #line 13321 "configure"
13321 #include "confdefs.h"
13322 /* Override any gcc2 internal prototype to avoid an error.  */
13323 /* We use char because int might match the return type of a gcc2
13324     builtin and then its argument prototype would still apply.  */
13325 char tputs();
13326
13327 int main() {
13328 tputs()
13329 ; return 0; }
13330 EOF
13331 if { (eval echo configure:13332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13332   rm -rf conftest*
13333   eval "ac_cv_lib_$ac_lib_var=yes"
13334 else
13335   echo "configure: failed program was:" >&5
13336   cat conftest.$ac_ext >&5
13337   rm -rf conftest*
13338   eval "ac_cv_lib_$ac_lib_var=no"
13339 fi
13340 rm -f conftest*
13341 LIBS="$ac_save_LIBS"
13342
13343 fi
13344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13345   echo "$ac_t""yes" 1>&6
13346   have_termcap=yes
13347 else
13348   echo "$ac_t""no" 1>&6
13349 have_termcap=no
13350 fi
13351
13352         if test $have_termcap = yes ; then
13353                 cat >> confdefs.h <<\EOF
13354 #define HAVE_TERMCAP 1
13355 EOF
13356
13357                 ol_link_termcap=yes
13358                 TERMCAP_LIBS=-ltermcap
13359         fi
13360 fi
13361
13362 if test $ol_link_termcap = no ; then
13363         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13364 echo "configure:13365: checking for initscr in -lncurses" >&5
13365 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13366 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13367   echo $ac_n "(cached) $ac_c" 1>&6
13368 else
13369   ac_save_LIBS="$LIBS"
13370 LIBS="-lncurses  $LIBS"
13371 cat > conftest.$ac_ext <<EOF
13372 #line 13373 "configure"
13373 #include "confdefs.h"
13374 /* Override any gcc2 internal prototype to avoid an error.  */
13375 /* We use char because int might match the return type of a gcc2
13376     builtin and then its argument prototype would still apply.  */
13377 char initscr();
13378
13379 int main() {
13380 initscr()
13381 ; return 0; }
13382 EOF
13383 if { (eval echo configure:13384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13384   rm -rf conftest*
13385   eval "ac_cv_lib_$ac_lib_var=yes"
13386 else
13387   echo "configure: failed program was:" >&5
13388   cat conftest.$ac_ext >&5
13389   rm -rf conftest*
13390   eval "ac_cv_lib_$ac_lib_var=no"
13391 fi
13392 rm -f conftest*
13393 LIBS="$ac_save_LIBS"
13394
13395 fi
13396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13397   echo "$ac_t""yes" 1>&6
13398   have_ncurses=yes
13399 else
13400   echo "$ac_t""no" 1>&6
13401 have_ncurses=no
13402 fi
13403
13404         if test $have_ncurses = yes ; then
13405                 cat >> confdefs.h <<\EOF
13406 #define HAVE_NCURSES 1
13407 EOF
13408
13409                 ol_link_termcap=yes
13410                 TERMCAP_LIBS=-lncurses
13411         fi
13412 fi
13413
13414 if test $ol_link_termcap = no ; then
13415         cat >> confdefs.h <<\EOF
13416 #define NO_TERMCAP 1
13417 EOF
13418
13419         TERMCAP_LIBS=
13420 fi
13421
13422 ol_link_sasl=no
13423 ol_link_spasswd=no
13424 if test $ol_with_cyrus_sasl != no ; then
13425         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13426 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13427 echo "configure:13428: checking for sasl.h" >&5
13428 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13429   echo $ac_n "(cached) $ac_c" 1>&6
13430 else
13431   cat > conftest.$ac_ext <<EOF
13432 #line 13433 "configure"
13433 #include "confdefs.h"
13434 #include <sasl.h>
13435 EOF
13436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13437 { (eval echo configure:13438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13439 if test -z "$ac_err"; then
13440   rm -rf conftest*
13441   eval "ac_cv_header_$ac_safe=yes"
13442 else
13443   echo "$ac_err" >&5
13444   echo "configure: failed program was:" >&5
13445   cat conftest.$ac_ext >&5
13446   rm -rf conftest*
13447   eval "ac_cv_header_$ac_safe=no"
13448 fi
13449 rm -f conftest*
13450 fi
13451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13452   echo "$ac_t""yes" 1>&6
13453   :
13454 else
13455   echo "$ac_t""no" 1>&6
13456 fi
13457
13458
13459         if test $ac_cv_header_sasl_h = yes ; then
13460                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13461 echo "configure:13462: checking for sasl_client_init in -lsasl" >&5
13462 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13464   echo $ac_n "(cached) $ac_c" 1>&6
13465 else
13466   ac_save_LIBS="$LIBS"
13467 LIBS="-lsasl  $LIBS"
13468 cat > conftest.$ac_ext <<EOF
13469 #line 13470 "configure"
13470 #include "confdefs.h"
13471 /* Override any gcc2 internal prototype to avoid an error.  */
13472 /* We use char because int might match the return type of a gcc2
13473     builtin and then its argument prototype would still apply.  */
13474 char sasl_client_init();
13475
13476 int main() {
13477 sasl_client_init()
13478 ; return 0; }
13479 EOF
13480 if { (eval echo configure:13481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13481   rm -rf conftest*
13482   eval "ac_cv_lib_$ac_lib_var=yes"
13483 else
13484   echo "configure: failed program was:" >&5
13485   cat conftest.$ac_ext >&5
13486   rm -rf conftest*
13487   eval "ac_cv_lib_$ac_lib_var=no"
13488 fi
13489 rm -f conftest*
13490 LIBS="$ac_save_LIBS"
13491
13492 fi
13493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13494   echo "$ac_t""yes" 1>&6
13495   have_cyrus_sasl=yes
13496 else
13497   echo "$ac_t""no" 1>&6
13498 have_cyrus_sasl=no
13499 fi
13500
13501
13502                 if test $have_cyrus_sasl != no ; then
13503                         SASL_LIBS="-lsasl"
13504                         cat >> confdefs.h <<\EOF
13505 #define HAVE_CYRUS_SASL 1
13506 EOF
13507
13508                         ol_link_sasl=yes
13509                 fi
13510         fi
13511
13512         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13513                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13514         fi
13515 fi
13516
13517 if test $cross_compiling != yes ; then
13518         dev=no
13519         if test -r /dev/urandom ; then
13520                 dev="/dev/urandom";
13521         elif test -r /idev/urandom ; then
13522                 dev="/idev/urandom";
13523         elif test -r /dev/srandom ; then
13524                 dev="/dev/srandom";
13525         elif test -r /dev/random ; then
13526                 dev="/dev/random";
13527         elif test -r /idev/random ; then
13528                 dev="/idev/random";
13529         fi
13530
13531         if test $dev != no ; then
13532                 cat >> confdefs.h <<EOF
13533 #define URANDOM_DEVICE "$dev"
13534 EOF
13535
13536         fi
13537 fi
13538
13539 ol_link_fetch=no
13540 if test $ol_with_fetch != no ; then
13541         ol_LIBS=$LIBS
13542 LIBS="-lfetch -lcom_err $LIBS"
13543 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13544 echo "configure:13545: checking fetch(3) library" >&5
13545 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13546   echo $ac_n "(cached) $ac_c" 1>&6
13547 else
13548   
13549         cat > conftest.$ac_ext <<EOF
13550 #line 13551 "configure"
13551 #include "confdefs.h"
13552
13553 #include <sys/param.h>
13554 #include <stdio.h>
13555 #include <fetch.h>
13556 int main() {
13557 struct url *u = fetchParseURL("file:///"); 
13558 ; return 0; }
13559 EOF
13560 if { (eval echo configure:13561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13561   rm -rf conftest*
13562   ol_cv_lib_fetch=yes
13563 else
13564   echo "configure: failed program was:" >&5
13565   cat conftest.$ac_ext >&5
13566   rm -rf conftest*
13567   ol_cv_lib_fetch=no
13568 fi
13569 rm -f conftest*
13570 fi
13571
13572 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13573 LIBS=$ol_LIBS
13574 if test $ol_cv_lib_fetch != no ; then
13575         ol_link_fetch="-lfetch -lcom_err"
13576         cat >> confdefs.h <<\EOF
13577 #define HAVE_FETCH 1
13578 EOF
13579
13580 fi
13581
13582
13583         if test $ol_cv_lib_fetch != no ; then
13584                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13585                 ol_link_fetch=freebsd
13586
13587         elif test $ol_with_fetch != auto ; then
13588                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13589         fi 
13590 fi
13591
13592 ol_link_readline=no
13593 if test $ol_with_readline != no ; then
13594         for ac_hdr in readline/readline.h readline/history.h
13595 do
13596 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13597 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13598 echo "configure:13599: checking for $ac_hdr" >&5
13599 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13600   echo $ac_n "(cached) $ac_c" 1>&6
13601 else
13602   cat > conftest.$ac_ext <<EOF
13603 #line 13604 "configure"
13604 #include "confdefs.h"
13605 #include <$ac_hdr>
13606 EOF
13607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13608 { (eval echo configure:13609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13610 if test -z "$ac_err"; then
13611   rm -rf conftest*
13612   eval "ac_cv_header_$ac_safe=yes"
13613 else
13614   echo "$ac_err" >&5
13615   echo "configure: failed program was:" >&5
13616   cat conftest.$ac_ext >&5
13617   rm -rf conftest*
13618   eval "ac_cv_header_$ac_safe=no"
13619 fi
13620 rm -f conftest*
13621 fi
13622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13623   echo "$ac_t""yes" 1>&6
13624     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13625   cat >> confdefs.h <<EOF
13626 #define $ac_tr_hdr 1
13627 EOF
13628  
13629 else
13630   echo "$ac_t""no" 1>&6
13631 fi
13632 done
13633
13634
13635         if test $ac_cv_header_readline_readline_h = yes ; then
13636                 save_LIBS="$LIBS"
13637                 LIBS="$TERMCAP_LIBS $LIBS"
13638                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13639 echo "configure:13640: checking for readline in -lreadline" >&5
13640 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13641 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13642   echo $ac_n "(cached) $ac_c" 1>&6
13643 else
13644   ac_save_LIBS="$LIBS"
13645 LIBS="-lreadline  $LIBS"
13646 cat > conftest.$ac_ext <<EOF
13647 #line 13648 "configure"
13648 #include "confdefs.h"
13649 /* Override any gcc2 internal prototype to avoid an error.  */
13650 /* We use char because int might match the return type of a gcc2
13651     builtin and then its argument prototype would still apply.  */
13652 char readline();
13653
13654 int main() {
13655 readline()
13656 ; return 0; }
13657 EOF
13658 if { (eval echo configure:13659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13659   rm -rf conftest*
13660   eval "ac_cv_lib_$ac_lib_var=yes"
13661 else
13662   echo "configure: failed program was:" >&5
13663   cat conftest.$ac_ext >&5
13664   rm -rf conftest*
13665   eval "ac_cv_lib_$ac_lib_var=no"
13666 fi
13667 rm -f conftest*
13668 LIBS="$ac_save_LIBS"
13669
13670 fi
13671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13672   echo "$ac_t""yes" 1>&6
13673   have_readline=yes
13674 else
13675   echo "$ac_t""no" 1>&6
13676 have_readline=no
13677 fi
13678
13679                 LIBS="$save_LIBS"
13680                         
13681                 if test $have_readline = yes ; then
13682                         ol_with_readline=found
13683                         ol_link_readline=yes
13684
13685                         READLINE_LIBS="-lreadline"
13686                 fi
13687         fi
13688 fi
13689
13690 if test $ol_link_readline = yes ; then
13691         cat >> confdefs.h <<\EOF
13692 #define HAVE_READLINE 1
13693 EOF
13694
13695 fi
13696
13697
13698 if test $ol_enable_crypt != no ; then
13699         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13700 echo "configure:13701: checking for crypt" >&5
13701 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13702   echo $ac_n "(cached) $ac_c" 1>&6
13703 else
13704   cat > conftest.$ac_ext <<EOF
13705 #line 13706 "configure"
13706 #include "confdefs.h"
13707 /* System header to define __stub macros and hopefully few prototypes,
13708     which can conflict with char crypt(); below.  */
13709 #include <assert.h>
13710 /* Override any gcc2 internal prototype to avoid an error.  */
13711 /* We use char because int might match the return type of a gcc2
13712     builtin and then its argument prototype would still apply.  */
13713 char crypt();
13714 char (*f)();
13715
13716 int main() {
13717
13718 /* The GNU C library defines this for functions which it implements
13719     to always fail with ENOSYS.  Some functions are actually named
13720     something starting with __ and the normal name is an alias.  */
13721 #if defined (__stub_crypt) || defined (__stub___crypt)
13722 choke me
13723 #else
13724 f = crypt;
13725 #endif
13726
13727 ; return 0; }
13728 EOF
13729 if { (eval echo configure:13730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13730   rm -rf conftest*
13731   eval "ac_cv_func_crypt=yes"
13732 else
13733   echo "configure: failed program was:" >&5
13734   cat conftest.$ac_ext >&5
13735   rm -rf conftest*
13736   eval "ac_cv_func_crypt=no"
13737 fi
13738 rm -f conftest*
13739 fi
13740
13741 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13742   echo "$ac_t""yes" 1>&6
13743   have_crypt=yes
13744 else
13745   echo "$ac_t""no" 1>&6
13746
13747                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13748 echo "configure:13749: checking for crypt in -lcrypt" >&5
13749 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13750 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13751   echo $ac_n "(cached) $ac_c" 1>&6
13752 else
13753   ac_save_LIBS="$LIBS"
13754 LIBS="-lcrypt  $LIBS"
13755 cat > conftest.$ac_ext <<EOF
13756 #line 13757 "configure"
13757 #include "confdefs.h"
13758 /* Override any gcc2 internal prototype to avoid an error.  */
13759 /* We use char because int might match the return type of a gcc2
13760     builtin and then its argument prototype would still apply.  */
13761 char crypt();
13762
13763 int main() {
13764 crypt()
13765 ; return 0; }
13766 EOF
13767 if { (eval echo configure:13768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13768   rm -rf conftest*
13769   eval "ac_cv_lib_$ac_lib_var=yes"
13770 else
13771   echo "configure: failed program was:" >&5
13772   cat conftest.$ac_ext >&5
13773   rm -rf conftest*
13774   eval "ac_cv_lib_$ac_lib_var=no"
13775 fi
13776 rm -f conftest*
13777 LIBS="$ac_save_LIBS"
13778
13779 fi
13780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13781   echo "$ac_t""yes" 1>&6
13782   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13783                         have_crypt=yes
13784 else
13785   echo "$ac_t""no" 1>&6
13786 have_crypt=no
13787 fi
13788
13789 fi
13790
13791
13792         if test $have_crypt = yes ; then
13793                 cat >> confdefs.h <<\EOF
13794 #define HAVE_CRYPT 1
13795 EOF
13796
13797         else
13798                 echo "configure: warning: could not find crypt" 1>&2
13799                 if test $ol_enable_crypt = yes ; then
13800                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13801                 fi
13802
13803                 echo "configure: warning: disabling crypt support" 1>&2
13804                 ol_enable_crypt=no
13805         fi
13806 fi
13807
13808 if test $ol_enable_proctitle != no ; then
13809         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13810 echo "configure:13811: checking for setproctitle" >&5
13811 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13812   echo $ac_n "(cached) $ac_c" 1>&6
13813 else
13814   cat > conftest.$ac_ext <<EOF
13815 #line 13816 "configure"
13816 #include "confdefs.h"
13817 /* System header to define __stub macros and hopefully few prototypes,
13818     which can conflict with char setproctitle(); below.  */
13819 #include <assert.h>
13820 /* Override any gcc2 internal prototype to avoid an error.  */
13821 /* We use char because int might match the return type of a gcc2
13822     builtin and then its argument prototype would still apply.  */
13823 char setproctitle();
13824 char (*f)();
13825
13826 int main() {
13827
13828 /* The GNU C library defines this for functions which it implements
13829     to always fail with ENOSYS.  Some functions are actually named
13830     something starting with __ and the normal name is an alias.  */
13831 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13832 choke me
13833 #else
13834 f = setproctitle;
13835 #endif
13836
13837 ; return 0; }
13838 EOF
13839 if { (eval echo configure:13840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13840   rm -rf conftest*
13841   eval "ac_cv_func_setproctitle=yes"
13842 else
13843   echo "configure: failed program was:" >&5
13844   cat conftest.$ac_ext >&5
13845   rm -rf conftest*
13846   eval "ac_cv_func_setproctitle=no"
13847 fi
13848 rm -f conftest*
13849 fi
13850
13851 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13852   echo "$ac_t""yes" 1>&6
13853   have_setproctitle=yes
13854 else
13855   echo "$ac_t""no" 1>&6
13856
13857                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13858 echo "configure:13859: checking for setproctitle in -lutil" >&5
13859 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13860 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13861   echo $ac_n "(cached) $ac_c" 1>&6
13862 else
13863   ac_save_LIBS="$LIBS"
13864 LIBS="-lutil  $LIBS"
13865 cat > conftest.$ac_ext <<EOF
13866 #line 13867 "configure"
13867 #include "confdefs.h"
13868 /* Override any gcc2 internal prototype to avoid an error.  */
13869 /* We use char because int might match the return type of a gcc2
13870     builtin and then its argument prototype would still apply.  */
13871 char setproctitle();
13872
13873 int main() {
13874 setproctitle()
13875 ; return 0; }
13876 EOF
13877 if { (eval echo configure:13878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13878   rm -rf conftest*
13879   eval "ac_cv_lib_$ac_lib_var=yes"
13880 else
13881   echo "configure: failed program was:" >&5
13882   cat conftest.$ac_ext >&5
13883   rm -rf conftest*
13884   eval "ac_cv_lib_$ac_lib_var=no"
13885 fi
13886 rm -f conftest*
13887 LIBS="$ac_save_LIBS"
13888
13889 fi
13890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13891   echo "$ac_t""yes" 1>&6
13892   have_setproctitle=yes
13893                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13894 else
13895   echo "$ac_t""no" 1>&6
13896 have_setproctitle=no
13897                         LIBOBJS="$LIBOBJS setproctitle.o"
13898                         LIBSRCS="$LIBSRCS setproctitle.c"
13899 fi
13900
13901 fi
13902
13903
13904         if test $have_setproctitle = yes ; then
13905                 cat >> confdefs.h <<\EOF
13906 #define HAVE_SETPROCTITLE 1
13907 EOF
13908
13909         fi
13910 fi
13911
13912 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13913 echo "configure:13914: checking for ANSI C header files" >&5
13914 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13915   echo $ac_n "(cached) $ac_c" 1>&6
13916 else
13917   cat > conftest.$ac_ext <<EOF
13918 #line 13919 "configure"
13919 #include "confdefs.h"
13920 #include <stdlib.h>
13921 #include <stdarg.h>
13922 #include <string.h>
13923 #include <float.h>
13924 EOF
13925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13926 { (eval echo configure:13927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13928 if test -z "$ac_err"; then
13929   rm -rf conftest*
13930   ac_cv_header_stdc=yes
13931 else
13932   echo "$ac_err" >&5
13933   echo "configure: failed program was:" >&5
13934   cat conftest.$ac_ext >&5
13935   rm -rf conftest*
13936   ac_cv_header_stdc=no
13937 fi
13938 rm -f conftest*
13939
13940 if test $ac_cv_header_stdc = yes; then
13941   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13942 cat > conftest.$ac_ext <<EOF
13943 #line 13944 "configure"
13944 #include "confdefs.h"
13945 #include <string.h>
13946 EOF
13947 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13948   egrep "memchr" >/dev/null 2>&1; then
13949   :
13950 else
13951   rm -rf conftest*
13952   ac_cv_header_stdc=no
13953 fi
13954 rm -f conftest*
13955
13956 fi
13957
13958 if test $ac_cv_header_stdc = yes; then
13959   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13960 cat > conftest.$ac_ext <<EOF
13961 #line 13962 "configure"
13962 #include "confdefs.h"
13963 #include <stdlib.h>
13964 EOF
13965 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13966   egrep "free" >/dev/null 2>&1; then
13967   :
13968 else
13969   rm -rf conftest*
13970   ac_cv_header_stdc=no
13971 fi
13972 rm -f conftest*
13973
13974 fi
13975
13976 if test $ac_cv_header_stdc = yes; then
13977   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13978 if test "$cross_compiling" = yes; then
13979   :
13980 else
13981   cat > conftest.$ac_ext <<EOF
13982 #line 13983 "configure"
13983 #include "confdefs.h"
13984 #include <ctype.h>
13985 #if ((' ' & 0x0FF) == 0x020)
13986 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13987 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13988 #else
13989 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13990  || ('j' <= (c) && (c) <= 'r') \
13991  || ('s' <= (c) && (c) <= 'z'))
13992 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13993 #endif
13994 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13995 int main () { int i; for (i = 0; i < 256; i++)
13996 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13997 exit (0); }
13998
13999 EOF
14000 if { (eval echo configure:14001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14001 then
14002   :
14003 else
14004   echo "configure: failed program was:" >&5
14005   cat conftest.$ac_ext >&5
14006   rm -fr conftest*
14007   ac_cv_header_stdc=no
14008 fi
14009 rm -fr conftest*
14010 fi
14011
14012 fi
14013 fi
14014
14015 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14016 if test $ac_cv_header_stdc = yes; then
14017   cat >> confdefs.h <<\EOF
14018 #define STDC_HEADERS 1
14019 EOF
14020
14021 fi
14022
14023 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14024 echo "configure:14025: checking for mode_t" >&5
14025 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14026   echo $ac_n "(cached) $ac_c" 1>&6
14027 else
14028   cat > conftest.$ac_ext <<EOF
14029 #line 14030 "configure"
14030 #include "confdefs.h"
14031 #include <sys/types.h>
14032 #if STDC_HEADERS
14033 #include <stdlib.h>
14034 #include <stddef.h>
14035 #endif
14036
14037 EOF
14038 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14039   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14040   rm -rf conftest*
14041   eval "ac_cv_type_mode_t=yes"
14042 else
14043   rm -rf conftest*
14044   eval "ac_cv_type_mode_t=no"
14045 fi
14046 rm -f conftest*
14047
14048 fi
14049 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14050   echo "$ac_t""yes" 1>&6
14051 else
14052   echo "$ac_t""no" 1>&6
14053   cat >> confdefs.h <<EOF
14054 #define mode_t int
14055 EOF
14056
14057 fi
14058
14059 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14060 echo "configure:14061: checking for off_t" >&5
14061 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14062   echo $ac_n "(cached) $ac_c" 1>&6
14063 else
14064   cat > conftest.$ac_ext <<EOF
14065 #line 14066 "configure"
14066 #include "confdefs.h"
14067 #include <sys/types.h>
14068 #if STDC_HEADERS
14069 #include <stdlib.h>
14070 #include <stddef.h>
14071 #endif
14072
14073 EOF
14074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14075   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14076   rm -rf conftest*
14077   eval "ac_cv_type_off_t=yes"
14078 else
14079   rm -rf conftest*
14080   eval "ac_cv_type_off_t=no"
14081 fi
14082 rm -f conftest*
14083
14084 fi
14085 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14086   echo "$ac_t""yes" 1>&6
14087 else
14088   echo "$ac_t""no" 1>&6
14089   cat >> confdefs.h <<EOF
14090 #define off_t long
14091 EOF
14092
14093 fi
14094
14095 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14096 echo "configure:14097: checking for pid_t" >&5
14097 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14098   echo $ac_n "(cached) $ac_c" 1>&6
14099 else
14100   cat > conftest.$ac_ext <<EOF
14101 #line 14102 "configure"
14102 #include "confdefs.h"
14103 #include <sys/types.h>
14104 #if STDC_HEADERS
14105 #include <stdlib.h>
14106 #include <stddef.h>
14107 #endif
14108
14109 EOF
14110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14111   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14112   rm -rf conftest*
14113   eval "ac_cv_type_pid_t=yes"
14114 else
14115   rm -rf conftest*
14116   eval "ac_cv_type_pid_t=no"
14117 fi
14118 rm -f conftest*
14119
14120 fi
14121 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14122   echo "$ac_t""yes" 1>&6
14123 else
14124   echo "$ac_t""no" 1>&6
14125   cat >> confdefs.h <<EOF
14126 #define pid_t int
14127 EOF
14128
14129 fi
14130
14131 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14132 echo "configure:14133: checking for ptrdiff_t" >&5
14133 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14134   echo $ac_n "(cached) $ac_c" 1>&6
14135 else
14136   cat > conftest.$ac_ext <<EOF
14137 #line 14138 "configure"
14138 #include "confdefs.h"
14139 #include <stddef.h>
14140 int main() {
14141 ptrdiff_t p
14142 ; return 0; }
14143 EOF
14144 if { (eval echo configure:14145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14145   rm -rf conftest*
14146   am_cv_type_ptrdiff_t=yes
14147 else
14148   echo "configure: failed program was:" >&5
14149   cat conftest.$ac_ext >&5
14150   rm -rf conftest*
14151   am_cv_type_ptrdiff_t=no
14152 fi
14153 rm -f conftest*
14154 fi
14155
14156 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14157    if test $am_cv_type_ptrdiff_t = yes; then
14158      cat >> confdefs.h <<\EOF
14159 #define HAVE_PTRDIFF_T 1
14160 EOF
14161
14162    fi
14163
14164 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14165 echo "configure:14166: checking return type of signal handlers" >&5
14166 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14167   echo $ac_n "(cached) $ac_c" 1>&6
14168 else
14169   cat > conftest.$ac_ext <<EOF
14170 #line 14171 "configure"
14171 #include "confdefs.h"
14172 #include <sys/types.h>
14173 #include <signal.h>
14174 #ifdef signal
14175 #undef signal
14176 #endif
14177 #ifdef __cplusplus
14178 extern "C" void (*signal (int, void (*)(int)))(int);
14179 #else
14180 void (*signal ()) ();
14181 #endif
14182
14183 int main() {
14184 int i;
14185 ; return 0; }
14186 EOF
14187 if { (eval echo configure:14188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14188   rm -rf conftest*
14189   ac_cv_type_signal=void
14190 else
14191   echo "configure: failed program was:" >&5
14192   cat conftest.$ac_ext >&5
14193   rm -rf conftest*
14194   ac_cv_type_signal=int
14195 fi
14196 rm -f conftest*
14197 fi
14198
14199 echo "$ac_t""$ac_cv_type_signal" 1>&6
14200 cat >> confdefs.h <<EOF
14201 #define RETSIGTYPE $ac_cv_type_signal
14202 EOF
14203
14204
14205 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14206 echo "configure:14207: checking for size_t" >&5
14207 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14208   echo $ac_n "(cached) $ac_c" 1>&6
14209 else
14210   cat > conftest.$ac_ext <<EOF
14211 #line 14212 "configure"
14212 #include "confdefs.h"
14213 #include <sys/types.h>
14214 #if STDC_HEADERS
14215 #include <stdlib.h>
14216 #include <stddef.h>
14217 #endif
14218
14219 EOF
14220 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14221   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14222   rm -rf conftest*
14223   eval "ac_cv_type_size_t=yes"
14224 else
14225   rm -rf conftest*
14226   eval "ac_cv_type_size_t=no"
14227 fi
14228 rm -f conftest*
14229
14230 fi
14231 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14232   echo "$ac_t""yes" 1>&6
14233 else
14234   echo "$ac_t""no" 1>&6
14235   cat >> confdefs.h <<EOF
14236 #define size_t unsigned
14237 EOF
14238
14239 fi
14240
14241
14242 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14243 echo "configure:14244: checking for ssize_t" >&5
14244 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14245   echo $ac_n "(cached) $ac_c" 1>&6
14246 else
14247   cat > conftest.$ac_ext <<EOF
14248 #line 14249 "configure"
14249 #include "confdefs.h"
14250 #include <sys/types.h>
14251 #if STDC_HEADERS
14252 #include <stdlib.h>
14253 #include <stddef.h>
14254 #endif
14255
14256 EOF
14257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14258   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14259   rm -rf conftest*
14260   eval "ac_cv_type_ssize_t=yes"
14261 else
14262   rm -rf conftest*
14263   eval "ac_cv_type_ssize_t=no"
14264 fi
14265 rm -f conftest*
14266
14267 fi
14268 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14269   echo "$ac_t""yes" 1>&6
14270 else
14271   echo "$ac_t""no" 1>&6
14272   cat >> confdefs.h <<EOF
14273 #define ssize_t signed int
14274 EOF
14275
14276 fi
14277
14278 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14279 echo "configure:14280: checking for caddr_t" >&5
14280 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14281   echo $ac_n "(cached) $ac_c" 1>&6
14282 else
14283   cat > conftest.$ac_ext <<EOF
14284 #line 14285 "configure"
14285 #include "confdefs.h"
14286 #include <sys/types.h>
14287 #if STDC_HEADERS
14288 #include <stdlib.h>
14289 #include <stddef.h>
14290 #endif
14291
14292 EOF
14293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14294   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14295   rm -rf conftest*
14296   eval "ac_cv_type_caddr_t=yes"
14297 else
14298   rm -rf conftest*
14299   eval "ac_cv_type_caddr_t=no"
14300 fi
14301 rm -f conftest*
14302
14303 fi
14304 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14305   echo "$ac_t""yes" 1>&6
14306 else
14307   echo "$ac_t""no" 1>&6
14308   cat >> confdefs.h <<EOF
14309 #define caddr_t char *
14310 EOF
14311
14312 fi
14313
14314
14315 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14316 echo "configure:14317: checking for socklen_t" >&5
14317 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14318   echo $ac_n "(cached) $ac_c" 1>&6
14319 else
14320   cat > conftest.$ac_ext <<EOF
14321 #line 14322 "configure"
14322 #include "confdefs.h"
14323
14324 #ifdef HAVE_SYS_TYPES_H
14325 #include <sys/types.h>
14326 #endif
14327 #ifdef HAVE_SYS_SOCKET_H
14328 #include <sys/socket.h>
14329 #endif
14330
14331 int main() {
14332 socklen_t len;
14333 ; return 0; }
14334 EOF
14335 if { (eval echo configure:14336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14336   rm -rf conftest*
14337   ol_cv_type_socklen_t=yes
14338 else
14339   echo "configure: failed program was:" >&5
14340   cat conftest.$ac_ext >&5
14341   rm -rf conftest*
14342   ol_cv_type_socklen_t=no
14343 fi
14344 rm -f conftest*
14345 fi
14346
14347 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14348   if test $ol_cv_type_socklen_t = no; then
14349     cat >> confdefs.h <<\EOF
14350 #define socklen_t int
14351 EOF
14352
14353   fi
14354  
14355 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14356 echo "configure:14357: checking for member st_blksize in aggregate type struct stat" >&5
14357 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14358   echo $ac_n "(cached) $ac_c" 1>&6
14359 else
14360   cat > conftest.$ac_ext <<EOF
14361 #line 14362 "configure"
14362 #include "confdefs.h"
14363 #include <sys/types.h>
14364 #include <sys/stat.h>
14365 int main() {
14366 struct stat foo; foo.st_blksize;
14367 ; return 0; }
14368 EOF
14369 if { (eval echo configure:14370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14370   rm -rf conftest*
14371   ac_cv_c_struct_member_st_blksize=yes
14372 else
14373   echo "configure: failed program was:" >&5
14374   cat conftest.$ac_ext >&5
14375   rm -rf conftest*
14376   ac_cv_c_struct_member_st_blksize=no
14377 fi
14378 rm -f conftest*
14379 fi
14380
14381 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14382 st_blksize="$ac_cv_c_struct_member_st_blksize"
14383 if test $ac_cv_c_struct_member_st_blksize = yes; then
14384   cat >> confdefs.h <<\EOF
14385 #define HAVE_ST_BLKSIZE 1
14386 EOF
14387
14388 fi
14389
14390 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14391 echo "configure:14392: checking whether time.h and sys/time.h may both be included" >&5
14392 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14393   echo $ac_n "(cached) $ac_c" 1>&6
14394 else
14395   cat > conftest.$ac_ext <<EOF
14396 #line 14397 "configure"
14397 #include "confdefs.h"
14398 #include <sys/types.h>
14399 #include <sys/time.h>
14400 #include <time.h>
14401 int main() {
14402 struct tm *tp;
14403 ; return 0; }
14404 EOF
14405 if { (eval echo configure:14406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14406   rm -rf conftest*
14407   ac_cv_header_time=yes
14408 else
14409   echo "configure: failed program was:" >&5
14410   cat conftest.$ac_ext >&5
14411   rm -rf conftest*
14412   ac_cv_header_time=no
14413 fi
14414 rm -f conftest*
14415 fi
14416
14417 echo "$ac_t""$ac_cv_header_time" 1>&6
14418 if test $ac_cv_header_time = yes; then
14419   cat >> confdefs.h <<\EOF
14420 #define TIME_WITH_SYS_TIME 1
14421 EOF
14422
14423 fi
14424
14425 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14426 echo "configure:14427: checking whether struct tm is in sys/time.h or time.h" >&5
14427 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14428   echo $ac_n "(cached) $ac_c" 1>&6
14429 else
14430   cat > conftest.$ac_ext <<EOF
14431 #line 14432 "configure"
14432 #include "confdefs.h"
14433 #include <sys/types.h>
14434 #include <time.h>
14435 int main() {
14436 struct tm *tp; tp->tm_sec;
14437 ; return 0; }
14438 EOF
14439 if { (eval echo configure:14440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14440   rm -rf conftest*
14441   ac_cv_struct_tm=time.h
14442 else
14443   echo "configure: failed program was:" >&5
14444   cat conftest.$ac_ext >&5
14445   rm -rf conftest*
14446   ac_cv_struct_tm=sys/time.h
14447 fi
14448 rm -f conftest*
14449 fi
14450
14451 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14452 if test $ac_cv_struct_tm = sys/time.h; then
14453   cat >> confdefs.h <<\EOF
14454 #define TM_IN_SYS_TIME 1
14455 EOF
14456
14457 fi
14458
14459 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14460 echo "configure:14461: checking for uid_t in sys/types.h" >&5
14461 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14462   echo $ac_n "(cached) $ac_c" 1>&6
14463 else
14464   cat > conftest.$ac_ext <<EOF
14465 #line 14466 "configure"
14466 #include "confdefs.h"
14467 #include <sys/types.h>
14468 EOF
14469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14470   egrep "uid_t" >/dev/null 2>&1; then
14471   rm -rf conftest*
14472   ac_cv_type_uid_t=yes
14473 else
14474   rm -rf conftest*
14475   ac_cv_type_uid_t=no
14476 fi
14477 rm -f conftest*
14478
14479 fi
14480
14481 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14482 if test $ac_cv_type_uid_t = no; then
14483   cat >> confdefs.h <<\EOF
14484 #define uid_t int
14485 EOF
14486
14487   cat >> confdefs.h <<\EOF
14488 #define gid_t int
14489 EOF
14490
14491 fi
14492
14493 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14494 echo "configure:14495: checking for sig_atomic_t" >&5
14495 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14496   echo $ac_n "(cached) $ac_c" 1>&6
14497 else
14498   cat > conftest.$ac_ext <<EOF
14499 #line 14500 "configure"
14500 #include "confdefs.h"
14501 #include <signal.h>
14502 int main() {
14503 sig_atomic_t atomic;
14504 ; return 0; }
14505 EOF
14506 if { (eval echo configure:14507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14507   rm -rf conftest*
14508   ol_cv_type_sig_atomic_t=yes
14509 else
14510   echo "configure: failed program was:" >&5
14511   cat conftest.$ac_ext >&5
14512   rm -rf conftest*
14513   ol_cv_type_sig_atomic_t=no
14514 fi
14515 rm -f conftest*
14516 fi
14517
14518 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14519   if test $ol_cv_type_sig_atomic_t = no; then
14520     cat >> confdefs.h <<\EOF
14521 #define sig_atomic_t int
14522 EOF
14523
14524   fi
14525  
14526
14527
14528 # test for pw_gecos in struct passwd
14529 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14530 echo "configure:14531: checking struct passwd for pw_gecos" >&5
14531 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14532   echo $ac_n "(cached) $ac_c" 1>&6
14533 else
14534   
14535         cat > conftest.$ac_ext <<EOF
14536 #line 14537 "configure"
14537 #include "confdefs.h"
14538 #include <pwd.h>
14539 int main() {
14540
14541         struct passwd pwd;
14542         pwd.pw_gecos = pwd.pw_name;
14543
14544 ; return 0; }
14545 EOF
14546 if { (eval echo configure:14547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14547   rm -rf conftest*
14548   ol_cv_struct_passwd_pw_gecos=yes
14549 else
14550   echo "configure: failed program was:" >&5
14551   cat conftest.$ac_ext >&5
14552   rm -rf conftest*
14553   ol_cv_struct_passwd_pw_gecos=no
14554 fi
14555 rm -f conftest*
14556 fi
14557
14558 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14559 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14560         cat >> confdefs.h <<\EOF
14561 #define HAVE_PW_GECOS 1
14562 EOF
14563
14564 fi
14565
14566 # test for pw_passwd in struct passwd
14567 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14568 echo "configure:14569: checking struct passwd for pw_passwd" >&5
14569 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14570   echo $ac_n "(cached) $ac_c" 1>&6
14571 else
14572   
14573         cat > conftest.$ac_ext <<EOF
14574 #line 14575 "configure"
14575 #include "confdefs.h"
14576 #include <pwd.h>
14577 int main() {
14578
14579         struct passwd pwd;
14580         pwd.pw_passwd = pwd.pw_name;
14581
14582 ; return 0; }
14583 EOF
14584 if { (eval echo configure:14585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14585   rm -rf conftest*
14586   ol_cv_struct_passwd_pw_passwd=yes
14587 else
14588   echo "configure: failed program was:" >&5
14589   cat conftest.$ac_ext >&5
14590   rm -rf conftest*
14591   ol_cv_struct_passwd_pw_passwd=no
14592 fi
14593 rm -f conftest*
14594 fi
14595
14596 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14597 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14598         cat >> confdefs.h <<\EOF
14599 #define HAVE_PW_PASSWD 1
14600 EOF
14601
14602 fi
14603
14604
14605 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14606 echo "configure:14607: checking if toupper() requires islower()" >&5
14607 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14608   echo $ac_n "(cached) $ac_c" 1>&6
14609 else
14610   
14611         if test "$cross_compiling" = yes; then
14612   ol_cv_c_upper_lower=safe
14613 else
14614   cat > conftest.$ac_ext <<EOF
14615 #line 14616 "configure"
14616 #include "confdefs.h"
14617
14618 #include <ctype.h>
14619 main()
14620 {
14621         if ('C' == toupper('C'))
14622                 exit(0);
14623         else
14624                 exit(1);
14625 }
14626 EOF
14627 if { (eval echo configure:14628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14628 then
14629   ol_cv_c_upper_lower=no
14630 else
14631   echo "configure: failed program was:" >&5
14632   cat conftest.$ac_ext >&5
14633   rm -fr conftest*
14634   ol_cv_c_upper_lower=yes
14635 fi
14636 rm -fr conftest*
14637 fi
14638
14639 fi
14640
14641 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14642 if test $ol_cv_c_upper_lower != no ; then
14643         cat >> confdefs.h <<\EOF
14644 #define C_UPPER_LOWER 1
14645 EOF
14646
14647 fi
14648
14649 echo $ac_n "checking for working const""... $ac_c" 1>&6
14650 echo "configure:14651: checking for working const" >&5
14651 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14652   echo $ac_n "(cached) $ac_c" 1>&6
14653 else
14654   cat > conftest.$ac_ext <<EOF
14655 #line 14656 "configure"
14656 #include "confdefs.h"
14657
14658 int main() {
14659
14660 /* Ultrix mips cc rejects this.  */
14661 typedef int charset[2]; const charset x;
14662 /* SunOS 4.1.1 cc rejects this.  */
14663 char const *const *ccp;
14664 char **p;
14665 /* NEC SVR4.0.2 mips cc rejects this.  */
14666 struct point {int x, y;};
14667 static struct point const zero = {0,0};
14668 /* AIX XL C 1.02.0.0 rejects this.
14669    It does not let you subtract one const X* pointer from another in an arm
14670    of an if-expression whose if-part is not a constant expression */
14671 const char *g = "string";
14672 ccp = &g + (g ? g-g : 0);
14673 /* HPUX 7.0 cc rejects these. */
14674 ++ccp;
14675 p = (char**) ccp;
14676 ccp = (char const *const *) p;
14677 { /* SCO 3.2v4 cc rejects this.  */
14678   char *t;
14679   char const *s = 0 ? (char *) 0 : (char const *) 0;
14680
14681   *t++ = 0;
14682 }
14683 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14684   int x[] = {25, 17};
14685   const int *foo = &x[0];
14686   ++foo;
14687 }
14688 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14689   typedef const int *iptr;
14690   iptr p = 0;
14691   ++p;
14692 }
14693 { /* AIX XL C 1.02.0.0 rejects this saying
14694      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14695   struct s { int j; const int *ap[3]; };
14696   struct s *b; b->j = 5;
14697 }
14698 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14699   const int foo = 10;
14700 }
14701
14702 ; return 0; }
14703 EOF
14704 if { (eval echo configure:14705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14705   rm -rf conftest*
14706   ac_cv_c_const=yes
14707 else
14708   echo "configure: failed program was:" >&5
14709   cat conftest.$ac_ext >&5
14710   rm -rf conftest*
14711   ac_cv_c_const=no
14712 fi
14713 rm -f conftest*
14714 fi
14715
14716 echo "$ac_t""$ac_cv_c_const" 1>&6
14717 if test $ac_cv_c_const = no; then
14718   cat >> confdefs.h <<\EOF
14719 #define const 
14720 EOF
14721
14722 fi
14723
14724 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14725 echo "configure:14726: checking if compiler understands volatile" >&5
14726 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14727   echo $ac_n "(cached) $ac_c" 1>&6
14728 else
14729   cat > conftest.$ac_ext <<EOF
14730 #line 14731 "configure"
14731 #include "confdefs.h"
14732 int x, y, z;
14733 int main() {
14734 volatile int a; int * volatile b = x ? &y : &z;
14735       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14736       *b = 0;
14737 ; return 0; }
14738 EOF
14739 if { (eval echo configure:14740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14740   rm -rf conftest*
14741   ol_cv_c_volatile=yes
14742 else
14743   echo "configure: failed program was:" >&5
14744   cat conftest.$ac_ext >&5
14745   rm -rf conftest*
14746   ol_cv_c_volatile=no
14747 fi
14748 rm -f conftest*
14749 fi
14750
14751 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14752   if test $ol_cv_c_volatile = yes; then
14753     : 
14754   else
14755     cat >> confdefs.h <<\EOF
14756 #define volatile 
14757 EOF
14758
14759   fi
14760  
14761
14762 if test $cross_compiling = yes ; then
14763         cat >> confdefs.h <<\EOF
14764 #define CROSS_COMPILING 1
14765 EOF
14766
14767 else
14768         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14769 echo "configure:14770: checking whether byte ordering is bigendian" >&5
14770 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14771   echo $ac_n "(cached) $ac_c" 1>&6
14772 else
14773   ac_cv_c_bigendian=unknown
14774 # See if sys/param.h defines the BYTE_ORDER macro.
14775 cat > conftest.$ac_ext <<EOF
14776 #line 14777 "configure"
14777 #include "confdefs.h"
14778 #include <sys/types.h>
14779 #include <sys/param.h>
14780 int main() {
14781
14782 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14783  bogus endian macros
14784 #endif
14785 ; return 0; }
14786 EOF
14787 if { (eval echo configure:14788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14788   rm -rf conftest*
14789   # It does; now see whether it defined to BIG_ENDIAN or not.
14790 cat > conftest.$ac_ext <<EOF
14791 #line 14792 "configure"
14792 #include "confdefs.h"
14793 #include <sys/types.h>
14794 #include <sys/param.h>
14795 int main() {
14796
14797 #if BYTE_ORDER != BIG_ENDIAN
14798  not big endian
14799 #endif
14800 ; return 0; }
14801 EOF
14802 if { (eval echo configure:14803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14803   rm -rf conftest*
14804   ac_cv_c_bigendian=yes
14805 else
14806   echo "configure: failed program was:" >&5
14807   cat conftest.$ac_ext >&5
14808   rm -rf conftest*
14809   ac_cv_c_bigendian=no
14810 fi
14811 rm -f conftest*
14812 else
14813   echo "configure: failed program was:" >&5
14814   cat conftest.$ac_ext >&5
14815 fi
14816 rm -f conftest*
14817 if test $ac_cv_c_bigendian = unknown; then
14818 if test "$cross_compiling" = yes; then
14819     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14820 else
14821   cat > conftest.$ac_ext <<EOF
14822 #line 14823 "configure"
14823 #include "confdefs.h"
14824 main () {
14825   /* Are we little or big endian?  From Harbison&Steele.  */
14826   union
14827   {
14828     long l;
14829     char c[sizeof (long)];
14830   } u;
14831   u.l = 1;
14832   exit (u.c[sizeof (long) - 1] == 1);
14833 }
14834 EOF
14835 if { (eval echo configure:14836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14836 then
14837   ac_cv_c_bigendian=no
14838 else
14839   echo "configure: failed program was:" >&5
14840   cat conftest.$ac_ext >&5
14841   rm -fr conftest*
14842   ac_cv_c_bigendian=yes
14843 fi
14844 rm -fr conftest*
14845 fi
14846
14847 fi
14848 fi
14849
14850 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14851 if test $ac_cv_c_bigendian = yes; then
14852   cat >> confdefs.h <<\EOF
14853 #define WORDS_BIGENDIAN 1
14854 EOF
14855
14856 fi
14857
14858 fi
14859
14860 echo $ac_n "checking size of short""... $ac_c" 1>&6
14861 echo "configure:14862: checking size of short" >&5 
14862 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14863   echo $ac_n "(cached) $ac_c" 1>&6
14864 else
14865   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14866   cat > conftest.$ac_ext <<EOF
14867 #line 14868 "configure"
14868 #include "confdefs.h"
14869 #include "confdefs.h" 
14870 #include <sys/types.h> 
14871  
14872
14873 int main() {
14874 switch (0) case 0: case (sizeof (short) == $ac_size):;
14875 ; return 0; }
14876 EOF
14877 if { (eval echo configure:14878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14878   rm -rf conftest*
14879   ac_cv_sizeof_short=$ac_size
14880 else
14881   echo "configure: failed program was:" >&5
14882   cat conftest.$ac_ext >&5
14883 fi
14884 rm -f conftest* 
14885   if test x$ac_cv_sizeof_short != x ; then break; fi 
14886 done 
14887
14888 fi
14889  
14890 if test x$ac_cv_sizeof_short = x ; then 
14891   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14892 fi 
14893 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14894 cat >> confdefs.h <<EOF
14895 #define SIZEOF_SHORT $ac_cv_sizeof_short
14896 EOF
14897  
14898  
14899 echo $ac_n "checking size of int""... $ac_c" 1>&6
14900 echo "configure:14901: checking size of int" >&5 
14901 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14902   echo $ac_n "(cached) $ac_c" 1>&6
14903 else
14904   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14905   cat > conftest.$ac_ext <<EOF
14906 #line 14907 "configure"
14907 #include "confdefs.h"
14908 #include "confdefs.h" 
14909 #include <sys/types.h> 
14910  
14911
14912 int main() {
14913 switch (0) case 0: case (sizeof (int) == $ac_size):;
14914 ; return 0; }
14915 EOF
14916 if { (eval echo configure:14917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14917   rm -rf conftest*
14918   ac_cv_sizeof_int=$ac_size
14919 else
14920   echo "configure: failed program was:" >&5
14921   cat conftest.$ac_ext >&5
14922 fi
14923 rm -f conftest* 
14924   if test x$ac_cv_sizeof_int != x ; then break; fi 
14925 done 
14926
14927 fi
14928  
14929 if test x$ac_cv_sizeof_int = x ; then 
14930   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14931 fi 
14932 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14933 cat >> confdefs.h <<EOF
14934 #define SIZEOF_INT $ac_cv_sizeof_int
14935 EOF
14936  
14937  
14938 echo $ac_n "checking size of long""... $ac_c" 1>&6
14939 echo "configure:14940: checking size of long" >&5 
14940 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14941   echo $ac_n "(cached) $ac_c" 1>&6
14942 else
14943   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14944   cat > conftest.$ac_ext <<EOF
14945 #line 14946 "configure"
14946 #include "confdefs.h"
14947 #include "confdefs.h" 
14948 #include <sys/types.h> 
14949  
14950
14951 int main() {
14952 switch (0) case 0: case (sizeof (long) == $ac_size):;
14953 ; return 0; }
14954 EOF
14955 if { (eval echo configure:14956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14956   rm -rf conftest*
14957   ac_cv_sizeof_long=$ac_size
14958 else
14959   echo "configure: failed program was:" >&5
14960   cat conftest.$ac_ext >&5
14961 fi
14962 rm -f conftest* 
14963   if test x$ac_cv_sizeof_long != x ; then break; fi 
14964 done 
14965
14966 fi
14967  
14968 if test x$ac_cv_sizeof_long = x ; then 
14969   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14970 fi 
14971 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14972 cat >> confdefs.h <<EOF
14973 #define SIZEOF_LONG $ac_cv_sizeof_long
14974 EOF
14975  
14976
14977
14978 if test "$ac_cv_sizeof_int" -lt 4 ; then
14979         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14980
14981         cat >> confdefs.h <<\EOF
14982 #define LBER_INT_T long
14983 EOF
14984
14985 else
14986         cat >> confdefs.h <<\EOF
14987 #define LBER_INT_T int
14988 EOF
14989
14990 fi
14991
14992 cat >> confdefs.h <<\EOF
14993 #define LBER_LEN_T long
14994 EOF
14995
14996 cat >> confdefs.h <<\EOF
14997 #define LBER_SOCKET_T int
14998 EOF
14999
15000 cat >> confdefs.h <<\EOF
15001 #define LBER_TAG_T long
15002 EOF
15003
15004
15005 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15006 echo "configure:15007: checking for 8-bit clean memcmp" >&5
15007 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15008   echo $ac_n "(cached) $ac_c" 1>&6
15009 else
15010   if test "$cross_compiling" = yes; then
15011   ac_cv_func_memcmp_clean=no
15012 else
15013   cat > conftest.$ac_ext <<EOF
15014 #line 15015 "configure"
15015 #include "confdefs.h"
15016
15017 main()
15018 {
15019   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15020   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15021 }
15022
15023 EOF
15024 if { (eval echo configure:15025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15025 then
15026   ac_cv_func_memcmp_clean=yes
15027 else
15028   echo "configure: failed program was:" >&5
15029   cat conftest.$ac_ext >&5
15030   rm -fr conftest*
15031   ac_cv_func_memcmp_clean=no
15032 fi
15033 rm -fr conftest*
15034 fi
15035
15036 fi
15037
15038 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15039 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15040
15041 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15042 echo "configure:15043: checking for strftime" >&5
15043 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15044   echo $ac_n "(cached) $ac_c" 1>&6
15045 else
15046   cat > conftest.$ac_ext <<EOF
15047 #line 15048 "configure"
15048 #include "confdefs.h"
15049 /* System header to define __stub macros and hopefully few prototypes,
15050     which can conflict with char strftime(); below.  */
15051 #include <assert.h>
15052 /* Override any gcc2 internal prototype to avoid an error.  */
15053 /* We use char because int might match the return type of a gcc2
15054     builtin and then its argument prototype would still apply.  */
15055 char strftime();
15056 char (*f)();
15057
15058 int main() {
15059
15060 /* The GNU C library defines this for functions which it implements
15061     to always fail with ENOSYS.  Some functions are actually named
15062     something starting with __ and the normal name is an alias.  */
15063 #if defined (__stub_strftime) || defined (__stub___strftime)
15064 choke me
15065 #else
15066 f = strftime;
15067 #endif
15068
15069 ; return 0; }
15070 EOF
15071 if { (eval echo configure:15072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15072   rm -rf conftest*
15073   eval "ac_cv_func_strftime=yes"
15074 else
15075   echo "configure: failed program was:" >&5
15076   cat conftest.$ac_ext >&5
15077   rm -rf conftest*
15078   eval "ac_cv_func_strftime=no"
15079 fi
15080 rm -f conftest*
15081 fi
15082
15083 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15084   echo "$ac_t""yes" 1>&6
15085   cat >> confdefs.h <<\EOF
15086 #define HAVE_STRFTIME 1
15087 EOF
15088
15089 else
15090   echo "$ac_t""no" 1>&6
15091 # strftime is in -lintl on SCO UNIX.
15092 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15093 echo "configure:15094: checking for strftime in -lintl" >&5
15094 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15095 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15096   echo $ac_n "(cached) $ac_c" 1>&6
15097 else
15098   ac_save_LIBS="$LIBS"
15099 LIBS="-lintl  $LIBS"
15100 cat > conftest.$ac_ext <<EOF
15101 #line 15102 "configure"
15102 #include "confdefs.h"
15103 /* Override any gcc2 internal prototype to avoid an error.  */
15104 /* We use char because int might match the return type of a gcc2
15105     builtin and then its argument prototype would still apply.  */
15106 char strftime();
15107
15108 int main() {
15109 strftime()
15110 ; return 0; }
15111 EOF
15112 if { (eval echo configure:15113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15113   rm -rf conftest*
15114   eval "ac_cv_lib_$ac_lib_var=yes"
15115 else
15116   echo "configure: failed program was:" >&5
15117   cat conftest.$ac_ext >&5
15118   rm -rf conftest*
15119   eval "ac_cv_lib_$ac_lib_var=no"
15120 fi
15121 rm -f conftest*
15122 LIBS="$ac_save_LIBS"
15123
15124 fi
15125 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15126   echo "$ac_t""yes" 1>&6
15127   cat >> confdefs.h <<\EOF
15128 #define HAVE_STRFTIME 1
15129 EOF
15130
15131 LIBS="-lintl $LIBS"
15132 else
15133   echo "$ac_t""no" 1>&6
15134 fi
15135
15136 fi
15137
15138
15139 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15140 echo "configure:15141: checking for inet_aton()" >&5
15141 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15142   echo $ac_n "(cached) $ac_c" 1>&6
15143 else
15144   cat > conftest.$ac_ext <<EOF
15145 #line 15146 "configure"
15146 #include "confdefs.h"
15147
15148 #ifdef HAVE_SYS_TYPES_H
15149 #       include <sys/types.h>
15150 #endif
15151 #ifdef HAVE_SYS_SOCKET_H
15152 #       include <sys/socket.h>
15153 #       ifdef HAVE_SYS_SELECT_H
15154 #               include <sys/select.h>
15155 #       endif
15156 #       include <netinet/in.h>
15157 #       ifdef HAVE_ARPA_INET_H
15158 #               include <arpa/inet.h>
15159 #       endif
15160 #endif
15161
15162 int main() {
15163 struct in_addr in;
15164 int rc = inet_aton( "255.255.255.255", &in );
15165 ; return 0; }
15166 EOF
15167 if { (eval echo configure:15168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15168   rm -rf conftest*
15169   ol_cv_func_inet_aton=yes
15170 else
15171   echo "configure: failed program was:" >&5
15172   cat conftest.$ac_ext >&5
15173   rm -rf conftest*
15174   ol_cv_func_inet_aton=no
15175 fi
15176 rm -f conftest*
15177 fi
15178
15179 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15180   if test $ol_cv_func_inet_aton != no; then
15181     cat >> confdefs.h <<\EOF
15182 #define HAVE_INET_ATON 1
15183 EOF
15184
15185   fi
15186  
15187
15188 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15189 echo "configure:15190: checking for _spawnlp" >&5
15190 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15191   echo $ac_n "(cached) $ac_c" 1>&6
15192 else
15193   cat > conftest.$ac_ext <<EOF
15194 #line 15195 "configure"
15195 #include "confdefs.h"
15196 /* System header to define __stub macros and hopefully few prototypes,
15197     which can conflict with char _spawnlp(); below.  */
15198 #include <assert.h>
15199 /* Override any gcc2 internal prototype to avoid an error.  */
15200 /* We use char because int might match the return type of a gcc2
15201     builtin and then its argument prototype would still apply.  */
15202 char _spawnlp();
15203 char (*f)();
15204
15205 int main() {
15206
15207 /* The GNU C library defines this for functions which it implements
15208     to always fail with ENOSYS.  Some functions are actually named
15209     something starting with __ and the normal name is an alias.  */
15210 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15211 choke me
15212 #else
15213 f = _spawnlp;
15214 #endif
15215
15216 ; return 0; }
15217 EOF
15218 if { (eval echo configure:15219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15219   rm -rf conftest*
15220   eval "ac_cv_func__spawnlp=yes"
15221 else
15222   echo "configure: failed program was:" >&5
15223   cat conftest.$ac_ext >&5
15224   rm -rf conftest*
15225   eval "ac_cv_func__spawnlp=no"
15226 fi
15227 rm -f conftest*
15228 fi
15229
15230 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15231   echo "$ac_t""yes" 1>&6
15232   cat >> confdefs.h <<\EOF
15233 #define HAVE_SPAWNLP 1
15234 EOF
15235
15236 else
15237   echo "$ac_t""no" 1>&6
15238 fi
15239
15240
15241 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15242 echo "configure:15243: checking for _snprintf" >&5
15243 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15244   echo $ac_n "(cached) $ac_c" 1>&6
15245 else
15246   cat > conftest.$ac_ext <<EOF
15247 #line 15248 "configure"
15248 #include "confdefs.h"
15249 /* System header to define __stub macros and hopefully few prototypes,
15250     which can conflict with char _snprintf(); below.  */
15251 #include <assert.h>
15252 /* Override any gcc2 internal prototype to avoid an error.  */
15253 /* We use char because int might match the return type of a gcc2
15254     builtin and then its argument prototype would still apply.  */
15255 char _snprintf();
15256 char (*f)();
15257
15258 int main() {
15259
15260 /* The GNU C library defines this for functions which it implements
15261     to always fail with ENOSYS.  Some functions are actually named
15262     something starting with __ and the normal name is an alias.  */
15263 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15264 choke me
15265 #else
15266 f = _snprintf;
15267 #endif
15268
15269 ; return 0; }
15270 EOF
15271 if { (eval echo configure:15272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15272   rm -rf conftest*
15273   eval "ac_cv_func__snprintf=yes"
15274 else
15275   echo "configure: failed program was:" >&5
15276   cat conftest.$ac_ext >&5
15277   rm -rf conftest*
15278   eval "ac_cv_func__snprintf=no"
15279 fi
15280 rm -f conftest*
15281 fi
15282
15283 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15284   echo "$ac_t""yes" 1>&6
15285   ac_cv_func_snprintf=yes
15286         cat >> confdefs.h <<\EOF
15287 #define snprintf _snprintf
15288 EOF
15289
15290
15291 else
15292   echo "$ac_t""no" 1>&6
15293 fi
15294
15295
15296 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15297 echo "configure:15298: checking for _vsnprintf" >&5
15298 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15299   echo $ac_n "(cached) $ac_c" 1>&6
15300 else
15301   cat > conftest.$ac_ext <<EOF
15302 #line 15303 "configure"
15303 #include "confdefs.h"
15304 /* System header to define __stub macros and hopefully few prototypes,
15305     which can conflict with char _vsnprintf(); below.  */
15306 #include <assert.h>
15307 /* Override any gcc2 internal prototype to avoid an error.  */
15308 /* We use char because int might match the return type of a gcc2
15309     builtin and then its argument prototype would still apply.  */
15310 char _vsnprintf();
15311 char (*f)();
15312
15313 int main() {
15314
15315 /* The GNU C library defines this for functions which it implements
15316     to always fail with ENOSYS.  Some functions are actually named
15317     something starting with __ and the normal name is an alias.  */
15318 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15319 choke me
15320 #else
15321 f = _vsnprintf;
15322 #endif
15323
15324 ; return 0; }
15325 EOF
15326 if { (eval echo configure:15327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15327   rm -rf conftest*
15328   eval "ac_cv_func__vsnprintf=yes"
15329 else
15330   echo "configure: failed program was:" >&5
15331   cat conftest.$ac_ext >&5
15332   rm -rf conftest*
15333   eval "ac_cv_func__vsnprintf=no"
15334 fi
15335 rm -f conftest*
15336 fi
15337
15338 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15339   echo "$ac_t""yes" 1>&6
15340   ac_cv_func_vsnprintf=yes
15341         cat >> confdefs.h <<\EOF
15342 #define vsnprintf _vsnprintf
15343 EOF
15344
15345
15346 else
15347   echo "$ac_t""no" 1>&6
15348 fi
15349
15350
15351 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15352 echo "configure:15353: checking for vprintf" >&5
15353 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15354   echo $ac_n "(cached) $ac_c" 1>&6
15355 else
15356   cat > conftest.$ac_ext <<EOF
15357 #line 15358 "configure"
15358 #include "confdefs.h"
15359 /* System header to define __stub macros and hopefully few prototypes,
15360     which can conflict with char vprintf(); below.  */
15361 #include <assert.h>
15362 /* Override any gcc2 internal prototype to avoid an error.  */
15363 /* We use char because int might match the return type of a gcc2
15364     builtin and then its argument prototype would still apply.  */
15365 char vprintf();
15366 char (*f)();
15367
15368 int main() {
15369
15370 /* The GNU C library defines this for functions which it implements
15371     to always fail with ENOSYS.  Some functions are actually named
15372     something starting with __ and the normal name is an alias.  */
15373 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15374 choke me
15375 #else
15376 f = vprintf;
15377 #endif
15378
15379 ; return 0; }
15380 EOF
15381 if { (eval echo configure:15382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15382   rm -rf conftest*
15383   eval "ac_cv_func_vprintf=yes"
15384 else
15385   echo "configure: failed program was:" >&5
15386   cat conftest.$ac_ext >&5
15387   rm -rf conftest*
15388   eval "ac_cv_func_vprintf=no"
15389 fi
15390 rm -f conftest*
15391 fi
15392
15393 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15394   echo "$ac_t""yes" 1>&6
15395   cat >> confdefs.h <<\EOF
15396 #define HAVE_VPRINTF 1
15397 EOF
15398
15399 else
15400   echo "$ac_t""no" 1>&6
15401 fi
15402
15403 if test "$ac_cv_func_vprintf" != yes; then
15404 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15405 echo "configure:15406: checking for _doprnt" >&5
15406 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15407   echo $ac_n "(cached) $ac_c" 1>&6
15408 else
15409   cat > conftest.$ac_ext <<EOF
15410 #line 15411 "configure"
15411 #include "confdefs.h"
15412 /* System header to define __stub macros and hopefully few prototypes,
15413     which can conflict with char _doprnt(); below.  */
15414 #include <assert.h>
15415 /* Override any gcc2 internal prototype to avoid an error.  */
15416 /* We use char because int might match the return type of a gcc2
15417     builtin and then its argument prototype would still apply.  */
15418 char _doprnt();
15419 char (*f)();
15420
15421 int main() {
15422
15423 /* The GNU C library defines this for functions which it implements
15424     to always fail with ENOSYS.  Some functions are actually named
15425     something starting with __ and the normal name is an alias.  */
15426 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15427 choke me
15428 #else
15429 f = _doprnt;
15430 #endif
15431
15432 ; return 0; }
15433 EOF
15434 if { (eval echo configure:15435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15435   rm -rf conftest*
15436   eval "ac_cv_func__doprnt=yes"
15437 else
15438   echo "configure: failed program was:" >&5
15439   cat conftest.$ac_ext >&5
15440   rm -rf conftest*
15441   eval "ac_cv_func__doprnt=no"
15442 fi
15443 rm -f conftest*
15444 fi
15445
15446 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15447   echo "$ac_t""yes" 1>&6
15448   cat >> confdefs.h <<\EOF
15449 #define HAVE_DOPRNT 1
15450 EOF
15451
15452 else
15453   echo "$ac_t""no" 1>&6
15454 fi
15455
15456 fi
15457
15458
15459 if test $ac_cv_func_vprintf = yes ; then
15460                 for ac_func in vsnprintf vsprintf
15461 do
15462 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15463 echo "configure:15464: checking for $ac_func" >&5
15464 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15465   echo $ac_n "(cached) $ac_c" 1>&6
15466 else
15467   cat > conftest.$ac_ext <<EOF
15468 #line 15469 "configure"
15469 #include "confdefs.h"
15470 /* System header to define __stub macros and hopefully few prototypes,
15471     which can conflict with char $ac_func(); below.  */
15472 #include <assert.h>
15473 /* Override any gcc2 internal prototype to avoid an error.  */
15474 /* We use char because int might match the return type of a gcc2
15475     builtin and then its argument prototype would still apply.  */
15476 char $ac_func();
15477 char (*f)();
15478
15479 int main() {
15480
15481 /* The GNU C library defines this for functions which it implements
15482     to always fail with ENOSYS.  Some functions are actually named
15483     something starting with __ and the normal name is an alias.  */
15484 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15485 choke me
15486 #else
15487 f = $ac_func;
15488 #endif
15489
15490 ; return 0; }
15491 EOF
15492 if { (eval echo configure:15493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15493   rm -rf conftest*
15494   eval "ac_cv_func_$ac_func=yes"
15495 else
15496   echo "configure: failed program was:" >&5
15497   cat conftest.$ac_ext >&5
15498   rm -rf conftest*
15499   eval "ac_cv_func_$ac_func=no"
15500 fi
15501 rm -f conftest*
15502 fi
15503
15504 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15505   echo "$ac_t""yes" 1>&6
15506     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15507   cat >> confdefs.h <<EOF
15508 #define $ac_tr_func 1
15509 EOF
15510  
15511 else
15512   echo "$ac_t""no" 1>&6
15513 fi
15514 done
15515
15516 fi
15517
15518 for ac_func in \
15519         bcopy                   \
15520         closesocket             \
15521         chroot                  \
15522         endgrent                \
15523         endpwent                \
15524         flock                   \
15525         getdtablesize   \
15526         getgrgid                \
15527         gethostname             \
15528         getpass                 \
15529         getpassphrase   \
15530         getpwuid                \
15531         getpwnam                \
15532         getspnam                \
15533         gettimeofday    \
15534         initgroups              \
15535         lockf                   \
15536         memcpy                  \
15537         memmove                 \
15538         mkstemp                 \
15539         pipe                    \
15540         read                    \
15541         recv                    \
15542         recvfrom                \
15543         setpwfile               \
15544         setgid                  \
15545         setegid                 \
15546         setsid                  \
15547         setuid                  \
15548         seteuid                 \
15549         sigaction               \
15550         signal                  \
15551         sigset                  \
15552         snprintf                \
15553         strdup                  \
15554         strerror                \
15555         strpbrk                 \
15556         strrchr                 \
15557         strsep                  \
15558         strstr                  \
15559         strtol                  \
15560         strtoul                 \
15561         strspn                  \
15562         sysconf                 \
15563         waitpid                 \
15564         wait4                   \
15565         write                   \
15566         send                    \
15567         sendto                  \
15568
15569 do
15570 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15571 echo "configure:15572: checking for $ac_func" >&5
15572 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15573   echo $ac_n "(cached) $ac_c" 1>&6
15574 else
15575   cat > conftest.$ac_ext <<EOF
15576 #line 15577 "configure"
15577 #include "confdefs.h"
15578 /* System header to define __stub macros and hopefully few prototypes,
15579     which can conflict with char $ac_func(); below.  */
15580 #include <assert.h>
15581 /* Override any gcc2 internal prototype to avoid an error.  */
15582 /* We use char because int might match the return type of a gcc2
15583     builtin and then its argument prototype would still apply.  */
15584 char $ac_func();
15585 char (*f)();
15586
15587 int main() {
15588
15589 /* The GNU C library defines this for functions which it implements
15590     to always fail with ENOSYS.  Some functions are actually named
15591     something starting with __ and the normal name is an alias.  */
15592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15593 choke me
15594 #else
15595 f = $ac_func;
15596 #endif
15597
15598 ; return 0; }
15599 EOF
15600 if { (eval echo configure:15601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15601   rm -rf conftest*
15602   eval "ac_cv_func_$ac_func=yes"
15603 else
15604   echo "configure: failed program was:" >&5
15605   cat conftest.$ac_ext >&5
15606   rm -rf conftest*
15607   eval "ac_cv_func_$ac_func=no"
15608 fi
15609 rm -f conftest*
15610 fi
15611
15612 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15613   echo "$ac_t""yes" 1>&6
15614     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15615   cat >> confdefs.h <<EOF
15616 #define $ac_tr_func 1
15617 EOF
15618  
15619 else
15620   echo "$ac_t""no" 1>&6
15621 fi
15622 done
15623
15624
15625 for ac_func in getopt tempnam
15626 do
15627 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15628 echo "configure:15629: checking for $ac_func" >&5
15629 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15630   echo $ac_n "(cached) $ac_c" 1>&6
15631 else
15632   cat > conftest.$ac_ext <<EOF
15633 #line 15634 "configure"
15634 #include "confdefs.h"
15635 /* System header to define __stub macros and hopefully few prototypes,
15636     which can conflict with char $ac_func(); below.  */
15637 #include <assert.h>
15638 /* Override any gcc2 internal prototype to avoid an error.  */
15639 /* We use char because int might match the return type of a gcc2
15640     builtin and then its argument prototype would still apply.  */
15641 char $ac_func();
15642 char (*f)();
15643
15644 int main() {
15645
15646 /* The GNU C library defines this for functions which it implements
15647     to always fail with ENOSYS.  Some functions are actually named
15648     something starting with __ and the normal name is an alias.  */
15649 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15650 choke me
15651 #else
15652 f = $ac_func;
15653 #endif
15654
15655 ; return 0; }
15656 EOF
15657 if { (eval echo configure:15658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15658   rm -rf conftest*
15659   eval "ac_cv_func_$ac_func=yes"
15660 else
15661   echo "configure: failed program was:" >&5
15662   cat conftest.$ac_ext >&5
15663   rm -rf conftest*
15664   eval "ac_cv_func_$ac_func=no"
15665 fi
15666 rm -f conftest*
15667 fi
15668
15669 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15670   echo "$ac_t""yes" 1>&6
15671     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15672   cat >> confdefs.h <<EOF
15673 #define $ac_tr_func 1
15674 EOF
15675  
15676 else
15677   echo "$ac_t""no" 1>&6
15678 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15679 fi
15680 done
15681
15682
15683
15684 if test "$ac_cv_func_getopt" != yes; then
15685     LIBSRCS="$LIBSRCS getopt.c"
15686 fi
15687
15688 if test "$ac_cv_func_tempnam" != yes; then
15689     LIBSRCS="$LIBSRCS tempnam.c"
15690 fi
15691
15692 # Check Configuration
15693 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15694 echo "configure:15695: checking declaration of sys_errlist" >&5
15695 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15696   echo $ac_n "(cached) $ac_c" 1>&6
15697 else
15698   
15699         cat > conftest.$ac_ext <<EOF
15700 #line 15701 "configure"
15701 #include "confdefs.h"
15702
15703 #include <stdio.h>
15704 #include <sys/types.h>
15705 #include <errno.h>
15706 #ifdef WINNT
15707 #include <stdlib.h>
15708 #endif 
15709 int main() {
15710 char *c = (char *) *sys_errlist
15711 ; return 0; }
15712 EOF
15713 if { (eval echo configure:15714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15714   rm -rf conftest*
15715   ol_cv_dcl_sys_errlist=yes
15716         ol_cv_have_sys_errlist=yes
15717 else
15718   echo "configure: failed program was:" >&5
15719   cat conftest.$ac_ext >&5
15720   rm -rf conftest*
15721   ol_cv_dcl_sys_errlist=no
15722 fi
15723 rm -f conftest*
15724 fi
15725
15726 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15727 #
15728 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15729 if test $ol_cv_dcl_sys_errlist = no ; then
15730         cat >> confdefs.h <<\EOF
15731 #define DECL_SYS_ERRLIST 1
15732 EOF
15733
15734
15735         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15736 echo "configure:15737: checking existence of sys_errlist" >&5
15737 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15738   echo $ac_n "(cached) $ac_c" 1>&6
15739 else
15740   
15741                 cat > conftest.$ac_ext <<EOF
15742 #line 15743 "configure"
15743 #include "confdefs.h"
15744 #include <errno.h>
15745 int main() {
15746 char *c = (char *) *sys_errlist
15747 ; return 0; }
15748 EOF
15749 if { (eval echo configure:15750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15750   rm -rf conftest*
15751   ol_cv_have_sys_errlist=yes
15752 else
15753   echo "configure: failed program was:" >&5
15754   cat conftest.$ac_ext >&5
15755   rm -rf conftest*
15756   ol_cv_have_sys_errlist=no
15757 fi
15758 rm -f conftest*
15759 fi
15760
15761 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15762 fi
15763 if test $ol_cv_have_sys_errlist = yes ; then
15764         cat >> confdefs.h <<\EOF
15765 #define HAVE_SYS_ERRLIST 1
15766 EOF
15767
15768 fi
15769
15770
15771
15772 if test "$ol_enable_debug" != no ; then
15773         cat >> confdefs.h <<\EOF
15774 #define LDAP_DEBUG 1
15775 EOF
15776
15777 fi
15778 if test "$ol_enable_syslog" = yes ; then
15779         cat >> confdefs.h <<\EOF
15780 #define LDAP_SYSLOG 1
15781 EOF
15782
15783 fi
15784 if test "$ol_enable_libui" = yes ; then
15785         cat >> confdefs.h <<\EOF
15786 #define LDAP_LIBUI 1
15787 EOF
15788
15789 fi
15790 if test "$ol_enable_cache" = no ; then
15791         cat >> confdefs.h <<\EOF
15792 #define LDAP_NOCACHE 1
15793 EOF
15794
15795 fi
15796 if test "$ol_link_kbind" != no ; then
15797         cat >> confdefs.h <<\EOF
15798 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15799 EOF
15800
15801 fi
15802 if test "$ol_enable_proctitle" != no ; then
15803         cat >> confdefs.h <<\EOF
15804 #define LDAP_PROCTITLE 1
15805 EOF
15806
15807 fi
15808 if test "$ol_enable_referrals" != no ; then
15809         cat >> confdefs.h <<\EOF
15810 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15811 EOF
15812
15813 fi
15814 if test "$ol_enable_cldap" != no ; then
15815         cat >> confdefs.h <<\EOF
15816 #define LDAP_CONNECTIONLESS 1
15817 EOF
15818
15819 fi
15820 if test "$ol_enable_unix" != no; then
15821         cat >> confdefs.h <<\EOF
15822 #define LDAP_PF_UNIX 1
15823 EOF
15824
15825 fi
15826 if test "$ol_enable_ipv6" != no; then
15827         cat >> confdefs.h <<\EOF
15828 #define LDAP_PF_INET6 1
15829 EOF
15830
15831 fi
15832 if test "$ol_enable_cleartext" != no ; then
15833         cat >> confdefs.h <<\EOF
15834 #define SLAPD_CLEARTEXT 1
15835 EOF
15836
15837 fi
15838 if test "$ol_enable_crypt" != no ; then
15839         cat >> confdefs.h <<\EOF
15840 #define SLAPD_CRYPT 1
15841 EOF
15842
15843 fi
15844 if test "$ol_link_kpasswd" != no ; then
15845         cat >> confdefs.h <<\EOF
15846 #define SLAPD_KPASSWD 1
15847 EOF
15848
15849 fi
15850 if test "$ol_link_spasswd" != no ; then
15851         cat >> confdefs.h <<\EOF
15852 #define SLAPD_SPASSWD 1
15853 EOF
15854
15855 fi
15856 if test "$ol_enable_multimaster" != no ; then
15857         cat >> confdefs.h <<\EOF
15858 #define SLAPD_MULTIMASTER 1
15859 EOF
15860
15861 fi
15862 if test "$ol_enable_phonetic" != no ; then
15863         cat >> confdefs.h <<\EOF
15864 #define SLAPD_PHONETIC 1
15865 EOF
15866
15867 fi
15868 if test "$ol_enable_rlookups" != no ; then
15869         cat >> confdefs.h <<\EOF
15870 #define SLAPD_RLOOKUPS 1
15871 EOF
15872
15873 fi
15874 if test "$ol_enable_aci" != no ; then
15875         cat >> confdefs.h <<\EOF
15876 #define SLAPD_ACI_ENABLED 1
15877 EOF
15878
15879 fi
15880
15881 if test "$ol_link_modules" != no ; then
15882         cat >> confdefs.h <<\EOF
15883 #define SLAPD_MODULES 1
15884 EOF
15885
15886         BUILD_SLAPD=yes
15887         SLAPD_MODULES_LDFLAGS="-dlopen self"
15888 fi
15889
15890 if test "$ol_link_dnssrv" != no ; then
15891         cat >> confdefs.h <<\EOF
15892 #define SLAPD_DNSSRV 1
15893 EOF
15894
15895         BUILD_SLAPD=yes
15896         BUILD_DNSSRV=yes
15897         if test "$ol_with_dnssrv_module" != static ; then
15898                 cat >> confdefs.h <<\EOF
15899 #define SLAPD_DNSSRV_DYNAMIC 1
15900 EOF
15901
15902                 BUILD_DNSSRV=mod
15903                 BUILD_DNSSRV_DYNAMIC=shared
15904                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15905         fi
15906 fi
15907
15908 if test "$ol_enable_ldap" != no ; then
15909         cat >> confdefs.h <<\EOF
15910 #define SLAPD_LDAP 1
15911 EOF
15912
15913         BUILD_SLAPD=yes
15914         BUILD_LDAP=yes
15915         if test "$ol_with_ldap_module" != static ; then
15916                 cat >> confdefs.h <<\EOF
15917 #define SLAPD_LDAP_DYNAMIC 1
15918 EOF
15919
15920                 BUILD_LDAP=mod
15921                 BUILD_LDAP_DYNAMIC=shared
15922                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15923         fi
15924 fi
15925
15926 if test "$ol_link_ldbm" != no ; then
15927         cat >> confdefs.h <<\EOF
15928 #define SLAPD_LDBM 1
15929 EOF
15930
15931         BUILD_SLAPD=yes
15932         BUILD_LDBM=yes
15933         if test "$ol_with_ldbm_module" != static ; then
15934                 cat >> confdefs.h <<\EOF
15935 #define SLAPD_LDBM_DYNAMIC 1
15936 EOF
15937
15938                 BUILD_LDBM=mod
15939                 BUILD_LDBM_DYNAMIC=shared
15940                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15941         fi
15942 fi
15943
15944 if test "$ol_enable_passwd" != no ; then
15945         cat >> confdefs.h <<\EOF
15946 #define SLAPD_PASSWD 1
15947 EOF
15948
15949         BUILD_SLAPD=yes
15950         BUILD_PASSWD=yes
15951         if test "$ol_with_passwd_module" != static ; then
15952                 cat >> confdefs.h <<\EOF
15953 #define SLAPD_PASSWD_DYNAMIC 1
15954 EOF
15955
15956                 BUILD_PASSWD=mod
15957                 BUILD_PASSWD_DYNAMIC=shared
15958                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15959         fi
15960 fi
15961
15962 if test "$ol_link_perl" != no ; then
15963         cat >> confdefs.h <<\EOF
15964 #define SLAPD_PERL 1
15965 EOF
15966
15967         BUILD_SLAPD=yes
15968         BUILD_PERL=yes
15969         if test "$ol_with_perl_module" != static ; then
15970                 cat >> confdefs.h <<\EOF
15971 #define SLAPD_PERL_DYNAMIC 1
15972 EOF
15973
15974                 BUILD_PERL=mod
15975                 BUILD_PERL_DYNAMIC=shared
15976                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15977         fi
15978 fi
15979
15980 if test "$ol_enable_shell" != no ; then
15981         cat >> confdefs.h <<\EOF
15982 #define SLAPD_SHELL 1
15983 EOF
15984
15985         BUILD_SLAPD=yes
15986         BUILD_SHELL=yes
15987         if test "$ol_with_shell_module" != static ; then
15988                 cat >> confdefs.h <<\EOF
15989 #define SLAPD_SHELL_DYNAMIC 1
15990 EOF
15991
15992                 BUILD_SHELL=mod
15993                 BUILD_SHELL_DYNAMIC=shared
15994                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15995         fi
15996 fi
15997
15998 if test "$ol_enable_tcl" != no ; then
15999         cat >> confdefs.h <<\EOF
16000 #define SLAPD_TCL 1
16001 EOF
16002
16003         BUILD_SLAPD=yes
16004         BUILD_TCL=yes
16005         if test "$ol_with_tcl_module" != static; then
16006                 cat >> confdefs.h <<\EOF
16007 #define SLAPD_TCL_DYNAMIC 1
16008 EOF
16009
16010                 BUILD_TCL=mod
16011                 BUILD_TCL_DYNAMIC=shared
16012                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16013         fi
16014 fi
16015
16016 if test "$ol_enable_sql" != no ; then
16017         cat >> confdefs.h <<\EOF
16018 #define SLAPD_SQL 1
16019 EOF
16020
16021         BUILD_SLAPD=yes
16022         BUILD_SQL=yes
16023         SLAPD_SQL_LIBS=-liodbc
16024         if test "$ol_with_sql_module" != static; then
16025                 cat >> confdefs.h <<\EOF
16026 #define SLAPD_SQL_DYNAMIC 1
16027 EOF
16028
16029                 BUILD_SQL=mod
16030                 BUILD_SQL_DYNAMIC=shared
16031                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16032         fi
16033 fi
16034
16035 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16036         $BUILD_SLAPD = yes ; then
16037         BUILD_SLURPD=yes
16038 fi
16039
16040
16041 if test "$LINK_BINS_DYNAMIC" = yes; then
16042     LIB_LINKAGE=DYN
16043     LT_LIB_LINKAGE=shared
16044 else
16045     LIB_LINKAGE=STAT
16046     LT_LIB_LINKAGE=static
16047 fi
16048
16049 if test "$ac_cv_mingw32" = yes ; then
16050     PLAT=NT
16051     DYN_EXT=dll
16052 else
16053     PLAT=UNIX
16054     DYN_EXT=so
16055 fi
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065   
16066   
16067   
16068   
16069   
16070   
16071   
16072   
16073   
16074   
16075   
16076   
16077   
16078   
16079   
16080   
16081   
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118 trap '' 1 2 15
16119
16120 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16121
16122 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16123 # Let make expand exec_prefix.
16124 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16125
16126 # Any assignment to VPATH causes Sun make to only execute
16127 # the first set of double-colon rules, so remove it if not needed.
16128 # If there is a colon in the path, we need to keep it.
16129 if test "x$srcdir" = x.; then
16130   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16131 fi
16132
16133 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16134
16135 DEFS=-DHAVE_CONFIG_H
16136
16137 # Without the "./", some shells look in PATH for config.status.
16138 : ${CONFIG_STATUS=./config.status}
16139
16140 echo creating $CONFIG_STATUS
16141 rm -f $CONFIG_STATUS
16142 cat > $CONFIG_STATUS <<EOF
16143 #! /bin/sh
16144 # Generated automatically by configure.
16145 # Run this file to recreate the current configuration.
16146 # This directory was configured as follows,
16147 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16148 #
16149 # $0 $ac_configure_args
16150 #
16151 # Compiler output produced by configure, useful for debugging
16152 # configure, is in ./config.log if it exists.
16153
16154 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16155 for ac_option
16156 do
16157   case "\$ac_option" in
16158   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16159     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16160     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16161   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16162     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16163     exit 0 ;;
16164   -help | --help | --hel | --he | --h)
16165     echo "\$ac_cs_usage"; exit 0 ;;
16166   *) echo "\$ac_cs_usage"; exit 1 ;;
16167   esac
16168 done
16169
16170 ac_given_srcdir=$srcdir
16171 ac_given_INSTALL="$INSTALL"
16172
16173 trap 'rm -fr `echo "\
16174 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16175 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16176 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16177 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16178 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16179 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16180 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16181 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16182 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16183 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16184 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16185 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16186 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16187 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16188 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16189 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16190 include/Makefile:build/top.mk:include/Makefile.in \
16191 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16192 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16193 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16194 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16195 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16196 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16197 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16198 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16199 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16200 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16201 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16202 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16203 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16204 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16205 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16206 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16207 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16208 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16209 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16210 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16211 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16212 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16213 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16214 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16215 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16216 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16217 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16218  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16219 EOF
16220 cat >> $CONFIG_STATUS <<EOF
16221
16222 # Protect against being on the right side of a sed subst in config.status.
16223 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16224  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16225 $ac_vpsub
16226 $extrasub
16227 s%@SHELL@%$SHELL%g
16228 s%@CFLAGS@%$CFLAGS%g
16229 s%@CPPFLAGS@%$CPPFLAGS%g
16230 s%@CXXFLAGS@%$CXXFLAGS%g
16231 s%@FFLAGS@%$FFLAGS%g
16232 s%@DEFS@%$DEFS%g
16233 s%@LDFLAGS@%$LDFLAGS%g
16234 s%@LIBS@%$LIBS%g
16235 s%@exec_prefix@%$exec_prefix%g
16236 s%@prefix@%$prefix%g
16237 s%@program_transform_name@%$program_transform_name%g
16238 s%@bindir@%$bindir%g
16239 s%@sbindir@%$sbindir%g
16240 s%@libexecdir@%$libexecdir%g
16241 s%@datadir@%$datadir%g
16242 s%@sysconfdir@%$sysconfdir%g
16243 s%@sharedstatedir@%$sharedstatedir%g
16244 s%@localstatedir@%$localstatedir%g
16245 s%@libdir@%$libdir%g
16246 s%@includedir@%$includedir%g
16247 s%@oldincludedir@%$oldincludedir%g
16248 s%@infodir@%$infodir%g
16249 s%@mandir@%$mandir%g
16250 s%@host@%$host%g
16251 s%@host_alias@%$host_alias%g
16252 s%@host_cpu@%$host_cpu%g
16253 s%@host_vendor@%$host_vendor%g
16254 s%@host_os@%$host_os%g
16255 s%@target@%$target%g
16256 s%@target_alias@%$target_alias%g
16257 s%@target_cpu@%$target_cpu%g
16258 s%@target_vendor@%$target_vendor%g
16259 s%@target_os@%$target_os%g
16260 s%@build@%$build%g
16261 s%@build_alias@%$build_alias%g
16262 s%@build_cpu@%$build_cpu%g
16263 s%@build_vendor@%$build_vendor%g
16264 s%@build_os@%$build_os%g
16265 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16266 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16267 s%@INSTALL_DATA@%$INSTALL_DATA%g
16268 s%@PACKAGE@%$PACKAGE%g
16269 s%@VERSION@%$VERSION%g
16270 s%@ACLOCAL@%$ACLOCAL%g
16271 s%@AUTOCONF@%$AUTOCONF%g
16272 s%@AUTOMAKE@%$AUTOMAKE%g
16273 s%@AUTOHEADER@%$AUTOHEADER%g
16274 s%@MAKEINFO@%$MAKEINFO%g
16275 s%@install_sh@%$install_sh%g
16276 s%@AMTAR@%$AMTAR%g
16277 s%@AWK@%$AWK%g
16278 s%@AMTARFLAGS@%$AMTARFLAGS%g
16279 s%@SET_MAKE@%$SET_MAKE%g
16280 s%@top_builddir@%$top_builddir%g
16281 s%@ldap_subdir@%$ldap_subdir%g
16282 s%@CC@%$CC%g
16283 s%@RANLIB@%$RANLIB%g
16284 s%@LN_S@%$LN_S%g
16285 s%@DLLTOOL@%$DLLTOOL%g
16286 s%@AS@%$AS%g
16287 s%@OBJDUMP@%$OBJDUMP%g
16288 s%@LIBTOOL@%$LIBTOOL%g
16289 s%@LN_H@%$LN_H%g
16290 s%@SENDMAIL@%$SENDMAIL%g
16291 s%@EDITOR@%$EDITOR%g
16292 s%@FINGER@%$FINGER%g
16293 s%@PERLBIN@%$PERLBIN%g
16294 s%@CPP@%$CPP%g
16295 s%@EXEEXT@%$EXEEXT%g
16296 s%@OBJEXT@%$OBJEXT%g
16297 s%@OL_MKDEP@%$OL_MKDEP%g
16298 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16299 s%@LIBOBJS@%$LIBOBJS%g
16300 s%@LIBSRCS@%$LIBSRCS%g
16301 s%@PLAT@%$PLAT%g
16302 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16303 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16304 s%@DYN_EXT@%$DYN_EXT%g
16305 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16306 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16307 s%@BUILD_LDAP@%$BUILD_LDAP%g
16308 s%@BUILD_LDBM@%$BUILD_LDBM%g
16309 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16310 s%@BUILD_PERL@%$BUILD_PERL%g
16311 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16312 s%@BUILD_SHELL@%$BUILD_SHELL%g
16313 s%@BUILD_SQL@%$BUILD_SQL%g
16314 s%@BUILD_TCL@%$BUILD_TCL%g
16315 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16316 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16317 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16318 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16319 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16320 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16321 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16322 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16323 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16324 s%@LDAP_LIBS@%$LDAP_LIBS%g
16325 s%@LDIF_LIBS@%$LDIF_LIBS%g
16326 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16327 s%@QUIPU_LIBS@%$QUIPU_LIBS%g
16328 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16329 s%@LDBM_LIBS@%$LDBM_LIBS%g
16330 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16331 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16332 s%@WRAP_LIBS@%$WRAP_LIBS%g
16333 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16334 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16335 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16336 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16337 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16338 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16339 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16340 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16341 s%@KRB4_LIBS@%$KRB4_LIBS%g
16342 s%@KRB5_LIBS@%$KRB5_LIBS%g
16343 s%@READLINE_LIBS@%$READLINE_LIBS%g
16344 s%@SASL_LIBS@%$SASL_LIBS%g
16345 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16346 s%@TLS_LIBS@%$TLS_LIBS%g
16347 s%@MODULES_LIBS@%$MODULES_LIBS%g
16348 s%@AUTH_LIBS@%$AUTH_LIBS%g
16349 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16350 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16351 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16352
16353 CEOF
16354 EOF
16355
16356 cat >> $CONFIG_STATUS <<\EOF
16357
16358 # Split the substitutions into bite-sized pieces for seds with
16359 # small command number limits, like on Digital OSF/1 and HP-UX.
16360 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16361 ac_file=1 # Number of current file.
16362 ac_beg=1 # First line for current file.
16363 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16364 ac_more_lines=:
16365 ac_sed_cmds=""
16366 while $ac_more_lines; do
16367   if test $ac_beg -gt 1; then
16368     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16369   else
16370     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16371   fi
16372   if test ! -s conftest.s$ac_file; then
16373     ac_more_lines=false
16374     rm -f conftest.s$ac_file
16375   else
16376     if test -z "$ac_sed_cmds"; then
16377       ac_sed_cmds="sed -f conftest.s$ac_file"
16378     else
16379       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16380     fi
16381     ac_file=`expr $ac_file + 1`
16382     ac_beg=$ac_end
16383     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16384   fi
16385 done
16386 if test -z "$ac_sed_cmds"; then
16387   ac_sed_cmds=cat
16388 fi
16389 EOF
16390
16391 cat >> $CONFIG_STATUS <<EOF
16392
16393 CONFIG_FILES=\${CONFIG_FILES-"\
16394 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16395 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16396 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16397 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16398 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16399 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16400 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16401 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16402 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16403 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16404 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16405 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16406 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16407 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16408 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16409 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16410 include/Makefile:build/top.mk:include/Makefile.in \
16411 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16412 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16413 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16414 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16415 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16416 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16417 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16418 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16419 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16420 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16421 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16422 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16423 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16424 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16425 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16426 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16427 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16428 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16429 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16430 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16431 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16432 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16433 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16434 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16435 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16436 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16437 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16438 "}
16439 EOF
16440 cat >> $CONFIG_STATUS <<\EOF
16441 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16442   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16443   case "$ac_file" in
16444   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16445        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16446   *) ac_file_in="${ac_file}.in" ;;
16447   esac
16448
16449   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16450
16451   # Remove last slash and all that follows it.  Not all systems have dirname.
16452   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16453   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16454     # The file is in a subdirectory.
16455     test ! -d "$ac_dir" && mkdir "$ac_dir"
16456     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16457     # A "../" for each directory in $ac_dir_suffix.
16458     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16459   else
16460     ac_dir_suffix= ac_dots=
16461   fi
16462
16463   case "$ac_given_srcdir" in
16464   .)  srcdir=.
16465       if test -z "$ac_dots"; then top_srcdir=.
16466       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16467   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16468   *) # Relative path.
16469     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16470     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16471   esac
16472
16473   case "$ac_given_INSTALL" in
16474   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16475   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16476   esac
16477
16478   echo creating "$ac_file"
16479   rm -f "$ac_file"
16480   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16481   case "$ac_file" in
16482   *[Mm]akefile*) ac_comsub="1i\\
16483 # $configure_input" ;;
16484   *) ac_comsub= ;;
16485   esac
16486
16487   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16488   sed -e "$ac_comsub
16489 s%@configure_input@%$configure_input%g
16490 s%@srcdir@%$srcdir%g
16491 s%@top_srcdir@%$top_srcdir%g
16492 s%@INSTALL@%$INSTALL%g
16493 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16494 fi; done
16495 rm -f conftest.s*
16496
16497 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16498 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16499 #
16500 # ac_d sets the value in "#define NAME VALUE" lines.
16501 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16502 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16503 ac_dC='\3'
16504 ac_dD='%g'
16505 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16506 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16507 ac_uB='\([      ]\)%\1#\2define\3'
16508 ac_uC=' '
16509 ac_uD='\4%g'
16510 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16511 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16512 ac_eB='$%\1#\2define\3'
16513 ac_eC=' '
16514 ac_eD='%g'
16515
16516 if test "${CONFIG_HEADERS+set}" != set; then
16517 EOF
16518 cat >> $CONFIG_STATUS <<EOF
16519   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16520 EOF
16521 cat >> $CONFIG_STATUS <<\EOF
16522 fi
16523 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16524   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16525   case "$ac_file" in
16526   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16527        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16528   *) ac_file_in="${ac_file}.in" ;;
16529   esac
16530
16531   echo creating $ac_file
16532
16533   rm -f conftest.frag conftest.in conftest.out
16534   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16535   cat $ac_file_inputs > conftest.in
16536
16537 EOF
16538
16539 # Transform confdefs.h into a sed script conftest.vals that substitutes
16540 # the proper values into config.h.in to produce config.h.  And first:
16541 # Protect against being on the right side of a sed subst in config.status.
16542 # Protect against being in an unquoted here document in config.status.
16543 rm -f conftest.vals
16544 cat > conftest.hdr <<\EOF
16545 s/[\\&%]/\\&/g
16546 s%[\\$`]%\\&%g
16547 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16548 s%ac_d%ac_u%gp
16549 s%ac_u%ac_e%gp
16550 EOF
16551 sed -n -f conftest.hdr confdefs.h > conftest.vals
16552 rm -f conftest.hdr
16553
16554 # This sed command replaces #undef with comments.  This is necessary, for
16555 # example, in the case of _POSIX_SOURCE, which is predefined and required
16556 # on some systems where configure will not decide to define it.
16557 cat >> conftest.vals <<\EOF
16558 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16559 EOF
16560
16561 # Break up conftest.vals because some shells have a limit on
16562 # the size of here documents, and old seds have small limits too.
16563
16564 rm -f conftest.tail
16565 while :
16566 do
16567   ac_lines=`grep -c . conftest.vals`
16568   # grep -c gives empty output for an empty file on some AIX systems.
16569   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16570   # Write a limited-size here document to conftest.frag.
16571   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16572   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16573   echo 'CEOF
16574   sed -f conftest.frag conftest.in > conftest.out
16575   rm -f conftest.in
16576   mv conftest.out conftest.in
16577 ' >> $CONFIG_STATUS
16578   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16579   rm -f conftest.vals
16580   mv conftest.tail conftest.vals
16581 done
16582 rm -f conftest.vals
16583
16584 cat >> $CONFIG_STATUS <<\EOF
16585   rm -f conftest.frag conftest.h
16586   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16587   cat conftest.in >> conftest.h
16588   rm -f conftest.in
16589   if cmp -s $ac_file conftest.h 2>/dev/null; then
16590     echo "$ac_file is unchanged"
16591     rm -f conftest.h
16592   else
16593     # Remove last slash and all that follows it.  Not all systems have dirname.
16594       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16595       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16596       # The file is in a subdirectory.
16597       test ! -d "$ac_dir" && mkdir "$ac_dir"
16598     fi
16599     rm -f $ac_file
16600     mv conftest.h $ac_file
16601   fi
16602 fi; done
16603
16604 EOF
16605 cat >> $CONFIG_STATUS <<EOF
16606
16607 EOF
16608 cat >> $CONFIG_STATUS <<\EOF
16609
16610 date > stamp-h
16611 echo Please \"make depend\" to build dependencies
16612
16613 exit 0
16614 EOF
16615 chmod +x $CONFIG_STATUS
16616 rm -fr confdefs* $ac_clean_files
16617 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16618