]> git.sur5r.net Git - openldap/blob - configure
Fix ACI group membership test to look up OC.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.313 2000/06/09 15:01:08 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals    enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind        enable V2 Kerberos IV bind (auto)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-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         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10292 echo "configure:10293: checking for pthread_kill_other_threads_np" >&5
10293 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10294   echo $ac_n "(cached) $ac_c" 1>&6
10295 else
10296   cat > conftest.$ac_ext <<EOF
10297 #line 10298 "configure"
10298 #include "confdefs.h"
10299 /* System header to define __stub macros and hopefully few prototypes,
10300     which can conflict with char pthread_kill_other_threads_np(); below.  */
10301 #include <assert.h>
10302 /* Override any gcc2 internal prototype to avoid an error.  */
10303 /* We use char because int might match the return type of a gcc2
10304     builtin and then its argument prototype would still apply.  */
10305 char pthread_kill_other_threads_np();
10306 char (*f)();
10307
10308 int main() {
10309
10310 /* The GNU C library defines this for functions which it implements
10311     to always fail with ENOSYS.  Some functions are actually named
10312     something starting with __ and the normal name is an alias.  */
10313 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10314 choke me
10315 #else
10316 f = pthread_kill_other_threads_np;
10317 #endif
10318
10319 ; return 0; }
10320 EOF
10321 if { (eval echo configure:10322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10322   rm -rf conftest*
10323   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10324 else
10325   echo "configure: failed program was:" >&5
10326   cat conftest.$ac_ext >&5
10327   rm -rf conftest*
10328   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10329 fi
10330 rm -f conftest*
10331 fi
10332
10333 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10334   echo "$ac_t""yes" 1>&6
10335   :
10336 else
10337   echo "$ac_t""no" 1>&6
10338 fi
10339
10340         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10341 echo "configure:10342: checking for LinuxThreads implementation" >&5
10342 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10343   echo $ac_n "(cached) $ac_c" 1>&6
10344 else
10345   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10346 fi
10347
10348 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10349
10350                         
10351         
10352         
10353         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10354 echo "configure:10355: checking for LinuxThreads consistency" >&5
10355 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10356   echo $ac_n "(cached) $ac_c" 1>&6
10357 else
10358   
10359                 if test $ol_cv_header_linux_threads = yes -a \
10360                         $ol_cv_sys_linux_threads = yes; then
10361                         ol_cv_linux_threads=yes
10362                 elif test $ol_cv_header_linux_threads = no -a \
10363                         $ol_cv_sys_linux_threads = no; then
10364                         ol_cv_linux_threads=no
10365                 else
10366                         ol_cv_linux_threads=error
10367                 fi
10368         
10369 fi
10370
10371 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10372
10373
10374                         if test $ol_cv_linux_threads = error; then
10375                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10376                         fi
10377
10378                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10379 echo "configure:10380: checking if pthread_create() works" >&5
10380 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10381   echo $ac_n "(cached) $ac_c" 1>&6
10382 else
10383   
10384                         if test "$cross_compiling" = yes; then
10385                                 ol_cv_pthread_create_works=yes
10386 else
10387   cat > conftest.$ac_ext <<EOF
10388 #line 10389 "configure"
10389 #include "confdefs.h"
10390 /* pthread test headers */
10391 #include <pthread.h>
10392 #ifndef NULL
10393 #define NULL (void*)0
10394 #endif
10395
10396 static void *task(p)
10397         void *p;
10398 {
10399         return (void *) (p == NULL);
10400 }
10401
10402
10403 int main(argc, argv)
10404         int argc;
10405         char **argv;
10406 {
10407
10408         /* pthread test function */
10409         pthread_t t;
10410         int status;
10411 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10412         /* This system (e.g. AIX) defaults detached; must override */
10413         pthread_attr_t attr;
10414
10415         status = pthread_attr_init(&attr);
10416         if( status ) exit( status );
10417
10418         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10419         if( status ) exit( status );
10420
10421 #define ATTR    &attr
10422 #else
10423 #if HAVE_PTHREADS_D4
10424 #define ATTR    pthread_attr_default
10425 #else
10426 #define ATTR    NULL
10427 #endif
10428 #endif
10429         /* make sure pthread_create() isn't just a stub */
10430         status = pthread_create(&t, ATTR, task, NULL);
10431         if( status ) exit( status );
10432
10433         /* make sure pthread_detach() isn't just a stub */
10434 #if HAVE_PTHREADS_D4
10435         status = pthread_detach( &t );
10436 #else
10437         status = pthread_detach( t );
10438 #endif
10439
10440 #ifdef HAVE_LINUX_THREADS
10441         pthread_kill_other_threads_np();
10442 #endif
10443
10444         exit( status );
10445
10446 }
10447
10448 EOF
10449 if { (eval echo configure:10450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10450 then
10451   ol_cv_pthread_create_works=yes
10452 else
10453   echo "configure: failed program was:" >&5
10454   cat conftest.$ac_ext >&5
10455   rm -fr conftest*
10456   ol_cv_pthread_create_works=no
10457 fi
10458 rm -fr conftest*
10459 fi
10460
10461 fi
10462
10463 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10464
10465                         if test $ol_cv_pthread_create_works = no ; then
10466                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10467                         fi
10468
10469                                                 if test $ol_with_yielding_select = auto ; then
10470                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10471 echo "configure:10472: checking if select yields when using pthreads" >&5
10472 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10473   echo $ac_n "(cached) $ac_c" 1>&6
10474 else
10475   
10476                                 if test "$cross_compiling" = yes; then
10477   ol_cv_pthread_select_yields=cross
10478 else
10479   cat > conftest.$ac_ext <<EOF
10480 #line 10481 "configure"
10481 #include "confdefs.h"
10482
10483 #include <sys/types.h>
10484 #include <sys/time.h>
10485 #include <unistd.h>
10486 #include <pthread.h>
10487 #ifndef NULL
10488 #define NULL (void*) 0
10489 #endif
10490
10491 static int fildes[2];
10492
10493 static void *task(p)
10494         void *p;
10495 {
10496         int i;
10497         struct timeval tv;
10498
10499         fd_set rfds;
10500
10501         tv.tv_sec=10;
10502         tv.tv_usec=0;
10503
10504         FD_ZERO(&rfds);
10505         FD_SET(fildes[0], &rfds);
10506
10507         /* we're not interested in any fds */
10508         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10509
10510         if(i < 0) {
10511                 perror("select");
10512                 exit(10);
10513         }
10514
10515         exit(0); /* if we exit here, the select blocked the whole process */
10516 }
10517
10518 int main(argc, argv)
10519         int argc;
10520         char **argv;
10521 {
10522         pthread_t t;
10523
10524         /* create a pipe to select */
10525         if(pipe(&fildes[0])) {
10526                 perror("select");
10527                 exit(1);
10528         }
10529
10530 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10531         (void) pthread_setconcurrency(2);
10532 #else
10533 #ifdef HAVE_THR_SETCONCURRENCY
10534         /* Set Solaris LWP concurrency to 2 */
10535         thr_setconcurrency(2);
10536 #endif
10537 #endif
10538
10539 #if HAVE_PTHREADS_D4
10540         pthread_create(&t, pthread_attr_default, task, NULL);
10541 #else
10542         pthread_create(&t, NULL, task, NULL);
10543 #endif
10544
10545 #if HAVE_SCHED_YIELD
10546         sched_yield();  /* make sure task runs first */
10547 #else
10548 #ifdef HAVE_PTHREAD_YIELD
10549         pthread_yield();        /* make sure task runs first */
10550 #endif
10551 #endif
10552
10553         exit(2);
10554 }
10555 EOF
10556 if { (eval echo configure:10557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10557 then
10558   ol_cv_pthread_select_yields=no
10559 else
10560   echo "configure: failed program was:" >&5
10561   cat conftest.$ac_ext >&5
10562   rm -fr conftest*
10563   ol_cv_pthread_select_yields=yes
10564 fi
10565 rm -fr conftest*
10566 fi
10567
10568 fi
10569
10570 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10571
10572                                 if test $ol_cv_pthread_select_yields = cross ; then
10573                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10574                                 fi
10575
10576                                 if test $ol_cv_pthread_select_yields = yes ; then
10577                                         ol_with_yielding_select=yes
10578                                 fi
10579                         fi
10580
10581                                                 CPPFLAGS="$save_CPPFLAGS"
10582                         LIBS="$save_LIBS"
10583                 else
10584                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10585                 fi
10586         fi
10587
10588         if test $ol_with_threads = posix ; then
10589                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10590         fi
10591 fi
10592
10593 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10594         -o $ol_with_threads = mach ; then
10595
10596                 for ac_hdr in mach/cthreads.h
10597 do
10598 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10599 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10600 echo "configure:10601: checking for $ac_hdr" >&5
10601 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10602   echo $ac_n "(cached) $ac_c" 1>&6
10603 else
10604   cat > conftest.$ac_ext <<EOF
10605 #line 10606 "configure"
10606 #include "confdefs.h"
10607 #include <$ac_hdr>
10608 EOF
10609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10610 { (eval echo configure:10611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10612 if test -z "$ac_err"; then
10613   rm -rf conftest*
10614   eval "ac_cv_header_$ac_safe=yes"
10615 else
10616   echo "$ac_err" >&5
10617   echo "configure: failed program was:" >&5
10618   cat conftest.$ac_ext >&5
10619   rm -rf conftest*
10620   eval "ac_cv_header_$ac_safe=no"
10621 fi
10622 rm -f conftest*
10623 fi
10624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10625   echo "$ac_t""yes" 1>&6
10626     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10627   cat >> confdefs.h <<EOF
10628 #define $ac_tr_hdr 1
10629 EOF
10630  
10631 else
10632   echo "$ac_t""no" 1>&6
10633 fi
10634 done
10635
10636         if test $ac_cv_header_mach_cthreads_h = yes ; then
10637                 ol_with_threads=found
10638
10639                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10640 echo "configure:10641: checking for cthread_fork" >&5
10641 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10642   echo $ac_n "(cached) $ac_c" 1>&6
10643 else
10644   cat > conftest.$ac_ext <<EOF
10645 #line 10646 "configure"
10646 #include "confdefs.h"
10647 /* System header to define __stub macros and hopefully few prototypes,
10648     which can conflict with char cthread_fork(); below.  */
10649 #include <assert.h>
10650 /* Override any gcc2 internal prototype to avoid an error.  */
10651 /* We use char because int might match the return type of a gcc2
10652     builtin and then its argument prototype would still apply.  */
10653 char cthread_fork();
10654 char (*f)();
10655
10656 int main() {
10657
10658 /* The GNU C library defines this for functions which it implements
10659     to always fail with ENOSYS.  Some functions are actually named
10660     something starting with __ and the normal name is an alias.  */
10661 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10662 choke me
10663 #else
10664 f = cthread_fork;
10665 #endif
10666
10667 ; return 0; }
10668 EOF
10669 if { (eval echo configure:10670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10670   rm -rf conftest*
10671   eval "ac_cv_func_cthread_fork=yes"
10672 else
10673   echo "configure: failed program was:" >&5
10674   cat conftest.$ac_ext >&5
10675   rm -rf conftest*
10676   eval "ac_cv_func_cthread_fork=no"
10677 fi
10678 rm -f conftest*
10679 fi
10680
10681 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10682   echo "$ac_t""yes" 1>&6
10683   ol_link_threads=yes
10684 else
10685   echo "$ac_t""no" 1>&6
10686 fi
10687
10688
10689                 if test $ol_link_threads = no ; then
10690                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10691 echo "configure:10692: checking for cthread_fork with -all_load" >&5
10692 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10693   echo $ac_n "(cached) $ac_c" 1>&6
10694 else
10695   
10696                                                                 save_LIBS="$LIBS"
10697                                 LIBS="-all_load $LIBS"
10698                                 cat > conftest.$ac_ext <<EOF
10699 #line 10700 "configure"
10700 #include "confdefs.h"
10701 #include <mach/cthreads.h>
10702 int main() {
10703
10704                                         cthread_fork((void *)0, (void *)0);
10705                                         
10706 ; return 0; }
10707 EOF
10708 if { (eval echo configure:10709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10709   rm -rf conftest*
10710   ol_cv_cthread_all_load=yes
10711 else
10712   echo "configure: failed program was:" >&5
10713   cat conftest.$ac_ext >&5
10714   rm -rf conftest*
10715   ol_cv_cthread_all_load=no
10716 fi
10717 rm -f conftest*
10718                                                                 LIBS="$save_LIBS"
10719                         
10720 fi
10721
10722 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10723
10724                         if test $ol_cv_cthread_all_load = yes ; then
10725                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10726                                 ol_link_threads=mach
10727                         fi
10728                 fi
10729
10730                 if test $ol_link_threads != no ; then
10731                         : check for cthread specific functionality here
10732                         cat >> confdefs.h <<\EOF
10733 #define HAVE_MACH_CTHREADS 1
10734 EOF
10735
10736                 else
10737                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10738                 fi
10739         fi
10740
10741         if test $ol_with_threads = mach ; then
10742                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10743         fi
10744 fi
10745
10746 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10747         -o $ol_with_threads = pth ; then
10748
10749         for ac_hdr in pth.h
10750 do
10751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10753 echo "configure:10754: checking for $ac_hdr" >&5
10754 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10755   echo $ac_n "(cached) $ac_c" 1>&6
10756 else
10757   cat > conftest.$ac_ext <<EOF
10758 #line 10759 "configure"
10759 #include "confdefs.h"
10760 #include <$ac_hdr>
10761 EOF
10762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10763 { (eval echo configure:10764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10765 if test -z "$ac_err"; then
10766   rm -rf conftest*
10767   eval "ac_cv_header_$ac_safe=yes"
10768 else
10769   echo "$ac_err" >&5
10770   echo "configure: failed program was:" >&5
10771   cat conftest.$ac_ext >&5
10772   rm -rf conftest*
10773   eval "ac_cv_header_$ac_safe=no"
10774 fi
10775 rm -f conftest*
10776 fi
10777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10778   echo "$ac_t""yes" 1>&6
10779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10780   cat >> confdefs.h <<EOF
10781 #define $ac_tr_hdr 1
10782 EOF
10783  
10784 else
10785   echo "$ac_t""no" 1>&6
10786 fi
10787 done
10788
10789
10790         if test $ac_cv_header_pth_h = yes ; then
10791                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10792 echo "configure:10793: checking for pth_version in -lpth" >&5
10793 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10795   echo $ac_n "(cached) $ac_c" 1>&6
10796 else
10797   ac_save_LIBS="$LIBS"
10798 LIBS="-lpth  $LIBS"
10799 cat > conftest.$ac_ext <<EOF
10800 #line 10801 "configure"
10801 #include "confdefs.h"
10802 /* Override any gcc2 internal prototype to avoid an error.  */
10803 /* We use char because int might match the return type of a gcc2
10804     builtin and then its argument prototype would still apply.  */
10805 char pth_version();
10806
10807 int main() {
10808 pth_version()
10809 ; return 0; }
10810 EOF
10811 if { (eval echo configure:10812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10812   rm -rf conftest*
10813   eval "ac_cv_lib_$ac_lib_var=yes"
10814 else
10815   echo "configure: failed program was:" >&5
10816   cat conftest.$ac_ext >&5
10817   rm -rf conftest*
10818   eval "ac_cv_lib_$ac_lib_var=no"
10819 fi
10820 rm -f conftest*
10821 LIBS="$ac_save_LIBS"
10822
10823 fi
10824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10825   echo "$ac_t""yes" 1>&6
10826   have_pth=yes
10827 else
10828   echo "$ac_t""no" 1>&6
10829 have_pth=no
10830 fi
10831
10832
10833                 if test $have_pth = yes ; then
10834                         cat >> confdefs.h <<\EOF
10835 #define HAVE_GNU_PTH 1
10836 EOF
10837
10838                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10839                         ol_link_threads=pth
10840
10841                         if test $ol_with_yielding_select = auto ; then
10842                                 ol_with_yielding_select=yes
10843                         fi
10844                 fi
10845         fi
10846 fi
10847
10848 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10849         -o $ol_with_threads = lwp ; then
10850
10851                 for ac_hdr in thread.h synch.h
10852 do
10853 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10854 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10855 echo "configure:10856: checking for $ac_hdr" >&5
10856 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10857   echo $ac_n "(cached) $ac_c" 1>&6
10858 else
10859   cat > conftest.$ac_ext <<EOF
10860 #line 10861 "configure"
10861 #include "confdefs.h"
10862 #include <$ac_hdr>
10863 EOF
10864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10865 { (eval echo configure:10866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10867 if test -z "$ac_err"; then
10868   rm -rf conftest*
10869   eval "ac_cv_header_$ac_safe=yes"
10870 else
10871   echo "$ac_err" >&5
10872   echo "configure: failed program was:" >&5
10873   cat conftest.$ac_ext >&5
10874   rm -rf conftest*
10875   eval "ac_cv_header_$ac_safe=no"
10876 fi
10877 rm -f conftest*
10878 fi
10879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10880   echo "$ac_t""yes" 1>&6
10881     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10882   cat >> confdefs.h <<EOF
10883 #define $ac_tr_hdr 1
10884 EOF
10885  
10886 else
10887   echo "$ac_t""no" 1>&6
10888 fi
10889 done
10890
10891         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10892                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10893 echo "configure:10894: checking for thr_create in -lthread" >&5
10894 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10895 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10896   echo $ac_n "(cached) $ac_c" 1>&6
10897 else
10898   ac_save_LIBS="$LIBS"
10899 LIBS="-lthread  $LIBS"
10900 cat > conftest.$ac_ext <<EOF
10901 #line 10902 "configure"
10902 #include "confdefs.h"
10903 /* Override any gcc2 internal prototype to avoid an error.  */
10904 /* We use char because int might match the return type of a gcc2
10905     builtin and then its argument prototype would still apply.  */
10906 char thr_create();
10907
10908 int main() {
10909 thr_create()
10910 ; return 0; }
10911 EOF
10912 if { (eval echo configure:10913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10913   rm -rf conftest*
10914   eval "ac_cv_lib_$ac_lib_var=yes"
10915 else
10916   echo "configure: failed program was:" >&5
10917   cat conftest.$ac_ext >&5
10918   rm -rf conftest*
10919   eval "ac_cv_lib_$ac_lib_var=no"
10920 fi
10921 rm -f conftest*
10922 LIBS="$ac_save_LIBS"
10923
10924 fi
10925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10926   echo "$ac_t""yes" 1>&6
10927   have_thr=yes
10928 else
10929   echo "$ac_t""no" 1>&6
10930 have_thr=no
10931 fi
10932
10933
10934                 if test $have_thr = yes ; then
10935                         cat >> confdefs.h <<\EOF
10936 #define HAVE_THR 1
10937 EOF
10938
10939                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10940                         ol_link_threads=thr
10941
10942                         if test $ol_with_yielding_select = auto ; then
10943                                 ol_with_yielding_select=yes
10944                         fi
10945
10946                                                 for ac_func in \
10947                                 thr_setconcurrency \
10948                                 thr_getconcurrency \
10949                         
10950 do
10951 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10952 echo "configure:10953: checking for $ac_func" >&5
10953 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10954   echo $ac_n "(cached) $ac_c" 1>&6
10955 else
10956   cat > conftest.$ac_ext <<EOF
10957 #line 10958 "configure"
10958 #include "confdefs.h"
10959 /* System header to define __stub macros and hopefully few prototypes,
10960     which can conflict with char $ac_func(); below.  */
10961 #include <assert.h>
10962 /* Override any gcc2 internal prototype to avoid an error.  */
10963 /* We use char because int might match the return type of a gcc2
10964     builtin and then its argument prototype would still apply.  */
10965 char $ac_func();
10966 char (*f)();
10967
10968 int main() {
10969
10970 /* The GNU C library defines this for functions which it implements
10971     to always fail with ENOSYS.  Some functions are actually named
10972     something starting with __ and the normal name is an alias.  */
10973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10974 choke me
10975 #else
10976 f = $ac_func;
10977 #endif
10978
10979 ; return 0; }
10980 EOF
10981 if { (eval echo configure:10982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10982   rm -rf conftest*
10983   eval "ac_cv_func_$ac_func=yes"
10984 else
10985   echo "configure: failed program was:" >&5
10986   cat conftest.$ac_ext >&5
10987   rm -rf conftest*
10988   eval "ac_cv_func_$ac_func=no"
10989 fi
10990 rm -f conftest*
10991 fi
10992
10993 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10994   echo "$ac_t""yes" 1>&6
10995     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10996   cat >> confdefs.h <<EOF
10997 #define $ac_tr_func 1
10998 EOF
10999  
11000 else
11001   echo "$ac_t""no" 1>&6
11002 fi
11003 done
11004
11005                 fi
11006         fi
11007
11008                 for ac_hdr in lwp/lwp.h
11009 do
11010 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11011 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11012 echo "configure:11013: checking for $ac_hdr" >&5
11013 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11014   echo $ac_n "(cached) $ac_c" 1>&6
11015 else
11016   cat > conftest.$ac_ext <<EOF
11017 #line 11018 "configure"
11018 #include "confdefs.h"
11019 #include <$ac_hdr>
11020 EOF
11021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11022 { (eval echo configure:11023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11024 if test -z "$ac_err"; then
11025   rm -rf conftest*
11026   eval "ac_cv_header_$ac_safe=yes"
11027 else
11028   echo "$ac_err" >&5
11029   echo "configure: failed program was:" >&5
11030   cat conftest.$ac_ext >&5
11031   rm -rf conftest*
11032   eval "ac_cv_header_$ac_safe=no"
11033 fi
11034 rm -f conftest*
11035 fi
11036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11037   echo "$ac_t""yes" 1>&6
11038     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11039   cat >> confdefs.h <<EOF
11040 #define $ac_tr_hdr 1
11041 EOF
11042  
11043 else
11044   echo "$ac_t""no" 1>&6
11045 fi
11046 done
11047
11048         if test $ac_cv_header_lwp_lwp_h = yes ; then
11049                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11050 echo "configure:11051: checking for lwp_create in -llwp" >&5
11051 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11052 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11053   echo $ac_n "(cached) $ac_c" 1>&6
11054 else
11055   ac_save_LIBS="$LIBS"
11056 LIBS="-llwp  $LIBS"
11057 cat > conftest.$ac_ext <<EOF
11058 #line 11059 "configure"
11059 #include "confdefs.h"
11060 /* Override any gcc2 internal prototype to avoid an error.  */
11061 /* We use char because int might match the return type of a gcc2
11062     builtin and then its argument prototype would still apply.  */
11063 char lwp_create();
11064
11065 int main() {
11066 lwp_create()
11067 ; return 0; }
11068 EOF
11069 if { (eval echo configure:11070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11070   rm -rf conftest*
11071   eval "ac_cv_lib_$ac_lib_var=yes"
11072 else
11073   echo "configure: failed program was:" >&5
11074   cat conftest.$ac_ext >&5
11075   rm -rf conftest*
11076   eval "ac_cv_lib_$ac_lib_var=no"
11077 fi
11078 rm -f conftest*
11079 LIBS="$ac_save_LIBS"
11080
11081 fi
11082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11083   echo "$ac_t""yes" 1>&6
11084   have_lwp=yes
11085 else
11086   echo "$ac_t""no" 1>&6
11087 have_lwp=no
11088 fi
11089
11090
11091                 if test $have_lwp = yes ; then
11092                         cat >> confdefs.h <<\EOF
11093 #define HAVE_LWP 1
11094 EOF
11095
11096                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11097                         ol_link_threads=lwp
11098
11099                         if test $ol_with_yielding_select = auto ; then
11100                                 ol_with_yielding_select=no
11101                         fi
11102                 fi
11103         fi
11104 fi
11105
11106 if test $ol_with_yielding_select = yes ; then
11107         cat >> confdefs.h <<\EOF
11108 #define HAVE_YIELDING_SELECT 1
11109 EOF
11110
11111 fi
11112
11113 if test $ol_with_threads = manual ; then
11114                 ol_link_threads=yes
11115
11116         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11117
11118         for ac_hdr in pthread.h sched.h
11119 do
11120 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11121 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11122 echo "configure:11123: checking for $ac_hdr" >&5
11123 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11124   echo $ac_n "(cached) $ac_c" 1>&6
11125 else
11126   cat > conftest.$ac_ext <<EOF
11127 #line 11128 "configure"
11128 #include "confdefs.h"
11129 #include <$ac_hdr>
11130 EOF
11131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11132 { (eval echo configure:11133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11134 if test -z "$ac_err"; then
11135   rm -rf conftest*
11136   eval "ac_cv_header_$ac_safe=yes"
11137 else
11138   echo "$ac_err" >&5
11139   echo "configure: failed program was:" >&5
11140   cat conftest.$ac_ext >&5
11141   rm -rf conftest*
11142   eval "ac_cv_header_$ac_safe=no"
11143 fi
11144 rm -f conftest*
11145 fi
11146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11147   echo "$ac_t""yes" 1>&6
11148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11149   cat >> confdefs.h <<EOF
11150 #define $ac_tr_hdr 1
11151 EOF
11152  
11153 else
11154   echo "$ac_t""no" 1>&6
11155 fi
11156 done
11157
11158         for ac_func in sched_yield pthread_yield
11159 do
11160 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11161 echo "configure:11162: checking for $ac_func" >&5
11162 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11163   echo $ac_n "(cached) $ac_c" 1>&6
11164 else
11165   cat > conftest.$ac_ext <<EOF
11166 #line 11167 "configure"
11167 #include "confdefs.h"
11168 /* System header to define __stub macros and hopefully few prototypes,
11169     which can conflict with char $ac_func(); below.  */
11170 #include <assert.h>
11171 /* Override any gcc2 internal prototype to avoid an error.  */
11172 /* We use char because int might match the return type of a gcc2
11173     builtin and then its argument prototype would still apply.  */
11174 char $ac_func();
11175 char (*f)();
11176
11177 int main() {
11178
11179 /* The GNU C library defines this for functions which it implements
11180     to always fail with ENOSYS.  Some functions are actually named
11181     something starting with __ and the normal name is an alias.  */
11182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11183 choke me
11184 #else
11185 f = $ac_func;
11186 #endif
11187
11188 ; return 0; }
11189 EOF
11190 if { (eval echo configure:11191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11191   rm -rf conftest*
11192   eval "ac_cv_func_$ac_func=yes"
11193 else
11194   echo "configure: failed program was:" >&5
11195   cat conftest.$ac_ext >&5
11196   rm -rf conftest*
11197   eval "ac_cv_func_$ac_func=no"
11198 fi
11199 rm -f conftest*
11200 fi
11201
11202 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11203   echo "$ac_t""yes" 1>&6
11204     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11205   cat >> confdefs.h <<EOF
11206 #define $ac_tr_func 1
11207 EOF
11208  
11209 else
11210   echo "$ac_t""no" 1>&6
11211 fi
11212 done
11213
11214         
11215         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11216 echo "configure:11217: checking for LinuxThreads pthread.h" >&5
11217 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11218   echo $ac_n "(cached) $ac_c" 1>&6
11219 else
11220   cat > conftest.$ac_ext <<EOF
11221 #line 11222 "configure"
11222 #include "confdefs.h"
11223 #include <pthread.h>
11224 EOF
11225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11226   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11227   rm -rf conftest*
11228   ol_cv_header_linux_threads=yes
11229 else
11230   rm -rf conftest*
11231   ol_cv_header_linux_threads=no
11232 fi
11233 rm -f conftest*
11234
11235                 
11236 fi
11237
11238 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11239         if test $ol_cv_header_linux_threads = yes; then
11240                 cat >> confdefs.h <<\EOF
11241 #define HAVE_LINUX_THREADS 1
11242 EOF
11243
11244         fi
11245
11246
11247         for ac_hdr in mach/cthreads.h
11248 do
11249 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11250 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11251 echo "configure:11252: checking for $ac_hdr" >&5
11252 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11253   echo $ac_n "(cached) $ac_c" 1>&6
11254 else
11255   cat > conftest.$ac_ext <<EOF
11256 #line 11257 "configure"
11257 #include "confdefs.h"
11258 #include <$ac_hdr>
11259 EOF
11260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11261 { (eval echo configure:11262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11262 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11263 if test -z "$ac_err"; then
11264   rm -rf conftest*
11265   eval "ac_cv_header_$ac_safe=yes"
11266 else
11267   echo "$ac_err" >&5
11268   echo "configure: failed program was:" >&5
11269   cat conftest.$ac_ext >&5
11270   rm -rf conftest*
11271   eval "ac_cv_header_$ac_safe=no"
11272 fi
11273 rm -f conftest*
11274 fi
11275 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11276   echo "$ac_t""yes" 1>&6
11277     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11278   cat >> confdefs.h <<EOF
11279 #define $ac_tr_hdr 1
11280 EOF
11281  
11282 else
11283   echo "$ac_t""no" 1>&6
11284 fi
11285 done
11286
11287         for ac_hdr in lwp/lwp.h
11288 do
11289 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11290 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11291 echo "configure:11292: checking for $ac_hdr" >&5
11292 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11293   echo $ac_n "(cached) $ac_c" 1>&6
11294 else
11295   cat > conftest.$ac_ext <<EOF
11296 #line 11297 "configure"
11297 #include "confdefs.h"
11298 #include <$ac_hdr>
11299 EOF
11300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11301 { (eval echo configure:11302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11303 if test -z "$ac_err"; then
11304   rm -rf conftest*
11305   eval "ac_cv_header_$ac_safe=yes"
11306 else
11307   echo "$ac_err" >&5
11308   echo "configure: failed program was:" >&5
11309   cat conftest.$ac_ext >&5
11310   rm -rf conftest*
11311   eval "ac_cv_header_$ac_safe=no"
11312 fi
11313 rm -f conftest*
11314 fi
11315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11316   echo "$ac_t""yes" 1>&6
11317     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11318   cat >> confdefs.h <<EOF
11319 #define $ac_tr_hdr 1
11320 EOF
11321  
11322 else
11323   echo "$ac_t""no" 1>&6
11324 fi
11325 done
11326
11327         for ac_hdr in thread.h synch.h
11328 do
11329 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11330 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11331 echo "configure:11332: checking for $ac_hdr" >&5
11332 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11333   echo $ac_n "(cached) $ac_c" 1>&6
11334 else
11335   cat > conftest.$ac_ext <<EOF
11336 #line 11337 "configure"
11337 #include "confdefs.h"
11338 #include <$ac_hdr>
11339 EOF
11340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11341 { (eval echo configure:11342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11343 if test -z "$ac_err"; then
11344   rm -rf conftest*
11345   eval "ac_cv_header_$ac_safe=yes"
11346 else
11347   echo "$ac_err" >&5
11348   echo "configure: failed program was:" >&5
11349   cat conftest.$ac_ext >&5
11350   rm -rf conftest*
11351   eval "ac_cv_header_$ac_safe=no"
11352 fi
11353 rm -f conftest*
11354 fi
11355 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11356   echo "$ac_t""yes" 1>&6
11357     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11358   cat >> confdefs.h <<EOF
11359 #define $ac_tr_hdr 1
11360 EOF
11361  
11362 else
11363   echo "$ac_t""no" 1>&6
11364 fi
11365 done
11366
11367 fi
11368
11369 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11370                         cat >> confdefs.h <<\EOF
11371 #define REENTRANT 1
11372 EOF
11373
11374         cat >> confdefs.h <<\EOF
11375 #define _REENTRANT 1
11376 EOF
11377
11378         cat >> confdefs.h <<\EOF
11379 #define THREAD_SAFE 1
11380 EOF
11381
11382         cat >> confdefs.h <<\EOF
11383 #define _THREAD_SAFE 1
11384 EOF
11385
11386         cat >> confdefs.h <<\EOF
11387 #define THREADSAFE 1
11388 EOF
11389
11390         cat >> confdefs.h <<\EOF
11391 #define _THREADSAFE 1
11392 EOF
11393
11394         cat >> confdefs.h <<\EOF
11395 #define _SGI_MP_SOURCE 1
11396 EOF
11397
11398
11399                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11400 echo "configure:11401: checking for thread specific errno" >&5
11401 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11402   echo $ac_n "(cached) $ac_c" 1>&6
11403 else
11404   
11405                 cat > conftest.$ac_ext <<EOF
11406 #line 11407 "configure"
11407 #include "confdefs.h"
11408 #include <errno.h>
11409 int main() {
11410 errno = 0;
11411 ; return 0; }
11412 EOF
11413 if { (eval echo configure:11414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11414   rm -rf conftest*
11415   ol_cv_errno_thread_specific=yes
11416 else
11417   echo "configure: failed program was:" >&5
11418   cat conftest.$ac_ext >&5
11419   rm -rf conftest*
11420   ol_cv_errno_thread_specific=no
11421 fi
11422 rm -f conftest*
11423         
11424 fi
11425
11426 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11427
11428                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11429 echo "configure:11430: checking for thread specific h_errno" >&5
11430 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11431   echo $ac_n "(cached) $ac_c" 1>&6
11432 else
11433   
11434                 cat > conftest.$ac_ext <<EOF
11435 #line 11436 "configure"
11436 #include "confdefs.h"
11437 #include <netdb.h>
11438 int main() {
11439 h_errno = 0;
11440 ; return 0; }
11441 EOF
11442 if { (eval echo configure:11443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11443   rm -rf conftest*
11444   ol_cv_h_errno_thread_specific=yes
11445 else
11446   echo "configure: failed program was:" >&5
11447   cat conftest.$ac_ext >&5
11448   rm -rf conftest*
11449   ol_cv_h_errno_thread_specific=no
11450 fi
11451 rm -f conftest*
11452         
11453 fi
11454
11455 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11456
11457         if test $ol_cv_errno_thread_specific != yes \
11458                 -o $ol_cv_h_errno_thread_specific != yes ; then
11459                 LIBS="$LTHREAD_LIBS $LIBS"
11460                 LTHREAD_LIBS=""
11461         fi
11462
11463 fi  
11464
11465 if test $ol_link_threads = no ; then
11466         if test $ol_with_threads = yes ; then
11467                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11468         fi
11469
11470         if test $ol_with_threads = auto ; then
11471                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11472                 ol_with_threads=no
11473         fi
11474
11475         cat >> confdefs.h <<\EOF
11476 #define NO_THREADS 1
11477 EOF
11478
11479         LTHREAD_LIBS=""
11480 fi
11481
11482 if test $ol_link_threads != no ; then
11483         cat >> confdefs.h <<\EOF
11484 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11485 EOF
11486
11487 fi
11488
11489 ol_link_ldbm=no 
11490
11491 if test $ol_with_ldbm_api = auto \
11492         -o $ol_with_ldbm_api = berkeley \
11493         -o $ol_with_ldbm_api = bcompat ; then
11494
11495         if test $ol_with_ldbm_api = bcompat; then \
11496                 ol_cv_berkeley_db=no
11497 for ac_hdr in db_185.h db.h
11498 do
11499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11500 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11501 echo "configure:11502: checking for $ac_hdr" >&5
11502 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11503   echo $ac_n "(cached) $ac_c" 1>&6
11504 else
11505   cat > conftest.$ac_ext <<EOF
11506 #line 11507 "configure"
11507 #include "confdefs.h"
11508 #include <$ac_hdr>
11509 EOF
11510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11511 { (eval echo configure:11512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11513 if test -z "$ac_err"; then
11514   rm -rf conftest*
11515   eval "ac_cv_header_$ac_safe=yes"
11516 else
11517   echo "$ac_err" >&5
11518   echo "configure: failed program was:" >&5
11519   cat conftest.$ac_ext >&5
11520   rm -rf conftest*
11521   eval "ac_cv_header_$ac_safe=no"
11522 fi
11523 rm -f conftest*
11524 fi
11525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11526   echo "$ac_t""yes" 1>&6
11527     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11528   cat >> confdefs.h <<EOF
11529 #define $ac_tr_hdr 1
11530 EOF
11531  
11532 else
11533   echo "$ac_t""no" 1>&6
11534 fi
11535 done
11536
11537 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11538         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11539 echo "configure:11540: checking if Berkeley DB header compatibility" >&5
11540 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11541   echo $ac_n "(cached) $ac_c" 1>&6
11542 else
11543   
11544                 cat > conftest.$ac_ext <<EOF
11545 #line 11546 "configure"
11546 #include "confdefs.h"
11547
11548 #if HAVE_DB_185_H
11549 #       include <db_185.h>
11550 #else
11551 #       include <db.h>
11552 #endif
11553
11554  /* this check could be improved */
11555 #ifndef DB_VERSION_MAJOR
11556 #       define DB_VERSION_MAJOR 1
11557 #endif
11558
11559 #if DB_VERSION_MAJOR == 1 
11560         __db_version_1
11561 #endif
11562
11563 EOF
11564 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11565   egrep "__db_version_1" >/dev/null 2>&1; then
11566   rm -rf conftest*
11567   ol_cv_header_db1=yes
11568 else
11569   rm -rf conftest*
11570   ol_cv_header_db1=no
11571 fi
11572 rm -f conftest*
11573
11574 fi
11575
11576 echo "$ac_t""$ol_cv_header_db1" 1>&6
11577
11578         if test ol_cv_header_db1=yes ; then
11579                 ol_cv_lib_db=no
11580 if test $ol_cv_lib_db = no ; then
11581         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11582 echo "configure:11583: checking for Berkeley DB link (default)" >&5
11583 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11584   echo $ac_n "(cached) $ac_c" 1>&6
11585 else
11586   
11587         ol_DB_LIB=
11588         ol_LIBS=$LIBS
11589         LIBS="$ol_DB_LIB $LIBS"
11590
11591         cat > conftest.$ac_ext <<EOF
11592 #line 11593 "configure"
11593 #include "confdefs.h"
11594
11595 #ifdef HAVE_DB_185_H
11596 # include <db_185.h>
11597 #else
11598 # include <db.h>
11599 #endif
11600
11601 #ifndef DB_VERSION_MAJOR
11602 # define DB_VERSION_MAJOR 1
11603 #endif
11604
11605 #ifndef NULL
11606 #define NULL ((void*)0)
11607 #endif
11608
11609 int main() {
11610
11611 #if DB_VERSION_MAJOR > 2
11612         db_env_create( NULL, 0 );
11613 #elif DB_VERSION_MAJOR > 1
11614         db_appexit( NULL );
11615 #else
11616         (void) dbopen( NULL, 0, 0, 0, NULL);
11617 #endif
11618
11619 ; return 0; }
11620 EOF
11621 if { (eval echo configure:11622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11622   rm -rf conftest*
11623   ol_cv_db_none=yes
11624 else
11625   echo "configure: failed program was:" >&5
11626   cat conftest.$ac_ext >&5
11627   rm -rf conftest*
11628   ol_cv_db_none=no
11629 fi
11630 rm -f conftest*
11631
11632         LIBS="$ol_LIBS"
11633
11634 fi
11635
11636 echo "$ac_t""$ol_cv_db_none" 1>&6
11637
11638         if test $ol_cv_db_none = yes ; then
11639                 ol_cv_lib_db=yes
11640         fi
11641 fi
11642
11643 if test $ol_cv_lib_db = no ; then
11644         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11645 echo "configure:11646: checking for Berkeley DB link (-ldb)" >&5
11646 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11647   echo $ac_n "(cached) $ac_c" 1>&6
11648 else
11649   
11650         ol_DB_LIB=-ldb
11651         ol_LIBS=$LIBS
11652         LIBS="$ol_DB_LIB $LIBS"
11653
11654         cat > conftest.$ac_ext <<EOF
11655 #line 11656 "configure"
11656 #include "confdefs.h"
11657
11658 #ifdef HAVE_DB_185_H
11659 # include <db_185.h>
11660 #else
11661 # include <db.h>
11662 #endif
11663
11664 #ifndef DB_VERSION_MAJOR
11665 # define DB_VERSION_MAJOR 1
11666 #endif
11667
11668 #ifndef NULL
11669 #define NULL ((void*)0)
11670 #endif
11671
11672 int main() {
11673
11674 #if DB_VERSION_MAJOR > 2
11675         db_env_create( NULL, 0 );
11676 #elif DB_VERSION_MAJOR > 1
11677         db_appexit( NULL );
11678 #else
11679         (void) dbopen( NULL, 0, 0, 0, NULL);
11680 #endif
11681
11682 ; return 0; }
11683 EOF
11684 if { (eval echo configure:11685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11685   rm -rf conftest*
11686   ol_cv_db_db=yes
11687 else
11688   echo "configure: failed program was:" >&5
11689   cat conftest.$ac_ext >&5
11690   rm -rf conftest*
11691   ol_cv_db_db=no
11692 fi
11693 rm -f conftest*
11694
11695         LIBS="$ol_LIBS"
11696
11697 fi
11698
11699 echo "$ac_t""$ol_cv_db_db" 1>&6
11700
11701         if test $ol_cv_db_db = yes ; then
11702                 ol_cv_lib_db=-ldb
11703         fi
11704 fi
11705
11706 if test $ol_cv_lib_db = no ; then
11707         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11708 echo "configure:11709: checking for Berkeley DB link (-ldb3)" >&5
11709 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11710   echo $ac_n "(cached) $ac_c" 1>&6
11711 else
11712   
11713         ol_DB_LIB=-ldb3
11714         ol_LIBS=$LIBS
11715         LIBS="$ol_DB_LIB $LIBS"
11716
11717         cat > conftest.$ac_ext <<EOF
11718 #line 11719 "configure"
11719 #include "confdefs.h"
11720
11721 #ifdef HAVE_DB_185_H
11722 # include <db_185.h>
11723 #else
11724 # include <db.h>
11725 #endif
11726
11727 #ifndef DB_VERSION_MAJOR
11728 # define DB_VERSION_MAJOR 1
11729 #endif
11730
11731 #ifndef NULL
11732 #define NULL ((void*)0)
11733 #endif
11734
11735 int main() {
11736
11737 #if DB_VERSION_MAJOR > 2
11738         db_env_create( NULL, 0 );
11739 #elif DB_VERSION_MAJOR > 1
11740         db_appexit( NULL );
11741 #else
11742         (void) dbopen( NULL, 0, 0, 0, NULL);
11743 #endif
11744
11745 ; return 0; }
11746 EOF
11747 if { (eval echo configure:11748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11748   rm -rf conftest*
11749   ol_cv_db_db3=yes
11750 else
11751   echo "configure: failed program was:" >&5
11752   cat conftest.$ac_ext >&5
11753   rm -rf conftest*
11754   ol_cv_db_db3=no
11755 fi
11756 rm -f conftest*
11757
11758         LIBS="$ol_LIBS"
11759
11760 fi
11761
11762 echo "$ac_t""$ol_cv_db_db3" 1>&6
11763
11764         if test $ol_cv_db_db3 = yes ; then
11765                 ol_cv_lib_db=-ldb3
11766         fi
11767 fi
11768
11769 if test $ol_cv_lib_db = no ; then
11770         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11771 echo "configure:11772: checking for Berkeley DB link (-ldb2)" >&5
11772 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11773   echo $ac_n "(cached) $ac_c" 1>&6
11774 else
11775   
11776         ol_DB_LIB=-ldb2
11777         ol_LIBS=$LIBS
11778         LIBS="$ol_DB_LIB $LIBS"
11779
11780         cat > conftest.$ac_ext <<EOF
11781 #line 11782 "configure"
11782 #include "confdefs.h"
11783
11784 #ifdef HAVE_DB_185_H
11785 # include <db_185.h>
11786 #else
11787 # include <db.h>
11788 #endif
11789
11790 #ifndef DB_VERSION_MAJOR
11791 # define DB_VERSION_MAJOR 1
11792 #endif
11793
11794 #ifndef NULL
11795 #define NULL ((void*)0)
11796 #endif
11797
11798 int main() {
11799
11800 #if DB_VERSION_MAJOR > 2
11801         db_env_create( NULL, 0 );
11802 #elif DB_VERSION_MAJOR > 1
11803         db_appexit( NULL );
11804 #else
11805         (void) dbopen( NULL, 0, 0, 0, NULL);
11806 #endif
11807
11808 ; return 0; }
11809 EOF
11810 if { (eval echo configure:11811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11811   rm -rf conftest*
11812   ol_cv_db_db2=yes
11813 else
11814   echo "configure: failed program was:" >&5
11815   cat conftest.$ac_ext >&5
11816   rm -rf conftest*
11817   ol_cv_db_db2=no
11818 fi
11819 rm -f conftest*
11820
11821         LIBS="$ol_LIBS"
11822
11823 fi
11824
11825 echo "$ac_t""$ol_cv_db_db2" 1>&6
11826
11827         if test $ol_cv_db_db2 = yes ; then
11828                 ol_cv_lib_db=-ldb2
11829         fi
11830 fi
11831
11832 if test $ol_cv_lib_db = no ; then
11833         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11834 echo "configure:11835: checking for Berkeley DB link (-ldb1)" >&5
11835 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11836   echo $ac_n "(cached) $ac_c" 1>&6
11837 else
11838   
11839         ol_DB_LIB=-ldb1
11840         ol_LIBS=$LIBS
11841         LIBS="$ol_DB_LIB $LIBS"
11842
11843         cat > conftest.$ac_ext <<EOF
11844 #line 11845 "configure"
11845 #include "confdefs.h"
11846
11847 #ifdef HAVE_DB_185_H
11848 # include <db_185.h>
11849 #else
11850 # include <db.h>
11851 #endif
11852
11853 #ifndef DB_VERSION_MAJOR
11854 # define DB_VERSION_MAJOR 1
11855 #endif
11856
11857 #ifndef NULL
11858 #define NULL ((void*)0)
11859 #endif
11860
11861 int main() {
11862
11863 #if DB_VERSION_MAJOR > 2
11864         db_env_create( NULL, 0 );
11865 #elif DB_VERSION_MAJOR > 1
11866         db_appexit( NULL );
11867 #else
11868         (void) dbopen( NULL, 0, 0, 0, NULL);
11869 #endif
11870
11871 ; return 0; }
11872 EOF
11873 if { (eval echo configure:11874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11874   rm -rf conftest*
11875   ol_cv_db_db1=yes
11876 else
11877   echo "configure: failed program was:" >&5
11878   cat conftest.$ac_ext >&5
11879   rm -rf conftest*
11880   ol_cv_db_db1=no
11881 fi
11882 rm -f conftest*
11883
11884         LIBS="$ol_LIBS"
11885
11886 fi
11887
11888 echo "$ac_t""$ol_cv_db_db1" 1>&6
11889
11890         if test $ol_cv_db_db1 = yes ; then
11891                 ol_cv_lib_db=-ldb1
11892         fi
11893 fi
11894
11895
11896                 if test "$ol_cv_lib_db" != no ; then
11897                         ol_cv_berkeley_db=yes
11898                 fi
11899         fi
11900 fi
11901
11902         else
11903                 ol_cv_berkeley_db=no
11904 for ac_hdr in db.h
11905 do
11906 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11907 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11908 echo "configure:11909: checking for $ac_hdr" >&5
11909 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11910   echo $ac_n "(cached) $ac_c" 1>&6
11911 else
11912   cat > conftest.$ac_ext <<EOF
11913 #line 11914 "configure"
11914 #include "confdefs.h"
11915 #include <$ac_hdr>
11916 EOF
11917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11918 { (eval echo configure:11919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11920 if test -z "$ac_err"; then
11921   rm -rf conftest*
11922   eval "ac_cv_header_$ac_safe=yes"
11923 else
11924   echo "$ac_err" >&5
11925   echo "configure: failed program was:" >&5
11926   cat conftest.$ac_ext >&5
11927   rm -rf conftest*
11928   eval "ac_cv_header_$ac_safe=no"
11929 fi
11930 rm -f conftest*
11931 fi
11932 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11933   echo "$ac_t""yes" 1>&6
11934     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11935   cat >> confdefs.h <<EOF
11936 #define $ac_tr_hdr 1
11937 EOF
11938  
11939 else
11940   echo "$ac_t""no" 1>&6
11941 fi
11942 done
11943
11944 if test $ac_cv_header_db_h = yes; then
11945         ol_cv_lib_db=no
11946 if test $ol_cv_lib_db = no ; then
11947         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11948 echo "configure:11949: checking for Berkeley DB link (default)" >&5
11949 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11950   echo $ac_n "(cached) $ac_c" 1>&6
11951 else
11952   
11953         ol_DB_LIB=
11954         ol_LIBS=$LIBS
11955         LIBS="$ol_DB_LIB $LIBS"
11956
11957         cat > conftest.$ac_ext <<EOF
11958 #line 11959 "configure"
11959 #include "confdefs.h"
11960
11961 #ifdef HAVE_DB_185_H
11962 # include <db_185.h>
11963 #else
11964 # include <db.h>
11965 #endif
11966
11967 #ifndef DB_VERSION_MAJOR
11968 # define DB_VERSION_MAJOR 1
11969 #endif
11970
11971 #ifndef NULL
11972 #define NULL ((void*)0)
11973 #endif
11974
11975 int main() {
11976
11977 #if DB_VERSION_MAJOR > 2
11978         db_env_create( NULL, 0 );
11979 #elif DB_VERSION_MAJOR > 1
11980         db_appexit( NULL );
11981 #else
11982         (void) dbopen( NULL, 0, 0, 0, NULL);
11983 #endif
11984
11985 ; return 0; }
11986 EOF
11987 if { (eval echo configure:11988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11988   rm -rf conftest*
11989   ol_cv_db_none=yes
11990 else
11991   echo "configure: failed program was:" >&5
11992   cat conftest.$ac_ext >&5
11993   rm -rf conftest*
11994   ol_cv_db_none=no
11995 fi
11996 rm -f conftest*
11997
11998         LIBS="$ol_LIBS"
11999
12000 fi
12001
12002 echo "$ac_t""$ol_cv_db_none" 1>&6
12003
12004         if test $ol_cv_db_none = yes ; then
12005                 ol_cv_lib_db=yes
12006         fi
12007 fi
12008
12009 if test $ol_cv_lib_db = no ; then
12010         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12011 echo "configure:12012: checking for Berkeley DB link (-ldb)" >&5
12012 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12013   echo $ac_n "(cached) $ac_c" 1>&6
12014 else
12015   
12016         ol_DB_LIB=-ldb
12017         ol_LIBS=$LIBS
12018         LIBS="$ol_DB_LIB $LIBS"
12019
12020         cat > conftest.$ac_ext <<EOF
12021 #line 12022 "configure"
12022 #include "confdefs.h"
12023
12024 #ifdef HAVE_DB_185_H
12025 # include <db_185.h>
12026 #else
12027 # include <db.h>
12028 #endif
12029
12030 #ifndef DB_VERSION_MAJOR
12031 # define DB_VERSION_MAJOR 1
12032 #endif
12033
12034 #ifndef NULL
12035 #define NULL ((void*)0)
12036 #endif
12037
12038 int main() {
12039
12040 #if DB_VERSION_MAJOR > 2
12041         db_env_create( NULL, 0 );
12042 #elif DB_VERSION_MAJOR > 1
12043         db_appexit( NULL );
12044 #else
12045         (void) dbopen( NULL, 0, 0, 0, NULL);
12046 #endif
12047
12048 ; return 0; }
12049 EOF
12050 if { (eval echo configure:12051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12051   rm -rf conftest*
12052   ol_cv_db_db=yes
12053 else
12054   echo "configure: failed program was:" >&5
12055   cat conftest.$ac_ext >&5
12056   rm -rf conftest*
12057   ol_cv_db_db=no
12058 fi
12059 rm -f conftest*
12060
12061         LIBS="$ol_LIBS"
12062
12063 fi
12064
12065 echo "$ac_t""$ol_cv_db_db" 1>&6
12066
12067         if test $ol_cv_db_db = yes ; then
12068                 ol_cv_lib_db=-ldb
12069         fi
12070 fi
12071
12072 if test $ol_cv_lib_db = no ; then
12073         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12074 echo "configure:12075: checking for Berkeley DB link (-ldb3)" >&5
12075 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12076   echo $ac_n "(cached) $ac_c" 1>&6
12077 else
12078   
12079         ol_DB_LIB=-ldb3
12080         ol_LIBS=$LIBS
12081         LIBS="$ol_DB_LIB $LIBS"
12082
12083         cat > conftest.$ac_ext <<EOF
12084 #line 12085 "configure"
12085 #include "confdefs.h"
12086
12087 #ifdef HAVE_DB_185_H
12088 # include <db_185.h>
12089 #else
12090 # include <db.h>
12091 #endif
12092
12093 #ifndef DB_VERSION_MAJOR
12094 # define DB_VERSION_MAJOR 1
12095 #endif
12096
12097 #ifndef NULL
12098 #define NULL ((void*)0)
12099 #endif
12100
12101 int main() {
12102
12103 #if DB_VERSION_MAJOR > 2
12104         db_env_create( NULL, 0 );
12105 #elif DB_VERSION_MAJOR > 1
12106         db_appexit( NULL );
12107 #else
12108         (void) dbopen( NULL, 0, 0, 0, NULL);
12109 #endif
12110
12111 ; return 0; }
12112 EOF
12113 if { (eval echo configure:12114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12114   rm -rf conftest*
12115   ol_cv_db_db3=yes
12116 else
12117   echo "configure: failed program was:" >&5
12118   cat conftest.$ac_ext >&5
12119   rm -rf conftest*
12120   ol_cv_db_db3=no
12121 fi
12122 rm -f conftest*
12123
12124         LIBS="$ol_LIBS"
12125
12126 fi
12127
12128 echo "$ac_t""$ol_cv_db_db3" 1>&6
12129
12130         if test $ol_cv_db_db3 = yes ; then
12131                 ol_cv_lib_db=-ldb3
12132         fi
12133 fi
12134
12135 if test $ol_cv_lib_db = no ; then
12136         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12137 echo "configure:12138: checking for Berkeley DB link (-ldb2)" >&5
12138 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12139   echo $ac_n "(cached) $ac_c" 1>&6
12140 else
12141   
12142         ol_DB_LIB=-ldb2
12143         ol_LIBS=$LIBS
12144         LIBS="$ol_DB_LIB $LIBS"
12145
12146         cat > conftest.$ac_ext <<EOF
12147 #line 12148 "configure"
12148 #include "confdefs.h"
12149
12150 #ifdef HAVE_DB_185_H
12151 # include <db_185.h>
12152 #else
12153 # include <db.h>
12154 #endif
12155
12156 #ifndef DB_VERSION_MAJOR
12157 # define DB_VERSION_MAJOR 1
12158 #endif
12159
12160 #ifndef NULL
12161 #define NULL ((void*)0)
12162 #endif
12163
12164 int main() {
12165
12166 #if DB_VERSION_MAJOR > 2
12167         db_env_create( NULL, 0 );
12168 #elif DB_VERSION_MAJOR > 1
12169         db_appexit( NULL );
12170 #else
12171         (void) dbopen( NULL, 0, 0, 0, NULL);
12172 #endif
12173
12174 ; return 0; }
12175 EOF
12176 if { (eval echo configure:12177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12177   rm -rf conftest*
12178   ol_cv_db_db2=yes
12179 else
12180   echo "configure: failed program was:" >&5
12181   cat conftest.$ac_ext >&5
12182   rm -rf conftest*
12183   ol_cv_db_db2=no
12184 fi
12185 rm -f conftest*
12186
12187         LIBS="$ol_LIBS"
12188
12189 fi
12190
12191 echo "$ac_t""$ol_cv_db_db2" 1>&6
12192
12193         if test $ol_cv_db_db2 = yes ; then
12194                 ol_cv_lib_db=-ldb2
12195         fi
12196 fi
12197
12198 if test $ol_cv_lib_db = no ; then
12199         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12200 echo "configure:12201: checking for Berkeley DB link (-ldb1)" >&5
12201 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12202   echo $ac_n "(cached) $ac_c" 1>&6
12203 else
12204   
12205         ol_DB_LIB=-ldb1
12206         ol_LIBS=$LIBS
12207         LIBS="$ol_DB_LIB $LIBS"
12208
12209         cat > conftest.$ac_ext <<EOF
12210 #line 12211 "configure"
12211 #include "confdefs.h"
12212
12213 #ifdef HAVE_DB_185_H
12214 # include <db_185.h>
12215 #else
12216 # include <db.h>
12217 #endif
12218
12219 #ifndef DB_VERSION_MAJOR
12220 # define DB_VERSION_MAJOR 1
12221 #endif
12222
12223 #ifndef NULL
12224 #define NULL ((void*)0)
12225 #endif
12226
12227 int main() {
12228
12229 #if DB_VERSION_MAJOR > 2
12230         db_env_create( NULL, 0 );
12231 #elif DB_VERSION_MAJOR > 1
12232         db_appexit( NULL );
12233 #else
12234         (void) dbopen( NULL, 0, 0, 0, NULL);
12235 #endif
12236
12237 ; return 0; }
12238 EOF
12239 if { (eval echo configure:12240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12240   rm -rf conftest*
12241   ol_cv_db_db1=yes
12242 else
12243   echo "configure: failed program was:" >&5
12244   cat conftest.$ac_ext >&5
12245   rm -rf conftest*
12246   ol_cv_db_db1=no
12247 fi
12248 rm -f conftest*
12249
12250         LIBS="$ol_LIBS"
12251
12252 fi
12253
12254 echo "$ac_t""$ol_cv_db_db1" 1>&6
12255
12256         if test $ol_cv_db_db1 = yes ; then
12257                 ol_cv_lib_db=-ldb1
12258         fi
12259 fi
12260
12261
12262         if test "$ol_cv_lib_db" != no ; then
12263                 ol_cv_berkeley_db=yes
12264                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12265 echo "configure:12266: checking for Berkeley DB thread support" >&5
12266 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12267   echo $ac_n "(cached) $ac_c" 1>&6
12268 else
12269   
12270         ol_LIBS="$LIBS"
12271         if test $ol_cv_lib_db != yes ; then
12272                 LIBS="$ol_cv_lib_db"
12273         fi
12274
12275         if test "$cross_compiling" = yes; then
12276   ol_cv_berkeley_db_thread=cross
12277 else
12278   cat > conftest.$ac_ext <<EOF
12279 #line 12280 "configure"
12280 #include "confdefs.h"
12281
12282 #ifdef HAVE_DB_185_H
12283         choke me;
12284 #else
12285 #include <db.h>
12286 #endif
12287 #ifndef NULL
12288 #define NULL ((void *)0)
12289 #endif
12290 main()
12291 {
12292         int rc;
12293         u_int32_t flags = DB_CREATE | DB_THREAD;
12294
12295
12296 #if DB_VERSION_MAJOR > 2
12297         DB_ENV *env = NULL;
12298
12299         rc = db_env_create( &env, 0 );
12300
12301         if( rc == 0 ) {
12302                 rc = env->open( env, NULL, NULL, flags, 0 );
12303         }
12304
12305 #else
12306         DB_ENV env;
12307         memset( &env, '\0', sizeof(env) );
12308
12309         rc = db_appinit( NULL, NULL, &env, flags );
12310
12311         if( rc == 0 ) {
12312                 db_appexit( &env );
12313         }
12314 #endif
12315
12316         return rc;
12317 }
12318 EOF
12319 if { (eval echo configure:12320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12320 then
12321   ol_cv_berkeley_db_thread=yes
12322 else
12323   echo "configure: failed program was:" >&5
12324   cat conftest.$ac_ext >&5
12325   rm -fr conftest*
12326   ol_cv_berkeley_db_thread=no
12327 fi
12328 rm -fr conftest*
12329 fi
12330
12331
12332         LIBS="$ol_LIBS"
12333
12334         if test $ol_cv_berkeley_db_thread != no ; then
12335                 cat >> confdefs.h <<\EOF
12336 #define HAVE_BERKELEY_DB_THREAD 1
12337 EOF
12338
12339         fi
12340
12341 fi
12342
12343 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12344         fi
12345 fi
12346
12347         fi
12348
12349         if test $ol_cv_berkeley_db != no ; then
12350                 cat >> confdefs.h <<\EOF
12351 #define HAVE_BERKELEY_DB 1
12352 EOF
12353
12354
12355                 ol_link_ldbm=berkeley
12356                 ol_with_ldbm_api=db
12357
12358                 if test $ol_with_ldbm_type = hash ; then
12359                         cat >> confdefs.h <<\EOF
12360 #define LDBM_USE_DBHASH 1
12361 EOF
12362
12363                 else
12364                         cat >> confdefs.h <<\EOF
12365 #define LDBM_USE_DBBTREE 1
12366 EOF
12367
12368                 fi
12369
12370                                                 if test $ol_cv_lib_db != yes ; then
12371                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12372                 fi
12373         fi
12374 fi
12375
12376 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12377         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12378         ol_with_ldbm_api=none
12379 fi
12380
12381 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12382         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12383 echo "configure:12384: checking for MDBM library" >&5
12384 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12385   echo $ac_n "(cached) $ac_c" 1>&6
12386 else
12387         ol_LIBS="$LIBS"
12388         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12389 echo "configure:12390: checking for mdbm_set_chain" >&5
12390 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12391   echo $ac_n "(cached) $ac_c" 1>&6
12392 else
12393   cat > conftest.$ac_ext <<EOF
12394 #line 12395 "configure"
12395 #include "confdefs.h"
12396 /* System header to define __stub macros and hopefully few prototypes,
12397     which can conflict with char mdbm_set_chain(); below.  */
12398 #include <assert.h>
12399 /* Override any gcc2 internal prototype to avoid an error.  */
12400 /* We use char because int might match the return type of a gcc2
12401     builtin and then its argument prototype would still apply.  */
12402 char mdbm_set_chain();
12403 char (*f)();
12404
12405 int main() {
12406
12407 /* The GNU C library defines this for functions which it implements
12408     to always fail with ENOSYS.  Some functions are actually named
12409     something starting with __ and the normal name is an alias.  */
12410 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12411 choke me
12412 #else
12413 f = mdbm_set_chain;
12414 #endif
12415
12416 ; return 0; }
12417 EOF
12418 if { (eval echo configure:12419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12419   rm -rf conftest*
12420   eval "ac_cv_func_mdbm_set_chain=yes"
12421 else
12422   echo "configure: failed program was:" >&5
12423   cat conftest.$ac_ext >&5
12424   rm -rf conftest*
12425   eval "ac_cv_func_mdbm_set_chain=no"
12426 fi
12427 rm -f conftest*
12428 fi
12429
12430 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12431   echo "$ac_t""yes" 1>&6
12432   ol_cv_lib_mdbm=yes
12433 else
12434   echo "$ac_t""no" 1>&6
12435
12436                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12437 echo "configure:12438: checking for mdbm_set_chain in -lmdbm" >&5
12438 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12439 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12440   echo $ac_n "(cached) $ac_c" 1>&6
12441 else
12442   ac_save_LIBS="$LIBS"
12443 LIBS="-lmdbm  $LIBS"
12444 cat > conftest.$ac_ext <<EOF
12445 #line 12446 "configure"
12446 #include "confdefs.h"
12447 /* Override any gcc2 internal prototype to avoid an error.  */
12448 /* We use char because int might match the return type of a gcc2
12449     builtin and then its argument prototype would still apply.  */
12450 char mdbm_set_chain();
12451
12452 int main() {
12453 mdbm_set_chain()
12454 ; return 0; }
12455 EOF
12456 if { (eval echo configure:12457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12457   rm -rf conftest*
12458   eval "ac_cv_lib_$ac_lib_var=yes"
12459 else
12460   echo "configure: failed program was:" >&5
12461   cat conftest.$ac_ext >&5
12462   rm -rf conftest*
12463   eval "ac_cv_lib_$ac_lib_var=no"
12464 fi
12465 rm -f conftest*
12466 LIBS="$ac_save_LIBS"
12467
12468 fi
12469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12470   echo "$ac_t""yes" 1>&6
12471   ol_cv_lib_mdbm=-lmdbm
12472 else
12473   echo "$ac_t""no" 1>&6
12474 ol_cv_lib_mdbm=no
12475 fi
12476
12477         
12478 fi
12479
12480         LIBS="$ol_LIBS"
12481
12482 fi
12483
12484 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12485
12486
12487  for ac_hdr in mdbm.h
12488 do
12489 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12490 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12491 echo "configure:12492: checking for $ac_hdr" >&5
12492 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12493   echo $ac_n "(cached) $ac_c" 1>&6
12494 else
12495   cat > conftest.$ac_ext <<EOF
12496 #line 12497 "configure"
12497 #include "confdefs.h"
12498 #include <$ac_hdr>
12499 EOF
12500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12501 { (eval echo configure:12502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12503 if test -z "$ac_err"; then
12504   rm -rf conftest*
12505   eval "ac_cv_header_$ac_safe=yes"
12506 else
12507   echo "$ac_err" >&5
12508   echo "configure: failed program was:" >&5
12509   cat conftest.$ac_ext >&5
12510   rm -rf conftest*
12511   eval "ac_cv_header_$ac_safe=no"
12512 fi
12513 rm -f conftest*
12514 fi
12515 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12516   echo "$ac_t""yes" 1>&6
12517     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12518   cat >> confdefs.h <<EOF
12519 #define $ac_tr_hdr 1
12520 EOF
12521  
12522 else
12523   echo "$ac_t""no" 1>&6
12524 fi
12525 done
12526
12527  echo $ac_n "checking for db""... $ac_c" 1>&6
12528 echo "configure:12529: checking for db" >&5
12529 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12530   echo $ac_n "(cached) $ac_c" 1>&6
12531 else
12532   
12533         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12534                 ol_cv_mdbm=no
12535         else
12536                 ol_cv_mdbm=yes
12537         fi
12538
12539 fi
12540
12541 echo "$ac_t""$ol_cv_mdbm" 1>&6
12542  if test $ol_cv_mdbm = yes ; then
12543         cat >> confdefs.h <<\EOF
12544 #define HAVE_MDBM 1
12545 EOF
12546
12547  fi
12548
12549
12550         if test $ol_cv_mdbm = yes ; then
12551                 ol_link_ldbm=mdbm
12552                 ol_with_ldbm_api=mdbm
12553                 if test $ol_cv_lib_mdbm != yes ; then
12554                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12555                 fi
12556         fi
12557 fi
12558
12559 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12560         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12561 echo "configure:12562: checking for GDBM library" >&5
12562 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12563   echo $ac_n "(cached) $ac_c" 1>&6
12564 else
12565         ol_LIBS="$LIBS"
12566         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12567 echo "configure:12568: checking for gdbm_open" >&5
12568 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12569   echo $ac_n "(cached) $ac_c" 1>&6
12570 else
12571   cat > conftest.$ac_ext <<EOF
12572 #line 12573 "configure"
12573 #include "confdefs.h"
12574 /* System header to define __stub macros and hopefully few prototypes,
12575     which can conflict with char gdbm_open(); below.  */
12576 #include <assert.h>
12577 /* Override any gcc2 internal prototype to avoid an error.  */
12578 /* We use char because int might match the return type of a gcc2
12579     builtin and then its argument prototype would still apply.  */
12580 char gdbm_open();
12581 char (*f)();
12582
12583 int main() {
12584
12585 /* The GNU C library defines this for functions which it implements
12586     to always fail with ENOSYS.  Some functions are actually named
12587     something starting with __ and the normal name is an alias.  */
12588 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12589 choke me
12590 #else
12591 f = gdbm_open;
12592 #endif
12593
12594 ; return 0; }
12595 EOF
12596 if { (eval echo configure:12597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12597   rm -rf conftest*
12598   eval "ac_cv_func_gdbm_open=yes"
12599 else
12600   echo "configure: failed program was:" >&5
12601   cat conftest.$ac_ext >&5
12602   rm -rf conftest*
12603   eval "ac_cv_func_gdbm_open=no"
12604 fi
12605 rm -f conftest*
12606 fi
12607
12608 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12609   echo "$ac_t""yes" 1>&6
12610   ol_cv_lib_gdbm=yes
12611 else
12612   echo "$ac_t""no" 1>&6
12613
12614                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12615 echo "configure:12616: checking for gdbm_open in -lgdbm" >&5
12616 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12617 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12618   echo $ac_n "(cached) $ac_c" 1>&6
12619 else
12620   ac_save_LIBS="$LIBS"
12621 LIBS="-lgdbm  $LIBS"
12622 cat > conftest.$ac_ext <<EOF
12623 #line 12624 "configure"
12624 #include "confdefs.h"
12625 /* Override any gcc2 internal prototype to avoid an error.  */
12626 /* We use char because int might match the return type of a gcc2
12627     builtin and then its argument prototype would still apply.  */
12628 char gdbm_open();
12629
12630 int main() {
12631 gdbm_open()
12632 ; return 0; }
12633 EOF
12634 if { (eval echo configure:12635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12635   rm -rf conftest*
12636   eval "ac_cv_lib_$ac_lib_var=yes"
12637 else
12638   echo "configure: failed program was:" >&5
12639   cat conftest.$ac_ext >&5
12640   rm -rf conftest*
12641   eval "ac_cv_lib_$ac_lib_var=no"
12642 fi
12643 rm -f conftest*
12644 LIBS="$ac_save_LIBS"
12645
12646 fi
12647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12648   echo "$ac_t""yes" 1>&6
12649   ol_cv_lib_gdbm=-lgdbm
12650 else
12651   echo "$ac_t""no" 1>&6
12652 ol_cv_lib_gdbm=no
12653 fi
12654
12655         
12656 fi
12657
12658         LIBS="$ol_LIBS"
12659
12660 fi
12661
12662 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12663
12664
12665  for ac_hdr in gdbm.h
12666 do
12667 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12668 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12669 echo "configure:12670: checking for $ac_hdr" >&5
12670 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12671   echo $ac_n "(cached) $ac_c" 1>&6
12672 else
12673   cat > conftest.$ac_ext <<EOF
12674 #line 12675 "configure"
12675 #include "confdefs.h"
12676 #include <$ac_hdr>
12677 EOF
12678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12679 { (eval echo configure:12680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12681 if test -z "$ac_err"; then
12682   rm -rf conftest*
12683   eval "ac_cv_header_$ac_safe=yes"
12684 else
12685   echo "$ac_err" >&5
12686   echo "configure: failed program was:" >&5
12687   cat conftest.$ac_ext >&5
12688   rm -rf conftest*
12689   eval "ac_cv_header_$ac_safe=no"
12690 fi
12691 rm -f conftest*
12692 fi
12693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12694   echo "$ac_t""yes" 1>&6
12695     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12696   cat >> confdefs.h <<EOF
12697 #define $ac_tr_hdr 1
12698 EOF
12699  
12700 else
12701   echo "$ac_t""no" 1>&6
12702 fi
12703 done
12704
12705  echo $ac_n "checking for db""... $ac_c" 1>&6
12706 echo "configure:12707: checking for db" >&5
12707 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12708   echo $ac_n "(cached) $ac_c" 1>&6
12709 else
12710   
12711         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12712                 ol_cv_gdbm=no
12713         else
12714                 ol_cv_gdbm=yes
12715         fi
12716
12717 fi
12718
12719 echo "$ac_t""$ol_cv_gdbm" 1>&6
12720  if test $ol_cv_gdbm = yes ; then
12721         cat >> confdefs.h <<\EOF
12722 #define HAVE_GDBM 1
12723 EOF
12724
12725  fi
12726
12727
12728         if test $ol_cv_gdbm = yes ; then
12729                 ol_link_ldbm=gdbm
12730                 ol_with_ldbm_api=gdbm
12731
12732                 if test $ol_cv_lib_gdbm != yes ; then
12733                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12734                 fi
12735         fi
12736 fi
12737
12738 if test $ol_with_ldbm_api = ndbm ; then
12739         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12740 echo "configure:12741: checking for NDBM library" >&5
12741 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12742   echo $ac_n "(cached) $ac_c" 1>&6
12743 else
12744         ol_LIBS="$LIBS"
12745         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12746 echo "configure:12747: checking for dbm_open" >&5
12747 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12748   echo $ac_n "(cached) $ac_c" 1>&6
12749 else
12750   cat > conftest.$ac_ext <<EOF
12751 #line 12752 "configure"
12752 #include "confdefs.h"
12753 /* System header to define __stub macros and hopefully few prototypes,
12754     which can conflict with char dbm_open(); below.  */
12755 #include <assert.h>
12756 /* Override any gcc2 internal prototype to avoid an error.  */
12757 /* We use char because int might match the return type of a gcc2
12758     builtin and then its argument prototype would still apply.  */
12759 char dbm_open();
12760 char (*f)();
12761
12762 int main() {
12763
12764 /* The GNU C library defines this for functions which it implements
12765     to always fail with ENOSYS.  Some functions are actually named
12766     something starting with __ and the normal name is an alias.  */
12767 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12768 choke me
12769 #else
12770 f = dbm_open;
12771 #endif
12772
12773 ; return 0; }
12774 EOF
12775 if { (eval echo configure:12776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12776   rm -rf conftest*
12777   eval "ac_cv_func_dbm_open=yes"
12778 else
12779   echo "configure: failed program was:" >&5
12780   cat conftest.$ac_ext >&5
12781   rm -rf conftest*
12782   eval "ac_cv_func_dbm_open=no"
12783 fi
12784 rm -f conftest*
12785 fi
12786
12787 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12788   echo "$ac_t""yes" 1>&6
12789   ol_cv_lib_ndbm=yes
12790 else
12791   echo "$ac_t""no" 1>&6
12792
12793                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12794 echo "configure:12795: checking for dbm_open in -lndbm" >&5
12795 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12796 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12797   echo $ac_n "(cached) $ac_c" 1>&6
12798 else
12799   ac_save_LIBS="$LIBS"
12800 LIBS="-lndbm  $LIBS"
12801 cat > conftest.$ac_ext <<EOF
12802 #line 12803 "configure"
12803 #include "confdefs.h"
12804 /* Override any gcc2 internal prototype to avoid an error.  */
12805 /* We use char because int might match the return type of a gcc2
12806     builtin and then its argument prototype would still apply.  */
12807 char dbm_open();
12808
12809 int main() {
12810 dbm_open()
12811 ; return 0; }
12812 EOF
12813 if { (eval echo configure:12814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12814   rm -rf conftest*
12815   eval "ac_cv_lib_$ac_lib_var=yes"
12816 else
12817   echo "configure: failed program was:" >&5
12818   cat conftest.$ac_ext >&5
12819   rm -rf conftest*
12820   eval "ac_cv_lib_$ac_lib_var=no"
12821 fi
12822 rm -f conftest*
12823 LIBS="$ac_save_LIBS"
12824
12825 fi
12826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12827   echo "$ac_t""yes" 1>&6
12828   ol_cv_lib_ndbm=-lndbm
12829 else
12830   echo "$ac_t""no" 1>&6
12831
12832                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12833 echo "configure:12834: checking for dbm_open in -ldbm" >&5
12834 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12835 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12836   echo $ac_n "(cached) $ac_c" 1>&6
12837 else
12838   ac_save_LIBS="$LIBS"
12839 LIBS="-ldbm  $LIBS"
12840 cat > conftest.$ac_ext <<EOF
12841 #line 12842 "configure"
12842 #include "confdefs.h"
12843 /* Override any gcc2 internal prototype to avoid an error.  */
12844 /* We use char because int might match the return type of a gcc2
12845     builtin and then its argument prototype would still apply.  */
12846 char dbm_open();
12847
12848 int main() {
12849 dbm_open()
12850 ; return 0; }
12851 EOF
12852 if { (eval echo configure:12853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12853   rm -rf conftest*
12854   eval "ac_cv_lib_$ac_lib_var=yes"
12855 else
12856   echo "configure: failed program was:" >&5
12857   cat conftest.$ac_ext >&5
12858   rm -rf conftest*
12859   eval "ac_cv_lib_$ac_lib_var=no"
12860 fi
12861 rm -f conftest*
12862 LIBS="$ac_save_LIBS"
12863
12864 fi
12865 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12866   echo "$ac_t""yes" 1>&6
12867   ol_cv_lib_ndbm=-ldbm
12868 else
12869   echo "$ac_t""no" 1>&6
12870 ol_cv_lib_ndbm=no
12871 fi
12872                 
12873 fi
12874
12875         
12876 fi
12877
12878         LIBS="$ol_LIBS"
12879
12880 fi
12881
12882 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12883
12884
12885  for ac_hdr in ndbm.h
12886 do
12887 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12888 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12889 echo "configure:12890: checking for $ac_hdr" >&5
12890 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12891   echo $ac_n "(cached) $ac_c" 1>&6
12892 else
12893   cat > conftest.$ac_ext <<EOF
12894 #line 12895 "configure"
12895 #include "confdefs.h"
12896 #include <$ac_hdr>
12897 EOF
12898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12899 { (eval echo configure:12900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12901 if test -z "$ac_err"; then
12902   rm -rf conftest*
12903   eval "ac_cv_header_$ac_safe=yes"
12904 else
12905   echo "$ac_err" >&5
12906   echo "configure: failed program was:" >&5
12907   cat conftest.$ac_ext >&5
12908   rm -rf conftest*
12909   eval "ac_cv_header_$ac_safe=no"
12910 fi
12911 rm -f conftest*
12912 fi
12913 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12914   echo "$ac_t""yes" 1>&6
12915     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12916   cat >> confdefs.h <<EOF
12917 #define $ac_tr_hdr 1
12918 EOF
12919  
12920 else
12921   echo "$ac_t""no" 1>&6
12922 fi
12923 done
12924
12925  echo $ac_n "checking for db""... $ac_c" 1>&6
12926 echo "configure:12927: checking for db" >&5
12927 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12928   echo $ac_n "(cached) $ac_c" 1>&6
12929 else
12930   
12931         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12932                 ol_cv_ndbm=no
12933         else
12934                 ol_cv_ndbm=yes
12935         fi
12936
12937 fi
12938
12939 echo "$ac_t""$ol_cv_ndbm" 1>&6
12940  if test $ol_cv_ndbm = yes ; then
12941         cat >> confdefs.h <<\EOF
12942 #define HAVE_NDBM 1
12943 EOF
12944
12945  fi
12946
12947
12948         if test $ol_cv_ndbm = yes ; then
12949                 ol_link_ldbm=ndbm
12950                 ol_with_ldbm_api=ndbm
12951
12952                 if test $ol_cv_lib_ndbm != yes ; then
12953                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12954                 fi
12955         fi
12956 fi
12957
12958 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12959         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12960         if test $ol_enable_ldbm = yes ; then
12961                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12962         fi
12963
12964         echo "configure: warning: disabling LDBM" 1>&2
12965         ol_enable_ldbm=no
12966 fi
12967
12968 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12969         LINK_BINS_DYNAMIC="yes"
12970 else
12971         LINK_BINS_DYNAMIC="no"
12972 fi
12973
12974 if test $ol_enable_wrappers != no ; then
12975         for ac_hdr in tcpd.h
12976 do
12977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12979 echo "configure:12980: checking for $ac_hdr" >&5
12980 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12981   echo $ac_n "(cached) $ac_c" 1>&6
12982 else
12983   cat > conftest.$ac_ext <<EOF
12984 #line 12985 "configure"
12985 #include "confdefs.h"
12986 #include <$ac_hdr>
12987 EOF
12988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12989 { (eval echo configure:12990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12991 if test -z "$ac_err"; then
12992   rm -rf conftest*
12993   eval "ac_cv_header_$ac_safe=yes"
12994 else
12995   echo "$ac_err" >&5
12996   echo "configure: failed program was:" >&5
12997   cat conftest.$ac_ext >&5
12998   rm -rf conftest*
12999   eval "ac_cv_header_$ac_safe=no"
13000 fi
13001 rm -f conftest*
13002 fi
13003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13004   echo "$ac_t""yes" 1>&6
13005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13006   cat >> confdefs.h <<EOF
13007 #define $ac_tr_hdr 1
13008 EOF
13009  
13010 else
13011   echo "$ac_t""no" 1>&6
13012 fi
13013 done
13014
13015
13016         if test $ac_cv_header_tcpd_h != yes ; then
13017                 have_wrappers=no
13018         else
13019                 cat > conftest.$ac_ext <<EOF
13020 #line 13021 "configure"
13021 #include "confdefs.h"
13022
13023 int allow_severity = 0;
13024 int deny_severity  = 0;
13025                 
13026 int main() {
13027 hosts_access()
13028 ; return 0; }
13029 EOF
13030 if { (eval echo configure:13031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13031   rm -rf conftest*
13032   have_wrappers=yes
13033 else
13034   echo "configure: failed program was:" >&5
13035   cat conftest.$ac_ext >&5
13036   rm -rf conftest*
13037   have_wrappers=no
13038 fi
13039 rm -f conftest*
13040         fi
13041
13042         if test $have_wrappers = yes ; then
13043                 cat >> confdefs.h <<\EOF
13044 #define HAVE_TCPD 1
13045 EOF
13046
13047                 WRAP_LIBS="-lwrap"
13048
13049                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13050 echo "configure:13051: checking for main in -lnsl" >&5
13051 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13052 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13053   echo $ac_n "(cached) $ac_c" 1>&6
13054 else
13055   ac_save_LIBS="$LIBS"
13056 LIBS="-lnsl  $LIBS"
13057 cat > conftest.$ac_ext <<EOF
13058 #line 13059 "configure"
13059 #include "confdefs.h"
13060
13061 int main() {
13062 main()
13063 ; return 0; }
13064 EOF
13065 if { (eval echo configure:13066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13066   rm -rf conftest*
13067   eval "ac_cv_lib_$ac_lib_var=yes"
13068 else
13069   echo "configure: failed program was:" >&5
13070   cat conftest.$ac_ext >&5
13071   rm -rf conftest*
13072   eval "ac_cv_lib_$ac_lib_var=no"
13073 fi
13074 rm -f conftest*
13075 LIBS="$ac_save_LIBS"
13076
13077 fi
13078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13079   echo "$ac_t""yes" 1>&6
13080     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13081     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13082   cat >> confdefs.h <<EOF
13083 #define $ac_tr_lib 1
13084 EOF
13085
13086   LIBS="-lnsl $LIBS"
13087
13088 else
13089   echo "$ac_t""no" 1>&6
13090 fi
13091
13092         else
13093                 echo "configure: warning: could not find -lwrap" 1>&2
13094                 if test $ol_enable_wrappers = yes ; then
13095                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13096                 fi
13097
13098                 echo "configure: warning: disabling wrappers support" 1>&2
13099                 ol_enable_wrappers=no
13100                 WRAP_LIBS=""
13101         fi
13102 fi
13103
13104 if test $ol_enable_syslog != no ; then
13105         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13106 echo "configure:13107: checking for openlog" >&5
13107 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13108   echo $ac_n "(cached) $ac_c" 1>&6
13109 else
13110   cat > conftest.$ac_ext <<EOF
13111 #line 13112 "configure"
13112 #include "confdefs.h"
13113 /* System header to define __stub macros and hopefully few prototypes,
13114     which can conflict with char openlog(); below.  */
13115 #include <assert.h>
13116 /* Override any gcc2 internal prototype to avoid an error.  */
13117 /* We use char because int might match the return type of a gcc2
13118     builtin and then its argument prototype would still apply.  */
13119 char openlog();
13120 char (*f)();
13121
13122 int main() {
13123
13124 /* The GNU C library defines this for functions which it implements
13125     to always fail with ENOSYS.  Some functions are actually named
13126     something starting with __ and the normal name is an alias.  */
13127 #if defined (__stub_openlog) || defined (__stub___openlog)
13128 choke me
13129 #else
13130 f = openlog;
13131 #endif
13132
13133 ; return 0; }
13134 EOF
13135 if { (eval echo configure:13136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13136   rm -rf conftest*
13137   eval "ac_cv_func_openlog=yes"
13138 else
13139   echo "configure: failed program was:" >&5
13140   cat conftest.$ac_ext >&5
13141   rm -rf conftest*
13142   eval "ac_cv_func_openlog=no"
13143 fi
13144 rm -f conftest*
13145 fi
13146
13147 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13148   echo "$ac_t""yes" 1>&6
13149   :
13150 else
13151   echo "$ac_t""no" 1>&6
13152 fi
13153
13154         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13155                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13156         fi
13157         ol_enable_syslog=$ac_cv_func_openlog
13158 fi
13159
13160 if test $ol_enable_tcl != no ; then
13161         for ac_hdr in tcl.h
13162 do
13163 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13164 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13165 echo "configure:13166: checking for $ac_hdr" >&5
13166 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13167   echo $ac_n "(cached) $ac_c" 1>&6
13168 else
13169   cat > conftest.$ac_ext <<EOF
13170 #line 13171 "configure"
13171 #include "confdefs.h"
13172 #include <$ac_hdr>
13173 EOF
13174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13175 { (eval echo configure:13176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13177 if test -z "$ac_err"; then
13178   rm -rf conftest*
13179   eval "ac_cv_header_$ac_safe=yes"
13180 else
13181   echo "$ac_err" >&5
13182   echo "configure: failed program was:" >&5
13183   cat conftest.$ac_ext >&5
13184   rm -rf conftest*
13185   eval "ac_cv_header_$ac_safe=no"
13186 fi
13187 rm -f conftest*
13188 fi
13189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13190   echo "$ac_t""yes" 1>&6
13191     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13192   cat >> confdefs.h <<EOF
13193 #define $ac_tr_hdr 1
13194 EOF
13195  
13196 else
13197   echo "$ac_t""no" 1>&6
13198 fi
13199 done
13200
13201
13202         if test $ac_cv_header_tcl_h != yes ; then
13203                 have_tcl=no
13204         else
13205                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13206                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13207 echo "configure:13208: checking for main in -l$lib" >&5
13208 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13209 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13210   echo $ac_n "(cached) $ac_c" 1>&6
13211 else
13212   ac_save_LIBS="$LIBS"
13213 LIBS="-l$lib  $LIBS"
13214 cat > conftest.$ac_ext <<EOF
13215 #line 13216 "configure"
13216 #include "confdefs.h"
13217
13218 int main() {
13219 main()
13220 ; return 0; }
13221 EOF
13222 if { (eval echo configure:13223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13223   rm -rf conftest*
13224   eval "ac_cv_lib_$ac_lib_var=yes"
13225 else
13226   echo "configure: failed program was:" >&5
13227   cat conftest.$ac_ext >&5
13228   rm -rf conftest*
13229   eval "ac_cv_lib_$ac_lib_var=no"
13230 fi
13231 rm -f conftest*
13232 LIBS="$ac_save_LIBS"
13233
13234 fi
13235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13236   echo "$ac_t""yes" 1>&6
13237   have_tcl=yes
13238                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13239                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13240                            else
13241                                MOD_TCL_LIB="-l${lib}"
13242                            fi;break
13243 else
13244   echo "$ac_t""no" 1>&6
13245 have_tcl=no
13246 fi
13247
13248                 done
13249         fi
13250
13251         if test $have_tcl != yes ; then
13252                 echo "configure: warning: could not find -ltcl" 1>&2
13253                 if test $ol_enable_tcl = yes ; then
13254                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13255                 fi
13256
13257                 ol_enable_tcl=no
13258         fi
13259 fi
13260
13261 ol_link_termcap=no
13262 for ac_hdr in termcap.h ncurses.h
13263 do
13264 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13265 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13266 echo "configure:13267: checking for $ac_hdr" >&5
13267 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13268   echo $ac_n "(cached) $ac_c" 1>&6
13269 else
13270   cat > conftest.$ac_ext <<EOF
13271 #line 13272 "configure"
13272 #include "confdefs.h"
13273 #include <$ac_hdr>
13274 EOF
13275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13276 { (eval echo configure:13277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13278 if test -z "$ac_err"; then
13279   rm -rf conftest*
13280   eval "ac_cv_header_$ac_safe=yes"
13281 else
13282   echo "$ac_err" >&5
13283   echo "configure: failed program was:" >&5
13284   cat conftest.$ac_ext >&5
13285   rm -rf conftest*
13286   eval "ac_cv_header_$ac_safe=no"
13287 fi
13288 rm -f conftest*
13289 fi
13290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13291   echo "$ac_t""yes" 1>&6
13292     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13293   cat >> confdefs.h <<EOF
13294 #define $ac_tr_hdr 1
13295 EOF
13296  
13297 else
13298   echo "$ac_t""no" 1>&6
13299 fi
13300 done
13301
13302
13303 if test $ol_link_termcap = no ; then
13304         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13305 echo "configure:13306: checking for tputs in -ltermcap" >&5
13306 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13307 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13308   echo $ac_n "(cached) $ac_c" 1>&6
13309 else
13310   ac_save_LIBS="$LIBS"
13311 LIBS="-ltermcap  $LIBS"
13312 cat > conftest.$ac_ext <<EOF
13313 #line 13314 "configure"
13314 #include "confdefs.h"
13315 /* Override any gcc2 internal prototype to avoid an error.  */
13316 /* We use char because int might match the return type of a gcc2
13317     builtin and then its argument prototype would still apply.  */
13318 char tputs();
13319
13320 int main() {
13321 tputs()
13322 ; return 0; }
13323 EOF
13324 if { (eval echo configure:13325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13325   rm -rf conftest*
13326   eval "ac_cv_lib_$ac_lib_var=yes"
13327 else
13328   echo "configure: failed program was:" >&5
13329   cat conftest.$ac_ext >&5
13330   rm -rf conftest*
13331   eval "ac_cv_lib_$ac_lib_var=no"
13332 fi
13333 rm -f conftest*
13334 LIBS="$ac_save_LIBS"
13335
13336 fi
13337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13338   echo "$ac_t""yes" 1>&6
13339   have_termcap=yes
13340 else
13341   echo "$ac_t""no" 1>&6
13342 have_termcap=no
13343 fi
13344
13345         if test $have_termcap = yes ; then
13346                 cat >> confdefs.h <<\EOF
13347 #define HAVE_TERMCAP 1
13348 EOF
13349
13350                 ol_link_termcap=yes
13351                 TERMCAP_LIBS=-ltermcap
13352         fi
13353 fi
13354
13355 if test $ol_link_termcap = no ; then
13356         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13357 echo "configure:13358: checking for initscr in -lncurses" >&5
13358 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13359 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13360   echo $ac_n "(cached) $ac_c" 1>&6
13361 else
13362   ac_save_LIBS="$LIBS"
13363 LIBS="-lncurses  $LIBS"
13364 cat > conftest.$ac_ext <<EOF
13365 #line 13366 "configure"
13366 #include "confdefs.h"
13367 /* Override any gcc2 internal prototype to avoid an error.  */
13368 /* We use char because int might match the return type of a gcc2
13369     builtin and then its argument prototype would still apply.  */
13370 char initscr();
13371
13372 int main() {
13373 initscr()
13374 ; return 0; }
13375 EOF
13376 if { (eval echo configure:13377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13377   rm -rf conftest*
13378   eval "ac_cv_lib_$ac_lib_var=yes"
13379 else
13380   echo "configure: failed program was:" >&5
13381   cat conftest.$ac_ext >&5
13382   rm -rf conftest*
13383   eval "ac_cv_lib_$ac_lib_var=no"
13384 fi
13385 rm -f conftest*
13386 LIBS="$ac_save_LIBS"
13387
13388 fi
13389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13390   echo "$ac_t""yes" 1>&6
13391   have_ncurses=yes
13392 else
13393   echo "$ac_t""no" 1>&6
13394 have_ncurses=no
13395 fi
13396
13397         if test $have_ncurses = yes ; then
13398                 cat >> confdefs.h <<\EOF
13399 #define HAVE_NCURSES 1
13400 EOF
13401
13402                 ol_link_termcap=yes
13403                 TERMCAP_LIBS=-lncurses
13404         fi
13405 fi
13406
13407 if test $ol_link_termcap = no ; then
13408         cat >> confdefs.h <<\EOF
13409 #define NO_TERMCAP 1
13410 EOF
13411
13412         TERMCAP_LIBS=
13413 fi
13414
13415 ol_link_sasl=no
13416 ol_link_spasswd=no
13417 if test $ol_with_cyrus_sasl != no ; then
13418         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13419 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13420 echo "configure:13421: checking for sasl.h" >&5
13421 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13422   echo $ac_n "(cached) $ac_c" 1>&6
13423 else
13424   cat > conftest.$ac_ext <<EOF
13425 #line 13426 "configure"
13426 #include "confdefs.h"
13427 #include <sasl.h>
13428 EOF
13429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13430 { (eval echo configure:13431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13432 if test -z "$ac_err"; then
13433   rm -rf conftest*
13434   eval "ac_cv_header_$ac_safe=yes"
13435 else
13436   echo "$ac_err" >&5
13437   echo "configure: failed program was:" >&5
13438   cat conftest.$ac_ext >&5
13439   rm -rf conftest*
13440   eval "ac_cv_header_$ac_safe=no"
13441 fi
13442 rm -f conftest*
13443 fi
13444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13445   echo "$ac_t""yes" 1>&6
13446   :
13447 else
13448   echo "$ac_t""no" 1>&6
13449 fi
13450
13451
13452         if test $ac_cv_header_sasl_h = yes ; then
13453                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13454 echo "configure:13455: checking for sasl_client_init in -lsasl" >&5
13455 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13456 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13457   echo $ac_n "(cached) $ac_c" 1>&6
13458 else
13459   ac_save_LIBS="$LIBS"
13460 LIBS="-lsasl  $LIBS"
13461 cat > conftest.$ac_ext <<EOF
13462 #line 13463 "configure"
13463 #include "confdefs.h"
13464 /* Override any gcc2 internal prototype to avoid an error.  */
13465 /* We use char because int might match the return type of a gcc2
13466     builtin and then its argument prototype would still apply.  */
13467 char sasl_client_init();
13468
13469 int main() {
13470 sasl_client_init()
13471 ; return 0; }
13472 EOF
13473 if { (eval echo configure:13474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13474   rm -rf conftest*
13475   eval "ac_cv_lib_$ac_lib_var=yes"
13476 else
13477   echo "configure: failed program was:" >&5
13478   cat conftest.$ac_ext >&5
13479   rm -rf conftest*
13480   eval "ac_cv_lib_$ac_lib_var=no"
13481 fi
13482 rm -f conftest*
13483 LIBS="$ac_save_LIBS"
13484
13485 fi
13486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13487   echo "$ac_t""yes" 1>&6
13488   have_cyrus_sasl=yes
13489 else
13490   echo "$ac_t""no" 1>&6
13491 have_cyrus_sasl=no
13492 fi
13493
13494
13495                 if test $have_cyrus_sasl != no ; then
13496                         SASL_LIBS="-lsasl"
13497                         cat >> confdefs.h <<\EOF
13498 #define HAVE_CYRUS_SASL 1
13499 EOF
13500
13501                         ol_link_sasl=yes
13502                 fi
13503         fi
13504
13505         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13506                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13507         fi
13508 fi
13509
13510 if test $cross_compiling != yes ; then
13511         dev=no
13512         if test -r /dev/urandom ; then
13513                 dev="/dev/urandom";
13514         elif test -r /idev/urandom ; then
13515                 dev="/idev/urandom";
13516         elif test -r /dev/srandom ; then
13517                 dev="/dev/srandom";
13518         elif test -r /dev/random ; then
13519                 dev="/dev/random";
13520         elif test -r /idev/random ; then
13521                 dev="/idev/random";
13522         fi
13523
13524         if test $dev != no ; then
13525                 cat >> confdefs.h <<EOF
13526 #define URANDOM_DEVICE "$dev"
13527 EOF
13528
13529         fi
13530 fi
13531
13532 ol_link_fetch=no
13533 if test $ol_with_fetch != no ; then
13534         ol_LIBS=$LIBS
13535 LIBS="-lfetch -lcom_err $LIBS"
13536 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13537 echo "configure:13538: checking fetch(3) library" >&5
13538 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13539   echo $ac_n "(cached) $ac_c" 1>&6
13540 else
13541   
13542         cat > conftest.$ac_ext <<EOF
13543 #line 13544 "configure"
13544 #include "confdefs.h"
13545
13546 #include <sys/param.h>
13547 #include <stdio.h>
13548 #include <fetch.h>
13549 int main() {
13550 struct url *u = fetchParseURL("file:///"); 
13551 ; return 0; }
13552 EOF
13553 if { (eval echo configure:13554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13554   rm -rf conftest*
13555   ol_cv_lib_fetch=yes
13556 else
13557   echo "configure: failed program was:" >&5
13558   cat conftest.$ac_ext >&5
13559   rm -rf conftest*
13560   ol_cv_lib_fetch=no
13561 fi
13562 rm -f conftest*
13563 fi
13564
13565 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13566 LIBS=$ol_LIBS
13567 if test $ol_cv_lib_fetch != no ; then
13568         ol_link_fetch="-lfetch -lcom_err"
13569         cat >> confdefs.h <<\EOF
13570 #define HAVE_FETCH 1
13571 EOF
13572
13573 fi
13574
13575
13576         if test $ol_cv_lib_fetch != no ; then
13577                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13578                 ol_link_fetch=freebsd
13579
13580         elif test $ol_with_fetch != auto ; then
13581                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13582         fi 
13583 fi
13584
13585 ol_link_readline=no
13586 if test $ol_with_readline != no ; then
13587         for ac_hdr in readline/readline.h readline/history.h
13588 do
13589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13591 echo "configure:13592: checking for $ac_hdr" >&5
13592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13593   echo $ac_n "(cached) $ac_c" 1>&6
13594 else
13595   cat > conftest.$ac_ext <<EOF
13596 #line 13597 "configure"
13597 #include "confdefs.h"
13598 #include <$ac_hdr>
13599 EOF
13600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13601 { (eval echo configure:13602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13603 if test -z "$ac_err"; then
13604   rm -rf conftest*
13605   eval "ac_cv_header_$ac_safe=yes"
13606 else
13607   echo "$ac_err" >&5
13608   echo "configure: failed program was:" >&5
13609   cat conftest.$ac_ext >&5
13610   rm -rf conftest*
13611   eval "ac_cv_header_$ac_safe=no"
13612 fi
13613 rm -f conftest*
13614 fi
13615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13616   echo "$ac_t""yes" 1>&6
13617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13618   cat >> confdefs.h <<EOF
13619 #define $ac_tr_hdr 1
13620 EOF
13621  
13622 else
13623   echo "$ac_t""no" 1>&6
13624 fi
13625 done
13626
13627
13628         if test $ac_cv_header_readline_readline_h = yes ; then
13629                 save_LIBS="$LIBS"
13630                 LIBS="$TERMCAP_LIBS $LIBS"
13631                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13632 echo "configure:13633: checking for readline in -lreadline" >&5
13633 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13634 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13635   echo $ac_n "(cached) $ac_c" 1>&6
13636 else
13637   ac_save_LIBS="$LIBS"
13638 LIBS="-lreadline  $LIBS"
13639 cat > conftest.$ac_ext <<EOF
13640 #line 13641 "configure"
13641 #include "confdefs.h"
13642 /* Override any gcc2 internal prototype to avoid an error.  */
13643 /* We use char because int might match the return type of a gcc2
13644     builtin and then its argument prototype would still apply.  */
13645 char readline();
13646
13647 int main() {
13648 readline()
13649 ; return 0; }
13650 EOF
13651 if { (eval echo configure:13652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13652   rm -rf conftest*
13653   eval "ac_cv_lib_$ac_lib_var=yes"
13654 else
13655   echo "configure: failed program was:" >&5
13656   cat conftest.$ac_ext >&5
13657   rm -rf conftest*
13658   eval "ac_cv_lib_$ac_lib_var=no"
13659 fi
13660 rm -f conftest*
13661 LIBS="$ac_save_LIBS"
13662
13663 fi
13664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13665   echo "$ac_t""yes" 1>&6
13666   have_readline=yes
13667 else
13668   echo "$ac_t""no" 1>&6
13669 have_readline=no
13670 fi
13671
13672                 LIBS="$save_LIBS"
13673                         
13674                 if test $have_readline = yes ; then
13675                         ol_with_readline=found
13676                         ol_link_readline=yes
13677
13678                         READLINE_LIBS="-lreadline"
13679                 fi
13680         fi
13681 fi
13682
13683 if test $ol_link_readline = yes ; then
13684         cat >> confdefs.h <<\EOF
13685 #define HAVE_READLINE 1
13686 EOF
13687
13688 fi
13689
13690
13691 if test $ol_enable_crypt != no ; then
13692         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13693 echo "configure:13694: checking for crypt" >&5
13694 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13695   echo $ac_n "(cached) $ac_c" 1>&6
13696 else
13697   cat > conftest.$ac_ext <<EOF
13698 #line 13699 "configure"
13699 #include "confdefs.h"
13700 /* System header to define __stub macros and hopefully few prototypes,
13701     which can conflict with char crypt(); below.  */
13702 #include <assert.h>
13703 /* Override any gcc2 internal prototype to avoid an error.  */
13704 /* We use char because int might match the return type of a gcc2
13705     builtin and then its argument prototype would still apply.  */
13706 char crypt();
13707 char (*f)();
13708
13709 int main() {
13710
13711 /* The GNU C library defines this for functions which it implements
13712     to always fail with ENOSYS.  Some functions are actually named
13713     something starting with __ and the normal name is an alias.  */
13714 #if defined (__stub_crypt) || defined (__stub___crypt)
13715 choke me
13716 #else
13717 f = crypt;
13718 #endif
13719
13720 ; return 0; }
13721 EOF
13722 if { (eval echo configure:13723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13723   rm -rf conftest*
13724   eval "ac_cv_func_crypt=yes"
13725 else
13726   echo "configure: failed program was:" >&5
13727   cat conftest.$ac_ext >&5
13728   rm -rf conftest*
13729   eval "ac_cv_func_crypt=no"
13730 fi
13731 rm -f conftest*
13732 fi
13733
13734 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13735   echo "$ac_t""yes" 1>&6
13736   have_crypt=yes
13737 else
13738   echo "$ac_t""no" 1>&6
13739
13740                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13741 echo "configure:13742: checking for crypt in -lcrypt" >&5
13742 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13743 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13744   echo $ac_n "(cached) $ac_c" 1>&6
13745 else
13746   ac_save_LIBS="$LIBS"
13747 LIBS="-lcrypt  $LIBS"
13748 cat > conftest.$ac_ext <<EOF
13749 #line 13750 "configure"
13750 #include "confdefs.h"
13751 /* Override any gcc2 internal prototype to avoid an error.  */
13752 /* We use char because int might match the return type of a gcc2
13753     builtin and then its argument prototype would still apply.  */
13754 char crypt();
13755
13756 int main() {
13757 crypt()
13758 ; return 0; }
13759 EOF
13760 if { (eval echo configure:13761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13761   rm -rf conftest*
13762   eval "ac_cv_lib_$ac_lib_var=yes"
13763 else
13764   echo "configure: failed program was:" >&5
13765   cat conftest.$ac_ext >&5
13766   rm -rf conftest*
13767   eval "ac_cv_lib_$ac_lib_var=no"
13768 fi
13769 rm -f conftest*
13770 LIBS="$ac_save_LIBS"
13771
13772 fi
13773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13774   echo "$ac_t""yes" 1>&6
13775   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13776                         have_crypt=yes
13777 else
13778   echo "$ac_t""no" 1>&6
13779 have_crypt=no
13780 fi
13781
13782 fi
13783
13784
13785         if test $have_crypt = yes ; then
13786                 cat >> confdefs.h <<\EOF
13787 #define HAVE_CRYPT 1
13788 EOF
13789
13790         else
13791                 echo "configure: warning: could not find crypt" 1>&2
13792                 if test $ol_enable_crypt = yes ; then
13793                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13794                 fi
13795
13796                 echo "configure: warning: disabling crypt support" 1>&2
13797                 ol_enable_crypt=no
13798         fi
13799 fi
13800
13801 if test $ol_enable_proctitle != no ; then
13802         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13803 echo "configure:13804: checking for setproctitle" >&5
13804 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13805   echo $ac_n "(cached) $ac_c" 1>&6
13806 else
13807   cat > conftest.$ac_ext <<EOF
13808 #line 13809 "configure"
13809 #include "confdefs.h"
13810 /* System header to define __stub macros and hopefully few prototypes,
13811     which can conflict with char setproctitle(); below.  */
13812 #include <assert.h>
13813 /* Override any gcc2 internal prototype to avoid an error.  */
13814 /* We use char because int might match the return type of a gcc2
13815     builtin and then its argument prototype would still apply.  */
13816 char setproctitle();
13817 char (*f)();
13818
13819 int main() {
13820
13821 /* The GNU C library defines this for functions which it implements
13822     to always fail with ENOSYS.  Some functions are actually named
13823     something starting with __ and the normal name is an alias.  */
13824 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13825 choke me
13826 #else
13827 f = setproctitle;
13828 #endif
13829
13830 ; return 0; }
13831 EOF
13832 if { (eval echo configure:13833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13833   rm -rf conftest*
13834   eval "ac_cv_func_setproctitle=yes"
13835 else
13836   echo "configure: failed program was:" >&5
13837   cat conftest.$ac_ext >&5
13838   rm -rf conftest*
13839   eval "ac_cv_func_setproctitle=no"
13840 fi
13841 rm -f conftest*
13842 fi
13843
13844 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13845   echo "$ac_t""yes" 1>&6
13846   have_setproctitle=yes
13847 else
13848   echo "$ac_t""no" 1>&6
13849
13850                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13851 echo "configure:13852: checking for setproctitle in -lutil" >&5
13852 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13853 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13854   echo $ac_n "(cached) $ac_c" 1>&6
13855 else
13856   ac_save_LIBS="$LIBS"
13857 LIBS="-lutil  $LIBS"
13858 cat > conftest.$ac_ext <<EOF
13859 #line 13860 "configure"
13860 #include "confdefs.h"
13861 /* Override any gcc2 internal prototype to avoid an error.  */
13862 /* We use char because int might match the return type of a gcc2
13863     builtin and then its argument prototype would still apply.  */
13864 char setproctitle();
13865
13866 int main() {
13867 setproctitle()
13868 ; return 0; }
13869 EOF
13870 if { (eval echo configure:13871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13871   rm -rf conftest*
13872   eval "ac_cv_lib_$ac_lib_var=yes"
13873 else
13874   echo "configure: failed program was:" >&5
13875   cat conftest.$ac_ext >&5
13876   rm -rf conftest*
13877   eval "ac_cv_lib_$ac_lib_var=no"
13878 fi
13879 rm -f conftest*
13880 LIBS="$ac_save_LIBS"
13881
13882 fi
13883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13884   echo "$ac_t""yes" 1>&6
13885   have_setproctitle=yes
13886                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13887 else
13888   echo "$ac_t""no" 1>&6
13889 have_setproctitle=no
13890                         LIBOBJS="$LIBOBJS setproctitle.o"
13891                         LIBSRCS="$LIBSRCS setproctitle.c"
13892 fi
13893
13894 fi
13895
13896
13897         if test $have_setproctitle = yes ; then
13898                 cat >> confdefs.h <<\EOF
13899 #define HAVE_SETPROCTITLE 1
13900 EOF
13901
13902         fi
13903 fi
13904
13905 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13906 echo "configure:13907: checking for ANSI C header files" >&5
13907 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13908   echo $ac_n "(cached) $ac_c" 1>&6
13909 else
13910   cat > conftest.$ac_ext <<EOF
13911 #line 13912 "configure"
13912 #include "confdefs.h"
13913 #include <stdlib.h>
13914 #include <stdarg.h>
13915 #include <string.h>
13916 #include <float.h>
13917 EOF
13918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13919 { (eval echo configure:13920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13921 if test -z "$ac_err"; then
13922   rm -rf conftest*
13923   ac_cv_header_stdc=yes
13924 else
13925   echo "$ac_err" >&5
13926   echo "configure: failed program was:" >&5
13927   cat conftest.$ac_ext >&5
13928   rm -rf conftest*
13929   ac_cv_header_stdc=no
13930 fi
13931 rm -f conftest*
13932
13933 if test $ac_cv_header_stdc = yes; then
13934   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13935 cat > conftest.$ac_ext <<EOF
13936 #line 13937 "configure"
13937 #include "confdefs.h"
13938 #include <string.h>
13939 EOF
13940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13941   egrep "memchr" >/dev/null 2>&1; then
13942   :
13943 else
13944   rm -rf conftest*
13945   ac_cv_header_stdc=no
13946 fi
13947 rm -f conftest*
13948
13949 fi
13950
13951 if test $ac_cv_header_stdc = yes; then
13952   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13953 cat > conftest.$ac_ext <<EOF
13954 #line 13955 "configure"
13955 #include "confdefs.h"
13956 #include <stdlib.h>
13957 EOF
13958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13959   egrep "free" >/dev/null 2>&1; then
13960   :
13961 else
13962   rm -rf conftest*
13963   ac_cv_header_stdc=no
13964 fi
13965 rm -f conftest*
13966
13967 fi
13968
13969 if test $ac_cv_header_stdc = yes; then
13970   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13971 if test "$cross_compiling" = yes; then
13972   :
13973 else
13974   cat > conftest.$ac_ext <<EOF
13975 #line 13976 "configure"
13976 #include "confdefs.h"
13977 #include <ctype.h>
13978 #if ((' ' & 0x0FF) == 0x020)
13979 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13980 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13981 #else
13982 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13983  || ('j' <= (c) && (c) <= 'r') \
13984  || ('s' <= (c) && (c) <= 'z'))
13985 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13986 #endif
13987 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13988 int main () { int i; for (i = 0; i < 256; i++)
13989 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13990 exit (0); }
13991
13992 EOF
13993 if { (eval echo configure:13994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13994 then
13995   :
13996 else
13997   echo "configure: failed program was:" >&5
13998   cat conftest.$ac_ext >&5
13999   rm -fr conftest*
14000   ac_cv_header_stdc=no
14001 fi
14002 rm -fr conftest*
14003 fi
14004
14005 fi
14006 fi
14007
14008 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14009 if test $ac_cv_header_stdc = yes; then
14010   cat >> confdefs.h <<\EOF
14011 #define STDC_HEADERS 1
14012 EOF
14013
14014 fi
14015
14016 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14017 echo "configure:14018: checking for mode_t" >&5
14018 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14019   echo $ac_n "(cached) $ac_c" 1>&6
14020 else
14021   cat > conftest.$ac_ext <<EOF
14022 #line 14023 "configure"
14023 #include "confdefs.h"
14024 #include <sys/types.h>
14025 #if STDC_HEADERS
14026 #include <stdlib.h>
14027 #include <stddef.h>
14028 #endif
14029
14030 EOF
14031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14032   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14033   rm -rf conftest*
14034   eval "ac_cv_type_mode_t=yes"
14035 else
14036   rm -rf conftest*
14037   eval "ac_cv_type_mode_t=no"
14038 fi
14039 rm -f conftest*
14040
14041 fi
14042 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14043   echo "$ac_t""yes" 1>&6
14044 else
14045   echo "$ac_t""no" 1>&6
14046   cat >> confdefs.h <<EOF
14047 #define mode_t int
14048 EOF
14049
14050 fi
14051
14052 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14053 echo "configure:14054: checking for off_t" >&5
14054 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14055   echo $ac_n "(cached) $ac_c" 1>&6
14056 else
14057   cat > conftest.$ac_ext <<EOF
14058 #line 14059 "configure"
14059 #include "confdefs.h"
14060 #include <sys/types.h>
14061 #if STDC_HEADERS
14062 #include <stdlib.h>
14063 #include <stddef.h>
14064 #endif
14065
14066 EOF
14067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14068   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14069   rm -rf conftest*
14070   eval "ac_cv_type_off_t=yes"
14071 else
14072   rm -rf conftest*
14073   eval "ac_cv_type_off_t=no"
14074 fi
14075 rm -f conftest*
14076
14077 fi
14078 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14079   echo "$ac_t""yes" 1>&6
14080 else
14081   echo "$ac_t""no" 1>&6
14082   cat >> confdefs.h <<EOF
14083 #define off_t long
14084 EOF
14085
14086 fi
14087
14088 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14089 echo "configure:14090: checking for pid_t" >&5
14090 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14091   echo $ac_n "(cached) $ac_c" 1>&6
14092 else
14093   cat > conftest.$ac_ext <<EOF
14094 #line 14095 "configure"
14095 #include "confdefs.h"
14096 #include <sys/types.h>
14097 #if STDC_HEADERS
14098 #include <stdlib.h>
14099 #include <stddef.h>
14100 #endif
14101
14102 EOF
14103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14104   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14105   rm -rf conftest*
14106   eval "ac_cv_type_pid_t=yes"
14107 else
14108   rm -rf conftest*
14109   eval "ac_cv_type_pid_t=no"
14110 fi
14111 rm -f conftest*
14112
14113 fi
14114 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14115   echo "$ac_t""yes" 1>&6
14116 else
14117   echo "$ac_t""no" 1>&6
14118   cat >> confdefs.h <<EOF
14119 #define pid_t int
14120 EOF
14121
14122 fi
14123
14124 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14125 echo "configure:14126: checking for ptrdiff_t" >&5
14126 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14127   echo $ac_n "(cached) $ac_c" 1>&6
14128 else
14129   cat > conftest.$ac_ext <<EOF
14130 #line 14131 "configure"
14131 #include "confdefs.h"
14132 #include <stddef.h>
14133 int main() {
14134 ptrdiff_t p
14135 ; return 0; }
14136 EOF
14137 if { (eval echo configure:14138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14138   rm -rf conftest*
14139   am_cv_type_ptrdiff_t=yes
14140 else
14141   echo "configure: failed program was:" >&5
14142   cat conftest.$ac_ext >&5
14143   rm -rf conftest*
14144   am_cv_type_ptrdiff_t=no
14145 fi
14146 rm -f conftest*
14147 fi
14148
14149 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14150    if test $am_cv_type_ptrdiff_t = yes; then
14151      cat >> confdefs.h <<\EOF
14152 #define HAVE_PTRDIFF_T 1
14153 EOF
14154
14155    fi
14156
14157 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14158 echo "configure:14159: checking return type of signal handlers" >&5
14159 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14160   echo $ac_n "(cached) $ac_c" 1>&6
14161 else
14162   cat > conftest.$ac_ext <<EOF
14163 #line 14164 "configure"
14164 #include "confdefs.h"
14165 #include <sys/types.h>
14166 #include <signal.h>
14167 #ifdef signal
14168 #undef signal
14169 #endif
14170 #ifdef __cplusplus
14171 extern "C" void (*signal (int, void (*)(int)))(int);
14172 #else
14173 void (*signal ()) ();
14174 #endif
14175
14176 int main() {
14177 int i;
14178 ; return 0; }
14179 EOF
14180 if { (eval echo configure:14181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14181   rm -rf conftest*
14182   ac_cv_type_signal=void
14183 else
14184   echo "configure: failed program was:" >&5
14185   cat conftest.$ac_ext >&5
14186   rm -rf conftest*
14187   ac_cv_type_signal=int
14188 fi
14189 rm -f conftest*
14190 fi
14191
14192 echo "$ac_t""$ac_cv_type_signal" 1>&6
14193 cat >> confdefs.h <<EOF
14194 #define RETSIGTYPE $ac_cv_type_signal
14195 EOF
14196
14197
14198 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14199 echo "configure:14200: checking for size_t" >&5
14200 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14201   echo $ac_n "(cached) $ac_c" 1>&6
14202 else
14203   cat > conftest.$ac_ext <<EOF
14204 #line 14205 "configure"
14205 #include "confdefs.h"
14206 #include <sys/types.h>
14207 #if STDC_HEADERS
14208 #include <stdlib.h>
14209 #include <stddef.h>
14210 #endif
14211
14212 EOF
14213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14214   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14215   rm -rf conftest*
14216   eval "ac_cv_type_size_t=yes"
14217 else
14218   rm -rf conftest*
14219   eval "ac_cv_type_size_t=no"
14220 fi
14221 rm -f conftest*
14222
14223 fi
14224 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14225   echo "$ac_t""yes" 1>&6
14226 else
14227   echo "$ac_t""no" 1>&6
14228   cat >> confdefs.h <<EOF
14229 #define size_t unsigned
14230 EOF
14231
14232 fi
14233
14234
14235 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14236 echo "configure:14237: checking for ssize_t" >&5
14237 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14238   echo $ac_n "(cached) $ac_c" 1>&6
14239 else
14240   cat > conftest.$ac_ext <<EOF
14241 #line 14242 "configure"
14242 #include "confdefs.h"
14243 #include <sys/types.h>
14244 #if STDC_HEADERS
14245 #include <stdlib.h>
14246 #include <stddef.h>
14247 #endif
14248
14249 EOF
14250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14251   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14252   rm -rf conftest*
14253   eval "ac_cv_type_ssize_t=yes"
14254 else
14255   rm -rf conftest*
14256   eval "ac_cv_type_ssize_t=no"
14257 fi
14258 rm -f conftest*
14259
14260 fi
14261 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14262   echo "$ac_t""yes" 1>&6
14263 else
14264   echo "$ac_t""no" 1>&6
14265   cat >> confdefs.h <<EOF
14266 #define ssize_t signed int
14267 EOF
14268
14269 fi
14270
14271 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14272 echo "configure:14273: checking for caddr_t" >&5
14273 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14274   echo $ac_n "(cached) $ac_c" 1>&6
14275 else
14276   cat > conftest.$ac_ext <<EOF
14277 #line 14278 "configure"
14278 #include "confdefs.h"
14279 #include <sys/types.h>
14280 #if STDC_HEADERS
14281 #include <stdlib.h>
14282 #include <stddef.h>
14283 #endif
14284
14285 EOF
14286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14287   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14288   rm -rf conftest*
14289   eval "ac_cv_type_caddr_t=yes"
14290 else
14291   rm -rf conftest*
14292   eval "ac_cv_type_caddr_t=no"
14293 fi
14294 rm -f conftest*
14295
14296 fi
14297 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14298   echo "$ac_t""yes" 1>&6
14299 else
14300   echo "$ac_t""no" 1>&6
14301   cat >> confdefs.h <<EOF
14302 #define caddr_t char *
14303 EOF
14304
14305 fi
14306
14307
14308 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14309 echo "configure:14310: checking for socklen_t" >&5
14310 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14311   echo $ac_n "(cached) $ac_c" 1>&6
14312 else
14313   cat > conftest.$ac_ext <<EOF
14314 #line 14315 "configure"
14315 #include "confdefs.h"
14316
14317 #ifdef HAVE_SYS_TYPES_H
14318 #include <sys/types.h>
14319 #endif
14320 #ifdef HAVE_SYS_SOCKET_H
14321 #include <sys/socket.h>
14322 #endif
14323
14324 int main() {
14325 socklen_t len;
14326 ; return 0; }
14327 EOF
14328 if { (eval echo configure:14329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14329   rm -rf conftest*
14330   ol_cv_type_socklen_t=yes
14331 else
14332   echo "configure: failed program was:" >&5
14333   cat conftest.$ac_ext >&5
14334   rm -rf conftest*
14335   ol_cv_type_socklen_t=no
14336 fi
14337 rm -f conftest*
14338 fi
14339
14340 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14341   if test $ol_cv_type_socklen_t = no; then
14342     cat >> confdefs.h <<\EOF
14343 #define socklen_t int
14344 EOF
14345
14346   fi
14347  
14348 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14349 echo "configure:14350: checking for member st_blksize in aggregate type struct stat" >&5
14350 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14351   echo $ac_n "(cached) $ac_c" 1>&6
14352 else
14353   cat > conftest.$ac_ext <<EOF
14354 #line 14355 "configure"
14355 #include "confdefs.h"
14356 #include <sys/types.h>
14357 #include <sys/stat.h>
14358 int main() {
14359 struct stat foo; foo.st_blksize;
14360 ; return 0; }
14361 EOF
14362 if { (eval echo configure:14363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14363   rm -rf conftest*
14364   ac_cv_c_struct_member_st_blksize=yes
14365 else
14366   echo "configure: failed program was:" >&5
14367   cat conftest.$ac_ext >&5
14368   rm -rf conftest*
14369   ac_cv_c_struct_member_st_blksize=no
14370 fi
14371 rm -f conftest*
14372 fi
14373
14374 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14375 st_blksize="$ac_cv_c_struct_member_st_blksize"
14376 if test $ac_cv_c_struct_member_st_blksize = yes; then
14377   cat >> confdefs.h <<\EOF
14378 #define HAVE_ST_BLKSIZE 1
14379 EOF
14380
14381 fi
14382
14383 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14384 echo "configure:14385: checking whether time.h and sys/time.h may both be included" >&5
14385 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14386   echo $ac_n "(cached) $ac_c" 1>&6
14387 else
14388   cat > conftest.$ac_ext <<EOF
14389 #line 14390 "configure"
14390 #include "confdefs.h"
14391 #include <sys/types.h>
14392 #include <sys/time.h>
14393 #include <time.h>
14394 int main() {
14395 struct tm *tp;
14396 ; return 0; }
14397 EOF
14398 if { (eval echo configure:14399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14399   rm -rf conftest*
14400   ac_cv_header_time=yes
14401 else
14402   echo "configure: failed program was:" >&5
14403   cat conftest.$ac_ext >&5
14404   rm -rf conftest*
14405   ac_cv_header_time=no
14406 fi
14407 rm -f conftest*
14408 fi
14409
14410 echo "$ac_t""$ac_cv_header_time" 1>&6
14411 if test $ac_cv_header_time = yes; then
14412   cat >> confdefs.h <<\EOF
14413 #define TIME_WITH_SYS_TIME 1
14414 EOF
14415
14416 fi
14417
14418 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14419 echo "configure:14420: checking whether struct tm is in sys/time.h or time.h" >&5
14420 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14421   echo $ac_n "(cached) $ac_c" 1>&6
14422 else
14423   cat > conftest.$ac_ext <<EOF
14424 #line 14425 "configure"
14425 #include "confdefs.h"
14426 #include <sys/types.h>
14427 #include <time.h>
14428 int main() {
14429 struct tm *tp; tp->tm_sec;
14430 ; return 0; }
14431 EOF
14432 if { (eval echo configure:14433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14433   rm -rf conftest*
14434   ac_cv_struct_tm=time.h
14435 else
14436   echo "configure: failed program was:" >&5
14437   cat conftest.$ac_ext >&5
14438   rm -rf conftest*
14439   ac_cv_struct_tm=sys/time.h
14440 fi
14441 rm -f conftest*
14442 fi
14443
14444 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14445 if test $ac_cv_struct_tm = sys/time.h; then
14446   cat >> confdefs.h <<\EOF
14447 #define TM_IN_SYS_TIME 1
14448 EOF
14449
14450 fi
14451
14452 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14453 echo "configure:14454: checking for uid_t in sys/types.h" >&5
14454 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14455   echo $ac_n "(cached) $ac_c" 1>&6
14456 else
14457   cat > conftest.$ac_ext <<EOF
14458 #line 14459 "configure"
14459 #include "confdefs.h"
14460 #include <sys/types.h>
14461 EOF
14462 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14463   egrep "uid_t" >/dev/null 2>&1; then
14464   rm -rf conftest*
14465   ac_cv_type_uid_t=yes
14466 else
14467   rm -rf conftest*
14468   ac_cv_type_uid_t=no
14469 fi
14470 rm -f conftest*
14471
14472 fi
14473
14474 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14475 if test $ac_cv_type_uid_t = no; then
14476   cat >> confdefs.h <<\EOF
14477 #define uid_t int
14478 EOF
14479
14480   cat >> confdefs.h <<\EOF
14481 #define gid_t int
14482 EOF
14483
14484 fi
14485
14486 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14487 echo "configure:14488: checking for sig_atomic_t" >&5
14488 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14489   echo $ac_n "(cached) $ac_c" 1>&6
14490 else
14491   cat > conftest.$ac_ext <<EOF
14492 #line 14493 "configure"
14493 #include "confdefs.h"
14494 #include <signal.h>
14495 int main() {
14496 sig_atomic_t atomic;
14497 ; return 0; }
14498 EOF
14499 if { (eval echo configure:14500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14500   rm -rf conftest*
14501   ol_cv_type_sig_atomic_t=yes
14502 else
14503   echo "configure: failed program was:" >&5
14504   cat conftest.$ac_ext >&5
14505   rm -rf conftest*
14506   ol_cv_type_sig_atomic_t=no
14507 fi
14508 rm -f conftest*
14509 fi
14510
14511 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14512   if test $ol_cv_type_sig_atomic_t = no; then
14513     cat >> confdefs.h <<\EOF
14514 #define sig_atomic_t int
14515 EOF
14516
14517   fi
14518  
14519
14520
14521 # test for pw_gecos in struct passwd
14522 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14523 echo "configure:14524: checking struct passwd for pw_gecos" >&5
14524 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14525   echo $ac_n "(cached) $ac_c" 1>&6
14526 else
14527   
14528         cat > conftest.$ac_ext <<EOF
14529 #line 14530 "configure"
14530 #include "confdefs.h"
14531 #include <pwd.h>
14532 int main() {
14533
14534         struct passwd pwd;
14535         pwd.pw_gecos = pwd.pw_name;
14536
14537 ; return 0; }
14538 EOF
14539 if { (eval echo configure:14540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14540   rm -rf conftest*
14541   ol_cv_struct_passwd_pw_gecos=yes
14542 else
14543   echo "configure: failed program was:" >&5
14544   cat conftest.$ac_ext >&5
14545   rm -rf conftest*
14546   ol_cv_struct_passwd_pw_gecos=no
14547 fi
14548 rm -f conftest*
14549 fi
14550
14551 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14552 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14553         cat >> confdefs.h <<\EOF
14554 #define HAVE_PW_GECOS 1
14555 EOF
14556
14557 fi
14558
14559 # test for pw_passwd in struct passwd
14560 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14561 echo "configure:14562: checking struct passwd for pw_passwd" >&5
14562 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14563   echo $ac_n "(cached) $ac_c" 1>&6
14564 else
14565   
14566         cat > conftest.$ac_ext <<EOF
14567 #line 14568 "configure"
14568 #include "confdefs.h"
14569 #include <pwd.h>
14570 int main() {
14571
14572         struct passwd pwd;
14573         pwd.pw_passwd = pwd.pw_name;
14574
14575 ; return 0; }
14576 EOF
14577 if { (eval echo configure:14578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14578   rm -rf conftest*
14579   ol_cv_struct_passwd_pw_passwd=yes
14580 else
14581   echo "configure: failed program was:" >&5
14582   cat conftest.$ac_ext >&5
14583   rm -rf conftest*
14584   ol_cv_struct_passwd_pw_passwd=no
14585 fi
14586 rm -f conftest*
14587 fi
14588
14589 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14590 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14591         cat >> confdefs.h <<\EOF
14592 #define HAVE_PW_PASSWD 1
14593 EOF
14594
14595 fi
14596
14597
14598 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14599 echo "configure:14600: checking if toupper() requires islower()" >&5
14600 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14601   echo $ac_n "(cached) $ac_c" 1>&6
14602 else
14603   
14604         if test "$cross_compiling" = yes; then
14605   ol_cv_c_upper_lower=safe
14606 else
14607   cat > conftest.$ac_ext <<EOF
14608 #line 14609 "configure"
14609 #include "confdefs.h"
14610
14611 #include <ctype.h>
14612 main()
14613 {
14614         if ('C' == toupper('C'))
14615                 exit(0);
14616         else
14617                 exit(1);
14618 }
14619 EOF
14620 if { (eval echo configure:14621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14621 then
14622   ol_cv_c_upper_lower=no
14623 else
14624   echo "configure: failed program was:" >&5
14625   cat conftest.$ac_ext >&5
14626   rm -fr conftest*
14627   ol_cv_c_upper_lower=yes
14628 fi
14629 rm -fr conftest*
14630 fi
14631
14632 fi
14633
14634 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14635 if test $ol_cv_c_upper_lower != no ; then
14636         cat >> confdefs.h <<\EOF
14637 #define C_UPPER_LOWER 1
14638 EOF
14639
14640 fi
14641
14642 echo $ac_n "checking for working const""... $ac_c" 1>&6
14643 echo "configure:14644: checking for working const" >&5
14644 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14645   echo $ac_n "(cached) $ac_c" 1>&6
14646 else
14647   cat > conftest.$ac_ext <<EOF
14648 #line 14649 "configure"
14649 #include "confdefs.h"
14650
14651 int main() {
14652
14653 /* Ultrix mips cc rejects this.  */
14654 typedef int charset[2]; const charset x;
14655 /* SunOS 4.1.1 cc rejects this.  */
14656 char const *const *ccp;
14657 char **p;
14658 /* NEC SVR4.0.2 mips cc rejects this.  */
14659 struct point {int x, y;};
14660 static struct point const zero = {0,0};
14661 /* AIX XL C 1.02.0.0 rejects this.
14662    It does not let you subtract one const X* pointer from another in an arm
14663    of an if-expression whose if-part is not a constant expression */
14664 const char *g = "string";
14665 ccp = &g + (g ? g-g : 0);
14666 /* HPUX 7.0 cc rejects these. */
14667 ++ccp;
14668 p = (char**) ccp;
14669 ccp = (char const *const *) p;
14670 { /* SCO 3.2v4 cc rejects this.  */
14671   char *t;
14672   char const *s = 0 ? (char *) 0 : (char const *) 0;
14673
14674   *t++ = 0;
14675 }
14676 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14677   int x[] = {25, 17};
14678   const int *foo = &x[0];
14679   ++foo;
14680 }
14681 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14682   typedef const int *iptr;
14683   iptr p = 0;
14684   ++p;
14685 }
14686 { /* AIX XL C 1.02.0.0 rejects this saying
14687      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14688   struct s { int j; const int *ap[3]; };
14689   struct s *b; b->j = 5;
14690 }
14691 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14692   const int foo = 10;
14693 }
14694
14695 ; return 0; }
14696 EOF
14697 if { (eval echo configure:14698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14698   rm -rf conftest*
14699   ac_cv_c_const=yes
14700 else
14701   echo "configure: failed program was:" >&5
14702   cat conftest.$ac_ext >&5
14703   rm -rf conftest*
14704   ac_cv_c_const=no
14705 fi
14706 rm -f conftest*
14707 fi
14708
14709 echo "$ac_t""$ac_cv_c_const" 1>&6
14710 if test $ac_cv_c_const = no; then
14711   cat >> confdefs.h <<\EOF
14712 #define const 
14713 EOF
14714
14715 fi
14716
14717 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14718 echo "configure:14719: checking if compiler understands volatile" >&5
14719 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14720   echo $ac_n "(cached) $ac_c" 1>&6
14721 else
14722   cat > conftest.$ac_ext <<EOF
14723 #line 14724 "configure"
14724 #include "confdefs.h"
14725 int x, y, z;
14726 int main() {
14727 volatile int a; int * volatile b = x ? &y : &z;
14728       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14729       *b = 0;
14730 ; return 0; }
14731 EOF
14732 if { (eval echo configure:14733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14733   rm -rf conftest*
14734   ol_cv_c_volatile=yes
14735 else
14736   echo "configure: failed program was:" >&5
14737   cat conftest.$ac_ext >&5
14738   rm -rf conftest*
14739   ol_cv_c_volatile=no
14740 fi
14741 rm -f conftest*
14742 fi
14743
14744 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14745   if test $ol_cv_c_volatile = yes; then
14746     : 
14747   else
14748     cat >> confdefs.h <<\EOF
14749 #define volatile 
14750 EOF
14751
14752   fi
14753  
14754
14755 if test $cross_compiling = yes ; then
14756         cat >> confdefs.h <<\EOF
14757 #define CROSS_COMPILING 1
14758 EOF
14759
14760 else
14761         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14762 echo "configure:14763: checking whether byte ordering is bigendian" >&5
14763 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14764   echo $ac_n "(cached) $ac_c" 1>&6
14765 else
14766   ac_cv_c_bigendian=unknown
14767 # See if sys/param.h defines the BYTE_ORDER macro.
14768 cat > conftest.$ac_ext <<EOF
14769 #line 14770 "configure"
14770 #include "confdefs.h"
14771 #include <sys/types.h>
14772 #include <sys/param.h>
14773 int main() {
14774
14775 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14776  bogus endian macros
14777 #endif
14778 ; return 0; }
14779 EOF
14780 if { (eval echo configure:14781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14781   rm -rf conftest*
14782   # It does; now see whether it defined to BIG_ENDIAN or not.
14783 cat > conftest.$ac_ext <<EOF
14784 #line 14785 "configure"
14785 #include "confdefs.h"
14786 #include <sys/types.h>
14787 #include <sys/param.h>
14788 int main() {
14789
14790 #if BYTE_ORDER != BIG_ENDIAN
14791  not big endian
14792 #endif
14793 ; return 0; }
14794 EOF
14795 if { (eval echo configure:14796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14796   rm -rf conftest*
14797   ac_cv_c_bigendian=yes
14798 else
14799   echo "configure: failed program was:" >&5
14800   cat conftest.$ac_ext >&5
14801   rm -rf conftest*
14802   ac_cv_c_bigendian=no
14803 fi
14804 rm -f conftest*
14805 else
14806   echo "configure: failed program was:" >&5
14807   cat conftest.$ac_ext >&5
14808 fi
14809 rm -f conftest*
14810 if test $ac_cv_c_bigendian = unknown; then
14811 if test "$cross_compiling" = yes; then
14812     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14813 else
14814   cat > conftest.$ac_ext <<EOF
14815 #line 14816 "configure"
14816 #include "confdefs.h"
14817 main () {
14818   /* Are we little or big endian?  From Harbison&Steele.  */
14819   union
14820   {
14821     long l;
14822     char c[sizeof (long)];
14823   } u;
14824   u.l = 1;
14825   exit (u.c[sizeof (long) - 1] == 1);
14826 }
14827 EOF
14828 if { (eval echo configure:14829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14829 then
14830   ac_cv_c_bigendian=no
14831 else
14832   echo "configure: failed program was:" >&5
14833   cat conftest.$ac_ext >&5
14834   rm -fr conftest*
14835   ac_cv_c_bigendian=yes
14836 fi
14837 rm -fr conftest*
14838 fi
14839
14840 fi
14841 fi
14842
14843 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14844 if test $ac_cv_c_bigendian = yes; then
14845   cat >> confdefs.h <<\EOF
14846 #define WORDS_BIGENDIAN 1
14847 EOF
14848
14849 fi
14850
14851 fi
14852
14853 echo $ac_n "checking size of short""... $ac_c" 1>&6
14854 echo "configure:14855: checking size of short" >&5 
14855 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14856   echo $ac_n "(cached) $ac_c" 1>&6
14857 else
14858   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14859   cat > conftest.$ac_ext <<EOF
14860 #line 14861 "configure"
14861 #include "confdefs.h"
14862 #include "confdefs.h" 
14863 #include <sys/types.h> 
14864  
14865
14866 int main() {
14867 switch (0) case 0: case (sizeof (short) == $ac_size):;
14868 ; return 0; }
14869 EOF
14870 if { (eval echo configure:14871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14871   rm -rf conftest*
14872   ac_cv_sizeof_short=$ac_size
14873 else
14874   echo "configure: failed program was:" >&5
14875   cat conftest.$ac_ext >&5
14876 fi
14877 rm -f conftest* 
14878   if test x$ac_cv_sizeof_short != x ; then break; fi 
14879 done 
14880
14881 fi
14882  
14883 if test x$ac_cv_sizeof_short = x ; then 
14884   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14885 fi 
14886 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14887 cat >> confdefs.h <<EOF
14888 #define SIZEOF_SHORT $ac_cv_sizeof_short
14889 EOF
14890  
14891  
14892 echo $ac_n "checking size of int""... $ac_c" 1>&6
14893 echo "configure:14894: checking size of int" >&5 
14894 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14895   echo $ac_n "(cached) $ac_c" 1>&6
14896 else
14897   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14898   cat > conftest.$ac_ext <<EOF
14899 #line 14900 "configure"
14900 #include "confdefs.h"
14901 #include "confdefs.h" 
14902 #include <sys/types.h> 
14903  
14904
14905 int main() {
14906 switch (0) case 0: case (sizeof (int) == $ac_size):;
14907 ; return 0; }
14908 EOF
14909 if { (eval echo configure:14910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14910   rm -rf conftest*
14911   ac_cv_sizeof_int=$ac_size
14912 else
14913   echo "configure: failed program was:" >&5
14914   cat conftest.$ac_ext >&5
14915 fi
14916 rm -f conftest* 
14917   if test x$ac_cv_sizeof_int != x ; then break; fi 
14918 done 
14919
14920 fi
14921  
14922 if test x$ac_cv_sizeof_int = x ; then 
14923   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14924 fi 
14925 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14926 cat >> confdefs.h <<EOF
14927 #define SIZEOF_INT $ac_cv_sizeof_int
14928 EOF
14929  
14930  
14931 echo $ac_n "checking size of long""... $ac_c" 1>&6
14932 echo "configure:14933: checking size of long" >&5 
14933 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14934   echo $ac_n "(cached) $ac_c" 1>&6
14935 else
14936   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14937   cat > conftest.$ac_ext <<EOF
14938 #line 14939 "configure"
14939 #include "confdefs.h"
14940 #include "confdefs.h" 
14941 #include <sys/types.h> 
14942  
14943
14944 int main() {
14945 switch (0) case 0: case (sizeof (long) == $ac_size):;
14946 ; return 0; }
14947 EOF
14948 if { (eval echo configure:14949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14949   rm -rf conftest*
14950   ac_cv_sizeof_long=$ac_size
14951 else
14952   echo "configure: failed program was:" >&5
14953   cat conftest.$ac_ext >&5
14954 fi
14955 rm -f conftest* 
14956   if test x$ac_cv_sizeof_long != x ; then break; fi 
14957 done 
14958
14959 fi
14960  
14961 if test x$ac_cv_sizeof_long = x ; then 
14962   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14963 fi 
14964 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14965 cat >> confdefs.h <<EOF
14966 #define SIZEOF_LONG $ac_cv_sizeof_long
14967 EOF
14968  
14969
14970
14971 if test "$ac_cv_sizeof_int" -lt 4 ; then
14972         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14973
14974         cat >> confdefs.h <<\EOF
14975 #define LBER_INT_T long
14976 EOF
14977
14978 else
14979         cat >> confdefs.h <<\EOF
14980 #define LBER_INT_T int
14981 EOF
14982
14983 fi
14984
14985 cat >> confdefs.h <<\EOF
14986 #define LBER_LEN_T long
14987 EOF
14988
14989 cat >> confdefs.h <<\EOF
14990 #define LBER_SOCKET_T int
14991 EOF
14992
14993 cat >> confdefs.h <<\EOF
14994 #define LBER_TAG_T long
14995 EOF
14996
14997
14998 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14999 echo "configure:15000: checking for 8-bit clean memcmp" >&5
15000 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15001   echo $ac_n "(cached) $ac_c" 1>&6
15002 else
15003   if test "$cross_compiling" = yes; then
15004   ac_cv_func_memcmp_clean=no
15005 else
15006   cat > conftest.$ac_ext <<EOF
15007 #line 15008 "configure"
15008 #include "confdefs.h"
15009
15010 main()
15011 {
15012   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15013   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15014 }
15015
15016 EOF
15017 if { (eval echo configure:15018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15018 then
15019   ac_cv_func_memcmp_clean=yes
15020 else
15021   echo "configure: failed program was:" >&5
15022   cat conftest.$ac_ext >&5
15023   rm -fr conftest*
15024   ac_cv_func_memcmp_clean=no
15025 fi
15026 rm -fr conftest*
15027 fi
15028
15029 fi
15030
15031 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15032 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15033
15034 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15035 echo "configure:15036: checking for strftime" >&5
15036 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15037   echo $ac_n "(cached) $ac_c" 1>&6
15038 else
15039   cat > conftest.$ac_ext <<EOF
15040 #line 15041 "configure"
15041 #include "confdefs.h"
15042 /* System header to define __stub macros and hopefully few prototypes,
15043     which can conflict with char strftime(); below.  */
15044 #include <assert.h>
15045 /* Override any gcc2 internal prototype to avoid an error.  */
15046 /* We use char because int might match the return type of a gcc2
15047     builtin and then its argument prototype would still apply.  */
15048 char strftime();
15049 char (*f)();
15050
15051 int main() {
15052
15053 /* The GNU C library defines this for functions which it implements
15054     to always fail with ENOSYS.  Some functions are actually named
15055     something starting with __ and the normal name is an alias.  */
15056 #if defined (__stub_strftime) || defined (__stub___strftime)
15057 choke me
15058 #else
15059 f = strftime;
15060 #endif
15061
15062 ; return 0; }
15063 EOF
15064 if { (eval echo configure:15065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15065   rm -rf conftest*
15066   eval "ac_cv_func_strftime=yes"
15067 else
15068   echo "configure: failed program was:" >&5
15069   cat conftest.$ac_ext >&5
15070   rm -rf conftest*
15071   eval "ac_cv_func_strftime=no"
15072 fi
15073 rm -f conftest*
15074 fi
15075
15076 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15077   echo "$ac_t""yes" 1>&6
15078   cat >> confdefs.h <<\EOF
15079 #define HAVE_STRFTIME 1
15080 EOF
15081
15082 else
15083   echo "$ac_t""no" 1>&6
15084 # strftime is in -lintl on SCO UNIX.
15085 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15086 echo "configure:15087: checking for strftime in -lintl" >&5
15087 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15088 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15089   echo $ac_n "(cached) $ac_c" 1>&6
15090 else
15091   ac_save_LIBS="$LIBS"
15092 LIBS="-lintl  $LIBS"
15093 cat > conftest.$ac_ext <<EOF
15094 #line 15095 "configure"
15095 #include "confdefs.h"
15096 /* Override any gcc2 internal prototype to avoid an error.  */
15097 /* We use char because int might match the return type of a gcc2
15098     builtin and then its argument prototype would still apply.  */
15099 char strftime();
15100
15101 int main() {
15102 strftime()
15103 ; return 0; }
15104 EOF
15105 if { (eval echo configure:15106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15106   rm -rf conftest*
15107   eval "ac_cv_lib_$ac_lib_var=yes"
15108 else
15109   echo "configure: failed program was:" >&5
15110   cat conftest.$ac_ext >&5
15111   rm -rf conftest*
15112   eval "ac_cv_lib_$ac_lib_var=no"
15113 fi
15114 rm -f conftest*
15115 LIBS="$ac_save_LIBS"
15116
15117 fi
15118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15119   echo "$ac_t""yes" 1>&6
15120   cat >> confdefs.h <<\EOF
15121 #define HAVE_STRFTIME 1
15122 EOF
15123
15124 LIBS="-lintl $LIBS"
15125 else
15126   echo "$ac_t""no" 1>&6
15127 fi
15128
15129 fi
15130
15131
15132 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15133 echo "configure:15134: checking for inet_aton()" >&5
15134 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15135   echo $ac_n "(cached) $ac_c" 1>&6
15136 else
15137   cat > conftest.$ac_ext <<EOF
15138 #line 15139 "configure"
15139 #include "confdefs.h"
15140
15141 #ifdef HAVE_SYS_TYPES_H
15142 #       include <sys/types.h>
15143 #endif
15144 #ifdef HAVE_SYS_SOCKET_H
15145 #       include <sys/socket.h>
15146 #       ifdef HAVE_SYS_SELECT_H
15147 #               include <sys/select.h>
15148 #       endif
15149 #       include <netinet/in.h>
15150 #       ifdef HAVE_ARPA_INET_H
15151 #               include <arpa/inet.h>
15152 #       endif
15153 #endif
15154
15155 int main() {
15156 struct in_addr in;
15157 int rc = inet_aton( "255.255.255.255", &in );
15158 ; return 0; }
15159 EOF
15160 if { (eval echo configure:15161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15161   rm -rf conftest*
15162   ol_cv_func_inet_aton=yes
15163 else
15164   echo "configure: failed program was:" >&5
15165   cat conftest.$ac_ext >&5
15166   rm -rf conftest*
15167   ol_cv_func_inet_aton=no
15168 fi
15169 rm -f conftest*
15170 fi
15171
15172 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15173   if test $ol_cv_func_inet_aton != no; then
15174     cat >> confdefs.h <<\EOF
15175 #define HAVE_INET_ATON 1
15176 EOF
15177
15178   fi
15179  
15180
15181 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15182 echo "configure:15183: checking for _spawnlp" >&5
15183 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15184   echo $ac_n "(cached) $ac_c" 1>&6
15185 else
15186   cat > conftest.$ac_ext <<EOF
15187 #line 15188 "configure"
15188 #include "confdefs.h"
15189 /* System header to define __stub macros and hopefully few prototypes,
15190     which can conflict with char _spawnlp(); below.  */
15191 #include <assert.h>
15192 /* Override any gcc2 internal prototype to avoid an error.  */
15193 /* We use char because int might match the return type of a gcc2
15194     builtin and then its argument prototype would still apply.  */
15195 char _spawnlp();
15196 char (*f)();
15197
15198 int main() {
15199
15200 /* The GNU C library defines this for functions which it implements
15201     to always fail with ENOSYS.  Some functions are actually named
15202     something starting with __ and the normal name is an alias.  */
15203 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15204 choke me
15205 #else
15206 f = _spawnlp;
15207 #endif
15208
15209 ; return 0; }
15210 EOF
15211 if { (eval echo configure:15212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15212   rm -rf conftest*
15213   eval "ac_cv_func__spawnlp=yes"
15214 else
15215   echo "configure: failed program was:" >&5
15216   cat conftest.$ac_ext >&5
15217   rm -rf conftest*
15218   eval "ac_cv_func__spawnlp=no"
15219 fi
15220 rm -f conftest*
15221 fi
15222
15223 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15224   echo "$ac_t""yes" 1>&6
15225   cat >> confdefs.h <<\EOF
15226 #define HAVE_SPAWNLP 1
15227 EOF
15228
15229 else
15230   echo "$ac_t""no" 1>&6
15231 fi
15232
15233
15234 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15235 echo "configure:15236: checking for _snprintf" >&5
15236 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15237   echo $ac_n "(cached) $ac_c" 1>&6
15238 else
15239   cat > conftest.$ac_ext <<EOF
15240 #line 15241 "configure"
15241 #include "confdefs.h"
15242 /* System header to define __stub macros and hopefully few prototypes,
15243     which can conflict with char _snprintf(); below.  */
15244 #include <assert.h>
15245 /* Override any gcc2 internal prototype to avoid an error.  */
15246 /* We use char because int might match the return type of a gcc2
15247     builtin and then its argument prototype would still apply.  */
15248 char _snprintf();
15249 char (*f)();
15250
15251 int main() {
15252
15253 /* The GNU C library defines this for functions which it implements
15254     to always fail with ENOSYS.  Some functions are actually named
15255     something starting with __ and the normal name is an alias.  */
15256 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15257 choke me
15258 #else
15259 f = _snprintf;
15260 #endif
15261
15262 ; return 0; }
15263 EOF
15264 if { (eval echo configure:15265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15265   rm -rf conftest*
15266   eval "ac_cv_func__snprintf=yes"
15267 else
15268   echo "configure: failed program was:" >&5
15269   cat conftest.$ac_ext >&5
15270   rm -rf conftest*
15271   eval "ac_cv_func__snprintf=no"
15272 fi
15273 rm -f conftest*
15274 fi
15275
15276 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15277   echo "$ac_t""yes" 1>&6
15278   ac_cv_func_snprintf=yes
15279         cat >> confdefs.h <<\EOF
15280 #define snprintf _snprintf
15281 EOF
15282
15283
15284 else
15285   echo "$ac_t""no" 1>&6
15286 fi
15287
15288
15289 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15290 echo "configure:15291: checking for _vsnprintf" >&5
15291 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15292   echo $ac_n "(cached) $ac_c" 1>&6
15293 else
15294   cat > conftest.$ac_ext <<EOF
15295 #line 15296 "configure"
15296 #include "confdefs.h"
15297 /* System header to define __stub macros and hopefully few prototypes,
15298     which can conflict with char _vsnprintf(); below.  */
15299 #include <assert.h>
15300 /* Override any gcc2 internal prototype to avoid an error.  */
15301 /* We use char because int might match the return type of a gcc2
15302     builtin and then its argument prototype would still apply.  */
15303 char _vsnprintf();
15304 char (*f)();
15305
15306 int main() {
15307
15308 /* The GNU C library defines this for functions which it implements
15309     to always fail with ENOSYS.  Some functions are actually named
15310     something starting with __ and the normal name is an alias.  */
15311 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15312 choke me
15313 #else
15314 f = _vsnprintf;
15315 #endif
15316
15317 ; return 0; }
15318 EOF
15319 if { (eval echo configure:15320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15320   rm -rf conftest*
15321   eval "ac_cv_func__vsnprintf=yes"
15322 else
15323   echo "configure: failed program was:" >&5
15324   cat conftest.$ac_ext >&5
15325   rm -rf conftest*
15326   eval "ac_cv_func__vsnprintf=no"
15327 fi
15328 rm -f conftest*
15329 fi
15330
15331 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15332   echo "$ac_t""yes" 1>&6
15333   ac_cv_func_vsnprintf=yes
15334         cat >> confdefs.h <<\EOF
15335 #define vsnprintf _vsnprintf
15336 EOF
15337
15338
15339 else
15340   echo "$ac_t""no" 1>&6
15341 fi
15342
15343
15344 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15345 echo "configure:15346: checking for vprintf" >&5
15346 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15347   echo $ac_n "(cached) $ac_c" 1>&6
15348 else
15349   cat > conftest.$ac_ext <<EOF
15350 #line 15351 "configure"
15351 #include "confdefs.h"
15352 /* System header to define __stub macros and hopefully few prototypes,
15353     which can conflict with char vprintf(); below.  */
15354 #include <assert.h>
15355 /* Override any gcc2 internal prototype to avoid an error.  */
15356 /* We use char because int might match the return type of a gcc2
15357     builtin and then its argument prototype would still apply.  */
15358 char vprintf();
15359 char (*f)();
15360
15361 int main() {
15362
15363 /* The GNU C library defines this for functions which it implements
15364     to always fail with ENOSYS.  Some functions are actually named
15365     something starting with __ and the normal name is an alias.  */
15366 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15367 choke me
15368 #else
15369 f = vprintf;
15370 #endif
15371
15372 ; return 0; }
15373 EOF
15374 if { (eval echo configure:15375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15375   rm -rf conftest*
15376   eval "ac_cv_func_vprintf=yes"
15377 else
15378   echo "configure: failed program was:" >&5
15379   cat conftest.$ac_ext >&5
15380   rm -rf conftest*
15381   eval "ac_cv_func_vprintf=no"
15382 fi
15383 rm -f conftest*
15384 fi
15385
15386 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15387   echo "$ac_t""yes" 1>&6
15388   cat >> confdefs.h <<\EOF
15389 #define HAVE_VPRINTF 1
15390 EOF
15391
15392 else
15393   echo "$ac_t""no" 1>&6
15394 fi
15395
15396 if test "$ac_cv_func_vprintf" != yes; then
15397 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15398 echo "configure:15399: checking for _doprnt" >&5
15399 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15400   echo $ac_n "(cached) $ac_c" 1>&6
15401 else
15402   cat > conftest.$ac_ext <<EOF
15403 #line 15404 "configure"
15404 #include "confdefs.h"
15405 /* System header to define __stub macros and hopefully few prototypes,
15406     which can conflict with char _doprnt(); below.  */
15407 #include <assert.h>
15408 /* Override any gcc2 internal prototype to avoid an error.  */
15409 /* We use char because int might match the return type of a gcc2
15410     builtin and then its argument prototype would still apply.  */
15411 char _doprnt();
15412 char (*f)();
15413
15414 int main() {
15415
15416 /* The GNU C library defines this for functions which it implements
15417     to always fail with ENOSYS.  Some functions are actually named
15418     something starting with __ and the normal name is an alias.  */
15419 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15420 choke me
15421 #else
15422 f = _doprnt;
15423 #endif
15424
15425 ; return 0; }
15426 EOF
15427 if { (eval echo configure:15428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15428   rm -rf conftest*
15429   eval "ac_cv_func__doprnt=yes"
15430 else
15431   echo "configure: failed program was:" >&5
15432   cat conftest.$ac_ext >&5
15433   rm -rf conftest*
15434   eval "ac_cv_func__doprnt=no"
15435 fi
15436 rm -f conftest*
15437 fi
15438
15439 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15440   echo "$ac_t""yes" 1>&6
15441   cat >> confdefs.h <<\EOF
15442 #define HAVE_DOPRNT 1
15443 EOF
15444
15445 else
15446   echo "$ac_t""no" 1>&6
15447 fi
15448
15449 fi
15450
15451
15452 if test $ac_cv_func_vprintf = yes ; then
15453                 for ac_func in vsnprintf vsprintf
15454 do
15455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15456 echo "configure:15457: checking for $ac_func" >&5
15457 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15458   echo $ac_n "(cached) $ac_c" 1>&6
15459 else
15460   cat > conftest.$ac_ext <<EOF
15461 #line 15462 "configure"
15462 #include "confdefs.h"
15463 /* System header to define __stub macros and hopefully few prototypes,
15464     which can conflict with char $ac_func(); below.  */
15465 #include <assert.h>
15466 /* Override any gcc2 internal prototype to avoid an error.  */
15467 /* We use char because int might match the return type of a gcc2
15468     builtin and then its argument prototype would still apply.  */
15469 char $ac_func();
15470 char (*f)();
15471
15472 int main() {
15473
15474 /* The GNU C library defines this for functions which it implements
15475     to always fail with ENOSYS.  Some functions are actually named
15476     something starting with __ and the normal name is an alias.  */
15477 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15478 choke me
15479 #else
15480 f = $ac_func;
15481 #endif
15482
15483 ; return 0; }
15484 EOF
15485 if { (eval echo configure:15486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15486   rm -rf conftest*
15487   eval "ac_cv_func_$ac_func=yes"
15488 else
15489   echo "configure: failed program was:" >&5
15490   cat conftest.$ac_ext >&5
15491   rm -rf conftest*
15492   eval "ac_cv_func_$ac_func=no"
15493 fi
15494 rm -f conftest*
15495 fi
15496
15497 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15498   echo "$ac_t""yes" 1>&6
15499     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15500   cat >> confdefs.h <<EOF
15501 #define $ac_tr_func 1
15502 EOF
15503  
15504 else
15505   echo "$ac_t""no" 1>&6
15506 fi
15507 done
15508
15509 fi
15510
15511 for ac_func in \
15512         bcopy                   \
15513         closesocket             \
15514         chroot                  \
15515         endgrent                \
15516         endpwent                \
15517         flock                   \
15518         getdtablesize   \
15519         getgrgid                \
15520         gethostname             \
15521         getpass                 \
15522         getpassphrase   \
15523         getpwuid                \
15524         getpwnam                \
15525         getspnam                \
15526         gettimeofday    \
15527         initgroups              \
15528         lockf                   \
15529         memcpy                  \
15530         memmove                 \
15531         mkstemp                 \
15532         pipe                    \
15533         read                    \
15534         recv                    \
15535         recvfrom                \
15536         setpwfile               \
15537         setgid                  \
15538         setegid                 \
15539         setsid                  \
15540         setuid                  \
15541         seteuid                 \
15542         sigaction               \
15543         signal                  \
15544         sigset                  \
15545         snprintf                \
15546         strdup                  \
15547         strerror                \
15548         strpbrk                 \
15549         strrchr                 \
15550         strsep                  \
15551         strstr                  \
15552         strtol                  \
15553         strtoul                 \
15554         strspn                  \
15555         sysconf                 \
15556         waitpid                 \
15557         wait4                   \
15558         write                   \
15559         send                    \
15560         sendto                  \
15561
15562 do
15563 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15564 echo "configure:15565: checking for $ac_func" >&5
15565 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15566   echo $ac_n "(cached) $ac_c" 1>&6
15567 else
15568   cat > conftest.$ac_ext <<EOF
15569 #line 15570 "configure"
15570 #include "confdefs.h"
15571 /* System header to define __stub macros and hopefully few prototypes,
15572     which can conflict with char $ac_func(); below.  */
15573 #include <assert.h>
15574 /* Override any gcc2 internal prototype to avoid an error.  */
15575 /* We use char because int might match the return type of a gcc2
15576     builtin and then its argument prototype would still apply.  */
15577 char $ac_func();
15578 char (*f)();
15579
15580 int main() {
15581
15582 /* The GNU C library defines this for functions which it implements
15583     to always fail with ENOSYS.  Some functions are actually named
15584     something starting with __ and the normal name is an alias.  */
15585 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15586 choke me
15587 #else
15588 f = $ac_func;
15589 #endif
15590
15591 ; return 0; }
15592 EOF
15593 if { (eval echo configure:15594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15594   rm -rf conftest*
15595   eval "ac_cv_func_$ac_func=yes"
15596 else
15597   echo "configure: failed program was:" >&5
15598   cat conftest.$ac_ext >&5
15599   rm -rf conftest*
15600   eval "ac_cv_func_$ac_func=no"
15601 fi
15602 rm -f conftest*
15603 fi
15604
15605 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15606   echo "$ac_t""yes" 1>&6
15607     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15608   cat >> confdefs.h <<EOF
15609 #define $ac_tr_func 1
15610 EOF
15611  
15612 else
15613   echo "$ac_t""no" 1>&6
15614 fi
15615 done
15616
15617
15618 for ac_func in getopt tempnam
15619 do
15620 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15621 echo "configure:15622: checking for $ac_func" >&5
15622 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15623   echo $ac_n "(cached) $ac_c" 1>&6
15624 else
15625   cat > conftest.$ac_ext <<EOF
15626 #line 15627 "configure"
15627 #include "confdefs.h"
15628 /* System header to define __stub macros and hopefully few prototypes,
15629     which can conflict with char $ac_func(); below.  */
15630 #include <assert.h>
15631 /* Override any gcc2 internal prototype to avoid an error.  */
15632 /* We use char because int might match the return type of a gcc2
15633     builtin and then its argument prototype would still apply.  */
15634 char $ac_func();
15635 char (*f)();
15636
15637 int main() {
15638
15639 /* The GNU C library defines this for functions which it implements
15640     to always fail with ENOSYS.  Some functions are actually named
15641     something starting with __ and the normal name is an alias.  */
15642 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15643 choke me
15644 #else
15645 f = $ac_func;
15646 #endif
15647
15648 ; return 0; }
15649 EOF
15650 if { (eval echo configure:15651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15651   rm -rf conftest*
15652   eval "ac_cv_func_$ac_func=yes"
15653 else
15654   echo "configure: failed program was:" >&5
15655   cat conftest.$ac_ext >&5
15656   rm -rf conftest*
15657   eval "ac_cv_func_$ac_func=no"
15658 fi
15659 rm -f conftest*
15660 fi
15661
15662 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15663   echo "$ac_t""yes" 1>&6
15664     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15665   cat >> confdefs.h <<EOF
15666 #define $ac_tr_func 1
15667 EOF
15668  
15669 else
15670   echo "$ac_t""no" 1>&6
15671 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15672 fi
15673 done
15674
15675
15676
15677 if test "$ac_cv_func_getopt" != yes; then
15678     LIBSRCS="$LIBSRCS getopt.c"
15679 fi
15680
15681 if test "$ac_cv_func_tempnam" != yes; then
15682     LIBSRCS="$LIBSRCS tempnam.c"
15683 fi
15684
15685 # Check Configuration
15686 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15687 echo "configure:15688: checking declaration of sys_errlist" >&5
15688 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15689   echo $ac_n "(cached) $ac_c" 1>&6
15690 else
15691   
15692         cat > conftest.$ac_ext <<EOF
15693 #line 15694 "configure"
15694 #include "confdefs.h"
15695
15696 #include <stdio.h>
15697 #include <sys/types.h>
15698 #include <errno.h>
15699 #ifdef WINNT
15700 #include <stdlib.h>
15701 #endif 
15702 int main() {
15703 char *c = (char *) *sys_errlist
15704 ; return 0; }
15705 EOF
15706 if { (eval echo configure:15707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15707   rm -rf conftest*
15708   ol_cv_dcl_sys_errlist=yes
15709         ol_cv_have_sys_errlist=yes
15710 else
15711   echo "configure: failed program was:" >&5
15712   cat conftest.$ac_ext >&5
15713   rm -rf conftest*
15714   ol_cv_dcl_sys_errlist=no
15715 fi
15716 rm -f conftest*
15717 fi
15718
15719 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15720 #
15721 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15722 if test $ol_cv_dcl_sys_errlist = no ; then
15723         cat >> confdefs.h <<\EOF
15724 #define DECL_SYS_ERRLIST 1
15725 EOF
15726
15727
15728         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15729 echo "configure:15730: checking existence of sys_errlist" >&5
15730 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15731   echo $ac_n "(cached) $ac_c" 1>&6
15732 else
15733   
15734                 cat > conftest.$ac_ext <<EOF
15735 #line 15736 "configure"
15736 #include "confdefs.h"
15737 #include <errno.h>
15738 int main() {
15739 char *c = (char *) *sys_errlist
15740 ; return 0; }
15741 EOF
15742 if { (eval echo configure:15743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15743   rm -rf conftest*
15744   ol_cv_have_sys_errlist=yes
15745 else
15746   echo "configure: failed program was:" >&5
15747   cat conftest.$ac_ext >&5
15748   rm -rf conftest*
15749   ol_cv_have_sys_errlist=no
15750 fi
15751 rm -f conftest*
15752 fi
15753
15754 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15755 fi
15756 if test $ol_cv_have_sys_errlist = yes ; then
15757         cat >> confdefs.h <<\EOF
15758 #define HAVE_SYS_ERRLIST 1
15759 EOF
15760
15761 fi
15762
15763
15764
15765 if test "$ol_enable_debug" != no ; then
15766         cat >> confdefs.h <<\EOF
15767 #define LDAP_DEBUG 1
15768 EOF
15769
15770 fi
15771 if test "$ol_enable_syslog" = yes ; then
15772         cat >> confdefs.h <<\EOF
15773 #define LDAP_SYSLOG 1
15774 EOF
15775
15776 fi
15777 if test "$ol_enable_libui" = yes ; then
15778         cat >> confdefs.h <<\EOF
15779 #define LDAP_LIBUI 1
15780 EOF
15781
15782 fi
15783 if test "$ol_enable_cache" = no ; then
15784         cat >> confdefs.h <<\EOF
15785 #define LDAP_NOCACHE 1
15786 EOF
15787
15788 fi
15789 if test "$ol_link_kbind" != no ; then
15790         cat >> confdefs.h <<\EOF
15791 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15792 EOF
15793
15794 fi
15795 if test "$ol_enable_proctitle" != no ; then
15796         cat >> confdefs.h <<\EOF
15797 #define LDAP_PROCTITLE 1
15798 EOF
15799
15800 fi
15801 if test "$ol_enable_referrals" != no ; then
15802         cat >> confdefs.h <<\EOF
15803 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15804 EOF
15805
15806 fi
15807 if test "$ol_enable_cldap" != no ; then
15808         cat >> confdefs.h <<\EOF
15809 #define LDAP_CONNECTIONLESS 1
15810 EOF
15811
15812 fi
15813 if test "$ol_enable_unix" != no; then
15814         cat >> confdefs.h <<\EOF
15815 #define LDAP_PF_UNIX 1
15816 EOF
15817
15818 fi
15819 if test "$ol_enable_ipv6" != no; then
15820         cat >> confdefs.h <<\EOF
15821 #define LDAP_PF_INET6 1
15822 EOF
15823
15824 fi
15825 if test "$ol_enable_cleartext" != no ; then
15826         cat >> confdefs.h <<\EOF
15827 #define SLAPD_CLEARTEXT 1
15828 EOF
15829
15830 fi
15831 if test "$ol_enable_crypt" != no ; then
15832         cat >> confdefs.h <<\EOF
15833 #define SLAPD_CRYPT 1
15834 EOF
15835
15836 fi
15837 if test "$ol_link_kpasswd" != no ; then
15838         cat >> confdefs.h <<\EOF
15839 #define SLAPD_KPASSWD 1
15840 EOF
15841
15842 fi
15843 if test "$ol_link_spasswd" != no ; then
15844         cat >> confdefs.h <<\EOF
15845 #define SLAPD_SPASSWD 1
15846 EOF
15847
15848 fi
15849 if test "$ol_enable_multimaster" != no ; then
15850         cat >> confdefs.h <<\EOF
15851 #define SLAPD_MULTIMASTER 1
15852 EOF
15853
15854 fi
15855 if test "$ol_enable_phonetic" != no ; then
15856         cat >> confdefs.h <<\EOF
15857 #define SLAPD_PHONETIC 1
15858 EOF
15859
15860 fi
15861 if test "$ol_enable_rlookups" != no ; then
15862         cat >> confdefs.h <<\EOF
15863 #define SLAPD_RLOOKUPS 1
15864 EOF
15865
15866 fi
15867 if test "$ol_enable_aci" != no ; then
15868         cat >> confdefs.h <<\EOF
15869 #define SLAPD_ACI_ENABLED 1
15870 EOF
15871
15872 fi
15873
15874 if test "$ol_link_modules" != no ; then
15875         cat >> confdefs.h <<\EOF
15876 #define SLAPD_MODULES 1
15877 EOF
15878
15879         BUILD_SLAPD=yes
15880         SLAPD_MODULES_LDFLAGS="-dlopen self"
15881 fi
15882
15883 if test "$ol_link_dnssrv" != no ; then
15884         cat >> confdefs.h <<\EOF
15885 #define SLAPD_DNSSRV 1
15886 EOF
15887
15888         BUILD_SLAPD=yes
15889         BUILD_DNSSRV=yes
15890         if test "$ol_with_dnssrv_module" != static ; then
15891                 cat >> confdefs.h <<\EOF
15892 #define SLAPD_DNSSRV_DYNAMIC 1
15893 EOF
15894
15895                 BUILD_DNSSRV=mod
15896                 BUILD_DNSSRV_DYNAMIC=shared
15897                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15898         fi
15899 fi
15900
15901 if test "$ol_enable_ldap" != no ; then
15902         cat >> confdefs.h <<\EOF
15903 #define SLAPD_LDAP 1
15904 EOF
15905
15906         BUILD_SLAPD=yes
15907         BUILD_LDAP=yes
15908         if test "$ol_with_ldap_module" != static ; then
15909                 cat >> confdefs.h <<\EOF
15910 #define SLAPD_LDAP_DYNAMIC 1
15911 EOF
15912
15913                 BUILD_LDAP=mod
15914                 BUILD_LDAP_DYNAMIC=shared
15915                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15916         fi
15917 fi
15918
15919 if test "$ol_link_ldbm" != no ; then
15920         cat >> confdefs.h <<\EOF
15921 #define SLAPD_LDBM 1
15922 EOF
15923
15924         BUILD_SLAPD=yes
15925         BUILD_LDBM=yes
15926         if test "$ol_with_ldbm_module" != static ; then
15927                 cat >> confdefs.h <<\EOF
15928 #define SLAPD_LDBM_DYNAMIC 1
15929 EOF
15930
15931                 BUILD_LDBM=mod
15932                 BUILD_LDBM_DYNAMIC=shared
15933                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15934         fi
15935 fi
15936
15937 if test "$ol_enable_passwd" != no ; then
15938         cat >> confdefs.h <<\EOF
15939 #define SLAPD_PASSWD 1
15940 EOF
15941
15942         BUILD_SLAPD=yes
15943         BUILD_PASSWD=yes
15944         if test "$ol_with_passwd_module" != static ; then
15945                 cat >> confdefs.h <<\EOF
15946 #define SLAPD_PASSWD_DYNAMIC 1
15947 EOF
15948
15949                 BUILD_PASSWD=mod
15950                 BUILD_PASSWD_DYNAMIC=shared
15951                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15952         fi
15953 fi
15954
15955 if test "$ol_link_perl" != no ; then
15956         cat >> confdefs.h <<\EOF
15957 #define SLAPD_PERL 1
15958 EOF
15959
15960         BUILD_SLAPD=yes
15961         BUILD_PERL=yes
15962         if test "$ol_with_perl_module" != static ; then
15963                 cat >> confdefs.h <<\EOF
15964 #define SLAPD_PERL_DYNAMIC 1
15965 EOF
15966
15967                 BUILD_PERL=mod
15968                 BUILD_PERL_DYNAMIC=shared
15969                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15970         fi
15971 fi
15972
15973 if test "$ol_enable_shell" != no ; then
15974         cat >> confdefs.h <<\EOF
15975 #define SLAPD_SHELL 1
15976 EOF
15977
15978         BUILD_SLAPD=yes
15979         BUILD_SHELL=yes
15980         if test "$ol_with_shell_module" != static ; then
15981                 cat >> confdefs.h <<\EOF
15982 #define SLAPD_SHELL_DYNAMIC 1
15983 EOF
15984
15985                 BUILD_SHELL=mod
15986                 BUILD_SHELL_DYNAMIC=shared
15987                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15988         fi
15989 fi
15990
15991 if test "$ol_enable_tcl" != no ; then
15992         cat >> confdefs.h <<\EOF
15993 #define SLAPD_TCL 1
15994 EOF
15995
15996         BUILD_SLAPD=yes
15997         BUILD_TCL=yes
15998         if test "$ol_with_tcl_module" != static; then
15999                 cat >> confdefs.h <<\EOF
16000 #define SLAPD_TCL_DYNAMIC 1
16001 EOF
16002
16003                 BUILD_TCL=mod
16004                 BUILD_TCL_DYNAMIC=shared
16005                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16006         fi
16007 fi
16008
16009 if test "$ol_enable_sql" != no ; then
16010         cat >> confdefs.h <<\EOF
16011 #define SLAPD_SQL 1
16012 EOF
16013
16014         BUILD_SLAPD=yes
16015         BUILD_SQL=yes
16016         SLAPD_SQL_LIBS=-liodbc
16017         if test "$ol_with_sql_module" != static; then
16018                 cat >> confdefs.h <<\EOF
16019 #define SLAPD_SQL_DYNAMIC 1
16020 EOF
16021
16022                 BUILD_SQL=mod
16023                 BUILD_SQL_DYNAMIC=shared
16024                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16025         fi
16026 fi
16027
16028 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16029         $BUILD_SLAPD = yes ; then
16030         BUILD_SLURPD=yes
16031 fi
16032
16033
16034 if test "$LINK_BINS_DYNAMIC" = yes; then
16035     LIB_LINKAGE=DYN
16036     LT_LIB_LINKAGE=shared
16037 else
16038     LIB_LINKAGE=STAT
16039     LT_LIB_LINKAGE=static
16040 fi
16041
16042 if test "$ac_cv_mingw32" = yes ; then
16043     PLAT=NT
16044     DYN_EXT=dll
16045 else
16046     PLAT=UNIX
16047     DYN_EXT=so
16048 fi
16049
16050
16051
16052
16053
16054
16055
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 trap '' 1 2 15
16112
16113 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16114
16115 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16116 # Let make expand exec_prefix.
16117 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16118
16119 # Any assignment to VPATH causes Sun make to only execute
16120 # the first set of double-colon rules, so remove it if not needed.
16121 # If there is a colon in the path, we need to keep it.
16122 if test "x$srcdir" = x.; then
16123   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16124 fi
16125
16126 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16127
16128 DEFS=-DHAVE_CONFIG_H
16129
16130 # Without the "./", some shells look in PATH for config.status.
16131 : ${CONFIG_STATUS=./config.status}
16132
16133 echo creating $CONFIG_STATUS
16134 rm -f $CONFIG_STATUS
16135 cat > $CONFIG_STATUS <<EOF
16136 #! /bin/sh
16137 # Generated automatically by configure.
16138 # Run this file to recreate the current configuration.
16139 # This directory was configured as follows,
16140 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16141 #
16142 # $0 $ac_configure_args
16143 #
16144 # Compiler output produced by configure, useful for debugging
16145 # configure, is in ./config.log if it exists.
16146
16147 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16148 for ac_option
16149 do
16150   case "\$ac_option" in
16151   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16152     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16153     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16154   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16155     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16156     exit 0 ;;
16157   -help | --help | --hel | --he | --h)
16158     echo "\$ac_cs_usage"; exit 0 ;;
16159   *) echo "\$ac_cs_usage"; exit 1 ;;
16160   esac
16161 done
16162
16163 ac_given_srcdir=$srcdir
16164 ac_given_INSTALL="$INSTALL"
16165
16166 trap 'rm -fr `echo "\
16167 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16168 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16169 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16170 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16171 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16172 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16173 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16174 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16175 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16176 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16177 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16178 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16179 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16180 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16181 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16182 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16183 include/Makefile:build/top.mk:include/Makefile.in \
16184 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16185 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16186 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16187 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16188 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16189 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16190 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16191 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16192 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16193 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16194 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16195 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16196 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16197 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16198 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16199 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16200 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16201 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16202 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16203 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16204 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16205 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16206 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16207 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16208 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16209 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16210 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16211  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16212 EOF
16213 cat >> $CONFIG_STATUS <<EOF
16214
16215 # Protect against being on the right side of a sed subst in config.status.
16216 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16217  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16218 $ac_vpsub
16219 $extrasub
16220 s%@SHELL@%$SHELL%g
16221 s%@CFLAGS@%$CFLAGS%g
16222 s%@CPPFLAGS@%$CPPFLAGS%g
16223 s%@CXXFLAGS@%$CXXFLAGS%g
16224 s%@FFLAGS@%$FFLAGS%g
16225 s%@DEFS@%$DEFS%g
16226 s%@LDFLAGS@%$LDFLAGS%g
16227 s%@LIBS@%$LIBS%g
16228 s%@exec_prefix@%$exec_prefix%g
16229 s%@prefix@%$prefix%g
16230 s%@program_transform_name@%$program_transform_name%g
16231 s%@bindir@%$bindir%g
16232 s%@sbindir@%$sbindir%g
16233 s%@libexecdir@%$libexecdir%g
16234 s%@datadir@%$datadir%g
16235 s%@sysconfdir@%$sysconfdir%g
16236 s%@sharedstatedir@%$sharedstatedir%g
16237 s%@localstatedir@%$localstatedir%g
16238 s%@libdir@%$libdir%g
16239 s%@includedir@%$includedir%g
16240 s%@oldincludedir@%$oldincludedir%g
16241 s%@infodir@%$infodir%g
16242 s%@mandir@%$mandir%g
16243 s%@host@%$host%g
16244 s%@host_alias@%$host_alias%g
16245 s%@host_cpu@%$host_cpu%g
16246 s%@host_vendor@%$host_vendor%g
16247 s%@host_os@%$host_os%g
16248 s%@target@%$target%g
16249 s%@target_alias@%$target_alias%g
16250 s%@target_cpu@%$target_cpu%g
16251 s%@target_vendor@%$target_vendor%g
16252 s%@target_os@%$target_os%g
16253 s%@build@%$build%g
16254 s%@build_alias@%$build_alias%g
16255 s%@build_cpu@%$build_cpu%g
16256 s%@build_vendor@%$build_vendor%g
16257 s%@build_os@%$build_os%g
16258 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16259 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16260 s%@INSTALL_DATA@%$INSTALL_DATA%g
16261 s%@PACKAGE@%$PACKAGE%g
16262 s%@VERSION@%$VERSION%g
16263 s%@ACLOCAL@%$ACLOCAL%g
16264 s%@AUTOCONF@%$AUTOCONF%g
16265 s%@AUTOMAKE@%$AUTOMAKE%g
16266 s%@AUTOHEADER@%$AUTOHEADER%g
16267 s%@MAKEINFO@%$MAKEINFO%g
16268 s%@install_sh@%$install_sh%g
16269 s%@AMTAR@%$AMTAR%g
16270 s%@AWK@%$AWK%g
16271 s%@AMTARFLAGS@%$AMTARFLAGS%g
16272 s%@SET_MAKE@%$SET_MAKE%g
16273 s%@top_builddir@%$top_builddir%g
16274 s%@ldap_subdir@%$ldap_subdir%g
16275 s%@CC@%$CC%g
16276 s%@RANLIB@%$RANLIB%g
16277 s%@LN_S@%$LN_S%g
16278 s%@DLLTOOL@%$DLLTOOL%g
16279 s%@AS@%$AS%g
16280 s%@OBJDUMP@%$OBJDUMP%g
16281 s%@LIBTOOL@%$LIBTOOL%g
16282 s%@LN_H@%$LN_H%g
16283 s%@SENDMAIL@%$SENDMAIL%g
16284 s%@EDITOR@%$EDITOR%g
16285 s%@FINGER@%$FINGER%g
16286 s%@PERLBIN@%$PERLBIN%g
16287 s%@CPP@%$CPP%g
16288 s%@EXEEXT@%$EXEEXT%g
16289 s%@OBJEXT@%$OBJEXT%g
16290 s%@OL_MKDEP@%$OL_MKDEP%g
16291 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16292 s%@LIBOBJS@%$LIBOBJS%g
16293 s%@LIBSRCS@%$LIBSRCS%g
16294 s%@PLAT@%$PLAT%g
16295 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16296 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16297 s%@DYN_EXT@%$DYN_EXT%g
16298 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16299 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16300 s%@BUILD_LDAP@%$BUILD_LDAP%g
16301 s%@BUILD_LDBM@%$BUILD_LDBM%g
16302 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16303 s%@BUILD_PERL@%$BUILD_PERL%g
16304 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16305 s%@BUILD_SHELL@%$BUILD_SHELL%g
16306 s%@BUILD_SQL@%$BUILD_SQL%g
16307 s%@BUILD_TCL@%$BUILD_TCL%g
16308 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16309 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16310 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16311 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16312 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16313 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16314 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16315 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16316 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16317 s%@LDAP_LIBS@%$LDAP_LIBS%g
16318 s%@LDIF_LIBS@%$LDIF_LIBS%g
16319 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16320 s%@QUIPU_LIBS@%$QUIPU_LIBS%g
16321 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16322 s%@LDBM_LIBS@%$LDBM_LIBS%g
16323 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16324 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16325 s%@WRAP_LIBS@%$WRAP_LIBS%g
16326 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16327 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16328 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16329 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16330 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16331 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16332 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16333 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16334 s%@KRB4_LIBS@%$KRB4_LIBS%g
16335 s%@KRB5_LIBS@%$KRB5_LIBS%g
16336 s%@READLINE_LIBS@%$READLINE_LIBS%g
16337 s%@SASL_LIBS@%$SASL_LIBS%g
16338 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16339 s%@TLS_LIBS@%$TLS_LIBS%g
16340 s%@MODULES_LIBS@%$MODULES_LIBS%g
16341 s%@AUTH_LIBS@%$AUTH_LIBS%g
16342 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16343 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16344 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16345
16346 CEOF
16347 EOF
16348
16349 cat >> $CONFIG_STATUS <<\EOF
16350
16351 # Split the substitutions into bite-sized pieces for seds with
16352 # small command number limits, like on Digital OSF/1 and HP-UX.
16353 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16354 ac_file=1 # Number of current file.
16355 ac_beg=1 # First line for current file.
16356 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16357 ac_more_lines=:
16358 ac_sed_cmds=""
16359 while $ac_more_lines; do
16360   if test $ac_beg -gt 1; then
16361     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16362   else
16363     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16364   fi
16365   if test ! -s conftest.s$ac_file; then
16366     ac_more_lines=false
16367     rm -f conftest.s$ac_file
16368   else
16369     if test -z "$ac_sed_cmds"; then
16370       ac_sed_cmds="sed -f conftest.s$ac_file"
16371     else
16372       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16373     fi
16374     ac_file=`expr $ac_file + 1`
16375     ac_beg=$ac_end
16376     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16377   fi
16378 done
16379 if test -z "$ac_sed_cmds"; then
16380   ac_sed_cmds=cat
16381 fi
16382 EOF
16383
16384 cat >> $CONFIG_STATUS <<EOF
16385
16386 CONFIG_FILES=\${CONFIG_FILES-"\
16387 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16388 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16389 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16390 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16391 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16392 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16393 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16394 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16395 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16396 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16397 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16398 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16399 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16400 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16401 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16402 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16403 include/Makefile:build/top.mk:include/Makefile.in \
16404 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16405 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16406 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16407 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16408 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16409 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16410 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16411 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16412 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16413 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16414 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16415 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16416 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16417 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16418 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16419 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16420 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16421 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16422 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16423 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16424 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16425 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16426 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16427 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16428 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16429 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16430 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16431 "}
16432 EOF
16433 cat >> $CONFIG_STATUS <<\EOF
16434 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16435   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16436   case "$ac_file" in
16437   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16438        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16439   *) ac_file_in="${ac_file}.in" ;;
16440   esac
16441
16442   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16443
16444   # Remove last slash and all that follows it.  Not all systems have dirname.
16445   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16446   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16447     # The file is in a subdirectory.
16448     test ! -d "$ac_dir" && mkdir "$ac_dir"
16449     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16450     # A "../" for each directory in $ac_dir_suffix.
16451     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16452   else
16453     ac_dir_suffix= ac_dots=
16454   fi
16455
16456   case "$ac_given_srcdir" in
16457   .)  srcdir=.
16458       if test -z "$ac_dots"; then top_srcdir=.
16459       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16460   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16461   *) # Relative path.
16462     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16463     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16464   esac
16465
16466   case "$ac_given_INSTALL" in
16467   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16468   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16469   esac
16470
16471   echo creating "$ac_file"
16472   rm -f "$ac_file"
16473   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16474   case "$ac_file" in
16475   *[Mm]akefile*) ac_comsub="1i\\
16476 # $configure_input" ;;
16477   *) ac_comsub= ;;
16478   esac
16479
16480   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16481   sed -e "$ac_comsub
16482 s%@configure_input@%$configure_input%g
16483 s%@srcdir@%$srcdir%g
16484 s%@top_srcdir@%$top_srcdir%g
16485 s%@INSTALL@%$INSTALL%g
16486 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16487 fi; done
16488 rm -f conftest.s*
16489
16490 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16491 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16492 #
16493 # ac_d sets the value in "#define NAME VALUE" lines.
16494 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16495 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16496 ac_dC='\3'
16497 ac_dD='%g'
16498 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16499 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16500 ac_uB='\([      ]\)%\1#\2define\3'
16501 ac_uC=' '
16502 ac_uD='\4%g'
16503 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16504 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16505 ac_eB='$%\1#\2define\3'
16506 ac_eC=' '
16507 ac_eD='%g'
16508
16509 if test "${CONFIG_HEADERS+set}" != set; then
16510 EOF
16511 cat >> $CONFIG_STATUS <<EOF
16512   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16513 EOF
16514 cat >> $CONFIG_STATUS <<\EOF
16515 fi
16516 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16517   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16518   case "$ac_file" in
16519   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16520        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16521   *) ac_file_in="${ac_file}.in" ;;
16522   esac
16523
16524   echo creating $ac_file
16525
16526   rm -f conftest.frag conftest.in conftest.out
16527   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16528   cat $ac_file_inputs > conftest.in
16529
16530 EOF
16531
16532 # Transform confdefs.h into a sed script conftest.vals that substitutes
16533 # the proper values into config.h.in to produce config.h.  And first:
16534 # Protect against being on the right side of a sed subst in config.status.
16535 # Protect against being in an unquoted here document in config.status.
16536 rm -f conftest.vals
16537 cat > conftest.hdr <<\EOF
16538 s/[\\&%]/\\&/g
16539 s%[\\$`]%\\&%g
16540 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16541 s%ac_d%ac_u%gp
16542 s%ac_u%ac_e%gp
16543 EOF
16544 sed -n -f conftest.hdr confdefs.h > conftest.vals
16545 rm -f conftest.hdr
16546
16547 # This sed command replaces #undef with comments.  This is necessary, for
16548 # example, in the case of _POSIX_SOURCE, which is predefined and required
16549 # on some systems where configure will not decide to define it.
16550 cat >> conftest.vals <<\EOF
16551 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16552 EOF
16553
16554 # Break up conftest.vals because some shells have a limit on
16555 # the size of here documents, and old seds have small limits too.
16556
16557 rm -f conftest.tail
16558 while :
16559 do
16560   ac_lines=`grep -c . conftest.vals`
16561   # grep -c gives empty output for an empty file on some AIX systems.
16562   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16563   # Write a limited-size here document to conftest.frag.
16564   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16565   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16566   echo 'CEOF
16567   sed -f conftest.frag conftest.in > conftest.out
16568   rm -f conftest.in
16569   mv conftest.out conftest.in
16570 ' >> $CONFIG_STATUS
16571   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16572   rm -f conftest.vals
16573   mv conftest.tail conftest.vals
16574 done
16575 rm -f conftest.vals
16576
16577 cat >> $CONFIG_STATUS <<\EOF
16578   rm -f conftest.frag conftest.h
16579   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16580   cat conftest.in >> conftest.h
16581   rm -f conftest.in
16582   if cmp -s $ac_file conftest.h 2>/dev/null; then
16583     echo "$ac_file is unchanged"
16584     rm -f conftest.h
16585   else
16586     # Remove last slash and all that follows it.  Not all systems have dirname.
16587       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16588       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16589       # The file is in a subdirectory.
16590       test ! -d "$ac_dir" && mkdir "$ac_dir"
16591     fi
16592     rm -f $ac_file
16593     mv conftest.h $ac_file
16594   fi
16595 fi; done
16596
16597 EOF
16598 cat >> $CONFIG_STATUS <<EOF
16599
16600 EOF
16601 cat >> $CONFIG_STATUS <<\EOF
16602
16603 date > stamp-h
16604 echo Please \"make depend\" to build dependencies
16605
16606 exit 0
16607 EOF
16608 chmod +x $CONFIG_STATUS
16609 rm -fr confdefs* $ac_clean_files
16610 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16611