]> git.sur5r.net Git - openldap/blob - configure
7216f3708c70873e21a36d895db441d121af03c0
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.304 2000/05/30 18:15:54 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-kbind        enable V2 Kerberos IV bind (auto)"
43 ac_help="$ac_help
44   --enable-cldap        enable connectionless ldap (no)"
45 ac_help="$ac_help
46   --enable-ldapi        enable domain socket (PF_LOCAL) ldap (no)"
47 ac_help="$ac_help
48   --enable-x-compile    enable cross compiling (no)"
49 ac_help="$ac_help
50   --with-cyrus-sasl     with Cyrus SASL support (auto)"
51 ac_help="$ac_help
52   --with-fetch          with fetch URL support (auto)"
53 ac_help="$ac_help
54   --with-kerberos       with support (auto)"
55 ac_help="$ac_help
56   --with-readline       with readline support (auto)"
57 ac_help="$ac_help
58   --with-threads        use threads (auto)"
59 ac_help="$ac_help
60   --with-tls            with TLS/SSL support (auto)"
61 ac_help="$ac_help
62   --with-yielding-select        with implicitly yielding select (auto)"
63 ac_help="$ac_help
64 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-bdb2       enable bdb2 backend (no)"
93 ac_help="$ac_help
94       --with-bdb2-module        module type (static)"
95 ac_help="$ac_help
96     --enable-dnssrv     enable bdb2 backend (no)"
97 ac_help="$ac_help
98       --with-dnssrv-module      module type (static)"
99 ac_help="$ac_help
100     --enable-ldap       enable ldap backend (no)"
101 ac_help="$ac_help
102       --with-ldap-module        module type (static)"
103 ac_help="$ac_help
104     --enable-ldbm       enable ldbm backend (yes)"
105 ac_help="$ac_help
106       --with-ldbm-api   use LDBM API (auto)"
107 ac_help="$ac_help
108       --with-ldbm-module        module type (static)"
109 ac_help="$ac_help
110       --with-ldbm-type  use LDBM type (auto)"
111 ac_help="$ac_help
112     --enable-passwd     enable passwd backend (no)"
113 ac_help="$ac_help
114       --with-passwd-module      module type (static)"
115 ac_help="$ac_help
116     --enable-perl       enable perl backend (no)"
117 ac_help="$ac_help
118       --with-perl-module        module type (static)"
119 ac_help="$ac_help
120     --enable-shell      enable shell backend (no)"
121 ac_help="$ac_help
122       --with-shell-module       module type (static)"
123 ac_help="$ac_help
124     --enable-sql        enable sql backend (no)"
125 ac_help="$ac_help
126       --with-sql-module module type (static)"
127 ac_help="$ac_help
128     --enable-tcl        enable tcl backend (no)"
129 ac_help="$ac_help
130       --with-tcl-module module type (static)"
131 ac_help="$ac_help
132 SLURPD (Replication Daemon) Options:"
133 ac_help="$ac_help
134   --enable-slurpd       enable building slurpd (auto)"
135 ac_help="$ac_help
136 Library Generation & Linking Options"
137 ac_help="$ac_help
138   --enable-static[=PKGS]  build static libraries [default=yes]"
139 ac_help="$ac_help
140   --enable-shared[=PKGS]  build shared libraries [default=yes]"
141 ac_help="$ac_help
142   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
143 ac_help="$ac_help
144   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
145 ac_help="$ac_help
146   --disable-libtool-lock  avoid locking (might break parallel builds)"
147
148 # Initialize some variables set by options.
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 build=NONE
152 cache_file=./config.cache
153 exec_prefix=NONE
154 host=NONE
155 no_create=
156 nonopt=NONE
157 no_recursion=
158 prefix=NONE
159 program_prefix=NONE
160 program_suffix=NONE
161 program_transform_name=s,x,x,
162 silent=
163 site=
164 srcdir=
165 target=NONE
166 verbose=
167 x_includes=NONE
168 x_libraries=NONE
169 bindir='${exec_prefix}/bin'
170 sbindir='${exec_prefix}/sbin'
171 libexecdir='${exec_prefix}/libexec'
172 datadir='${prefix}/share'
173 sysconfdir='${prefix}/etc'
174 sharedstatedir='${prefix}/com'
175 localstatedir='${prefix}/var'
176 libdir='${exec_prefix}/lib'
177 includedir='${prefix}/include'
178 oldincludedir='/usr/include'
179 infodir='${prefix}/info'
180 mandir='${prefix}/man'
181
182 # Initialize some other variables.
183 subdirs=
184 MFLAGS= MAKEFLAGS=
185 SHELL=${CONFIG_SHELL-/bin/sh}
186 # Maximum number of lines to put in a shell here document.
187 ac_max_here_lines=12
188
189 ac_prev=
190 for ac_option
191 do
192
193   # If the previous option needs an argument, assign it.
194   if test -n "$ac_prev"; then
195     eval "$ac_prev=\$ac_option"
196     ac_prev=
197     continue
198   fi
199
200   case "$ac_option" in
201   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
202   *) ac_optarg= ;;
203   esac
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case "$ac_option" in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir="$ac_optarg" ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build="$ac_optarg" ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file="$ac_optarg" ;;
225
226   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
227     ac_prev=datadir ;;
228   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
229   | --da=*)
230     datadir="$ac_optarg" ;;
231
232   -disable-* | --disable-*)
233     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
234     # Reject names that are not valid shell variable names.
235     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
236       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
237     fi
238     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
239     eval "enable_${ac_feature}=no" ;;
240
241   -enable-* | --enable-*)
242     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
243     # Reject names that are not valid shell variable names.
244     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
245       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
246     fi
247     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
248     case "$ac_option" in
249       *=*) ;;
250       *) ac_optarg=yes ;;
251     esac
252     eval "enable_${ac_feature}='$ac_optarg'" ;;
253
254   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
255   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
256   | --exec | --exe | --ex)
257     ac_prev=exec_prefix ;;
258   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
259   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
260   | --exec=* | --exe=* | --ex=*)
261     exec_prefix="$ac_optarg" ;;
262
263   -gas | --gas | --ga | --g)
264     # Obsolete; use --with-gas.
265     with_gas=yes ;;
266
267   -help | --help | --hel | --he)
268     # Omit some internal or obsolete options to make the list less imposing.
269     # This message is too long to be a string in the A/UX 3.1 sh.
270     cat << EOF
271 Usage: configure [options] [host]
272 Options: [defaults in brackets after descriptions]
273 Configuration:
274   --cache-file=FILE       cache test results in FILE
275   --help                  print this message
276   --no-create             do not create output files
277   --quiet, --silent       do not print \`checking...' messages
278   --version               print the version of autoconf that created configure
279 Directory and file names:
280   --prefix=PREFIX         install architecture-independent files in PREFIX
281                           [$ac_default_prefix]
282   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
283                           [same as prefix]
284   --bindir=DIR            user executables in DIR [EPREFIX/bin]
285   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
286   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
287   --datadir=DIR           read-only architecture-independent data in DIR
288                           [PREFIX/share]
289   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
290   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
291                           [PREFIX/com]
292   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
293   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
294   --includedir=DIR        C header files in DIR [PREFIX/include]
295   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
296   --infodir=DIR           info documentation in DIR [PREFIX/info]
297   --mandir=DIR            man documentation in DIR [PREFIX/man]
298   --srcdir=DIR            find the sources in DIR [configure dir or ..]
299   --program-prefix=PREFIX prepend PREFIX to installed program names
300   --program-suffix=SUFFIX append SUFFIX to installed program names
301   --program-transform-name=PROGRAM
302                           run sed PROGRAM on installed program names
303 EOF
304     cat << EOF
305 Host type:
306   --build=BUILD           configure for building on BUILD [BUILD=HOST]
307   --host=HOST             configure for HOST [guessed]
308   --target=TARGET         configure for TARGET [TARGET=HOST]
309 Features and packages:
310   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
311   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
312   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
313   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
314   --x-includes=DIR        X include files are in DIR
315   --x-libraries=DIR       X library files are in DIR
316 EOF
317     if test -n "$ac_help"; then
318       echo "--enable and --with options recognized:$ac_help"
319     fi
320     exit 0 ;;
321
322   -host | --host | --hos | --ho)
323     ac_prev=host ;;
324   -host=* | --host=* | --hos=* | --ho=*)
325     host="$ac_optarg" ;;
326
327   -includedir | --includedir | --includedi | --included | --include \
328   | --includ | --inclu | --incl | --inc)
329     ac_prev=includedir ;;
330   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
331   | --includ=* | --inclu=* | --incl=* | --inc=*)
332     includedir="$ac_optarg" ;;
333
334   -infodir | --infodir | --infodi | --infod | --info | --inf)
335     ac_prev=infodir ;;
336   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
337     infodir="$ac_optarg" ;;
338
339   -libdir | --libdir | --libdi | --libd)
340     ac_prev=libdir ;;
341   -libdir=* | --libdir=* | --libdi=* | --libd=*)
342     libdir="$ac_optarg" ;;
343
344   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
345   | --libexe | --libex | --libe)
346     ac_prev=libexecdir ;;
347   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
348   | --libexe=* | --libex=* | --libe=*)
349     libexecdir="$ac_optarg" ;;
350
351   -localstatedir | --localstatedir | --localstatedi | --localstated \
352   | --localstate | --localstat | --localsta | --localst \
353   | --locals | --local | --loca | --loc | --lo)
354     ac_prev=localstatedir ;;
355   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
356   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
357   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
358     localstatedir="$ac_optarg" ;;
359
360   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
361     ac_prev=mandir ;;
362   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
363     mandir="$ac_optarg" ;;
364
365   -nfp | --nfp | --nf)
366     # Obsolete; use --without-fp.
367     with_fp=no ;;
368
369   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
370   | --no-cr | --no-c)
371     no_create=yes ;;
372
373   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
374   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
375     no_recursion=yes ;;
376
377   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
378   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
379   | --oldin | --oldi | --old | --ol | --o)
380     ac_prev=oldincludedir ;;
381   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
382   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
383   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
384     oldincludedir="$ac_optarg" ;;
385
386   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
387     ac_prev=prefix ;;
388   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
389     prefix="$ac_optarg" ;;
390
391   -program-prefix | --program-prefix | --program-prefi | --program-pref \
392   | --program-pre | --program-pr | --program-p)
393     ac_prev=program_prefix ;;
394   -program-prefix=* | --program-prefix=* | --program-prefi=* \
395   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
396     program_prefix="$ac_optarg" ;;
397
398   -program-suffix | --program-suffix | --program-suffi | --program-suff \
399   | --program-suf | --program-su | --program-s)
400     ac_prev=program_suffix ;;
401   -program-suffix=* | --program-suffix=* | --program-suffi=* \
402   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
403     program_suffix="$ac_optarg" ;;
404
405   -program-transform-name | --program-transform-name \
406   | --program-transform-nam | --program-transform-na \
407   | --program-transform-n | --program-transform- \
408   | --program-transform | --program-transfor \
409   | --program-transfo | --program-transf \
410   | --program-trans | --program-tran \
411   | --progr-tra | --program-tr | --program-t)
412     ac_prev=program_transform_name ;;
413   -program-transform-name=* | --program-transform-name=* \
414   | --program-transform-nam=* | --program-transform-na=* \
415   | --program-transform-n=* | --program-transform-=* \
416   | --program-transform=* | --program-transfor=* \
417   | --program-transfo=* | --program-transf=* \
418   | --program-trans=* | --program-tran=* \
419   | --progr-tra=* | --program-tr=* | --program-t=*)
420     program_transform_name="$ac_optarg" ;;
421
422   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
423   | -silent | --silent | --silen | --sile | --sil)
424     silent=yes ;;
425
426   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
427     ac_prev=sbindir ;;
428   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
429   | --sbi=* | --sb=*)
430     sbindir="$ac_optarg" ;;
431
432   -sharedstatedir | --sharedstatedir | --sharedstatedi \
433   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
434   | --sharedst | --shareds | --shared | --share | --shar \
435   | --sha | --sh)
436     ac_prev=sharedstatedir ;;
437   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
438   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
439   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
440   | --sha=* | --sh=*)
441     sharedstatedir="$ac_optarg" ;;
442
443   -site | --site | --sit)
444     ac_prev=site ;;
445   -site=* | --site=* | --sit=*)
446     site="$ac_optarg" ;;
447
448   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
449     ac_prev=srcdir ;;
450   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
451     srcdir="$ac_optarg" ;;
452
453   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
454   | --syscon | --sysco | --sysc | --sys | --sy)
455     ac_prev=sysconfdir ;;
456   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
457   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
458     sysconfdir="$ac_optarg" ;;
459
460   -target | --target | --targe | --targ | --tar | --ta | --t)
461     ac_prev=target ;;
462   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
463     target="$ac_optarg" ;;
464
465   -v | -verbose | --verbose | --verbos | --verbo | --verb)
466     verbose=yes ;;
467
468   -version | --version | --versio | --versi | --vers)
469     echo "configure generated by autoconf version 2.13.1"
470     exit 0 ;;
471
472   -with-* | --with-*)
473     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
474     # Reject names that are not valid shell variable names.
475     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
476       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
477     fi
478     ac_package=`echo $ac_package| sed 's/-/_/g'`
479     case "$ac_option" in
480       *=*) ;;
481       *) ac_optarg=yes ;;
482     esac
483     eval "with_${ac_package}='$ac_optarg'" ;;
484
485   -without-* | --without-*)
486     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
487     # Reject names that are not valid shell variable names.
488     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
489       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
490     fi
491     ac_package=`echo $ac_package| sed 's/-/_/g'`
492     eval "with_${ac_package}=no" ;;
493
494   --x)
495     # Obsolete; use --with-x.
496     with_x=yes ;;
497
498   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
499   | --x-incl | --x-inc | --x-in | --x-i)
500     ac_prev=x_includes ;;
501   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
502   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503     x_includes="$ac_optarg" ;;
504
505   -x-libraries | --x-libraries | --x-librarie | --x-librari \
506   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
507     ac_prev=x_libraries ;;
508   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
509   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
510     x_libraries="$ac_optarg" ;;
511
512   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
513     ;;
514
515   *)
516     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
517       echo "configure: warning: $ac_option: invalid host type" 1>&2
518     fi
519     if test "x$nonopt" != xNONE; then
520       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
521     fi
522     nonopt="$ac_option"
523     ;;
524
525   esac
526 done
527
528 if test -n "$ac_prev"; then
529   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
530 fi
531
532 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
533
534 # File descriptor usage:
535 # 0 standard input
536 # 1 file creation
537 # 2 errors and warnings
538 # 3 some systems may open it to /dev/tty
539 # 4 used on the Kubota Titan
540 # 6 checking for... messages and results
541 # 5 compiler messages saved in config.log
542 if test "$silent" = yes; then
543   exec 6>/dev/null
544 else
545   exec 6>&1
546 fi
547 exec 5>./config.log
548
549 echo "\
550 This file contains any messages produced by compilers while
551 running configure, to aid debugging if configure makes a mistake.
552 " 1>&5
553
554 # Strip out --no-create and --no-recursion so they do not pile up.
555 # Also quote any args containing shell metacharacters.
556 ac_configure_args=
557 for ac_arg
558 do
559   case "$ac_arg" in
560   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
561   | --no-cr | --no-c) ;;
562   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
563   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
564   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
565   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
566   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
567   esac
568 done
569
570 # NLS nuisances.
571 # Only set these to C if already set.  These must not be set unconditionally
572 # because not all systems understand e.g. LANG=C (notably SCO).
573 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
574 # Non-C LC_CTYPE values break the ctype check.
575 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
576 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
577 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
578 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
579
580 # confdefs.h avoids OS command line length limits that DEFS can exceed.
581 rm -rf conftest* confdefs.h
582 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
583 echo > confdefs.h
584
585 # A filename unique to this package, relative to the directory that
586 # configure is in, which we can look for to find out if srcdir is correct.
587 ac_unique_file=build/version
588
589 # Find the source files, if location was not specified.
590 if test -z "$srcdir"; then
591   ac_srcdir_defaulted=yes
592   # Try the directory containing this script, then its parent.
593   ac_prog=$0
594   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
595   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
596   srcdir=$ac_confdir
597   if test ! -r $srcdir/$ac_unique_file; then
598     srcdir=..
599   fi
600 else
601   ac_srcdir_defaulted=no
602 fi
603 if test ! -r $srcdir/$ac_unique_file; then
604   if test "$ac_srcdir_defaulted" = yes; then
605     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
606   else
607     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
608   fi
609 fi
610 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
611
612 # Prefer explicitly selected file to automatically selected ones.
613 if test -z "$CONFIG_SITE"; then
614   if test "x$prefix" != xNONE; then
615     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
616   else
617     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
618   fi
619 fi
620 for ac_site_file in $CONFIG_SITE; do
621   if test -r "$ac_site_file"; then
622     echo "loading site script $ac_site_file"
623     . "$ac_site_file"
624   fi
625 done
626
627
628 ac_ext=c
629 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
630 ac_cpp='$CPP $CPPFLAGS'
631 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
632 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
633 cross_compiling=$ac_cv_prog_cc_cross
634
635 ac_exeext=
636 ac_objext=o
637 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
638   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
639   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
640     ac_n= ac_c='
641 ' ac_t='        '
642   else
643     ac_n=-n ac_c= ac_t=
644   fi
645 else
646   ac_n= ac_c='\c' ac_t=
647 fi
648
649 ac_aux_dir=
650 for ac_dir in build $srcdir/build; do
651   if test -f $ac_dir/install-sh; then
652     ac_aux_dir=$ac_dir
653     ac_install_sh="$ac_aux_dir/install-sh -c"
654     break
655   elif test -f $ac_dir/install.sh; then
656     ac_aux_dir=$ac_dir
657     ac_install_sh="$ac_aux_dir/install.sh -c"
658     break
659   elif test -f $ac_dir/shtool; then
660     ac_aux_dir=$ac_dir
661     ac_install_sh="$ac_aux_dir/shtool install -c"
662     break
663   fi
664 done
665 if test -z "$ac_aux_dir"; then
666   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
667 fi
668 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
669 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
670 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
671
672 OL_VERSION=`cat $ac_aux_dir/version`
673 if test -z "$OL_VERSION"; then
674         { echo "configure: error: could not determine version" 1>&2; exit 1; }
675 fi
676
677 echo "Configuring OpenLDAP $OL_VERSION ..."
678
679
680 echo $ac_n "checking host system type""... $ac_c" 1>&6
681 echo "configure:682: checking host system type" >&5
682 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
683
684 # Make sure we can run config.sub.
685   if $ac_config_sub sun4 >/dev/null 2>&1; then :
686     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
687   fi
688
689   ac_cv_host_alias=$host
690   case "$ac_cv_host_alias" in
691   NONE)
692     case $nonopt in
693     NONE)
694       if ac_cv_host_alias=`$ac_config_guess`; then :
695       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
696       fi ;;
697     *) ac_cv_host_alias=$nonopt ;;
698     esac ;;
699   esac
700
701   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
702   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
703   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
704   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
705 else
706   echo $ac_n "(cached) $ac_c" 1>&6
707 fi
708
709 echo "$ac_t""$ac_cv_host" 1>&6
710
711 host=$ac_cv_host
712 host_alias=$ac_cv_host_alias
713 host_cpu=$ac_cv_host_cpu
714 host_vendor=$ac_cv_host_vendor
715 host_os=$ac_cv_host_os
716
717
718
719
720
721 echo $ac_n "checking target system type""... $ac_c" 1>&6
722 echo "configure:723: checking target system type" >&5
723 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
724
725 # Make sure we can run config.sub.
726   if $ac_config_sub sun4 >/dev/null 2>&1; then :
727     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
728   fi
729
730   ac_cv_target_alias=$target
731   case "$ac_cv_target_alias" in
732   NONE)
733     case $nonopt in
734     NONE)
735       ac_cv_target_alias=$host_alias ;;
736
737     *) ac_cv_target_alias=$nonopt ;;
738     esac ;;
739   esac
740
741   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
742   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
743   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
744   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
745 else
746   echo $ac_n "(cached) $ac_c" 1>&6
747 fi
748
749 echo "$ac_t""$ac_cv_target" 1>&6
750
751 target=$ac_cv_target
752 target_alias=$ac_cv_target_alias
753 target_cpu=$ac_cv_target_cpu
754 target_vendor=$ac_cv_target_vendor
755 target_os=$ac_cv_target_os
756
757
758
759
760
761 echo $ac_n "checking build system type""... $ac_c" 1>&6
762 echo "configure:763: checking build system type" >&5
763 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
764
765 # Make sure we can run config.sub.
766   if $ac_config_sub sun4 >/dev/null 2>&1; then :
767     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
768   fi
769
770   ac_cv_build_alias=$build
771   case "$ac_cv_build_alias" in
772   NONE)
773     case $nonopt in
774     NONE)
775       ac_cv_build_alias=$host_alias ;;
776
777     *) ac_cv_build_alias=$nonopt ;;
778     esac ;;
779   esac
780
781   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
782   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
783   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
784   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
785 else
786   echo $ac_n "(cached) $ac_c" 1>&6
787 fi
788
789 echo "$ac_t""$ac_cv_build" 1>&6
790
791 build=$ac_cv_build
792 build_alias=$ac_cv_build_alias
793 build_cpu=$ac_cv_build_cpu
794 build_vendor=$ac_cv_build_vendor
795 build_os=$ac_cv_build_os
796
797
798
799
800
801 # Do some error checking and defaulting for the host and target type.
802 # The inputs are:
803 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
804 #
805 # The rules are:
806 # 1. You are not allowed to specify --host, --target, and nonopt at the
807 #    same time.
808 # 2. Host defaults to nonopt.
809 # 3. If nonopt is not specified, then host defaults to the current host,
810 #    as determined by config.guess.
811 # 4. Target and build default to nonopt.
812 # 5. If nonopt is not specified, then target and build default to host.
813
814 # The aliases save the names the user supplied, while $host etc.
815 # will get canonicalized.
816 case $host---$target---$nonopt in
817 NONE---*---* | *---NONE---* | *---*---NONE) ;;
818 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
819 esac
820
821 test "$host_alias" != "$target_alias" &&
822   test "$program_prefix$program_suffix$program_transform_name" = \
823     NONENONEs,x,x, &&
824   program_prefix=${target_alias}-
825
826
827 # Find a good install program.  We prefer a C program (faster),
828 # so one script is as good as another.  But avoid the broken or
829 # incompatible versions:
830 # SysV /etc/install, /usr/sbin/install
831 # SunOS /usr/etc/install
832 # IRIX /sbin/install
833 # AIX /bin/install
834 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
835 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
836 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
837 # ./install, which can be erroneously created by make from ./install.sh.
838 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
839 echo "configure:840: checking for a BSD compatible install" >&5
840 if test -z "$INSTALL"; then
841 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
842   echo $ac_n "(cached) $ac_c" 1>&6
843 else
844     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
845   for ac_dir in $PATH; do
846     # Account for people who put trailing slashes in PATH elements.
847     case "$ac_dir/" in
848     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
849     *)
850       # OSF1 and SCO ODT 3.0 have their own names for install.
851       # Don't use installbsd from OSF since it installs stuff as root
852       # by default.
853       for ac_prog in ginstall scoinst install; do
854         if test -f $ac_dir/$ac_prog; then
855           if test $ac_prog = install &&
856             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
857             # AIX install.  It has an incompatible calling convention.
858             :
859           elif test $ac_prog = install &&
860             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
861             # program-specific install script used by HP pwplus--don't use.
862             :
863           else
864             ac_cv_path_install="$ac_dir/$ac_prog -c"
865             break 2
866           fi
867         fi
868       done
869       ;;
870     esac
871   done
872   IFS="$ac_save_IFS"
873
874 fi
875   if test "${ac_cv_path_install+set}" = set; then
876     INSTALL="$ac_cv_path_install"
877   else
878     # As a last resort, use the slow shell script.  We don't cache a
879     # path for INSTALL within a source directory, because that will
880     # break other packages using the cache if that directory is
881     # removed, or if the path is relative.
882     INSTALL="$ac_install_sh"
883   fi
884 fi
885 echo "$ac_t""$INSTALL" 1>&6
886
887 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
888 # It thinks the first close brace ends the variable substitution.
889 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
890
891 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
892
893 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
894
895 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
896 echo "configure:897: checking whether build environment is sane" >&5
897 # Just in case
898 sleep 1
899 echo timestamp > conftestfile
900 # Do `set' in a subshell so we don't clobber the current shell's
901 # arguments.  Must try -L first in case configure is actually a
902 # symlink; some systems play weird games with the mod time of symlinks
903 # (eg FreeBSD returns the mod time of the symlink's containing
904 # directory).
905 if (
906    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
907    if test "$*" = "X"; then
908       # -L didn't work.
909       set X `ls -t $srcdir/configure conftestfile`
910    fi
911    if test "$*" != "X $srcdir/configure conftestfile" \
912       && test "$*" != "X conftestfile $srcdir/configure"; then
913
914       # If neither matched, then we have a broken ls.  This can happen
915       # if, for instance, CONFIG_SHELL is bash and it inherits a
916       # broken ls alias from the environment.  This has actually
917       # happened.  Such a system could not be considered "sane".
918       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
919 alias in your environment" 1>&2; exit 1; }
920    fi
921
922    test "$2" = conftestfile
923    )
924 then
925    # Ok.
926    :
927 else
928    { echo "configure: error: newly created file is older than distributed files!
929 Check your system clock" 1>&2; exit 1; }
930 fi
931 rm -f conftest*
932 echo "$ac_t""yes" 1>&6
933 if test "$program_transform_name" = s,x,x,; then
934   program_transform_name=
935 else
936   # Double any \ or $.  echo might interpret backslashes.
937   cat <<\EOF_SED > conftestsed
938 s,\\,\\\\,g; s,\$,$$,g
939 EOF_SED
940   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
941   rm -f conftestsed
942 fi
943 test "$program_prefix" != NONE &&
944   program_transform_name="s,^,${program_prefix},;$program_transform_name"
945 # Use a double $ so make ignores it.
946 test "$program_suffix" != NONE &&
947   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
948
949 # sed with no file args requires a program.
950 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
951
952 for ac_prog in mawk gawk nawk awk
953 do
954 # Extract the first word of "$ac_prog", so it can be a program name with args.
955 set dummy $ac_prog; ac_word=$2
956 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
957 echo "configure:958: checking for $ac_word" >&5
958 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
959   echo $ac_n "(cached) $ac_c" 1>&6
960 else
961   if test -n "$AWK"; then
962   ac_cv_prog_AWK="$AWK" # Let the user override the test.
963 else
964   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
965   ac_dummy="$PATH"
966   for ac_dir in $ac_dummy; do
967     test -z "$ac_dir" && ac_dir=.
968     if test -f $ac_dir/$ac_word; then
969       ac_cv_prog_AWK="$ac_prog"
970       break
971     fi
972   done
973   IFS="$ac_save_ifs"
974 fi
975 fi
976 AWK="$ac_cv_prog_AWK"
977 if test -n "$AWK"; then
978   echo "$ac_t""$AWK" 1>&6
979 else
980   echo "$ac_t""no" 1>&6
981 fi
982
983 test -n "$AWK" && break
984 done
985
986 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
987 echo "configure:988: checking whether ${MAKE-make} sets \${MAKE}" >&5
988 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
989 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
990   echo $ac_n "(cached) $ac_c" 1>&6
991 else
992   cat > conftestmake <<\EOF
993 all:
994         @echo 'ac_maketemp="${MAKE}"'
995 EOF
996 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
997 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
998 if test -n "$ac_maketemp"; then
999   eval ac_cv_prog_make_${ac_make}_set=yes
1000 else
1001   eval ac_cv_prog_make_${ac_make}_set=no
1002 fi
1003 rm -f conftestmake
1004 fi
1005 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1006   echo "$ac_t""yes" 1>&6
1007   SET_MAKE=
1008 else
1009   echo "$ac_t""no" 1>&6
1010   SET_MAKE="MAKE=${MAKE-make}"
1011 fi
1012
1013
1014
1015 PACKAGE=OpenLDAP
1016
1017 VERSION=$OL_VERSION
1018
1019 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1020   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1021 fi
1022
1023
1024
1025 missing_dir=`cd $ac_aux_dir && pwd`
1026 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1027 echo "configure:1028: checking for working aclocal" >&5
1028 # Run test in a subshell; some versions of sh will print an error if
1029 # an executable is not found, even if stderr is redirected.
1030 # Redirect stdin to placate older versions of autoconf.  Sigh.
1031 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1032    ACLOCAL=aclocal
1033    echo "$ac_t""found" 1>&6
1034 else
1035    ACLOCAL="$missing_dir/missing aclocal"
1036    echo "$ac_t""missing" 1>&6
1037 fi
1038
1039 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1040 echo "configure:1041: checking for working autoconf" >&5
1041 # Run test in a subshell; some versions of sh will print an error if
1042 # an executable is not found, even if stderr is redirected.
1043 # Redirect stdin to placate older versions of autoconf.  Sigh.
1044 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1045    AUTOCONF=autoconf
1046    echo "$ac_t""found" 1>&6
1047 else
1048    AUTOCONF="$missing_dir/missing autoconf"
1049    echo "$ac_t""missing" 1>&6
1050 fi
1051
1052 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1053 echo "configure:1054: checking for working automake" >&5
1054 # Run test in a subshell; some versions of sh will print an error if
1055 # an executable is not found, even if stderr is redirected.
1056 # Redirect stdin to placate older versions of autoconf.  Sigh.
1057 if (automake --version) < /dev/null > /dev/null 2>&1; then
1058    AUTOMAKE=automake
1059    echo "$ac_t""found" 1>&6
1060 else
1061    AUTOMAKE="$missing_dir/missing automake"
1062    echo "$ac_t""missing" 1>&6
1063 fi
1064
1065 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1066 echo "configure:1067: checking for working autoheader" >&5
1067 # Run test in a subshell; some versions of sh will print an error if
1068 # an executable is not found, even if stderr is redirected.
1069 # Redirect stdin to placate older versions of autoconf.  Sigh.
1070 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1071    AUTOHEADER=autoheader
1072    echo "$ac_t""found" 1>&6
1073 else
1074    AUTOHEADER="$missing_dir/missing autoheader"
1075    echo "$ac_t""missing" 1>&6
1076 fi
1077
1078 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1079 echo "configure:1080: checking for working makeinfo" >&5
1080 # Run test in a subshell; some versions of sh will print an error if
1081 # an executable is not found, even if stderr is redirected.
1082 # Redirect stdin to placate older versions of autoconf.  Sigh.
1083 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1084    MAKEINFO=makeinfo
1085    echo "$ac_t""found" 1>&6
1086 else
1087    MAKEINFO="$missing_dir/missing makeinfo"
1088    echo "$ac_t""missing" 1>&6
1089 fi
1090
1091 install_sh="$missing_dir/install-sh"
1092 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1093
1094 for ac_prog in gnutar gtar tar
1095 do
1096 # Extract the first word of "$ac_prog", so it can be a program name with args.
1097 set dummy $ac_prog; ac_word=$2
1098 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1099 echo "configure:1100: checking for $ac_word" >&5
1100 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1101   echo $ac_n "(cached) $ac_c" 1>&6
1102 else
1103   if test -n "$AMTAR"; then
1104   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1105 else
1106   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1107   ac_dummy="$PATH"
1108   for ac_dir in $ac_dummy; do
1109     test -z "$ac_dir" && ac_dir=.
1110     if test -f $ac_dir/$ac_word; then
1111       ac_cv_prog_AMTAR="$ac_prog"
1112       break
1113     fi
1114   done
1115   IFS="$ac_save_ifs"
1116 fi
1117 fi
1118 AMTAR="$ac_cv_prog_AMTAR"
1119 if test -n "$AMTAR"; then
1120   echo "$ac_t""$AMTAR" 1>&6
1121 else
1122   echo "$ac_t""no" 1>&6
1123 fi
1124
1125 test -n "$AMTAR" && break
1126 done
1127
1128
1129 AMTARFLAGS=
1130 if test -n "$AMTAR"; then
1131   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1132         AMTARFLAGS=o
1133   fi
1134 fi
1135
1136
1137
1138 cat >> confdefs.h <<EOF
1139 #define OPENLDAP_PACKAGE "$PACKAGE"
1140 EOF
1141
1142 cat >> confdefs.h <<EOF
1143 #define OPENLDAP_VERSION "$VERSION"
1144 EOF
1145
1146
1147
1148
1149 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1150 echo "configure:1151: checking configure arguments" >&5
1151
1152
1153 top_builddir=`pwd`
1154
1155 ldap_subdir="/openldap"
1156
1157 # Check whether --with-subdir or --without-subdir was given.
1158 if test "${with_subdir+set}" = set; then
1159   withval="$with_subdir"
1160   case "$withval" in
1161         no) ldap_subdir=""
1162                 ;;
1163         yes)
1164                 ;;
1165         /*|\\*)
1166                 ldap_subdir="$withval"
1167                 ;;
1168         *)
1169                 ldap_subdir="/$withval"
1170                 ;;
1171 esac
1172
1173 fi
1174
1175
1176 # OpenLDAP --enable-debug
1177         # Check whether --enable-debug or --disable-debug was given.
1178 if test "${enable_debug+set}" = set; then
1179   enableval="$enable_debug"
1180   
1181         ol_arg=invalid
1182         for ol_val in auto yes no ; do
1183                 if test "$enableval" = "$ol_val" ; then
1184                         ol_arg="$ol_val"
1185                 fi
1186         done
1187         if test "$ol_arg" = "invalid" ; then
1188                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1189         fi
1190         ol_enable_debug="$ol_arg"
1191
1192 else
1193         ol_enable_debug="yes"
1194 fi
1195 # end --enable-debug
1196 # OpenLDAP --enable-syslog
1197         # Check whether --enable-syslog or --disable-syslog was given.
1198 if test "${enable_syslog+set}" = set; then
1199   enableval="$enable_syslog"
1200   
1201         ol_arg=invalid
1202         for ol_val in auto yes no ; do
1203                 if test "$enableval" = "$ol_val" ; then
1204                         ol_arg="$ol_val"
1205                 fi
1206         done
1207         if test "$ol_arg" = "invalid" ; then
1208                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1209         fi
1210         ol_enable_syslog="$ol_arg"
1211
1212 else
1213         ol_enable_syslog="auto"
1214 fi
1215 # end --enable-syslog
1216 # OpenLDAP --enable-proctitle
1217         # Check whether --enable-proctitle or --disable-proctitle was given.
1218 if test "${enable_proctitle+set}" = set; then
1219   enableval="$enable_proctitle"
1220   
1221         ol_arg=invalid
1222         for ol_val in auto yes no ; do
1223                 if test "$enableval" = "$ol_val" ; then
1224                         ol_arg="$ol_val"
1225                 fi
1226         done
1227         if test "$ol_arg" = "invalid" ; then
1228                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1229         fi
1230         ol_enable_proctitle="$ol_arg"
1231
1232 else
1233         ol_enable_proctitle="yes"
1234 fi
1235 # end --enable-proctitle
1236 # OpenLDAP --enable-cache
1237         # Check whether --enable-cache or --disable-cache was given.
1238 if test "${enable_cache+set}" = set; then
1239   enableval="$enable_cache"
1240   
1241         ol_arg=invalid
1242         for ol_val in auto yes no ; do
1243                 if test "$enableval" = "$ol_val" ; then
1244                         ol_arg="$ol_val"
1245                 fi
1246         done
1247         if test "$ol_arg" = "invalid" ; then
1248                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1249         fi
1250         ol_enable_cache="$ol_arg"
1251
1252 else
1253         ol_enable_cache="yes"
1254 fi
1255 # end --enable-cache
1256 # OpenLDAP --enable-dns
1257         # Check whether --enable-dns or --disable-dns was given.
1258 if test "${enable_dns+set}" = set; then
1259   enableval="$enable_dns"
1260   
1261         ol_arg=invalid
1262         for ol_val in auto yes no ; do
1263                 if test "$enableval" = "$ol_val" ; then
1264                         ol_arg="$ol_val"
1265                 fi
1266         done
1267         if test "$ol_arg" = "invalid" ; then
1268                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1269         fi
1270         ol_enable_dns="$ol_arg"
1271
1272 else
1273         ol_enable_dns="no"
1274 fi
1275 # end --enable-dns
1276 # OpenLDAP --enable-referrals
1277         # Check whether --enable-referrals or --disable-referrals was given.
1278 if test "${enable_referrals+set}" = set; then
1279   enableval="$enable_referrals"
1280   
1281         ol_arg=invalid
1282         for ol_val in auto yes no ; do
1283                 if test "$enableval" = "$ol_val" ; then
1284                         ol_arg="$ol_val"
1285                 fi
1286         done
1287         if test "$ol_arg" = "invalid" ; then
1288                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1289         fi
1290         ol_enable_referrals="$ol_arg"
1291
1292 else
1293         ol_enable_referrals="yes"
1294 fi
1295 # end --enable-referrals
1296 # OpenLDAP --enable-kbind
1297         # Check whether --enable-kbind or --disable-kbind was given.
1298 if test "${enable_kbind+set}" = set; then
1299   enableval="$enable_kbind"
1300   
1301         ol_arg=invalid
1302         for ol_val in auto yes no ; do
1303                 if test "$enableval" = "$ol_val" ; then
1304                         ol_arg="$ol_val"
1305                 fi
1306         done
1307         if test "$ol_arg" = "invalid" ; then
1308                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1309         fi
1310         ol_enable_kbind="$ol_arg"
1311
1312 else
1313         ol_enable_kbind="auto"
1314 fi
1315 # end --enable-kbind
1316 # OpenLDAP --enable-cldap
1317         # Check whether --enable-cldap or --disable-cldap was given.
1318 if test "${enable_cldap+set}" = set; then
1319   enableval="$enable_cldap"
1320   
1321         ol_arg=invalid
1322         for ol_val in auto yes no ; do
1323                 if test "$enableval" = "$ol_val" ; then
1324                         ol_arg="$ol_val"
1325                 fi
1326         done
1327         if test "$ol_arg" = "invalid" ; then
1328                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1329         fi
1330         ol_enable_cldap="$ol_arg"
1331
1332 else
1333         ol_enable_cldap="no"
1334 fi
1335 # end --enable-cldap
1336 # OpenLDAP --enable-ldapi
1337         # Check whether --enable-ldapi or --disable-ldapi was given.
1338 if test "${enable_ldapi+set}" = set; then
1339   enableval="$enable_ldapi"
1340   
1341         ol_arg=invalid
1342         for ol_val in auto yes no ; do
1343                 if test "$enableval" = "$ol_val" ; then
1344                         ol_arg="$ol_val"
1345                 fi
1346         done
1347         if test "$ol_arg" = "invalid" ; then
1348                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1349         fi
1350         ol_enable_ldapi="$ol_arg"
1351
1352 else
1353         ol_enable_ldapi="no"
1354 fi
1355 # end --enable-ldapi
1356 # OpenLDAP --enable-x_compile
1357         # Check whether --enable-x_compile or --disable-x_compile was given.
1358 if test "${enable_x_compile+set}" = set; then
1359   enableval="$enable_x_compile"
1360   
1361         ol_arg=invalid
1362         for ol_val in yes no ; do
1363                 if test "$enableval" = "$ol_val" ; then
1364                         ol_arg="$ol_val"
1365                 fi
1366         done
1367         if test "$ol_arg" = "invalid" ; then
1368                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1369         fi
1370         ol_enable_x_compile="$ol_arg"
1371
1372 else
1373         ol_enable_x_compile="no"
1374 fi
1375 # end --enable-x_compile
1376
1377
1378 # OpenLDAP --with-cyrus_sasl
1379         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1380 if test "${with_cyrus_sasl+set}" = set; then
1381   withval="$with_cyrus_sasl"
1382   
1383         ol_arg=invalid
1384         for ol_val in auto yes no  ; do
1385                 if test "$withval" = "$ol_val" ; then
1386                         ol_arg="$ol_val"
1387                 fi
1388         done
1389         if test "$ol_arg" = "invalid" ; then
1390                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1391         fi
1392         ol_with_cyrus_sasl="$ol_arg"
1393
1394 else
1395         ol_with_cyrus_sasl="auto"
1396 fi
1397 # end --with-cyrus_sasl
1398
1399 # OpenLDAP --with-fetch
1400         # Check whether --with-fetch or --without-fetch was given.
1401 if test "${with_fetch+set}" = set; then
1402   withval="$with_fetch"
1403   
1404         ol_arg=invalid
1405         for ol_val in auto yes no  ; do
1406                 if test "$withval" = "$ol_val" ; then
1407                         ol_arg="$ol_val"
1408                 fi
1409         done
1410         if test "$ol_arg" = "invalid" ; then
1411                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1412         fi
1413         ol_with_fetch="$ol_arg"
1414
1415 else
1416         ol_with_fetch="auto"
1417 fi
1418 # end --with-fetch
1419
1420 # OpenLDAP --with-kerberos
1421         # Check whether --with-kerberos or --without-kerberos was given.
1422 if test "${with_kerberos+set}" = set; then
1423   withval="$with_kerberos"
1424   
1425         ol_arg=invalid
1426         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1427                 if test "$withval" = "$ol_val" ; then
1428                         ol_arg="$ol_val"
1429                 fi
1430         done
1431         if test "$ol_arg" = "invalid" ; then
1432                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1433         fi
1434         ol_with_kerberos="$ol_arg"
1435
1436 else
1437         ol_with_kerberos="auto"
1438 fi
1439 # end --with-kerberos
1440
1441 # OpenLDAP --with-readline
1442         # Check whether --with-readline or --without-readline was given.
1443 if test "${with_readline+set}" = set; then
1444   withval="$with_readline"
1445   
1446         ol_arg=invalid
1447         for ol_val in auto yes no  ; do
1448                 if test "$withval" = "$ol_val" ; then
1449                         ol_arg="$ol_val"
1450                 fi
1451         done
1452         if test "$ol_arg" = "invalid" ; then
1453                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1454         fi
1455         ol_with_readline="$ol_arg"
1456
1457 else
1458         ol_with_readline="auto"
1459 fi
1460 # end --with-readline
1461
1462 # OpenLDAP --with-threads
1463         # Check whether --with-threads or --without-threads was given.
1464 if test "${with_threads+set}" = set; then
1465   withval="$with_threads"
1466   
1467         ol_arg=invalid
1468         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1469                 if test "$withval" = "$ol_val" ; then
1470                         ol_arg="$ol_val"
1471                 fi
1472         done
1473         if test "$ol_arg" = "invalid" ; then
1474                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1475         fi
1476         ol_with_threads="$ol_arg"
1477
1478 else
1479         ol_with_threads="auto"
1480 fi
1481 # end --with-threads
1482
1483 # OpenLDAP --with-tls
1484         # Check whether --with-tls or --without-tls was given.
1485 if test "${with_tls+set}" = set; then
1486   withval="$with_tls"
1487   
1488         ol_arg=invalid
1489         for ol_val in auto ssleay openssl yes no  ; do
1490                 if test "$withval" = "$ol_val" ; then
1491                         ol_arg="$ol_val"
1492                 fi
1493         done
1494         if test "$ol_arg" = "invalid" ; then
1495                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1496         fi
1497         ol_with_tls="$ol_arg"
1498
1499 else
1500         ol_with_tls="auto"
1501 fi
1502 # end --with-tls
1503
1504 # OpenLDAP --with-yielding_select
1505         # Check whether --with-yielding_select or --without-yielding_select was given.
1506 if test "${with_yielding_select+set}" = set; then
1507   withval="$with_yielding_select"
1508   
1509         ol_arg=invalid
1510         for ol_val in auto yes no manual  ; do
1511                 if test "$withval" = "$ol_val" ; then
1512                         ol_arg="$ol_val"
1513                 fi
1514         done
1515         if test "$ol_arg" = "invalid" ; then
1516                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1517         fi
1518         ol_with_yielding_select="$ol_arg"
1519
1520 else
1521         ol_with_yielding_select="auto"
1522 fi
1523 # end --with-yielding_select
1524
1525
1526
1527 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1528 if test "${with_xxslapdoptions+set}" = set; then
1529   withval="$with_xxslapdoptions"
1530   :
1531 fi
1532
1533 # OpenLDAP --enable-slapd
1534         # Check whether --enable-slapd or --disable-slapd was given.
1535 if test "${enable_slapd+set}" = set; then
1536   enableval="$enable_slapd"
1537   
1538         ol_arg=invalid
1539         for ol_val in auto yes no ; do
1540                 if test "$enableval" = "$ol_val" ; then
1541                         ol_arg="$ol_val"
1542                 fi
1543         done
1544         if test "$ol_arg" = "invalid" ; then
1545                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1546         fi
1547         ol_enable_slapd="$ol_arg"
1548
1549 else
1550         ol_enable_slapd="yes"
1551 fi
1552 # end --enable-slapd
1553 # OpenLDAP --enable-cleartext
1554         # Check whether --enable-cleartext or --disable-cleartext was given.
1555 if test "${enable_cleartext+set}" = set; then
1556   enableval="$enable_cleartext"
1557   
1558         ol_arg=invalid
1559         for ol_val in auto yes no ; do
1560                 if test "$enableval" = "$ol_val" ; then
1561                         ol_arg="$ol_val"
1562                 fi
1563         done
1564         if test "$ol_arg" = "invalid" ; then
1565                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1566         fi
1567         ol_enable_cleartext="$ol_arg"
1568
1569 else
1570         ol_enable_cleartext="yes"
1571 fi
1572 # end --enable-cleartext
1573 # OpenLDAP --enable-crypt
1574         # Check whether --enable-crypt or --disable-crypt was given.
1575 if test "${enable_crypt+set}" = set; then
1576   enableval="$enable_crypt"
1577   
1578         ol_arg=invalid
1579         for ol_val in auto yes no ; do
1580                 if test "$enableval" = "$ol_val" ; then
1581                         ol_arg="$ol_val"
1582                 fi
1583         done
1584         if test "$ol_arg" = "invalid" ; then
1585                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1586         fi
1587         ol_enable_crypt="$ol_arg"
1588
1589 else
1590         ol_enable_crypt="auto"
1591 fi
1592 # end --enable-crypt
1593 # OpenLDAP --enable-kpasswd
1594         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1595 if test "${enable_kpasswd+set}" = set; then
1596   enableval="$enable_kpasswd"
1597   
1598         ol_arg=invalid
1599         for ol_val in auto yes no ; do
1600                 if test "$enableval" = "$ol_val" ; then
1601                         ol_arg="$ol_val"
1602                 fi
1603         done
1604         if test "$ol_arg" = "invalid" ; then
1605                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1606         fi
1607         ol_enable_kpasswd="$ol_arg"
1608
1609 else
1610         ol_enable_kpasswd="no"
1611 fi
1612 # end --enable-kpasswd
1613 # OpenLDAP --enable-spasswd
1614         # Check whether --enable-spasswd or --disable-spasswd was given.
1615 if test "${enable_spasswd+set}" = set; then
1616   enableval="$enable_spasswd"
1617   
1618         ol_arg=invalid
1619         for ol_val in auto yes no ; do
1620                 if test "$enableval" = "$ol_val" ; then
1621                         ol_arg="$ol_val"
1622                 fi
1623         done
1624         if test "$ol_arg" = "invalid" ; then
1625                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1626         fi
1627         ol_enable_spasswd="$ol_arg"
1628
1629 else
1630         ol_enable_spasswd="no"
1631 fi
1632 # end --enable-spasswd
1633 # OpenLDAP --enable-modules
1634         # Check whether --enable-modules or --disable-modules was given.
1635 if test "${enable_modules+set}" = set; then
1636   enableval="$enable_modules"
1637   
1638         ol_arg=invalid
1639         for ol_val in auto yes no ; do
1640                 if test "$enableval" = "$ol_val" ; then
1641                         ol_arg="$ol_val"
1642                 fi
1643         done
1644         if test "$ol_arg" = "invalid" ; then
1645                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1646         fi
1647         ol_enable_modules="$ol_arg"
1648
1649 else
1650         ol_enable_modules="no"
1651 fi
1652 # end --enable-modules
1653 # OpenLDAP --enable-multimaster
1654         # Check whether --enable-multimaster or --disable-multimaster was given.
1655 if test "${enable_multimaster+set}" = set; then
1656   enableval="$enable_multimaster"
1657   
1658         ol_arg=invalid
1659         for ol_val in auto yes no ; do
1660                 if test "$enableval" = "$ol_val" ; then
1661                         ol_arg="$ol_val"
1662                 fi
1663         done
1664         if test "$ol_arg" = "invalid" ; then
1665                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1666         fi
1667         ol_enable_multimaster="$ol_arg"
1668
1669 else
1670         ol_enable_multimaster="no"
1671 fi
1672 # end --enable-multimaster
1673 # OpenLDAP --enable-phonetic
1674         # Check whether --enable-phonetic or --disable-phonetic was given.
1675 if test "${enable_phonetic+set}" = set; then
1676   enableval="$enable_phonetic"
1677   
1678         ol_arg=invalid
1679         for ol_val in auto yes no ; do
1680                 if test "$enableval" = "$ol_val" ; then
1681                         ol_arg="$ol_val"
1682                 fi
1683         done
1684         if test "$ol_arg" = "invalid" ; then
1685                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1686         fi
1687         ol_enable_phonetic="$ol_arg"
1688
1689 else
1690         ol_enable_phonetic="no"
1691 fi
1692 # end --enable-phonetic
1693 # OpenLDAP --enable-quipu
1694         # Check whether --enable-quipu or --disable-quipu was given.
1695 if test "${enable_quipu+set}" = set; then
1696   enableval="$enable_quipu"
1697   
1698         ol_arg=invalid
1699         for ol_val in auto yes no ; do
1700                 if test "$enableval" = "$ol_val" ; then
1701                         ol_arg="$ol_val"
1702                 fi
1703         done
1704         if test "$ol_arg" = "invalid" ; then
1705                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1706         fi
1707         ol_enable_quipu="$ol_arg"
1708
1709 else
1710         ol_enable_quipu="no"
1711 fi
1712 # end --enable-quipu
1713 # OpenLDAP --enable-rlookups
1714         # Check whether --enable-rlookups or --disable-rlookups was given.
1715 if test "${enable_rlookups+set}" = set; then
1716   enableval="$enable_rlookups"
1717   
1718         ol_arg=invalid
1719         for ol_val in auto yes no ; do
1720                 if test "$enableval" = "$ol_val" ; then
1721                         ol_arg="$ol_val"
1722                 fi
1723         done
1724         if test "$ol_arg" = "invalid" ; then
1725                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1726         fi
1727         ol_enable_rlookups="$ol_arg"
1728
1729 else
1730         ol_enable_rlookups="auto"
1731 fi
1732 # end --enable-rlookups
1733 # OpenLDAP --enable-aci
1734         # Check whether --enable-aci or --disable-aci was given.
1735 if test "${enable_aci+set}" = set; then
1736   enableval="$enable_aci"
1737   
1738         ol_arg=invalid
1739         for ol_val in auto yes no ; do
1740                 if test "$enableval" = "$ol_val" ; then
1741                         ol_arg="$ol_val"
1742                 fi
1743         done
1744         if test "$ol_arg" = "invalid" ; then
1745                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1746         fi
1747         ol_enable_aci="$ol_arg"
1748
1749 else
1750         ol_enable_aci="no"
1751 fi
1752 # end --enable-aci
1753 # OpenLDAP --enable-wrappers
1754         # Check whether --enable-wrappers or --disable-wrappers was given.
1755 if test "${enable_wrappers+set}" = set; then
1756   enableval="$enable_wrappers"
1757   
1758         ol_arg=invalid
1759         for ol_val in auto yes no ; do
1760                 if test "$enableval" = "$ol_val" ; then
1761                         ol_arg="$ol_val"
1762                 fi
1763         done
1764         if test "$ol_arg" = "invalid" ; then
1765                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1766         fi
1767         ol_enable_wrappers="$ol_arg"
1768
1769 else
1770         ol_enable_wrappers="no"
1771 fi
1772 # end --enable-wrappers
1773 # OpenLDAP --enable-dynamic
1774         # Check whether --enable-dynamic or --disable-dynamic was given.
1775 if test "${enable_dynamic+set}" = set; then
1776   enableval="$enable_dynamic"
1777   
1778         ol_arg=invalid
1779         for ol_val in auto yes no ; do
1780                 if test "$enableval" = "$ol_val" ; then
1781                         ol_arg="$ol_val"
1782                 fi
1783         done
1784         if test "$ol_arg" = "invalid" ; then
1785                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1786         fi
1787         ol_enable_dynamic="$ol_arg"
1788
1789 else
1790         ol_enable_dynamic="no"
1791 fi
1792 # end --enable-dynamic
1793
1794 # OpenLDAP --enable-bdb2
1795         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1796 if test "${enable_bdb2+set}" = set; then
1797   enableval="$enable_bdb2"
1798   
1799         ol_arg=invalid
1800         for ol_val in auto yes no ; do
1801                 if test "$enableval" = "$ol_val" ; then
1802                         ol_arg="$ol_val"
1803                 fi
1804         done
1805         if test "$ol_arg" = "invalid" ; then
1806                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1807         fi
1808         ol_enable_bdb2="$ol_arg"
1809
1810 else
1811         ol_enable_bdb2="no"
1812 fi
1813 # end --enable-bdb2
1814 # OpenLDAP --with-bdb2_module
1815         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1816 if test "${with_bdb2_module+set}" = set; then
1817   withval="$with_bdb2_module"
1818   
1819         ol_arg=invalid
1820         for ol_val in static dynamic ; do
1821                 if test "$withval" = "$ol_val" ; then
1822                         ol_arg="$ol_val"
1823                 fi
1824         done
1825         if test "$ol_arg" = "invalid" ; then
1826                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1827         fi
1828         ol_with_bdb2_module="$ol_arg"
1829
1830 else
1831         ol_with_bdb2_module="static"
1832 fi
1833 # end --with-bdb2_module
1834
1835 # OpenLDAP --enable-dnssrv
1836         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1837 if test "${enable_dnssrv+set}" = set; then
1838   enableval="$enable_dnssrv"
1839   
1840         ol_arg=invalid
1841         for ol_val in auto yes no ; do
1842                 if test "$enableval" = "$ol_val" ; then
1843                         ol_arg="$ol_val"
1844                 fi
1845         done
1846         if test "$ol_arg" = "invalid" ; then
1847                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1848         fi
1849         ol_enable_dnssrv="$ol_arg"
1850
1851 else
1852         ol_enable_dnssrv="no"
1853 fi
1854 # end --enable-dnssrv
1855 # OpenLDAP --with-dnssrv_module
1856         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1857 if test "${with_dnssrv_module+set}" = set; then
1858   withval="$with_dnssrv_module"
1859   
1860         ol_arg=invalid
1861         for ol_val in static dynamic ; do
1862                 if test "$withval" = "$ol_val" ; then
1863                         ol_arg="$ol_val"
1864                 fi
1865         done
1866         if test "$ol_arg" = "invalid" ; then
1867                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1868         fi
1869         ol_with_dnssrv_module="$ol_arg"
1870
1871 else
1872         ol_with_dnssrv_module="static"
1873 fi
1874 # end --with-dnssrv_module
1875
1876 # OpenLDAP --enable-ldap
1877         # Check whether --enable-ldap or --disable-ldap was given.
1878 if test "${enable_ldap+set}" = set; then
1879   enableval="$enable_ldap"
1880   
1881         ol_arg=invalid
1882         for ol_val in auto yes no ; do
1883                 if test "$enableval" = "$ol_val" ; then
1884                         ol_arg="$ol_val"
1885                 fi
1886         done
1887         if test "$ol_arg" = "invalid" ; then
1888                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1889         fi
1890         ol_enable_ldap="$ol_arg"
1891
1892 else
1893         ol_enable_ldap="no"
1894 fi
1895 # end --enable-ldap
1896 # OpenLDAP --with-ldap_module
1897         # Check whether --with-ldap_module or --without-ldap_module was given.
1898 if test "${with_ldap_module+set}" = set; then
1899   withval="$with_ldap_module"
1900   
1901         ol_arg=invalid
1902         for ol_val in static dynamic ; do
1903                 if test "$withval" = "$ol_val" ; then
1904                         ol_arg="$ol_val"
1905                 fi
1906         done
1907         if test "$ol_arg" = "invalid" ; then
1908                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1909         fi
1910         ol_with_ldap_module="$ol_arg"
1911
1912 else
1913         ol_with_ldap_module="static"
1914 fi
1915 # end --with-ldap_module
1916
1917 # OpenLDAP --enable-ldbm
1918         # Check whether --enable-ldbm or --disable-ldbm was given.
1919 if test "${enable_ldbm+set}" = set; then
1920   enableval="$enable_ldbm"
1921   
1922         ol_arg=invalid
1923         for ol_val in auto yes no ; do
1924                 if test "$enableval" = "$ol_val" ; then
1925                         ol_arg="$ol_val"
1926                 fi
1927         done
1928         if test "$ol_arg" = "invalid" ; then
1929                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1930         fi
1931         ol_enable_ldbm="$ol_arg"
1932
1933 else
1934         ol_enable_ldbm="yes"
1935 fi
1936 # end --enable-ldbm
1937 # OpenLDAP --with-ldbm_api
1938         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1939 if test "${with_ldbm_api+set}" = set; then
1940   withval="$with_ldbm_api"
1941   
1942         ol_arg=invalid
1943         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1944                 if test "$withval" = "$ol_val" ; then
1945                         ol_arg="$ol_val"
1946                 fi
1947         done
1948         if test "$ol_arg" = "invalid" ; then
1949                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1950         fi
1951         ol_with_ldbm_api="$ol_arg"
1952
1953 else
1954         ol_with_ldbm_api="auto"
1955 fi
1956 # end --with-ldbm_api
1957
1958 # OpenLDAP --with-ldbm_module
1959         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1960 if test "${with_ldbm_module+set}" = set; then
1961   withval="$with_ldbm_module"
1962   
1963         ol_arg=invalid
1964         for ol_val in static dynamic ; do
1965                 if test "$withval" = "$ol_val" ; then
1966                         ol_arg="$ol_val"
1967                 fi
1968         done
1969         if test "$ol_arg" = "invalid" ; then
1970                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1971         fi
1972         ol_with_ldbm_module="$ol_arg"
1973
1974 else
1975         ol_with_ldbm_module="static"
1976 fi
1977 # end --with-ldbm_module
1978
1979 # OpenLDAP --with-ldbm_type
1980         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1981 if test "${with_ldbm_type+set}" = set; then
1982   withval="$with_ldbm_type"
1983   
1984         ol_arg=invalid
1985         for ol_val in auto btree hash ; do
1986                 if test "$withval" = "$ol_val" ; then
1987                         ol_arg="$ol_val"
1988                 fi
1989         done
1990         if test "$ol_arg" = "invalid" ; then
1991                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1992         fi
1993         ol_with_ldbm_type="$ol_arg"
1994
1995 else
1996         ol_with_ldbm_type="auto"
1997 fi
1998 # end --with-ldbm_type
1999
2000 # OpenLDAP --enable-passwd
2001         # Check whether --enable-passwd or --disable-passwd was given.
2002 if test "${enable_passwd+set}" = set; then
2003   enableval="$enable_passwd"
2004   
2005         ol_arg=invalid
2006         for ol_val in auto yes no ; do
2007                 if test "$enableval" = "$ol_val" ; then
2008                         ol_arg="$ol_val"
2009                 fi
2010         done
2011         if test "$ol_arg" = "invalid" ; then
2012                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2013         fi
2014         ol_enable_passwd="$ol_arg"
2015
2016 else
2017         ol_enable_passwd="no"
2018 fi
2019 # end --enable-passwd
2020 # OpenLDAP --with-passwd_module
2021         # Check whether --with-passwd_module or --without-passwd_module was given.
2022 if test "${with_passwd_module+set}" = set; then
2023   withval="$with_passwd_module"
2024   
2025         ol_arg=invalid
2026         for ol_val in static dynamic ; do
2027                 if test "$withval" = "$ol_val" ; then
2028                         ol_arg="$ol_val"
2029                 fi
2030         done
2031         if test "$ol_arg" = "invalid" ; then
2032                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2033         fi
2034         ol_with_passwd_module="$ol_arg"
2035
2036 else
2037         ol_with_passwd_module="static"
2038 fi
2039 # end --with-passwd_module
2040
2041 # OpenLDAP --enable-perl
2042         # Check whether --enable-perl or --disable-perl was given.
2043 if test "${enable_perl+set}" = set; then
2044   enableval="$enable_perl"
2045   
2046         ol_arg=invalid
2047         for ol_val in auto yes no ; do
2048                 if test "$enableval" = "$ol_val" ; then
2049                         ol_arg="$ol_val"
2050                 fi
2051         done
2052         if test "$ol_arg" = "invalid" ; then
2053                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2054         fi
2055         ol_enable_perl="$ol_arg"
2056
2057 else
2058         ol_enable_perl="no"
2059 fi
2060 # end --enable-perl
2061 # OpenLDAP --with-perl_module
2062         # Check whether --with-perl_module or --without-perl_module was given.
2063 if test "${with_perl_module+set}" = set; then
2064   withval="$with_perl_module"
2065   
2066         ol_arg=invalid
2067         for ol_val in static dynamic ; do
2068                 if test "$withval" = "$ol_val" ; then
2069                         ol_arg="$ol_val"
2070                 fi
2071         done
2072         if test "$ol_arg" = "invalid" ; then
2073                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2074         fi
2075         ol_with_perl_module="$ol_arg"
2076
2077 else
2078         ol_with_perl_module="static"
2079 fi
2080 # end --with-perl_module
2081
2082 # OpenLDAP --enable-shell
2083         # Check whether --enable-shell or --disable-shell was given.
2084 if test "${enable_shell+set}" = set; then
2085   enableval="$enable_shell"
2086   
2087         ol_arg=invalid
2088         for ol_val in auto yes no ; do
2089                 if test "$enableval" = "$ol_val" ; then
2090                         ol_arg="$ol_val"
2091                 fi
2092         done
2093         if test "$ol_arg" = "invalid" ; then
2094                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2095         fi
2096         ol_enable_shell="$ol_arg"
2097
2098 else
2099         ol_enable_shell="no"
2100 fi
2101 # end --enable-shell
2102 # OpenLDAP --with-shell_module
2103         # Check whether --with-shell_module or --without-shell_module was given.
2104 if test "${with_shell_module+set}" = set; then
2105   withval="$with_shell_module"
2106   
2107         ol_arg=invalid
2108         for ol_val in static dynamic ; do
2109                 if test "$withval" = "$ol_val" ; then
2110                         ol_arg="$ol_val"
2111                 fi
2112         done
2113         if test "$ol_arg" = "invalid" ; then
2114                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2115         fi
2116         ol_with_shell_module="$ol_arg"
2117
2118 else
2119         ol_with_shell_module="static"
2120 fi
2121 # end --with-shell_module
2122
2123 # OpenLDAP --enable-sql
2124         # Check whether --enable-sql or --disable-sql was given.
2125 if test "${enable_sql+set}" = set; then
2126   enableval="$enable_sql"
2127   
2128         ol_arg=invalid
2129         for ol_val in auto yes no ; do
2130                 if test "$enableval" = "$ol_val" ; then
2131                         ol_arg="$ol_val"
2132                 fi
2133         done
2134         if test "$ol_arg" = "invalid" ; then
2135                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2136         fi
2137         ol_enable_sql="$ol_arg"
2138
2139 else
2140         ol_enable_sql="no"
2141 fi
2142 # end --enable-sql
2143 # OpenLDAP --with-sql_module
2144         # Check whether --with-sql_module or --without-sql_module was given.
2145 if test "${with_sql_module+set}" = set; then
2146   withval="$with_sql_module"
2147   
2148         ol_arg=invalid
2149         for ol_val in static dynamic ; do
2150                 if test "$withval" = "$ol_val" ; then
2151                         ol_arg="$ol_val"
2152                 fi
2153         done
2154         if test "$ol_arg" = "invalid" ; then
2155                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2156         fi
2157         ol_with_sql_module="$ol_arg"
2158
2159 else
2160         ol_with_sql_module="static"
2161 fi
2162 # end --with-sql_module
2163
2164 # OpenLDAP --enable-tcl
2165         # Check whether --enable-tcl or --disable-tcl was given.
2166 if test "${enable_tcl+set}" = set; then
2167   enableval="$enable_tcl"
2168   
2169         ol_arg=invalid
2170         for ol_val in auto yes no ; do
2171                 if test "$enableval" = "$ol_val" ; then
2172                         ol_arg="$ol_val"
2173                 fi
2174         done
2175         if test "$ol_arg" = "invalid" ; then
2176                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2177         fi
2178         ol_enable_tcl="$ol_arg"
2179
2180 else
2181         ol_enable_tcl="no"
2182 fi
2183 # end --enable-tcl
2184 # OpenLDAP --with-tcl_module
2185         # Check whether --with-tcl_module or --without-tcl_module was given.
2186 if test "${with_tcl_module+set}" = set; then
2187   withval="$with_tcl_module"
2188   
2189         ol_arg=invalid
2190         for ol_val in static dynamic ; do
2191                 if test "$withval" = "$ol_val" ; then
2192                         ol_arg="$ol_val"
2193                 fi
2194         done
2195         if test "$ol_arg" = "invalid" ; then
2196                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2197         fi
2198         ol_with_tcl_module="$ol_arg"
2199
2200 else
2201         ol_with_tcl_module="static"
2202 fi
2203 # end --with-tcl_module
2204
2205
2206 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2207 if test "${with_xxslurpdoptions+set}" = set; then
2208   withval="$with_xxslurpdoptions"
2209   :
2210 fi
2211
2212 # OpenLDAP --enable-slurpd
2213         # Check whether --enable-slurpd or --disable-slurpd was given.
2214 if test "${enable_slurpd+set}" = set; then
2215   enableval="$enable_slurpd"
2216   
2217         ol_arg=invalid
2218         for ol_val in auto yes no ; do
2219                 if test "$enableval" = "$ol_val" ; then
2220                         ol_arg="$ol_val"
2221                 fi
2222         done
2223         if test "$ol_arg" = "invalid" ; then
2224                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2225         fi
2226         ol_enable_slurpd="$ol_arg"
2227
2228 else
2229         ol_enable_slurpd="auto"
2230 fi
2231 # end --enable-slurpd
2232
2233 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2234 if test "${with_xxliboptions+set}" = set; then
2235   withval="$with_xxliboptions"
2236   :
2237 fi
2238
2239 # Check whether --enable-static or --disable-static was given.
2240 if test "${enable_static+set}" = set; then
2241   enableval="$enable_static"
2242   p=${PACKAGE-default}
2243 case "$enableval" in
2244 yes) enable_static=yes ;;
2245 no) enable_static=no ;;
2246 *)
2247   enable_static=no
2248   # Look at the argument we got.  We use all the common list separators.
2249   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2250   for pkg in $enableval; do
2251     if test "X$pkg" = "X$p"; then
2252       enable_static=yes
2253     fi
2254   done
2255   IFS="$ac_save_ifs"
2256   ;;
2257 esac
2258 else
2259   enable_static=yes
2260 fi
2261
2262 # Check whether --enable-shared or --disable-shared was given.
2263 if test "${enable_shared+set}" = set; then
2264   enableval="$enable_shared"
2265   p=${PACKAGE-default}
2266 case "$enableval" in
2267 yes) enable_shared=yes ;;
2268 no) enable_shared=no ;;
2269 *)
2270   enable_shared=no
2271   # Look at the argument we got.  We use all the common list separators.
2272   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2273   for pkg in $enableval; do
2274     if test "X$pkg" = "X$p"; then
2275       enable_shared=yes
2276     fi
2277   done
2278   IFS="$ac_save_ifs"
2279   ;;
2280 esac
2281 else
2282   enable_shared=yes
2283 fi
2284
2285
2286
2287 # validate options
2288 if test $ol_enable_dns = yes ; then
2289         if test $ol_enable_referrals = no ; then
2290                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2291         fi
2292         if test $ol_enable_referrals = auto ; then
2293                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2294                 ol_enable_referrals=yes
2295         fi
2296 fi
2297
2298 if test $ol_enable_slapd = no ; then
2299                 if test $ol_enable_bdb2 = yes ; then
2300                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2301         fi
2302         if test $ol_enable_dnssrv = yes ; then
2303                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2304         fi
2305         if test $ol_enable_ldap = yes ; then
2306                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2307         fi
2308         if test $ol_enable_ldbm = yes ; then
2309                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2310         fi
2311         if test $ol_enable_passwd = yes ; then
2312                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2313         fi
2314         if test $ol_enable_perl = yes ; then
2315                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2316         fi
2317         if test $ol_enable_shell = yes ; then
2318                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2319         fi
2320         if test $ol_enable_tcl = yes ; then
2321                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2322         fi
2323         if test $ol_enable_sql = yes ; then
2324                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2325         fi
2326         if test $ol_enable_modules = yes ; then
2327                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2328         fi
2329         if test $ol_enable_multimaster = yes ; then
2330                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2331         fi
2332         if test $ol_enable_wrappers = yes ; then
2333                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2334         fi
2335         if test $ol_enable_phonetic = yes ; then
2336                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2337         fi
2338         if test $ol_enable_quipu = yes ; then
2339                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2340         fi
2341         if test $ol_enable_rlookups = yes ; then
2342                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2343         fi
2344         if test $ol_enable_aci = yes ; then
2345                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2346         fi
2347         if test $ol_with_ldbm_api != auto ; then
2348                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2349         fi
2350         if test $ol_with_ldbm_type != auto ; then
2351                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2352         fi
2353         if test $ol_with_bdb2_module != static ; then
2354                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2355         fi
2356         if test $ol_with_dnssrv_module != static ; then
2357                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2358         fi
2359         if test $ol_with_ldap_module != static ; then
2360                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2361         fi
2362         if test $ol_with_ldbm_module != static ; then
2363                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2364         fi
2365         if test $ol_with_passwd_module != static ; then
2366                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2367         fi
2368         if test $ol_with_perl_module != static ; then
2369                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2370         fi
2371         if test $ol_with_shell_module != static ; then
2372                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2373         fi
2374         if test $ol_with_tcl_module != static ; then
2375                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2376         fi
2377         if test $ol_with_sql_module != static ; then
2378                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2379         fi
2380         if test $ol_enable_slurpd = yes ; then
2381                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2382         fi
2383
2384         # force settings to no
2385         ol_enable_bdb2=no
2386         ol_enable_dnssrv=no
2387         ol_enable_ldap=no
2388         ol_enable_ldbm=no
2389         ol_enable_passwd=no
2390         ol_enable_perl=no
2391         ol_enable_shell=no
2392         ol_enable_tcl=no
2393         ol_enable_sql=no
2394
2395         ol_enable_modules=no
2396         ol_enable_multimaster=no
2397         ol_enable_phonetic=no
2398         ol_enable_quipu=no
2399         ol_enable_rlookups=no
2400         ol_enable_aci=no
2401         ol_enable_wrappers=no
2402         ol_enable_dynamic=no
2403
2404         ol_with_ldbm_api=no
2405         ol_with_ldbm_type=no
2406
2407         ol_with_bdb2_module=static
2408         ol_with_dnssrv_module=static
2409         ol_with_ldap_module=static
2410         ol_with_ldbm_module=static
2411         ol_with_passwd_module=static
2412         ol_with_perl_module=static
2413         ol_with_shell_module=static
2414         ol_with_tcl_module=static
2415         ol_with_sql_module=static
2416
2417         ol_enable_slurpd=no
2418
2419 elif test $ol_enable_ldbm = no ; then
2420         
2421         if test $ol_with_ldbm_api != auto ; then
2422                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2423         fi
2424
2425         if test $ol_with_ldbm_type != auto ; then
2426                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2427         fi
2428
2429         if test $ol_with_ldbm_module != static ; then
2430                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2431         fi
2432
2433         if test $ol_enable_bdb2 = yes ; then
2434                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2435         fi
2436
2437         if test $ol_enable_modules != yes -a \
2438                 $ol_enable_dnssrv = no -a \
2439                 $ol_enable_ldap = no -a \
2440                 $ol_enable_passwd = no -a \
2441                 $ol_enable_perl = no -a \
2442                 $ol_enable_shell = no -a \
2443                 $ol_enable_sql = no -a \
2444                 $ol_enable_tcl = no ; then
2445                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2446         fi
2447
2448         ol_with_ldbm_api=no
2449         ol_with_ldbm_type=no
2450         ol_with_ldbm_module=static
2451
2452 elif test $ol_enable_bdb2 = yes ; then
2453         
2454         if test $ol_with_ldbm_api != auto -a \
2455                 $ol_with_ldbm_api != berkeley ; then
2456                 { echo "configure: error: BDB2 requires LDBM API berkeley or auto" 1>&2; exit 1; }
2457         fi
2458
2459         ol_with_ldbm_api=db2
2460
2461 else
2462         
2463         if test $ol_enable_bdb2 != no ; then
2464                 if test $ol_with_ldbm_api != auto -a \
2465                         $ol_with_ldbm_api != berkeley ; then
2466                         echo "configure: warning: BDB2 requires LDBM api berkeley or auto" 1>&2
2467                         ol_enable_bdb2=no
2468                 fi
2469         fi
2470
2471         if test $ol_with_ldbm_api = gdbm -a \
2472                 $ol_with_ldbm_type = btree ; then
2473                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2474         fi
2475         if test $ol_with_ldbm_api = mdbm -a \
2476                 $ol_with_ldbm_type = btree ; then
2477                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2478         fi
2479         if test $ol_with_ldbm_api = ndbm -a \
2480                 $ol_with_ldbm_type = btree ; then
2481                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2482         fi
2483 fi
2484
2485 if test $ol_enable_slurpd = yes ; then
2486                 if test $ol_with_threads = no ; then
2487                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2488         fi
2489 fi
2490
2491 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2492         if test $ol_with_kerberos = no ; then
2493                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2494         fi
2495 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2496         if test $ol_with_kerberos != auto ; then
2497                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2498         else
2499                 ol_with_kerberos=no
2500         fi
2501 fi
2502
2503 if test $ol_enable_spasswd = yes ; then
2504         if test $ol_with_cyrus_sasl = no ; then
2505                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2506         fi
2507         ol_link_spasswd=yes
2508 fi
2509
2510 echo "$ac_t""done" 1>&6
2511
2512 LDAP_LIBS=
2513 LDIF_LIBS=
2514 LDBM_LIBS=
2515 LTHREAD_LIBS=
2516 LUTIL_LIBS=
2517
2518 QUIPU_LIBS=
2519 SLAPD_LIBS=
2520 SLURPD_LIBS=
2521
2522 BUILD_SLAPD=no
2523 BUILD_SLURPD=no
2524
2525 BUILD_QUIPU=no
2526 BUILD_THREAD=no
2527
2528 BUILD_BDB2=no
2529 BUILD_DNSSRV=no
2530 BUILD_LDAP=no
2531 BUILD_LDBM=no
2532 BUILD_PASSWD=no
2533 BUILD_PERL=no
2534 BUILD_SHELL=no
2535 BUILD_SQL=no
2536 BUILD_TCL=no
2537
2538 BUILD_BDB2_DYNAMIC=static
2539 BUILD_DNSSRV_DYNAMIC=static
2540 BUILD_LDAP_DYNAMIC=static
2541 BUILD_LDBM_DYNAMIC=static
2542 BUILD_PASSWD_DYNAMIC=static
2543 BUILD_PERL_DYNAMIC=static
2544 BUILD_SHELL_DYNAMIC=static
2545 BUILD_TCL_DYNAMIC=static
2546 BUILD_SQL_DYNAMIC=static
2547
2548 SLAPD_MODULES_LDFLAGS=
2549 SLAPD_MODULES_CPPFLAGS=
2550 SLAPD_MODULES_LIST=
2551
2552 SLAPD_PERL_LDFLAGS=
2553 MOD_PERL_LDFLAGS=
2554 PERL_CPPFLAGS=
2555
2556 SLAPD_SQL_LDFLAGS=
2557 SLAPD_SQL_LIBS=
2558 SLAPD_SQL_INCLUDES=
2559
2560 MOD_TCL_LIB=
2561 KRB4_LIBS=
2562 KRB5_LIBS=
2563 READLINE_LIBS=
2564 SASL_LIBS=
2565 TERMCAP_LIBS=
2566 TLS_LIBS=
2567 MODULES_LIBS=
2568 AUTH_LIBS=
2569
2570
2571
2572 cat >> confdefs.h <<\EOF
2573 #define HAVE_MKVERSION 1
2574 EOF
2575
2576
2577
2578
2579 ol_aix_threads=no
2580 case "$target" in
2581 *-*-aix*)       if test -z "$CC" ; then
2582                 case "$ol_with_threads" in
2583                 auto | yes |  posix) ol_aix_threads=yes ;;
2584                 esac
2585         fi
2586 ;;
2587 esac
2588
2589 if test $ol_aix_threads = yes ; then
2590         if test -z "${CC}" ; then
2591                 for ac_prog in cc_r xlc_r cc
2592 do
2593 # Extract the first word of "$ac_prog", so it can be a program name with args.
2594 set dummy $ac_prog; ac_word=$2
2595 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2596 echo "configure:2597: checking for $ac_word" >&5
2597 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2598   echo $ac_n "(cached) $ac_c" 1>&6
2599 else
2600   if test -n "$CC"; then
2601   ac_cv_prog_CC="$CC" # Let the user override the test.
2602 else
2603   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2604   ac_dummy="$PATH"
2605   for ac_dir in $ac_dummy; do
2606     test -z "$ac_dir" && ac_dir=.
2607     if test -f $ac_dir/$ac_word; then
2608       ac_cv_prog_CC="$ac_prog"
2609       break
2610     fi
2611   done
2612   IFS="$ac_save_ifs"
2613 fi
2614 fi
2615 CC="$ac_cv_prog_CC"
2616 if test -n "$CC"; then
2617   echo "$ac_t""$CC" 1>&6
2618 else
2619   echo "$ac_t""no" 1>&6
2620 fi
2621
2622 test -n "$CC" && break
2623 done
2624
2625
2626                 if test "$CC" = cc ; then
2627                                                 if test $ol_with_threads != auto ; then
2628                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2629                         else
2630                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2631                         fi
2632                         ol_with_threads=no
2633                 fi
2634         fi
2635
2636         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2637                 ol_with_threads=posix
2638                 ol_cv_pthread_create=yes
2639         fi
2640 fi
2641
2642 if test -z "${CC}"; then
2643         for ac_prog in cc
2644 do
2645 # Extract the first word of "$ac_prog", so it can be a program name with args.
2646 set dummy $ac_prog; ac_word=$2
2647 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2648 echo "configure:2649: checking for $ac_word" >&5
2649 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2650   echo $ac_n "(cached) $ac_c" 1>&6
2651 else
2652   if test -n "$CC"; then
2653   ac_cv_prog_CC="$CC" # Let the user override the test.
2654 else
2655   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2656   ac_dummy="$PATH"
2657   for ac_dir in $ac_dummy; do
2658     test -z "$ac_dir" && ac_dir=.
2659     if test -f $ac_dir/$ac_word; then
2660       ac_cv_prog_CC="$ac_prog"
2661       break
2662     fi
2663   done
2664   IFS="$ac_save_ifs"
2665 fi
2666 fi
2667 CC="$ac_cv_prog_CC"
2668 if test -n "$CC"; then
2669   echo "$ac_t""$CC" 1>&6
2670 else
2671   echo "$ac_t""no" 1>&6
2672 fi
2673
2674 test -n "$CC" && break
2675 done
2676
2677 fi
2678
2679
2680
2681
2682 # Check whether --enable-fast-install or --disable-fast-install was given.
2683 if test "${enable_fast_install+set}" = set; then
2684   enableval="$enable_fast_install"
2685   p=${PACKAGE-default}
2686 case "$enableval" in
2687 yes) enable_fast_install=yes ;;
2688 no) enable_fast_install=no ;;
2689 *)
2690   enable_fast_install=no
2691   # Look at the argument we got.  We use all the common list separators.
2692   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2693   for pkg in $enableval; do
2694     if test "X$pkg" = "X$p"; then
2695       enable_fast_install=yes
2696     fi
2697   done
2698   IFS="$ac_save_ifs"
2699   ;;
2700 esac
2701 else
2702   enable_fast_install=yes
2703 fi
2704
2705 # Extract the first word of "ranlib", so it can be a program name with args.
2706 set dummy ranlib; ac_word=$2
2707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2708 echo "configure:2709: checking for $ac_word" >&5
2709 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2710   echo $ac_n "(cached) $ac_c" 1>&6
2711 else
2712   if test -n "$RANLIB"; then
2713   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2714 else
2715   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2716   ac_dummy="$PATH"
2717   for ac_dir in $ac_dummy; do
2718     test -z "$ac_dir" && ac_dir=.
2719     if test -f $ac_dir/$ac_word; then
2720       ac_cv_prog_RANLIB="ranlib"
2721       break
2722     fi
2723   done
2724   IFS="$ac_save_ifs"
2725   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2726 fi
2727 fi
2728 RANLIB="$ac_cv_prog_RANLIB"
2729 if test -n "$RANLIB"; then
2730   echo "$ac_t""$RANLIB" 1>&6
2731 else
2732   echo "$ac_t""no" 1>&6
2733 fi
2734
2735 # Extract the first word of "gcc", so it can be a program name with args.
2736 set dummy gcc; ac_word=$2
2737 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2738 echo "configure:2739: checking for $ac_word" >&5
2739 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2740   echo $ac_n "(cached) $ac_c" 1>&6
2741 else
2742   if test -n "$CC"; then
2743   ac_cv_prog_CC="$CC" # Let the user override the test.
2744 else
2745   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2746   ac_dummy="$PATH"
2747   for ac_dir in $ac_dummy; do
2748     test -z "$ac_dir" && ac_dir=.
2749     if test -f $ac_dir/$ac_word; then
2750       ac_cv_prog_CC="gcc"
2751       break
2752     fi
2753   done
2754   IFS="$ac_save_ifs"
2755 fi
2756 fi
2757 CC="$ac_cv_prog_CC"
2758 if test -n "$CC"; then
2759   echo "$ac_t""$CC" 1>&6
2760 else
2761   echo "$ac_t""no" 1>&6
2762 fi
2763
2764 if test -z "$CC"; then
2765   # Extract the first word of "cc", so it can be a program name with args.
2766 set dummy cc; ac_word=$2
2767 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2768 echo "configure:2769: checking for $ac_word" >&5
2769 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2770   echo $ac_n "(cached) $ac_c" 1>&6
2771 else
2772   if test -n "$CC"; then
2773   ac_cv_prog_CC="$CC" # Let the user override the test.
2774 else
2775   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2776   ac_prog_rejected=no
2777   ac_dummy="$PATH"
2778   for ac_dir in $ac_dummy; do
2779     test -z "$ac_dir" && ac_dir=.
2780     if test -f $ac_dir/$ac_word; then
2781       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2782         ac_prog_rejected=yes
2783         continue
2784       fi
2785       ac_cv_prog_CC="cc"
2786       break
2787     fi
2788   done
2789   IFS="$ac_save_ifs"
2790 if test $ac_prog_rejected = yes; then
2791   # We found a bogon in the path, so make sure we never use it.
2792   set dummy $ac_cv_prog_CC
2793   shift
2794   if test $# -gt 0; then
2795     # We chose a different compiler from the bogus one.
2796     # However, it has the same basename, so the bogon will be chosen
2797     # first if we set CC to just the basename; use the full file name.
2798     shift
2799     set dummy "$ac_dir/$ac_word" "$@"
2800     shift
2801     ac_cv_prog_CC="$@"
2802   fi
2803 fi
2804 fi
2805 fi
2806 CC="$ac_cv_prog_CC"
2807 if test -n "$CC"; then
2808   echo "$ac_t""$CC" 1>&6
2809 else
2810   echo "$ac_t""no" 1>&6
2811 fi
2812
2813   if test -z "$CC"; then
2814     case "`uname -s`" in
2815     *win32* | *WIN32* | *CYGWIN*)
2816       # Extract the first word of "cl", so it can be a program name with args.
2817 set dummy cl; ac_word=$2
2818 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2819 echo "configure:2820: checking for $ac_word" >&5
2820 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2821   echo $ac_n "(cached) $ac_c" 1>&6
2822 else
2823   if test -n "$CC"; then
2824   ac_cv_prog_CC="$CC" # Let the user override the test.
2825 else
2826   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2827   ac_dummy="$PATH"
2828   for ac_dir in $ac_dummy; do
2829     test -z "$ac_dir" && ac_dir=.
2830     if test -f $ac_dir/$ac_word; then
2831       ac_cv_prog_CC="cl"
2832       break
2833     fi
2834   done
2835   IFS="$ac_save_ifs"
2836 fi
2837 fi
2838 CC="$ac_cv_prog_CC"
2839 if test -n "$CC"; then
2840   echo "$ac_t""$CC" 1>&6
2841 else
2842   echo "$ac_t""no" 1>&6
2843 fi
2844  ;;
2845     esac
2846   fi
2847   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2848 fi
2849
2850 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2851 echo "configure:2852: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2852
2853 ac_ext=c
2854 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2855 ac_cpp='$CPP $CPPFLAGS'
2856 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2857 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2858 cross_compiling=$ac_cv_prog_cc_cross
2859
2860 cat > conftest.$ac_ext << EOF
2861
2862 #line 2863 "configure"
2863 #include "confdefs.h"
2864
2865 main(){return(0);}
2866 EOF
2867 if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2868   ac_cv_prog_cc_works=yes
2869   # If we can't run a trivial program, we are probably using a cross compiler.
2870   if (./conftest; exit) 2>/dev/null; then
2871     ac_cv_prog_cc_cross=no
2872   else
2873     ac_cv_prog_cc_cross=yes
2874   fi
2875 else
2876   echo "configure: failed program was:" >&5
2877   cat conftest.$ac_ext >&5
2878   ac_cv_prog_cc_works=no
2879 fi
2880 rm -fr conftest*
2881 ac_ext=c
2882 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2883 ac_cpp='$CPP $CPPFLAGS'
2884 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2885 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2886 cross_compiling=$ac_cv_prog_cc_cross
2887
2888 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2889 if test $ac_cv_prog_cc_works = no; then
2890   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2891 fi
2892 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2893 echo "configure:2894: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2894 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2895 cross_compiling=$ac_cv_prog_cc_cross
2896
2897 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2898 echo "configure:2899: checking whether we are using GNU C" >&5
2899 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2900   echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902   cat > conftest.c <<EOF
2903 #ifdef __GNUC__
2904   yes;
2905 #endif
2906 EOF
2907 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2908   ac_cv_prog_gcc=yes
2909 else
2910   ac_cv_prog_gcc=no
2911 fi
2912 fi
2913
2914 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2915
2916 if test $ac_cv_prog_gcc = yes; then
2917   GCC=yes
2918 else
2919   GCC=
2920 fi
2921
2922 ac_test_CFLAGS="${CFLAGS+set}"
2923 ac_save_CFLAGS="$CFLAGS"
2924 CFLAGS=
2925 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2926 echo "configure:2927: checking whether ${CC-cc} accepts -g" >&5
2927 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2928   echo $ac_n "(cached) $ac_c" 1>&6
2929 else
2930   echo 'void f(){}' > conftest.c
2931 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2932   ac_cv_prog_cc_g=yes
2933 else
2934   ac_cv_prog_cc_g=no
2935 fi
2936 rm -f conftest*
2937
2938 fi
2939
2940 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2941 if test "$ac_test_CFLAGS" = set; then
2942   CFLAGS="$ac_save_CFLAGS"
2943 elif test $ac_cv_prog_cc_g = yes; then
2944   if test "$GCC" = yes; then
2945     CFLAGS="-g -O2"
2946   else
2947     CFLAGS="-g"
2948   fi
2949 else
2950   if test "$GCC" = yes; then
2951     CFLAGS="-O2"
2952   else
2953     CFLAGS=
2954   fi
2955 fi
2956
2957 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2958 if test "${with_gnu_ld+set}" = set; then
2959   withval="$with_gnu_ld"
2960   test "$withval" = no || with_gnu_ld=yes
2961 else
2962   with_gnu_ld=no
2963 fi
2964
2965 ac_prog=ld
2966 if test "$ac_cv_prog_gcc" = yes; then
2967   # Check if gcc -print-prog-name=ld gives a path.
2968   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2969 echo "configure:2970: checking for ld used by GCC" >&5
2970   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2971   case "$ac_prog" in
2972     # Accept absolute paths.
2973     [\\/]* | [A-Za-z]:[\\/]*)
2974       re_direlt='/[^/][^/]*/\.\./'
2975       # Canonicalize the path of ld
2976       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2977       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2978         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2979       done
2980       test -z "$LD" && LD="$ac_prog"
2981       ;;
2982   "")
2983     # If it fails, then pretend we aren't using GCC.
2984     ac_prog=ld
2985     ;;
2986   *)
2987     # If it is relative, then search for the first ld in PATH.
2988     with_gnu_ld=unknown
2989     ;;
2990   esac
2991 elif test "$with_gnu_ld" = yes; then
2992   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2993 echo "configure:2994: checking for GNU ld" >&5
2994 else
2995   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2996 echo "configure:2997: checking for non-GNU ld" >&5
2997 fi
2998 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2999   echo $ac_n "(cached) $ac_c" 1>&6
3000 else
3001   if test -z "$LD"; then
3002   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3003   for ac_dir in $PATH; do
3004     test -z "$ac_dir" && ac_dir=.
3005     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3006       ac_cv_path_LD="$ac_dir/$ac_prog"
3007       # Check to see if the program is GNU ld.  I'd rather use --version,
3008       # but apparently some GNU ld's only accept -v.
3009       # Break only if it was the GNU/non-GNU ld that we prefer.
3010       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3011         test "$with_gnu_ld" != no && break
3012       else
3013         test "$with_gnu_ld" != yes && break
3014       fi
3015     fi
3016   done
3017   IFS="$ac_save_ifs"
3018 else
3019   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3020 fi
3021 fi
3022
3023 LD="$ac_cv_path_LD"
3024 if test -n "$LD"; then
3025   echo "$ac_t""$LD" 1>&6
3026 else
3027   echo "$ac_t""no" 1>&6
3028 fi
3029 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3030 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3031 echo "configure:3032: checking if the linker ($LD) is GNU ld" >&5
3032 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3033   echo $ac_n "(cached) $ac_c" 1>&6
3034 else
3035   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3036 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3037   ac_cv_prog_gnu_ld=yes
3038 else
3039   ac_cv_prog_gnu_ld=no
3040 fi
3041 fi
3042
3043 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3044
3045
3046 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3047 echo "configure:3048: checking for BSD-compatible nm" >&5
3048 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3049   echo $ac_n "(cached) $ac_c" 1>&6
3050 else
3051   if test -n "$NM"; then
3052   # Let the user override the test.
3053   ac_cv_path_NM="$NM"
3054 else
3055   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3056   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3057     test -z "$ac_dir" && ac_dir=.
3058     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3059       # Check to see if the nm accepts a BSD-compat flag.
3060       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3061       #   nm: unknown option "B" ignored
3062       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3063         ac_cv_path_NM="$ac_dir/nm -B"
3064         break
3065       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3066         ac_cv_path_NM="$ac_dir/nm -p"
3067         break
3068       else
3069         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3070         continue # so that we can try to find one that supports BSD flags
3071       fi
3072     fi
3073   done
3074   IFS="$ac_save_ifs"
3075   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3076 fi
3077 fi
3078
3079 NM="$ac_cv_path_NM"
3080 echo "$ac_t""$NM" 1>&6
3081
3082 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3083 echo "configure:3084: checking whether ln -s works" >&5
3084 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3085   echo $ac_n "(cached) $ac_c" 1>&6
3086 else
3087   rm -f conftestdata
3088 if ln -s X conftestdata 2>/dev/null
3089 then
3090   rm -f conftestdata
3091   ac_cv_prog_LN_S="ln -s"
3092 else
3093   ac_cv_prog_LN_S=ln
3094 fi
3095 fi
3096 LN_S="$ac_cv_prog_LN_S"
3097 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3098   echo "$ac_t""yes" 1>&6
3099 else
3100   echo "$ac_t""no" 1>&6
3101 fi
3102
3103 if test $host != $build; then
3104   ac_tool_prefix=${host_alias}-
3105 else
3106   ac_tool_prefix=
3107 fi
3108
3109
3110 case "$target" in
3111 NONE) lt_target="$host" ;;
3112 *) lt_target="$target" ;;
3113 esac
3114
3115 # Check for any special flags to pass to ltconfig.
3116 libtool_flags="--cache-file=$cache_file"
3117 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3118 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3119 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3120 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3121 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3122 libtool_flags="$libtool_flags --enable-dlopen"
3123 libtool_flags="$libtool_flags --enable-win32-dll"
3124 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3125 if test "${enable_libtool_lock+set}" = set; then
3126   enableval="$enable_libtool_lock"
3127   :
3128 fi
3129
3130 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3131 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3132
3133 # Some flags need to be propagated to the compiler or linker for good
3134 # libtool support.
3135 case "$lt_target" in
3136 *-*-irix6*)
3137   # Find out which ABI we are using.
3138   echo '#line 3139 "configure"' > conftest.$ac_ext
3139   if { (eval echo configure:3140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3140     case "`/usr/bin/file conftest.o`" in
3141     *32-bit*)
3142       LD="${LD-ld} -32"
3143       ;;
3144     *N32*)
3145       LD="${LD-ld} -n32"
3146       ;;
3147     *64-bit*)
3148       LD="${LD-ld} -64"
3149       ;;
3150     esac
3151   fi
3152   rm -rf conftest*
3153   ;;
3154
3155 *-*-sco3.2v5*)
3156   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3157   SAVE_CFLAGS="$CFLAGS"
3158   CFLAGS="$CFLAGS -belf"
3159   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3160 echo "configure:3161: checking whether the C compiler needs -belf" >&5
3161 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3162   echo $ac_n "(cached) $ac_c" 1>&6
3163 else
3164   cat > conftest.$ac_ext <<EOF
3165 #line 3166 "configure"
3166 #include "confdefs.h"
3167
3168 int main() {
3169
3170 ; return 0; }
3171 EOF
3172 if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3173   rm -rf conftest*
3174   lt_cv_cc_needs_belf=yes
3175 else
3176   echo "configure: failed program was:" >&5
3177   cat conftest.$ac_ext >&5
3178   rm -rf conftest*
3179   lt_cv_cc_needs_belf=no
3180 fi
3181 rm -f conftest*
3182 fi
3183
3184 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3185   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3186     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3187     CFLAGS="$SAVE_CFLAGS"
3188   fi
3189   ;;
3190
3191 *-*-cygwin* | *-*-mingw*)
3192   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3193 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3194 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3195 echo "configure:3196: checking for $ac_word" >&5
3196 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3197   echo $ac_n "(cached) $ac_c" 1>&6
3198 else
3199   if test -n "$DLLTOOL"; then
3200   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3201 else
3202   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3203   ac_dummy="$PATH"
3204   for ac_dir in $ac_dummy; do
3205     test -z "$ac_dir" && ac_dir=.
3206     if test -f $ac_dir/$ac_word; then
3207       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3208       break
3209     fi
3210   done
3211   IFS="$ac_save_ifs"
3212 fi
3213 fi
3214 DLLTOOL="$ac_cv_prog_DLLTOOL"
3215 if test -n "$DLLTOOL"; then
3216   echo "$ac_t""$DLLTOOL" 1>&6
3217 else
3218   echo "$ac_t""no" 1>&6
3219 fi
3220
3221
3222 if test -z "$ac_cv_prog_DLLTOOL"; then
3223 if test -n "$ac_tool_prefix"; then
3224   # Extract the first word of "dlltool", so it can be a program name with args.
3225 set dummy dlltool; ac_word=$2
3226 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3227 echo "configure:3228: checking for $ac_word" >&5
3228 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3229   echo $ac_n "(cached) $ac_c" 1>&6
3230 else
3231   if test -n "$DLLTOOL"; then
3232   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3233 else
3234   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3235   ac_dummy="$PATH"
3236   for ac_dir in $ac_dummy; do
3237     test -z "$ac_dir" && ac_dir=.
3238     if test -f $ac_dir/$ac_word; then
3239       ac_cv_prog_DLLTOOL="dlltool"
3240       break
3241     fi
3242   done
3243   IFS="$ac_save_ifs"
3244   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3245 fi
3246 fi
3247 DLLTOOL="$ac_cv_prog_DLLTOOL"
3248 if test -n "$DLLTOOL"; then
3249   echo "$ac_t""$DLLTOOL" 1>&6
3250 else
3251   echo "$ac_t""no" 1>&6
3252 fi
3253
3254 else
3255   DLLTOOL="false"
3256 fi
3257 fi
3258
3259   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3260 set dummy ${ac_tool_prefix}as; ac_word=$2
3261 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3262 echo "configure:3263: checking for $ac_word" >&5
3263 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3264   echo $ac_n "(cached) $ac_c" 1>&6
3265 else
3266   if test -n "$AS"; then
3267   ac_cv_prog_AS="$AS" # Let the user override the test.
3268 else
3269   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3270   ac_dummy="$PATH"
3271   for ac_dir in $ac_dummy; do
3272     test -z "$ac_dir" && ac_dir=.
3273     if test -f $ac_dir/$ac_word; then
3274       ac_cv_prog_AS="${ac_tool_prefix}as"
3275       break
3276     fi
3277   done
3278   IFS="$ac_save_ifs"
3279 fi
3280 fi
3281 AS="$ac_cv_prog_AS"
3282 if test -n "$AS"; then
3283   echo "$ac_t""$AS" 1>&6
3284 else
3285   echo "$ac_t""no" 1>&6
3286 fi
3287
3288
3289 if test -z "$ac_cv_prog_AS"; then
3290 if test -n "$ac_tool_prefix"; then
3291   # Extract the first word of "as", so it can be a program name with args.
3292 set dummy as; ac_word=$2
3293 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3294 echo "configure:3295: checking for $ac_word" >&5
3295 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3296   echo $ac_n "(cached) $ac_c" 1>&6
3297 else
3298   if test -n "$AS"; then
3299   ac_cv_prog_AS="$AS" # Let the user override the test.
3300 else
3301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3302   ac_dummy="$PATH"
3303   for ac_dir in $ac_dummy; do
3304     test -z "$ac_dir" && ac_dir=.
3305     if test -f $ac_dir/$ac_word; then
3306       ac_cv_prog_AS="as"
3307       break
3308     fi
3309   done
3310   IFS="$ac_save_ifs"
3311   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3312 fi
3313 fi
3314 AS="$ac_cv_prog_AS"
3315 if test -n "$AS"; then
3316   echo "$ac_t""$AS" 1>&6
3317 else
3318   echo "$ac_t""no" 1>&6
3319 fi
3320
3321 else
3322   AS="false"
3323 fi
3324 fi
3325
3326   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3327 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3328 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3329 echo "configure:3330: checking for $ac_word" >&5
3330 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3331   echo $ac_n "(cached) $ac_c" 1>&6
3332 else
3333   if test -n "$OBJDUMP"; then
3334   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3335 else
3336   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3337   ac_dummy="$PATH"
3338   for ac_dir in $ac_dummy; do
3339     test -z "$ac_dir" && ac_dir=.
3340     if test -f $ac_dir/$ac_word; then
3341       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3342       break
3343     fi
3344   done
3345   IFS="$ac_save_ifs"
3346 fi
3347 fi
3348 OBJDUMP="$ac_cv_prog_OBJDUMP"
3349 if test -n "$OBJDUMP"; then
3350   echo "$ac_t""$OBJDUMP" 1>&6
3351 else
3352   echo "$ac_t""no" 1>&6
3353 fi
3354
3355
3356 if test -z "$ac_cv_prog_OBJDUMP"; then
3357 if test -n "$ac_tool_prefix"; then
3358   # Extract the first word of "objdump", so it can be a program name with args.
3359 set dummy objdump; ac_word=$2
3360 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3361 echo "configure:3362: checking for $ac_word" >&5
3362 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3363   echo $ac_n "(cached) $ac_c" 1>&6
3364 else
3365   if test -n "$OBJDUMP"; then
3366   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3367 else
3368   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3369   ac_dummy="$PATH"
3370   for ac_dir in $ac_dummy; do
3371     test -z "$ac_dir" && ac_dir=.
3372     if test -f $ac_dir/$ac_word; then
3373       ac_cv_prog_OBJDUMP="objdump"
3374       break
3375     fi
3376   done
3377   IFS="$ac_save_ifs"
3378   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3379 fi
3380 fi
3381 OBJDUMP="$ac_cv_prog_OBJDUMP"
3382 if test -n "$OBJDUMP"; then
3383   echo "$ac_t""$OBJDUMP" 1>&6
3384 else
3385   echo "$ac_t""no" 1>&6
3386 fi
3387
3388 else
3389   OBJDUMP="false"
3390 fi
3391 fi
3392
3393   ;;
3394
3395 esac
3396
3397
3398 # Save cache, so that ltconfig can load it
3399
3400
3401 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3402 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3403 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3404 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3405 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3406 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3407 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3408 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3409
3410 # Reload cache, that may have been modified by ltconfig
3411
3412
3413 # This can be used to rebuild libtool when needed
3414 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3415
3416 # Always use our own libtool.
3417 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3418
3419 # Redirect the config.log output again, so that the ltconfig log is not
3420 # clobbered by the next message.
3421 exec 5>>./config.log
3422
3423
3424 for ac_prog in mawk gawk nawk awk
3425 do
3426 # Extract the first word of "$ac_prog", so it can be a program name with args.
3427 set dummy $ac_prog; ac_word=$2
3428 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3429 echo "configure:3430: checking for $ac_word" >&5
3430 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3431   echo $ac_n "(cached) $ac_c" 1>&6
3432 else
3433   if test -n "$AWK"; then
3434   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3435 else
3436   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3437   ac_dummy="$PATH"
3438   for ac_dir in $ac_dummy; do
3439     test -z "$ac_dir" && ac_dir=.
3440     if test -f $ac_dir/$ac_word; then
3441       ac_cv_prog_AWK="$ac_prog"
3442       break
3443     fi
3444   done
3445   IFS="$ac_save_ifs"
3446 fi
3447 fi
3448 AWK="$ac_cv_prog_AWK"
3449 if test -n "$AWK"; then
3450   echo "$ac_t""$AWK" 1>&6
3451 else
3452   echo "$ac_t""no" 1>&6
3453 fi
3454
3455 test -n "$AWK" && break
3456 done
3457
3458 # test for ln hardlink support
3459 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3460 echo "configure:3461: checking whether ln works" >&5
3461 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3462   echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464   rm -f conftest.src conftest.dst
3465 echo "conftest" > conftest.src
3466 if ln conftest.src conftest.dst 2>/dev/null
3467 then
3468   ol_cv_prog_LN_H="ln"
3469 else
3470   ol_cv_prog_LN_H="cp"
3471 fi
3472 rm -f conftest.src conftest.dst
3473
3474 fi
3475 LN_H="$ol_cv_prog_LN_H"
3476 if test "$ol_cv_prog_LN_H" = "ln"; then
3477         echo "$ac_t""yes" 1>&6
3478 else
3479         echo "$ac_t""no" 1>&6
3480 fi
3481
3482 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3483 echo "configure:3484: checking whether ln -s works" >&5
3484 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3485   echo $ac_n "(cached) $ac_c" 1>&6
3486 else
3487   rm -f conftestdata
3488 if ln -s X conftestdata 2>/dev/null
3489 then
3490   rm -f conftestdata
3491   ac_cv_prog_LN_S="ln -s"
3492 else
3493   ac_cv_prog_LN_S=ln
3494 fi
3495 fi
3496 LN_S="$ac_cv_prog_LN_S"
3497 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3498   echo "$ac_t""yes" 1>&6
3499 else
3500   echo "$ac_t""no" 1>&6
3501 fi
3502
3503
3504 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3505         LN_S="$LN_H"
3506 fi
3507
3508 # Extract the first word of "sendmail", so it can be a program name with args.
3509 set dummy sendmail; ac_word=$2
3510 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3511 echo "configure:3512: checking for $ac_word" >&5
3512 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515   case "$SENDMAIL" in
3516   /*)
3517   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3518   ;;
3519   ?:/*)
3520   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3521   ;;
3522   *)
3523   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3524   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3525   for ac_dir in $ac_dummy; do 
3526     test -z "$ac_dir" && ac_dir=.
3527     if test -f $ac_dir/$ac_word; then
3528       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3529       break
3530     fi
3531   done
3532   IFS="$ac_save_ifs"
3533   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3534   ;;
3535 esac
3536 fi
3537 SENDMAIL="$ac_cv_path_SENDMAIL"
3538 if test -n "$SENDMAIL"; then
3539   echo "$ac_t""$SENDMAIL" 1>&6
3540 else
3541   echo "$ac_t""no" 1>&6
3542 fi
3543
3544 # Extract the first word of "vi", so it can be a program name with args.
3545 set dummy vi; ac_word=$2
3546 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3547 echo "configure:3548: checking for $ac_word" >&5
3548 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3549   echo $ac_n "(cached) $ac_c" 1>&6
3550 else
3551   case "$EDITOR" in
3552   /*)
3553   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3554   ;;
3555   ?:/*)
3556   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3557   ;;
3558   *)
3559   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3560   ac_dummy="$PATH:/usr/ucb"
3561   for ac_dir in $ac_dummy; do 
3562     test -z "$ac_dir" && ac_dir=.
3563     if test -f $ac_dir/$ac_word; then
3564       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3565       break
3566     fi
3567   done
3568   IFS="$ac_save_ifs"
3569   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3570   ;;
3571 esac
3572 fi
3573 EDITOR="$ac_cv_path_EDITOR"
3574 if test -n "$EDITOR"; then
3575   echo "$ac_t""$EDITOR" 1>&6
3576 else
3577   echo "$ac_t""no" 1>&6
3578 fi
3579
3580 # Extract the first word of "finger", so it can be a program name with args.
3581 set dummy finger; ac_word=$2
3582 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3583 echo "configure:3584: checking for $ac_word" >&5
3584 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3585   echo $ac_n "(cached) $ac_c" 1>&6
3586 else
3587   case "$FINGER" in
3588   /*)
3589   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3590   ;;
3591   ?:/*)
3592   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3593   ;;
3594   *)
3595   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3596   ac_dummy="$PATH:/usr/ucb"
3597   for ac_dir in $ac_dummy; do 
3598     test -z "$ac_dir" && ac_dir=.
3599     if test -f $ac_dir/$ac_word; then
3600       ac_cv_path_FINGER="$ac_dir/$ac_word"
3601       break
3602     fi
3603   done
3604   IFS="$ac_save_ifs"
3605   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3606   ;;
3607 esac
3608 fi
3609 FINGER="$ac_cv_path_FINGER"
3610 if test -n "$FINGER"; then
3611   echo "$ac_t""$FINGER" 1>&6
3612 else
3613   echo "$ac_t""no" 1>&6
3614 fi
3615
3616
3617 ol_link_perl=no
3618 if test $ol_enable_perl != no ; then
3619         # Extract the first word of "perl", so it can be a program name with args.
3620 set dummy perl; ac_word=$2
3621 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3622 echo "configure:3623: checking for $ac_word" >&5
3623 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3624   echo $ac_n "(cached) $ac_c" 1>&6
3625 else
3626   case "$PERLBIN" in
3627   /*)
3628   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3629   ;;
3630   ?:/*)
3631   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3632   ;;
3633   *)
3634   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3635   ac_dummy="$PATH"
3636   for ac_dir in $ac_dummy; do 
3637     test -z "$ac_dir" && ac_dir=.
3638     if test -f $ac_dir/$ac_word; then
3639       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3640       break
3641     fi
3642   done
3643   IFS="$ac_save_ifs"
3644   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3645   ;;
3646 esac
3647 fi
3648 PERLBIN="$ac_cv_path_PERLBIN"
3649 if test -n "$PERLBIN"; then
3650   echo "$ac_t""$PERLBIN" 1>&6
3651 else
3652   echo "$ac_t""no" 1>&6
3653 fi
3654
3655
3656         if test "no$PERLBIN" = "no" ; then
3657                 if test $ol_enable_perl = yes ; then
3658                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3659                 fi
3660
3661         else
3662                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3663                 if test x"$ol_with_perl_module" = "xstatic" ; then
3664                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3665                 else
3666                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3667                 fi
3668                                 ol_link_perl=yes
3669         fi
3670 fi
3671
3672 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3673 echo "configure:3674: checking how to run the C preprocessor" >&5
3674 # On Suns, sometimes $CPP names a directory.
3675 if test -n "$CPP" && test -d "$CPP"; then
3676   CPP=
3677 fi
3678 if test -z "$CPP"; then
3679 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3680   echo $ac_n "(cached) $ac_c" 1>&6
3681 else
3682     # This must be in double quotes, not single quotes, because CPP may get
3683   # substituted into the Makefile and "${CC-cc}" will confuse make.
3684   CPP="${CC-cc} -E"
3685   # On the NeXT, cc -E runs the code through the compiler's parser,
3686   # not just through cpp.
3687   cat > conftest.$ac_ext <<EOF
3688 #line 3689 "configure"
3689 #include "confdefs.h"
3690 #include <assert.h>
3691 Syntax Error
3692 EOF
3693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3694 { (eval echo configure:3695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3696 if test -z "$ac_err"; then
3697   :
3698 else
3699   echo "$ac_err" >&5
3700   echo "configure: failed program was:" >&5
3701   cat conftest.$ac_ext >&5
3702   rm -rf conftest*
3703   CPP="${CC-cc} -E -traditional-cpp"
3704   cat > conftest.$ac_ext <<EOF
3705 #line 3706 "configure"
3706 #include "confdefs.h"
3707 #include <assert.h>
3708 Syntax Error
3709 EOF
3710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3711 { (eval echo configure:3712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3713 if test -z "$ac_err"; then
3714   :
3715 else
3716   echo "$ac_err" >&5
3717   echo "configure: failed program was:" >&5
3718   cat conftest.$ac_ext >&5
3719   rm -rf conftest*
3720   CPP="${CC-cc} -nologo -E"
3721   cat > conftest.$ac_ext <<EOF
3722 #line 3723 "configure"
3723 #include "confdefs.h"
3724 #include <assert.h>
3725 Syntax Error
3726 EOF
3727 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3728 { (eval echo configure:3729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3729 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3730 if test -z "$ac_err"; then
3731   :
3732 else
3733   echo "$ac_err" >&5
3734   echo "configure: failed program was:" >&5
3735   cat conftest.$ac_ext >&5
3736   rm -rf conftest*
3737   CPP=/lib/cpp
3738 fi
3739 rm -f conftest*
3740 fi
3741 rm -f conftest*
3742 fi
3743 rm -f conftest*
3744   ac_cv_prog_CPP="$CPP"
3745 fi
3746   CPP="$ac_cv_prog_CPP"
3747 else
3748   ac_cv_prog_CPP="$CPP"
3749 fi
3750 echo "$ac_t""$CPP" 1>&6
3751
3752
3753 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3754         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3755
3756 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3757         echo "configure: warning: programs compiled here do run here..." 1>&2
3758         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3759
3760 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3761         echo "configure: warning: programs compiled here do not run here..." 1>&2
3762         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3763 fi
3764
3765 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3766 echo "configure:3767: checking for AIX" >&5
3767 cat > conftest.$ac_ext <<EOF
3768 #line 3769 "configure"
3769 #include "confdefs.h"
3770 #ifdef _AIX
3771   yes
3772 #endif
3773
3774 EOF
3775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3776   egrep "yes" >/dev/null 2>&1; then
3777   rm -rf conftest*
3778   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3779 #define _ALL_SOURCE 1
3780 EOF
3781
3782 else
3783   rm -rf conftest*
3784   echo "$ac_t""no" 1>&6
3785 fi
3786 rm -f conftest*
3787
3788
3789 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3790 echo "configure:3791: checking for POSIXized ISC" >&5
3791 if test -d /etc/conf/kconfig.d &&
3792   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3793 then
3794   echo "$ac_t""yes" 1>&6
3795   ISC=yes # If later tests want to check for ISC.
3796   cat >> confdefs.h <<\EOF
3797 #define _POSIX_SOURCE 1
3798 EOF
3799
3800   if test "$GCC" = yes; then
3801     CC="$CC -posix"
3802   else
3803     CC="$CC -Xp"
3804   fi
3805 else
3806   echo "$ac_t""no" 1>&6
3807   ISC=
3808 fi
3809
3810 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3811 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3812 echo "configure:3813: checking for minix/config.h" >&5
3813 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3814   echo $ac_n "(cached) $ac_c" 1>&6
3815 else
3816   cat > conftest.$ac_ext <<EOF
3817 #line 3818 "configure"
3818 #include "confdefs.h"
3819 #include <minix/config.h>
3820 EOF
3821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3822 { (eval echo configure:3823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3824 if test -z "$ac_err"; then
3825   rm -rf conftest*
3826   eval "ac_cv_header_$ac_safe=yes"
3827 else
3828   echo "$ac_err" >&5
3829   echo "configure: failed program was:" >&5
3830   cat conftest.$ac_ext >&5
3831   rm -rf conftest*
3832   eval "ac_cv_header_$ac_safe=no"
3833 fi
3834 rm -f conftest*
3835 fi
3836 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3837   echo "$ac_t""yes" 1>&6
3838   MINIX=yes
3839 else
3840   echo "$ac_t""no" 1>&6
3841 MINIX=
3842 fi
3843
3844 if test "$MINIX" = yes; then
3845   cat >> confdefs.h <<\EOF
3846 #define _POSIX_SOURCE 1
3847 EOF
3848
3849   cat >> confdefs.h <<\EOF
3850 #define _POSIX_1_SOURCE 2
3851 EOF
3852
3853   cat >> confdefs.h <<\EOF
3854 #define _MINIX 1
3855 EOF
3856
3857 fi
3858
3859
3860 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3861 echo "configure:3862: checking for Cygwin environment" >&5
3862 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3863   echo $ac_n "(cached) $ac_c" 1>&6
3864 else
3865   cat > conftest.$ac_ext <<EOF
3866 #line 3867 "configure"
3867 #include "confdefs.h"
3868
3869 int main() {
3870
3871 #ifndef __CYGWIN__
3872 #define __CYGWIN__ __CYGWIN32__
3873 #endif
3874 return __CYGWIN__;
3875 ; return 0; }
3876 EOF
3877 if { (eval echo configure:3878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3878   rm -rf conftest*
3879   ac_cv_cygwin=yes
3880 else
3881   echo "configure: failed program was:" >&5
3882   cat conftest.$ac_ext >&5
3883   rm -rf conftest*
3884   ac_cv_cygwin=no
3885 fi
3886 rm -f conftest*
3887 fi
3888
3889 echo "$ac_t""$ac_cv_cygwin" 1>&6
3890 CYGWIN=
3891 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3892 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3893 echo "configure:3894: checking for mingw32 environment" >&5
3894 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3895   echo $ac_n "(cached) $ac_c" 1>&6
3896 else
3897   cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3900
3901 int main() {
3902 return __MINGW32__;
3903 ; return 0; }
3904 EOF
3905 if { (eval echo configure:3906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3906   rm -rf conftest*
3907   ac_cv_mingw32=yes
3908 else
3909   echo "configure: failed program was:" >&5
3910   cat conftest.$ac_ext >&5
3911   rm -rf conftest*
3912   ac_cv_mingw32=no
3913 fi
3914 rm -f conftest*
3915 fi
3916
3917 echo "$ac_t""$ac_cv_mingw32" 1>&6
3918 MINGW32=
3919 test "$ac_cv_mingw32" = yes && MINGW32=yes
3920 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3921 echo "configure:3922: checking for EMX OS/2 environment" >&5
3922 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3923   echo $ac_n "(cached) $ac_c" 1>&6
3924 else
3925   cat > conftest.$ac_ext <<EOF
3926 #line 3927 "configure"
3927 #include "confdefs.h"
3928
3929 int main() {
3930 return __EMX__;
3931 ; return 0; }
3932 EOF
3933 if { (eval echo configure:3934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3934   rm -rf conftest*
3935   ac_cv_emxos2=yes
3936 else
3937   echo "configure: failed program was:" >&5
3938   cat conftest.$ac_ext >&5
3939   rm -rf conftest*
3940   ac_cv_emxos2=no
3941 fi
3942 rm -f conftest*
3943 fi
3944
3945 echo "$ac_t""$ac_cv_emxos2" 1>&6
3946 EMXOS2=
3947 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3948
3949
3950
3951 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3952 echo "configure:3953: checking for executable suffix" >&5
3953 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3954   echo $ac_n "(cached) $ac_c" 1>&6
3955 else
3956   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3957   ac_cv_exeext=.exe
3958 else
3959   rm -f conftest*
3960   echo 'int main () { return 0; }' > conftest.$ac_ext
3961   ac_cv_exeext=
3962   if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3963     for file in conftest.*; do
3964       case $file in
3965       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3966       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3967       esac
3968     done
3969   else
3970     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3971   fi
3972   rm -f conftest*
3973   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3974 fi
3975 fi
3976
3977 EXEEXT=""
3978 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3979 echo "$ac_t""${ac_cv_exeext}" 1>&6
3980 ac_exeext=$EXEEXT
3981
3982 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3983 echo "configure:3984: checking for object suffix" >&5
3984 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3985   echo $ac_n "(cached) $ac_c" 1>&6
3986 else
3987   rm -f conftest*
3988 echo 'int i = 1;' > conftest.$ac_ext
3989 if { (eval echo configure:3990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3990   for ac_file in conftest.*; do
3991     case $ac_file in
3992     *.c) ;;
3993     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3994     esac
3995   done
3996 else
3997   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3998 fi
3999 rm -f conftest*
4000 fi
4001
4002 echo "$ac_t""$ac_cv_objext" 1>&6
4003 OBJEXT=$ac_cv_objext
4004 ac_objext=$ac_cv_objext
4005
4006
4007 cat >> confdefs.h <<EOF
4008 #define EXEEXT "${EXEEXT}"
4009 EOF
4010
4011
4012 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4013 echo "configure:4014: checking for be_app in -lbe" >&5
4014 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4015 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4016   echo $ac_n "(cached) $ac_c" 1>&6
4017 else
4018   ac_save_LIBS="$LIBS"
4019 LIBS="-lbe -lroot -lnet $LIBS"
4020 cat > conftest.$ac_ext <<EOF
4021 #line 4022 "configure"
4022 #include "confdefs.h"
4023 /* Override any gcc2 internal prototype to avoid an error.  */
4024 /* We use char because int might match the return type of a gcc2
4025     builtin and then its argument prototype would still apply.  */
4026 char be_app();
4027
4028 int main() {
4029 be_app()
4030 ; return 0; }
4031 EOF
4032 if { (eval echo configure:4033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4033   rm -rf conftest*
4034   eval "ac_cv_lib_$ac_lib_var=yes"
4035 else
4036   echo "configure: failed program was:" >&5
4037   cat conftest.$ac_ext >&5
4038   rm -rf conftest*
4039   eval "ac_cv_lib_$ac_lib_var=no"
4040 fi
4041 rm -f conftest*
4042 LIBS="$ac_save_LIBS"
4043
4044 fi
4045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4046   echo "$ac_t""yes" 1>&6
4047   LIBS="$LIBS -lbe -lroot -lnet"
4048 else
4049   echo "$ac_t""no" 1>&6
4050 :
4051 fi
4052
4053
4054
4055
4056
4057 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4058 echo "configure:4059: checking for ${CC-cc} option to accept ANSI C" >&5
4059 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4060   echo $ac_n "(cached) $ac_c" 1>&6
4061 else
4062   am_cv_prog_cc_stdc=no
4063 ac_save_CC="$CC"
4064 # Don't try gcc -ansi; that turns off useful extensions and
4065 # breaks some systems' header files.
4066 # AIX                   -qlanglvl=ansi
4067 # Ultrix and OSF/1      -std1
4068 # HP-UX 10.20 and later -Ae
4069 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4070 # SVR4                  -Xc -D__EXTENSIONS__
4071 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4072 do
4073   CC="$ac_save_CC $ac_arg"
4074   cat > conftest.$ac_ext <<EOF
4075 #line 4076 "configure"
4076 #include "confdefs.h"
4077 #include <stdarg.h>
4078 #include <stdio.h>
4079 #include <sys/types.h>
4080 #include <sys/stat.h>
4081 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4082 struct buf { int x; };
4083 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4084 static char *e (p, i)
4085      char **p;
4086      int i;
4087 {
4088   return p[i];
4089 }
4090 static char *f (char * (*g) (char **, int), char **p, ...)
4091 {
4092   char *s;
4093   va_list v;
4094   va_start (v,p);
4095   s = g (p, va_arg (v,int));
4096   va_end (v);
4097   return s;
4098 }
4099 int test (int i, double x);
4100 struct s1 {int (*f) (int a);};
4101 struct s2 {int (*f) (double a);};
4102 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4103 int argc;
4104 char **argv;
4105
4106 int main() {
4107
4108 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4109
4110 ; return 0; }
4111 EOF
4112 if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4113   rm -rf conftest*
4114   am_cv_prog_cc_stdc="$ac_arg"; break
4115 else
4116   echo "configure: failed program was:" >&5
4117   cat conftest.$ac_ext >&5
4118 fi
4119 rm -f conftest*
4120 done
4121 CC="$ac_save_CC"
4122
4123 fi
4124
4125 if test -z "$am_cv_prog_cc_stdc"; then
4126   echo "$ac_t""none needed" 1>&6
4127 else
4128   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4129 fi
4130 case "x$am_cv_prog_cc_stdc" in
4131   x|xno) ;;
4132   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4133 esac
4134
4135 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4136         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4137 fi
4138
4139 # test for make depend flag
4140 OL_MKDEP=
4141 OL_MKDEP_FLAGS=
4142 if test -z "${MKDEP}"; then
4143         OL_MKDEP="${CC-cc}"
4144         if test -z "${MKDEP_FLAGS}"; then
4145                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4146 echo "configure:4147: checking for ${OL_MKDEP} depend flag" >&5
4147 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4148   echo $ac_n "(cached) $ac_c" 1>&6
4149 else
4150   
4151                         ol_cv_mkdep=no
4152                         for flag in "-M" "-xM"; do
4153                                 cat > conftest.c <<EOF
4154  noCode;
4155 EOF
4156                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4157                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4158                                 then
4159                                         if test ! -f conftest."${ac_object}" ; then
4160                                                 ol_cv_mkdep=$flag
4161                                                 OL_MKDEP_FLAGS="$flag"
4162                                                 break
4163                                         fi
4164                                 fi
4165                         done
4166                         rm -f conftest*
4167                 
4168 fi
4169
4170 echo "$ac_t""$ol_cv_mkdep" 1>&6
4171         else
4172                 cc_cv_mkdep=yes
4173                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4174         fi
4175 else
4176         cc_cv_mkdep=yes
4177         OL_MKDEP="${MKDEP}"
4178         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4179 fi
4180
4181
4182
4183 if test "${ol_cv_mkdep}" = no ; then
4184         # this will soon become an error
4185         echo "configure: warning: do not know how to generate dependencies" 1>&2
4186 fi
4187
4188 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4189 echo "configure:4190: checking for afopen in -ls" >&5
4190 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4191 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   ac_save_LIBS="$LIBS"
4195 LIBS="-ls  $LIBS"
4196 cat > conftest.$ac_ext <<EOF
4197 #line 4198 "configure"
4198 #include "confdefs.h"
4199 /* Override any gcc2 internal prototype to avoid an error.  */
4200 /* We use char because int might match the return type of a gcc2
4201     builtin and then its argument prototype would still apply.  */
4202 char afopen();
4203
4204 int main() {
4205 afopen()
4206 ; return 0; }
4207 EOF
4208 if { (eval echo configure:4209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4209   rm -rf conftest*
4210   eval "ac_cv_lib_$ac_lib_var=yes"
4211 else
4212   echo "configure: failed program was:" >&5
4213   cat conftest.$ac_ext >&5
4214   rm -rf conftest*
4215   eval "ac_cv_lib_$ac_lib_var=no"
4216 fi
4217 rm -f conftest*
4218 LIBS="$ac_save_LIBS"
4219
4220 fi
4221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4222   echo "$ac_t""yes" 1>&6
4223   
4224         AUTH_LIBS=-ls
4225         cat >> confdefs.h <<\EOF
4226 #define HAVE_AIX_SECURITY 1
4227 EOF
4228
4229
4230 else
4231   echo "$ac_t""no" 1>&6
4232 fi
4233
4234
4235 ol_link_modules=no
4236 if test $ol_enable_modules != no ; then
4237         for ac_hdr in ltdl.h
4238 do
4239 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4240 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4241 echo "configure:4242: checking for $ac_hdr" >&5
4242 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4243   echo $ac_n "(cached) $ac_c" 1>&6
4244 else
4245   cat > conftest.$ac_ext <<EOF
4246 #line 4247 "configure"
4247 #include "confdefs.h"
4248 #include <$ac_hdr>
4249 EOF
4250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4251 { (eval echo configure:4252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4253 if test -z "$ac_err"; then
4254   rm -rf conftest*
4255   eval "ac_cv_header_$ac_safe=yes"
4256 else
4257   echo "$ac_err" >&5
4258   echo "configure: failed program was:" >&5
4259   cat conftest.$ac_ext >&5
4260   rm -rf conftest*
4261   eval "ac_cv_header_$ac_safe=no"
4262 fi
4263 rm -f conftest*
4264 fi
4265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4266   echo "$ac_t""yes" 1>&6
4267     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4268   cat >> confdefs.h <<EOF
4269 #define $ac_tr_hdr 1
4270 EOF
4271  
4272 else
4273   echo "$ac_t""no" 1>&6
4274 fi
4275 done
4276
4277
4278         if test $ac_cv_header_ltdl_h = no ; then
4279                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4280         fi
4281
4282         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4283 echo "configure:4284: checking for lt_dlinit in -lltdl" >&5
4284 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4285 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4286   echo $ac_n "(cached) $ac_c" 1>&6
4287 else
4288   ac_save_LIBS="$LIBS"
4289 LIBS="-lltdl  $LIBS"
4290 cat > conftest.$ac_ext <<EOF
4291 #line 4292 "configure"
4292 #include "confdefs.h"
4293 /* Override any gcc2 internal prototype to avoid an error.  */
4294 /* We use char because int might match the return type of a gcc2
4295     builtin and then its argument prototype would still apply.  */
4296 char lt_dlinit();
4297
4298 int main() {
4299 lt_dlinit()
4300 ; return 0; }
4301 EOF
4302 if { (eval echo configure:4303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4303   rm -rf conftest*
4304   eval "ac_cv_lib_$ac_lib_var=yes"
4305 else
4306   echo "configure: failed program was:" >&5
4307   cat conftest.$ac_ext >&5
4308   rm -rf conftest*
4309   eval "ac_cv_lib_$ac_lib_var=no"
4310 fi
4311 rm -f conftest*
4312 LIBS="$ac_save_LIBS"
4313
4314 fi
4315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4316   echo "$ac_t""yes" 1>&6
4317   
4318             MODULES_LIBS=-lltdl
4319             cat >> confdefs.h <<\EOF
4320 #define HAVE_LIBLTDL 1
4321 EOF
4322
4323         
4324 else
4325   echo "$ac_t""no" 1>&6
4326 fi
4327
4328
4329         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4330                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4331         fi
4332         ol_link_modules=yes
4333 else
4334         ol_with_bdb2_module=static
4335         ol_with_dnssrv_module=static
4336         ol_with_ldap_module=static
4337         ol_with_ldbm_module=static
4338         ol_with_passwd_module=static
4339         ol_with_perl_module=static
4340         ol_with_shell_module=static
4341         ol_with_tcl_module=static
4342         ol_with_sql_module=static
4343 fi
4344
4345 # test for EBCDIC
4346 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4347 echo "configure:4348: checking for EBCDIC" >&5
4348 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4349   echo $ac_n "(cached) $ac_c" 1>&6
4350 else
4351   
4352         cat > conftest.$ac_ext <<EOF
4353 #line 4354 "configure"
4354 #include "confdefs.h"
4355
4356 #if !('M' == 0xd4)
4357 #include <__ASCII__/generate_error.h>
4358 #endif
4359
4360 EOF
4361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4362 { (eval echo configure:4363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4364 if test -z "$ac_err"; then
4365   rm -rf conftest*
4366   ol_cv_cpp_ebcdic=yes
4367 else
4368   echo "$ac_err" >&5
4369   echo "configure: failed program was:" >&5
4370   cat conftest.$ac_ext >&5
4371   rm -rf conftest*
4372   ol_cv_cpp_ebcdic=no
4373 fi
4374 rm -f conftest*
4375 fi
4376
4377 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4378 if test $ol_cv_cpp_ebcdic = yes ; then
4379         cat >> confdefs.h <<\EOF
4380 #define HAVE_EBCDIC 1
4381 EOF
4382
4383 fi
4384
4385 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4386 echo "configure:4387: checking for ANSI C header files" >&5
4387 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4388   echo $ac_n "(cached) $ac_c" 1>&6
4389 else
4390   cat > conftest.$ac_ext <<EOF
4391 #line 4392 "configure"
4392 #include "confdefs.h"
4393 #include <stdlib.h>
4394 #include <stdarg.h>
4395 #include <string.h>
4396 #include <float.h>
4397 EOF
4398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4399 { (eval echo configure:4400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4401 if test -z "$ac_err"; then
4402   rm -rf conftest*
4403   ol_cv_header_stdc=yes
4404 else
4405   echo "$ac_err" >&5
4406   echo "configure: failed program was:" >&5
4407   cat conftest.$ac_ext >&5
4408   rm -rf conftest*
4409   ol_cv_header_stdc=no
4410 fi
4411 rm -f conftest*
4412
4413 if test $ol_cv_header_stdc = yes; then
4414   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4415 cat > conftest.$ac_ext <<EOF
4416 #line 4417 "configure"
4417 #include "confdefs.h"
4418 #include <string.h>
4419 EOF
4420 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4421   egrep "memchr" >/dev/null 2>&1; then
4422   :
4423 else
4424   rm -rf conftest*
4425   ol_cv_header_stdc=no
4426 fi
4427 rm -f conftest*
4428
4429 fi
4430
4431 if test $ol_cv_header_stdc = yes; then
4432   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4433 cat > conftest.$ac_ext <<EOF
4434 #line 4435 "configure"
4435 #include "confdefs.h"
4436 #include <stdlib.h>
4437 EOF
4438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4439   egrep "free" >/dev/null 2>&1; then
4440   :
4441 else
4442   rm -rf conftest*
4443   ol_cv_header_stdc=no
4444 fi
4445 rm -f conftest*
4446
4447 fi
4448
4449 if test $ol_cv_header_stdc = yes; then
4450   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4451 if test "$cross_compiling" = yes; then
4452   :
4453 else
4454   cat > conftest.$ac_ext <<EOF
4455 #line 4456 "configure"
4456 #include "confdefs.h"
4457 #include <ctype.h>
4458 #ifndef HAVE_EBCDIC
4459 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4460 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4461 #else
4462 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4463                 || ('j' <= (c) && (c) <= 'r') \
4464                 || ('s' <= (c) && (c) <= 'z'))
4465 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4466 #endif
4467 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4468 int main () { int i; for (i = 0; i < 256; i++)
4469 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4470 exit (0); }
4471
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4474 then
4475   :
4476 else
4477   echo "configure: failed program was:" >&5
4478   cat conftest.$ac_ext >&5
4479   rm -fr conftest*
4480   ol_cv_header_stdc=no
4481 fi
4482 rm -fr conftest*
4483 fi
4484
4485 fi
4486 fi
4487
4488 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4489 if test $ol_cv_header_stdc = yes; then
4490   cat >> confdefs.h <<\EOF
4491 #define STDC_HEADERS 1
4492 EOF
4493
4494 fi
4495 ac_cv_header_stdc=disable
4496
4497
4498 if test $ol_cv_header_stdc != yes; then
4499         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4500 fi
4501
4502 ac_header_dirent=no
4503 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4504 do
4505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4506 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4507 echo "configure:4508: checking for $ac_hdr that defines DIR" >&5
4508 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4509   echo $ac_n "(cached) $ac_c" 1>&6
4510 else
4511   cat > conftest.$ac_ext <<EOF
4512 #line 4513 "configure"
4513 #include "confdefs.h"
4514 #include <sys/types.h>
4515 #include <$ac_hdr>
4516 int main() {
4517 DIR *dirp = 0;
4518 ; return 0; }
4519 EOF
4520 if { (eval echo configure:4521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4521   rm -rf conftest*
4522   eval "ac_cv_header_dirent_$ac_safe=yes"
4523 else
4524   echo "configure: failed program was:" >&5
4525   cat conftest.$ac_ext >&5
4526   rm -rf conftest*
4527   eval "ac_cv_header_dirent_$ac_safe=no"
4528 fi
4529 rm -f conftest*
4530 fi
4531 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4532   echo "$ac_t""yes" 1>&6
4533     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4534   cat >> confdefs.h <<EOF
4535 #define $ac_tr_hdr 1
4536 EOF
4537  ac_header_dirent=$ac_hdr; break
4538 else
4539   echo "$ac_t""no" 1>&6
4540 fi
4541 done
4542 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4543 if test $ac_header_dirent = dirent.h; then
4544 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4545 echo "configure:4546: checking for opendir in -ldir" >&5
4546 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4547 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4548   echo $ac_n "(cached) $ac_c" 1>&6
4549 else
4550   ac_save_LIBS="$LIBS"
4551 LIBS="-ldir  $LIBS"
4552 cat > conftest.$ac_ext <<EOF
4553 #line 4554 "configure"
4554 #include "confdefs.h"
4555 /* Override any gcc2 internal prototype to avoid an error.  */
4556 /* We use char because int might match the return type of a gcc2
4557     builtin and then its argument prototype would still apply.  */
4558 char opendir();
4559
4560 int main() {
4561 opendir()
4562 ; return 0; }
4563 EOF
4564 if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4565   rm -rf conftest*
4566   eval "ac_cv_lib_$ac_lib_var=yes"
4567 else
4568   echo "configure: failed program was:" >&5
4569   cat conftest.$ac_ext >&5
4570   rm -rf conftest*
4571   eval "ac_cv_lib_$ac_lib_var=no"
4572 fi
4573 rm -f conftest*
4574 LIBS="$ac_save_LIBS"
4575
4576 fi
4577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4578   echo "$ac_t""yes" 1>&6
4579   LIBS="$LIBS -ldir"
4580 else
4581   echo "$ac_t""no" 1>&6
4582 fi
4583
4584 else
4585 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4586 echo "configure:4587: checking for opendir in -lx" >&5
4587 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4588 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4589   echo $ac_n "(cached) $ac_c" 1>&6
4590 else
4591   ac_save_LIBS="$LIBS"
4592 LIBS="-lx  $LIBS"
4593 cat > conftest.$ac_ext <<EOF
4594 #line 4595 "configure"
4595 #include "confdefs.h"
4596 /* Override any gcc2 internal prototype to avoid an error.  */
4597 /* We use char because int might match the return type of a gcc2
4598     builtin and then its argument prototype would still apply.  */
4599 char opendir();
4600
4601 int main() {
4602 opendir()
4603 ; return 0; }
4604 EOF
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4606   rm -rf conftest*
4607   eval "ac_cv_lib_$ac_lib_var=yes"
4608 else
4609   echo "configure: failed program was:" >&5
4610   cat conftest.$ac_ext >&5
4611   rm -rf conftest*
4612   eval "ac_cv_lib_$ac_lib_var=no"
4613 fi
4614 rm -f conftest*
4615 LIBS="$ac_save_LIBS"
4616
4617 fi
4618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4619   echo "$ac_t""yes" 1>&6
4620   LIBS="$LIBS -lx"
4621 else
4622   echo "$ac_t""no" 1>&6
4623 fi
4624
4625 fi
4626
4627 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4628 echo "configure:4629: checking for sys/wait.h that is POSIX.1 compatible" >&5
4629 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4630   echo $ac_n "(cached) $ac_c" 1>&6
4631 else
4632   cat > conftest.$ac_ext <<EOF
4633 #line 4634 "configure"
4634 #include "confdefs.h"
4635 #include <sys/types.h>
4636 #include <sys/wait.h>
4637 #ifndef WEXITSTATUS
4638 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4639 #endif
4640 #ifndef WIFEXITED
4641 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4642 #endif
4643 int main() {
4644 int s;
4645 wait (&s);
4646 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4647 ; return 0; }
4648 EOF
4649 if { (eval echo configure:4650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4650   rm -rf conftest*
4651   ac_cv_header_sys_wait_h=yes
4652 else
4653   echo "configure: failed program was:" >&5
4654   cat conftest.$ac_ext >&5
4655   rm -rf conftest*
4656   ac_cv_header_sys_wait_h=no
4657 fi
4658 rm -f conftest*
4659 fi
4660
4661 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4662 if test $ac_cv_header_sys_wait_h = yes; then
4663   cat >> confdefs.h <<\EOF
4664 #define HAVE_SYS_WAIT_H 1
4665 EOF
4666
4667 fi
4668
4669 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4670 echo "configure:4671: checking POSIX termios" >&5
4671 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   cat > conftest.$ac_ext <<EOF
4675 #line 4676 "configure"
4676 #include "confdefs.h"
4677 #include <sys/types.h>
4678 #include <unistd.h>
4679 #include <termios.h>
4680 int main() {
4681 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4682    tcgetattr(0, 0);
4683 ; return 0; }
4684 EOF
4685 if { (eval echo configure:4686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4686   rm -rf conftest*
4687   am_cv_sys_posix_termios=yes
4688 else
4689   echo "configure: failed program was:" >&5
4690   cat conftest.$ac_ext >&5
4691   rm -rf conftest*
4692   am_cv_sys_posix_termios=no
4693 fi
4694 rm -f conftest*
4695 fi
4696
4697 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4698
4699
4700  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4701 echo "configure:4702: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4702 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4703   echo $ac_n "(cached) $ac_c" 1>&6
4704 else
4705   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4706
4707   gwinsz_in_termios_h=no
4708   if test $am_cv_sys_posix_termios = yes; then
4709     cat > conftest.$ac_ext <<EOF
4710 #line 4711 "configure"
4711 #include "confdefs.h"
4712 #include <sys/types.h>
4713 #     include <termios.h>
4714 #     ifdef TIOCGWINSZ
4715         yes
4716 #     endif
4717     
4718 EOF
4719 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4720   egrep "yes" >/dev/null 2>&1; then
4721   rm -rf conftest*
4722   gwinsz_in_termios_h=yes
4723 fi
4724 rm -f conftest*
4725
4726   fi
4727
4728   if test $gwinsz_in_termios_h = no; then
4729     cat > conftest.$ac_ext <<EOF
4730 #line 4731 "configure"
4731 #include "confdefs.h"
4732 #include <sys/types.h>
4733 #     include <sys/ioctl.h>
4734 #     ifdef TIOCGWINSZ
4735         yes
4736 #     endif
4737     
4738 EOF
4739 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4740   egrep "yes" >/dev/null 2>&1; then
4741   rm -rf conftest*
4742   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4743 fi
4744 rm -f conftest*
4745
4746   fi
4747   
4748 fi
4749
4750 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4751   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4752     cat >> confdefs.h <<\EOF
4753 #define GWINSZ_IN_SYS_IOCTL 1
4754 EOF
4755
4756   fi
4757
4758 if test $am_cv_sys_posix_termios = yes ; then
4759         cat >> confdefs.h <<\EOF
4760 #define HAVE_POSIX_TERMIOS 1
4761 EOF
4762
4763 fi
4764
4765 for ac_hdr in \
4766         arpa/inet.h             \
4767         arpa/nameser.h  \
4768         assert.h                \
4769         conio.h                 \
4770         crypt.h                 \
4771         direct.h                \
4772         errno.h                 \
4773         fcntl.h                 \
4774         filio.h                 \
4775         getopt.h                \
4776         grp.h                   \
4777         io.h                    \
4778         libutil.h               \
4779         limits.h                \
4780         locale.h                \
4781         netinet/tcp.h   \
4782         malloc.h                \
4783         memory.h                \
4784         psap.h                  \
4785         pwd.h                   \
4786         process.h               \
4787         resolv.h                \
4788         sgtty.h                 \
4789         shadow.h                \
4790         stddef.h                \
4791         string.h                \
4792         strings.h               \
4793         sysexits.h              \
4794         sys/file.h              \
4795         sys/filio.h             \
4796         sys/errno.h             \
4797         sys/ioctl.h             \
4798         sys/param.h             \
4799         sys/resource.h  \
4800         sys/select.h    \
4801         sys/socket.h    \
4802         sys/syslog.h    \
4803         sys/time.h              \
4804         sys/types.h             \
4805         syslog.h                \
4806         termios.h               \
4807         unistd.h                \
4808         winsock.h               \
4809
4810 do
4811 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4812 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4813 echo "configure:4814: checking for $ac_hdr" >&5
4814 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4815   echo $ac_n "(cached) $ac_c" 1>&6
4816 else
4817   cat > conftest.$ac_ext <<EOF
4818 #line 4819 "configure"
4819 #include "confdefs.h"
4820 #include <$ac_hdr>
4821 EOF
4822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4823 { (eval echo configure:4824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4825 if test -z "$ac_err"; then
4826   rm -rf conftest*
4827   eval "ac_cv_header_$ac_safe=yes"
4828 else
4829   echo "$ac_err" >&5
4830   echo "configure: failed program was:" >&5
4831   cat conftest.$ac_ext >&5
4832   rm -rf conftest*
4833   eval "ac_cv_header_$ac_safe=no"
4834 fi
4835 rm -f conftest*
4836 fi
4837 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4838   echo "$ac_t""yes" 1>&6
4839     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4840   cat >> confdefs.h <<EOF
4841 #define $ac_tr_hdr 1
4842 EOF
4843  
4844 else
4845   echo "$ac_t""no" 1>&6
4846 fi
4847 done
4848
4849
4850
4851
4852 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4853 echo "configure:4854: checking for sigset in -lV3" >&5
4854 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4855 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4856   echo $ac_n "(cached) $ac_c" 1>&6
4857 else
4858   ac_save_LIBS="$LIBS"
4859 LIBS="-lV3  $LIBS"
4860 cat > conftest.$ac_ext <<EOF
4861 #line 4862 "configure"
4862 #include "confdefs.h"
4863 /* Override any gcc2 internal prototype to avoid an error.  */
4864 /* We use char because int might match the return type of a gcc2
4865     builtin and then its argument prototype would still apply.  */
4866 char sigset();
4867
4868 int main() {
4869 sigset()
4870 ; return 0; }
4871 EOF
4872 if { (eval echo configure:4873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4873   rm -rf conftest*
4874   eval "ac_cv_lib_$ac_lib_var=yes"
4875 else
4876   echo "configure: failed program was:" >&5
4877   cat conftest.$ac_ext >&5
4878   rm -rf conftest*
4879   eval "ac_cv_lib_$ac_lib_var=no"
4880 fi
4881 rm -f conftest*
4882 LIBS="$ac_save_LIBS"
4883
4884 fi
4885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4886   echo "$ac_t""yes" 1>&6
4887     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4888     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4889   cat >> confdefs.h <<EOF
4890 #define $ac_tr_lib 1
4891 EOF
4892
4893   LIBS="-lV3 $LIBS"
4894
4895 else
4896   echo "$ac_t""no" 1>&6
4897 fi
4898
4899
4900 if test $ac_cv_header_winsock_h = yes; then
4901         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4902 echo "configure:4903: checking for winsock" >&5
4903 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4904   echo $ac_n "(cached) $ac_c" 1>&6
4905 else
4906   cat > conftest.$ac_ext <<EOF
4907 #line 4908 "configure"
4908 #include "confdefs.h"
4909 #include <winsock.h>
4910 int main() {
4911
4912                         socket(0,0,0);
4913                         select(0,NULL,NULL,NULL,NULL);
4914                         closesocket(0);
4915                         gethostname(NULL,0);
4916         
4917 ; return 0; }
4918 EOF
4919 if { (eval echo configure:4920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4920   rm -rf conftest*
4921   ol_cv_winsock=yes
4922 else
4923   echo "configure: failed program was:" >&5
4924   cat conftest.$ac_ext >&5
4925   rm -rf conftest*
4926   ol_cv_winsock=no
4927 fi
4928 rm -f conftest*]
4929 fi
4930
4931 echo "$ac_t""$ol_cv_winsock" 1>&6
4932
4933         if test $ol_cv_winsock = yes ; then
4934                 cat >> confdefs.h <<\EOF
4935 #define HAVE_WINSOCK 1
4936 EOF
4937
4938                 ac_cv_func_socket=yes
4939                 ac_cv_func_select=yes
4940                 ac_cv_func_closesocket=yes
4941                 ac_cv_func_gethostname=yes
4942         fi
4943 fi
4944
4945
4946 echo $ac_n "checking for socket""... $ac_c" 1>&6
4947 echo "configure:4948: checking for socket" >&5
4948 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4949   echo $ac_n "(cached) $ac_c" 1>&6
4950 else
4951   cat > conftest.$ac_ext <<EOF
4952 #line 4953 "configure"
4953 #include "confdefs.h"
4954 /* System header to define __stub macros and hopefully few prototypes,
4955     which can conflict with char socket(); below.  */
4956 #include <assert.h>
4957 /* Override any gcc2 internal prototype to avoid an error.  */
4958 /* We use char because int might match the return type of a gcc2
4959     builtin and then its argument prototype would still apply.  */
4960 char socket();
4961 char (*f)();
4962
4963 int main() {
4964
4965 /* The GNU C library defines this for functions which it implements
4966     to always fail with ENOSYS.  Some functions are actually named
4967     something starting with __ and the normal name is an alias.  */
4968 #if defined (__stub_socket) || defined (__stub___socket)
4969 choke me
4970 #else
4971 f = socket;
4972 #endif
4973
4974 ; return 0; }
4975 EOF
4976 if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4977   rm -rf conftest*
4978   eval "ac_cv_func_socket=yes"
4979 else
4980   echo "configure: failed program was:" >&5
4981   cat conftest.$ac_ext >&5
4982   rm -rf conftest*
4983   eval "ac_cv_func_socket=no"
4984 fi
4985 rm -f conftest*
4986 fi
4987
4988 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4989   echo "$ac_t""yes" 1>&6
4990   :
4991 else
4992   echo "$ac_t""no" 1>&6
4993         
4994         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4995 echo "configure:4996: checking for main in -lsocket" >&5
4996 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4997 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4998   echo $ac_n "(cached) $ac_c" 1>&6
4999 else
5000   ac_save_LIBS="$LIBS"
5001 LIBS="-lsocket  $LIBS"
5002 cat > conftest.$ac_ext <<EOF
5003 #line 5004 "configure"
5004 #include "confdefs.h"
5005
5006 int main() {
5007 main()
5008 ; return 0; }
5009 EOF
5010 if { (eval echo configure:5011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5011   rm -rf conftest*
5012   eval "ac_cv_lib_$ac_lib_var=yes"
5013 else
5014   echo "configure: failed program was:" >&5
5015   cat conftest.$ac_ext >&5
5016   rm -rf conftest*
5017   eval "ac_cv_lib_$ac_lib_var=no"
5018 fi
5019 rm -f conftest*
5020 LIBS="$ac_save_LIBS"
5021
5022 fi
5023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5024   echo "$ac_t""yes" 1>&6
5025     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5026     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5027   cat >> confdefs.h <<EOF
5028 #define $ac_tr_lib 1
5029 EOF
5030
5031   LIBS="-lsocket $LIBS"
5032
5033 else
5034   echo "$ac_t""no" 1>&6
5035 fi
5036
5037         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5038 echo "configure:5039: checking for main in -lnet" >&5
5039 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5040 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5041   echo $ac_n "(cached) $ac_c" 1>&6
5042 else
5043   ac_save_LIBS="$LIBS"
5044 LIBS="-lnet  $LIBS"
5045 cat > conftest.$ac_ext <<EOF
5046 #line 5047 "configure"
5047 #include "confdefs.h"
5048
5049 int main() {
5050 main()
5051 ; return 0; }
5052 EOF
5053 if { (eval echo configure:5054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5054   rm -rf conftest*
5055   eval "ac_cv_lib_$ac_lib_var=yes"
5056 else
5057   echo "configure: failed program was:" >&5
5058   cat conftest.$ac_ext >&5
5059   rm -rf conftest*
5060   eval "ac_cv_lib_$ac_lib_var=no"
5061 fi
5062 rm -f conftest*
5063 LIBS="$ac_save_LIBS"
5064
5065 fi
5066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5067   echo "$ac_t""yes" 1>&6
5068     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5069     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5070   cat >> confdefs.h <<EOF
5071 #define $ac_tr_lib 1
5072 EOF
5073
5074   LIBS="-lnet $LIBS"
5075
5076 else
5077   echo "$ac_t""no" 1>&6
5078 fi
5079
5080         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5081 echo "configure:5082: checking for main in -lnsl_s" >&5
5082 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5083 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5084   echo $ac_n "(cached) $ac_c" 1>&6
5085 else
5086   ac_save_LIBS="$LIBS"
5087 LIBS="-lnsl_s  $LIBS"
5088 cat > conftest.$ac_ext <<EOF
5089 #line 5090 "configure"
5090 #include "confdefs.h"
5091
5092 int main() {
5093 main()
5094 ; return 0; }
5095 EOF
5096 if { (eval echo configure:5097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5097   rm -rf conftest*
5098   eval "ac_cv_lib_$ac_lib_var=yes"
5099 else
5100   echo "configure: failed program was:" >&5
5101   cat conftest.$ac_ext >&5
5102   rm -rf conftest*
5103   eval "ac_cv_lib_$ac_lib_var=no"
5104 fi
5105 rm -f conftest*
5106 LIBS="$ac_save_LIBS"
5107
5108 fi
5109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5110   echo "$ac_t""yes" 1>&6
5111     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5112     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5113   cat >> confdefs.h <<EOF
5114 #define $ac_tr_lib 1
5115 EOF
5116
5117   LIBS="-lnsl_s $LIBS"
5118
5119 else
5120   echo "$ac_t""no" 1>&6
5121 fi
5122
5123         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5124 echo "configure:5125: checking for main in -lnsl" >&5
5125 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5126 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5127   echo $ac_n "(cached) $ac_c" 1>&6
5128 else
5129   ac_save_LIBS="$LIBS"
5130 LIBS="-lnsl  $LIBS"
5131 cat > conftest.$ac_ext <<EOF
5132 #line 5133 "configure"
5133 #include "confdefs.h"
5134
5135 int main() {
5136 main()
5137 ; return 0; }
5138 EOF
5139 if { (eval echo configure:5140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5140   rm -rf conftest*
5141   eval "ac_cv_lib_$ac_lib_var=yes"
5142 else
5143   echo "configure: failed program was:" >&5
5144   cat conftest.$ac_ext >&5
5145   rm -rf conftest*
5146   eval "ac_cv_lib_$ac_lib_var=no"
5147 fi
5148 rm -f conftest*
5149 LIBS="$ac_save_LIBS"
5150
5151 fi
5152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5153   echo "$ac_t""yes" 1>&6
5154     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5155     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5156   cat >> confdefs.h <<EOF
5157 #define $ac_tr_lib 1
5158 EOF
5159
5160   LIBS="-lnsl $LIBS"
5161
5162 else
5163   echo "$ac_t""no" 1>&6
5164 fi
5165
5166         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5167 echo "configure:5168: checking for socket in -linet" >&5
5168 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5169 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5170   echo $ac_n "(cached) $ac_c" 1>&6
5171 else
5172   ac_save_LIBS="$LIBS"
5173 LIBS="-linet  $LIBS"
5174 cat > conftest.$ac_ext <<EOF
5175 #line 5176 "configure"
5176 #include "confdefs.h"
5177 /* Override any gcc2 internal prototype to avoid an error.  */
5178 /* We use char because int might match the return type of a gcc2
5179     builtin and then its argument prototype would still apply.  */
5180 char socket();
5181
5182 int main() {
5183 socket()
5184 ; return 0; }
5185 EOF
5186 if { (eval echo configure:5187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5187   rm -rf conftest*
5188   eval "ac_cv_lib_$ac_lib_var=yes"
5189 else
5190   echo "configure: failed program was:" >&5
5191   cat conftest.$ac_ext >&5
5192   rm -rf conftest*
5193   eval "ac_cv_lib_$ac_lib_var=no"
5194 fi
5195 rm -f conftest*
5196 LIBS="$ac_save_LIBS"
5197
5198 fi
5199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5200   echo "$ac_t""yes" 1>&6
5201     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5202     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5203   cat >> confdefs.h <<EOF
5204 #define $ac_tr_lib 1
5205 EOF
5206
5207   LIBS="-linet $LIBS"
5208
5209 else
5210   echo "$ac_t""no" 1>&6
5211 fi
5212
5213         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5214 echo "configure:5215: checking for main in -lgen" >&5
5215 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5216 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5217   echo $ac_n "(cached) $ac_c" 1>&6
5218 else
5219   ac_save_LIBS="$LIBS"
5220 LIBS="-lgen  $LIBS"
5221 cat > conftest.$ac_ext <<EOF
5222 #line 5223 "configure"
5223 #include "confdefs.h"
5224
5225 int main() {
5226 main()
5227 ; return 0; }
5228 EOF
5229 if { (eval echo configure:5230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5230   rm -rf conftest*
5231   eval "ac_cv_lib_$ac_lib_var=yes"
5232 else
5233   echo "configure: failed program was:" >&5
5234   cat conftest.$ac_ext >&5
5235   rm -rf conftest*
5236   eval "ac_cv_lib_$ac_lib_var=no"
5237 fi
5238 rm -f conftest*
5239 LIBS="$ac_save_LIBS"
5240
5241 fi
5242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5243   echo "$ac_t""yes" 1>&6
5244     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5245     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5246   cat >> confdefs.h <<EOF
5247 #define $ac_tr_lib 1
5248 EOF
5249
5250   LIBS="-lgen $LIBS"
5251
5252 else
5253   echo "$ac_t""no" 1>&6
5254 fi
5255
5256
5257 fi
5258
5259
5260 echo $ac_n "checking for select""... $ac_c" 1>&6
5261 echo "configure:5262: checking for select" >&5
5262 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5263   echo $ac_n "(cached) $ac_c" 1>&6
5264 else
5265   cat > conftest.$ac_ext <<EOF
5266 #line 5267 "configure"
5267 #include "confdefs.h"
5268 /* System header to define __stub macros and hopefully few prototypes,
5269     which can conflict with char select(); below.  */
5270 #include <assert.h>
5271 /* Override any gcc2 internal prototype to avoid an error.  */
5272 /* We use char because int might match the return type of a gcc2
5273     builtin and then its argument prototype would still apply.  */
5274 char select();
5275 char (*f)();
5276
5277 int main() {
5278
5279 /* The GNU C library defines this for functions which it implements
5280     to always fail with ENOSYS.  Some functions are actually named
5281     something starting with __ and the normal name is an alias.  */
5282 #if defined (__stub_select) || defined (__stub___select)
5283 choke me
5284 #else
5285 f = select;
5286 #endif
5287
5288 ; return 0; }
5289 EOF
5290 if { (eval echo configure:5291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5291   rm -rf conftest*
5292   eval "ac_cv_func_select=yes"
5293 else
5294   echo "configure: failed program was:" >&5
5295   cat conftest.$ac_ext >&5
5296   rm -rf conftest*
5297   eval "ac_cv_func_select=no"
5298 fi
5299 rm -f conftest*
5300 fi
5301
5302 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5303   echo "$ac_t""yes" 1>&6
5304   :
5305 else
5306   echo "$ac_t""no" 1>&6
5307 { echo "configure: error: select() required." 1>&2; exit 1; }
5308 fi
5309
5310
5311 if test "${ac_cv_header_winsock_h}" != yes; then
5312                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5313 echo "configure:5314: checking types of arguments for select()" >&5
5314  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5315   echo $ac_n "(cached) $ac_c" 1>&6
5316 else
5317    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5318   echo $ac_n "(cached) $ac_c" 1>&6
5319 else
5320     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5321   echo $ac_n "(cached) $ac_c" 1>&6
5322 else
5323      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5324      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5325       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5326        cat > conftest.$ac_ext <<EOF
5327 #line 5328 "configure"
5328 #include "confdefs.h"
5329 #ifdef HAVE_SYS_TYPES_H
5330 #include <sys/types.h>
5331 #endif
5332 #ifdef HAVE_SYS_TIME_H
5333 #include <sys/time.h>
5334 #endif
5335 #ifdef HAVE_SYS_SELECT_H
5336 #include <sys/select.h>
5337 #endif
5338 #ifdef HAVE_SYS_SOCKET_H
5339 #include <sys/socket.h>
5340 #endif
5341 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);
5342 int main() {
5343
5344 ; return 0; }
5345 EOF
5346 if { (eval echo configure:5347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5347   rm -rf conftest*
5348           ac_not_found=no ; break 3
5349 else
5350   echo "configure: failed program was:" >&5
5351   cat conftest.$ac_ext >&5
5352   rm -rf conftest*
5353   ac_not_found=yes
5354 fi
5355 rm -f conftest*
5356       done
5357      done
5358     done
5359    
5360 fi
5361   
5362 fi
5363  
5364 fi
5365  if test "$ac_not_found" = yes; then
5366   ac_cv_func_select_arg1=int 
5367   ac_cv_func_select_arg234='int *' 
5368   ac_cv_func_select_arg5='struct timeval *'
5369  fi
5370  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5371  cat >> confdefs.h <<EOF
5372 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5373 EOF
5374
5375  cat >> confdefs.h <<EOF
5376 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5377 EOF
5378
5379  cat >> confdefs.h <<EOF
5380 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5381 EOF
5382
5383
5384 fi
5385
5386
5387 for ac_hdr in regex.h 
5388 do
5389 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5390 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5391 echo "configure:5392: checking for $ac_hdr" >&5
5392 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5393   echo $ac_n "(cached) $ac_c" 1>&6
5394 else
5395   cat > conftest.$ac_ext <<EOF
5396 #line 5397 "configure"
5397 #include "confdefs.h"
5398 #include <$ac_hdr>
5399 EOF
5400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5401 { (eval echo configure:5402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5403 if test -z "$ac_err"; then
5404   rm -rf conftest*
5405   eval "ac_cv_header_$ac_safe=yes"
5406 else
5407   echo "$ac_err" >&5
5408   echo "configure: failed program was:" >&5
5409   cat conftest.$ac_ext >&5
5410   rm -rf conftest*
5411   eval "ac_cv_header_$ac_safe=no"
5412 fi
5413 rm -f conftest*
5414 fi
5415 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5416   echo "$ac_t""yes" 1>&6
5417     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5418   cat >> confdefs.h <<EOF
5419 #define $ac_tr_hdr 1
5420 EOF
5421  
5422 else
5423   echo "$ac_t""no" 1>&6
5424 fi
5425 done
5426
5427 if test "$ac_cv_header_regex_h" != yes ; then
5428         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5429 fi
5430 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5431 echo "configure:5432: checking for regfree" >&5
5432 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5433   echo $ac_n "(cached) $ac_c" 1>&6
5434 else
5435   cat > conftest.$ac_ext <<EOF
5436 #line 5437 "configure"
5437 #include "confdefs.h"
5438 /* System header to define __stub macros and hopefully few prototypes,
5439     which can conflict with char regfree(); below.  */
5440 #include <assert.h>
5441 /* Override any gcc2 internal prototype to avoid an error.  */
5442 /* We use char because int might match the return type of a gcc2
5443     builtin and then its argument prototype would still apply.  */
5444 char regfree();
5445 char (*f)();
5446
5447 int main() {
5448
5449 /* The GNU C library defines this for functions which it implements
5450     to always fail with ENOSYS.  Some functions are actually named
5451     something starting with __ and the normal name is an alias.  */
5452 #if defined (__stub_regfree) || defined (__stub___regfree)
5453 choke me
5454 #else
5455 f = regfree;
5456 #endif
5457
5458 ; return 0; }
5459 EOF
5460 if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5461   rm -rf conftest*
5462   eval "ac_cv_func_regfree=yes"
5463 else
5464   echo "configure: failed program was:" >&5
5465   cat conftest.$ac_ext >&5
5466   rm -rf conftest*
5467   eval "ac_cv_func_regfree=no"
5468 fi
5469 rm -f conftest*
5470 fi
5471
5472 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5473   echo "$ac_t""yes" 1>&6
5474   :
5475 else
5476   echo "$ac_t""no" 1>&6
5477 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5478 fi
5479
5480
5481
5482 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5483 echo "configure:5484: checking for compatible POSIX regex" >&5
5484 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5485   echo $ac_n "(cached) $ac_c" 1>&6
5486 else
5487   
5488         if test "$cross_compiling" = yes; then
5489   ol_cv_c_posix_regex=cross
5490 else
5491   cat > conftest.$ac_ext <<EOF
5492 #line 5493 "configure"
5493 #include "confdefs.h"
5494
5495 #include <sys/types.h>
5496 #include <regex.h>
5497 static char *pattern, *string;
5498 main()
5499 {
5500         int rc;
5501         regex_t re;
5502
5503         pattern = "^A";
5504
5505         if(regcomp(&re, pattern, 0)) {
5506                 return -1;
5507         }
5508         
5509         string = "ALL MATCH";
5510         
5511         rc = regexec(&re, string, 0, (void*)0, 0);
5512
5513         regfree(&re);
5514
5515         return rc;
5516 }
5517 EOF
5518 if { (eval echo configure:5519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5519 then
5520   ol_cv_c_posix_regex=yes
5521 else
5522   echo "configure: failed program was:" >&5
5523   cat conftest.$ac_ext >&5
5524   rm -fr conftest*
5525   ol_cv_c_posix_regex=no
5526 fi
5527 rm -fr conftest*
5528 fi
5529
5530 fi
5531
5532 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5533
5534 if test "$ol_cv_c_posix_regex" = no ; then
5535         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5536 fi
5537
5538 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5539 echo "configure:5540: checking for res_search" >&5
5540 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5541   echo $ac_n "(cached) $ac_c" 1>&6
5542 else
5543   cat > conftest.$ac_ext <<EOF
5544 #line 5545 "configure"
5545 #include "confdefs.h"
5546 /* System header to define __stub macros and hopefully few prototypes,
5547     which can conflict with char res_search(); below.  */
5548 #include <assert.h>
5549 /* Override any gcc2 internal prototype to avoid an error.  */
5550 /* We use char because int might match the return type of a gcc2
5551     builtin and then its argument prototype would still apply.  */
5552 char res_search();
5553 char (*f)();
5554
5555 int main() {
5556
5557 /* The GNU C library defines this for functions which it implements
5558     to always fail with ENOSYS.  Some functions are actually named
5559     something starting with __ and the normal name is an alias.  */
5560 #if defined (__stub_res_search) || defined (__stub___res_search)
5561 choke me
5562 #else
5563 f = res_search;
5564 #endif
5565
5566 ; return 0; }
5567 EOF
5568 if { (eval echo configure:5569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5569   rm -rf conftest*
5570   eval "ac_cv_func_res_search=yes"
5571 else
5572   echo "configure: failed program was:" >&5
5573   cat conftest.$ac_ext >&5
5574   rm -rf conftest*
5575   eval "ac_cv_func_res_search=no"
5576 fi
5577 rm -f conftest*
5578 fi
5579
5580 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5581   echo "$ac_t""yes" 1>&6
5582   :
5583 else
5584   echo "$ac_t""no" 1>&6
5585 fi
5586
5587 if test $ac_cv_func_res_search = no ; then 
5588         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5589 echo "configure:5590: checking for res_search in -lbind" >&5
5590 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5592   echo $ac_n "(cached) $ac_c" 1>&6
5593 else
5594   ac_save_LIBS="$LIBS"
5595 LIBS="-lbind  $LIBS"
5596 cat > conftest.$ac_ext <<EOF
5597 #line 5598 "configure"
5598 #include "confdefs.h"
5599 /* Override any gcc2 internal prototype to avoid an error.  */
5600 /* We use char because int might match the return type of a gcc2
5601     builtin and then its argument prototype would still apply.  */
5602 char res_search();
5603
5604 int main() {
5605 res_search()
5606 ; return 0; }
5607 EOF
5608 if { (eval echo configure:5609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5609   rm -rf conftest*
5610   eval "ac_cv_lib_$ac_lib_var=yes"
5611 else
5612   echo "configure: failed program was:" >&5
5613   cat conftest.$ac_ext >&5
5614   rm -rf conftest*
5615   eval "ac_cv_lib_$ac_lib_var=no"
5616 fi
5617 rm -f conftest*
5618 LIBS="$ac_save_LIBS"
5619
5620 fi
5621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5622   echo "$ac_t""yes" 1>&6
5623     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5624     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5625   cat >> confdefs.h <<EOF
5626 #define $ac_tr_lib 1
5627 EOF
5628
5629   LIBS="-lbind $LIBS"
5630
5631 else
5632   echo "$ac_t""no" 1>&6
5633 fi
5634
5635         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5636 fi
5637
5638 if test $ac_cv_func_res_search = no ; then 
5639         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5640 echo "configure:5641: checking for __res_search in -lbind" >&5
5641 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5642 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5643   echo $ac_n "(cached) $ac_c" 1>&6
5644 else
5645   ac_save_LIBS="$LIBS"
5646 LIBS="-lbind  $LIBS"
5647 cat > conftest.$ac_ext <<EOF
5648 #line 5649 "configure"
5649 #include "confdefs.h"
5650 /* Override any gcc2 internal prototype to avoid an error.  */
5651 /* We use char because int might match the return type of a gcc2
5652     builtin and then its argument prototype would still apply.  */
5653 char __res_search();
5654
5655 int main() {
5656 __res_search()
5657 ; return 0; }
5658 EOF
5659 if { (eval echo configure:5660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5660   rm -rf conftest*
5661   eval "ac_cv_lib_$ac_lib_var=yes"
5662 else
5663   echo "configure: failed program was:" >&5
5664   cat conftest.$ac_ext >&5
5665   rm -rf conftest*
5666   eval "ac_cv_lib_$ac_lib_var=no"
5667 fi
5668 rm -f conftest*
5669 LIBS="$ac_save_LIBS"
5670
5671 fi
5672 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5673   echo "$ac_t""yes" 1>&6
5674     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5675     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5676   cat >> confdefs.h <<EOF
5677 #define $ac_tr_lib 1
5678 EOF
5679
5680   LIBS="-lbind $LIBS"
5681
5682 else
5683   echo "$ac_t""no" 1>&6
5684 fi
5685
5686         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5687 fi
5688
5689 if test $ac_cv_func_res_search = no ; then 
5690         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5691 echo "configure:5692: checking for res_search in -lresolv" >&5
5692 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5693 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5694   echo $ac_n "(cached) $ac_c" 1>&6
5695 else
5696   ac_save_LIBS="$LIBS"
5697 LIBS="-lresolv  $LIBS"
5698 cat > conftest.$ac_ext <<EOF
5699 #line 5700 "configure"
5700 #include "confdefs.h"
5701 /* Override any gcc2 internal prototype to avoid an error.  */
5702 /* We use char because int might match the return type of a gcc2
5703     builtin and then its argument prototype would still apply.  */
5704 char res_search();
5705
5706 int main() {
5707 res_search()
5708 ; return 0; }
5709 EOF
5710 if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5711   rm -rf conftest*
5712   eval "ac_cv_lib_$ac_lib_var=yes"
5713 else
5714   echo "configure: failed program was:" >&5
5715   cat conftest.$ac_ext >&5
5716   rm -rf conftest*
5717   eval "ac_cv_lib_$ac_lib_var=no"
5718 fi
5719 rm -f conftest*
5720 LIBS="$ac_save_LIBS"
5721
5722 fi
5723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5724   echo "$ac_t""yes" 1>&6
5725     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5726     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5727   cat >> confdefs.h <<EOF
5728 #define $ac_tr_lib 1
5729 EOF
5730
5731   LIBS="-lresolv $LIBS"
5732
5733 else
5734   echo "$ac_t""no" 1>&6
5735 fi
5736
5737         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5738 fi
5739
5740 if test "$ac_cv_func_res_search" = yes ; then
5741         cat >> confdefs.h <<\EOF
5742 #define HAVE_RES_SEARCH 1
5743 EOF
5744
5745 elif test $ol_enable_dns = yes ; then
5746         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5747 elif test $ol_enable_dns != no ; then
5748         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5749 fi
5750
5751
5752 if test $ol_enable_quipu != no ; then
5753         for ac_hdr in quipu/commonarg.h
5754 do
5755 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5756 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5757 echo "configure:5758: checking for $ac_hdr" >&5
5758 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5759   echo $ac_n "(cached) $ac_c" 1>&6
5760 else
5761   cat > conftest.$ac_ext <<EOF
5762 #line 5763 "configure"
5763 #include "confdefs.h"
5764 #include <$ac_hdr>
5765 EOF
5766 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5767 { (eval echo configure:5768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5769 if test -z "$ac_err"; then
5770   rm -rf conftest*
5771   eval "ac_cv_header_$ac_safe=yes"
5772 else
5773   echo "$ac_err" >&5
5774   echo "configure: failed program was:" >&5
5775   cat conftest.$ac_ext >&5
5776   rm -rf conftest*
5777   eval "ac_cv_header_$ac_safe=no"
5778 fi
5779 rm -f conftest*
5780 fi
5781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5782   echo "$ac_t""yes" 1>&6
5783     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5784   cat >> confdefs.h <<EOF
5785 #define $ac_tr_hdr 1
5786 EOF
5787  
5788 else
5789   echo "$ac_t""no" 1>&6
5790 fi
5791 done
5792
5793
5794         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5795                 BUILD_QUIPU=yes
5796         elif test $ol_enable_quipu = auto ; then
5797                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5798         else
5799                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5800         fi
5801 fi
5802
5803 ol_link_kbind=no
5804 ol_link_kpasswd=no
5805 ol_link_krb5=no
5806 ol_link_krb4=no
5807
5808 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5809         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5810
5811         for ac_hdr in krb5.h
5812 do
5813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5815 echo "configure:5816: checking for $ac_hdr" >&5
5816 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5817   echo $ac_n "(cached) $ac_c" 1>&6
5818 else
5819   cat > conftest.$ac_ext <<EOF
5820 #line 5821 "configure"
5821 #include "confdefs.h"
5822 #include <$ac_hdr>
5823 EOF
5824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5825 { (eval echo configure:5826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5827 if test -z "$ac_err"; then
5828   rm -rf conftest*
5829   eval "ac_cv_header_$ac_safe=yes"
5830 else
5831   echo "$ac_err" >&5
5832   echo "configure: failed program was:" >&5
5833   cat conftest.$ac_ext >&5
5834   rm -rf conftest*
5835   eval "ac_cv_header_$ac_safe=no"
5836 fi
5837 rm -f conftest*
5838 fi
5839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5840   echo "$ac_t""yes" 1>&6
5841     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5842   cat >> confdefs.h <<EOF
5843 #define $ac_tr_hdr 1
5844 EOF
5845  
5846 else
5847   echo "$ac_t""no" 1>&6
5848 fi
5849 done
5850
5851
5852         if test $ac_cv_header_krb5_h = yes ; then
5853                                 for ac_hdr in heim_err.h
5854 do
5855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5857 echo "configure:5858: checking for $ac_hdr" >&5
5858 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5859   echo $ac_n "(cached) $ac_c" 1>&6
5860 else
5861   cat > conftest.$ac_ext <<EOF
5862 #line 5863 "configure"
5863 #include "confdefs.h"
5864 #include <$ac_hdr>
5865 EOF
5866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5867 { (eval echo configure:5868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5869 if test -z "$ac_err"; then
5870   rm -rf conftest*
5871   eval "ac_cv_header_$ac_safe=yes"
5872 else
5873   echo "$ac_err" >&5
5874   echo "configure: failed program was:" >&5
5875   cat conftest.$ac_ext >&5
5876   rm -rf conftest*
5877   eval "ac_cv_header_$ac_safe=no"
5878 fi
5879 rm -f conftest*
5880 fi
5881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5882   echo "$ac_t""yes" 1>&6
5883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5884   cat >> confdefs.h <<EOF
5885 #define $ac_tr_hdr 1
5886 EOF
5887  
5888 else
5889   echo "$ac_t""no" 1>&6
5890 fi
5891 done
5892
5893                 if test $ac_cv_header_heim_err_h = yes ; then
5894                         krb5_impl=heimdal
5895                 else
5896                         krb5_impl=mit
5897                 fi
5898
5899                 if test $krb5_impl = mit; then
5900                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5901 echo "configure:5902: checking for main in -lkrb5" >&5
5902 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5903 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5904   echo $ac_n "(cached) $ac_c" 1>&6
5905 else
5906   ac_save_LIBS="$LIBS"
5907 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5908 cat > conftest.$ac_ext <<EOF
5909 #line 5910 "configure"
5910 #include "confdefs.h"
5911
5912 int main() {
5913 main()
5914 ; return 0; }
5915 EOF
5916 if { (eval echo configure:5917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5917   rm -rf conftest*
5918   eval "ac_cv_lib_$ac_lib_var=yes"
5919 else
5920   echo "configure: failed program was:" >&5
5921   cat conftest.$ac_ext >&5
5922   rm -rf conftest*
5923   eval "ac_cv_lib_$ac_lib_var=no"
5924 fi
5925 rm -f conftest*
5926 LIBS="$ac_save_LIBS"
5927
5928 fi
5929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5930   echo "$ac_t""yes" 1>&6
5931   have_krb5=yes
5932                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5933 else
5934   echo "$ac_t""no" 1>&6
5935 have_krb5=no
5936 fi
5937
5938
5939                 elif test $krb5_impl = heimdal; 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 -ldes -lasn1 -lroken -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 -ldes -lasn1 -lroken -lcom_err"
5973 else
5974   echo "$ac_t""no" 1>&6
5975 have_krb5=no
5976 fi
5977
5978
5979                         cat >> confdefs.h <<\EOF
5980 #define HAVE_HEIMDAL_KERBEROS 1
5981 EOF
5982
5983                 else
5984                         have_krb5=no
5985                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5986                 fi
5987
5988                 if test $have_krb5 = yes ; then
5989                         ol_link_krb5=yes
5990
5991                         cat >> confdefs.h <<\EOF
5992 #define HAVE_KRB5 1
5993 EOF
5994
5995
5996                         if test $ol_enable_kpasswd != no ; then
5997                                 ol_link_kpasswd=yes;
5998                         fi
5999
6000                         if test $ol_with_kerberos = k5only ; then
6001                                 ol_with_kerberos=found
6002                         fi
6003
6004                 elif test $ol_with_kerberos != auto ; then
6005                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6006                 fi
6007
6008         fi
6009 fi
6010
6011 if test $ol_link_krb5 = yes -a \
6012         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6013
6014         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6015 do
6016 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6017 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6018 echo "configure:6019: checking for $ac_hdr" >&5
6019 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6020   echo $ac_n "(cached) $ac_c" 1>&6
6021 else
6022   cat > conftest.$ac_ext <<EOF
6023 #line 6024 "configure"
6024 #include "confdefs.h"
6025 #include <$ac_hdr>
6026 EOF
6027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6028 { (eval echo configure:6029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6030 if test -z "$ac_err"; then
6031   rm -rf conftest*
6032   eval "ac_cv_header_$ac_safe=yes"
6033 else
6034   echo "$ac_err" >&5
6035   echo "configure: failed program was:" >&5
6036   cat conftest.$ac_ext >&5
6037   rm -rf conftest*
6038   eval "ac_cv_header_$ac_safe=no"
6039 fi
6040 rm -f conftest*
6041 fi
6042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6043   echo "$ac_t""yes" 1>&6
6044     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6045   cat >> confdefs.h <<EOF
6046 #define $ac_tr_hdr 1
6047 EOF
6048  
6049 else
6050   echo "$ac_t""no" 1>&6
6051 fi
6052 done
6053
6054
6055         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6056                 if test $krb5_impl = mit; then
6057                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6058 echo "configure:6059: checking for main in -lkrb4" >&5
6059 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6060 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6061   echo $ac_n "(cached) $ac_c" 1>&6
6062 else
6063   ac_save_LIBS="$LIBS"
6064 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6065 cat > conftest.$ac_ext <<EOF
6066 #line 6067 "configure"
6067 #include "confdefs.h"
6068
6069 int main() {
6070 main()
6071 ; return 0; }
6072 EOF
6073 if { (eval echo configure:6074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6074   rm -rf conftest*
6075   eval "ac_cv_lib_$ac_lib_var=yes"
6076 else
6077   echo "configure: failed program was:" >&5
6078   cat conftest.$ac_ext >&5
6079   rm -rf conftest*
6080   eval "ac_cv_lib_$ac_lib_var=no"
6081 fi
6082 rm -f conftest*
6083 LIBS="$ac_save_LIBS"
6084
6085 fi
6086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6087   echo "$ac_t""yes" 1>&6
6088   have_k425=yes
6089                                 KRB4_LIBS="-lkrb4 -ldes425"
6090 else
6091   echo "$ac_t""no" 1>&6
6092 have_k425=no
6093 fi
6094
6095
6096                 elif test $krb5_impl = heimdal; 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 -lkrb5 -ldes -lasn1 -lroken -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"
6130 else
6131   echo "$ac_t""no" 1>&6
6132 have_k425=no
6133 fi
6134
6135
6136                 else
6137                         have_425=no
6138                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6139                 fi
6140
6141                 if test $have_k425 = yes ; then
6142                         ol_with_kerberos=found
6143                         ol_link_krb4=yes
6144
6145                         cat >> confdefs.h <<\EOF
6146 #define HAVE_KRB425 1
6147 EOF
6148
6149                         cat >> confdefs.h <<\EOF
6150 #define HAVE_KRB4 1
6151 EOF
6152
6153
6154                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6155 echo "configure:6156: checking for des_debug in Kerberos libraries" >&5
6156 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6157   echo $ac_n "(cached) $ac_c" 1>&6
6158 else
6159   
6160                                                                 save_LIBS="$LIBS"
6161                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6162                                 cat > conftest.$ac_ext <<EOF
6163 #line 6164 "configure"
6164 #include "confdefs.h"
6165
6166 #include <kerberosIV/krb.h>
6167 #include <kerberosIV/des.h>
6168 extern int des_debug;
6169
6170 int main() {
6171
6172 des_debug = 1;
6173
6174 ; return 0; }
6175 EOF
6176 if { (eval echo configure:6177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6177   rm -rf conftest*
6178   ol_cv_var_des_debug=yes
6179 else
6180   echo "configure: failed program was:" >&5
6181   cat conftest.$ac_ext >&5
6182   rm -rf conftest*
6183   ol_cv_var_des_debug=no
6184 fi
6185 rm -f conftest*
6186                                                                 LIBS="$save_LIBS"
6187                         
6188 fi
6189
6190 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6191
6192                         if test $ol_cv_var_des_debug = yes ; then
6193                                 cat >> confdefs.h <<\EOF
6194 #define HAVE_DES_DEBUG 1
6195 EOF
6196
6197                         fi
6198
6199                         LIBS="$save_LIBS"
6200                 fi
6201         fi
6202 fi
6203
6204 if test $ol_link_krb5 = yes ; then
6205         ol_with_kerberos=found
6206 fi
6207
6208 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6209         -o $ol_with_kerberos = kth ; then
6210
6211         for ac_hdr in krb.h des.h krb-archaeology.h 
6212 do
6213 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6214 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6215 echo "configure:6216: checking for $ac_hdr" >&5
6216 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6217   echo $ac_n "(cached) $ac_c" 1>&6
6218 else
6219   cat > conftest.$ac_ext <<EOF
6220 #line 6221 "configure"
6221 #include "confdefs.h"
6222 #include <$ac_hdr>
6223 EOF
6224 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6225 { (eval echo configure:6226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6226 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6227 if test -z "$ac_err"; then
6228   rm -rf conftest*
6229   eval "ac_cv_header_$ac_safe=yes"
6230 else
6231   echo "$ac_err" >&5
6232   echo "configure: failed program was:" >&5
6233   cat conftest.$ac_ext >&5
6234   rm -rf conftest*
6235   eval "ac_cv_header_$ac_safe=no"
6236 fi
6237 rm -f conftest*
6238 fi
6239 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6240   echo "$ac_t""yes" 1>&6
6241     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6242   cat >> confdefs.h <<EOF
6243 #define $ac_tr_hdr 1
6244 EOF
6245  
6246 else
6247   echo "$ac_t""no" 1>&6
6248 fi
6249 done
6250
6251
6252         if test $ac_cv_header_krb_h = yes ; then
6253                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6254 echo "configure:6255: checking for main in -lkrb" >&5
6255 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6256 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6257   echo $ac_n "(cached) $ac_c" 1>&6
6258 else
6259   ac_save_LIBS="$LIBS"
6260 LIBS="-lkrb -ldes $LIBS"
6261 cat > conftest.$ac_ext <<EOF
6262 #line 6263 "configure"
6263 #include "confdefs.h"
6264
6265 int main() {
6266 main()
6267 ; return 0; }
6268 EOF
6269 if { (eval echo configure:6270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6270   rm -rf conftest*
6271   eval "ac_cv_lib_$ac_lib_var=yes"
6272 else
6273   echo "configure: failed program was:" >&5
6274   cat conftest.$ac_ext >&5
6275   rm -rf conftest*
6276   eval "ac_cv_lib_$ac_lib_var=no"
6277 fi
6278 rm -f conftest*
6279 LIBS="$ac_save_LIBS"
6280
6281 fi
6282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6283   echo "$ac_t""yes" 1>&6
6284   have_k4=yes
6285 else
6286   echo "$ac_t""no" 1>&6
6287 have_k4=no
6288 fi
6289
6290
6291                 if test $have_k4 = yes ; then
6292                         ol_with_kerberos=found
6293                         ol_link_krb4=yes
6294
6295                         cat >> confdefs.h <<\EOF
6296 #define HAVE_KRB4 1
6297 EOF
6298
6299
6300                         KRB4_LIBS="-lkrb -ldes"
6301
6302                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6303                                 cat >> confdefs.h <<\EOF
6304 #define HAVE_KTH_KERBEROS 1
6305 EOF
6306
6307                         fi
6308                 fi
6309         fi
6310 fi
6311
6312 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6313         ol_link_kpasswd=yes;
6314 fi
6315
6316 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6317         cat >> confdefs.h <<\EOF
6318 #define HAVE_KERBEROS 1
6319 EOF
6320
6321
6322 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6323         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6324 fi
6325
6326 ol_link_tls=no
6327 if test $ol_with_tls != no ; then
6328         
6329         for ac_hdr in openssl/ssl.h ssl.h
6330 do
6331 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6332 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6333 echo "configure:6334: checking for $ac_hdr" >&5
6334 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6335   echo $ac_n "(cached) $ac_c" 1>&6
6336 else
6337   cat > conftest.$ac_ext <<EOF
6338 #line 6339 "configure"
6339 #include "confdefs.h"
6340 #include <$ac_hdr>
6341 EOF
6342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6343 { (eval echo configure:6344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6345 if test -z "$ac_err"; then
6346   rm -rf conftest*
6347   eval "ac_cv_header_$ac_safe=yes"
6348 else
6349   echo "$ac_err" >&5
6350   echo "configure: failed program was:" >&5
6351   cat conftest.$ac_ext >&5
6352   rm -rf conftest*
6353   eval "ac_cv_header_$ac_safe=no"
6354 fi
6355 rm -f conftest*
6356 fi
6357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6358   echo "$ac_t""yes" 1>&6
6359     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6360   cat >> confdefs.h <<EOF
6361 #define $ac_tr_hdr 1
6362 EOF
6363  
6364 else
6365   echo "$ac_t""no" 1>&6
6366 fi
6367 done
6368
6369         
6370         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6371                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6372 echo "configure:6373: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6373 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6374 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6375   echo $ac_n "(cached) $ac_c" 1>&6
6376 else
6377   ac_save_LIBS="$LIBS"
6378 LIBS="-lssl -lcrypto $LIBS"
6379 cat > conftest.$ac_ext <<EOF
6380 #line 6381 "configure"
6381 #include "confdefs.h"
6382 /* Override any gcc2 internal prototype to avoid an error.  */
6383 /* We use char because int might match the return type of a gcc2
6384     builtin and then its argument prototype would still apply.  */
6385 char SSLeay_add_ssl_algorithms();
6386
6387 int main() {
6388 SSLeay_add_ssl_algorithms()
6389 ; return 0; }
6390 EOF
6391 if { (eval echo configure:6392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6392   rm -rf conftest*
6393   eval "ac_cv_lib_$ac_lib_var=yes"
6394 else
6395   echo "configure: failed program was:" >&5
6396   cat conftest.$ac_ext >&5
6397   rm -rf conftest*
6398   eval "ac_cv_lib_$ac_lib_var=no"
6399 fi
6400 rm -f conftest*
6401 LIBS="$ac_save_LIBS"
6402
6403 fi
6404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6405   echo "$ac_t""yes" 1>&6
6406   have_ssleay=yes
6407                         need_rsaref=no
6408 else
6409   echo "$ac_t""no" 1>&6
6410 have_ssleay=no
6411 fi
6412
6413                         
6414                 if test $have_ssleay = no ; then
6415                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6416 echo "configure:6417: checking for SSL_library_init in -lssl" >&5
6417 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6418 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6419   echo $ac_n "(cached) $ac_c" 1>&6
6420 else
6421   ac_save_LIBS="$LIBS"
6422 LIBS="-lssl -lcrypto $LIBS"
6423 cat > conftest.$ac_ext <<EOF
6424 #line 6425 "configure"
6425 #include "confdefs.h"
6426 /* Override any gcc2 internal prototype to avoid an error.  */
6427 /* We use char because int might match the return type of a gcc2
6428     builtin and then its argument prototype would still apply.  */
6429 char SSL_library_init();
6430
6431 int main() {
6432 SSL_library_init()
6433 ; return 0; }
6434 EOF
6435 if { (eval echo configure:6436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6436   rm -rf conftest*
6437   eval "ac_cv_lib_$ac_lib_var=yes"
6438 else
6439   echo "configure: failed program was:" >&5
6440   cat conftest.$ac_ext >&5
6441   rm -rf conftest*
6442   eval "ac_cv_lib_$ac_lib_var=no"
6443 fi
6444 rm -f conftest*
6445 LIBS="$ac_save_LIBS"
6446
6447 fi
6448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6449   echo "$ac_t""yes" 1>&6
6450   have_ssleay=yes
6451                                 need_rsaref=no
6452 else
6453   echo "$ac_t""no" 1>&6
6454 have_ssleay=no
6455 fi
6456
6457                 fi
6458
6459                 if test $have_ssleay = no ; then
6460                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6461 echo "configure:6462: checking for ssl3_accept in -lssl" >&5
6462 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6464   echo $ac_n "(cached) $ac_c" 1>&6
6465 else
6466   ac_save_LIBS="$LIBS"
6467 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6468 cat > conftest.$ac_ext <<EOF
6469 #line 6470 "configure"
6470 #include "confdefs.h"
6471 /* Override any gcc2 internal prototype to avoid an error.  */
6472 /* We use char because int might match the return type of a gcc2
6473     builtin and then its argument prototype would still apply.  */
6474 char ssl3_accept();
6475
6476 int main() {
6477 ssl3_accept()
6478 ; return 0; }
6479 EOF
6480 if { (eval echo configure:6481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6481   rm -rf conftest*
6482   eval "ac_cv_lib_$ac_lib_var=yes"
6483 else
6484   echo "configure: failed program was:" >&5
6485   cat conftest.$ac_ext >&5
6486   rm -rf conftest*
6487   eval "ac_cv_lib_$ac_lib_var=no"
6488 fi
6489 rm -f conftest*
6490 LIBS="$ac_save_LIBS"
6491
6492 fi
6493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6494   echo "$ac_t""yes" 1>&6
6495   have_ssleay=yes
6496                                 need_rsaref=yes
6497 else
6498   echo "$ac_t""no" 1>&6
6499 have_ssleay=no
6500 fi
6501
6502                 fi
6503
6504                 if test $have_ssleay = yes ; then
6505                         ol_with_tls=found
6506                         ol_link_tls=yes
6507
6508                         cat >> confdefs.h <<\EOF
6509 #define HAVE_SSLEAY 1
6510 EOF
6511
6512
6513                         if test $need_rsaref = yes; then
6514                                 cat >> confdefs.h <<\EOF
6515 #define HAVE_RSAREF 1
6516 EOF
6517
6518
6519                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6520                         else
6521                                 TLS_LIBS="-lssl -lcrypto"
6522                         fi
6523                 fi
6524         fi
6525 fi
6526
6527 if test $ol_link_tls = yes ; then
6528         cat >> confdefs.h <<\EOF
6529 #define HAVE_TLS 1
6530 EOF
6531
6532 fi      
6533
6534 for ac_func in \
6535         ctime_r                 \
6536         gethostbyname_r gethostbyaddr_r \
6537
6538 do
6539 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6540 echo "configure:6541: checking for $ac_func" >&5
6541 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6542   echo $ac_n "(cached) $ac_c" 1>&6
6543 else
6544   cat > conftest.$ac_ext <<EOF
6545 #line 6546 "configure"
6546 #include "confdefs.h"
6547 /* System header to define __stub macros and hopefully few prototypes,
6548     which can conflict with char $ac_func(); below.  */
6549 #include <assert.h>
6550 /* Override any gcc2 internal prototype to avoid an error.  */
6551 /* We use char because int might match the return type of a gcc2
6552     builtin and then its argument prototype would still apply.  */
6553 char $ac_func();
6554 char (*f)();
6555
6556 int main() {
6557
6558 /* The GNU C library defines this for functions which it implements
6559     to always fail with ENOSYS.  Some functions are actually named
6560     something starting with __ and the normal name is an alias.  */
6561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6562 choke me
6563 #else
6564 f = $ac_func;
6565 #endif
6566
6567 ; return 0; }
6568 EOF
6569 if { (eval echo configure:6570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6570   rm -rf conftest*
6571   eval "ac_cv_func_$ac_func=yes"
6572 else
6573   echo "configure: failed program was:" >&5
6574   cat conftest.$ac_ext >&5
6575   rm -rf conftest*
6576   eval "ac_cv_func_$ac_func=no"
6577 fi
6578 rm -f conftest*
6579 fi
6580
6581 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6582   echo "$ac_t""yes" 1>&6
6583     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6584   cat >> confdefs.h <<EOF
6585 #define $ac_tr_func 1
6586 EOF
6587  
6588 else
6589   echo "$ac_t""no" 1>&6
6590 fi
6591 done
6592
6593
6594 if test "$ac_cv_func_ctime_r" = no ; then
6595         ol_cv_func_ctime_r_nargs=0
6596 else
6597         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6598 echo "configure:6599: checking number of arguments of ctime_r" >&5
6599 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6600   echo $ac_n "(cached) $ac_c" 1>&6
6601 else
6602   cat > conftest.$ac_ext <<EOF
6603 #line 6604 "configure"
6604 #include "confdefs.h"
6605 #include <time.h>
6606 int main() {
6607 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6608 ; return 0; }
6609 EOF
6610 if { (eval echo configure:6611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6611   rm -rf conftest*
6612   ol_cv_func_ctime_r_nargs3=yes
6613 else
6614   echo "configure: failed program was:" >&5
6615   cat conftest.$ac_ext >&5
6616   rm -rf conftest*
6617   ol_cv_func_ctime_r_nargs3=no
6618 fi
6619 rm -f conftest*
6620
6621         cat > conftest.$ac_ext <<EOF
6622 #line 6623 "configure"
6623 #include "confdefs.h"
6624 #include <time.h>
6625 int main() {
6626 time_t ti; char *buffer; ctime_r(&ti,buffer);
6627 ; return 0; }
6628 EOF
6629 if { (eval echo configure:6630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6630   rm -rf conftest*
6631   ol_cv_func_ctime_r_nargs2=yes
6632 else
6633   echo "configure: failed program was:" >&5
6634   cat conftest.$ac_ext >&5
6635   rm -rf conftest*
6636   ol_cv_func_ctime_r_nargs2=no
6637 fi
6638 rm -f conftest*
6639
6640         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6641                 $ol_cv_func_ctime_r_nargs2 = no ; then
6642
6643                 ol_cv_func_ctime_r_nargs=3
6644
6645         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6646                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6647
6648                 ol_cv_func_ctime_r_nargs=2
6649
6650         else
6651                 ol_cv_func_ctime_r_nargs=0
6652         fi
6653   
6654 fi
6655
6656 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6657
6658   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6659         cat >> confdefs.h <<EOF
6660 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6661 EOF
6662
6663   fi
6664
6665 fi
6666
6667 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6668         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6669 echo "configure:6670: checking number of arguments of gethostbyname_r" >&5
6670 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6671   echo $ac_n "(cached) $ac_c" 1>&6
6672 else
6673   cat > conftest.$ac_ext <<EOF
6674 #line 6675 "configure"
6675 #include "confdefs.h"
6676 #include <sys/types.h>
6677 #include <sys/socket.h>
6678 #include <netinet/in.h>
6679 #include <netdb.h>
6680 #define BUFSIZE (sizeof(struct hostent)+10)
6681 int main() {
6682 struct hostent hent; char buffer[BUFSIZE];
6683                 int bufsize=BUFSIZE;int h_errno;
6684                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6685                         buffer, bufsize, &h_errno);
6686 ; return 0; }
6687 EOF
6688 if { (eval echo configure:6689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6689   rm -rf conftest*
6690   ol_cv_func_gethostbyname_r_nargs5=yes
6691 else
6692   echo "configure: failed program was:" >&5
6693   cat conftest.$ac_ext >&5
6694   rm -rf conftest*
6695   ol_cv_func_gethostbyname_r_nargs5=no
6696 fi
6697 rm -f conftest*
6698
6699         cat > conftest.$ac_ext <<EOF
6700 #line 6701 "configure"
6701 #include "confdefs.h"
6702 #include <sys/types.h>
6703 #include <sys/socket.h>
6704 #include <netinet/in.h>
6705 #include <netdb.h>
6706 #define BUFSIZE (sizeof(struct hostent)+10)
6707 int main() {
6708 struct hostent hent;struct hostent *rhent;
6709                 char buffer[BUFSIZE];
6710                 int bufsize=BUFSIZE;int h_errno;
6711                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6712                         &rhent, &h_errno);
6713 ; return 0; }
6714 EOF
6715 if { (eval echo configure:6716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6716   rm -rf conftest*
6717   ol_cv_func_gethostbyname_r_nargs6=yes
6718 else
6719   echo "configure: failed program was:" >&5
6720   cat conftest.$ac_ext >&5
6721   rm -rf conftest*
6722   ol_cv_func_gethostbyname_r_nargs6=no
6723 fi
6724 rm -f conftest*
6725
6726         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6727                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6728
6729                 ol_cv_func_gethostbyname_r_nargs=5
6730
6731         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6732                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6733
6734                 ol_cv_func_gethostbyname_r_nargs=6
6735
6736         else
6737                 ol_cv_func_gethostbyname_r_nargs=0
6738         fi
6739   
6740 fi
6741
6742 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6743   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6744         cat >> confdefs.h <<EOF
6745 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6746 EOF
6747
6748   fi
6749
6750 else
6751         ol_cv_func_gethostbyname_r_nargs=0
6752 fi
6753  
6754 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6755         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6756 echo "configure:6757: checking number of arguments of gethostbyaddr_r" >&5
6757 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6758   echo $ac_n "(cached) $ac_c" 1>&6
6759 else
6760   cat > conftest.$ac_ext <<EOF
6761 #line 6762 "configure"
6762 #include "confdefs.h"
6763 #include <sys/types.h>
6764 #include <sys/socket.h>
6765 #include <netinet/in.h>
6766 #include <netdb.h>
6767 #define BUFSIZE (sizeof(struct hostent)+10)
6768 int main() {
6769 struct hostent hent; char buffer[BUFSIZE]; 
6770             struct in_addr add;
6771             size_t alen=sizeof(struct in_addr);
6772             int bufsize=BUFSIZE;int h_errno;
6773                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6774                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6775 ; return 0; }
6776 EOF
6777 if { (eval echo configure:6778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6778   rm -rf conftest*
6779   ol_cv_func_gethostbyaddr_r_nargs7=yes
6780 else
6781   echo "configure: failed program was:" >&5
6782   cat conftest.$ac_ext >&5
6783   rm -rf conftest*
6784   ol_cv_func_gethostbyaddr_r_nargs7=no
6785 fi
6786 rm -f conftest*
6787
6788         cat > conftest.$ac_ext <<EOF
6789 #line 6790 "configure"
6790 #include "confdefs.h"
6791 #include <sys/types.h>
6792 #include <sys/socket.h>
6793 #include <netinet/in.h>
6794 #include <netdb.h>
6795 #define BUFSIZE (sizeof(struct hostent)+10)
6796 int main() {
6797 struct hostent hent;
6798                 struct hostent *rhent; char buffer[BUFSIZE]; 
6799                 struct in_addr add;
6800                 size_t alen=sizeof(struct in_addr);
6801                 int bufsize=BUFSIZE;int h_errno;
6802                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6803                         alen, AF_INET, &hent, buffer, bufsize, 
6804                         &rhent, &h_errno);
6805 ; return 0; }
6806 EOF
6807 if { (eval echo configure:6808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6808   rm -rf conftest*
6809   ol_cv_func_gethostbyaddr_r_nargs8=yes
6810 else
6811   echo "configure: failed program was:" >&5
6812   cat conftest.$ac_ext >&5
6813   rm -rf conftest*
6814   ol_cv_func_gethostbyaddr_r_nargs8=no
6815 fi
6816 rm -f conftest*
6817
6818         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6819                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6820
6821                 ol_cv_func_gethostbyaddr_r_nargs=7
6822
6823         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6824                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6825
6826                 ol_cv_func_gethostbyaddr_r_nargs=8
6827
6828         else
6829                 ol_cv_func_gethostbyaddr_r_nargs=0
6830         fi
6831   
6832 fi
6833
6834 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6835   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6836     cat >> confdefs.h <<EOF
6837 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6838 EOF
6839
6840   fi
6841
6842 else
6843         ol_cv_func_gethostbyaddr_r_nargs=0
6844 fi
6845
6846 if test "$ac_cv_func_ctime_r" = yes \
6847         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6848         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6849         -a "$ac_cv_func_gethostbyname_r" = yes \
6850         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6851         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6852         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6853         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6854         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6855         ; then
6856  
6857         cat >> confdefs.h <<\EOF
6858 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6859 EOF
6860
6861 fi
6862
6863 ol_link_threads=no
6864
6865 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6866         -o $ol_with_threads = nt ; then
6867
6868         
6869         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6870 echo "configure:6871: checking for NT Threads" >&5
6871 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6872   echo $ac_n "(cached) $ac_c" 1>&6
6873 else
6874   
6875                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6876 echo "configure:6877: checking for _beginthread" >&5
6877 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6878   echo $ac_n "(cached) $ac_c" 1>&6
6879 else
6880   cat > conftest.$ac_ext <<EOF
6881 #line 6882 "configure"
6882 #include "confdefs.h"
6883 /* System header to define __stub macros and hopefully few prototypes,
6884     which can conflict with char _beginthread(); below.  */
6885 #include <assert.h>
6886 /* Override any gcc2 internal prototype to avoid an error.  */
6887 /* We use char because int might match the return type of a gcc2
6888     builtin and then its argument prototype would still apply.  */
6889 char _beginthread();
6890 char (*f)();
6891
6892 int main() {
6893
6894 /* The GNU C library defines this for functions which it implements
6895     to always fail with ENOSYS.  Some functions are actually named
6896     something starting with __ and the normal name is an alias.  */
6897 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6898 choke me
6899 #else
6900 f = _beginthread;
6901 #endif
6902
6903 ; return 0; }
6904 EOF
6905 if { (eval echo configure:6906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6906   rm -rf conftest*
6907   eval "ac_cv_func__beginthread=yes"
6908 else
6909   echo "configure: failed program was:" >&5
6910   cat conftest.$ac_ext >&5
6911   rm -rf conftest*
6912   eval "ac_cv_func__beginthread=no"
6913 fi
6914 rm -f conftest*
6915 fi
6916
6917 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6918   echo "$ac_t""yes" 1>&6
6919   ol_cv_nt_threads=yes
6920 else
6921   echo "$ac_t""no" 1>&6
6922 ol_cv_nt_threads=no
6923 fi
6924
6925         
6926 fi
6927
6928 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6929
6930         if test $ol_cv_nt_threads = yes ; then
6931                 cat >> confdefs.h <<\EOF
6932 #define HAVE_NT_THREADS 1
6933 EOF
6934
6935         fi
6936
6937
6938         if test "$ol_cv_nt_threads" = yes ; then
6939         ol_link_threads=nt
6940         ol_with_threads=found
6941         ol_with_yielding_select=yes
6942
6943                 cat >> confdefs.h <<\EOF
6944 #define HAVE_NT_SERVICE_MANAGER 1
6945 EOF
6946
6947                 cat >> confdefs.h <<\EOF
6948 #define HAVE_NT_EVENT_LOG 1
6949 EOF
6950
6951         fi
6952
6953         if test $ol_with_threads = nt ; then
6954                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6955         fi
6956 fi
6957
6958 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6959         -o $ol_with_threads = posix ; then
6960
6961         for ac_hdr in pthread.h
6962 do
6963 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6964 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6965 echo "configure:6966: checking for $ac_hdr" >&5
6966 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6967   echo $ac_n "(cached) $ac_c" 1>&6
6968 else
6969   cat > conftest.$ac_ext <<EOF
6970 #line 6971 "configure"
6971 #include "confdefs.h"
6972 #include <$ac_hdr>
6973 EOF
6974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6975 { (eval echo configure:6976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6976 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6977 if test -z "$ac_err"; then
6978   rm -rf conftest*
6979   eval "ac_cv_header_$ac_safe=yes"
6980 else
6981   echo "$ac_err" >&5
6982   echo "configure: failed program was:" >&5
6983   cat conftest.$ac_ext >&5
6984   rm -rf conftest*
6985   eval "ac_cv_header_$ac_safe=no"
6986 fi
6987 rm -f conftest*
6988 fi
6989 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6990   echo "$ac_t""yes" 1>&6
6991     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6992   cat >> confdefs.h <<EOF
6993 #define $ac_tr_hdr 1
6994 EOF
6995  
6996 else
6997   echo "$ac_t""no" 1>&6
6998 fi
6999 done
7000
7001
7002         if test $ac_cv_header_pthread_h = yes ; then
7003                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7004 echo "configure:7005: checking POSIX thread version" >&5
7005 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7006   echo $ac_n "(cached) $ac_c" 1>&6
7007 else
7008   
7009         cat > conftest.$ac_ext <<EOF
7010 #line 7011 "configure"
7011 #include "confdefs.h"
7012
7013 #               include <pthread.h>
7014                 /* this check could be improved */
7015 #               ifdef PTHREAD_ONCE_INIT
7016                         pthread_version_final;
7017 #               endif
7018         
7019 EOF
7020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7021   egrep "pthread_version_final" >/dev/null 2>&1; then
7022   rm -rf conftest*
7023   ol_pthread_final=yes
7024 else
7025   rm -rf conftest*
7026   ol_pthread_final=no
7027 fi
7028 rm -f conftest*
7029
7030
7031         cat > conftest.$ac_ext <<EOF
7032 #line 7033 "configure"
7033 #include "confdefs.h"
7034
7035 #               include <pthread.h>
7036                 /* this check could be improved */
7037 #               ifdef pthread_once_init
7038                         pthread_version_draft4;
7039 #               endif
7040         
7041 EOF
7042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7043   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7044   rm -rf conftest*
7045   ol_pthread_draft4=yes
7046 else
7047   rm -rf conftest*
7048   ol_pthread_draft4=no
7049 fi
7050 rm -f conftest*
7051
7052
7053         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7054                 ol_cv_pthread_version=final
7055         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7056                 ol_cv_pthread_version=draft4
7057         else
7058                 ol_cv_pthread_version=unknown
7059         fi
7060
7061 fi
7062
7063 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7064
7065
7066                 if test $ol_cv_pthread_version = final ; then
7067                         cat >> confdefs.h <<\EOF
7068 #define HAVE_PTHREADS_FINAL 1
7069 EOF
7070
7071                 elif test $ol_cv_pthread_version = draft4 ; then
7072                         cat >> confdefs.h <<\EOF
7073 #define HAVE_PTHREADS_D4 1
7074 EOF
7075
7076                 else
7077                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7078                 fi
7079
7080                 # consider threads found
7081                 ol_with_threads=found
7082
7083                 
7084         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7085 echo "configure:7086: checking for LinuxThreads pthread.h" >&5
7086 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7087   echo $ac_n "(cached) $ac_c" 1>&6
7088 else
7089   cat > conftest.$ac_ext <<EOF
7090 #line 7091 "configure"
7091 #include "confdefs.h"
7092 #include <pthread.h>
7093 EOF
7094 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7095   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7096   rm -rf conftest*
7097   ol_cv_header_linux_threads=yes
7098 else
7099   rm -rf conftest*
7100   ol_cv_header_linux_threads=no
7101 fi
7102 rm -f conftest*
7103
7104                 
7105 fi
7106
7107 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7108         if test $ol_cv_header_linux_threads = yes; then
7109                 cat >> confdefs.h <<\EOF
7110 #define HAVE_LINUX_THREADS 1
7111 EOF
7112
7113         fi
7114
7115                 
7116         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7117 echo "configure:7118: checking for GNU Pth pthread.h" >&5
7118 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7119   echo $ac_n "(cached) $ac_c" 1>&6
7120 else
7121   cat > conftest.$ac_ext <<EOF
7122 #line 7123 "configure"
7123 #include "confdefs.h"
7124 #include <pthread.h>
7125 #ifdef _POSIX_THREAD_IS_GNU_PTH
7126         __gnu_pth__;
7127 #endif
7128
7129 EOF
7130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7131   egrep "__gnu_pth__" >/dev/null 2>&1; then
7132   rm -rf conftest*
7133   ol_cv_header_gnu_pth_pthread_h=yes
7134 else
7135   rm -rf conftest*
7136   ol_cv_header_gnu_pth_pthread_h=no
7137 fi
7138 rm -f conftest*
7139
7140                 
7141 fi
7142
7143 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7144
7145
7146                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7147                         for ac_hdr in sched.h
7148 do
7149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7151 echo "configure:7152: checking for $ac_hdr" >&5
7152 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7153   echo $ac_n "(cached) $ac_c" 1>&6
7154 else
7155   cat > conftest.$ac_ext <<EOF
7156 #line 7157 "configure"
7157 #include "confdefs.h"
7158 #include <$ac_hdr>
7159 EOF
7160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7161 { (eval echo configure:7162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7163 if test -z "$ac_err"; then
7164   rm -rf conftest*
7165   eval "ac_cv_header_$ac_safe=yes"
7166 else
7167   echo "$ac_err" >&5
7168   echo "configure: failed program was:" >&5
7169   cat conftest.$ac_ext >&5
7170   rm -rf conftest*
7171   eval "ac_cv_header_$ac_safe=no"
7172 fi
7173 rm -f conftest*
7174 fi
7175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7176   echo "$ac_t""yes" 1>&6
7177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7178   cat >> confdefs.h <<EOF
7179 #define $ac_tr_hdr 1
7180 EOF
7181  
7182 else
7183   echo "$ac_t""no" 1>&6
7184 fi
7185 done
7186
7187                 fi
7188
7189                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7190                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7191 echo "configure:7192: checking for pthread_create in default libraries" >&5
7192 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7193   echo $ac_n "(cached) $ac_c" 1>&6
7194 else
7195   
7196                 if test "$cross_compiling" = yes; then
7197   cat > conftest.$ac_ext <<EOF
7198 #line 7199 "configure"
7199 #include "confdefs.h"
7200 /* pthread test headers */
7201 #include <pthread.h>
7202 #ifndef NULL
7203 #define NULL (void*)0
7204 #endif
7205
7206 static void *task(p)
7207         void *p;
7208 {
7209         return (void *) (p == NULL);
7210 }
7211
7212 int main() {
7213
7214         /* pthread test function */
7215         pthread_t t;
7216         int status;
7217 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7218         /* This system (e.g. AIX) defaults detached; must override */
7219         pthread_attr_t attr;
7220
7221         status = pthread_attr_init(&attr);
7222         if( status ) exit( status );
7223
7224         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7225         if( status ) exit( status );
7226
7227 #define ATTR    &attr
7228 #else
7229 #if HAVE_PTHREADS_D4
7230 #define ATTR    pthread_attr_default
7231 #else
7232 #define ATTR    NULL
7233 #endif
7234 #endif
7235         /* make sure pthread_create() isn't just a stub */
7236         status = pthread_create(&t, ATTR, task, NULL);
7237         if( status ) exit( status );
7238
7239         /* make sure pthread_detach() isn't just a stub */
7240 #if HAVE_PTHREADS_D4
7241         status = pthread_detach( &t );
7242 #else
7243         status = pthread_detach( t );
7244 #endif
7245
7246 #ifdef HAVE_LINUX_THREADS
7247         pthread_kill_other_threads_np();
7248 #endif
7249
7250         exit( status );
7251
7252 ; return 0; }
7253 EOF
7254 if { (eval echo configure:7255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7255   rm -rf conftest*
7256   ol_cv_pthread_create=yes
7257 else
7258   echo "configure: failed program was:" >&5
7259   cat conftest.$ac_ext >&5
7260   rm -rf conftest*
7261   ol_cv_pthread_create=no
7262 fi
7263 rm -f conftest*
7264 else
7265   cat > conftest.$ac_ext <<EOF
7266 #line 7267 "configure"
7267 #include "confdefs.h"
7268 /* pthread test headers */
7269 #include <pthread.h>
7270 #ifndef NULL
7271 #define NULL (void*)0
7272 #endif
7273
7274 static void *task(p)
7275         void *p;
7276 {
7277         return (void *) (p == NULL);
7278 }
7279
7280
7281 int main(argc, argv)
7282         int argc;
7283         char **argv;
7284 {
7285
7286         /* pthread test function */
7287         pthread_t t;
7288         int status;
7289 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7290         /* This system (e.g. AIX) defaults detached; must override */
7291         pthread_attr_t attr;
7292
7293         status = pthread_attr_init(&attr);
7294         if( status ) exit( status );
7295
7296         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7297         if( status ) exit( status );
7298
7299 #define ATTR    &attr
7300 #else
7301 #if HAVE_PTHREADS_D4
7302 #define ATTR    pthread_attr_default
7303 #else
7304 #define ATTR    NULL
7305 #endif
7306 #endif
7307         /* make sure pthread_create() isn't just a stub */
7308         status = pthread_create(&t, ATTR, task, NULL);
7309         if( status ) exit( status );
7310
7311         /* make sure pthread_detach() isn't just a stub */
7312 #if HAVE_PTHREADS_D4
7313         status = pthread_detach( &t );
7314 #else
7315         status = pthread_detach( t );
7316 #endif
7317
7318 #ifdef HAVE_LINUX_THREADS
7319         pthread_kill_other_threads_np();
7320 #endif
7321
7322         exit( status );
7323
7324 }
7325
7326 EOF
7327 if { (eval echo configure:7328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7328 then
7329   ol_cv_pthread_create=yes
7330 else
7331   echo "configure: failed program was:" >&5
7332   cat conftest.$ac_ext >&5
7333   rm -fr conftest*
7334   ol_cv_pthread_create=no
7335 fi
7336 rm -fr conftest*
7337 fi
7338
7339 fi
7340
7341 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7342
7343                 if test $ol_cv_pthread_create != no ; then
7344                         ol_link_threads=posix
7345                         ol_link_pthreads=""
7346                 fi
7347                 
7348                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7349 if test "$ol_link_threads" = no ; then
7350         # try -kthread
7351         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7352 echo "configure:7353: checking for pthread link with -kthread" >&5
7353 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7354   echo $ac_n "(cached) $ac_c" 1>&6
7355 else
7356   
7357                 # save the flags
7358                 ol_LIBS="$LIBS"
7359                 LIBS="-kthread $LIBS"
7360
7361                 if test "$cross_compiling" = yes; then
7362   cat > conftest.$ac_ext <<EOF
7363 #line 7364 "configure"
7364 #include "confdefs.h"
7365 /* pthread test headers */
7366 #include <pthread.h>
7367 #ifndef NULL
7368 #define NULL (void*)0
7369 #endif
7370
7371 static void *task(p)
7372         void *p;
7373 {
7374         return (void *) (p == NULL);
7375 }
7376
7377 int main() {
7378
7379         /* pthread test function */
7380         pthread_t t;
7381         int status;
7382 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7383         /* This system (e.g. AIX) defaults detached; must override */
7384         pthread_attr_t attr;
7385
7386         status = pthread_attr_init(&attr);
7387         if( status ) exit( status );
7388
7389         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7390         if( status ) exit( status );
7391
7392 #define ATTR    &attr
7393 #else
7394 #if HAVE_PTHREADS_D4
7395 #define ATTR    pthread_attr_default
7396 #else
7397 #define ATTR    NULL
7398 #endif
7399 #endif
7400         /* make sure pthread_create() isn't just a stub */
7401         status = pthread_create(&t, ATTR, task, NULL);
7402         if( status ) exit( status );
7403
7404         /* make sure pthread_detach() isn't just a stub */
7405 #if HAVE_PTHREADS_D4
7406         status = pthread_detach( &t );
7407 #else
7408         status = pthread_detach( t );
7409 #endif
7410
7411 #ifdef HAVE_LINUX_THREADS
7412         pthread_kill_other_threads_np();
7413 #endif
7414
7415         exit( status );
7416
7417 ; return 0; }
7418 EOF
7419 if { (eval echo configure:7420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7420   rm -rf conftest*
7421   ol_cv_pthread_kthread=yes
7422 else
7423   echo "configure: failed program was:" >&5
7424   cat conftest.$ac_ext >&5
7425   rm -rf conftest*
7426   ol_cv_pthread_kthread=no
7427 fi
7428 rm -f conftest*
7429 else
7430   cat > conftest.$ac_ext <<EOF
7431 #line 7432 "configure"
7432 #include "confdefs.h"
7433 /* pthread test headers */
7434 #include <pthread.h>
7435 #ifndef NULL
7436 #define NULL (void*)0
7437 #endif
7438
7439 static void *task(p)
7440         void *p;
7441 {
7442         return (void *) (p == NULL);
7443 }
7444
7445
7446 int main(argc, argv)
7447         int argc;
7448         char **argv;
7449 {
7450
7451         /* pthread test function */
7452         pthread_t t;
7453         int status;
7454 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7455         /* This system (e.g. AIX) defaults detached; must override */
7456         pthread_attr_t attr;
7457
7458         status = pthread_attr_init(&attr);
7459         if( status ) exit( status );
7460
7461         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7462         if( status ) exit( status );
7463
7464 #define ATTR    &attr
7465 #else
7466 #if HAVE_PTHREADS_D4
7467 #define ATTR    pthread_attr_default
7468 #else
7469 #define ATTR    NULL
7470 #endif
7471 #endif
7472         /* make sure pthread_create() isn't just a stub */
7473         status = pthread_create(&t, ATTR, task, NULL);
7474         if( status ) exit( status );
7475
7476         /* make sure pthread_detach() isn't just a stub */
7477 #if HAVE_PTHREADS_D4
7478         status = pthread_detach( &t );
7479 #else
7480         status = pthread_detach( t );
7481 #endif
7482
7483 #ifdef HAVE_LINUX_THREADS
7484         pthread_kill_other_threads_np();
7485 #endif
7486
7487         exit( status );
7488
7489 }
7490
7491 EOF
7492 if { (eval echo configure:7493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7493 then
7494   ol_cv_pthread_kthread=yes
7495 else
7496   echo "configure: failed program was:" >&5
7497   cat conftest.$ac_ext >&5
7498   rm -fr conftest*
7499   ol_cv_pthread_kthread=no
7500 fi
7501 rm -fr conftest*
7502 fi
7503
7504
7505                 # restore the LIBS
7506                 LIBS="$ol_LIBS"
7507         
7508 fi
7509
7510 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7511
7512         if test $ol_cv_pthread_kthread = yes ; then
7513                 ol_link_pthreads="-kthread"
7514                 ol_link_threads=posix
7515         fi
7516 fi
7517
7518                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7519 if test "$ol_link_threads" = no ; then
7520         # try -pthread
7521         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7522 echo "configure:7523: checking for pthread link with -pthread" >&5
7523 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7524   echo $ac_n "(cached) $ac_c" 1>&6
7525 else
7526   
7527                 # save the flags
7528                 ol_LIBS="$LIBS"
7529                 LIBS="-pthread $LIBS"
7530
7531                 if test "$cross_compiling" = yes; then
7532   cat > conftest.$ac_ext <<EOF
7533 #line 7534 "configure"
7534 #include "confdefs.h"
7535 /* pthread test headers */
7536 #include <pthread.h>
7537 #ifndef NULL
7538 #define NULL (void*)0
7539 #endif
7540
7541 static void *task(p)
7542         void *p;
7543 {
7544         return (void *) (p == NULL);
7545 }
7546
7547 int main() {
7548
7549         /* pthread test function */
7550         pthread_t t;
7551         int status;
7552 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7553         /* This system (e.g. AIX) defaults detached; must override */
7554         pthread_attr_t attr;
7555
7556         status = pthread_attr_init(&attr);
7557         if( status ) exit( status );
7558
7559         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7560         if( status ) exit( status );
7561
7562 #define ATTR    &attr
7563 #else
7564 #if HAVE_PTHREADS_D4
7565 #define ATTR    pthread_attr_default
7566 #else
7567 #define ATTR    NULL
7568 #endif
7569 #endif
7570         /* make sure pthread_create() isn't just a stub */
7571         status = pthread_create(&t, ATTR, task, NULL);
7572         if( status ) exit( status );
7573
7574         /* make sure pthread_detach() isn't just a stub */
7575 #if HAVE_PTHREADS_D4
7576         status = pthread_detach( &t );
7577 #else
7578         status = pthread_detach( t );
7579 #endif
7580
7581 #ifdef HAVE_LINUX_THREADS
7582         pthread_kill_other_threads_np();
7583 #endif
7584
7585         exit( status );
7586
7587 ; return 0; }
7588 EOF
7589 if { (eval echo configure:7590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7590   rm -rf conftest*
7591   ol_cv_pthread_pthread=yes
7592 else
7593   echo "configure: failed program was:" >&5
7594   cat conftest.$ac_ext >&5
7595   rm -rf conftest*
7596   ol_cv_pthread_pthread=no
7597 fi
7598 rm -f conftest*
7599 else
7600   cat > conftest.$ac_ext <<EOF
7601 #line 7602 "configure"
7602 #include "confdefs.h"
7603 /* pthread test headers */
7604 #include <pthread.h>
7605 #ifndef NULL
7606 #define NULL (void*)0
7607 #endif
7608
7609 static void *task(p)
7610         void *p;
7611 {
7612         return (void *) (p == NULL);
7613 }
7614
7615
7616 int main(argc, argv)
7617         int argc;
7618         char **argv;
7619 {
7620
7621         /* pthread test function */
7622         pthread_t t;
7623         int status;
7624 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7625         /* This system (e.g. AIX) defaults detached; must override */
7626         pthread_attr_t attr;
7627
7628         status = pthread_attr_init(&attr);
7629         if( status ) exit( status );
7630
7631         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7632         if( status ) exit( status );
7633
7634 #define ATTR    &attr
7635 #else
7636 #if HAVE_PTHREADS_D4
7637 #define ATTR    pthread_attr_default
7638 #else
7639 #define ATTR    NULL
7640 #endif
7641 #endif
7642         /* make sure pthread_create() isn't just a stub */
7643         status = pthread_create(&t, ATTR, task, NULL);
7644         if( status ) exit( status );
7645
7646         /* make sure pthread_detach() isn't just a stub */
7647 #if HAVE_PTHREADS_D4
7648         status = pthread_detach( &t );
7649 #else
7650         status = pthread_detach( t );
7651 #endif
7652
7653 #ifdef HAVE_LINUX_THREADS
7654         pthread_kill_other_threads_np();
7655 #endif
7656
7657         exit( status );
7658
7659 }
7660
7661 EOF
7662 if { (eval echo configure:7663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7663 then
7664   ol_cv_pthread_pthread=yes
7665 else
7666   echo "configure: failed program was:" >&5
7667   cat conftest.$ac_ext >&5
7668   rm -fr conftest*
7669   ol_cv_pthread_pthread=no
7670 fi
7671 rm -fr conftest*
7672 fi
7673
7674
7675                 # restore the LIBS
7676                 LIBS="$ol_LIBS"
7677         
7678 fi
7679
7680 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7681
7682         if test $ol_cv_pthread_pthread = yes ; then
7683                 ol_link_pthreads="-pthread"
7684                 ol_link_threads=posix
7685         fi
7686 fi
7687
7688                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7689 if test "$ol_link_threads" = no ; then
7690         # try -pthreads
7691         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7692 echo "configure:7693: checking for pthread link with -pthreads" >&5
7693 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7694   echo $ac_n "(cached) $ac_c" 1>&6
7695 else
7696   
7697                 # save the flags
7698                 ol_LIBS="$LIBS"
7699                 LIBS="-pthreads $LIBS"
7700
7701                 if test "$cross_compiling" = yes; then
7702   cat > conftest.$ac_ext <<EOF
7703 #line 7704 "configure"
7704 #include "confdefs.h"
7705 /* pthread test headers */
7706 #include <pthread.h>
7707 #ifndef NULL
7708 #define NULL (void*)0
7709 #endif
7710
7711 static void *task(p)
7712         void *p;
7713 {
7714         return (void *) (p == NULL);
7715 }
7716
7717 int main() {
7718
7719         /* pthread test function */
7720         pthread_t t;
7721         int status;
7722 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7723         /* This system (e.g. AIX) defaults detached; must override */
7724         pthread_attr_t attr;
7725
7726         status = pthread_attr_init(&attr);
7727         if( status ) exit( status );
7728
7729         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7730         if( status ) exit( status );
7731
7732 #define ATTR    &attr
7733 #else
7734 #if HAVE_PTHREADS_D4
7735 #define ATTR    pthread_attr_default
7736 #else
7737 #define ATTR    NULL
7738 #endif
7739 #endif
7740         /* make sure pthread_create() isn't just a stub */
7741         status = pthread_create(&t, ATTR, task, NULL);
7742         if( status ) exit( status );
7743
7744         /* make sure pthread_detach() isn't just a stub */
7745 #if HAVE_PTHREADS_D4
7746         status = pthread_detach( &t );
7747 #else
7748         status = pthread_detach( t );
7749 #endif
7750
7751 #ifdef HAVE_LINUX_THREADS
7752         pthread_kill_other_threads_np();
7753 #endif
7754
7755         exit( status );
7756
7757 ; return 0; }
7758 EOF
7759 if { (eval echo configure:7760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7760   rm -rf conftest*
7761   ol_cv_pthread_pthreads=yes
7762 else
7763   echo "configure: failed program was:" >&5
7764   cat conftest.$ac_ext >&5
7765   rm -rf conftest*
7766   ol_cv_pthread_pthreads=no
7767 fi
7768 rm -f conftest*
7769 else
7770   cat > conftest.$ac_ext <<EOF
7771 #line 7772 "configure"
7772 #include "confdefs.h"
7773 /* pthread test headers */
7774 #include <pthread.h>
7775 #ifndef NULL
7776 #define NULL (void*)0
7777 #endif
7778
7779 static void *task(p)
7780         void *p;
7781 {
7782         return (void *) (p == NULL);
7783 }
7784
7785
7786 int main(argc, argv)
7787         int argc;
7788         char **argv;
7789 {
7790
7791         /* pthread test function */
7792         pthread_t t;
7793         int status;
7794 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7795         /* This system (e.g. AIX) defaults detached; must override */
7796         pthread_attr_t attr;
7797
7798         status = pthread_attr_init(&attr);
7799         if( status ) exit( status );
7800
7801         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7802         if( status ) exit( status );
7803
7804 #define ATTR    &attr
7805 #else
7806 #if HAVE_PTHREADS_D4
7807 #define ATTR    pthread_attr_default
7808 #else
7809 #define ATTR    NULL
7810 #endif
7811 #endif
7812         /* make sure pthread_create() isn't just a stub */
7813         status = pthread_create(&t, ATTR, task, NULL);
7814         if( status ) exit( status );
7815
7816         /* make sure pthread_detach() isn't just a stub */
7817 #if HAVE_PTHREADS_D4
7818         status = pthread_detach( &t );
7819 #else
7820         status = pthread_detach( t );
7821 #endif
7822
7823 #ifdef HAVE_LINUX_THREADS
7824         pthread_kill_other_threads_np();
7825 #endif
7826
7827         exit( status );
7828
7829 }
7830
7831 EOF
7832 if { (eval echo configure:7833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7833 then
7834   ol_cv_pthread_pthreads=yes
7835 else
7836   echo "configure: failed program was:" >&5
7837   cat conftest.$ac_ext >&5
7838   rm -fr conftest*
7839   ol_cv_pthread_pthreads=no
7840 fi
7841 rm -fr conftest*
7842 fi
7843
7844
7845                 # restore the LIBS
7846                 LIBS="$ol_LIBS"
7847         
7848 fi
7849
7850 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7851
7852         if test $ol_cv_pthread_pthreads = yes ; then
7853                 ol_link_pthreads="-pthreads"
7854                 ol_link_threads=posix
7855         fi
7856 fi
7857
7858                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7859 if test "$ol_link_threads" = no ; then
7860         # try -mthreads
7861         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7862 echo "configure:7863: checking for pthread link with -mthreads" >&5
7863 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7864   echo $ac_n "(cached) $ac_c" 1>&6
7865 else
7866   
7867                 # save the flags
7868                 ol_LIBS="$LIBS"
7869                 LIBS="-mthreads $LIBS"
7870
7871                 if test "$cross_compiling" = yes; then
7872   cat > conftest.$ac_ext <<EOF
7873 #line 7874 "configure"
7874 #include "confdefs.h"
7875 /* pthread test headers */
7876 #include <pthread.h>
7877 #ifndef NULL
7878 #define NULL (void*)0
7879 #endif
7880
7881 static void *task(p)
7882         void *p;
7883 {
7884         return (void *) (p == NULL);
7885 }
7886
7887 int main() {
7888
7889         /* pthread test function */
7890         pthread_t t;
7891         int status;
7892 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7893         /* This system (e.g. AIX) defaults detached; must override */
7894         pthread_attr_t attr;
7895
7896         status = pthread_attr_init(&attr);
7897         if( status ) exit( status );
7898
7899         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7900         if( status ) exit( status );
7901
7902 #define ATTR    &attr
7903 #else
7904 #if HAVE_PTHREADS_D4
7905 #define ATTR    pthread_attr_default
7906 #else
7907 #define ATTR    NULL
7908 #endif
7909 #endif
7910         /* make sure pthread_create() isn't just a stub */
7911         status = pthread_create(&t, ATTR, task, NULL);
7912         if( status ) exit( status );
7913
7914         /* make sure pthread_detach() isn't just a stub */
7915 #if HAVE_PTHREADS_D4
7916         status = pthread_detach( &t );
7917 #else
7918         status = pthread_detach( t );
7919 #endif
7920
7921 #ifdef HAVE_LINUX_THREADS
7922         pthread_kill_other_threads_np();
7923 #endif
7924
7925         exit( status );
7926
7927 ; return 0; }
7928 EOF
7929 if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7930   rm -rf conftest*
7931   ol_cv_pthread_mthreads=yes
7932 else
7933   echo "configure: failed program was:" >&5
7934   cat conftest.$ac_ext >&5
7935   rm -rf conftest*
7936   ol_cv_pthread_mthreads=no
7937 fi
7938 rm -f conftest*
7939 else
7940   cat > conftest.$ac_ext <<EOF
7941 #line 7942 "configure"
7942 #include "confdefs.h"
7943 /* pthread test headers */
7944 #include <pthread.h>
7945 #ifndef NULL
7946 #define NULL (void*)0
7947 #endif
7948
7949 static void *task(p)
7950         void *p;
7951 {
7952         return (void *) (p == NULL);
7953 }
7954
7955
7956 int main(argc, argv)
7957         int argc;
7958         char **argv;
7959 {
7960
7961         /* pthread test function */
7962         pthread_t t;
7963         int status;
7964 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7965         /* This system (e.g. AIX) defaults detached; must override */
7966         pthread_attr_t attr;
7967
7968         status = pthread_attr_init(&attr);
7969         if( status ) exit( status );
7970
7971         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7972         if( status ) exit( status );
7973
7974 #define ATTR    &attr
7975 #else
7976 #if HAVE_PTHREADS_D4
7977 #define ATTR    pthread_attr_default
7978 #else
7979 #define ATTR    NULL
7980 #endif
7981 #endif
7982         /* make sure pthread_create() isn't just a stub */
7983         status = pthread_create(&t, ATTR, task, NULL);
7984         if( status ) exit( status );
7985
7986         /* make sure pthread_detach() isn't just a stub */
7987 #if HAVE_PTHREADS_D4
7988         status = pthread_detach( &t );
7989 #else
7990         status = pthread_detach( t );
7991 #endif
7992
7993 #ifdef HAVE_LINUX_THREADS
7994         pthread_kill_other_threads_np();
7995 #endif
7996
7997         exit( status );
7998
7999 }
8000
8001 EOF
8002 if { (eval echo configure:8003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8003 then
8004   ol_cv_pthread_mthreads=yes
8005 else
8006   echo "configure: failed program was:" >&5
8007   cat conftest.$ac_ext >&5
8008   rm -fr conftest*
8009   ol_cv_pthread_mthreads=no
8010 fi
8011 rm -fr conftest*
8012 fi
8013
8014
8015                 # restore the LIBS
8016                 LIBS="$ol_LIBS"
8017         
8018 fi
8019
8020 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8021
8022         if test $ol_cv_pthread_mthreads = yes ; then
8023                 ol_link_pthreads="-mthreads"
8024                 ol_link_threads=posix
8025         fi
8026 fi
8027
8028                 # Pthread try link: -thread (ol_cv_pthread_thread)
8029 if test "$ol_link_threads" = no ; then
8030         # try -thread
8031         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8032 echo "configure:8033: checking for pthread link with -thread" >&5
8033 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8034   echo $ac_n "(cached) $ac_c" 1>&6
8035 else
8036   
8037                 # save the flags
8038                 ol_LIBS="$LIBS"
8039                 LIBS="-thread $LIBS"
8040
8041                 if test "$cross_compiling" = yes; then
8042   cat > conftest.$ac_ext <<EOF
8043 #line 8044 "configure"
8044 #include "confdefs.h"
8045 /* pthread test headers */
8046 #include <pthread.h>
8047 #ifndef NULL
8048 #define NULL (void*)0
8049 #endif
8050
8051 static void *task(p)
8052         void *p;
8053 {
8054         return (void *) (p == NULL);
8055 }
8056
8057 int main() {
8058
8059         /* pthread test function */
8060         pthread_t t;
8061         int status;
8062 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8063         /* This system (e.g. AIX) defaults detached; must override */
8064         pthread_attr_t attr;
8065
8066         status = pthread_attr_init(&attr);
8067         if( status ) exit( status );
8068
8069         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8070         if( status ) exit( status );
8071
8072 #define ATTR    &attr
8073 #else
8074 #if HAVE_PTHREADS_D4
8075 #define ATTR    pthread_attr_default
8076 #else
8077 #define ATTR    NULL
8078 #endif
8079 #endif
8080         /* make sure pthread_create() isn't just a stub */
8081         status = pthread_create(&t, ATTR, task, NULL);
8082         if( status ) exit( status );
8083
8084         /* make sure pthread_detach() isn't just a stub */
8085 #if HAVE_PTHREADS_D4
8086         status = pthread_detach( &t );
8087 #else
8088         status = pthread_detach( t );
8089 #endif
8090
8091 #ifdef HAVE_LINUX_THREADS
8092         pthread_kill_other_threads_np();
8093 #endif
8094
8095         exit( status );
8096
8097 ; return 0; }
8098 EOF
8099 if { (eval echo configure:8100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8100   rm -rf conftest*
8101   ol_cv_pthread_thread=yes
8102 else
8103   echo "configure: failed program was:" >&5
8104   cat conftest.$ac_ext >&5
8105   rm -rf conftest*
8106   ol_cv_pthread_thread=no
8107 fi
8108 rm -f conftest*
8109 else
8110   cat > conftest.$ac_ext <<EOF
8111 #line 8112 "configure"
8112 #include "confdefs.h"
8113 /* pthread test headers */
8114 #include <pthread.h>
8115 #ifndef NULL
8116 #define NULL (void*)0
8117 #endif
8118
8119 static void *task(p)
8120         void *p;
8121 {
8122         return (void *) (p == NULL);
8123 }
8124
8125
8126 int main(argc, argv)
8127         int argc;
8128         char **argv;
8129 {
8130
8131         /* pthread test function */
8132         pthread_t t;
8133         int status;
8134 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8135         /* This system (e.g. AIX) defaults detached; must override */
8136         pthread_attr_t attr;
8137
8138         status = pthread_attr_init(&attr);
8139         if( status ) exit( status );
8140
8141         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8142         if( status ) exit( status );
8143
8144 #define ATTR    &attr
8145 #else
8146 #if HAVE_PTHREADS_D4
8147 #define ATTR    pthread_attr_default
8148 #else
8149 #define ATTR    NULL
8150 #endif
8151 #endif
8152         /* make sure pthread_create() isn't just a stub */
8153         status = pthread_create(&t, ATTR, task, NULL);
8154         if( status ) exit( status );
8155
8156         /* make sure pthread_detach() isn't just a stub */
8157 #if HAVE_PTHREADS_D4
8158         status = pthread_detach( &t );
8159 #else
8160         status = pthread_detach( t );
8161 #endif
8162
8163 #ifdef HAVE_LINUX_THREADS
8164         pthread_kill_other_threads_np();
8165 #endif
8166
8167         exit( status );
8168
8169 }
8170
8171 EOF
8172 if { (eval echo configure:8173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8173 then
8174   ol_cv_pthread_thread=yes
8175 else
8176   echo "configure: failed program was:" >&5
8177   cat conftest.$ac_ext >&5
8178   rm -fr conftest*
8179   ol_cv_pthread_thread=no
8180 fi
8181 rm -fr conftest*
8182 fi
8183
8184
8185                 # restore the LIBS
8186                 LIBS="$ol_LIBS"
8187         
8188 fi
8189
8190 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8191
8192         if test $ol_cv_pthread_thread = yes ; then
8193                 ol_link_pthreads="-thread"
8194                 ol_link_threads=posix
8195         fi
8196 fi
8197
8198
8199                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8200 if test "$ol_link_threads" = no ; then
8201         # try -lpthread -lmach -lexc -lc_r
8202         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8203 echo "configure:8204: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8204 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8205   echo $ac_n "(cached) $ac_c" 1>&6
8206 else
8207   
8208                 # save the flags
8209                 ol_LIBS="$LIBS"
8210                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8211
8212                 if test "$cross_compiling" = yes; then
8213   cat > conftest.$ac_ext <<EOF
8214 #line 8215 "configure"
8215 #include "confdefs.h"
8216 /* pthread test headers */
8217 #include <pthread.h>
8218 #ifndef NULL
8219 #define NULL (void*)0
8220 #endif
8221
8222 static void *task(p)
8223         void *p;
8224 {
8225         return (void *) (p == NULL);
8226 }
8227
8228 int main() {
8229
8230         /* pthread test function */
8231         pthread_t t;
8232         int status;
8233 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8234         /* This system (e.g. AIX) defaults detached; must override */
8235         pthread_attr_t attr;
8236
8237         status = pthread_attr_init(&attr);
8238         if( status ) exit( status );
8239
8240         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8241         if( status ) exit( status );
8242
8243 #define ATTR    &attr
8244 #else
8245 #if HAVE_PTHREADS_D4
8246 #define ATTR    pthread_attr_default
8247 #else
8248 #define ATTR    NULL
8249 #endif
8250 #endif
8251         /* make sure pthread_create() isn't just a stub */
8252         status = pthread_create(&t, ATTR, task, NULL);
8253         if( status ) exit( status );
8254
8255         /* make sure pthread_detach() isn't just a stub */
8256 #if HAVE_PTHREADS_D4
8257         status = pthread_detach( &t );
8258 #else
8259         status = pthread_detach( t );
8260 #endif
8261
8262 #ifdef HAVE_LINUX_THREADS
8263         pthread_kill_other_threads_np();
8264 #endif
8265
8266         exit( status );
8267
8268 ; return 0; }
8269 EOF
8270 if { (eval echo configure:8271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8271   rm -rf conftest*
8272   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8273 else
8274   echo "configure: failed program was:" >&5
8275   cat conftest.$ac_ext >&5
8276   rm -rf conftest*
8277   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8278 fi
8279 rm -f conftest*
8280 else
8281   cat > conftest.$ac_ext <<EOF
8282 #line 8283 "configure"
8283 #include "confdefs.h"
8284 /* pthread test headers */
8285 #include <pthread.h>
8286 #ifndef NULL
8287 #define NULL (void*)0
8288 #endif
8289
8290 static void *task(p)
8291         void *p;
8292 {
8293         return (void *) (p == NULL);
8294 }
8295
8296
8297 int main(argc, argv)
8298         int argc;
8299         char **argv;
8300 {
8301
8302         /* pthread test function */
8303         pthread_t t;
8304         int status;
8305 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8306         /* This system (e.g. AIX) defaults detached; must override */
8307         pthread_attr_t attr;
8308
8309         status = pthread_attr_init(&attr);
8310         if( status ) exit( status );
8311
8312         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8313         if( status ) exit( status );
8314
8315 #define ATTR    &attr
8316 #else
8317 #if HAVE_PTHREADS_D4
8318 #define ATTR    pthread_attr_default
8319 #else
8320 #define ATTR    NULL
8321 #endif
8322 #endif
8323         /* make sure pthread_create() isn't just a stub */
8324         status = pthread_create(&t, ATTR, task, NULL);
8325         if( status ) exit( status );
8326
8327         /* make sure pthread_detach() isn't just a stub */
8328 #if HAVE_PTHREADS_D4
8329         status = pthread_detach( &t );
8330 #else
8331         status = pthread_detach( t );
8332 #endif
8333
8334 #ifdef HAVE_LINUX_THREADS
8335         pthread_kill_other_threads_np();
8336 #endif
8337
8338         exit( status );
8339
8340 }
8341
8342 EOF
8343 if { (eval echo configure:8344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8344 then
8345   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8346 else
8347   echo "configure: failed program was:" >&5
8348   cat conftest.$ac_ext >&5
8349   rm -fr conftest*
8350   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8351 fi
8352 rm -fr conftest*
8353 fi
8354
8355
8356                 # restore the LIBS
8357                 LIBS="$ol_LIBS"
8358         
8359 fi
8360
8361 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8362
8363         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8364                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8365                 ol_link_threads=posix
8366         fi
8367 fi
8368
8369                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8370 if test "$ol_link_threads" = no ; then
8371         # try -lpthread -lmach -lexc
8372         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8373 echo "configure:8374: checking for pthread link with -lpthread -lmach -lexc" >&5
8374 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8375   echo $ac_n "(cached) $ac_c" 1>&6
8376 else
8377   
8378                 # save the flags
8379                 ol_LIBS="$LIBS"
8380                 LIBS="-lpthread -lmach -lexc $LIBS"
8381
8382                 if test "$cross_compiling" = yes; then
8383   cat > conftest.$ac_ext <<EOF
8384 #line 8385 "configure"
8385 #include "confdefs.h"
8386 /* pthread test headers */
8387 #include <pthread.h>
8388 #ifndef NULL
8389 #define NULL (void*)0
8390 #endif
8391
8392 static void *task(p)
8393         void *p;
8394 {
8395         return (void *) (p == NULL);
8396 }
8397
8398 int main() {
8399
8400         /* pthread test function */
8401         pthread_t t;
8402         int status;
8403 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8404         /* This system (e.g. AIX) defaults detached; must override */
8405         pthread_attr_t attr;
8406
8407         status = pthread_attr_init(&attr);
8408         if( status ) exit( status );
8409
8410         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8411         if( status ) exit( status );
8412
8413 #define ATTR    &attr
8414 #else
8415 #if HAVE_PTHREADS_D4
8416 #define ATTR    pthread_attr_default
8417 #else
8418 #define ATTR    NULL
8419 #endif
8420 #endif
8421         /* make sure pthread_create() isn't just a stub */
8422         status = pthread_create(&t, ATTR, task, NULL);
8423         if( status ) exit( status );
8424
8425         /* make sure pthread_detach() isn't just a stub */
8426 #if HAVE_PTHREADS_D4
8427         status = pthread_detach( &t );
8428 #else
8429         status = pthread_detach( t );
8430 #endif
8431
8432 #ifdef HAVE_LINUX_THREADS
8433         pthread_kill_other_threads_np();
8434 #endif
8435
8436         exit( status );
8437
8438 ; return 0; }
8439 EOF
8440 if { (eval echo configure:8441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8441   rm -rf conftest*
8442   ol_cv_pthread_lpthread_lmach_lexc=yes
8443 else
8444   echo "configure: failed program was:" >&5
8445   cat conftest.$ac_ext >&5
8446   rm -rf conftest*
8447   ol_cv_pthread_lpthread_lmach_lexc=no
8448 fi
8449 rm -f conftest*
8450 else
8451   cat > conftest.$ac_ext <<EOF
8452 #line 8453 "configure"
8453 #include "confdefs.h"
8454 /* pthread test headers */
8455 #include <pthread.h>
8456 #ifndef NULL
8457 #define NULL (void*)0
8458 #endif
8459
8460 static void *task(p)
8461         void *p;
8462 {
8463         return (void *) (p == NULL);
8464 }
8465
8466
8467 int main(argc, argv)
8468         int argc;
8469         char **argv;
8470 {
8471
8472         /* pthread test function */
8473         pthread_t t;
8474         int status;
8475 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8476         /* This system (e.g. AIX) defaults detached; must override */
8477         pthread_attr_t attr;
8478
8479         status = pthread_attr_init(&attr);
8480         if( status ) exit( status );
8481
8482         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8483         if( status ) exit( status );
8484
8485 #define ATTR    &attr
8486 #else
8487 #if HAVE_PTHREADS_D4
8488 #define ATTR    pthread_attr_default
8489 #else
8490 #define ATTR    NULL
8491 #endif
8492 #endif
8493         /* make sure pthread_create() isn't just a stub */
8494         status = pthread_create(&t, ATTR, task, NULL);
8495         if( status ) exit( status );
8496
8497         /* make sure pthread_detach() isn't just a stub */
8498 #if HAVE_PTHREADS_D4
8499         status = pthread_detach( &t );
8500 #else
8501         status = pthread_detach( t );
8502 #endif
8503
8504 #ifdef HAVE_LINUX_THREADS
8505         pthread_kill_other_threads_np();
8506 #endif
8507
8508         exit( status );
8509
8510 }
8511
8512 EOF
8513 if { (eval echo configure:8514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8514 then
8515   ol_cv_pthread_lpthread_lmach_lexc=yes
8516 else
8517   echo "configure: failed program was:" >&5
8518   cat conftest.$ac_ext >&5
8519   rm -fr conftest*
8520   ol_cv_pthread_lpthread_lmach_lexc=no
8521 fi
8522 rm -fr conftest*
8523 fi
8524
8525
8526                 # restore the LIBS
8527                 LIBS="$ol_LIBS"
8528         
8529 fi
8530
8531 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8532
8533         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8534                 ol_link_pthreads="-lpthread -lmach -lexc"
8535                 ol_link_threads=posix
8536         fi
8537 fi
8538
8539
8540                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8541 if test "$ol_link_threads" = no ; then
8542         # try -lpthread -Wl,-woff,85
8543         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8544 echo "configure:8545: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8545 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8546   echo $ac_n "(cached) $ac_c" 1>&6
8547 else
8548   
8549                 # save the flags
8550                 ol_LIBS="$LIBS"
8551                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8552
8553                 if test "$cross_compiling" = yes; then
8554   cat > conftest.$ac_ext <<EOF
8555 #line 8556 "configure"
8556 #include "confdefs.h"
8557 /* pthread test headers */
8558 #include <pthread.h>
8559 #ifndef NULL
8560 #define NULL (void*)0
8561 #endif
8562
8563 static void *task(p)
8564         void *p;
8565 {
8566         return (void *) (p == NULL);
8567 }
8568
8569 int main() {
8570
8571         /* pthread test function */
8572         pthread_t t;
8573         int status;
8574 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8575         /* This system (e.g. AIX) defaults detached; must override */
8576         pthread_attr_t attr;
8577
8578         status = pthread_attr_init(&attr);
8579         if( status ) exit( status );
8580
8581         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8582         if( status ) exit( status );
8583
8584 #define ATTR    &attr
8585 #else
8586 #if HAVE_PTHREADS_D4
8587 #define ATTR    pthread_attr_default
8588 #else
8589 #define ATTR    NULL
8590 #endif
8591 #endif
8592         /* make sure pthread_create() isn't just a stub */
8593         status = pthread_create(&t, ATTR, task, NULL);
8594         if( status ) exit( status );
8595
8596         /* make sure pthread_detach() isn't just a stub */
8597 #if HAVE_PTHREADS_D4
8598         status = pthread_detach( &t );
8599 #else
8600         status = pthread_detach( t );
8601 #endif
8602
8603 #ifdef HAVE_LINUX_THREADS
8604         pthread_kill_other_threads_np();
8605 #endif
8606
8607         exit( status );
8608
8609 ; return 0; }
8610 EOF
8611 if { (eval echo configure:8612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8612   rm -rf conftest*
8613   ol_cv_pthread_lib_lpthread_woff=yes
8614 else
8615   echo "configure: failed program was:" >&5
8616   cat conftest.$ac_ext >&5
8617   rm -rf conftest*
8618   ol_cv_pthread_lib_lpthread_woff=no
8619 fi
8620 rm -f conftest*
8621 else
8622   cat > conftest.$ac_ext <<EOF
8623 #line 8624 "configure"
8624 #include "confdefs.h"
8625 /* pthread test headers */
8626 #include <pthread.h>
8627 #ifndef NULL
8628 #define NULL (void*)0
8629 #endif
8630
8631 static void *task(p)
8632         void *p;
8633 {
8634         return (void *) (p == NULL);
8635 }
8636
8637
8638 int main(argc, argv)
8639         int argc;
8640         char **argv;
8641 {
8642
8643         /* pthread test function */
8644         pthread_t t;
8645         int status;
8646 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8647         /* This system (e.g. AIX) defaults detached; must override */
8648         pthread_attr_t attr;
8649
8650         status = pthread_attr_init(&attr);
8651         if( status ) exit( status );
8652
8653         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8654         if( status ) exit( status );
8655
8656 #define ATTR    &attr
8657 #else
8658 #if HAVE_PTHREADS_D4
8659 #define ATTR    pthread_attr_default
8660 #else
8661 #define ATTR    NULL
8662 #endif
8663 #endif
8664         /* make sure pthread_create() isn't just a stub */
8665         status = pthread_create(&t, ATTR, task, NULL);
8666         if( status ) exit( status );
8667
8668         /* make sure pthread_detach() isn't just a stub */
8669 #if HAVE_PTHREADS_D4
8670         status = pthread_detach( &t );
8671 #else
8672         status = pthread_detach( t );
8673 #endif
8674
8675 #ifdef HAVE_LINUX_THREADS
8676         pthread_kill_other_threads_np();
8677 #endif
8678
8679         exit( status );
8680
8681 }
8682
8683 EOF
8684 if { (eval echo configure:8685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8685 then
8686   ol_cv_pthread_lib_lpthread_woff=yes
8687 else
8688   echo "configure: failed program was:" >&5
8689   cat conftest.$ac_ext >&5
8690   rm -fr conftest*
8691   ol_cv_pthread_lib_lpthread_woff=no
8692 fi
8693 rm -fr conftest*
8694 fi
8695
8696
8697                 # restore the LIBS
8698                 LIBS="$ol_LIBS"
8699         
8700 fi
8701
8702 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8703
8704         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8705                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8706                 ol_link_threads=posix
8707         fi
8708 fi
8709
8710
8711                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8712 if test "$ol_link_threads" = no ; then
8713         # try -lpthread
8714         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8715 echo "configure:8716: checking for pthread link with -lpthread" >&5
8716 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8717   echo $ac_n "(cached) $ac_c" 1>&6
8718 else
8719   
8720                 # save the flags
8721                 ol_LIBS="$LIBS"
8722                 LIBS="-lpthread $LIBS"
8723
8724                 if test "$cross_compiling" = yes; then
8725   cat > conftest.$ac_ext <<EOF
8726 #line 8727 "configure"
8727 #include "confdefs.h"
8728 /* pthread test headers */
8729 #include <pthread.h>
8730 #ifndef NULL
8731 #define NULL (void*)0
8732 #endif
8733
8734 static void *task(p)
8735         void *p;
8736 {
8737         return (void *) (p == NULL);
8738 }
8739
8740 int main() {
8741
8742         /* pthread test function */
8743         pthread_t t;
8744         int status;
8745 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8746         /* This system (e.g. AIX) defaults detached; must override */
8747         pthread_attr_t attr;
8748
8749         status = pthread_attr_init(&attr);
8750         if( status ) exit( status );
8751
8752         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8753         if( status ) exit( status );
8754
8755 #define ATTR    &attr
8756 #else
8757 #if HAVE_PTHREADS_D4
8758 #define ATTR    pthread_attr_default
8759 #else
8760 #define ATTR    NULL
8761 #endif
8762 #endif
8763         /* make sure pthread_create() isn't just a stub */
8764         status = pthread_create(&t, ATTR, task, NULL);
8765         if( status ) exit( status );
8766
8767         /* make sure pthread_detach() isn't just a stub */
8768 #if HAVE_PTHREADS_D4
8769         status = pthread_detach( &t );
8770 #else
8771         status = pthread_detach( t );
8772 #endif
8773
8774 #ifdef HAVE_LINUX_THREADS
8775         pthread_kill_other_threads_np();
8776 #endif
8777
8778         exit( status );
8779
8780 ; return 0; }
8781 EOF
8782 if { (eval echo configure:8783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8783   rm -rf conftest*
8784   ol_cv_pthread_lpthread=yes
8785 else
8786   echo "configure: failed program was:" >&5
8787   cat conftest.$ac_ext >&5
8788   rm -rf conftest*
8789   ol_cv_pthread_lpthread=no
8790 fi
8791 rm -f conftest*
8792 else
8793   cat > conftest.$ac_ext <<EOF
8794 #line 8795 "configure"
8795 #include "confdefs.h"
8796 /* pthread test headers */
8797 #include <pthread.h>
8798 #ifndef NULL
8799 #define NULL (void*)0
8800 #endif
8801
8802 static void *task(p)
8803         void *p;
8804 {
8805         return (void *) (p == NULL);
8806 }
8807
8808
8809 int main(argc, argv)
8810         int argc;
8811         char **argv;
8812 {
8813
8814         /* pthread test function */
8815         pthread_t t;
8816         int status;
8817 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8818         /* This system (e.g. AIX) defaults detached; must override */
8819         pthread_attr_t attr;
8820
8821         status = pthread_attr_init(&attr);
8822         if( status ) exit( status );
8823
8824         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8825         if( status ) exit( status );
8826
8827 #define ATTR    &attr
8828 #else
8829 #if HAVE_PTHREADS_D4
8830 #define ATTR    pthread_attr_default
8831 #else
8832 #define ATTR    NULL
8833 #endif
8834 #endif
8835         /* make sure pthread_create() isn't just a stub */
8836         status = pthread_create(&t, ATTR, task, NULL);
8837         if( status ) exit( status );
8838
8839         /* make sure pthread_detach() isn't just a stub */
8840 #if HAVE_PTHREADS_D4
8841         status = pthread_detach( &t );
8842 #else
8843         status = pthread_detach( t );
8844 #endif
8845
8846 #ifdef HAVE_LINUX_THREADS
8847         pthread_kill_other_threads_np();
8848 #endif
8849
8850         exit( status );
8851
8852 }
8853
8854 EOF
8855 if { (eval echo configure:8856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8856 then
8857   ol_cv_pthread_lpthread=yes
8858 else
8859   echo "configure: failed program was:" >&5
8860   cat conftest.$ac_ext >&5
8861   rm -fr conftest*
8862   ol_cv_pthread_lpthread=no
8863 fi
8864 rm -fr conftest*
8865 fi
8866
8867
8868                 # restore the LIBS
8869                 LIBS="$ol_LIBS"
8870         
8871 fi
8872
8873 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8874
8875         if test $ol_cv_pthread_lpthread = yes ; then
8876                 ol_link_pthreads="-lpthread"
8877                 ol_link_threads=posix
8878         fi
8879 fi
8880
8881                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8882 if test "$ol_link_threads" = no ; then
8883         # try -lc_r
8884         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8885 echo "configure:8886: checking for pthread link with -lc_r" >&5
8886 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8887   echo $ac_n "(cached) $ac_c" 1>&6
8888 else
8889   
8890                 # save the flags
8891                 ol_LIBS="$LIBS"
8892                 LIBS="-lc_r $LIBS"
8893
8894                 if test "$cross_compiling" = yes; then
8895   cat > conftest.$ac_ext <<EOF
8896 #line 8897 "configure"
8897 #include "confdefs.h"
8898 /* pthread test headers */
8899 #include <pthread.h>
8900 #ifndef NULL
8901 #define NULL (void*)0
8902 #endif
8903
8904 static void *task(p)
8905         void *p;
8906 {
8907         return (void *) (p == NULL);
8908 }
8909
8910 int main() {
8911
8912         /* pthread test function */
8913         pthread_t t;
8914         int status;
8915 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8916         /* This system (e.g. AIX) defaults detached; must override */
8917         pthread_attr_t attr;
8918
8919         status = pthread_attr_init(&attr);
8920         if( status ) exit( status );
8921
8922         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8923         if( status ) exit( status );
8924
8925 #define ATTR    &attr
8926 #else
8927 #if HAVE_PTHREADS_D4
8928 #define ATTR    pthread_attr_default
8929 #else
8930 #define ATTR    NULL
8931 #endif
8932 #endif
8933         /* make sure pthread_create() isn't just a stub */
8934         status = pthread_create(&t, ATTR, task, NULL);
8935         if( status ) exit( status );
8936
8937         /* make sure pthread_detach() isn't just a stub */
8938 #if HAVE_PTHREADS_D4
8939         status = pthread_detach( &t );
8940 #else
8941         status = pthread_detach( t );
8942 #endif
8943
8944 #ifdef HAVE_LINUX_THREADS
8945         pthread_kill_other_threads_np();
8946 #endif
8947
8948         exit( status );
8949
8950 ; return 0; }
8951 EOF
8952 if { (eval echo configure:8953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8953   rm -rf conftest*
8954   ol_cv_pthread_lc_r=yes
8955 else
8956   echo "configure: failed program was:" >&5
8957   cat conftest.$ac_ext >&5
8958   rm -rf conftest*
8959   ol_cv_pthread_lc_r=no
8960 fi
8961 rm -f conftest*
8962 else
8963   cat > conftest.$ac_ext <<EOF
8964 #line 8965 "configure"
8965 #include "confdefs.h"
8966 /* pthread test headers */
8967 #include <pthread.h>
8968 #ifndef NULL
8969 #define NULL (void*)0
8970 #endif
8971
8972 static void *task(p)
8973         void *p;
8974 {
8975         return (void *) (p == NULL);
8976 }
8977
8978
8979 int main(argc, argv)
8980         int argc;
8981         char **argv;
8982 {
8983
8984         /* pthread test function */
8985         pthread_t t;
8986         int status;
8987 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8988         /* This system (e.g. AIX) defaults detached; must override */
8989         pthread_attr_t attr;
8990
8991         status = pthread_attr_init(&attr);
8992         if( status ) exit( status );
8993
8994         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8995         if( status ) exit( status );
8996
8997 #define ATTR    &attr
8998 #else
8999 #if HAVE_PTHREADS_D4
9000 #define ATTR    pthread_attr_default
9001 #else
9002 #define ATTR    NULL
9003 #endif
9004 #endif
9005         /* make sure pthread_create() isn't just a stub */
9006         status = pthread_create(&t, ATTR, task, NULL);
9007         if( status ) exit( status );
9008
9009         /* make sure pthread_detach() isn't just a stub */
9010 #if HAVE_PTHREADS_D4
9011         status = pthread_detach( &t );
9012 #else
9013         status = pthread_detach( t );
9014 #endif
9015
9016 #ifdef HAVE_LINUX_THREADS
9017         pthread_kill_other_threads_np();
9018 #endif
9019
9020         exit( status );
9021
9022 }
9023
9024 EOF
9025 if { (eval echo configure:9026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9026 then
9027   ol_cv_pthread_lc_r=yes
9028 else
9029   echo "configure: failed program was:" >&5
9030   cat conftest.$ac_ext >&5
9031   rm -fr conftest*
9032   ol_cv_pthread_lc_r=no
9033 fi
9034 rm -fr conftest*
9035 fi
9036
9037
9038                 # restore the LIBS
9039                 LIBS="$ol_LIBS"
9040         
9041 fi
9042
9043 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9044
9045         if test $ol_cv_pthread_lc_r = yes ; then
9046                 ol_link_pthreads="-lc_r"
9047                 ol_link_threads=posix
9048         fi
9049 fi
9050
9051
9052                 # Pthread try link: -threads (ol_cv_pthread_threads)
9053 if test "$ol_link_threads" = no ; then
9054         # try -threads
9055         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9056 echo "configure:9057: checking for pthread link with -threads" >&5
9057 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9058   echo $ac_n "(cached) $ac_c" 1>&6
9059 else
9060   
9061                 # save the flags
9062                 ol_LIBS="$LIBS"
9063                 LIBS="-threads $LIBS"
9064
9065                 if test "$cross_compiling" = yes; then
9066   cat > conftest.$ac_ext <<EOF
9067 #line 9068 "configure"
9068 #include "confdefs.h"
9069 /* pthread test headers */
9070 #include <pthread.h>
9071 #ifndef NULL
9072 #define NULL (void*)0
9073 #endif
9074
9075 static void *task(p)
9076         void *p;
9077 {
9078         return (void *) (p == NULL);
9079 }
9080
9081 int main() {
9082
9083         /* pthread test function */
9084         pthread_t t;
9085         int status;
9086 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9087         /* This system (e.g. AIX) defaults detached; must override */
9088         pthread_attr_t attr;
9089
9090         status = pthread_attr_init(&attr);
9091         if( status ) exit( status );
9092
9093         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9094         if( status ) exit( status );
9095
9096 #define ATTR    &attr
9097 #else
9098 #if HAVE_PTHREADS_D4
9099 #define ATTR    pthread_attr_default
9100 #else
9101 #define ATTR    NULL
9102 #endif
9103 #endif
9104         /* make sure pthread_create() isn't just a stub */
9105         status = pthread_create(&t, ATTR, task, NULL);
9106         if( status ) exit( status );
9107
9108         /* make sure pthread_detach() isn't just a stub */
9109 #if HAVE_PTHREADS_D4
9110         status = pthread_detach( &t );
9111 #else
9112         status = pthread_detach( t );
9113 #endif
9114
9115 #ifdef HAVE_LINUX_THREADS
9116         pthread_kill_other_threads_np();
9117 #endif
9118
9119         exit( status );
9120
9121 ; return 0; }
9122 EOF
9123 if { (eval echo configure:9124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9124   rm -rf conftest*
9125   ol_cv_pthread_threads=yes
9126 else
9127   echo "configure: failed program was:" >&5
9128   cat conftest.$ac_ext >&5
9129   rm -rf conftest*
9130   ol_cv_pthread_threads=no
9131 fi
9132 rm -f conftest*
9133 else
9134   cat > conftest.$ac_ext <<EOF
9135 #line 9136 "configure"
9136 #include "confdefs.h"
9137 /* pthread test headers */
9138 #include <pthread.h>
9139 #ifndef NULL
9140 #define NULL (void*)0
9141 #endif
9142
9143 static void *task(p)
9144         void *p;
9145 {
9146         return (void *) (p == NULL);
9147 }
9148
9149
9150 int main(argc, argv)
9151         int argc;
9152         char **argv;
9153 {
9154
9155         /* pthread test function */
9156         pthread_t t;
9157         int status;
9158 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9159         /* This system (e.g. AIX) defaults detached; must override */
9160         pthread_attr_t attr;
9161
9162         status = pthread_attr_init(&attr);
9163         if( status ) exit( status );
9164
9165         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9166         if( status ) exit( status );
9167
9168 #define ATTR    &attr
9169 #else
9170 #if HAVE_PTHREADS_D4
9171 #define ATTR    pthread_attr_default
9172 #else
9173 #define ATTR    NULL
9174 #endif
9175 #endif
9176         /* make sure pthread_create() isn't just a stub */
9177         status = pthread_create(&t, ATTR, task, NULL);
9178         if( status ) exit( status );
9179
9180         /* make sure pthread_detach() isn't just a stub */
9181 #if HAVE_PTHREADS_D4
9182         status = pthread_detach( &t );
9183 #else
9184         status = pthread_detach( t );
9185 #endif
9186
9187 #ifdef HAVE_LINUX_THREADS
9188         pthread_kill_other_threads_np();
9189 #endif
9190
9191         exit( status );
9192
9193 }
9194
9195 EOF
9196 if { (eval echo configure:9197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9197 then
9198   ol_cv_pthread_threads=yes
9199 else
9200   echo "configure: failed program was:" >&5
9201   cat conftest.$ac_ext >&5
9202   rm -fr conftest*
9203   ol_cv_pthread_threads=no
9204 fi
9205 rm -fr conftest*
9206 fi
9207
9208
9209                 # restore the LIBS
9210                 LIBS="$ol_LIBS"
9211         
9212 fi
9213
9214 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9215
9216         if test $ol_cv_pthread_threads = yes ; then
9217                 ol_link_pthreads="-threads"
9218                 ol_link_threads=posix
9219         fi
9220 fi
9221
9222
9223                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9224 if test "$ol_link_threads" = no ; then
9225         # try -lpthreads -lmach -lexc -lc_r
9226         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9227 echo "configure:9228: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9228 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9229   echo $ac_n "(cached) $ac_c" 1>&6
9230 else
9231   
9232                 # save the flags
9233                 ol_LIBS="$LIBS"
9234                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9235
9236                 if test "$cross_compiling" = yes; then
9237   cat > conftest.$ac_ext <<EOF
9238 #line 9239 "configure"
9239 #include "confdefs.h"
9240 /* pthread test headers */
9241 #include <pthread.h>
9242 #ifndef NULL
9243 #define NULL (void*)0
9244 #endif
9245
9246 static void *task(p)
9247         void *p;
9248 {
9249         return (void *) (p == NULL);
9250 }
9251
9252 int main() {
9253
9254         /* pthread test function */
9255         pthread_t t;
9256         int status;
9257 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9258         /* This system (e.g. AIX) defaults detached; must override */
9259         pthread_attr_t attr;
9260
9261         status = pthread_attr_init(&attr);
9262         if( status ) exit( status );
9263
9264         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9265         if( status ) exit( status );
9266
9267 #define ATTR    &attr
9268 #else
9269 #if HAVE_PTHREADS_D4
9270 #define ATTR    pthread_attr_default
9271 #else
9272 #define ATTR    NULL
9273 #endif
9274 #endif
9275         /* make sure pthread_create() isn't just a stub */
9276         status = pthread_create(&t, ATTR, task, NULL);
9277         if( status ) exit( status );
9278
9279         /* make sure pthread_detach() isn't just a stub */
9280 #if HAVE_PTHREADS_D4
9281         status = pthread_detach( &t );
9282 #else
9283         status = pthread_detach( t );
9284 #endif
9285
9286 #ifdef HAVE_LINUX_THREADS
9287         pthread_kill_other_threads_np();
9288 #endif
9289
9290         exit( status );
9291
9292 ; return 0; }
9293 EOF
9294 if { (eval echo configure:9295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9295   rm -rf conftest*
9296   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9297 else
9298   echo "configure: failed program was:" >&5
9299   cat conftest.$ac_ext >&5
9300   rm -rf conftest*
9301   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9302 fi
9303 rm -f conftest*
9304 else
9305   cat > conftest.$ac_ext <<EOF
9306 #line 9307 "configure"
9307 #include "confdefs.h"
9308 /* pthread test headers */
9309 #include <pthread.h>
9310 #ifndef NULL
9311 #define NULL (void*)0
9312 #endif
9313
9314 static void *task(p)
9315         void *p;
9316 {
9317         return (void *) (p == NULL);
9318 }
9319
9320
9321 int main(argc, argv)
9322         int argc;
9323         char **argv;
9324 {
9325
9326         /* pthread test function */
9327         pthread_t t;
9328         int status;
9329 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9330         /* This system (e.g. AIX) defaults detached; must override */
9331         pthread_attr_t attr;
9332
9333         status = pthread_attr_init(&attr);
9334         if( status ) exit( status );
9335
9336         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9337         if( status ) exit( status );
9338
9339 #define ATTR    &attr
9340 #else
9341 #if HAVE_PTHREADS_D4
9342 #define ATTR    pthread_attr_default
9343 #else
9344 #define ATTR    NULL
9345 #endif
9346 #endif
9347         /* make sure pthread_create() isn't just a stub */
9348         status = pthread_create(&t, ATTR, task, NULL);
9349         if( status ) exit( status );
9350
9351         /* make sure pthread_detach() isn't just a stub */
9352 #if HAVE_PTHREADS_D4
9353         status = pthread_detach( &t );
9354 #else
9355         status = pthread_detach( t );
9356 #endif
9357
9358 #ifdef HAVE_LINUX_THREADS
9359         pthread_kill_other_threads_np();
9360 #endif
9361
9362         exit( status );
9363
9364 }
9365
9366 EOF
9367 if { (eval echo configure:9368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9368 then
9369   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9370 else
9371   echo "configure: failed program was:" >&5
9372   cat conftest.$ac_ext >&5
9373   rm -fr conftest*
9374   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9375 fi
9376 rm -fr conftest*
9377 fi
9378
9379
9380                 # restore the LIBS
9381                 LIBS="$ol_LIBS"
9382         
9383 fi
9384
9385 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9386
9387         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9388                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9389                 ol_link_threads=posix
9390         fi
9391 fi
9392
9393                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9394 if test "$ol_link_threads" = no ; then
9395         # try -lpthreads -lmach -lexc
9396         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9397 echo "configure:9398: checking for pthread link with -lpthreads -lmach -lexc" >&5
9398 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9399   echo $ac_n "(cached) $ac_c" 1>&6
9400 else
9401   
9402                 # save the flags
9403                 ol_LIBS="$LIBS"
9404                 LIBS="-lpthreads -lmach -lexc $LIBS"
9405
9406                 if test "$cross_compiling" = yes; then
9407   cat > conftest.$ac_ext <<EOF
9408 #line 9409 "configure"
9409 #include "confdefs.h"
9410 /* pthread test headers */
9411 #include <pthread.h>
9412 #ifndef NULL
9413 #define NULL (void*)0
9414 #endif
9415
9416 static void *task(p)
9417         void *p;
9418 {
9419         return (void *) (p == NULL);
9420 }
9421
9422 int main() {
9423
9424         /* pthread test function */
9425         pthread_t t;
9426         int status;
9427 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9428         /* This system (e.g. AIX) defaults detached; must override */
9429         pthread_attr_t attr;
9430
9431         status = pthread_attr_init(&attr);
9432         if( status ) exit( status );
9433
9434         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9435         if( status ) exit( status );
9436
9437 #define ATTR    &attr
9438 #else
9439 #if HAVE_PTHREADS_D4
9440 #define ATTR    pthread_attr_default
9441 #else
9442 #define ATTR    NULL
9443 #endif
9444 #endif
9445         /* make sure pthread_create() isn't just a stub */
9446         status = pthread_create(&t, ATTR, task, NULL);
9447         if( status ) exit( status );
9448
9449         /* make sure pthread_detach() isn't just a stub */
9450 #if HAVE_PTHREADS_D4
9451         status = pthread_detach( &t );
9452 #else
9453         status = pthread_detach( t );
9454 #endif
9455
9456 #ifdef HAVE_LINUX_THREADS
9457         pthread_kill_other_threads_np();
9458 #endif
9459
9460         exit( status );
9461
9462 ; return 0; }
9463 EOF
9464 if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9465   rm -rf conftest*
9466   ol_cv_pthread_lpthreads_lmach_lexc=yes
9467 else
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -rf conftest*
9471   ol_cv_pthread_lpthreads_lmach_lexc=no
9472 fi
9473 rm -f conftest*
9474 else
9475   cat > conftest.$ac_ext <<EOF
9476 #line 9477 "configure"
9477 #include "confdefs.h"
9478 /* pthread test headers */
9479 #include <pthread.h>
9480 #ifndef NULL
9481 #define NULL (void*)0
9482 #endif
9483
9484 static void *task(p)
9485         void *p;
9486 {
9487         return (void *) (p == NULL);
9488 }
9489
9490
9491 int main(argc, argv)
9492         int argc;
9493         char **argv;
9494 {
9495
9496         /* pthread test function */
9497         pthread_t t;
9498         int status;
9499 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9500         /* This system (e.g. AIX) defaults detached; must override */
9501         pthread_attr_t attr;
9502
9503         status = pthread_attr_init(&attr);
9504         if( status ) exit( status );
9505
9506         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9507         if( status ) exit( status );
9508
9509 #define ATTR    &attr
9510 #else
9511 #if HAVE_PTHREADS_D4
9512 #define ATTR    pthread_attr_default
9513 #else
9514 #define ATTR    NULL
9515 #endif
9516 #endif
9517         /* make sure pthread_create() isn't just a stub */
9518         status = pthread_create(&t, ATTR, task, NULL);
9519         if( status ) exit( status );
9520
9521         /* make sure pthread_detach() isn't just a stub */
9522 #if HAVE_PTHREADS_D4
9523         status = pthread_detach( &t );
9524 #else
9525         status = pthread_detach( t );
9526 #endif
9527
9528 #ifdef HAVE_LINUX_THREADS
9529         pthread_kill_other_threads_np();
9530 #endif
9531
9532         exit( status );
9533
9534 }
9535
9536 EOF
9537 if { (eval echo configure:9538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9538 then
9539   ol_cv_pthread_lpthreads_lmach_lexc=yes
9540 else
9541   echo "configure: failed program was:" >&5
9542   cat conftest.$ac_ext >&5
9543   rm -fr conftest*
9544   ol_cv_pthread_lpthreads_lmach_lexc=no
9545 fi
9546 rm -fr conftest*
9547 fi
9548
9549
9550                 # restore the LIBS
9551                 LIBS="$ol_LIBS"
9552         
9553 fi
9554
9555 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9556
9557         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9558                 ol_link_pthreads="-lpthreads -lmach -lexc"
9559                 ol_link_threads=posix
9560         fi
9561 fi
9562
9563                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9564 if test "$ol_link_threads" = no ; then
9565         # try -lpthreads -lexc
9566         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9567 echo "configure:9568: checking for pthread link with -lpthreads -lexc" >&5
9568 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9569   echo $ac_n "(cached) $ac_c" 1>&6
9570 else
9571   
9572                 # save the flags
9573                 ol_LIBS="$LIBS"
9574                 LIBS="-lpthreads -lexc $LIBS"
9575
9576                 if test "$cross_compiling" = yes; then
9577   cat > conftest.$ac_ext <<EOF
9578 #line 9579 "configure"
9579 #include "confdefs.h"
9580 /* pthread test headers */
9581 #include <pthread.h>
9582 #ifndef NULL
9583 #define NULL (void*)0
9584 #endif
9585
9586 static void *task(p)
9587         void *p;
9588 {
9589         return (void *) (p == NULL);
9590 }
9591
9592 int main() {
9593
9594         /* pthread test function */
9595         pthread_t t;
9596         int status;
9597 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9598         /* This system (e.g. AIX) defaults detached; must override */
9599         pthread_attr_t attr;
9600
9601         status = pthread_attr_init(&attr);
9602         if( status ) exit( status );
9603
9604         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9605         if( status ) exit( status );
9606
9607 #define ATTR    &attr
9608 #else
9609 #if HAVE_PTHREADS_D4
9610 #define ATTR    pthread_attr_default
9611 #else
9612 #define ATTR    NULL
9613 #endif
9614 #endif
9615         /* make sure pthread_create() isn't just a stub */
9616         status = pthread_create(&t, ATTR, task, NULL);
9617         if( status ) exit( status );
9618
9619         /* make sure pthread_detach() isn't just a stub */
9620 #if HAVE_PTHREADS_D4
9621         status = pthread_detach( &t );
9622 #else
9623         status = pthread_detach( t );
9624 #endif
9625
9626 #ifdef HAVE_LINUX_THREADS
9627         pthread_kill_other_threads_np();
9628 #endif
9629
9630         exit( status );
9631
9632 ; return 0; }
9633 EOF
9634 if { (eval echo configure:9635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9635   rm -rf conftest*
9636   ol_cv_pthread_lpthreads_lexc=yes
9637 else
9638   echo "configure: failed program was:" >&5
9639   cat conftest.$ac_ext >&5
9640   rm -rf conftest*
9641   ol_cv_pthread_lpthreads_lexc=no
9642 fi
9643 rm -f conftest*
9644 else
9645   cat > conftest.$ac_ext <<EOF
9646 #line 9647 "configure"
9647 #include "confdefs.h"
9648 /* pthread test headers */
9649 #include <pthread.h>
9650 #ifndef NULL
9651 #define NULL (void*)0
9652 #endif
9653
9654 static void *task(p)
9655         void *p;
9656 {
9657         return (void *) (p == NULL);
9658 }
9659
9660
9661 int main(argc, argv)
9662         int argc;
9663         char **argv;
9664 {
9665
9666         /* pthread test function */
9667         pthread_t t;
9668         int status;
9669 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9670         /* This system (e.g. AIX) defaults detached; must override */
9671         pthread_attr_t attr;
9672
9673         status = pthread_attr_init(&attr);
9674         if( status ) exit( status );
9675
9676         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9677         if( status ) exit( status );
9678
9679 #define ATTR    &attr
9680 #else
9681 #if HAVE_PTHREADS_D4
9682 #define ATTR    pthread_attr_default
9683 #else
9684 #define ATTR    NULL
9685 #endif
9686 #endif
9687         /* make sure pthread_create() isn't just a stub */
9688         status = pthread_create(&t, ATTR, task, NULL);
9689         if( status ) exit( status );
9690
9691         /* make sure pthread_detach() isn't just a stub */
9692 #if HAVE_PTHREADS_D4
9693         status = pthread_detach( &t );
9694 #else
9695         status = pthread_detach( t );
9696 #endif
9697
9698 #ifdef HAVE_LINUX_THREADS
9699         pthread_kill_other_threads_np();
9700 #endif
9701
9702         exit( status );
9703
9704 }
9705
9706 EOF
9707 if { (eval echo configure:9708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9708 then
9709   ol_cv_pthread_lpthreads_lexc=yes
9710 else
9711   echo "configure: failed program was:" >&5
9712   cat conftest.$ac_ext >&5
9713   rm -fr conftest*
9714   ol_cv_pthread_lpthreads_lexc=no
9715 fi
9716 rm -fr conftest*
9717 fi
9718
9719
9720                 # restore the LIBS
9721                 LIBS="$ol_LIBS"
9722         
9723 fi
9724
9725 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9726
9727         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9728                 ol_link_pthreads="-lpthreads -lexc"
9729                 ol_link_threads=posix
9730         fi
9731 fi
9732
9733
9734                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9735 if test "$ol_link_threads" = no ; then
9736         # try -lpthreads
9737         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9738 echo "configure:9739: checking for pthread link with -lpthreads" >&5
9739 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9740   echo $ac_n "(cached) $ac_c" 1>&6
9741 else
9742   
9743                 # save the flags
9744                 ol_LIBS="$LIBS"
9745                 LIBS="-lpthreads $LIBS"
9746
9747                 if test "$cross_compiling" = yes; then
9748   cat > conftest.$ac_ext <<EOF
9749 #line 9750 "configure"
9750 #include "confdefs.h"
9751 /* pthread test headers */
9752 #include <pthread.h>
9753 #ifndef NULL
9754 #define NULL (void*)0
9755 #endif
9756
9757 static void *task(p)
9758         void *p;
9759 {
9760         return (void *) (p == NULL);
9761 }
9762
9763 int main() {
9764
9765         /* pthread test function */
9766         pthread_t t;
9767         int status;
9768 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9769         /* This system (e.g. AIX) defaults detached; must override */
9770         pthread_attr_t attr;
9771
9772         status = pthread_attr_init(&attr);
9773         if( status ) exit( status );
9774
9775         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9776         if( status ) exit( status );
9777
9778 #define ATTR    &attr
9779 #else
9780 #if HAVE_PTHREADS_D4
9781 #define ATTR    pthread_attr_default
9782 #else
9783 #define ATTR    NULL
9784 #endif
9785 #endif
9786         /* make sure pthread_create() isn't just a stub */
9787         status = pthread_create(&t, ATTR, task, NULL);
9788         if( status ) exit( status );
9789
9790         /* make sure pthread_detach() isn't just a stub */
9791 #if HAVE_PTHREADS_D4
9792         status = pthread_detach( &t );
9793 #else
9794         status = pthread_detach( t );
9795 #endif
9796
9797 #ifdef HAVE_LINUX_THREADS
9798         pthread_kill_other_threads_np();
9799 #endif
9800
9801         exit( status );
9802
9803 ; return 0; }
9804 EOF
9805 if { (eval echo configure:9806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9806   rm -rf conftest*
9807   ol_cv_pthread_lib_lpthreads=yes
9808 else
9809   echo "configure: failed program was:" >&5
9810   cat conftest.$ac_ext >&5
9811   rm -rf conftest*
9812   ol_cv_pthread_lib_lpthreads=no
9813 fi
9814 rm -f conftest*
9815 else
9816   cat > conftest.$ac_ext <<EOF
9817 #line 9818 "configure"
9818 #include "confdefs.h"
9819 /* pthread test headers */
9820 #include <pthread.h>
9821 #ifndef NULL
9822 #define NULL (void*)0
9823 #endif
9824
9825 static void *task(p)
9826         void *p;
9827 {
9828         return (void *) (p == NULL);
9829 }
9830
9831
9832 int main(argc, argv)
9833         int argc;
9834         char **argv;
9835 {
9836
9837         /* pthread test function */
9838         pthread_t t;
9839         int status;
9840 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9841         /* This system (e.g. AIX) defaults detached; must override */
9842         pthread_attr_t attr;
9843
9844         status = pthread_attr_init(&attr);
9845         if( status ) exit( status );
9846
9847         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9848         if( status ) exit( status );
9849
9850 #define ATTR    &attr
9851 #else
9852 #if HAVE_PTHREADS_D4
9853 #define ATTR    pthread_attr_default
9854 #else
9855 #define ATTR    NULL
9856 #endif
9857 #endif
9858         /* make sure pthread_create() isn't just a stub */
9859         status = pthread_create(&t, ATTR, task, NULL);
9860         if( status ) exit( status );
9861
9862         /* make sure pthread_detach() isn't just a stub */
9863 #if HAVE_PTHREADS_D4
9864         status = pthread_detach( &t );
9865 #else
9866         status = pthread_detach( t );
9867 #endif
9868
9869 #ifdef HAVE_LINUX_THREADS
9870         pthread_kill_other_threads_np();
9871 #endif
9872
9873         exit( status );
9874
9875 }
9876
9877 EOF
9878 if { (eval echo configure:9879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9879 then
9880   ol_cv_pthread_lib_lpthreads=yes
9881 else
9882   echo "configure: failed program was:" >&5
9883   cat conftest.$ac_ext >&5
9884   rm -fr conftest*
9885   ol_cv_pthread_lib_lpthreads=no
9886 fi
9887 rm -fr conftest*
9888 fi
9889
9890
9891                 # restore the LIBS
9892                 LIBS="$ol_LIBS"
9893         
9894 fi
9895
9896 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9897
9898         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9899                 ol_link_pthreads="-lpthreads"
9900                 ol_link_threads=posix
9901         fi
9902 fi
9903
9904
9905                 if test $ol_link_threads != no ; then
9906                         cat >> confdefs.h <<\EOF
9907 #define HAVE_PTHREADS 1
9908 EOF
9909
9910
9911                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9912
9913                                                 save_CPPFLAGS="$CPPFLAGS"
9914                         save_LIBS="$LIBS"
9915                         LIBS="$LTHREAD_LIBS $LIBS"
9916
9917                                                                                                 for ac_func in sched_yield pthread_yield
9918 do
9919 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9920 echo "configure:9921: checking for $ac_func" >&5
9921 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9922   echo $ac_n "(cached) $ac_c" 1>&6
9923 else
9924   cat > conftest.$ac_ext <<EOF
9925 #line 9926 "configure"
9926 #include "confdefs.h"
9927 /* System header to define __stub macros and hopefully few prototypes,
9928     which can conflict with char $ac_func(); below.  */
9929 #include <assert.h>
9930 /* Override any gcc2 internal prototype to avoid an error.  */
9931 /* We use char because int might match the return type of a gcc2
9932     builtin and then its argument prototype would still apply.  */
9933 char $ac_func();
9934 char (*f)();
9935
9936 int main() {
9937
9938 /* The GNU C library defines this for functions which it implements
9939     to always fail with ENOSYS.  Some functions are actually named
9940     something starting with __ and the normal name is an alias.  */
9941 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9942 choke me
9943 #else
9944 f = $ac_func;
9945 #endif
9946
9947 ; return 0; }
9948 EOF
9949 if { (eval echo configure:9950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9950   rm -rf conftest*
9951   eval "ac_cv_func_$ac_func=yes"
9952 else
9953   echo "configure: failed program was:" >&5
9954   cat conftest.$ac_ext >&5
9955   rm -rf conftest*
9956   eval "ac_cv_func_$ac_func=no"
9957 fi
9958 rm -f conftest*
9959 fi
9960
9961 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9962   echo "$ac_t""yes" 1>&6
9963     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9964   cat >> confdefs.h <<EOF
9965 #define $ac_tr_func 1
9966 EOF
9967  
9968 else
9969   echo "$ac_t""no" 1>&6
9970 fi
9971 done
9972
9973
9974                         if test $ac_cv_func_sched_yield = no -a \
9975                                 $ac_cv_func_pthread_yield = no ; then
9976                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9977 echo "configure:9978: checking for sched_yield in -lrt" >&5
9978 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9979 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9980   echo $ac_n "(cached) $ac_c" 1>&6
9981 else
9982   ac_save_LIBS="$LIBS"
9983 LIBS="-lrt  $LIBS"
9984 cat > conftest.$ac_ext <<EOF
9985 #line 9986 "configure"
9986 #include "confdefs.h"
9987 /* Override any gcc2 internal prototype to avoid an error.  */
9988 /* We use char because int might match the return type of a gcc2
9989     builtin and then its argument prototype would still apply.  */
9990 char sched_yield();
9991
9992 int main() {
9993 sched_yield()
9994 ; return 0; }
9995 EOF
9996 if { (eval echo configure:9997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9997   rm -rf conftest*
9998   eval "ac_cv_lib_$ac_lib_var=yes"
9999 else
10000   echo "configure: failed program was:" >&5
10001   cat conftest.$ac_ext >&5
10002   rm -rf conftest*
10003   eval "ac_cv_lib_$ac_lib_var=no"
10004 fi
10005 rm -f conftest*
10006 LIBS="$ac_save_LIBS"
10007
10008 fi
10009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10010   echo "$ac_t""yes" 1>&6
10011   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10012                                         cat >> confdefs.h <<\EOF
10013 #define HAVE_SCHED_YIELD 1
10014 EOF
10015
10016                                         ac_cv_func_sched_yield=yes
10017 else
10018   echo "$ac_t""no" 1>&6
10019 ac_cv_func_sched_yield=no
10020 fi
10021
10022                         fi
10023                         if test $ac_cv_func_sched_yield = no -a \
10024                                 $ac_cv_func_pthread_yield = no ; then
10025                                                                                                 for ac_func in thr_yield
10026 do
10027 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10028 echo "configure:10029: checking for $ac_func" >&5
10029 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10030   echo $ac_n "(cached) $ac_c" 1>&6
10031 else
10032   cat > conftest.$ac_ext <<EOF
10033 #line 10034 "configure"
10034 #include "confdefs.h"
10035 /* System header to define __stub macros and hopefully few prototypes,
10036     which can conflict with char $ac_func(); below.  */
10037 #include <assert.h>
10038 /* Override any gcc2 internal prototype to avoid an error.  */
10039 /* We use char because int might match the return type of a gcc2
10040     builtin and then its argument prototype would still apply.  */
10041 char $ac_func();
10042 char (*f)();
10043
10044 int main() {
10045
10046 /* The GNU C library defines this for functions which it implements
10047     to always fail with ENOSYS.  Some functions are actually named
10048     something starting with __ and the normal name is an alias.  */
10049 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10050 choke me
10051 #else
10052 f = $ac_func;
10053 #endif
10054
10055 ; return 0; }
10056 EOF
10057 if { (eval echo configure:10058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10058   rm -rf conftest*
10059   eval "ac_cv_func_$ac_func=yes"
10060 else
10061   echo "configure: failed program was:" >&5
10062   cat conftest.$ac_ext >&5
10063   rm -rf conftest*
10064   eval "ac_cv_func_$ac_func=no"
10065 fi
10066 rm -f conftest*
10067 fi
10068
10069 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10070   echo "$ac_t""yes" 1>&6
10071     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10072   cat >> confdefs.h <<EOF
10073 #define $ac_tr_func 1
10074 EOF
10075  
10076 else
10077   echo "$ac_t""no" 1>&6
10078 fi
10079 done
10080
10081                         fi
10082                         if test $ac_cv_func_sched_yield = no -a \
10083                                 $ac_cv_func_pthread_yield = no -a \
10084                                 "$ac_cv_func_thr_yield" = no ; then
10085                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10086                         fi
10087
10088                                                 for ac_func in pthread_kill
10089 do
10090 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10091 echo "configure:10092: checking for $ac_func" >&5
10092 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10093   echo $ac_n "(cached) $ac_c" 1>&6
10094 else
10095   cat > conftest.$ac_ext <<EOF
10096 #line 10097 "configure"
10097 #include "confdefs.h"
10098 /* System header to define __stub macros and hopefully few prototypes,
10099     which can conflict with char $ac_func(); below.  */
10100 #include <assert.h>
10101 /* Override any gcc2 internal prototype to avoid an error.  */
10102 /* We use char because int might match the return type of a gcc2
10103     builtin and then its argument prototype would still apply.  */
10104 char $ac_func();
10105 char (*f)();
10106
10107 int main() {
10108
10109 /* The GNU C library defines this for functions which it implements
10110     to always fail with ENOSYS.  Some functions are actually named
10111     something starting with __ and the normal name is an alias.  */
10112 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10113 choke me
10114 #else
10115 f = $ac_func;
10116 #endif
10117
10118 ; return 0; }
10119 EOF
10120 if { (eval echo configure:10121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10121   rm -rf conftest*
10122   eval "ac_cv_func_$ac_func=yes"
10123 else
10124   echo "configure: failed program was:" >&5
10125   cat conftest.$ac_ext >&5
10126   rm -rf conftest*
10127   eval "ac_cv_func_$ac_func=no"
10128 fi
10129 rm -f conftest*
10130 fi
10131
10132 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10133   echo "$ac_t""yes" 1>&6
10134     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10135   cat >> confdefs.h <<EOF
10136 #define $ac_tr_func 1
10137 EOF
10138  
10139 else
10140   echo "$ac_t""no" 1>&6
10141 fi
10142 done
10143
10144
10145                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10146 echo "configure:10147: checking for pthread_detach with <pthread.h>" >&5
10147 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10148   echo $ac_n "(cached) $ac_c" 1>&6
10149 else
10150   
10151                                                                 cat > conftest.$ac_ext <<EOF
10152 #line 10153 "configure"
10153 #include "confdefs.h"
10154
10155 #include <pthread.h>
10156 #ifndef NULL
10157 #define NULL (void*)0
10158 #endif
10159
10160 int main() {
10161 pthread_detach(NULL);
10162 ; return 0; }
10163 EOF
10164 if { (eval echo configure:10165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10165   rm -rf conftest*
10166   ol_cv_func_pthread_detach=yes
10167 else
10168   echo "configure: failed program was:" >&5
10169   cat conftest.$ac_ext >&5
10170   rm -rf conftest*
10171   ol_cv_func_pthread_detach=no
10172 fi
10173 rm -f conftest*
10174                         
10175 fi
10176
10177 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10178
10179                         if test $ol_cv_func_pthread_detach = no ; then
10180                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10181                         fi
10182
10183                         cat >> confdefs.h <<\EOF
10184 #define HAVE_PTHREAD_DETACH 1
10185 EOF
10186
10187
10188                                                 for ac_func in \
10189                                 pthread_setconcurrency \
10190                                 pthread_getconcurrency \
10191                                 thr_setconcurrency \
10192                                 thr_getconcurrency \
10193                         
10194 do
10195 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10196 echo "configure:10197: checking for $ac_func" >&5
10197 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10198   echo $ac_n "(cached) $ac_c" 1>&6
10199 else
10200   cat > conftest.$ac_ext <<EOF
10201 #line 10202 "configure"
10202 #include "confdefs.h"
10203 /* System header to define __stub macros and hopefully few prototypes,
10204     which can conflict with char $ac_func(); below.  */
10205 #include <assert.h>
10206 /* Override any gcc2 internal prototype to avoid an error.  */
10207 /* We use char because int might match the return type of a gcc2
10208     builtin and then its argument prototype would still apply.  */
10209 char $ac_func();
10210 char (*f)();
10211
10212 int main() {
10213
10214 /* The GNU C library defines this for functions which it implements
10215     to always fail with ENOSYS.  Some functions are actually named
10216     something starting with __ and the normal name is an alias.  */
10217 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10218 choke me
10219 #else
10220 f = $ac_func;
10221 #endif
10222
10223 ; return 0; }
10224 EOF
10225 if { (eval echo configure:10226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10226   rm -rf conftest*
10227   eval "ac_cv_func_$ac_func=yes"
10228 else
10229   echo "configure: failed program was:" >&5
10230   cat conftest.$ac_ext >&5
10231   rm -rf conftest*
10232   eval "ac_cv_func_$ac_func=no"
10233 fi
10234 rm -f conftest*
10235 fi
10236
10237 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10238   echo "$ac_t""yes" 1>&6
10239     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10240   cat >> confdefs.h <<EOF
10241 #define $ac_tr_func 1
10242 EOF
10243  
10244 else
10245   echo "$ac_t""no" 1>&6
10246 fi
10247 done
10248
10249
10250                         
10251         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10252 echo "configure:10253: checking for pthread_kill_other_threads_np" >&5
10253 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10254   echo $ac_n "(cached) $ac_c" 1>&6
10255 else
10256   cat > conftest.$ac_ext <<EOF
10257 #line 10258 "configure"
10258 #include "confdefs.h"
10259 /* System header to define __stub macros and hopefully few prototypes,
10260     which can conflict with char pthread_kill_other_threads_np(); below.  */
10261 #include <assert.h>
10262 /* Override any gcc2 internal prototype to avoid an error.  */
10263 /* We use char because int might match the return type of a gcc2
10264     builtin and then its argument prototype would still apply.  */
10265 char pthread_kill_other_threads_np();
10266 char (*f)();
10267
10268 int main() {
10269
10270 /* The GNU C library defines this for functions which it implements
10271     to always fail with ENOSYS.  Some functions are actually named
10272     something starting with __ and the normal name is an alias.  */
10273 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10274 choke me
10275 #else
10276 f = pthread_kill_other_threads_np;
10277 #endif
10278
10279 ; return 0; }
10280 EOF
10281 if { (eval echo configure:10282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10282   rm -rf conftest*
10283   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10284 else
10285   echo "configure: failed program was:" >&5
10286   cat conftest.$ac_ext >&5
10287   rm -rf conftest*
10288   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10289 fi
10290 rm -f conftest*
10291 fi
10292
10293 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10294   echo "$ac_t""yes" 1>&6
10295   :
10296 else
10297   echo "$ac_t""no" 1>&6
10298 fi
10299
10300         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10301 echo "configure:10302: checking for LinuxThreads implementation" >&5
10302 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10303   echo $ac_n "(cached) $ac_c" 1>&6
10304 else
10305   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10306 fi
10307
10308 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10309
10310                         
10311         
10312         
10313         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10314 echo "configure:10315: checking for LinuxThreads consistency" >&5
10315 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10316   echo $ac_n "(cached) $ac_c" 1>&6
10317 else
10318   
10319                 if test $ol_cv_header_linux_threads = yes -a \
10320                         $ol_cv_sys_linux_threads = yes; then
10321                         ol_cv_linux_threads=yes
10322                 elif test $ol_cv_header_linux_threads = no -a \
10323                         $ol_cv_sys_linux_threads = no; then
10324                         ol_cv_linux_threads=no
10325                 else
10326                         ol_cv_linux_threads=error
10327                 fi
10328         
10329 fi
10330
10331 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10332
10333
10334                         if test $ol_cv_linux_threads = error; then
10335                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10336                         fi
10337
10338                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10339 echo "configure:10340: checking if pthread_create() works" >&5
10340 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10341   echo $ac_n "(cached) $ac_c" 1>&6
10342 else
10343   
10344                         if test "$cross_compiling" = yes; then
10345                                 ol_cv_pthread_create_works=yes
10346 else
10347   cat > conftest.$ac_ext <<EOF
10348 #line 10349 "configure"
10349 #include "confdefs.h"
10350 /* pthread test headers */
10351 #include <pthread.h>
10352 #ifndef NULL
10353 #define NULL (void*)0
10354 #endif
10355
10356 static void *task(p)
10357         void *p;
10358 {
10359         return (void *) (p == NULL);
10360 }
10361
10362
10363 int main(argc, argv)
10364         int argc;
10365         char **argv;
10366 {
10367
10368         /* pthread test function */
10369         pthread_t t;
10370         int status;
10371 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10372         /* This system (e.g. AIX) defaults detached; must override */
10373         pthread_attr_t attr;
10374
10375         status = pthread_attr_init(&attr);
10376         if( status ) exit( status );
10377
10378         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10379         if( status ) exit( status );
10380
10381 #define ATTR    &attr
10382 #else
10383 #if HAVE_PTHREADS_D4
10384 #define ATTR    pthread_attr_default
10385 #else
10386 #define ATTR    NULL
10387 #endif
10388 #endif
10389         /* make sure pthread_create() isn't just a stub */
10390         status = pthread_create(&t, ATTR, task, NULL);
10391         if( status ) exit( status );
10392
10393         /* make sure pthread_detach() isn't just a stub */
10394 #if HAVE_PTHREADS_D4
10395         status = pthread_detach( &t );
10396 #else
10397         status = pthread_detach( t );
10398 #endif
10399
10400 #ifdef HAVE_LINUX_THREADS
10401         pthread_kill_other_threads_np();
10402 #endif
10403
10404         exit( status );
10405
10406 }
10407
10408 EOF
10409 if { (eval echo configure:10410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10410 then
10411   ol_cv_pthread_create_works=yes
10412 else
10413   echo "configure: failed program was:" >&5
10414   cat conftest.$ac_ext >&5
10415   rm -fr conftest*
10416   ol_cv_pthread_create_works=no
10417 fi
10418 rm -fr conftest*
10419 fi
10420
10421 fi
10422
10423 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10424
10425                         if test $ol_cv_pthread_create_works = no ; then
10426                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10427                         fi
10428
10429                                                 if test $ol_with_yielding_select = auto ; then
10430                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10431 echo "configure:10432: checking if select yields when using pthreads" >&5
10432 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10433   echo $ac_n "(cached) $ac_c" 1>&6
10434 else
10435   
10436                                 if test "$cross_compiling" = yes; then
10437   ol_cv_pthread_select_yields=cross
10438 else
10439   cat > conftest.$ac_ext <<EOF
10440 #line 10441 "configure"
10441 #include "confdefs.h"
10442
10443 #include <sys/types.h>
10444 #include <sys/time.h>
10445 #include <unistd.h>
10446 #include <pthread.h>
10447 #ifndef NULL
10448 #define NULL (void*) 0
10449 #endif
10450
10451 static int fildes[2];
10452
10453 static void *task(p)
10454         void *p;
10455 {
10456         int i;
10457         struct timeval tv;
10458
10459         fd_set rfds;
10460
10461         tv.tv_sec=10;
10462         tv.tv_usec=0;
10463
10464         FD_ZERO(&rfds);
10465         FD_SET(fildes[0], &rfds);
10466
10467         /* we're not interested in any fds */
10468         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10469
10470         if(i < 0) {
10471                 perror("select");
10472                 exit(10);
10473         }
10474
10475         exit(0); /* if we exit here, the select blocked the whole process */
10476 }
10477
10478 int main(argc, argv)
10479         int argc;
10480         char **argv;
10481 {
10482         pthread_t t;
10483
10484         /* create a pipe to select */
10485         if(pipe(&fildes[0])) {
10486                 perror("select");
10487                 exit(1);
10488         }
10489
10490 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10491         (void) pthread_setconcurrency(2);
10492 #else
10493 #ifdef HAVE_THR_SETCONCURRENCY
10494         /* Set Solaris LWP concurrency to 2 */
10495         thr_setconcurrency(2);
10496 #endif
10497 #endif
10498
10499 #if HAVE_PTHREADS_D4
10500         pthread_create(&t, pthread_attr_default, task, NULL);
10501 #else
10502         pthread_create(&t, NULL, task, NULL);
10503 #endif
10504
10505 #if HAVE_SCHED_YIELD
10506         sched_yield();  /* make sure task runs first */
10507 #else
10508 #ifdef HAVE_PTHREAD_YIELD
10509         pthread_yield();        /* make sure task runs first */
10510 #endif
10511 #endif
10512
10513         exit(2);
10514 }
10515 EOF
10516 if { (eval echo configure:10517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10517 then
10518   ol_cv_pthread_select_yields=no
10519 else
10520   echo "configure: failed program was:" >&5
10521   cat conftest.$ac_ext >&5
10522   rm -fr conftest*
10523   ol_cv_pthread_select_yields=yes
10524 fi
10525 rm -fr conftest*
10526 fi
10527
10528 fi
10529
10530 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10531
10532                                 if test $ol_cv_pthread_select_yields = cross ; then
10533                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10534                                 fi
10535
10536                                 if test $ol_cv_pthread_select_yields = yes ; then
10537                                         ol_with_yielding_select=yes
10538                                 fi
10539                         fi
10540
10541                                                 CPPFLAGS="$save_CPPFLAGS"
10542                         LIBS="$save_LIBS"
10543                 else
10544                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10545                 fi
10546         fi
10547
10548         if test $ol_with_threads = posix ; then
10549                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10550         fi
10551 fi
10552
10553 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10554         -o $ol_with_threads = mach ; then
10555
10556                 for ac_hdr in mach/cthreads.h
10557 do
10558 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10559 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10560 echo "configure:10561: checking for $ac_hdr" >&5
10561 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10562   echo $ac_n "(cached) $ac_c" 1>&6
10563 else
10564   cat > conftest.$ac_ext <<EOF
10565 #line 10566 "configure"
10566 #include "confdefs.h"
10567 #include <$ac_hdr>
10568 EOF
10569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10570 { (eval echo configure:10571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10572 if test -z "$ac_err"; then
10573   rm -rf conftest*
10574   eval "ac_cv_header_$ac_safe=yes"
10575 else
10576   echo "$ac_err" >&5
10577   echo "configure: failed program was:" >&5
10578   cat conftest.$ac_ext >&5
10579   rm -rf conftest*
10580   eval "ac_cv_header_$ac_safe=no"
10581 fi
10582 rm -f conftest*
10583 fi
10584 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10585   echo "$ac_t""yes" 1>&6
10586     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10587   cat >> confdefs.h <<EOF
10588 #define $ac_tr_hdr 1
10589 EOF
10590  
10591 else
10592   echo "$ac_t""no" 1>&6
10593 fi
10594 done
10595
10596         if test $ac_cv_header_mach_cthreads_h = yes ; then
10597                 ol_with_threads=found
10598
10599                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10600 echo "configure:10601: checking for cthread_fork" >&5
10601 if eval "test \"\${ac_cv_func_cthread_fork+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 /* System header to define __stub macros and hopefully few prototypes,
10608     which can conflict with char cthread_fork(); below.  */
10609 #include <assert.h>
10610 /* Override any gcc2 internal prototype to avoid an error.  */
10611 /* We use char because int might match the return type of a gcc2
10612     builtin and then its argument prototype would still apply.  */
10613 char cthread_fork();
10614 char (*f)();
10615
10616 int main() {
10617
10618 /* The GNU C library defines this for functions which it implements
10619     to always fail with ENOSYS.  Some functions are actually named
10620     something starting with __ and the normal name is an alias.  */
10621 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10622 choke me
10623 #else
10624 f = cthread_fork;
10625 #endif
10626
10627 ; return 0; }
10628 EOF
10629 if { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10630   rm -rf conftest*
10631   eval "ac_cv_func_cthread_fork=yes"
10632 else
10633   echo "configure: failed program was:" >&5
10634   cat conftest.$ac_ext >&5
10635   rm -rf conftest*
10636   eval "ac_cv_func_cthread_fork=no"
10637 fi
10638 rm -f conftest*
10639 fi
10640
10641 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10642   echo "$ac_t""yes" 1>&6
10643   ol_link_threads=yes
10644 else
10645   echo "$ac_t""no" 1>&6
10646 fi
10647
10648
10649                 if test $ol_link_threads = no ; then
10650                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10651 echo "configure:10652: checking for cthread_fork with -all_load" >&5
10652 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10653   echo $ac_n "(cached) $ac_c" 1>&6
10654 else
10655   
10656                                                                 save_LIBS="$LIBS"
10657                                 LIBS="-all_load $LIBS"
10658                                 cat > conftest.$ac_ext <<EOF
10659 #line 10660 "configure"
10660 #include "confdefs.h"
10661 #include <mach/cthreads.h>
10662 int main() {
10663
10664                                         cthread_fork((void *)0, (void *)0);
10665                                         
10666 ; return 0; }
10667 EOF
10668 if { (eval echo configure:10669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10669   rm -rf conftest*
10670   ol_cv_cthread_all_load=yes
10671 else
10672   echo "configure: failed program was:" >&5
10673   cat conftest.$ac_ext >&5
10674   rm -rf conftest*
10675   ol_cv_cthread_all_load=no
10676 fi
10677 rm -f conftest*
10678                                                                 LIBS="$save_LIBS"
10679                         
10680 fi
10681
10682 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10683
10684                         if test $ol_cv_cthread_all_load = yes ; then
10685                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10686                                 ol_link_threads=mach
10687                         fi
10688                 fi
10689
10690                 if test $ol_link_threads != no ; then
10691                         : check for cthread specific functionality here
10692                         cat >> confdefs.h <<\EOF
10693 #define HAVE_MACH_CTHREADS 1
10694 EOF
10695
10696                 else
10697                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10698                 fi
10699         fi
10700
10701         if test $ol_with_threads = mach ; then
10702                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10703         fi
10704 fi
10705
10706 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10707         -o $ol_with_threads = pth ; then
10708
10709         for ac_hdr in pth.h
10710 do
10711 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10712 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10713 echo "configure:10714: checking for $ac_hdr" >&5
10714 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10715   echo $ac_n "(cached) $ac_c" 1>&6
10716 else
10717   cat > conftest.$ac_ext <<EOF
10718 #line 10719 "configure"
10719 #include "confdefs.h"
10720 #include <$ac_hdr>
10721 EOF
10722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10723 { (eval echo configure:10724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10724 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10725 if test -z "$ac_err"; then
10726   rm -rf conftest*
10727   eval "ac_cv_header_$ac_safe=yes"
10728 else
10729   echo "$ac_err" >&5
10730   echo "configure: failed program was:" >&5
10731   cat conftest.$ac_ext >&5
10732   rm -rf conftest*
10733   eval "ac_cv_header_$ac_safe=no"
10734 fi
10735 rm -f conftest*
10736 fi
10737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10738   echo "$ac_t""yes" 1>&6
10739     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10740   cat >> confdefs.h <<EOF
10741 #define $ac_tr_hdr 1
10742 EOF
10743  
10744 else
10745   echo "$ac_t""no" 1>&6
10746 fi
10747 done
10748
10749
10750         if test $ac_cv_header_pth_h = yes ; then
10751                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10752 echo "configure:10753: checking for pth_version in -lpth" >&5
10753 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10755   echo $ac_n "(cached) $ac_c" 1>&6
10756 else
10757   ac_save_LIBS="$LIBS"
10758 LIBS="-lpth  $LIBS"
10759 cat > conftest.$ac_ext <<EOF
10760 #line 10761 "configure"
10761 #include "confdefs.h"
10762 /* Override any gcc2 internal prototype to avoid an error.  */
10763 /* We use char because int might match the return type of a gcc2
10764     builtin and then its argument prototype would still apply.  */
10765 char pth_version();
10766
10767 int main() {
10768 pth_version()
10769 ; return 0; }
10770 EOF
10771 if { (eval echo configure:10772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10772   rm -rf conftest*
10773   eval "ac_cv_lib_$ac_lib_var=yes"
10774 else
10775   echo "configure: failed program was:" >&5
10776   cat conftest.$ac_ext >&5
10777   rm -rf conftest*
10778   eval "ac_cv_lib_$ac_lib_var=no"
10779 fi
10780 rm -f conftest*
10781 LIBS="$ac_save_LIBS"
10782
10783 fi
10784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10785   echo "$ac_t""yes" 1>&6
10786   have_pth=yes
10787 else
10788   echo "$ac_t""no" 1>&6
10789 have_pth=no
10790 fi
10791
10792
10793                 if test $have_pth = yes ; then
10794                         cat >> confdefs.h <<\EOF
10795 #define HAVE_GNU_PTH 1
10796 EOF
10797
10798                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10799                         ol_link_threads=pth
10800
10801                         if test $ol_with_yielding_select = auto ; then
10802                                 ol_with_yielding_select=yes
10803                         fi
10804                 fi
10805         fi
10806 fi
10807
10808 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10809         -o $ol_with_threads = lwp ; then
10810
10811                 for ac_hdr in thread.h synch.h
10812 do
10813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10815 echo "configure:10816: checking for $ac_hdr" >&5
10816 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10817   echo $ac_n "(cached) $ac_c" 1>&6
10818 else
10819   cat > conftest.$ac_ext <<EOF
10820 #line 10821 "configure"
10821 #include "confdefs.h"
10822 #include <$ac_hdr>
10823 EOF
10824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10825 { (eval echo configure:10826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10827 if test -z "$ac_err"; then
10828   rm -rf conftest*
10829   eval "ac_cv_header_$ac_safe=yes"
10830 else
10831   echo "$ac_err" >&5
10832   echo "configure: failed program was:" >&5
10833   cat conftest.$ac_ext >&5
10834   rm -rf conftest*
10835   eval "ac_cv_header_$ac_safe=no"
10836 fi
10837 rm -f conftest*
10838 fi
10839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10840   echo "$ac_t""yes" 1>&6
10841     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10842   cat >> confdefs.h <<EOF
10843 #define $ac_tr_hdr 1
10844 EOF
10845  
10846 else
10847   echo "$ac_t""no" 1>&6
10848 fi
10849 done
10850
10851         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10852                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10853 echo "configure:10854: checking for thr_create in -lthread" >&5
10854 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10855 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10856   echo $ac_n "(cached) $ac_c" 1>&6
10857 else
10858   ac_save_LIBS="$LIBS"
10859 LIBS="-lthread  $LIBS"
10860 cat > conftest.$ac_ext <<EOF
10861 #line 10862 "configure"
10862 #include "confdefs.h"
10863 /* Override any gcc2 internal prototype to avoid an error.  */
10864 /* We use char because int might match the return type of a gcc2
10865     builtin and then its argument prototype would still apply.  */
10866 char thr_create();
10867
10868 int main() {
10869 thr_create()
10870 ; return 0; }
10871 EOF
10872 if { (eval echo configure:10873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10873   rm -rf conftest*
10874   eval "ac_cv_lib_$ac_lib_var=yes"
10875 else
10876   echo "configure: failed program was:" >&5
10877   cat conftest.$ac_ext >&5
10878   rm -rf conftest*
10879   eval "ac_cv_lib_$ac_lib_var=no"
10880 fi
10881 rm -f conftest*
10882 LIBS="$ac_save_LIBS"
10883
10884 fi
10885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10886   echo "$ac_t""yes" 1>&6
10887   have_thr=yes
10888 else
10889   echo "$ac_t""no" 1>&6
10890 have_thr=no
10891 fi
10892
10893
10894                 if test $have_thr = yes ; then
10895                         cat >> confdefs.h <<\EOF
10896 #define HAVE_THR 1
10897 EOF
10898
10899                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10900                         ol_link_threads=thr
10901
10902                         if test $ol_with_yielding_select = auto ; then
10903                                 ol_with_yielding_select=yes
10904                         fi
10905
10906                                                 for ac_func in \
10907                                 thr_setconcurrency \
10908                                 thr_getconcurrency \
10909                         
10910 do
10911 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10912 echo "configure:10913: checking for $ac_func" >&5
10913 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10914   echo $ac_n "(cached) $ac_c" 1>&6
10915 else
10916   cat > conftest.$ac_ext <<EOF
10917 #line 10918 "configure"
10918 #include "confdefs.h"
10919 /* System header to define __stub macros and hopefully few prototypes,
10920     which can conflict with char $ac_func(); below.  */
10921 #include <assert.h>
10922 /* Override any gcc2 internal prototype to avoid an error.  */
10923 /* We use char because int might match the return type of a gcc2
10924     builtin and then its argument prototype would still apply.  */
10925 char $ac_func();
10926 char (*f)();
10927
10928 int main() {
10929
10930 /* The GNU C library defines this for functions which it implements
10931     to always fail with ENOSYS.  Some functions are actually named
10932     something starting with __ and the normal name is an alias.  */
10933 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10934 choke me
10935 #else
10936 f = $ac_func;
10937 #endif
10938
10939 ; return 0; }
10940 EOF
10941 if { (eval echo configure:10942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10942   rm -rf conftest*
10943   eval "ac_cv_func_$ac_func=yes"
10944 else
10945   echo "configure: failed program was:" >&5
10946   cat conftest.$ac_ext >&5
10947   rm -rf conftest*
10948   eval "ac_cv_func_$ac_func=no"
10949 fi
10950 rm -f conftest*
10951 fi
10952
10953 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10954   echo "$ac_t""yes" 1>&6
10955     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10956   cat >> confdefs.h <<EOF
10957 #define $ac_tr_func 1
10958 EOF
10959  
10960 else
10961   echo "$ac_t""no" 1>&6
10962 fi
10963 done
10964
10965                 fi
10966         fi
10967
10968                 for ac_hdr in lwp/lwp.h
10969 do
10970 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10971 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10972 echo "configure:10973: checking for $ac_hdr" >&5
10973 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10974   echo $ac_n "(cached) $ac_c" 1>&6
10975 else
10976   cat > conftest.$ac_ext <<EOF
10977 #line 10978 "configure"
10978 #include "confdefs.h"
10979 #include <$ac_hdr>
10980 EOF
10981 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10982 { (eval echo configure:10983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10983 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10984 if test -z "$ac_err"; then
10985   rm -rf conftest*
10986   eval "ac_cv_header_$ac_safe=yes"
10987 else
10988   echo "$ac_err" >&5
10989   echo "configure: failed program was:" >&5
10990   cat conftest.$ac_ext >&5
10991   rm -rf conftest*
10992   eval "ac_cv_header_$ac_safe=no"
10993 fi
10994 rm -f conftest*
10995 fi
10996 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10997   echo "$ac_t""yes" 1>&6
10998     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10999   cat >> confdefs.h <<EOF
11000 #define $ac_tr_hdr 1
11001 EOF
11002  
11003 else
11004   echo "$ac_t""no" 1>&6
11005 fi
11006 done
11007
11008         if test $ac_cv_header_lwp_lwp_h = yes ; then
11009                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11010 echo "configure:11011: checking for lwp_create in -llwp" >&5
11011 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11012 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11013   echo $ac_n "(cached) $ac_c" 1>&6
11014 else
11015   ac_save_LIBS="$LIBS"
11016 LIBS="-llwp  $LIBS"
11017 cat > conftest.$ac_ext <<EOF
11018 #line 11019 "configure"
11019 #include "confdefs.h"
11020 /* Override any gcc2 internal prototype to avoid an error.  */
11021 /* We use char because int might match the return type of a gcc2
11022     builtin and then its argument prototype would still apply.  */
11023 char lwp_create();
11024
11025 int main() {
11026 lwp_create()
11027 ; return 0; }
11028 EOF
11029 if { (eval echo configure:11030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11030   rm -rf conftest*
11031   eval "ac_cv_lib_$ac_lib_var=yes"
11032 else
11033   echo "configure: failed program was:" >&5
11034   cat conftest.$ac_ext >&5
11035   rm -rf conftest*
11036   eval "ac_cv_lib_$ac_lib_var=no"
11037 fi
11038 rm -f conftest*
11039 LIBS="$ac_save_LIBS"
11040
11041 fi
11042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11043   echo "$ac_t""yes" 1>&6
11044   have_lwp=yes
11045 else
11046   echo "$ac_t""no" 1>&6
11047 have_lwp=no
11048 fi
11049
11050
11051                 if test $have_lwp = yes ; then
11052                         cat >> confdefs.h <<\EOF
11053 #define HAVE_LWP 1
11054 EOF
11055
11056                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11057                         ol_link_threads=lwp
11058
11059                         if test $ol_with_yielding_select = auto ; then
11060                                 ol_with_yielding_select=no
11061                         fi
11062                 fi
11063         fi
11064 fi
11065
11066 if test $ol_with_yielding_select = yes ; then
11067         cat >> confdefs.h <<\EOF
11068 #define HAVE_YIELDING_SELECT 1
11069 EOF
11070
11071 fi
11072
11073 if test $ol_with_threads = manual ; then
11074                 ol_link_threads=yes
11075
11076         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11077
11078         for ac_hdr in pthread.h sched.h
11079 do
11080 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11081 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11082 echo "configure:11083: checking for $ac_hdr" >&5
11083 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11084   echo $ac_n "(cached) $ac_c" 1>&6
11085 else
11086   cat > conftest.$ac_ext <<EOF
11087 #line 11088 "configure"
11088 #include "confdefs.h"
11089 #include <$ac_hdr>
11090 EOF
11091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11092 { (eval echo configure:11093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11094 if test -z "$ac_err"; then
11095   rm -rf conftest*
11096   eval "ac_cv_header_$ac_safe=yes"
11097 else
11098   echo "$ac_err" >&5
11099   echo "configure: failed program was:" >&5
11100   cat conftest.$ac_ext >&5
11101   rm -rf conftest*
11102   eval "ac_cv_header_$ac_safe=no"
11103 fi
11104 rm -f conftest*
11105 fi
11106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11107   echo "$ac_t""yes" 1>&6
11108     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11109   cat >> confdefs.h <<EOF
11110 #define $ac_tr_hdr 1
11111 EOF
11112  
11113 else
11114   echo "$ac_t""no" 1>&6
11115 fi
11116 done
11117
11118         for ac_func in sched_yield pthread_yield
11119 do
11120 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11121 echo "configure:11122: checking for $ac_func" >&5
11122 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11123   echo $ac_n "(cached) $ac_c" 1>&6
11124 else
11125   cat > conftest.$ac_ext <<EOF
11126 #line 11127 "configure"
11127 #include "confdefs.h"
11128 /* System header to define __stub macros and hopefully few prototypes,
11129     which can conflict with char $ac_func(); below.  */
11130 #include <assert.h>
11131 /* Override any gcc2 internal prototype to avoid an error.  */
11132 /* We use char because int might match the return type of a gcc2
11133     builtin and then its argument prototype would still apply.  */
11134 char $ac_func();
11135 char (*f)();
11136
11137 int main() {
11138
11139 /* The GNU C library defines this for functions which it implements
11140     to always fail with ENOSYS.  Some functions are actually named
11141     something starting with __ and the normal name is an alias.  */
11142 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11143 choke me
11144 #else
11145 f = $ac_func;
11146 #endif
11147
11148 ; return 0; }
11149 EOF
11150 if { (eval echo configure:11151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11151   rm -rf conftest*
11152   eval "ac_cv_func_$ac_func=yes"
11153 else
11154   echo "configure: failed program was:" >&5
11155   cat conftest.$ac_ext >&5
11156   rm -rf conftest*
11157   eval "ac_cv_func_$ac_func=no"
11158 fi
11159 rm -f conftest*
11160 fi
11161
11162 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11163   echo "$ac_t""yes" 1>&6
11164     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11165   cat >> confdefs.h <<EOF
11166 #define $ac_tr_func 1
11167 EOF
11168  
11169 else
11170   echo "$ac_t""no" 1>&6
11171 fi
11172 done
11173
11174         
11175         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11176 echo "configure:11177: checking for LinuxThreads pthread.h" >&5
11177 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11178   echo $ac_n "(cached) $ac_c" 1>&6
11179 else
11180   cat > conftest.$ac_ext <<EOF
11181 #line 11182 "configure"
11182 #include "confdefs.h"
11183 #include <pthread.h>
11184 EOF
11185 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11186   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11187   rm -rf conftest*
11188   ol_cv_header_linux_threads=yes
11189 else
11190   rm -rf conftest*
11191   ol_cv_header_linux_threads=no
11192 fi
11193 rm -f conftest*
11194
11195                 
11196 fi
11197
11198 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11199         if test $ol_cv_header_linux_threads = yes; then
11200                 cat >> confdefs.h <<\EOF
11201 #define HAVE_LINUX_THREADS 1
11202 EOF
11203
11204         fi
11205
11206
11207         for ac_hdr in mach/cthreads.h
11208 do
11209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11211 echo "configure:11212: checking for $ac_hdr" >&5
11212 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11213   echo $ac_n "(cached) $ac_c" 1>&6
11214 else
11215   cat > conftest.$ac_ext <<EOF
11216 #line 11217 "configure"
11217 #include "confdefs.h"
11218 #include <$ac_hdr>
11219 EOF
11220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11221 { (eval echo configure:11222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11223 if test -z "$ac_err"; then
11224   rm -rf conftest*
11225   eval "ac_cv_header_$ac_safe=yes"
11226 else
11227   echo "$ac_err" >&5
11228   echo "configure: failed program was:" >&5
11229   cat conftest.$ac_ext >&5
11230   rm -rf conftest*
11231   eval "ac_cv_header_$ac_safe=no"
11232 fi
11233 rm -f conftest*
11234 fi
11235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11236   echo "$ac_t""yes" 1>&6
11237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11238   cat >> confdefs.h <<EOF
11239 #define $ac_tr_hdr 1
11240 EOF
11241  
11242 else
11243   echo "$ac_t""no" 1>&6
11244 fi
11245 done
11246
11247         for ac_hdr in lwp/lwp.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 thread.h synch.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 fi
11328
11329 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11330                         cat >> confdefs.h <<\EOF
11331 #define REENTRANT 1
11332 EOF
11333
11334         cat >> confdefs.h <<\EOF
11335 #define _REENTRANT 1
11336 EOF
11337
11338         cat >> confdefs.h <<\EOF
11339 #define THREAD_SAFE 1
11340 EOF
11341
11342         cat >> confdefs.h <<\EOF
11343 #define _THREAD_SAFE 1
11344 EOF
11345
11346         cat >> confdefs.h <<\EOF
11347 #define THREADSAFE 1
11348 EOF
11349
11350         cat >> confdefs.h <<\EOF
11351 #define _THREADSAFE 1
11352 EOF
11353
11354         cat >> confdefs.h <<\EOF
11355 #define _SGI_MP_SOURCE 1
11356 EOF
11357
11358
11359                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11360 echo "configure:11361: checking for thread specific errno" >&5
11361 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11362   echo $ac_n "(cached) $ac_c" 1>&6
11363 else
11364   
11365                 cat > conftest.$ac_ext <<EOF
11366 #line 11367 "configure"
11367 #include "confdefs.h"
11368 #include <errno.h>
11369 int main() {
11370 errno = 0;
11371 ; return 0; }
11372 EOF
11373 if { (eval echo configure:11374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11374   rm -rf conftest*
11375   ol_cv_errno_thread_specific=yes
11376 else
11377   echo "configure: failed program was:" >&5
11378   cat conftest.$ac_ext >&5
11379   rm -rf conftest*
11380   ol_cv_errno_thread_specific=no
11381 fi
11382 rm -f conftest*
11383         
11384 fi
11385
11386 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11387
11388                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11389 echo "configure:11390: checking for thread specific h_errno" >&5
11390 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11391   echo $ac_n "(cached) $ac_c" 1>&6
11392 else
11393   
11394                 cat > conftest.$ac_ext <<EOF
11395 #line 11396 "configure"
11396 #include "confdefs.h"
11397 #include <netdb.h>
11398 int main() {
11399 h_errno = 0;
11400 ; return 0; }
11401 EOF
11402 if { (eval echo configure:11403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11403   rm -rf conftest*
11404   ol_cv_h_errno_thread_specific=yes
11405 else
11406   echo "configure: failed program was:" >&5
11407   cat conftest.$ac_ext >&5
11408   rm -rf conftest*
11409   ol_cv_h_errno_thread_specific=no
11410 fi
11411 rm -f conftest*
11412         
11413 fi
11414
11415 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11416
11417         if test $ol_cv_errno_thread_specific != yes \
11418                 -o $ol_cv_h_errno_thread_specific != yes ; then
11419                 LIBS="$LTHREAD_LIBS $LIBS"
11420                 LTHREAD_LIBS=""
11421         fi
11422
11423 fi  
11424
11425 if test $ol_link_threads = no ; then
11426         if test $ol_with_threads = yes ; then
11427                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11428         fi
11429
11430         if test $ol_with_threads = auto ; then
11431                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11432                 ol_with_threads=no
11433         fi
11434
11435         cat >> confdefs.h <<\EOF
11436 #define NO_THREADS 1
11437 EOF
11438
11439         LTHREAD_LIBS=""
11440 fi
11441
11442 if test $ol_link_threads != no ; then
11443         cat >> confdefs.h <<\EOF
11444 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11445 EOF
11446
11447 fi
11448
11449 ol_link_ldbm=no 
11450
11451 if test $ol_with_ldbm_api = auto \
11452         -o $ol_with_ldbm_api = berkeley \
11453         -o $ol_with_ldbm_api = bcompat ; then
11454
11455         if test $ol_with_ldbm_api = bcompat; then \
11456                 ol_cv_berkeley_db=no
11457 for ac_hdr in db_185.h db.h
11458 do
11459 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11460 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11461 echo "configure:11462: checking for $ac_hdr" >&5
11462 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11463   echo $ac_n "(cached) $ac_c" 1>&6
11464 else
11465   cat > conftest.$ac_ext <<EOF
11466 #line 11467 "configure"
11467 #include "confdefs.h"
11468 #include <$ac_hdr>
11469 EOF
11470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11471 { (eval echo configure:11472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11473 if test -z "$ac_err"; then
11474   rm -rf conftest*
11475   eval "ac_cv_header_$ac_safe=yes"
11476 else
11477   echo "$ac_err" >&5
11478   echo "configure: failed program was:" >&5
11479   cat conftest.$ac_ext >&5
11480   rm -rf conftest*
11481   eval "ac_cv_header_$ac_safe=no"
11482 fi
11483 rm -f conftest*
11484 fi
11485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11486   echo "$ac_t""yes" 1>&6
11487     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11488   cat >> confdefs.h <<EOF
11489 #define $ac_tr_hdr 1
11490 EOF
11491  
11492 else
11493   echo "$ac_t""no" 1>&6
11494 fi
11495 done
11496
11497 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11498         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11499 echo "configure:11500: checking if Berkeley DB header compatibility" >&5
11500 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11501   echo $ac_n "(cached) $ac_c" 1>&6
11502 else
11503   
11504                 cat > conftest.$ac_ext <<EOF
11505 #line 11506 "configure"
11506 #include "confdefs.h"
11507
11508 #if HAVE_DB_185_H
11509 #       include <db_185.h>
11510 #else
11511 #       include <db.h>
11512 #endif
11513
11514  /* this check could be improved */
11515 #ifndef DB_VERSION_MAJOR
11516 #       define DB_VERSION_MAJOR 1
11517 #endif
11518
11519 #if DB_VERSION_MAJOR == 1 
11520         __db_version_1
11521 #endif
11522
11523 EOF
11524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11525   egrep "__db_version_1" >/dev/null 2>&1; then
11526   rm -rf conftest*
11527   ol_cv_header_db1=yes
11528 else
11529   rm -rf conftest*
11530   ol_cv_header_db1=no
11531 fi
11532 rm -f conftest*
11533
11534 fi
11535
11536 echo "$ac_t""$ol_cv_header_db1" 1>&6
11537
11538         if test ol_cv_header_db1=yes ; then
11539                 ol_cv_lib_db=no
11540 if test $ol_cv_lib_db = no ; then
11541         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11542 echo "configure:11543: checking for Berkeley DB link (default)" >&5
11543 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11544   echo $ac_n "(cached) $ac_c" 1>&6
11545 else
11546   
11547         ol_DB_LIB=
11548         ol_LIBS=$LIBS
11549         LIBS="$ol_DB_LIB $LIBS"
11550
11551         cat > conftest.$ac_ext <<EOF
11552 #line 11553 "configure"
11553 #include "confdefs.h"
11554
11555 #ifdef HAVE_DB_185_H
11556 # include <db_185.h>
11557 #else
11558 # include <db.h>
11559 #endif
11560
11561 #ifndef DB_VERSION_MAJOR
11562 # define DB_VERSION_MAJOR 1
11563 #endif
11564
11565 #ifndef NULL
11566 #define NULL ((void*)0)
11567 #endif
11568
11569 int main() {
11570
11571 #if DB_VERSION_MAJOR > 2
11572         db_env_create( NULL, 0 );
11573 #elif DB_VERSION_MAJOR > 1
11574         db_appexit( NULL );
11575 #else
11576         (void) dbopen( NULL, 0, 0, 0, NULL);
11577 #endif
11578
11579 ; return 0; }
11580 EOF
11581 if { (eval echo configure:11582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11582   rm -rf conftest*
11583   ol_cv_db_none=yes
11584 else
11585   echo "configure: failed program was:" >&5
11586   cat conftest.$ac_ext >&5
11587   rm -rf conftest*
11588   ol_cv_db_none=no
11589 fi
11590 rm -f conftest*
11591
11592         LIBS="$ol_LIBS"
11593
11594 fi
11595
11596 echo "$ac_t""$ol_cv_db_none" 1>&6
11597
11598         if test $ol_cv_db_none = yes ; then
11599                 ol_cv_lib_db=yes
11600         fi
11601 fi
11602
11603 if test $ol_cv_lib_db = no ; then
11604         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11605 echo "configure:11606: checking for Berkeley DB link (-ldb)" >&5
11606 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11607   echo $ac_n "(cached) $ac_c" 1>&6
11608 else
11609   
11610         ol_DB_LIB=-ldb
11611         ol_LIBS=$LIBS
11612         LIBS="$ol_DB_LIB $LIBS"
11613
11614         cat > conftest.$ac_ext <<EOF
11615 #line 11616 "configure"
11616 #include "confdefs.h"
11617
11618 #ifdef HAVE_DB_185_H
11619 # include <db_185.h>
11620 #else
11621 # include <db.h>
11622 #endif
11623
11624 #ifndef DB_VERSION_MAJOR
11625 # define DB_VERSION_MAJOR 1
11626 #endif
11627
11628 #ifndef NULL
11629 #define NULL ((void*)0)
11630 #endif
11631
11632 int main() {
11633
11634 #if DB_VERSION_MAJOR > 2
11635         db_env_create( NULL, 0 );
11636 #elif DB_VERSION_MAJOR > 1
11637         db_appexit( NULL );
11638 #else
11639         (void) dbopen( NULL, 0, 0, 0, NULL);
11640 #endif
11641
11642 ; return 0; }
11643 EOF
11644 if { (eval echo configure:11645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11645   rm -rf conftest*
11646   ol_cv_db_db=yes
11647 else
11648   echo "configure: failed program was:" >&5
11649   cat conftest.$ac_ext >&5
11650   rm -rf conftest*
11651   ol_cv_db_db=no
11652 fi
11653 rm -f conftest*
11654
11655         LIBS="$ol_LIBS"
11656
11657 fi
11658
11659 echo "$ac_t""$ol_cv_db_db" 1>&6
11660
11661         if test $ol_cv_db_db = yes ; then
11662                 ol_cv_lib_db=-ldb
11663         fi
11664 fi
11665
11666 if test $ol_cv_lib_db = no ; then
11667         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11668 echo "configure:11669: checking for Berkeley DB link (-ldb3)" >&5
11669 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11670   echo $ac_n "(cached) $ac_c" 1>&6
11671 else
11672   
11673         ol_DB_LIB=-ldb3
11674         ol_LIBS=$LIBS
11675         LIBS="$ol_DB_LIB $LIBS"
11676
11677         cat > conftest.$ac_ext <<EOF
11678 #line 11679 "configure"
11679 #include "confdefs.h"
11680
11681 #ifdef HAVE_DB_185_H
11682 # include <db_185.h>
11683 #else
11684 # include <db.h>
11685 #endif
11686
11687 #ifndef DB_VERSION_MAJOR
11688 # define DB_VERSION_MAJOR 1
11689 #endif
11690
11691 #ifndef NULL
11692 #define NULL ((void*)0)
11693 #endif
11694
11695 int main() {
11696
11697 #if DB_VERSION_MAJOR > 2
11698         db_env_create( NULL, 0 );
11699 #elif DB_VERSION_MAJOR > 1
11700         db_appexit( NULL );
11701 #else
11702         (void) dbopen( NULL, 0, 0, 0, NULL);
11703 #endif
11704
11705 ; return 0; }
11706 EOF
11707 if { (eval echo configure:11708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11708   rm -rf conftest*
11709   ol_cv_db_db3=yes
11710 else
11711   echo "configure: failed program was:" >&5
11712   cat conftest.$ac_ext >&5
11713   rm -rf conftest*
11714   ol_cv_db_db3=no
11715 fi
11716 rm -f conftest*
11717
11718         LIBS="$ol_LIBS"
11719
11720 fi
11721
11722 echo "$ac_t""$ol_cv_db_db3" 1>&6
11723
11724         if test $ol_cv_db_db3 = yes ; then
11725                 ol_cv_lib_db=-ldb3
11726         fi
11727 fi
11728
11729 if test $ol_cv_lib_db = no ; then
11730         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11731 echo "configure:11732: checking for Berkeley DB link (-ldb2)" >&5
11732 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11733   echo $ac_n "(cached) $ac_c" 1>&6
11734 else
11735   
11736         ol_DB_LIB=-ldb2
11737         ol_LIBS=$LIBS
11738         LIBS="$ol_DB_LIB $LIBS"
11739
11740         cat > conftest.$ac_ext <<EOF
11741 #line 11742 "configure"
11742 #include "confdefs.h"
11743
11744 #ifdef HAVE_DB_185_H
11745 # include <db_185.h>
11746 #else
11747 # include <db.h>
11748 #endif
11749
11750 #ifndef DB_VERSION_MAJOR
11751 # define DB_VERSION_MAJOR 1
11752 #endif
11753
11754 #ifndef NULL
11755 #define NULL ((void*)0)
11756 #endif
11757
11758 int main() {
11759
11760 #if DB_VERSION_MAJOR > 2
11761         db_env_create( NULL, 0 );
11762 #elif DB_VERSION_MAJOR > 1
11763         db_appexit( NULL );
11764 #else
11765         (void) dbopen( NULL, 0, 0, 0, NULL);
11766 #endif
11767
11768 ; return 0; }
11769 EOF
11770 if { (eval echo configure:11771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11771   rm -rf conftest*
11772   ol_cv_db_db2=yes
11773 else
11774   echo "configure: failed program was:" >&5
11775   cat conftest.$ac_ext >&5
11776   rm -rf conftest*
11777   ol_cv_db_db2=no
11778 fi
11779 rm -f conftest*
11780
11781         LIBS="$ol_LIBS"
11782
11783 fi
11784
11785 echo "$ac_t""$ol_cv_db_db2" 1>&6
11786
11787         if test $ol_cv_db_db2 = yes ; then
11788                 ol_cv_lib_db=-ldb2
11789         fi
11790 fi
11791
11792 if test $ol_cv_lib_db = no ; then
11793         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11794 echo "configure:11795: checking for Berkeley DB link (-ldb1)" >&5
11795 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11796   echo $ac_n "(cached) $ac_c" 1>&6
11797 else
11798   
11799         ol_DB_LIB=-ldb1
11800         ol_LIBS=$LIBS
11801         LIBS="$ol_DB_LIB $LIBS"
11802
11803         cat > conftest.$ac_ext <<EOF
11804 #line 11805 "configure"
11805 #include "confdefs.h"
11806
11807 #ifdef HAVE_DB_185_H
11808 # include <db_185.h>
11809 #else
11810 # include <db.h>
11811 #endif
11812
11813 #ifndef DB_VERSION_MAJOR
11814 # define DB_VERSION_MAJOR 1
11815 #endif
11816
11817 #ifndef NULL
11818 #define NULL ((void*)0)
11819 #endif
11820
11821 int main() {
11822
11823 #if DB_VERSION_MAJOR > 2
11824         db_env_create( NULL, 0 );
11825 #elif DB_VERSION_MAJOR > 1
11826         db_appexit( NULL );
11827 #else
11828         (void) dbopen( NULL, 0, 0, 0, NULL);
11829 #endif
11830
11831 ; return 0; }
11832 EOF
11833 if { (eval echo configure:11834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11834   rm -rf conftest*
11835   ol_cv_db_db1=yes
11836 else
11837   echo "configure: failed program was:" >&5
11838   cat conftest.$ac_ext >&5
11839   rm -rf conftest*
11840   ol_cv_db_db1=no
11841 fi
11842 rm -f conftest*
11843
11844         LIBS="$ol_LIBS"
11845
11846 fi
11847
11848 echo "$ac_t""$ol_cv_db_db1" 1>&6
11849
11850         if test $ol_cv_db_db1 = yes ; then
11851                 ol_cv_lib_db=-ldb1
11852         fi
11853 fi
11854
11855
11856                 if test "$ol_cv_lib_db" != no ; then
11857                         ol_cv_berkeley_db=yes
11858                 fi
11859         fi
11860 fi
11861
11862         else
11863                 ol_cv_berkeley_db=no
11864 for ac_hdr in db.h
11865 do
11866 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11867 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11868 echo "configure:11869: checking for $ac_hdr" >&5
11869 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11870   echo $ac_n "(cached) $ac_c" 1>&6
11871 else
11872   cat > conftest.$ac_ext <<EOF
11873 #line 11874 "configure"
11874 #include "confdefs.h"
11875 #include <$ac_hdr>
11876 EOF
11877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11878 { (eval echo configure:11879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11880 if test -z "$ac_err"; then
11881   rm -rf conftest*
11882   eval "ac_cv_header_$ac_safe=yes"
11883 else
11884   echo "$ac_err" >&5
11885   echo "configure: failed program was:" >&5
11886   cat conftest.$ac_ext >&5
11887   rm -rf conftest*
11888   eval "ac_cv_header_$ac_safe=no"
11889 fi
11890 rm -f conftest*
11891 fi
11892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11893   echo "$ac_t""yes" 1>&6
11894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11895   cat >> confdefs.h <<EOF
11896 #define $ac_tr_hdr 1
11897 EOF
11898  
11899 else
11900   echo "$ac_t""no" 1>&6
11901 fi
11902 done
11903
11904 if test $ac_cv_header_db_h = yes; then
11905         ol_cv_lib_db=no
11906 if test $ol_cv_lib_db = no ; then
11907         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11908 echo "configure:11909: checking for Berkeley DB link (default)" >&5
11909 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11910   echo $ac_n "(cached) $ac_c" 1>&6
11911 else
11912   
11913         ol_DB_LIB=
11914         ol_LIBS=$LIBS
11915         LIBS="$ol_DB_LIB $LIBS"
11916
11917         cat > conftest.$ac_ext <<EOF
11918 #line 11919 "configure"
11919 #include "confdefs.h"
11920
11921 #ifdef HAVE_DB_185_H
11922 # include <db_185.h>
11923 #else
11924 # include <db.h>
11925 #endif
11926
11927 #ifndef DB_VERSION_MAJOR
11928 # define DB_VERSION_MAJOR 1
11929 #endif
11930
11931 #ifndef NULL
11932 #define NULL ((void*)0)
11933 #endif
11934
11935 int main() {
11936
11937 #if DB_VERSION_MAJOR > 2
11938         db_env_create( NULL, 0 );
11939 #elif DB_VERSION_MAJOR > 1
11940         db_appexit( NULL );
11941 #else
11942         (void) dbopen( NULL, 0, 0, 0, NULL);
11943 #endif
11944
11945 ; return 0; }
11946 EOF
11947 if { (eval echo configure:11948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11948   rm -rf conftest*
11949   ol_cv_db_none=yes
11950 else
11951   echo "configure: failed program was:" >&5
11952   cat conftest.$ac_ext >&5
11953   rm -rf conftest*
11954   ol_cv_db_none=no
11955 fi
11956 rm -f conftest*
11957
11958         LIBS="$ol_LIBS"
11959
11960 fi
11961
11962 echo "$ac_t""$ol_cv_db_none" 1>&6
11963
11964         if test $ol_cv_db_none = yes ; then
11965                 ol_cv_lib_db=yes
11966         fi
11967 fi
11968
11969 if test $ol_cv_lib_db = no ; then
11970         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11971 echo "configure:11972: checking for Berkeley DB link (-ldb)" >&5
11972 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11973   echo $ac_n "(cached) $ac_c" 1>&6
11974 else
11975   
11976         ol_DB_LIB=-ldb
11977         ol_LIBS=$LIBS
11978         LIBS="$ol_DB_LIB $LIBS"
11979
11980         cat > conftest.$ac_ext <<EOF
11981 #line 11982 "configure"
11982 #include "confdefs.h"
11983
11984 #ifdef HAVE_DB_185_H
11985 # include <db_185.h>
11986 #else
11987 # include <db.h>
11988 #endif
11989
11990 #ifndef DB_VERSION_MAJOR
11991 # define DB_VERSION_MAJOR 1
11992 #endif
11993
11994 #ifndef NULL
11995 #define NULL ((void*)0)
11996 #endif
11997
11998 int main() {
11999
12000 #if DB_VERSION_MAJOR > 2
12001         db_env_create( NULL, 0 );
12002 #elif DB_VERSION_MAJOR > 1
12003         db_appexit( NULL );
12004 #else
12005         (void) dbopen( NULL, 0, 0, 0, NULL);
12006 #endif
12007
12008 ; return 0; }
12009 EOF
12010 if { (eval echo configure:12011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12011   rm -rf conftest*
12012   ol_cv_db_db=yes
12013 else
12014   echo "configure: failed program was:" >&5
12015   cat conftest.$ac_ext >&5
12016   rm -rf conftest*
12017   ol_cv_db_db=no
12018 fi
12019 rm -f conftest*
12020
12021         LIBS="$ol_LIBS"
12022
12023 fi
12024
12025 echo "$ac_t""$ol_cv_db_db" 1>&6
12026
12027         if test $ol_cv_db_db = yes ; then
12028                 ol_cv_lib_db=-ldb
12029         fi
12030 fi
12031
12032 if test $ol_cv_lib_db = no ; then
12033         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12034 echo "configure:12035: checking for Berkeley DB link (-ldb3)" >&5
12035 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12036   echo $ac_n "(cached) $ac_c" 1>&6
12037 else
12038   
12039         ol_DB_LIB=-ldb3
12040         ol_LIBS=$LIBS
12041         LIBS="$ol_DB_LIB $LIBS"
12042
12043         cat > conftest.$ac_ext <<EOF
12044 #line 12045 "configure"
12045 #include "confdefs.h"
12046
12047 #ifdef HAVE_DB_185_H
12048 # include <db_185.h>
12049 #else
12050 # include <db.h>
12051 #endif
12052
12053 #ifndef DB_VERSION_MAJOR
12054 # define DB_VERSION_MAJOR 1
12055 #endif
12056
12057 #ifndef NULL
12058 #define NULL ((void*)0)
12059 #endif
12060
12061 int main() {
12062
12063 #if DB_VERSION_MAJOR > 2
12064         db_env_create( NULL, 0 );
12065 #elif DB_VERSION_MAJOR > 1
12066         db_appexit( NULL );
12067 #else
12068         (void) dbopen( NULL, 0, 0, 0, NULL);
12069 #endif
12070
12071 ; return 0; }
12072 EOF
12073 if { (eval echo configure:12074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12074   rm -rf conftest*
12075   ol_cv_db_db3=yes
12076 else
12077   echo "configure: failed program was:" >&5
12078   cat conftest.$ac_ext >&5
12079   rm -rf conftest*
12080   ol_cv_db_db3=no
12081 fi
12082 rm -f conftest*
12083
12084         LIBS="$ol_LIBS"
12085
12086 fi
12087
12088 echo "$ac_t""$ol_cv_db_db3" 1>&6
12089
12090         if test $ol_cv_db_db3 = yes ; then
12091                 ol_cv_lib_db=-ldb3
12092         fi
12093 fi
12094
12095 if test $ol_cv_lib_db = no ; then
12096         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12097 echo "configure:12098: checking for Berkeley DB link (-ldb2)" >&5
12098 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12099   echo $ac_n "(cached) $ac_c" 1>&6
12100 else
12101   
12102         ol_DB_LIB=-ldb2
12103         ol_LIBS=$LIBS
12104         LIBS="$ol_DB_LIB $LIBS"
12105
12106         cat > conftest.$ac_ext <<EOF
12107 #line 12108 "configure"
12108 #include "confdefs.h"
12109
12110 #ifdef HAVE_DB_185_H
12111 # include <db_185.h>
12112 #else
12113 # include <db.h>
12114 #endif
12115
12116 #ifndef DB_VERSION_MAJOR
12117 # define DB_VERSION_MAJOR 1
12118 #endif
12119
12120 #ifndef NULL
12121 #define NULL ((void*)0)
12122 #endif
12123
12124 int main() {
12125
12126 #if DB_VERSION_MAJOR > 2
12127         db_env_create( NULL, 0 );
12128 #elif DB_VERSION_MAJOR > 1
12129         db_appexit( NULL );
12130 #else
12131         (void) dbopen( NULL, 0, 0, 0, NULL);
12132 #endif
12133
12134 ; return 0; }
12135 EOF
12136 if { (eval echo configure:12137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12137   rm -rf conftest*
12138   ol_cv_db_db2=yes
12139 else
12140   echo "configure: failed program was:" >&5
12141   cat conftest.$ac_ext >&5
12142   rm -rf conftest*
12143   ol_cv_db_db2=no
12144 fi
12145 rm -f conftest*
12146
12147         LIBS="$ol_LIBS"
12148
12149 fi
12150
12151 echo "$ac_t""$ol_cv_db_db2" 1>&6
12152
12153         if test $ol_cv_db_db2 = yes ; then
12154                 ol_cv_lib_db=-ldb2
12155         fi
12156 fi
12157
12158 if test $ol_cv_lib_db = no ; then
12159         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12160 echo "configure:12161: checking for Berkeley DB link (-ldb1)" >&5
12161 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12162   echo $ac_n "(cached) $ac_c" 1>&6
12163 else
12164   
12165         ol_DB_LIB=-ldb1
12166         ol_LIBS=$LIBS
12167         LIBS="$ol_DB_LIB $LIBS"
12168
12169         cat > conftest.$ac_ext <<EOF
12170 #line 12171 "configure"
12171 #include "confdefs.h"
12172
12173 #ifdef HAVE_DB_185_H
12174 # include <db_185.h>
12175 #else
12176 # include <db.h>
12177 #endif
12178
12179 #ifndef DB_VERSION_MAJOR
12180 # define DB_VERSION_MAJOR 1
12181 #endif
12182
12183 #ifndef NULL
12184 #define NULL ((void*)0)
12185 #endif
12186
12187 int main() {
12188
12189 #if DB_VERSION_MAJOR > 2
12190         db_env_create( NULL, 0 );
12191 #elif DB_VERSION_MAJOR > 1
12192         db_appexit( NULL );
12193 #else
12194         (void) dbopen( NULL, 0, 0, 0, NULL);
12195 #endif
12196
12197 ; return 0; }
12198 EOF
12199 if { (eval echo configure:12200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12200   rm -rf conftest*
12201   ol_cv_db_db1=yes
12202 else
12203   echo "configure: failed program was:" >&5
12204   cat conftest.$ac_ext >&5
12205   rm -rf conftest*
12206   ol_cv_db_db1=no
12207 fi
12208 rm -f conftest*
12209
12210         LIBS="$ol_LIBS"
12211
12212 fi
12213
12214 echo "$ac_t""$ol_cv_db_db1" 1>&6
12215
12216         if test $ol_cv_db_db1 = yes ; then
12217                 ol_cv_lib_db=-ldb1
12218         fi
12219 fi
12220
12221
12222         if test "$ol_cv_lib_db" != no ; then
12223                 ol_cv_berkeley_db=yes
12224                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12225 echo "configure:12226: checking for Berkeley DB thread support" >&5
12226 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12227   echo $ac_n "(cached) $ac_c" 1>&6
12228 else
12229   
12230         ol_LIBS="$LIBS"
12231         if test $ol_cv_lib_db != yes ; then
12232                 LIBS="$ol_cv_lib_db"
12233         fi
12234
12235         if test "$cross_compiling" = yes; then
12236   ol_cv_berkeley_db_thread=cross
12237 else
12238   cat > conftest.$ac_ext <<EOF
12239 #line 12240 "configure"
12240 #include "confdefs.h"
12241
12242 #ifdef HAVE_DB_185_H
12243         choke me;
12244 #else
12245 #include <db.h>
12246 #endif
12247 #ifndef NULL
12248 #define NULL ((void *)0)
12249 #endif
12250 main()
12251 {
12252         int rc;
12253         u_int32_t flags = DB_CREATE | DB_THREAD;
12254
12255
12256 #if DB_VERSION_MAJOR > 2
12257         DB_ENV *env = NULL;
12258
12259         rc = db_env_create( &env, 0 );
12260
12261         if( rc == 0 ) {
12262                 rc = env->open( env, NULL, NULL, flags, 0 );
12263         }
12264
12265 #else
12266         DB_ENV env;
12267         memset( &env, '\0', sizeof(env) );
12268
12269         rc = db_appinit( NULL, NULL, &env, flags );
12270
12271         if( rc == 0 ) {
12272                 db_appexit( &env );
12273         }
12274 #endif
12275
12276         return rc;
12277 }
12278 EOF
12279 if { (eval echo configure:12280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12280 then
12281   ol_cv_berkeley_db_thread=yes
12282 else
12283   echo "configure: failed program was:" >&5
12284   cat conftest.$ac_ext >&5
12285   rm -fr conftest*
12286   ol_cv_berkeley_db_thread=no
12287 fi
12288 rm -fr conftest*
12289 fi
12290
12291
12292         LIBS="$ol_LIBS"
12293
12294         if test $ol_cv_berkeley_db_thread != no ; then
12295                 cat >> confdefs.h <<\EOF
12296 #define HAVE_BERKELEY_DB_THREAD 1
12297 EOF
12298
12299         fi
12300
12301 fi
12302
12303 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12304         fi
12305 fi
12306
12307         fi
12308
12309         if test $ol_cv_berkeley_db != no ; then
12310                 cat >> confdefs.h <<\EOF
12311 #define HAVE_BERKELEY_DB 1
12312 EOF
12313
12314
12315                 ol_link_ldbm=berkeley
12316                 ol_with_ldbm_api=db
12317
12318                 if test $ol_with_ldbm_type = hash ; then
12319                         cat >> confdefs.h <<\EOF
12320 #define LDBM_USE_DBHASH 1
12321 EOF
12322
12323                 else
12324                         cat >> confdefs.h <<\EOF
12325 #define LDBM_USE_DBBTREE 1
12326 EOF
12327
12328                 fi
12329
12330                                                 if test $ol_cv_lib_db != yes ; then
12331                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12332                 fi
12333         fi
12334 fi
12335
12336 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12337         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12338         ol_with_ldbm_api=none
12339 fi
12340
12341 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12342         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12343 echo "configure:12344: checking for MDBM library" >&5
12344 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12345   echo $ac_n "(cached) $ac_c" 1>&6
12346 else
12347         ol_LIBS="$LIBS"
12348         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12349 echo "configure:12350: checking for mdbm_set_chain" >&5
12350 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12351   echo $ac_n "(cached) $ac_c" 1>&6
12352 else
12353   cat > conftest.$ac_ext <<EOF
12354 #line 12355 "configure"
12355 #include "confdefs.h"
12356 /* System header to define __stub macros and hopefully few prototypes,
12357     which can conflict with char mdbm_set_chain(); below.  */
12358 #include <assert.h>
12359 /* Override any gcc2 internal prototype to avoid an error.  */
12360 /* We use char because int might match the return type of a gcc2
12361     builtin and then its argument prototype would still apply.  */
12362 char mdbm_set_chain();
12363 char (*f)();
12364
12365 int main() {
12366
12367 /* The GNU C library defines this for functions which it implements
12368     to always fail with ENOSYS.  Some functions are actually named
12369     something starting with __ and the normal name is an alias.  */
12370 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12371 choke me
12372 #else
12373 f = mdbm_set_chain;
12374 #endif
12375
12376 ; return 0; }
12377 EOF
12378 if { (eval echo configure:12379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12379   rm -rf conftest*
12380   eval "ac_cv_func_mdbm_set_chain=yes"
12381 else
12382   echo "configure: failed program was:" >&5
12383   cat conftest.$ac_ext >&5
12384   rm -rf conftest*
12385   eval "ac_cv_func_mdbm_set_chain=no"
12386 fi
12387 rm -f conftest*
12388 fi
12389
12390 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12391   echo "$ac_t""yes" 1>&6
12392   ol_cv_lib_mdbm=yes
12393 else
12394   echo "$ac_t""no" 1>&6
12395
12396                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12397 echo "configure:12398: checking for mdbm_set_chain in -lmdbm" >&5
12398 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12399 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12400   echo $ac_n "(cached) $ac_c" 1>&6
12401 else
12402   ac_save_LIBS="$LIBS"
12403 LIBS="-lmdbm  $LIBS"
12404 cat > conftest.$ac_ext <<EOF
12405 #line 12406 "configure"
12406 #include "confdefs.h"
12407 /* Override any gcc2 internal prototype to avoid an error.  */
12408 /* We use char because int might match the return type of a gcc2
12409     builtin and then its argument prototype would still apply.  */
12410 char mdbm_set_chain();
12411
12412 int main() {
12413 mdbm_set_chain()
12414 ; return 0; }
12415 EOF
12416 if { (eval echo configure:12417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12417   rm -rf conftest*
12418   eval "ac_cv_lib_$ac_lib_var=yes"
12419 else
12420   echo "configure: failed program was:" >&5
12421   cat conftest.$ac_ext >&5
12422   rm -rf conftest*
12423   eval "ac_cv_lib_$ac_lib_var=no"
12424 fi
12425 rm -f conftest*
12426 LIBS="$ac_save_LIBS"
12427
12428 fi
12429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12430   echo "$ac_t""yes" 1>&6
12431   ol_cv_lib_mdbm=-lmdbm
12432 else
12433   echo "$ac_t""no" 1>&6
12434 ol_cv_lib_mdbm=no
12435 fi
12436
12437         
12438 fi
12439
12440         LIBS="$ol_LIBS"
12441
12442 fi
12443
12444 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12445
12446
12447  for ac_hdr in mdbm.h
12448 do
12449 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12450 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12451 echo "configure:12452: checking for $ac_hdr" >&5
12452 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12453   echo $ac_n "(cached) $ac_c" 1>&6
12454 else
12455   cat > conftest.$ac_ext <<EOF
12456 #line 12457 "configure"
12457 #include "confdefs.h"
12458 #include <$ac_hdr>
12459 EOF
12460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12461 { (eval echo configure:12462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12463 if test -z "$ac_err"; then
12464   rm -rf conftest*
12465   eval "ac_cv_header_$ac_safe=yes"
12466 else
12467   echo "$ac_err" >&5
12468   echo "configure: failed program was:" >&5
12469   cat conftest.$ac_ext >&5
12470   rm -rf conftest*
12471   eval "ac_cv_header_$ac_safe=no"
12472 fi
12473 rm -f conftest*
12474 fi
12475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12476   echo "$ac_t""yes" 1>&6
12477     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12478   cat >> confdefs.h <<EOF
12479 #define $ac_tr_hdr 1
12480 EOF
12481  
12482 else
12483   echo "$ac_t""no" 1>&6
12484 fi
12485 done
12486
12487  echo $ac_n "checking for db""... $ac_c" 1>&6
12488 echo "configure:12489: checking for db" >&5
12489 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12490   echo $ac_n "(cached) $ac_c" 1>&6
12491 else
12492   
12493         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12494                 ol_cv_mdbm=no
12495         else
12496                 ol_cv_mdbm=yes
12497         fi
12498
12499 fi
12500
12501 echo "$ac_t""$ol_cv_mdbm" 1>&6
12502  if test $ol_cv_mdbm = yes ; then
12503         cat >> confdefs.h <<\EOF
12504 #define HAVE_MDBM 1
12505 EOF
12506
12507  fi
12508
12509
12510         if test $ol_cv_mdbm = yes ; then
12511                 ol_link_ldbm=mdbm
12512                 ol_with_ldbm_api=mdbm
12513                 if test $ol_cv_lib_mdbm != yes ; then
12514                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12515                 fi
12516         fi
12517 fi
12518
12519 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12520         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12521 echo "configure:12522: checking for GDBM library" >&5
12522 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12523   echo $ac_n "(cached) $ac_c" 1>&6
12524 else
12525         ol_LIBS="$LIBS"
12526         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12527 echo "configure:12528: checking for gdbm_open" >&5
12528 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12529   echo $ac_n "(cached) $ac_c" 1>&6
12530 else
12531   cat > conftest.$ac_ext <<EOF
12532 #line 12533 "configure"
12533 #include "confdefs.h"
12534 /* System header to define __stub macros and hopefully few prototypes,
12535     which can conflict with char gdbm_open(); below.  */
12536 #include <assert.h>
12537 /* Override any gcc2 internal prototype to avoid an error.  */
12538 /* We use char because int might match the return type of a gcc2
12539     builtin and then its argument prototype would still apply.  */
12540 char gdbm_open();
12541 char (*f)();
12542
12543 int main() {
12544
12545 /* The GNU C library defines this for functions which it implements
12546     to always fail with ENOSYS.  Some functions are actually named
12547     something starting with __ and the normal name is an alias.  */
12548 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12549 choke me
12550 #else
12551 f = gdbm_open;
12552 #endif
12553
12554 ; return 0; }
12555 EOF
12556 if { (eval echo configure:12557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12557   rm -rf conftest*
12558   eval "ac_cv_func_gdbm_open=yes"
12559 else
12560   echo "configure: failed program was:" >&5
12561   cat conftest.$ac_ext >&5
12562   rm -rf conftest*
12563   eval "ac_cv_func_gdbm_open=no"
12564 fi
12565 rm -f conftest*
12566 fi
12567
12568 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12569   echo "$ac_t""yes" 1>&6
12570   ol_cv_lib_gdbm=yes
12571 else
12572   echo "$ac_t""no" 1>&6
12573
12574                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12575 echo "configure:12576: checking for gdbm_open in -lgdbm" >&5
12576 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12577 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12578   echo $ac_n "(cached) $ac_c" 1>&6
12579 else
12580   ac_save_LIBS="$LIBS"
12581 LIBS="-lgdbm  $LIBS"
12582 cat > conftest.$ac_ext <<EOF
12583 #line 12584 "configure"
12584 #include "confdefs.h"
12585 /* Override any gcc2 internal prototype to avoid an error.  */
12586 /* We use char because int might match the return type of a gcc2
12587     builtin and then its argument prototype would still apply.  */
12588 char gdbm_open();
12589
12590 int main() {
12591 gdbm_open()
12592 ; return 0; }
12593 EOF
12594 if { (eval echo configure:12595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12595   rm -rf conftest*
12596   eval "ac_cv_lib_$ac_lib_var=yes"
12597 else
12598   echo "configure: failed program was:" >&5
12599   cat conftest.$ac_ext >&5
12600   rm -rf conftest*
12601   eval "ac_cv_lib_$ac_lib_var=no"
12602 fi
12603 rm -f conftest*
12604 LIBS="$ac_save_LIBS"
12605
12606 fi
12607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12608   echo "$ac_t""yes" 1>&6
12609   ol_cv_lib_gdbm=-lgdbm
12610 else
12611   echo "$ac_t""no" 1>&6
12612 ol_cv_lib_gdbm=no
12613 fi
12614
12615         
12616 fi
12617
12618         LIBS="$ol_LIBS"
12619
12620 fi
12621
12622 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12623
12624
12625  for ac_hdr in gdbm.h
12626 do
12627 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12628 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12629 echo "configure:12630: checking for $ac_hdr" >&5
12630 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12631   echo $ac_n "(cached) $ac_c" 1>&6
12632 else
12633   cat > conftest.$ac_ext <<EOF
12634 #line 12635 "configure"
12635 #include "confdefs.h"
12636 #include <$ac_hdr>
12637 EOF
12638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12639 { (eval echo configure:12640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12641 if test -z "$ac_err"; then
12642   rm -rf conftest*
12643   eval "ac_cv_header_$ac_safe=yes"
12644 else
12645   echo "$ac_err" >&5
12646   echo "configure: failed program was:" >&5
12647   cat conftest.$ac_ext >&5
12648   rm -rf conftest*
12649   eval "ac_cv_header_$ac_safe=no"
12650 fi
12651 rm -f conftest*
12652 fi
12653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12654   echo "$ac_t""yes" 1>&6
12655     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12656   cat >> confdefs.h <<EOF
12657 #define $ac_tr_hdr 1
12658 EOF
12659  
12660 else
12661   echo "$ac_t""no" 1>&6
12662 fi
12663 done
12664
12665  echo $ac_n "checking for db""... $ac_c" 1>&6
12666 echo "configure:12667: checking for db" >&5
12667 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12668   echo $ac_n "(cached) $ac_c" 1>&6
12669 else
12670   
12671         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12672                 ol_cv_gdbm=no
12673         else
12674                 ol_cv_gdbm=yes
12675         fi
12676
12677 fi
12678
12679 echo "$ac_t""$ol_cv_gdbm" 1>&6
12680  if test $ol_cv_gdbm = yes ; then
12681         cat >> confdefs.h <<\EOF
12682 #define HAVE_GDBM 1
12683 EOF
12684
12685  fi
12686
12687
12688         if test $ol_cv_gdbm = yes ; then
12689                 ol_link_ldbm=gdbm
12690                 ol_with_ldbm_api=gdbm
12691
12692                 if test $ol_cv_lib_gdbm != yes ; then
12693                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12694                 fi
12695         fi
12696 fi
12697
12698 if test $ol_with_ldbm_api = ndbm ; then
12699         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12700 echo "configure:12701: checking for NDBM library" >&5
12701 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12702   echo $ac_n "(cached) $ac_c" 1>&6
12703 else
12704         ol_LIBS="$LIBS"
12705         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12706 echo "configure:12707: checking for dbm_open" >&5
12707 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12708   echo $ac_n "(cached) $ac_c" 1>&6
12709 else
12710   cat > conftest.$ac_ext <<EOF
12711 #line 12712 "configure"
12712 #include "confdefs.h"
12713 /* System header to define __stub macros and hopefully few prototypes,
12714     which can conflict with char dbm_open(); below.  */
12715 #include <assert.h>
12716 /* Override any gcc2 internal prototype to avoid an error.  */
12717 /* We use char because int might match the return type of a gcc2
12718     builtin and then its argument prototype would still apply.  */
12719 char dbm_open();
12720 char (*f)();
12721
12722 int main() {
12723
12724 /* The GNU C library defines this for functions which it implements
12725     to always fail with ENOSYS.  Some functions are actually named
12726     something starting with __ and the normal name is an alias.  */
12727 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12728 choke me
12729 #else
12730 f = dbm_open;
12731 #endif
12732
12733 ; return 0; }
12734 EOF
12735 if { (eval echo configure:12736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12736   rm -rf conftest*
12737   eval "ac_cv_func_dbm_open=yes"
12738 else
12739   echo "configure: failed program was:" >&5
12740   cat conftest.$ac_ext >&5
12741   rm -rf conftest*
12742   eval "ac_cv_func_dbm_open=no"
12743 fi
12744 rm -f conftest*
12745 fi
12746
12747 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12748   echo "$ac_t""yes" 1>&6
12749   ol_cv_lib_ndbm=yes
12750 else
12751   echo "$ac_t""no" 1>&6
12752
12753                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12754 echo "configure:12755: checking for dbm_open in -lndbm" >&5
12755 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12756 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12757   echo $ac_n "(cached) $ac_c" 1>&6
12758 else
12759   ac_save_LIBS="$LIBS"
12760 LIBS="-lndbm  $LIBS"
12761 cat > conftest.$ac_ext <<EOF
12762 #line 12763 "configure"
12763 #include "confdefs.h"
12764 /* Override any gcc2 internal prototype to avoid an error.  */
12765 /* We use char because int might match the return type of a gcc2
12766     builtin and then its argument prototype would still apply.  */
12767 char dbm_open();
12768
12769 int main() {
12770 dbm_open()
12771 ; return 0; }
12772 EOF
12773 if { (eval echo configure:12774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12774   rm -rf conftest*
12775   eval "ac_cv_lib_$ac_lib_var=yes"
12776 else
12777   echo "configure: failed program was:" >&5
12778   cat conftest.$ac_ext >&5
12779   rm -rf conftest*
12780   eval "ac_cv_lib_$ac_lib_var=no"
12781 fi
12782 rm -f conftest*
12783 LIBS="$ac_save_LIBS"
12784
12785 fi
12786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12787   echo "$ac_t""yes" 1>&6
12788   ol_cv_lib_ndbm=-lndbm
12789 else
12790   echo "$ac_t""no" 1>&6
12791
12792                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12793 echo "configure:12794: checking for dbm_open in -ldbm" >&5
12794 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12796   echo $ac_n "(cached) $ac_c" 1>&6
12797 else
12798   ac_save_LIBS="$LIBS"
12799 LIBS="-ldbm  $LIBS"
12800 cat > conftest.$ac_ext <<EOF
12801 #line 12802 "configure"
12802 #include "confdefs.h"
12803 /* Override any gcc2 internal prototype to avoid an error.  */
12804 /* We use char because int might match the return type of a gcc2
12805     builtin and then its argument prototype would still apply.  */
12806 char dbm_open();
12807
12808 int main() {
12809 dbm_open()
12810 ; return 0; }
12811 EOF
12812 if { (eval echo configure:12813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12813   rm -rf conftest*
12814   eval "ac_cv_lib_$ac_lib_var=yes"
12815 else
12816   echo "configure: failed program was:" >&5
12817   cat conftest.$ac_ext >&5
12818   rm -rf conftest*
12819   eval "ac_cv_lib_$ac_lib_var=no"
12820 fi
12821 rm -f conftest*
12822 LIBS="$ac_save_LIBS"
12823
12824 fi
12825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12826   echo "$ac_t""yes" 1>&6
12827   ol_cv_lib_ndbm=-ldbm
12828 else
12829   echo "$ac_t""no" 1>&6
12830 ol_cv_lib_ndbm=no
12831 fi
12832                 
12833 fi
12834
12835         
12836 fi
12837
12838         LIBS="$ol_LIBS"
12839
12840 fi
12841
12842 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12843
12844
12845  for ac_hdr in ndbm.h
12846 do
12847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12849 echo "configure:12850: checking for $ac_hdr" >&5
12850 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12851   echo $ac_n "(cached) $ac_c" 1>&6
12852 else
12853   cat > conftest.$ac_ext <<EOF
12854 #line 12855 "configure"
12855 #include "confdefs.h"
12856 #include <$ac_hdr>
12857 EOF
12858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12859 { (eval echo configure:12860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12861 if test -z "$ac_err"; then
12862   rm -rf conftest*
12863   eval "ac_cv_header_$ac_safe=yes"
12864 else
12865   echo "$ac_err" >&5
12866   echo "configure: failed program was:" >&5
12867   cat conftest.$ac_ext >&5
12868   rm -rf conftest*
12869   eval "ac_cv_header_$ac_safe=no"
12870 fi
12871 rm -f conftest*
12872 fi
12873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12874   echo "$ac_t""yes" 1>&6
12875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12876   cat >> confdefs.h <<EOF
12877 #define $ac_tr_hdr 1
12878 EOF
12879  
12880 else
12881   echo "$ac_t""no" 1>&6
12882 fi
12883 done
12884
12885  echo $ac_n "checking for db""... $ac_c" 1>&6
12886 echo "configure:12887: checking for db" >&5
12887 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12888   echo $ac_n "(cached) $ac_c" 1>&6
12889 else
12890   
12891         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12892                 ol_cv_ndbm=no
12893         else
12894                 ol_cv_ndbm=yes
12895         fi
12896
12897 fi
12898
12899 echo "$ac_t""$ol_cv_ndbm" 1>&6
12900  if test $ol_cv_ndbm = yes ; then
12901         cat >> confdefs.h <<\EOF
12902 #define HAVE_NDBM 1
12903 EOF
12904
12905  fi
12906
12907
12908         if test $ol_cv_ndbm = yes ; then
12909                 ol_link_ldbm=ndbm
12910                 ol_with_ldbm_api=ndbm
12911
12912                 if test $ol_cv_lib_ndbm != yes ; then
12913                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12914                 fi
12915         fi
12916 fi
12917
12918 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12919         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12920         if test $ol_enable_ldbm = yes ; then
12921                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12922         fi
12923
12924         echo "configure: warning: disabling LDBM" 1>&2
12925         ol_enable_ldbm=no
12926 fi
12927
12928 ol_link_bdb2=no
12929 if test $ol_enable_bdb2 != no ; then
12930         if test $ol_enable_bdb2 = yes -a $ol_link_ldbm != berkeley ; then
12931                 { echo "configure: error: BDB2 requires LDBM BerkeleyDB 2" 1>&2; exit 1; }
12932         elif test $ol_link_ldbm = berkeley ; then
12933                 ol_link_bdb2=$ol_link_ldbm
12934         fi
12935 fi
12936
12937 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12938         LINK_BINS_DYNAMIC="yes"
12939 else
12940         LINK_BINS_DYNAMIC="no"
12941 fi
12942
12943 if test $ol_enable_wrappers != no ; then
12944         for ac_hdr in tcpd.h
12945 do
12946 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12947 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12948 echo "configure:12949: checking for $ac_hdr" >&5
12949 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12950   echo $ac_n "(cached) $ac_c" 1>&6
12951 else
12952   cat > conftest.$ac_ext <<EOF
12953 #line 12954 "configure"
12954 #include "confdefs.h"
12955 #include <$ac_hdr>
12956 EOF
12957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12958 { (eval echo configure:12959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12960 if test -z "$ac_err"; then
12961   rm -rf conftest*
12962   eval "ac_cv_header_$ac_safe=yes"
12963 else
12964   echo "$ac_err" >&5
12965   echo "configure: failed program was:" >&5
12966   cat conftest.$ac_ext >&5
12967   rm -rf conftest*
12968   eval "ac_cv_header_$ac_safe=no"
12969 fi
12970 rm -f conftest*
12971 fi
12972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12973   echo "$ac_t""yes" 1>&6
12974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12975   cat >> confdefs.h <<EOF
12976 #define $ac_tr_hdr 1
12977 EOF
12978  
12979 else
12980   echo "$ac_t""no" 1>&6
12981 fi
12982 done
12983
12984
12985         if test $ac_cv_header_tcpd_h != yes ; then
12986                 have_wrappers=no
12987         else
12988                 cat > conftest.$ac_ext <<EOF
12989 #line 12990 "configure"
12990 #include "confdefs.h"
12991
12992 int allow_severity = 0;
12993 int deny_severity  = 0;
12994                 
12995 int main() {
12996 hosts_access()
12997 ; return 0; }
12998 EOF
12999 if { (eval echo configure:13000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13000   rm -rf conftest*
13001   have_wrappers=yes
13002 else
13003   echo "configure: failed program was:" >&5
13004   cat conftest.$ac_ext >&5
13005   rm -rf conftest*
13006   have_wrappers=no
13007 fi
13008 rm -f conftest*
13009         fi
13010
13011         if test $have_wrappers = yes ; then
13012                 cat >> confdefs.h <<\EOF
13013 #define HAVE_TCPD 1
13014 EOF
13015
13016                 WRAP_LIBS="-lwrap"
13017
13018                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13019 echo "configure:13020: checking for main in -lnsl" >&5
13020 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13022   echo $ac_n "(cached) $ac_c" 1>&6
13023 else
13024   ac_save_LIBS="$LIBS"
13025 LIBS="-lnsl  $LIBS"
13026 cat > conftest.$ac_ext <<EOF
13027 #line 13028 "configure"
13028 #include "confdefs.h"
13029
13030 int main() {
13031 main()
13032 ; return 0; }
13033 EOF
13034 if { (eval echo configure:13035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13035   rm -rf conftest*
13036   eval "ac_cv_lib_$ac_lib_var=yes"
13037 else
13038   echo "configure: failed program was:" >&5
13039   cat conftest.$ac_ext >&5
13040   rm -rf conftest*
13041   eval "ac_cv_lib_$ac_lib_var=no"
13042 fi
13043 rm -f conftest*
13044 LIBS="$ac_save_LIBS"
13045
13046 fi
13047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13048   echo "$ac_t""yes" 1>&6
13049     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13050     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13051   cat >> confdefs.h <<EOF
13052 #define $ac_tr_lib 1
13053 EOF
13054
13055   LIBS="-lnsl $LIBS"
13056
13057 else
13058   echo "$ac_t""no" 1>&6
13059 fi
13060
13061         else
13062                 echo "configure: warning: could not find -lwrap" 1>&2
13063                 if test $ol_enable_wrappers = yes ; then
13064                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13065                 fi
13066
13067                 echo "configure: warning: disabling wrappers support" 1>&2
13068                 ol_enable_wrappers=no
13069                 WRAP_LIBS=""
13070         fi
13071 fi
13072
13073 if test $ol_enable_syslog != no ; then
13074         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13075 echo "configure:13076: checking for openlog" >&5
13076 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13077   echo $ac_n "(cached) $ac_c" 1>&6
13078 else
13079   cat > conftest.$ac_ext <<EOF
13080 #line 13081 "configure"
13081 #include "confdefs.h"
13082 /* System header to define __stub macros and hopefully few prototypes,
13083     which can conflict with char openlog(); below.  */
13084 #include <assert.h>
13085 /* Override any gcc2 internal prototype to avoid an error.  */
13086 /* We use char because int might match the return type of a gcc2
13087     builtin and then its argument prototype would still apply.  */
13088 char openlog();
13089 char (*f)();
13090
13091 int main() {
13092
13093 /* The GNU C library defines this for functions which it implements
13094     to always fail with ENOSYS.  Some functions are actually named
13095     something starting with __ and the normal name is an alias.  */
13096 #if defined (__stub_openlog) || defined (__stub___openlog)
13097 choke me
13098 #else
13099 f = openlog;
13100 #endif
13101
13102 ; return 0; }
13103 EOF
13104 if { (eval echo configure:13105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13105   rm -rf conftest*
13106   eval "ac_cv_func_openlog=yes"
13107 else
13108   echo "configure: failed program was:" >&5
13109   cat conftest.$ac_ext >&5
13110   rm -rf conftest*
13111   eval "ac_cv_func_openlog=no"
13112 fi
13113 rm -f conftest*
13114 fi
13115
13116 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13117   echo "$ac_t""yes" 1>&6
13118   :
13119 else
13120   echo "$ac_t""no" 1>&6
13121 fi
13122
13123         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13124                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13125         fi
13126         ol_enable_syslog=$ac_cv_func_openlog
13127 fi
13128
13129 if test $ol_enable_tcl != no ; then
13130         for ac_hdr in tcl.h
13131 do
13132 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13133 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13134 echo "configure:13135: checking for $ac_hdr" >&5
13135 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13136   echo $ac_n "(cached) $ac_c" 1>&6
13137 else
13138   cat > conftest.$ac_ext <<EOF
13139 #line 13140 "configure"
13140 #include "confdefs.h"
13141 #include <$ac_hdr>
13142 EOF
13143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13144 { (eval echo configure:13145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13146 if test -z "$ac_err"; then
13147   rm -rf conftest*
13148   eval "ac_cv_header_$ac_safe=yes"
13149 else
13150   echo "$ac_err" >&5
13151   echo "configure: failed program was:" >&5
13152   cat conftest.$ac_ext >&5
13153   rm -rf conftest*
13154   eval "ac_cv_header_$ac_safe=no"
13155 fi
13156 rm -f conftest*
13157 fi
13158 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13159   echo "$ac_t""yes" 1>&6
13160     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13161   cat >> confdefs.h <<EOF
13162 #define $ac_tr_hdr 1
13163 EOF
13164  
13165 else
13166   echo "$ac_t""no" 1>&6
13167 fi
13168 done
13169
13170
13171         if test $ac_cv_header_tcl_h != yes ; then
13172                 have_tcl=no
13173         else
13174                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13175                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13176 echo "configure:13177: checking for main in -l$lib" >&5
13177 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13178 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13179   echo $ac_n "(cached) $ac_c" 1>&6
13180 else
13181   ac_save_LIBS="$LIBS"
13182 LIBS="-l$lib  $LIBS"
13183 cat > conftest.$ac_ext <<EOF
13184 #line 13185 "configure"
13185 #include "confdefs.h"
13186
13187 int main() {
13188 main()
13189 ; return 0; }
13190 EOF
13191 if { (eval echo configure:13192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13192   rm -rf conftest*
13193   eval "ac_cv_lib_$ac_lib_var=yes"
13194 else
13195   echo "configure: failed program was:" >&5
13196   cat conftest.$ac_ext >&5
13197   rm -rf conftest*
13198   eval "ac_cv_lib_$ac_lib_var=no"
13199 fi
13200 rm -f conftest*
13201 LIBS="$ac_save_LIBS"
13202
13203 fi
13204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13205   echo "$ac_t""yes" 1>&6
13206   have_tcl=yes
13207                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13208                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13209                            else
13210                                MOD_TCL_LIB="-l${lib}"
13211                            fi;break
13212 else
13213   echo "$ac_t""no" 1>&6
13214 have_tcl=no
13215 fi
13216
13217                 done
13218         fi
13219
13220         if test $have_tcl != yes ; then
13221                 echo "configure: warning: could not find -ltcl" 1>&2
13222                 if test $ol_enable_tcl = yes ; then
13223                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13224                 fi
13225
13226                 ol_enable_tcl=no
13227         fi
13228 fi
13229
13230 ol_link_termcap=no
13231 for ac_hdr in termcap.h ncurses.h
13232 do
13233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13235 echo "configure:13236: checking for $ac_hdr" >&5
13236 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13237   echo $ac_n "(cached) $ac_c" 1>&6
13238 else
13239   cat > conftest.$ac_ext <<EOF
13240 #line 13241 "configure"
13241 #include "confdefs.h"
13242 #include <$ac_hdr>
13243 EOF
13244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13245 { (eval echo configure:13246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13247 if test -z "$ac_err"; then
13248   rm -rf conftest*
13249   eval "ac_cv_header_$ac_safe=yes"
13250 else
13251   echo "$ac_err" >&5
13252   echo "configure: failed program was:" >&5
13253   cat conftest.$ac_ext >&5
13254   rm -rf conftest*
13255   eval "ac_cv_header_$ac_safe=no"
13256 fi
13257 rm -f conftest*
13258 fi
13259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13260   echo "$ac_t""yes" 1>&6
13261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13262   cat >> confdefs.h <<EOF
13263 #define $ac_tr_hdr 1
13264 EOF
13265  
13266 else
13267   echo "$ac_t""no" 1>&6
13268 fi
13269 done
13270
13271
13272 if test $ol_link_termcap = no ; then
13273         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13274 echo "configure:13275: checking for tputs in -ltermcap" >&5
13275 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13277   echo $ac_n "(cached) $ac_c" 1>&6
13278 else
13279   ac_save_LIBS="$LIBS"
13280 LIBS="-ltermcap  $LIBS"
13281 cat > conftest.$ac_ext <<EOF
13282 #line 13283 "configure"
13283 #include "confdefs.h"
13284 /* Override any gcc2 internal prototype to avoid an error.  */
13285 /* We use char because int might match the return type of a gcc2
13286     builtin and then its argument prototype would still apply.  */
13287 char tputs();
13288
13289 int main() {
13290 tputs()
13291 ; return 0; }
13292 EOF
13293 if { (eval echo configure:13294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13294   rm -rf conftest*
13295   eval "ac_cv_lib_$ac_lib_var=yes"
13296 else
13297   echo "configure: failed program was:" >&5
13298   cat conftest.$ac_ext >&5
13299   rm -rf conftest*
13300   eval "ac_cv_lib_$ac_lib_var=no"
13301 fi
13302 rm -f conftest*
13303 LIBS="$ac_save_LIBS"
13304
13305 fi
13306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13307   echo "$ac_t""yes" 1>&6
13308   have_termcap=yes
13309 else
13310   echo "$ac_t""no" 1>&6
13311 have_termcap=no
13312 fi
13313
13314         if test $have_termcap = yes ; then
13315                 cat >> confdefs.h <<\EOF
13316 #define HAVE_TERMCAP 1
13317 EOF
13318
13319                 ol_link_termcap=yes
13320                 TERMCAP_LIBS=-ltermcap
13321         fi
13322 fi
13323
13324 if test $ol_link_termcap = no ; then
13325         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13326 echo "configure:13327: checking for initscr in -lncurses" >&5
13327 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13328 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13329   echo $ac_n "(cached) $ac_c" 1>&6
13330 else
13331   ac_save_LIBS="$LIBS"
13332 LIBS="-lncurses  $LIBS"
13333 cat > conftest.$ac_ext <<EOF
13334 #line 13335 "configure"
13335 #include "confdefs.h"
13336 /* Override any gcc2 internal prototype to avoid an error.  */
13337 /* We use char because int might match the return type of a gcc2
13338     builtin and then its argument prototype would still apply.  */
13339 char initscr();
13340
13341 int main() {
13342 initscr()
13343 ; return 0; }
13344 EOF
13345 if { (eval echo configure:13346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13346   rm -rf conftest*
13347   eval "ac_cv_lib_$ac_lib_var=yes"
13348 else
13349   echo "configure: failed program was:" >&5
13350   cat conftest.$ac_ext >&5
13351   rm -rf conftest*
13352   eval "ac_cv_lib_$ac_lib_var=no"
13353 fi
13354 rm -f conftest*
13355 LIBS="$ac_save_LIBS"
13356
13357 fi
13358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13359   echo "$ac_t""yes" 1>&6
13360   have_ncurses=yes
13361 else
13362   echo "$ac_t""no" 1>&6
13363 have_ncurses=no
13364 fi
13365
13366         if test $have_ncurses = yes ; then
13367                 cat >> confdefs.h <<\EOF
13368 #define HAVE_NCURSES 1
13369 EOF
13370
13371                 ol_link_termcap=yes
13372                 TERMCAP_LIBS=-lncurses
13373         fi
13374 fi
13375
13376 if test $ol_link_termcap = no ; then
13377         cat >> confdefs.h <<\EOF
13378 #define NO_TERMCAP 1
13379 EOF
13380
13381         TERMCAP_LIBS=
13382 fi
13383
13384 ol_link_sasl=no
13385 ol_link_spasswd=no
13386 if test $ol_with_cyrus_sasl != no ; then
13387         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13388 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13389 echo "configure:13390: checking for sasl.h" >&5
13390 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13391   echo $ac_n "(cached) $ac_c" 1>&6
13392 else
13393   cat > conftest.$ac_ext <<EOF
13394 #line 13395 "configure"
13395 #include "confdefs.h"
13396 #include <sasl.h>
13397 EOF
13398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13399 { (eval echo configure:13400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13401 if test -z "$ac_err"; then
13402   rm -rf conftest*
13403   eval "ac_cv_header_$ac_safe=yes"
13404 else
13405   echo "$ac_err" >&5
13406   echo "configure: failed program was:" >&5
13407   cat conftest.$ac_ext >&5
13408   rm -rf conftest*
13409   eval "ac_cv_header_$ac_safe=no"
13410 fi
13411 rm -f conftest*
13412 fi
13413 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13414   echo "$ac_t""yes" 1>&6
13415   :
13416 else
13417   echo "$ac_t""no" 1>&6
13418 fi
13419
13420
13421         if test $ac_cv_header_sasl_h = yes ; then
13422                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13423 echo "configure:13424: checking for sasl_client_init in -lsasl" >&5
13424 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13425 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13426   echo $ac_n "(cached) $ac_c" 1>&6
13427 else
13428   ac_save_LIBS="$LIBS"
13429 LIBS="-lsasl  $LIBS"
13430 cat > conftest.$ac_ext <<EOF
13431 #line 13432 "configure"
13432 #include "confdefs.h"
13433 /* Override any gcc2 internal prototype to avoid an error.  */
13434 /* We use char because int might match the return type of a gcc2
13435     builtin and then its argument prototype would still apply.  */
13436 char sasl_client_init();
13437
13438 int main() {
13439 sasl_client_init()
13440 ; return 0; }
13441 EOF
13442 if { (eval echo configure:13443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13443   rm -rf conftest*
13444   eval "ac_cv_lib_$ac_lib_var=yes"
13445 else
13446   echo "configure: failed program was:" >&5
13447   cat conftest.$ac_ext >&5
13448   rm -rf conftest*
13449   eval "ac_cv_lib_$ac_lib_var=no"
13450 fi
13451 rm -f conftest*
13452 LIBS="$ac_save_LIBS"
13453
13454 fi
13455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13456   echo "$ac_t""yes" 1>&6
13457   have_cyrus_sasl=yes
13458 else
13459   echo "$ac_t""no" 1>&6
13460 have_cyrus_sasl=no
13461 fi
13462
13463
13464                 if test $have_cyrus_sasl != no ; then
13465                         SASL_LIBS="-lsasl"
13466                         cat >> confdefs.h <<\EOF
13467 #define HAVE_CYRUS_SASL 1
13468 EOF
13469
13470                         ol_link_sasl=yes
13471                 fi
13472         fi
13473
13474         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13475                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13476         fi
13477 fi
13478
13479 if test $cross_compiling != yes ; then
13480         dev=no
13481         if test -r /dev/urandom ; then
13482                 dev="/dev/urandom";
13483         elif test -r /idev/urandom ; then
13484                 dev="/idev/urandom";
13485         elif test -r /dev/srandom ; then
13486                 dev="/dev/srandom";
13487         elif test -r /dev/random ; then
13488                 dev="/dev/random";
13489         elif test -r /idev/random ; then
13490                 dev="/idev/random";
13491         fi
13492
13493         if test $dev != no ; then
13494                 cat >> confdefs.h <<EOF
13495 #define URANDOM_DEVICE "$dev"
13496 EOF
13497
13498         fi
13499 fi
13500
13501 ol_link_fetch=no
13502 if test $ol_with_fetch != no ; then
13503         ol_LIBS=$LIBS
13504 LIBS="-lfetch -lcom_err $LIBS"
13505 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13506 echo "configure:13507: checking fetch(3) library" >&5
13507 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13508   echo $ac_n "(cached) $ac_c" 1>&6
13509 else
13510   
13511         cat > conftest.$ac_ext <<EOF
13512 #line 13513 "configure"
13513 #include "confdefs.h"
13514
13515 #include <sys/param.h>
13516 #include <stdio.h>
13517 #include <fetch.h>
13518 int main() {
13519 struct url *u = fetchParseURL("file:///"); 
13520 ; return 0; }
13521 EOF
13522 if { (eval echo configure:13523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13523   rm -rf conftest*
13524   ol_cv_lib_fetch=yes
13525 else
13526   echo "configure: failed program was:" >&5
13527   cat conftest.$ac_ext >&5
13528   rm -rf conftest*
13529   ol_cv_lib_fetch=no
13530 fi
13531 rm -f conftest*
13532 fi
13533
13534 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13535 LIBS=$ol_LIBS
13536 if test $ol_cv_lib_fetch != no ; then
13537         ol_link_fetch="-lfetch -lcom_err"
13538         cat >> confdefs.h <<\EOF
13539 #define HAVE_FETCH 1
13540 EOF
13541
13542 fi
13543
13544
13545         if test $ol_cv_lib_fetch != no ; then
13546                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13547                 ol_link_fetch=freebsd
13548
13549         elif test $ol_with_fetch != auto ; then
13550                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13551         fi 
13552 fi
13553
13554 ol_link_readline=no
13555 if test $ol_with_readline != no ; then
13556         for ac_hdr in readline/readline.h readline/history.h
13557 do
13558 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13559 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13560 echo "configure:13561: checking for $ac_hdr" >&5
13561 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13562   echo $ac_n "(cached) $ac_c" 1>&6
13563 else
13564   cat > conftest.$ac_ext <<EOF
13565 #line 13566 "configure"
13566 #include "confdefs.h"
13567 #include <$ac_hdr>
13568 EOF
13569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13570 { (eval echo configure:13571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13572 if test -z "$ac_err"; then
13573   rm -rf conftest*
13574   eval "ac_cv_header_$ac_safe=yes"
13575 else
13576   echo "$ac_err" >&5
13577   echo "configure: failed program was:" >&5
13578   cat conftest.$ac_ext >&5
13579   rm -rf conftest*
13580   eval "ac_cv_header_$ac_safe=no"
13581 fi
13582 rm -f conftest*
13583 fi
13584 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13585   echo "$ac_t""yes" 1>&6
13586     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13587   cat >> confdefs.h <<EOF
13588 #define $ac_tr_hdr 1
13589 EOF
13590  
13591 else
13592   echo "$ac_t""no" 1>&6
13593 fi
13594 done
13595
13596
13597         if test $ac_cv_header_readline_readline_h = yes ; then
13598                 save_LIBS="$LIBS"
13599                 LIBS="$TERMCAP_LIBS $LIBS"
13600                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13601 echo "configure:13602: checking for readline in -lreadline" >&5
13602 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13603 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13604   echo $ac_n "(cached) $ac_c" 1>&6
13605 else
13606   ac_save_LIBS="$LIBS"
13607 LIBS="-lreadline  $LIBS"
13608 cat > conftest.$ac_ext <<EOF
13609 #line 13610 "configure"
13610 #include "confdefs.h"
13611 /* Override any gcc2 internal prototype to avoid an error.  */
13612 /* We use char because int might match the return type of a gcc2
13613     builtin and then its argument prototype would still apply.  */
13614 char readline();
13615
13616 int main() {
13617 readline()
13618 ; return 0; }
13619 EOF
13620 if { (eval echo configure:13621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13621   rm -rf conftest*
13622   eval "ac_cv_lib_$ac_lib_var=yes"
13623 else
13624   echo "configure: failed program was:" >&5
13625   cat conftest.$ac_ext >&5
13626   rm -rf conftest*
13627   eval "ac_cv_lib_$ac_lib_var=no"
13628 fi
13629 rm -f conftest*
13630 LIBS="$ac_save_LIBS"
13631
13632 fi
13633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13634   echo "$ac_t""yes" 1>&6
13635   have_readline=yes
13636 else
13637   echo "$ac_t""no" 1>&6
13638 have_readline=no
13639 fi
13640
13641                 LIBS="$save_LIBS"
13642                         
13643                 if test $have_readline = yes ; then
13644                         ol_with_readline=found
13645                         ol_link_readline=yes
13646
13647                         READLINE_LIBS="-lreadline"
13648                 fi
13649         fi
13650 fi
13651
13652 if test $ol_link_readline = yes ; then
13653         cat >> confdefs.h <<\EOF
13654 #define HAVE_READLINE 1
13655 EOF
13656
13657 fi
13658
13659
13660 if test $ol_enable_crypt != no ; then
13661         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13662 echo "configure:13663: checking for crypt" >&5
13663 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13664   echo $ac_n "(cached) $ac_c" 1>&6
13665 else
13666   cat > conftest.$ac_ext <<EOF
13667 #line 13668 "configure"
13668 #include "confdefs.h"
13669 /* System header to define __stub macros and hopefully few prototypes,
13670     which can conflict with char crypt(); below.  */
13671 #include <assert.h>
13672 /* Override any gcc2 internal prototype to avoid an error.  */
13673 /* We use char because int might match the return type of a gcc2
13674     builtin and then its argument prototype would still apply.  */
13675 char crypt();
13676 char (*f)();
13677
13678 int main() {
13679
13680 /* The GNU C library defines this for functions which it implements
13681     to always fail with ENOSYS.  Some functions are actually named
13682     something starting with __ and the normal name is an alias.  */
13683 #if defined (__stub_crypt) || defined (__stub___crypt)
13684 choke me
13685 #else
13686 f = crypt;
13687 #endif
13688
13689 ; return 0; }
13690 EOF
13691 if { (eval echo configure:13692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13692   rm -rf conftest*
13693   eval "ac_cv_func_crypt=yes"
13694 else
13695   echo "configure: failed program was:" >&5
13696   cat conftest.$ac_ext >&5
13697   rm -rf conftest*
13698   eval "ac_cv_func_crypt=no"
13699 fi
13700 rm -f conftest*
13701 fi
13702
13703 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13704   echo "$ac_t""yes" 1>&6
13705   have_crypt=yes
13706 else
13707   echo "$ac_t""no" 1>&6
13708
13709                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13710 echo "configure:13711: checking for crypt in -lcrypt" >&5
13711 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13712 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13713   echo $ac_n "(cached) $ac_c" 1>&6
13714 else
13715   ac_save_LIBS="$LIBS"
13716 LIBS="-lcrypt  $LIBS"
13717 cat > conftest.$ac_ext <<EOF
13718 #line 13719 "configure"
13719 #include "confdefs.h"
13720 /* Override any gcc2 internal prototype to avoid an error.  */
13721 /* We use char because int might match the return type of a gcc2
13722     builtin and then its argument prototype would still apply.  */
13723 char crypt();
13724
13725 int main() {
13726 crypt()
13727 ; return 0; }
13728 EOF
13729 if { (eval echo configure:13730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13730   rm -rf conftest*
13731   eval "ac_cv_lib_$ac_lib_var=yes"
13732 else
13733   echo "configure: failed program was:" >&5
13734   cat conftest.$ac_ext >&5
13735   rm -rf conftest*
13736   eval "ac_cv_lib_$ac_lib_var=no"
13737 fi
13738 rm -f conftest*
13739 LIBS="$ac_save_LIBS"
13740
13741 fi
13742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13743   echo "$ac_t""yes" 1>&6
13744   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13745                         have_crypt=yes
13746 else
13747   echo "$ac_t""no" 1>&6
13748 have_crypt=no
13749 fi
13750
13751 fi
13752
13753
13754         if test $have_crypt = yes ; then
13755                 cat >> confdefs.h <<\EOF
13756 #define HAVE_CRYPT 1
13757 EOF
13758
13759         else
13760                 echo "configure: warning: could not find crypt" 1>&2
13761                 if test $ol_enable_crypt = yes ; then
13762                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13763                 fi
13764
13765                 echo "configure: warning: disabling crypt support" 1>&2
13766                 ol_enable_crypt=no
13767         fi
13768 fi
13769
13770 if test $ol_enable_proctitle != no ; then
13771         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13772 echo "configure:13773: checking for setproctitle" >&5
13773 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13774   echo $ac_n "(cached) $ac_c" 1>&6
13775 else
13776   cat > conftest.$ac_ext <<EOF
13777 #line 13778 "configure"
13778 #include "confdefs.h"
13779 /* System header to define __stub macros and hopefully few prototypes,
13780     which can conflict with char setproctitle(); below.  */
13781 #include <assert.h>
13782 /* Override any gcc2 internal prototype to avoid an error.  */
13783 /* We use char because int might match the return type of a gcc2
13784     builtin and then its argument prototype would still apply.  */
13785 char setproctitle();
13786 char (*f)();
13787
13788 int main() {
13789
13790 /* The GNU C library defines this for functions which it implements
13791     to always fail with ENOSYS.  Some functions are actually named
13792     something starting with __ and the normal name is an alias.  */
13793 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13794 choke me
13795 #else
13796 f = setproctitle;
13797 #endif
13798
13799 ; return 0; }
13800 EOF
13801 if { (eval echo configure:13802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13802   rm -rf conftest*
13803   eval "ac_cv_func_setproctitle=yes"
13804 else
13805   echo "configure: failed program was:" >&5
13806   cat conftest.$ac_ext >&5
13807   rm -rf conftest*
13808   eval "ac_cv_func_setproctitle=no"
13809 fi
13810 rm -f conftest*
13811 fi
13812
13813 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13814   echo "$ac_t""yes" 1>&6
13815   have_setproctitle=yes
13816 else
13817   echo "$ac_t""no" 1>&6
13818
13819                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13820 echo "configure:13821: checking for setproctitle in -lutil" >&5
13821 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13822 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13823   echo $ac_n "(cached) $ac_c" 1>&6
13824 else
13825   ac_save_LIBS="$LIBS"
13826 LIBS="-lutil  $LIBS"
13827 cat > conftest.$ac_ext <<EOF
13828 #line 13829 "configure"
13829 #include "confdefs.h"
13830 /* Override any gcc2 internal prototype to avoid an error.  */
13831 /* We use char because int might match the return type of a gcc2
13832     builtin and then its argument prototype would still apply.  */
13833 char setproctitle();
13834
13835 int main() {
13836 setproctitle()
13837 ; return 0; }
13838 EOF
13839 if { (eval echo configure:13840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13840   rm -rf conftest*
13841   eval "ac_cv_lib_$ac_lib_var=yes"
13842 else
13843   echo "configure: failed program was:" >&5
13844   cat conftest.$ac_ext >&5
13845   rm -rf conftest*
13846   eval "ac_cv_lib_$ac_lib_var=no"
13847 fi
13848 rm -f conftest*
13849 LIBS="$ac_save_LIBS"
13850
13851 fi
13852 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13853   echo "$ac_t""yes" 1>&6
13854   have_setproctitle=yes
13855                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13856 else
13857   echo "$ac_t""no" 1>&6
13858 have_setproctitle=no
13859                         LIBOBJS="$LIBOBJS setproctitle.o"
13860                         LIBSRCS="$LIBSRCS setproctitle.c"
13861 fi
13862
13863 fi
13864
13865
13866         if test $have_setproctitle = yes ; then
13867                 cat >> confdefs.h <<\EOF
13868 #define HAVE_SETPROCTITLE 1
13869 EOF
13870
13871         fi
13872 fi
13873
13874 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13875 echo "configure:13876: checking for ANSI C header files" >&5
13876 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13877   echo $ac_n "(cached) $ac_c" 1>&6
13878 else
13879   cat > conftest.$ac_ext <<EOF
13880 #line 13881 "configure"
13881 #include "confdefs.h"
13882 #include <stdlib.h>
13883 #include <stdarg.h>
13884 #include <string.h>
13885 #include <float.h>
13886 EOF
13887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13888 { (eval echo configure:13889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13890 if test -z "$ac_err"; then
13891   rm -rf conftest*
13892   ac_cv_header_stdc=yes
13893 else
13894   echo "$ac_err" >&5
13895   echo "configure: failed program was:" >&5
13896   cat conftest.$ac_ext >&5
13897   rm -rf conftest*
13898   ac_cv_header_stdc=no
13899 fi
13900 rm -f conftest*
13901
13902 if test $ac_cv_header_stdc = yes; then
13903   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13904 cat > conftest.$ac_ext <<EOF
13905 #line 13906 "configure"
13906 #include "confdefs.h"
13907 #include <string.h>
13908 EOF
13909 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13910   egrep "memchr" >/dev/null 2>&1; then
13911   :
13912 else
13913   rm -rf conftest*
13914   ac_cv_header_stdc=no
13915 fi
13916 rm -f conftest*
13917
13918 fi
13919
13920 if test $ac_cv_header_stdc = yes; then
13921   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13922 cat > conftest.$ac_ext <<EOF
13923 #line 13924 "configure"
13924 #include "confdefs.h"
13925 #include <stdlib.h>
13926 EOF
13927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13928   egrep "free" >/dev/null 2>&1; then
13929   :
13930 else
13931   rm -rf conftest*
13932   ac_cv_header_stdc=no
13933 fi
13934 rm -f conftest*
13935
13936 fi
13937
13938 if test $ac_cv_header_stdc = yes; then
13939   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13940 if test "$cross_compiling" = yes; then
13941   :
13942 else
13943   cat > conftest.$ac_ext <<EOF
13944 #line 13945 "configure"
13945 #include "confdefs.h"
13946 #include <ctype.h>
13947 #if ((' ' & 0x0FF) == 0x020)
13948 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13949 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13950 #else
13951 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13952  || ('j' <= (c) && (c) <= 'r') \
13953  || ('s' <= (c) && (c) <= 'z'))
13954 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13955 #endif
13956 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13957 int main () { int i; for (i = 0; i < 256; i++)
13958 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13959 exit (0); }
13960
13961 EOF
13962 if { (eval echo configure:13963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13963 then
13964   :
13965 else
13966   echo "configure: failed program was:" >&5
13967   cat conftest.$ac_ext >&5
13968   rm -fr conftest*
13969   ac_cv_header_stdc=no
13970 fi
13971 rm -fr conftest*
13972 fi
13973
13974 fi
13975 fi
13976
13977 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13978 if test $ac_cv_header_stdc = yes; then
13979   cat >> confdefs.h <<\EOF
13980 #define STDC_HEADERS 1
13981 EOF
13982
13983 fi
13984
13985 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13986 echo "configure:13987: checking for mode_t" >&5
13987 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13988   echo $ac_n "(cached) $ac_c" 1>&6
13989 else
13990   cat > conftest.$ac_ext <<EOF
13991 #line 13992 "configure"
13992 #include "confdefs.h"
13993 #include <sys/types.h>
13994 #if STDC_HEADERS
13995 #include <stdlib.h>
13996 #include <stddef.h>
13997 #endif
13998
13999 EOF
14000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14001   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14002   rm -rf conftest*
14003   eval "ac_cv_type_mode_t=yes"
14004 else
14005   rm -rf conftest*
14006   eval "ac_cv_type_mode_t=no"
14007 fi
14008 rm -f conftest*
14009
14010 fi
14011 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14012   echo "$ac_t""yes" 1>&6
14013 else
14014   echo "$ac_t""no" 1>&6
14015   cat >> confdefs.h <<EOF
14016 #define mode_t int
14017 EOF
14018
14019 fi
14020
14021 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14022 echo "configure:14023: checking for off_t" >&5
14023 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14024   echo $ac_n "(cached) $ac_c" 1>&6
14025 else
14026   cat > conftest.$ac_ext <<EOF
14027 #line 14028 "configure"
14028 #include "confdefs.h"
14029 #include <sys/types.h>
14030 #if STDC_HEADERS
14031 #include <stdlib.h>
14032 #include <stddef.h>
14033 #endif
14034
14035 EOF
14036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14037   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14038   rm -rf conftest*
14039   eval "ac_cv_type_off_t=yes"
14040 else
14041   rm -rf conftest*
14042   eval "ac_cv_type_off_t=no"
14043 fi
14044 rm -f conftest*
14045
14046 fi
14047 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14048   echo "$ac_t""yes" 1>&6
14049 else
14050   echo "$ac_t""no" 1>&6
14051   cat >> confdefs.h <<EOF
14052 #define off_t long
14053 EOF
14054
14055 fi
14056
14057 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14058 echo "configure:14059: checking for pid_t" >&5
14059 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14060   echo $ac_n "(cached) $ac_c" 1>&6
14061 else
14062   cat > conftest.$ac_ext <<EOF
14063 #line 14064 "configure"
14064 #include "confdefs.h"
14065 #include <sys/types.h>
14066 #if STDC_HEADERS
14067 #include <stdlib.h>
14068 #include <stddef.h>
14069 #endif
14070
14071 EOF
14072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14073   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14074   rm -rf conftest*
14075   eval "ac_cv_type_pid_t=yes"
14076 else
14077   rm -rf conftest*
14078   eval "ac_cv_type_pid_t=no"
14079 fi
14080 rm -f conftest*
14081
14082 fi
14083 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14084   echo "$ac_t""yes" 1>&6
14085 else
14086   echo "$ac_t""no" 1>&6
14087   cat >> confdefs.h <<EOF
14088 #define pid_t int
14089 EOF
14090
14091 fi
14092
14093 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14094 echo "configure:14095: checking for ptrdiff_t" >&5
14095 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14096   echo $ac_n "(cached) $ac_c" 1>&6
14097 else
14098   cat > conftest.$ac_ext <<EOF
14099 #line 14100 "configure"
14100 #include "confdefs.h"
14101 #include <stddef.h>
14102 int main() {
14103 ptrdiff_t p
14104 ; return 0; }
14105 EOF
14106 if { (eval echo configure:14107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14107   rm -rf conftest*
14108   am_cv_type_ptrdiff_t=yes
14109 else
14110   echo "configure: failed program was:" >&5
14111   cat conftest.$ac_ext >&5
14112   rm -rf conftest*
14113   am_cv_type_ptrdiff_t=no
14114 fi
14115 rm -f conftest*
14116 fi
14117
14118 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14119    if test $am_cv_type_ptrdiff_t = yes; then
14120      cat >> confdefs.h <<\EOF
14121 #define HAVE_PTRDIFF_T 1
14122 EOF
14123
14124    fi
14125
14126 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14127 echo "configure:14128: checking return type of signal handlers" >&5
14128 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14129   echo $ac_n "(cached) $ac_c" 1>&6
14130 else
14131   cat > conftest.$ac_ext <<EOF
14132 #line 14133 "configure"
14133 #include "confdefs.h"
14134 #include <sys/types.h>
14135 #include <signal.h>
14136 #ifdef signal
14137 #undef signal
14138 #endif
14139 #ifdef __cplusplus
14140 extern "C" void (*signal (int, void (*)(int)))(int);
14141 #else
14142 void (*signal ()) ();
14143 #endif
14144
14145 int main() {
14146 int i;
14147 ; return 0; }
14148 EOF
14149 if { (eval echo configure:14150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14150   rm -rf conftest*
14151   ac_cv_type_signal=void
14152 else
14153   echo "configure: failed program was:" >&5
14154   cat conftest.$ac_ext >&5
14155   rm -rf conftest*
14156   ac_cv_type_signal=int
14157 fi
14158 rm -f conftest*
14159 fi
14160
14161 echo "$ac_t""$ac_cv_type_signal" 1>&6
14162 cat >> confdefs.h <<EOF
14163 #define RETSIGTYPE $ac_cv_type_signal
14164 EOF
14165
14166
14167 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14168 echo "configure:14169: checking for size_t" >&5
14169 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14170   echo $ac_n "(cached) $ac_c" 1>&6
14171 else
14172   cat > conftest.$ac_ext <<EOF
14173 #line 14174 "configure"
14174 #include "confdefs.h"
14175 #include <sys/types.h>
14176 #if STDC_HEADERS
14177 #include <stdlib.h>
14178 #include <stddef.h>
14179 #endif
14180
14181 EOF
14182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14183   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14184   rm -rf conftest*
14185   eval "ac_cv_type_size_t=yes"
14186 else
14187   rm -rf conftest*
14188   eval "ac_cv_type_size_t=no"
14189 fi
14190 rm -f conftest*
14191
14192 fi
14193 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14194   echo "$ac_t""yes" 1>&6
14195 else
14196   echo "$ac_t""no" 1>&6
14197   cat >> confdefs.h <<EOF
14198 #define size_t unsigned
14199 EOF
14200
14201 fi
14202
14203
14204 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14205 echo "configure:14206: checking for ssize_t" >&5
14206 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14207   echo $ac_n "(cached) $ac_c" 1>&6
14208 else
14209   cat > conftest.$ac_ext <<EOF
14210 #line 14211 "configure"
14211 #include "confdefs.h"
14212 #include <sys/types.h>
14213 #if STDC_HEADERS
14214 #include <stdlib.h>
14215 #include <stddef.h>
14216 #endif
14217
14218 EOF
14219 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14220   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14221   rm -rf conftest*
14222   eval "ac_cv_type_ssize_t=yes"
14223 else
14224   rm -rf conftest*
14225   eval "ac_cv_type_ssize_t=no"
14226 fi
14227 rm -f conftest*
14228
14229 fi
14230 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14231   echo "$ac_t""yes" 1>&6
14232 else
14233   echo "$ac_t""no" 1>&6
14234   cat >> confdefs.h <<EOF
14235 #define ssize_t signed int
14236 EOF
14237
14238 fi
14239
14240 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14241 echo "configure:14242: checking for caddr_t" >&5
14242 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14243   echo $ac_n "(cached) $ac_c" 1>&6
14244 else
14245   cat > conftest.$ac_ext <<EOF
14246 #line 14247 "configure"
14247 #include "confdefs.h"
14248 #include <sys/types.h>
14249 #if STDC_HEADERS
14250 #include <stdlib.h>
14251 #include <stddef.h>
14252 #endif
14253
14254 EOF
14255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14256   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14257   rm -rf conftest*
14258   eval "ac_cv_type_caddr_t=yes"
14259 else
14260   rm -rf conftest*
14261   eval "ac_cv_type_caddr_t=no"
14262 fi
14263 rm -f conftest*
14264
14265 fi
14266 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14267   echo "$ac_t""yes" 1>&6
14268 else
14269   echo "$ac_t""no" 1>&6
14270   cat >> confdefs.h <<EOF
14271 #define caddr_t char *
14272 EOF
14273
14274 fi
14275
14276
14277 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14278 echo "configure:14279: checking for socklen_t" >&5
14279 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14280   echo $ac_n "(cached) $ac_c" 1>&6
14281 else
14282   cat > conftest.$ac_ext <<EOF
14283 #line 14284 "configure"
14284 #include "confdefs.h"
14285
14286 #ifdef HAVE_SYS_TYPES_H
14287 #include <sys/types.h>
14288 #endif
14289 #ifdef HAVE_SYS_SOCKET_H
14290 #include <sys/socket.h>
14291 #endif
14292
14293 int main() {
14294 socklen_t len;
14295 ; return 0; }
14296 EOF
14297 if { (eval echo configure:14298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14298   rm -rf conftest*
14299   ol_cv_type_socklen_t=yes
14300 else
14301   echo "configure: failed program was:" >&5
14302   cat conftest.$ac_ext >&5
14303   rm -rf conftest*
14304   ol_cv_type_socklen_t=no
14305 fi
14306 rm -f conftest*
14307 fi
14308
14309 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14310   if test $ol_cv_type_socklen_t = no; then
14311     cat >> confdefs.h <<\EOF
14312 #define socklen_t int
14313 EOF
14314
14315   fi
14316  
14317 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14318 echo "configure:14319: checking for member st_blksize in aggregate type struct stat" >&5
14319 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14320   echo $ac_n "(cached) $ac_c" 1>&6
14321 else
14322   cat > conftest.$ac_ext <<EOF
14323 #line 14324 "configure"
14324 #include "confdefs.h"
14325 #include <sys/types.h>
14326 #include <sys/stat.h>
14327 int main() {
14328 struct stat foo; foo.st_blksize;
14329 ; return 0; }
14330 EOF
14331 if { (eval echo configure:14332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14332   rm -rf conftest*
14333   ac_cv_c_struct_member_st_blksize=yes
14334 else
14335   echo "configure: failed program was:" >&5
14336   cat conftest.$ac_ext >&5
14337   rm -rf conftest*
14338   ac_cv_c_struct_member_st_blksize=no
14339 fi
14340 rm -f conftest*
14341 fi
14342
14343 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14344 st_blksize="$ac_cv_c_struct_member_st_blksize"
14345 if test $ac_cv_c_struct_member_st_blksize = yes; then
14346   cat >> confdefs.h <<\EOF
14347 #define HAVE_ST_BLKSIZE 1
14348 EOF
14349
14350 fi
14351
14352 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14353 echo "configure:14354: checking whether time.h and sys/time.h may both be included" >&5
14354 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14355   echo $ac_n "(cached) $ac_c" 1>&6
14356 else
14357   cat > conftest.$ac_ext <<EOF
14358 #line 14359 "configure"
14359 #include "confdefs.h"
14360 #include <sys/types.h>
14361 #include <sys/time.h>
14362 #include <time.h>
14363 int main() {
14364 struct tm *tp;
14365 ; return 0; }
14366 EOF
14367 if { (eval echo configure:14368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14368   rm -rf conftest*
14369   ac_cv_header_time=yes
14370 else
14371   echo "configure: failed program was:" >&5
14372   cat conftest.$ac_ext >&5
14373   rm -rf conftest*
14374   ac_cv_header_time=no
14375 fi
14376 rm -f conftest*
14377 fi
14378
14379 echo "$ac_t""$ac_cv_header_time" 1>&6
14380 if test $ac_cv_header_time = yes; then
14381   cat >> confdefs.h <<\EOF
14382 #define TIME_WITH_SYS_TIME 1
14383 EOF
14384
14385 fi
14386
14387 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14388 echo "configure:14389: checking whether struct tm is in sys/time.h or time.h" >&5
14389 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14390   echo $ac_n "(cached) $ac_c" 1>&6
14391 else
14392   cat > conftest.$ac_ext <<EOF
14393 #line 14394 "configure"
14394 #include "confdefs.h"
14395 #include <sys/types.h>
14396 #include <time.h>
14397 int main() {
14398 struct tm *tp; tp->tm_sec;
14399 ; return 0; }
14400 EOF
14401 if { (eval echo configure:14402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14402   rm -rf conftest*
14403   ac_cv_struct_tm=time.h
14404 else
14405   echo "configure: failed program was:" >&5
14406   cat conftest.$ac_ext >&5
14407   rm -rf conftest*
14408   ac_cv_struct_tm=sys/time.h
14409 fi
14410 rm -f conftest*
14411 fi
14412
14413 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14414 if test $ac_cv_struct_tm = sys/time.h; then
14415   cat >> confdefs.h <<\EOF
14416 #define TM_IN_SYS_TIME 1
14417 EOF
14418
14419 fi
14420
14421 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14422 echo "configure:14423: checking for uid_t in sys/types.h" >&5
14423 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14424   echo $ac_n "(cached) $ac_c" 1>&6
14425 else
14426   cat > conftest.$ac_ext <<EOF
14427 #line 14428 "configure"
14428 #include "confdefs.h"
14429 #include <sys/types.h>
14430 EOF
14431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14432   egrep "uid_t" >/dev/null 2>&1; then
14433   rm -rf conftest*
14434   ac_cv_type_uid_t=yes
14435 else
14436   rm -rf conftest*
14437   ac_cv_type_uid_t=no
14438 fi
14439 rm -f conftest*
14440
14441 fi
14442
14443 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14444 if test $ac_cv_type_uid_t = no; then
14445   cat >> confdefs.h <<\EOF
14446 #define uid_t int
14447 EOF
14448
14449   cat >> confdefs.h <<\EOF
14450 #define gid_t int
14451 EOF
14452
14453 fi
14454
14455 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14456 echo "configure:14457: checking for sig_atomic_t" >&5
14457 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14458   echo $ac_n "(cached) $ac_c" 1>&6
14459 else
14460   cat > conftest.$ac_ext <<EOF
14461 #line 14462 "configure"
14462 #include "confdefs.h"
14463 #include <signal.h>
14464 int main() {
14465 sig_atomic_t atomic;
14466 ; return 0; }
14467 EOF
14468 if { (eval echo configure:14469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14469   rm -rf conftest*
14470   ol_cv_type_sig_atomic_t=yes
14471 else
14472   echo "configure: failed program was:" >&5
14473   cat conftest.$ac_ext >&5
14474   rm -rf conftest*
14475   ol_cv_type_sig_atomic_t=no
14476 fi
14477 rm -f conftest*
14478 fi
14479
14480 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14481   if test $ol_cv_type_sig_atomic_t = no; then
14482     cat >> confdefs.h <<\EOF
14483 #define sig_atomic_t int
14484 EOF
14485
14486   fi
14487  
14488
14489
14490 # test for pw_gecos in struct passwd
14491 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14492 echo "configure:14493: checking struct passwd for pw_gecos" >&5
14493 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14494   echo $ac_n "(cached) $ac_c" 1>&6
14495 else
14496   
14497         cat > conftest.$ac_ext <<EOF
14498 #line 14499 "configure"
14499 #include "confdefs.h"
14500 #include <pwd.h>
14501 int main() {
14502
14503         struct passwd pwd;
14504         pwd.pw_gecos = pwd.pw_name;
14505
14506 ; return 0; }
14507 EOF
14508 if { (eval echo configure:14509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14509   rm -rf conftest*
14510   ol_cv_struct_passwd_pw_gecos=yes
14511 else
14512   echo "configure: failed program was:" >&5
14513   cat conftest.$ac_ext >&5
14514   rm -rf conftest*
14515   ol_cv_struct_passwd_pw_gecos=no
14516 fi
14517 rm -f conftest*
14518 fi
14519
14520 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14521 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14522         cat >> confdefs.h <<\EOF
14523 #define HAVE_PW_GECOS 1
14524 EOF
14525
14526 fi
14527
14528 # test for pw_passwd in struct passwd
14529 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14530 echo "configure:14531: checking struct passwd for pw_passwd" >&5
14531 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14532   echo $ac_n "(cached) $ac_c" 1>&6
14533 else
14534   
14535         cat > conftest.$ac_ext <<EOF
14536 #line 14537 "configure"
14537 #include "confdefs.h"
14538 #include <pwd.h>
14539 int main() {
14540
14541         struct passwd pwd;
14542         pwd.pw_passwd = pwd.pw_name;
14543
14544 ; return 0; }
14545 EOF
14546 if { (eval echo configure:14547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14547   rm -rf conftest*
14548   ol_cv_struct_passwd_pw_passwd=yes
14549 else
14550   echo "configure: failed program was:" >&5
14551   cat conftest.$ac_ext >&5
14552   rm -rf conftest*
14553   ol_cv_struct_passwd_pw_passwd=no
14554 fi
14555 rm -f conftest*
14556 fi
14557
14558 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14559 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14560         cat >> confdefs.h <<\EOF
14561 #define HAVE_PW_PASSWD 1
14562 EOF
14563
14564 fi
14565
14566
14567 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14568 echo "configure:14569: checking if toupper() requires islower()" >&5
14569 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14570   echo $ac_n "(cached) $ac_c" 1>&6
14571 else
14572   
14573         if test "$cross_compiling" = yes; then
14574   ol_cv_c_upper_lower=safe
14575 else
14576   cat > conftest.$ac_ext <<EOF
14577 #line 14578 "configure"
14578 #include "confdefs.h"
14579
14580 #include <ctype.h>
14581 main()
14582 {
14583         if ('C' == toupper('C'))
14584                 exit(0);
14585         else
14586                 exit(1);
14587 }
14588 EOF
14589 if { (eval echo configure:14590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14590 then
14591   ol_cv_c_upper_lower=no
14592 else
14593   echo "configure: failed program was:" >&5
14594   cat conftest.$ac_ext >&5
14595   rm -fr conftest*
14596   ol_cv_c_upper_lower=yes
14597 fi
14598 rm -fr conftest*
14599 fi
14600
14601 fi
14602
14603 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14604 if test $ol_cv_c_upper_lower != no ; then
14605         cat >> confdefs.h <<\EOF
14606 #define C_UPPER_LOWER 1
14607 EOF
14608
14609 fi
14610
14611 echo $ac_n "checking for working const""... $ac_c" 1>&6
14612 echo "configure:14613: checking for working const" >&5
14613 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14614   echo $ac_n "(cached) $ac_c" 1>&6
14615 else
14616   cat > conftest.$ac_ext <<EOF
14617 #line 14618 "configure"
14618 #include "confdefs.h"
14619
14620 int main() {
14621
14622 /* Ultrix mips cc rejects this.  */
14623 typedef int charset[2]; const charset x;
14624 /* SunOS 4.1.1 cc rejects this.  */
14625 char const *const *ccp;
14626 char **p;
14627 /* NEC SVR4.0.2 mips cc rejects this.  */
14628 struct point {int x, y;};
14629 static struct point const zero = {0,0};
14630 /* AIX XL C 1.02.0.0 rejects this.
14631    It does not let you subtract one const X* pointer from another in an arm
14632    of an if-expression whose if-part is not a constant expression */
14633 const char *g = "string";
14634 ccp = &g + (g ? g-g : 0);
14635 /* HPUX 7.0 cc rejects these. */
14636 ++ccp;
14637 p = (char**) ccp;
14638 ccp = (char const *const *) p;
14639 { /* SCO 3.2v4 cc rejects this.  */
14640   char *t;
14641   char const *s = 0 ? (char *) 0 : (char const *) 0;
14642
14643   *t++ = 0;
14644 }
14645 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14646   int x[] = {25, 17};
14647   const int *foo = &x[0];
14648   ++foo;
14649 }
14650 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14651   typedef const int *iptr;
14652   iptr p = 0;
14653   ++p;
14654 }
14655 { /* AIX XL C 1.02.0.0 rejects this saying
14656      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14657   struct s { int j; const int *ap[3]; };
14658   struct s *b; b->j = 5;
14659 }
14660 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14661   const int foo = 10;
14662 }
14663
14664 ; return 0; }
14665 EOF
14666 if { (eval echo configure:14667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14667   rm -rf conftest*
14668   ac_cv_c_const=yes
14669 else
14670   echo "configure: failed program was:" >&5
14671   cat conftest.$ac_ext >&5
14672   rm -rf conftest*
14673   ac_cv_c_const=no
14674 fi
14675 rm -f conftest*
14676 fi
14677
14678 echo "$ac_t""$ac_cv_c_const" 1>&6
14679 if test $ac_cv_c_const = no; then
14680   cat >> confdefs.h <<\EOF
14681 #define const 
14682 EOF
14683
14684 fi
14685
14686 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14687 echo "configure:14688: checking if compiler understands volatile" >&5
14688 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14689   echo $ac_n "(cached) $ac_c" 1>&6
14690 else
14691   cat > conftest.$ac_ext <<EOF
14692 #line 14693 "configure"
14693 #include "confdefs.h"
14694 int x, y, z;
14695 int main() {
14696 volatile int a; int * volatile b = x ? &y : &z;
14697       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14698       *b = 0;
14699 ; return 0; }
14700 EOF
14701 if { (eval echo configure:14702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14702   rm -rf conftest*
14703   ol_cv_c_volatile=yes
14704 else
14705   echo "configure: failed program was:" >&5
14706   cat conftest.$ac_ext >&5
14707   rm -rf conftest*
14708   ol_cv_c_volatile=no
14709 fi
14710 rm -f conftest*
14711 fi
14712
14713 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14714   if test $ol_cv_c_volatile = yes; then
14715     : 
14716   else
14717     cat >> confdefs.h <<\EOF
14718 #define volatile 
14719 EOF
14720
14721   fi
14722  
14723
14724 if test $cross_compiling = yes ; then
14725         cat >> confdefs.h <<\EOF
14726 #define CROSS_COMPILING 1
14727 EOF
14728
14729 else
14730         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14731 echo "configure:14732: checking whether byte ordering is bigendian" >&5
14732 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14733   echo $ac_n "(cached) $ac_c" 1>&6
14734 else
14735   ac_cv_c_bigendian=unknown
14736 # See if sys/param.h defines the BYTE_ORDER macro.
14737 cat > conftest.$ac_ext <<EOF
14738 #line 14739 "configure"
14739 #include "confdefs.h"
14740 #include <sys/types.h>
14741 #include <sys/param.h>
14742 int main() {
14743
14744 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14745  bogus endian macros
14746 #endif
14747 ; return 0; }
14748 EOF
14749 if { (eval echo configure:14750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14750   rm -rf conftest*
14751   # It does; now see whether it defined to BIG_ENDIAN or not.
14752 cat > conftest.$ac_ext <<EOF
14753 #line 14754 "configure"
14754 #include "confdefs.h"
14755 #include <sys/types.h>
14756 #include <sys/param.h>
14757 int main() {
14758
14759 #if BYTE_ORDER != BIG_ENDIAN
14760  not big endian
14761 #endif
14762 ; return 0; }
14763 EOF
14764 if { (eval echo configure:14765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14765   rm -rf conftest*
14766   ac_cv_c_bigendian=yes
14767 else
14768   echo "configure: failed program was:" >&5
14769   cat conftest.$ac_ext >&5
14770   rm -rf conftest*
14771   ac_cv_c_bigendian=no
14772 fi
14773 rm -f conftest*
14774 else
14775   echo "configure: failed program was:" >&5
14776   cat conftest.$ac_ext >&5
14777 fi
14778 rm -f conftest*
14779 if test $ac_cv_c_bigendian = unknown; then
14780 if test "$cross_compiling" = yes; then
14781     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14782 else
14783   cat > conftest.$ac_ext <<EOF
14784 #line 14785 "configure"
14785 #include "confdefs.h"
14786 main () {
14787   /* Are we little or big endian?  From Harbison&Steele.  */
14788   union
14789   {
14790     long l;
14791     char c[sizeof (long)];
14792   } u;
14793   u.l = 1;
14794   exit (u.c[sizeof (long) - 1] == 1);
14795 }
14796 EOF
14797 if { (eval echo configure:14798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14798 then
14799   ac_cv_c_bigendian=no
14800 else
14801   echo "configure: failed program was:" >&5
14802   cat conftest.$ac_ext >&5
14803   rm -fr conftest*
14804   ac_cv_c_bigendian=yes
14805 fi
14806 rm -fr conftest*
14807 fi
14808
14809 fi
14810 fi
14811
14812 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14813 if test $ac_cv_c_bigendian = yes; then
14814   cat >> confdefs.h <<\EOF
14815 #define WORDS_BIGENDIAN 1
14816 EOF
14817
14818 fi
14819
14820 fi
14821
14822 echo $ac_n "checking size of short""... $ac_c" 1>&6
14823 echo "configure:14824: checking size of short" >&5 
14824 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14825   echo $ac_n "(cached) $ac_c" 1>&6
14826 else
14827   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14828   cat > conftest.$ac_ext <<EOF
14829 #line 14830 "configure"
14830 #include "confdefs.h"
14831 #include "confdefs.h" 
14832 #include <sys/types.h> 
14833  
14834
14835 int main() {
14836 switch (0) case 0: case (sizeof (short) == $ac_size):;
14837 ; return 0; }
14838 EOF
14839 if { (eval echo configure:14840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14840   rm -rf conftest*
14841   ac_cv_sizeof_short=$ac_size
14842 else
14843   echo "configure: failed program was:" >&5
14844   cat conftest.$ac_ext >&5
14845 fi
14846 rm -f conftest* 
14847   if test x$ac_cv_sizeof_short != x ; then break; fi 
14848 done 
14849
14850 fi
14851  
14852 if test x$ac_cv_sizeof_short = x ; then 
14853   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14854 fi 
14855 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14856 cat >> confdefs.h <<EOF
14857 #define SIZEOF_SHORT $ac_cv_sizeof_short
14858 EOF
14859  
14860  
14861 echo $ac_n "checking size of int""... $ac_c" 1>&6
14862 echo "configure:14863: checking size of int" >&5 
14863 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14864   echo $ac_n "(cached) $ac_c" 1>&6
14865 else
14866   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14867   cat > conftest.$ac_ext <<EOF
14868 #line 14869 "configure"
14869 #include "confdefs.h"
14870 #include "confdefs.h" 
14871 #include <sys/types.h> 
14872  
14873
14874 int main() {
14875 switch (0) case 0: case (sizeof (int) == $ac_size):;
14876 ; return 0; }
14877 EOF
14878 if { (eval echo configure:14879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14879   rm -rf conftest*
14880   ac_cv_sizeof_int=$ac_size
14881 else
14882   echo "configure: failed program was:" >&5
14883   cat conftest.$ac_ext >&5
14884 fi
14885 rm -f conftest* 
14886   if test x$ac_cv_sizeof_int != x ; then break; fi 
14887 done 
14888
14889 fi
14890  
14891 if test x$ac_cv_sizeof_int = x ; then 
14892   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14893 fi 
14894 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14895 cat >> confdefs.h <<EOF
14896 #define SIZEOF_INT $ac_cv_sizeof_int
14897 EOF
14898  
14899  
14900 echo $ac_n "checking size of long""... $ac_c" 1>&6
14901 echo "configure:14902: checking size of long" >&5 
14902 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14903   echo $ac_n "(cached) $ac_c" 1>&6
14904 else
14905   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14906   cat > conftest.$ac_ext <<EOF
14907 #line 14908 "configure"
14908 #include "confdefs.h"
14909 #include "confdefs.h" 
14910 #include <sys/types.h> 
14911  
14912
14913 int main() {
14914 switch (0) case 0: case (sizeof (long) == $ac_size):;
14915 ; return 0; }
14916 EOF
14917 if { (eval echo configure:14918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14918   rm -rf conftest*
14919   ac_cv_sizeof_long=$ac_size
14920 else
14921   echo "configure: failed program was:" >&5
14922   cat conftest.$ac_ext >&5
14923 fi
14924 rm -f conftest* 
14925   if test x$ac_cv_sizeof_long != x ; then break; fi 
14926 done 
14927
14928 fi
14929  
14930 if test x$ac_cv_sizeof_long = x ; then 
14931   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14932 fi 
14933 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14934 cat >> confdefs.h <<EOF
14935 #define SIZEOF_LONG $ac_cv_sizeof_long
14936 EOF
14937  
14938
14939
14940 if test "$ac_cv_sizeof_int" -lt 4 ; then
14941         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14942
14943         cat >> confdefs.h <<\EOF
14944 #define LBER_INT_T long
14945 EOF
14946
14947 else
14948         cat >> confdefs.h <<\EOF
14949 #define LBER_INT_T int
14950 EOF
14951
14952 fi
14953
14954 cat >> confdefs.h <<\EOF
14955 #define LBER_LEN_T long
14956 EOF
14957
14958 cat >> confdefs.h <<\EOF
14959 #define LBER_SOCKET_T int
14960 EOF
14961
14962 cat >> confdefs.h <<\EOF
14963 #define LBER_TAG_T long
14964 EOF
14965
14966
14967 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14968 echo "configure:14969: checking for 8-bit clean memcmp" >&5
14969 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14970   echo $ac_n "(cached) $ac_c" 1>&6
14971 else
14972   if test "$cross_compiling" = yes; then
14973   ac_cv_func_memcmp_clean=no
14974 else
14975   cat > conftest.$ac_ext <<EOF
14976 #line 14977 "configure"
14977 #include "confdefs.h"
14978
14979 main()
14980 {
14981   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14982   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14983 }
14984
14985 EOF
14986 if { (eval echo configure:14987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14987 then
14988   ac_cv_func_memcmp_clean=yes
14989 else
14990   echo "configure: failed program was:" >&5
14991   cat conftest.$ac_ext >&5
14992   rm -fr conftest*
14993   ac_cv_func_memcmp_clean=no
14994 fi
14995 rm -fr conftest*
14996 fi
14997
14998 fi
14999
15000 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15001 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15002
15003 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15004 echo "configure:15005: checking for strftime" >&5
15005 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15006   echo $ac_n "(cached) $ac_c" 1>&6
15007 else
15008   cat > conftest.$ac_ext <<EOF
15009 #line 15010 "configure"
15010 #include "confdefs.h"
15011 /* System header to define __stub macros and hopefully few prototypes,
15012     which can conflict with char strftime(); below.  */
15013 #include <assert.h>
15014 /* Override any gcc2 internal prototype to avoid an error.  */
15015 /* We use char because int might match the return type of a gcc2
15016     builtin and then its argument prototype would still apply.  */
15017 char strftime();
15018 char (*f)();
15019
15020 int main() {
15021
15022 /* The GNU C library defines this for functions which it implements
15023     to always fail with ENOSYS.  Some functions are actually named
15024     something starting with __ and the normal name is an alias.  */
15025 #if defined (__stub_strftime) || defined (__stub___strftime)
15026 choke me
15027 #else
15028 f = strftime;
15029 #endif
15030
15031 ; return 0; }
15032 EOF
15033 if { (eval echo configure:15034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15034   rm -rf conftest*
15035   eval "ac_cv_func_strftime=yes"
15036 else
15037   echo "configure: failed program was:" >&5
15038   cat conftest.$ac_ext >&5
15039   rm -rf conftest*
15040   eval "ac_cv_func_strftime=no"
15041 fi
15042 rm -f conftest*
15043 fi
15044
15045 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15046   echo "$ac_t""yes" 1>&6
15047   cat >> confdefs.h <<\EOF
15048 #define HAVE_STRFTIME 1
15049 EOF
15050
15051 else
15052   echo "$ac_t""no" 1>&6
15053 # strftime is in -lintl on SCO UNIX.
15054 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15055 echo "configure:15056: checking for strftime in -lintl" >&5
15056 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15057 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15058   echo $ac_n "(cached) $ac_c" 1>&6
15059 else
15060   ac_save_LIBS="$LIBS"
15061 LIBS="-lintl  $LIBS"
15062 cat > conftest.$ac_ext <<EOF
15063 #line 15064 "configure"
15064 #include "confdefs.h"
15065 /* Override any gcc2 internal prototype to avoid an error.  */
15066 /* We use char because int might match the return type of a gcc2
15067     builtin and then its argument prototype would still apply.  */
15068 char strftime();
15069
15070 int main() {
15071 strftime()
15072 ; return 0; }
15073 EOF
15074 if { (eval echo configure:15075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15075   rm -rf conftest*
15076   eval "ac_cv_lib_$ac_lib_var=yes"
15077 else
15078   echo "configure: failed program was:" >&5
15079   cat conftest.$ac_ext >&5
15080   rm -rf conftest*
15081   eval "ac_cv_lib_$ac_lib_var=no"
15082 fi
15083 rm -f conftest*
15084 LIBS="$ac_save_LIBS"
15085
15086 fi
15087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15088   echo "$ac_t""yes" 1>&6
15089   cat >> confdefs.h <<\EOF
15090 #define HAVE_STRFTIME 1
15091 EOF
15092
15093 LIBS="-lintl $LIBS"
15094 else
15095   echo "$ac_t""no" 1>&6
15096 fi
15097
15098 fi
15099
15100
15101 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15102 echo "configure:15103: checking for inet_aton()" >&5
15103 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15104   echo $ac_n "(cached) $ac_c" 1>&6
15105 else
15106   cat > conftest.$ac_ext <<EOF
15107 #line 15108 "configure"
15108 #include "confdefs.h"
15109
15110 #ifdef HAVE_SYS_TYPES_H
15111 #       include <sys/types.h>
15112 #endif
15113 #ifdef HAVE_SYS_SOCKET_H
15114 #       include <sys/socket.h>
15115 #       ifdef HAVE_SYS_SELECT_H
15116 #               include <sys/select.h>
15117 #       endif
15118 #       include <netinet/in.h>
15119 #       ifdef HAVE_ARPA_INET_H
15120 #               include <arpa/inet.h>
15121 #       endif
15122 #endif
15123
15124 int main() {
15125 struct in_addr in;
15126 int rc = inet_aton( "255.255.255.255", &in );
15127 ; return 0; }
15128 EOF
15129 if { (eval echo configure:15130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15130   rm -rf conftest*
15131   ol_cv_func_inet_aton=yes
15132 else
15133   echo "configure: failed program was:" >&5
15134   cat conftest.$ac_ext >&5
15135   rm -rf conftest*
15136   ol_cv_func_inet_aton=no
15137 fi
15138 rm -f conftest*
15139 fi
15140
15141 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15142   if test $ol_cv_func_inet_aton != no; then
15143     cat >> confdefs.h <<\EOF
15144 #define HAVE_INET_ATON 1
15145 EOF
15146
15147   fi
15148  
15149
15150 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15151 echo "configure:15152: checking for _spawnlp" >&5
15152 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15153   echo $ac_n "(cached) $ac_c" 1>&6
15154 else
15155   cat > conftest.$ac_ext <<EOF
15156 #line 15157 "configure"
15157 #include "confdefs.h"
15158 /* System header to define __stub macros and hopefully few prototypes,
15159     which can conflict with char _spawnlp(); below.  */
15160 #include <assert.h>
15161 /* Override any gcc2 internal prototype to avoid an error.  */
15162 /* We use char because int might match the return type of a gcc2
15163     builtin and then its argument prototype would still apply.  */
15164 char _spawnlp();
15165 char (*f)();
15166
15167 int main() {
15168
15169 /* The GNU C library defines this for functions which it implements
15170     to always fail with ENOSYS.  Some functions are actually named
15171     something starting with __ and the normal name is an alias.  */
15172 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15173 choke me
15174 #else
15175 f = _spawnlp;
15176 #endif
15177
15178 ; return 0; }
15179 EOF
15180 if { (eval echo configure:15181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15181   rm -rf conftest*
15182   eval "ac_cv_func__spawnlp=yes"
15183 else
15184   echo "configure: failed program was:" >&5
15185   cat conftest.$ac_ext >&5
15186   rm -rf conftest*
15187   eval "ac_cv_func__spawnlp=no"
15188 fi
15189 rm -f conftest*
15190 fi
15191
15192 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15193   echo "$ac_t""yes" 1>&6
15194   cat >> confdefs.h <<\EOF
15195 #define HAVE_SPAWNLP 1
15196 EOF
15197
15198 else
15199   echo "$ac_t""no" 1>&6
15200 fi
15201
15202
15203 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15204 echo "configure:15205: checking for _snprintf" >&5
15205 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15206   echo $ac_n "(cached) $ac_c" 1>&6
15207 else
15208   cat > conftest.$ac_ext <<EOF
15209 #line 15210 "configure"
15210 #include "confdefs.h"
15211 /* System header to define __stub macros and hopefully few prototypes,
15212     which can conflict with char _snprintf(); below.  */
15213 #include <assert.h>
15214 /* Override any gcc2 internal prototype to avoid an error.  */
15215 /* We use char because int might match the return type of a gcc2
15216     builtin and then its argument prototype would still apply.  */
15217 char _snprintf();
15218 char (*f)();
15219
15220 int main() {
15221
15222 /* The GNU C library defines this for functions which it implements
15223     to always fail with ENOSYS.  Some functions are actually named
15224     something starting with __ and the normal name is an alias.  */
15225 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15226 choke me
15227 #else
15228 f = _snprintf;
15229 #endif
15230
15231 ; return 0; }
15232 EOF
15233 if { (eval echo configure:15234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15234   rm -rf conftest*
15235   eval "ac_cv_func__snprintf=yes"
15236 else
15237   echo "configure: failed program was:" >&5
15238   cat conftest.$ac_ext >&5
15239   rm -rf conftest*
15240   eval "ac_cv_func__snprintf=no"
15241 fi
15242 rm -f conftest*
15243 fi
15244
15245 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15246   echo "$ac_t""yes" 1>&6
15247   ac_cv_func_snprintf=yes
15248         cat >> confdefs.h <<\EOF
15249 #define snprintf _snprintf
15250 EOF
15251
15252
15253 else
15254   echo "$ac_t""no" 1>&6
15255 fi
15256
15257
15258 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15259 echo "configure:15260: checking for _vsnprintf" >&5
15260 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15261   echo $ac_n "(cached) $ac_c" 1>&6
15262 else
15263   cat > conftest.$ac_ext <<EOF
15264 #line 15265 "configure"
15265 #include "confdefs.h"
15266 /* System header to define __stub macros and hopefully few prototypes,
15267     which can conflict with char _vsnprintf(); below.  */
15268 #include <assert.h>
15269 /* Override any gcc2 internal prototype to avoid an error.  */
15270 /* We use char because int might match the return type of a gcc2
15271     builtin and then its argument prototype would still apply.  */
15272 char _vsnprintf();
15273 char (*f)();
15274
15275 int main() {
15276
15277 /* The GNU C library defines this for functions which it implements
15278     to always fail with ENOSYS.  Some functions are actually named
15279     something starting with __ and the normal name is an alias.  */
15280 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15281 choke me
15282 #else
15283 f = _vsnprintf;
15284 #endif
15285
15286 ; return 0; }
15287 EOF
15288 if { (eval echo configure:15289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15289   rm -rf conftest*
15290   eval "ac_cv_func__vsnprintf=yes"
15291 else
15292   echo "configure: failed program was:" >&5
15293   cat conftest.$ac_ext >&5
15294   rm -rf conftest*
15295   eval "ac_cv_func__vsnprintf=no"
15296 fi
15297 rm -f conftest*
15298 fi
15299
15300 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15301   echo "$ac_t""yes" 1>&6
15302   ac_cv_func_vsnprintf=yes
15303         cat >> confdefs.h <<\EOF
15304 #define vsnprintf _vsnprintf
15305 EOF
15306
15307
15308 else
15309   echo "$ac_t""no" 1>&6
15310 fi
15311
15312
15313 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15314 echo "configure:15315: checking for vprintf" >&5
15315 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15316   echo $ac_n "(cached) $ac_c" 1>&6
15317 else
15318   cat > conftest.$ac_ext <<EOF
15319 #line 15320 "configure"
15320 #include "confdefs.h"
15321 /* System header to define __stub macros and hopefully few prototypes,
15322     which can conflict with char vprintf(); below.  */
15323 #include <assert.h>
15324 /* Override any gcc2 internal prototype to avoid an error.  */
15325 /* We use char because int might match the return type of a gcc2
15326     builtin and then its argument prototype would still apply.  */
15327 char vprintf();
15328 char (*f)();
15329
15330 int main() {
15331
15332 /* The GNU C library defines this for functions which it implements
15333     to always fail with ENOSYS.  Some functions are actually named
15334     something starting with __ and the normal name is an alias.  */
15335 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15336 choke me
15337 #else
15338 f = vprintf;
15339 #endif
15340
15341 ; return 0; }
15342 EOF
15343 if { (eval echo configure:15344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15344   rm -rf conftest*
15345   eval "ac_cv_func_vprintf=yes"
15346 else
15347   echo "configure: failed program was:" >&5
15348   cat conftest.$ac_ext >&5
15349   rm -rf conftest*
15350   eval "ac_cv_func_vprintf=no"
15351 fi
15352 rm -f conftest*
15353 fi
15354
15355 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15356   echo "$ac_t""yes" 1>&6
15357   cat >> confdefs.h <<\EOF
15358 #define HAVE_VPRINTF 1
15359 EOF
15360
15361 else
15362   echo "$ac_t""no" 1>&6
15363 fi
15364
15365 if test "$ac_cv_func_vprintf" != yes; then
15366 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15367 echo "configure:15368: checking for _doprnt" >&5
15368 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15369   echo $ac_n "(cached) $ac_c" 1>&6
15370 else
15371   cat > conftest.$ac_ext <<EOF
15372 #line 15373 "configure"
15373 #include "confdefs.h"
15374 /* System header to define __stub macros and hopefully few prototypes,
15375     which can conflict with char _doprnt(); below.  */
15376 #include <assert.h>
15377 /* Override any gcc2 internal prototype to avoid an error.  */
15378 /* We use char because int might match the return type of a gcc2
15379     builtin and then its argument prototype would still apply.  */
15380 char _doprnt();
15381 char (*f)();
15382
15383 int main() {
15384
15385 /* The GNU C library defines this for functions which it implements
15386     to always fail with ENOSYS.  Some functions are actually named
15387     something starting with __ and the normal name is an alias.  */
15388 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15389 choke me
15390 #else
15391 f = _doprnt;
15392 #endif
15393
15394 ; return 0; }
15395 EOF
15396 if { (eval echo configure:15397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15397   rm -rf conftest*
15398   eval "ac_cv_func__doprnt=yes"
15399 else
15400   echo "configure: failed program was:" >&5
15401   cat conftest.$ac_ext >&5
15402   rm -rf conftest*
15403   eval "ac_cv_func__doprnt=no"
15404 fi
15405 rm -f conftest*
15406 fi
15407
15408 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15409   echo "$ac_t""yes" 1>&6
15410   cat >> confdefs.h <<\EOF
15411 #define HAVE_DOPRNT 1
15412 EOF
15413
15414 else
15415   echo "$ac_t""no" 1>&6
15416 fi
15417
15418 fi
15419
15420
15421 if test $ac_cv_func_vprintf = yes ; then
15422                 for ac_func in vsnprintf vsprintf
15423 do
15424 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15425 echo "configure:15426: checking for $ac_func" >&5
15426 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15427   echo $ac_n "(cached) $ac_c" 1>&6
15428 else
15429   cat > conftest.$ac_ext <<EOF
15430 #line 15431 "configure"
15431 #include "confdefs.h"
15432 /* System header to define __stub macros and hopefully few prototypes,
15433     which can conflict with char $ac_func(); below.  */
15434 #include <assert.h>
15435 /* Override any gcc2 internal prototype to avoid an error.  */
15436 /* We use char because int might match the return type of a gcc2
15437     builtin and then its argument prototype would still apply.  */
15438 char $ac_func();
15439 char (*f)();
15440
15441 int main() {
15442
15443 /* The GNU C library defines this for functions which it implements
15444     to always fail with ENOSYS.  Some functions are actually named
15445     something starting with __ and the normal name is an alias.  */
15446 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15447 choke me
15448 #else
15449 f = $ac_func;
15450 #endif
15451
15452 ; return 0; }
15453 EOF
15454 if { (eval echo configure:15455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15455   rm -rf conftest*
15456   eval "ac_cv_func_$ac_func=yes"
15457 else
15458   echo "configure: failed program was:" >&5
15459   cat conftest.$ac_ext >&5
15460   rm -rf conftest*
15461   eval "ac_cv_func_$ac_func=no"
15462 fi
15463 rm -f conftest*
15464 fi
15465
15466 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15467   echo "$ac_t""yes" 1>&6
15468     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15469   cat >> confdefs.h <<EOF
15470 #define $ac_tr_func 1
15471 EOF
15472  
15473 else
15474   echo "$ac_t""no" 1>&6
15475 fi
15476 done
15477
15478 fi
15479
15480 for ac_func in \
15481         bcopy                   \
15482         closesocket             \
15483         chroot                  \
15484         endgrent                \
15485         endpwent                \
15486         flock                   \
15487         getdtablesize   \
15488         getgrgid                \
15489         gethostname             \
15490         getpass                 \
15491         getpassphrase   \
15492         getpwuid                \
15493         getpwnam                \
15494         getspnam                \
15495         gettimeofday    \
15496         initgroups              \
15497         lockf                   \
15498         memcpy                  \
15499         memmove                 \
15500         mkstemp                 \
15501         pipe                    \
15502         read                    \
15503         recv                    \
15504         recvfrom                \
15505         setpwfile               \
15506         setgid                  \
15507         setegid                 \
15508         setsid                  \
15509         setuid                  \
15510         seteuid                 \
15511         sigaction               \
15512         signal                  \
15513         sigset                  \
15514         snprintf                \
15515         strdup                  \
15516         strerror                \
15517         strpbrk                 \
15518         strrchr                 \
15519         strsep                  \
15520         strstr                  \
15521         strtol                  \
15522         strtoul                 \
15523         strspn                  \
15524         sysconf                 \
15525         waitpid                 \
15526         wait4                   \
15527         write                   \
15528         send                    \
15529         sendto                  \
15530
15531 do
15532 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15533 echo "configure:15534: checking for $ac_func" >&5
15534 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15535   echo $ac_n "(cached) $ac_c" 1>&6
15536 else
15537   cat > conftest.$ac_ext <<EOF
15538 #line 15539 "configure"
15539 #include "confdefs.h"
15540 /* System header to define __stub macros and hopefully few prototypes,
15541     which can conflict with char $ac_func(); below.  */
15542 #include <assert.h>
15543 /* Override any gcc2 internal prototype to avoid an error.  */
15544 /* We use char because int might match the return type of a gcc2
15545     builtin and then its argument prototype would still apply.  */
15546 char $ac_func();
15547 char (*f)();
15548
15549 int main() {
15550
15551 /* The GNU C library defines this for functions which it implements
15552     to always fail with ENOSYS.  Some functions are actually named
15553     something starting with __ and the normal name is an alias.  */
15554 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15555 choke me
15556 #else
15557 f = $ac_func;
15558 #endif
15559
15560 ; return 0; }
15561 EOF
15562 if { (eval echo configure:15563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15563   rm -rf conftest*
15564   eval "ac_cv_func_$ac_func=yes"
15565 else
15566   echo "configure: failed program was:" >&5
15567   cat conftest.$ac_ext >&5
15568   rm -rf conftest*
15569   eval "ac_cv_func_$ac_func=no"
15570 fi
15571 rm -f conftest*
15572 fi
15573
15574 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15575   echo "$ac_t""yes" 1>&6
15576     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15577   cat >> confdefs.h <<EOF
15578 #define $ac_tr_func 1
15579 EOF
15580  
15581 else
15582   echo "$ac_t""no" 1>&6
15583 fi
15584 done
15585
15586
15587 for ac_func in getopt tempnam
15588 do
15589 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15590 echo "configure:15591: checking for $ac_func" >&5
15591 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15592   echo $ac_n "(cached) $ac_c" 1>&6
15593 else
15594   cat > conftest.$ac_ext <<EOF
15595 #line 15596 "configure"
15596 #include "confdefs.h"
15597 /* System header to define __stub macros and hopefully few prototypes,
15598     which can conflict with char $ac_func(); below.  */
15599 #include <assert.h>
15600 /* Override any gcc2 internal prototype to avoid an error.  */
15601 /* We use char because int might match the return type of a gcc2
15602     builtin and then its argument prototype would still apply.  */
15603 char $ac_func();
15604 char (*f)();
15605
15606 int main() {
15607
15608 /* The GNU C library defines this for functions which it implements
15609     to always fail with ENOSYS.  Some functions are actually named
15610     something starting with __ and the normal name is an alias.  */
15611 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15612 choke me
15613 #else
15614 f = $ac_func;
15615 #endif
15616
15617 ; return 0; }
15618 EOF
15619 if { (eval echo configure:15620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15620   rm -rf conftest*
15621   eval "ac_cv_func_$ac_func=yes"
15622 else
15623   echo "configure: failed program was:" >&5
15624   cat conftest.$ac_ext >&5
15625   rm -rf conftest*
15626   eval "ac_cv_func_$ac_func=no"
15627 fi
15628 rm -f conftest*
15629 fi
15630
15631 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15632   echo "$ac_t""yes" 1>&6
15633     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15634   cat >> confdefs.h <<EOF
15635 #define $ac_tr_func 1
15636 EOF
15637  
15638 else
15639   echo "$ac_t""no" 1>&6
15640 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15641 fi
15642 done
15643
15644
15645
15646 if test "$ac_cv_func_getopt" != yes; then
15647     LIBSRCS="$LIBSRCS getopt.c"
15648 fi
15649
15650 if test "$ac_cv_func_tempnam" != yes; then
15651     LIBSRCS="$LIBSRCS tempnam.c"
15652 fi
15653
15654 # Check Configuration
15655 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15656 echo "configure:15657: checking declaration of sys_errlist" >&5
15657 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15658   echo $ac_n "(cached) $ac_c" 1>&6
15659 else
15660   
15661         cat > conftest.$ac_ext <<EOF
15662 #line 15663 "configure"
15663 #include "confdefs.h"
15664
15665 #include <stdio.h>
15666 #include <sys/types.h>
15667 #include <errno.h>
15668 #ifdef WINNT
15669 #include <stdlib.h>
15670 #endif 
15671 int main() {
15672 char *c = (char *) *sys_errlist
15673 ; return 0; }
15674 EOF
15675 if { (eval echo configure:15676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15676   rm -rf conftest*
15677   ol_cv_dcl_sys_errlist=yes
15678         ol_cv_have_sys_errlist=yes
15679 else
15680   echo "configure: failed program was:" >&5
15681   cat conftest.$ac_ext >&5
15682   rm -rf conftest*
15683   ol_cv_dcl_sys_errlist=no
15684 fi
15685 rm -f conftest*
15686 fi
15687
15688 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15689 #
15690 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15691 if test $ol_cv_dcl_sys_errlist = no ; then
15692         cat >> confdefs.h <<\EOF
15693 #define DECL_SYS_ERRLIST 1
15694 EOF
15695
15696
15697         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15698 echo "configure:15699: checking existence of sys_errlist" >&5
15699 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15700   echo $ac_n "(cached) $ac_c" 1>&6
15701 else
15702   
15703                 cat > conftest.$ac_ext <<EOF
15704 #line 15705 "configure"
15705 #include "confdefs.h"
15706 #include <errno.h>
15707 int main() {
15708 char *c = (char *) *sys_errlist
15709 ; return 0; }
15710 EOF
15711 if { (eval echo configure:15712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15712   rm -rf conftest*
15713   ol_cv_have_sys_errlist=yes
15714 else
15715   echo "configure: failed program was:" >&5
15716   cat conftest.$ac_ext >&5
15717   rm -rf conftest*
15718   ol_cv_have_sys_errlist=no
15719 fi
15720 rm -f conftest*
15721 fi
15722
15723 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15724 fi
15725 if test $ol_cv_have_sys_errlist = yes ; then
15726         cat >> confdefs.h <<\EOF
15727 #define HAVE_SYS_ERRLIST 1
15728 EOF
15729
15730 fi
15731
15732
15733
15734 if test "$ol_enable_debug" != no ; then
15735         cat >> confdefs.h <<\EOF
15736 #define LDAP_DEBUG 1
15737 EOF
15738
15739 fi
15740 if test "$ol_enable_syslog" = yes ; then
15741         cat >> confdefs.h <<\EOF
15742 #define LDAP_SYSLOG 1
15743 EOF
15744
15745 fi
15746 if test "$ol_enable_libui" = yes ; then
15747         cat >> confdefs.h <<\EOF
15748 #define LDAP_LIBUI 1
15749 EOF
15750
15751 fi
15752 if test "$ol_enable_cache" = no ; then
15753         cat >> confdefs.h <<\EOF
15754 #define LDAP_NOCACHE 1
15755 EOF
15756
15757 fi
15758 if test "$ol_link_kbind" != no ; then
15759         cat >> confdefs.h <<\EOF
15760 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15761 EOF
15762
15763 fi
15764 if test "$ol_enable_dns" != no ; then
15765         cat >> confdefs.h <<\EOF
15766 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
15767 EOF
15768
15769 fi
15770 if test "$ol_enable_proctitle" != no ; then
15771         cat >> confdefs.h <<\EOF
15772 #define LDAP_PROCTITLE 1
15773 EOF
15774
15775 fi
15776 if test "$ol_enable_referrals" != no ; then
15777         cat >> confdefs.h <<\EOF
15778 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15779 EOF
15780
15781 fi
15782 if test "$ol_enable_cldap" != no ; then
15783         cat >> confdefs.h <<\EOF
15784 #define LDAP_CONNECTIONLESS 1
15785 EOF
15786
15787 fi
15788 if test "$ol_enable_ldapi" != no; then
15789         cat >> confdefs.h <<\EOF
15790 #define USE_PF_LOCAL 1
15791 EOF
15792
15793 fi
15794
15795 if test "$ol_enable_cleartext" != no ; then
15796         cat >> confdefs.h <<\EOF
15797 #define SLAPD_CLEARTEXT 1
15798 EOF
15799
15800 fi
15801 if test "$ol_enable_crypt" != no ; then
15802         cat >> confdefs.h <<\EOF
15803 #define SLAPD_CRYPT 1
15804 EOF
15805
15806 fi
15807 if test "$ol_link_kpasswd" != no ; then
15808         cat >> confdefs.h <<\EOF
15809 #define SLAPD_KPASSWD 1
15810 EOF
15811
15812 fi
15813 if test "$ol_link_spasswd" != no ; then
15814         cat >> confdefs.h <<\EOF
15815 #define SLAPD_SPASSWD 1
15816 EOF
15817
15818 fi
15819 if test "$ol_enable_multimaster" != no ; then
15820         cat >> confdefs.h <<\EOF
15821 #define SLAPD_MULTIMASTER 1
15822 EOF
15823
15824 fi
15825 if test "$ol_enable_phonetic" != no ; then
15826         cat >> confdefs.h <<\EOF
15827 #define SLAPD_PHONETIC 1
15828 EOF
15829
15830 fi
15831 if test "$ol_enable_rlookups" != no ; then
15832         cat >> confdefs.h <<\EOF
15833 #define SLAPD_RLOOKUPS 1
15834 EOF
15835
15836 fi
15837 if test "$ol_enable_aci" != no ; then
15838         cat >> confdefs.h <<\EOF
15839 #define SLAPD_ACI_ENABLED 1
15840 EOF
15841
15842 fi
15843
15844 if test "$ol_link_modules" != no ; then
15845         cat >> confdefs.h <<\EOF
15846 #define SLAPD_MODULES 1
15847 EOF
15848
15849         BUILD_SLAPD=yes
15850         SLAPD_MODULES_LDFLAGS="-dlopen self"
15851 fi
15852
15853 if test "$ol_link_bdb2" != no ; then
15854         cat >> confdefs.h <<\EOF
15855 #define SLAPD_BDB2 1
15856 EOF
15857
15858         BUILD_SLAPD=yes
15859         BUILD_BDB2=yes
15860         if test "$ol_with_bdb2_module" != static ; then
15861                 cat >> confdefs.h <<\EOF
15862 #define SLAPD_BDB2_DYNAMIC 1
15863 EOF
15864
15865                 BUILD_BDB2=mod
15866                 BUILD_BDB2_DYNAMIC=shared
15867                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15868         fi
15869 fi
15870
15871 if test "$ol_enable_dnssrv" != no ; then
15872         cat >> confdefs.h <<\EOF
15873 #define SLAPD_DNSSRV 1
15874 EOF
15875
15876         BUILD_SLAPD=yes
15877         BUILD_DNSSRV=yes
15878         if test "$ol_with_dnssrv_module" != static ; then
15879                 cat >> confdefs.h <<\EOF
15880 #define SLAPD_DNSSRV_DYNAMIC 1
15881 EOF
15882
15883                 BUILD_DNSSRV=mod
15884                 BUILD_DNSSRV_DYNAMIC=shared
15885                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15886         fi
15887 fi
15888
15889 if test "$ol_enable_ldap" != no ; then
15890         cat >> confdefs.h <<\EOF
15891 #define SLAPD_LDAP 1
15892 EOF
15893
15894         BUILD_SLAPD=yes
15895         BUILD_LDAP=yes
15896         if test "$ol_with_ldap_module" != static ; then
15897                 cat >> confdefs.h <<\EOF
15898 #define SLAPD_LDAP_DYNAMIC 1
15899 EOF
15900
15901                 BUILD_LDAP=mod
15902                 BUILD_LDAP_DYNAMIC=shared
15903                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15904         fi
15905 fi
15906
15907 if test "$ol_link_ldbm" != no ; then
15908         cat >> confdefs.h <<\EOF
15909 #define SLAPD_LDBM 1
15910 EOF
15911
15912         BUILD_SLAPD=yes
15913         BUILD_LDBM=yes
15914         if test "$ol_with_ldbm_module" != static ; then
15915                 cat >> confdefs.h <<\EOF
15916 #define SLAPD_LDBM_DYNAMIC 1
15917 EOF
15918
15919                 BUILD_LDBM=mod
15920                 BUILD_LDBM_DYNAMIC=shared
15921                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15922         fi
15923 fi
15924
15925 if test "$ol_enable_passwd" != no ; then
15926         cat >> confdefs.h <<\EOF
15927 #define SLAPD_PASSWD 1
15928 EOF
15929
15930         BUILD_SLAPD=yes
15931         BUILD_PASSWD=yes
15932         if test "$ol_with_passwd_module" != static ; then
15933                 cat >> confdefs.h <<\EOF
15934 #define SLAPD_PASSWD_DYNAMIC 1
15935 EOF
15936
15937                 BUILD_PASSWD=mod
15938                 BUILD_PASSWD_DYNAMIC=shared
15939                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15940         fi
15941 fi
15942
15943 if test "$ol_link_perl" != no ; then
15944         cat >> confdefs.h <<\EOF
15945 #define SLAPD_PERL 1
15946 EOF
15947
15948         BUILD_SLAPD=yes
15949         BUILD_PERL=yes
15950         if test "$ol_with_perl_module" != static ; then
15951                 cat >> confdefs.h <<\EOF
15952 #define SLAPD_PERL_DYNAMIC 1
15953 EOF
15954
15955                 BUILD_PERL=mod
15956                 BUILD_PERL_DYNAMIC=shared
15957                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15958         fi
15959 fi
15960
15961 if test "$ol_enable_shell" != no ; then
15962         cat >> confdefs.h <<\EOF
15963 #define SLAPD_SHELL 1
15964 EOF
15965
15966         BUILD_SLAPD=yes
15967         BUILD_SHELL=yes
15968         if test "$ol_with_shell_module" != static ; then
15969                 cat >> confdefs.h <<\EOF
15970 #define SLAPD_SHELL_DYNAMIC 1
15971 EOF
15972
15973                 BUILD_SHELL=mod
15974                 BUILD_SHELL_DYNAMIC=shared
15975                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15976         fi
15977 fi
15978
15979 if test "$ol_enable_tcl" != no ; then
15980         cat >> confdefs.h <<\EOF
15981 #define SLAPD_TCL 1
15982 EOF
15983
15984         BUILD_SLAPD=yes
15985         BUILD_TCL=yes
15986         if test "$ol_with_tcl_module" != static; then
15987                 cat >> confdefs.h <<\EOF
15988 #define SLAPD_TCL_DYNAMIC 1
15989 EOF
15990
15991                 BUILD_TCL=mod
15992                 BUILD_TCL_DYNAMIC=shared
15993                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15994         fi
15995 fi
15996
15997 if test "$ol_enable_sql" != no ; then
15998         cat >> confdefs.h <<\EOF
15999 #define SLAPD_SQL 1
16000 EOF
16001
16002         BUILD_SLAPD=yes
16003         BUILD_SQL=yes
16004         SLAPD_SQL_LIBS=-liodbc
16005         if test "$ol_with_sql_module" != static; then
16006                 cat >> confdefs.h <<\EOF
16007 #define SLAPD_SQL_DYNAMIC 1
16008 EOF
16009
16010                 BUILD_SQL=mod
16011                 BUILD_SQL_DYNAMIC=shared
16012                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16013         fi
16014 fi
16015
16016 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16017         $BUILD_SLAPD = yes ; then
16018         BUILD_SLURPD=yes
16019 fi
16020
16021
16022 if test "$LINK_BINS_DYNAMIC" = yes; then
16023     LIB_LINKAGE=DYN
16024     LT_LIB_LINKAGE=shared
16025 else
16026     LIB_LINKAGE=STAT
16027     LT_LIB_LINKAGE=static
16028 fi
16029
16030 if test "$ac_cv_mingw32" = yes ; then
16031     PLAT=NT
16032     DYN_EXT=dll
16033 else
16034     PLAT=UNIX
16035     DYN_EXT=so
16036 fi
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046   
16047   
16048   
16049   
16050   
16051   
16052   
16053   
16054   
16055   
16056   
16057   
16058   
16059   
16060   
16061   
16062   
16063   
16064   
16065
16066
16067
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 trap '' 1 2 15
16102
16103 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16104
16105 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16106 # Let make expand exec_prefix.
16107 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16108
16109 # Any assignment to VPATH causes Sun make to only execute
16110 # the first set of double-colon rules, so remove it if not needed.
16111 # If there is a colon in the path, we need to keep it.
16112 if test "x$srcdir" = x.; then
16113   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16114 fi
16115
16116 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16117
16118 DEFS=-DHAVE_CONFIG_H
16119
16120 # Without the "./", some shells look in PATH for config.status.
16121 : ${CONFIG_STATUS=./config.status}
16122
16123 echo creating $CONFIG_STATUS
16124 rm -f $CONFIG_STATUS
16125 cat > $CONFIG_STATUS <<EOF
16126 #! /bin/sh
16127 # Generated automatically by configure.
16128 # Run this file to recreate the current configuration.
16129 # This directory was configured as follows,
16130 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16131 #
16132 # $0 $ac_configure_args
16133 #
16134 # Compiler output produced by configure, useful for debugging
16135 # configure, is in ./config.log if it exists.
16136
16137 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16138 for ac_option
16139 do
16140   case "\$ac_option" in
16141   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16142     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16143     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16144   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16145     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16146     exit 0 ;;
16147   -help | --help | --hel | --he | --h)
16148     echo "\$ac_cs_usage"; exit 0 ;;
16149   *) echo "\$ac_cs_usage"; exit 1 ;;
16150   esac
16151 done
16152
16153 ac_given_srcdir=$srcdir
16154 ac_given_INSTALL="$INSTALL"
16155
16156 trap 'rm -fr `echo "\
16157 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16158 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16159 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16160 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16161 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16162 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16163 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16164 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16165 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16166 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16167 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16168 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16169 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16170 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16171 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16172 include/Makefile:build/top.mk:include/Makefile.in \
16173 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16174 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16175 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16176 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16177 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16178 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16179 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16180 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16181 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16182 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16183 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16184 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16185 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16186 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16187 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16188 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16189 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16190 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16191 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16192 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16193 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16194 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16195 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16196 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16197 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16198 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16199 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16200 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16201  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16202 EOF
16203 cat >> $CONFIG_STATUS <<EOF
16204
16205 # Protect against being on the right side of a sed subst in config.status.
16206 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16207  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16208 $ac_vpsub
16209 $extrasub
16210 s%@SHELL@%$SHELL%g
16211 s%@CFLAGS@%$CFLAGS%g
16212 s%@CPPFLAGS@%$CPPFLAGS%g
16213 s%@CXXFLAGS@%$CXXFLAGS%g
16214 s%@FFLAGS@%$FFLAGS%g
16215 s%@DEFS@%$DEFS%g
16216 s%@LDFLAGS@%$LDFLAGS%g
16217 s%@LIBS@%$LIBS%g
16218 s%@exec_prefix@%$exec_prefix%g
16219 s%@prefix@%$prefix%g
16220 s%@program_transform_name@%$program_transform_name%g
16221 s%@bindir@%$bindir%g
16222 s%@sbindir@%$sbindir%g
16223 s%@libexecdir@%$libexecdir%g
16224 s%@datadir@%$datadir%g
16225 s%@sysconfdir@%$sysconfdir%g
16226 s%@sharedstatedir@%$sharedstatedir%g
16227 s%@localstatedir@%$localstatedir%g
16228 s%@libdir@%$libdir%g
16229 s%@includedir@%$includedir%g
16230 s%@oldincludedir@%$oldincludedir%g
16231 s%@infodir@%$infodir%g
16232 s%@mandir@%$mandir%g
16233 s%@host@%$host%g
16234 s%@host_alias@%$host_alias%g
16235 s%@host_cpu@%$host_cpu%g
16236 s%@host_vendor@%$host_vendor%g
16237 s%@host_os@%$host_os%g
16238 s%@target@%$target%g
16239 s%@target_alias@%$target_alias%g
16240 s%@target_cpu@%$target_cpu%g
16241 s%@target_vendor@%$target_vendor%g
16242 s%@target_os@%$target_os%g
16243 s%@build@%$build%g
16244 s%@build_alias@%$build_alias%g
16245 s%@build_cpu@%$build_cpu%g
16246 s%@build_vendor@%$build_vendor%g
16247 s%@build_os@%$build_os%g
16248 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16249 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16250 s%@INSTALL_DATA@%$INSTALL_DATA%g
16251 s%@PACKAGE@%$PACKAGE%g
16252 s%@VERSION@%$VERSION%g
16253 s%@ACLOCAL@%$ACLOCAL%g
16254 s%@AUTOCONF@%$AUTOCONF%g
16255 s%@AUTOMAKE@%$AUTOMAKE%g
16256 s%@AUTOHEADER@%$AUTOHEADER%g
16257 s%@MAKEINFO@%$MAKEINFO%g
16258 s%@install_sh@%$install_sh%g
16259 s%@AMTAR@%$AMTAR%g
16260 s%@AWK@%$AWK%g
16261 s%@AMTARFLAGS@%$AMTARFLAGS%g
16262 s%@SET_MAKE@%$SET_MAKE%g
16263 s%@top_builddir@%$top_builddir%g
16264 s%@ldap_subdir@%$ldap_subdir%g
16265 s%@CC@%$CC%g
16266 s%@RANLIB@%$RANLIB%g
16267 s%@LN_S@%$LN_S%g
16268 s%@DLLTOOL@%$DLLTOOL%g
16269 s%@AS@%$AS%g
16270 s%@OBJDUMP@%$OBJDUMP%g
16271 s%@LIBTOOL@%$LIBTOOL%g
16272 s%@LN_H@%$LN_H%g
16273 s%@SENDMAIL@%$SENDMAIL%g
16274 s%@EDITOR@%$EDITOR%g
16275 s%@FINGER@%$FINGER%g
16276 s%@PERLBIN@%$PERLBIN%g
16277 s%@CPP@%$CPP%g
16278 s%@EXEEXT@%$EXEEXT%g
16279 s%@OBJEXT@%$OBJEXT%g
16280 s%@OL_MKDEP@%$OL_MKDEP%g
16281 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16282 s%@LIBOBJS@%$LIBOBJS%g
16283 s%@LIBSRCS@%$LIBSRCS%g
16284 s%@PLAT@%$PLAT%g
16285 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16286 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16287 s%@DYN_EXT@%$DYN_EXT%g
16288 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16289 s%@BUILD_BDB2@%$BUILD_BDB2%g
16290 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16291 s%@BUILD_LDAP@%$BUILD_LDAP%g
16292 s%@BUILD_LDBM@%$BUILD_LDBM%g
16293 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16294 s%@BUILD_PERL@%$BUILD_PERL%g
16295 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16296 s%@BUILD_SHELL@%$BUILD_SHELL%g
16297 s%@BUILD_SQL@%$BUILD_SQL%g
16298 s%@BUILD_TCL@%$BUILD_TCL%g
16299 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
16300 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16301 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16302 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16303 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16304 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16305 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16306 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16307 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16308 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16309 s%@LDAP_LIBS@%$LDAP_LIBS%g
16310 s%@LDIF_LIBS@%$LDIF_LIBS%g
16311 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16312 s%@QUIPU_LIBS@%$QUIPU_LIBS%g
16313 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16314 s%@LDBM_LIBS@%$LDBM_LIBS%g
16315 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16316 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16317 s%@WRAP_LIBS@%$WRAP_LIBS%g
16318 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16319 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16320 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16321 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16322 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16323 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16324 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16325 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16326 s%@KRB4_LIBS@%$KRB4_LIBS%g
16327 s%@KRB5_LIBS@%$KRB5_LIBS%g
16328 s%@READLINE_LIBS@%$READLINE_LIBS%g
16329 s%@SASL_LIBS@%$SASL_LIBS%g
16330 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16331 s%@TLS_LIBS@%$TLS_LIBS%g
16332 s%@MODULES_LIBS@%$MODULES_LIBS%g
16333 s%@AUTH_LIBS@%$AUTH_LIBS%g
16334 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16335 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16336 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16337
16338 CEOF
16339 EOF
16340
16341 cat >> $CONFIG_STATUS <<\EOF
16342
16343 # Split the substitutions into bite-sized pieces for seds with
16344 # small command number limits, like on Digital OSF/1 and HP-UX.
16345 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16346 ac_file=1 # Number of current file.
16347 ac_beg=1 # First line for current file.
16348 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16349 ac_more_lines=:
16350 ac_sed_cmds=""
16351 while $ac_more_lines; do
16352   if test $ac_beg -gt 1; then
16353     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16354   else
16355     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16356   fi
16357   if test ! -s conftest.s$ac_file; then
16358     ac_more_lines=false
16359     rm -f conftest.s$ac_file
16360   else
16361     if test -z "$ac_sed_cmds"; then
16362       ac_sed_cmds="sed -f conftest.s$ac_file"
16363     else
16364       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16365     fi
16366     ac_file=`expr $ac_file + 1`
16367     ac_beg=$ac_end
16368     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16369   fi
16370 done
16371 if test -z "$ac_sed_cmds"; then
16372   ac_sed_cmds=cat
16373 fi
16374 EOF
16375
16376 cat >> $CONFIG_STATUS <<EOF
16377
16378 CONFIG_FILES=\${CONFIG_FILES-"\
16379 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16380 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16381 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16382 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16383 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16384 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16385 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16386 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16387 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16388 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16389 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16390 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16391 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16392 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16393 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16394 include/Makefile:build/top.mk:include/Makefile.in \
16395 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16396 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16397 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16398 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16399 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16400 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16401 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16402 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16403 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16404 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16405 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16406 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16407 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16408 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16409 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16410 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16411 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16412 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16413 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16414 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16415 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16416 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16417 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16418 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16419 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16420 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16421 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16422 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16423 "}
16424 EOF
16425 cat >> $CONFIG_STATUS <<\EOF
16426 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16427   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16428   case "$ac_file" in
16429   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16430        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16431   *) ac_file_in="${ac_file}.in" ;;
16432   esac
16433
16434   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16435
16436   # Remove last slash and all that follows it.  Not all systems have dirname.
16437   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16438   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16439     # The file is in a subdirectory.
16440     test ! -d "$ac_dir" && mkdir "$ac_dir"
16441     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16442     # A "../" for each directory in $ac_dir_suffix.
16443     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16444   else
16445     ac_dir_suffix= ac_dots=
16446   fi
16447
16448   case "$ac_given_srcdir" in
16449   .)  srcdir=.
16450       if test -z "$ac_dots"; then top_srcdir=.
16451       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16452   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16453   *) # Relative path.
16454     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16455     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16456   esac
16457
16458   case "$ac_given_INSTALL" in
16459   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16460   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16461   esac
16462
16463   echo creating "$ac_file"
16464   rm -f "$ac_file"
16465   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16466   case "$ac_file" in
16467   *[Mm]akefile*) ac_comsub="1i\\
16468 # $configure_input" ;;
16469   *) ac_comsub= ;;
16470   esac
16471
16472   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16473   sed -e "$ac_comsub
16474 s%@configure_input@%$configure_input%g
16475 s%@srcdir@%$srcdir%g
16476 s%@top_srcdir@%$top_srcdir%g
16477 s%@INSTALL@%$INSTALL%g
16478 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16479 fi; done
16480 rm -f conftest.s*
16481
16482 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16483 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16484 #
16485 # ac_d sets the value in "#define NAME VALUE" lines.
16486 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16487 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16488 ac_dC='\3'
16489 ac_dD='%g'
16490 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16491 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16492 ac_uB='\([      ]\)%\1#\2define\3'
16493 ac_uC=' '
16494 ac_uD='\4%g'
16495 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16496 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16497 ac_eB='$%\1#\2define\3'
16498 ac_eC=' '
16499 ac_eD='%g'
16500
16501 if test "${CONFIG_HEADERS+set}" != set; then
16502 EOF
16503 cat >> $CONFIG_STATUS <<EOF
16504   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16505 EOF
16506 cat >> $CONFIG_STATUS <<\EOF
16507 fi
16508 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16509   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16510   case "$ac_file" in
16511   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16512        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16513   *) ac_file_in="${ac_file}.in" ;;
16514   esac
16515
16516   echo creating $ac_file
16517
16518   rm -f conftest.frag conftest.in conftest.out
16519   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16520   cat $ac_file_inputs > conftest.in
16521
16522 EOF
16523
16524 # Transform confdefs.h into a sed script conftest.vals that substitutes
16525 # the proper values into config.h.in to produce config.h.  And first:
16526 # Protect against being on the right side of a sed subst in config.status.
16527 # Protect against being in an unquoted here document in config.status.
16528 rm -f conftest.vals
16529 cat > conftest.hdr <<\EOF
16530 s/[\\&%]/\\&/g
16531 s%[\\$`]%\\&%g
16532 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16533 s%ac_d%ac_u%gp
16534 s%ac_u%ac_e%gp
16535 EOF
16536 sed -n -f conftest.hdr confdefs.h > conftest.vals
16537 rm -f conftest.hdr
16538
16539 # This sed command replaces #undef with comments.  This is necessary, for
16540 # example, in the case of _POSIX_SOURCE, which is predefined and required
16541 # on some systems where configure will not decide to define it.
16542 cat >> conftest.vals <<\EOF
16543 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16544 EOF
16545
16546 # Break up conftest.vals because some shells have a limit on
16547 # the size of here documents, and old seds have small limits too.
16548
16549 rm -f conftest.tail
16550 while :
16551 do
16552   ac_lines=`grep -c . conftest.vals`
16553   # grep -c gives empty output for an empty file on some AIX systems.
16554   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16555   # Write a limited-size here document to conftest.frag.
16556   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16557   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16558   echo 'CEOF
16559   sed -f conftest.frag conftest.in > conftest.out
16560   rm -f conftest.in
16561   mv conftest.out conftest.in
16562 ' >> $CONFIG_STATUS
16563   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16564   rm -f conftest.vals
16565   mv conftest.tail conftest.vals
16566 done
16567 rm -f conftest.vals
16568
16569 cat >> $CONFIG_STATUS <<\EOF
16570   rm -f conftest.frag conftest.h
16571   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16572   cat conftest.in >> conftest.h
16573   rm -f conftest.in
16574   if cmp -s $ac_file conftest.h 2>/dev/null; then
16575     echo "$ac_file is unchanged"
16576     rm -f conftest.h
16577   else
16578     # Remove last slash and all that follows it.  Not all systems have dirname.
16579       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16580       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16581       # The file is in a subdirectory.
16582       test ! -d "$ac_dir" && mkdir "$ac_dir"
16583     fi
16584     rm -f $ac_file
16585     mv conftest.h $ac_file
16586   fi
16587 fi; done
16588
16589 EOF
16590 cat >> $CONFIG_STATUS <<EOF
16591
16592 EOF
16593 cat >> $CONFIG_STATUS <<\EOF
16594
16595 date > stamp-h
16596 echo Please \"make depend\" to build dependencies
16597
16598 exit 0
16599 EOF
16600 chmod +x $CONFIG_STATUS
16601 rm -fr confdefs* $ac_clean_files
16602 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16603