]> git.sur5r.net Git - openldap/blob - configure
Depend libraries upon setup.dsp
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.290 2000/01/27 18:34:00 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   --enable-dmalloc      enable debug malloc support (no)"
51 ac_help="$ac_help
52   --with-cyrus-sasl     with Cyrus SASL support (auto)"
53 ac_help="$ac_help
54   --with-fetch          with fetch URL support (auto)"
55 ac_help="$ac_help
56   --with-kerberos       with support (auto)"
57 ac_help="$ac_help
58   --with-readline       with readline support (auto)"
59 ac_help="$ac_help
60   --with-threads        use threads (auto)"
61 ac_help="$ac_help
62   --with-tls            with TLS/SSL support (auto)"
63 ac_help="$ac_help
64   --with-yielding-select        with implicitly yielding select (auto)"
65 ac_help="$ac_help
66 LDAPD (X.500-to-LDAP Gateway) Options:"
67 ac_help="$ac_help
68   --enable-ldapd        enable building ldapd (no)"
69 ac_help="$ac_help
70 SLAPD (Standalone LDAP Daemon) Options:"
71 ac_help="$ac_help
72   --enable-slapd        enable building slapd (yes)"
73 ac_help="$ac_help
74     --enable-cleartext  enable cleartext passwords (yes)"
75 ac_help="$ac_help
76     --enable-crypt      enable crypt(3) passwords (auto)"
77 ac_help="$ac_help
78     --enable-kpasswd    enable kerberos password verification (no)"
79 ac_help="$ac_help
80     --enable-modules    enable dynamic module support (no)"
81 ac_help="$ac_help
82     --enable-multimaster        enable multimaster replication (no)"
83 ac_help="$ac_help
84     --enable-phonetic   enable phonetic/soundex (no)"
85 ac_help="$ac_help
86     --enable-quipu      build quipu migration tools (no)"
87 ac_help="$ac_help
88     --enable-rlookups   enable reverse lookups (auto)"
89 ac_help="$ac_help
90     --enable-aci        enable per-object ACIs (no)"
91 ac_help="$ac_help
92     --enable-wrappers   enable tcp wrapper support (no)"
93 ac_help="$ac_help
94     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
95 ac_help="$ac_help
96     --enable-bdb2       enable bdb2 backend (no)"
97 ac_help="$ac_help
98       --with-bdb2-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-tcl        enable tcl backend (no)"
125 ac_help="$ac_help
126       --with-tcl-module module type (static)"
127 ac_help="$ac_help
128 SLURPD (Replication Daemon) Options:"
129 ac_help="$ac_help
130   --enable-slurpd       enable building slurpd (auto)"
131 ac_help="$ac_help
132 Library Generation & Linking Options"
133 ac_help="$ac_help
134   --enable-static[=PKGS]  build static libraries [default=yes]"
135 ac_help="$ac_help
136   --enable-shared[=PKGS]  build shared libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
139 ac_help="$ac_help
140   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
141 ac_help="$ac_help
142   --disable-libtool-lock  avoid locking (might break parallel builds)"
143
144 # Initialize some variables set by options.
145 # The variables have the same names as the options, with
146 # dashes changed to underlines.
147 build=NONE
148 cache_file=./config.cache
149 exec_prefix=NONE
150 host=NONE
151 no_create=
152 nonopt=NONE
153 no_recursion=
154 prefix=NONE
155 program_prefix=NONE
156 program_suffix=NONE
157 program_transform_name=s,x,x,
158 silent=
159 site=
160 srcdir=
161 target=NONE
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165 bindir='${exec_prefix}/bin'
166 sbindir='${exec_prefix}/sbin'
167 libexecdir='${exec_prefix}/libexec'
168 datadir='${prefix}/share'
169 sysconfdir='${prefix}/etc'
170 sharedstatedir='${prefix}/com'
171 localstatedir='${prefix}/var'
172 libdir='${exec_prefix}/lib'
173 includedir='${prefix}/include'
174 oldincludedir='/usr/include'
175 infodir='${prefix}/info'
176 mandir='${prefix}/man'
177
178 # Initialize some other variables.
179 subdirs=
180 MFLAGS= MAKEFLAGS=
181 SHELL=${CONFIG_SHELL-/bin/sh}
182 # Maximum number of lines to put in a shell here document.
183 ac_max_here_lines=12
184
185 ac_prev=
186 for ac_option
187 do
188
189   # If the previous option needs an argument, assign it.
190   if test -n "$ac_prev"; then
191     eval "$ac_prev=\$ac_option"
192     ac_prev=
193     continue
194   fi
195
196   case "$ac_option" in
197   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
198   *) ac_optarg= ;;
199   esac
200
201   # Accept the important Cygnus configure options, so we can diagnose typos.
202
203   case "$ac_option" in
204
205   -bindir | --bindir | --bindi | --bind | --bin | --bi)
206     ac_prev=bindir ;;
207   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
208     bindir="$ac_optarg" ;;
209
210   -build | --build | --buil | --bui | --bu)
211     ac_prev=build ;;
212   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
213     build="$ac_optarg" ;;
214
215   -cache-file | --cache-file | --cache-fil | --cache-fi \
216   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
217     ac_prev=cache_file ;;
218   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
219   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
220     cache_file="$ac_optarg" ;;
221
222   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
223     ac_prev=datadir ;;
224   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
225   | --da=*)
226     datadir="$ac_optarg" ;;
227
228   -disable-* | --disable-*)
229     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
230     # Reject names that are not valid shell variable names.
231     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
232       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
233     fi
234     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
235     eval "enable_${ac_feature}=no" ;;
236
237   -enable-* | --enable-*)
238     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
239     # Reject names that are not valid shell variable names.
240     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
241       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
242     fi
243     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
244     case "$ac_option" in
245       *=*) ;;
246       *) ac_optarg=yes ;;
247     esac
248     eval "enable_${ac_feature}='$ac_optarg'" ;;
249
250   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
251   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
252   | --exec | --exe | --ex)
253     ac_prev=exec_prefix ;;
254   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
255   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
256   | --exec=* | --exe=* | --ex=*)
257     exec_prefix="$ac_optarg" ;;
258
259   -gas | --gas | --ga | --g)
260     # Obsolete; use --with-gas.
261     with_gas=yes ;;
262
263   -help | --help | --hel | --he)
264     # Omit some internal or obsolete options to make the list less imposing.
265     # This message is too long to be a string in the A/UX 3.1 sh.
266     cat << EOF
267 Usage: configure [options] [host]
268 Options: [defaults in brackets after descriptions]
269 Configuration:
270   --cache-file=FILE       cache test results in FILE
271   --help                  print this message
272   --no-create             do not create output files
273   --quiet, --silent       do not print \`checking...' messages
274   --version               print the version of autoconf that created configure
275 Directory and file names:
276   --prefix=PREFIX         install architecture-independent files in PREFIX
277                           [$ac_default_prefix]
278   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
279                           [same as prefix]
280   --bindir=DIR            user executables in DIR [EPREFIX/bin]
281   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
282   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
283   --datadir=DIR           read-only architecture-independent data in DIR
284                           [PREFIX/share]
285   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
286   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
287                           [PREFIX/com]
288   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
289   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
290   --includedir=DIR        C header files in DIR [PREFIX/include]
291   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
292   --infodir=DIR           info documentation in DIR [PREFIX/info]
293   --mandir=DIR            man documentation in DIR [PREFIX/man]
294   --srcdir=DIR            find the sources in DIR [configure dir or ..]
295   --program-prefix=PREFIX prepend PREFIX to installed program names
296   --program-suffix=SUFFIX append SUFFIX to installed program names
297   --program-transform-name=PROGRAM
298                           run sed PROGRAM on installed program names
299 EOF
300     cat << EOF
301 Host type:
302   --build=BUILD           configure for building on BUILD [BUILD=HOST]
303   --host=HOST             configure for HOST [guessed]
304   --target=TARGET         configure for TARGET [TARGET=HOST]
305 Features and packages:
306   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
307   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
308   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
309   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
310   --x-includes=DIR        X include files are in DIR
311   --x-libraries=DIR       X library files are in DIR
312 EOF
313     if test -n "$ac_help"; then
314       echo "--enable and --with options recognized:$ac_help"
315     fi
316     exit 0 ;;
317
318   -host | --host | --hos | --ho)
319     ac_prev=host ;;
320   -host=* | --host=* | --hos=* | --ho=*)
321     host="$ac_optarg" ;;
322
323   -includedir | --includedir | --includedi | --included | --include \
324   | --includ | --inclu | --incl | --inc)
325     ac_prev=includedir ;;
326   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
327   | --includ=* | --inclu=* | --incl=* | --inc=*)
328     includedir="$ac_optarg" ;;
329
330   -infodir | --infodir | --infodi | --infod | --info | --inf)
331     ac_prev=infodir ;;
332   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
333     infodir="$ac_optarg" ;;
334
335   -libdir | --libdir | --libdi | --libd)
336     ac_prev=libdir ;;
337   -libdir=* | --libdir=* | --libdi=* | --libd=*)
338     libdir="$ac_optarg" ;;
339
340   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
341   | --libexe | --libex | --libe)
342     ac_prev=libexecdir ;;
343   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
344   | --libexe=* | --libex=* | --libe=*)
345     libexecdir="$ac_optarg" ;;
346
347   -localstatedir | --localstatedir | --localstatedi | --localstated \
348   | --localstate | --localstat | --localsta | --localst \
349   | --locals | --local | --loca | --loc | --lo)
350     ac_prev=localstatedir ;;
351   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
352   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
353   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
354     localstatedir="$ac_optarg" ;;
355
356   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
357     ac_prev=mandir ;;
358   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
359     mandir="$ac_optarg" ;;
360
361   -nfp | --nfp | --nf)
362     # Obsolete; use --without-fp.
363     with_fp=no ;;
364
365   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
366   | --no-cr | --no-c)
367     no_create=yes ;;
368
369   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
370   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
371     no_recursion=yes ;;
372
373   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
374   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
375   | --oldin | --oldi | --old | --ol | --o)
376     ac_prev=oldincludedir ;;
377   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
378   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
379   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
380     oldincludedir="$ac_optarg" ;;
381
382   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
383     ac_prev=prefix ;;
384   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
385     prefix="$ac_optarg" ;;
386
387   -program-prefix | --program-prefix | --program-prefi | --program-pref \
388   | --program-pre | --program-pr | --program-p)
389     ac_prev=program_prefix ;;
390   -program-prefix=* | --program-prefix=* | --program-prefi=* \
391   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
392     program_prefix="$ac_optarg" ;;
393
394   -program-suffix | --program-suffix | --program-suffi | --program-suff \
395   | --program-suf | --program-su | --program-s)
396     ac_prev=program_suffix ;;
397   -program-suffix=* | --program-suffix=* | --program-suffi=* \
398   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
399     program_suffix="$ac_optarg" ;;
400
401   -program-transform-name | --program-transform-name \
402   | --program-transform-nam | --program-transform-na \
403   | --program-transform-n | --program-transform- \
404   | --program-transform | --program-transfor \
405   | --program-transfo | --program-transf \
406   | --program-trans | --program-tran \
407   | --progr-tra | --program-tr | --program-t)
408     ac_prev=program_transform_name ;;
409   -program-transform-name=* | --program-transform-name=* \
410   | --program-transform-nam=* | --program-transform-na=* \
411   | --program-transform-n=* | --program-transform-=* \
412   | --program-transform=* | --program-transfor=* \
413   | --program-transfo=* | --program-transf=* \
414   | --program-trans=* | --program-tran=* \
415   | --progr-tra=* | --program-tr=* | --program-t=*)
416     program_transform_name="$ac_optarg" ;;
417
418   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
419   | -silent | --silent | --silen | --sile | --sil)
420     silent=yes ;;
421
422   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
423     ac_prev=sbindir ;;
424   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
425   | --sbi=* | --sb=*)
426     sbindir="$ac_optarg" ;;
427
428   -sharedstatedir | --sharedstatedir | --sharedstatedi \
429   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
430   | --sharedst | --shareds | --shared | --share | --shar \
431   | --sha | --sh)
432     ac_prev=sharedstatedir ;;
433   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
434   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
435   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
436   | --sha=* | --sh=*)
437     sharedstatedir="$ac_optarg" ;;
438
439   -site | --site | --sit)
440     ac_prev=site ;;
441   -site=* | --site=* | --sit=*)
442     site="$ac_optarg" ;;
443
444   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
445     ac_prev=srcdir ;;
446   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
447     srcdir="$ac_optarg" ;;
448
449   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
450   | --syscon | --sysco | --sysc | --sys | --sy)
451     ac_prev=sysconfdir ;;
452   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
453   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
454     sysconfdir="$ac_optarg" ;;
455
456   -target | --target | --targe | --targ | --tar | --ta | --t)
457     ac_prev=target ;;
458   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
459     target="$ac_optarg" ;;
460
461   -v | -verbose | --verbose | --verbos | --verbo | --verb)
462     verbose=yes ;;
463
464   -version | --version | --versio | --versi | --vers)
465     echo "configure generated by autoconf version 2.13.1"
466     exit 0 ;;
467
468   -with-* | --with-*)
469     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
470     # Reject names that are not valid shell variable names.
471     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
472       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
473     fi
474     ac_package=`echo $ac_package| sed 's/-/_/g'`
475     case "$ac_option" in
476       *=*) ;;
477       *) ac_optarg=yes ;;
478     esac
479     eval "with_${ac_package}='$ac_optarg'" ;;
480
481   -without-* | --without-*)
482     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
483     # Reject names that are not valid shell variable names.
484     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
485       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
486     fi
487     ac_package=`echo $ac_package| sed 's/-/_/g'`
488     eval "with_${ac_package}=no" ;;
489
490   --x)
491     # Obsolete; use --with-x.
492     with_x=yes ;;
493
494   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
495   | --x-incl | --x-inc | --x-in | --x-i)
496     ac_prev=x_includes ;;
497   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
498   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
499     x_includes="$ac_optarg" ;;
500
501   -x-libraries | --x-libraries | --x-librarie | --x-librari \
502   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
503     ac_prev=x_libraries ;;
504   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
505   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
506     x_libraries="$ac_optarg" ;;
507
508   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
509     ;;
510
511   *)
512     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
513       echo "configure: warning: $ac_option: invalid host type" 1>&2
514     fi
515     if test "x$nonopt" != xNONE; then
516       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
517     fi
518     nonopt="$ac_option"
519     ;;
520
521   esac
522 done
523
524 if test -n "$ac_prev"; then
525   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
526 fi
527
528 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
529
530 # File descriptor usage:
531 # 0 standard input
532 # 1 file creation
533 # 2 errors and warnings
534 # 3 some systems may open it to /dev/tty
535 # 4 used on the Kubota Titan
536 # 6 checking for... messages and results
537 # 5 compiler messages saved in config.log
538 if test "$silent" = yes; then
539   exec 6>/dev/null
540 else
541   exec 6>&1
542 fi
543 exec 5>./config.log
544
545 echo "\
546 This file contains any messages produced by compilers while
547 running configure, to aid debugging if configure makes a mistake.
548 " 1>&5
549
550 # Strip out --no-create and --no-recursion so they do not pile up.
551 # Also quote any args containing shell metacharacters.
552 ac_configure_args=
553 for ac_arg
554 do
555   case "$ac_arg" in
556   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
557   | --no-cr | --no-c) ;;
558   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
559   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
560   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
561   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
562   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
563   esac
564 done
565
566 # NLS nuisances.
567 # Only set these to C if already set.  These must not be set unconditionally
568 # because not all systems understand e.g. LANG=C (notably SCO).
569 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
570 # Non-C LC_CTYPE values break the ctype check.
571 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
572 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
573 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
574 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
575
576 # confdefs.h avoids OS command line length limits that DEFS can exceed.
577 rm -rf conftest* confdefs.h
578 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
579 echo > confdefs.h
580
581 # A filename unique to this package, relative to the directory that
582 # configure is in, which we can look for to find out if srcdir is correct.
583 ac_unique_file=build/version
584
585 # Find the source files, if location was not specified.
586 if test -z "$srcdir"; then
587   ac_srcdir_defaulted=yes
588   # Try the directory containing this script, then its parent.
589   ac_prog=$0
590   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
591   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
592   srcdir=$ac_confdir
593   if test ! -r $srcdir/$ac_unique_file; then
594     srcdir=..
595   fi
596 else
597   ac_srcdir_defaulted=no
598 fi
599 if test ! -r $srcdir/$ac_unique_file; then
600   if test "$ac_srcdir_defaulted" = yes; then
601     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
602   else
603     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
604   fi
605 fi
606 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
607
608 # Prefer explicitly selected file to automatically selected ones.
609 if test -z "$CONFIG_SITE"; then
610   if test "x$prefix" != xNONE; then
611     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
612   else
613     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
614   fi
615 fi
616 for ac_site_file in $CONFIG_SITE; do
617   if test -r "$ac_site_file"; then
618     echo "loading site script $ac_site_file"
619     . "$ac_site_file"
620   fi
621 done
622
623
624 ac_ext=c
625 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
626 ac_cpp='$CPP $CPPFLAGS'
627 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
628 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
629 cross_compiling=$ac_cv_prog_cc_cross
630
631 ac_exeext=
632 ac_objext=o
633 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
634   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
635   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
636     ac_n= ac_c='
637 ' ac_t='        '
638   else
639     ac_n=-n ac_c= ac_t=
640   fi
641 else
642   ac_n= ac_c='\c' ac_t=
643 fi
644
645 ac_aux_dir=
646 for ac_dir in build $srcdir/build; do
647   if test -f $ac_dir/install-sh; then
648     ac_aux_dir=$ac_dir
649     ac_install_sh="$ac_aux_dir/install-sh -c"
650     break
651   elif 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/shtool; then
656     ac_aux_dir=$ac_dir
657     ac_install_sh="$ac_aux_dir/shtool install -c"
658     break
659   fi
660 done
661 if test -z "$ac_aux_dir"; then
662   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
663 fi
664 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
665 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
666 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
667
668 OL_VERSION=`cat $ac_aux_dir/version`
669 if test -z "$OL_VERSION"; then
670         { echo "configure: error: could not determine version" 1>&2; exit 1; }
671 fi
672
673 echo "Configuring OpenLDAP $OL_VERSION ..."
674
675
676 echo $ac_n "checking host system type""... $ac_c" 1>&6
677 echo "configure:678: checking host system type" >&5
678 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
679
680 # Make sure we can run config.sub.
681   if $ac_config_sub sun4 >/dev/null 2>&1; then :
682     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
683   fi
684
685   ac_cv_host_alias=$host
686   case "$ac_cv_host_alias" in
687   NONE)
688     case $nonopt in
689     NONE)
690       if ac_cv_host_alias=`$ac_config_guess`; then :
691       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
692       fi ;;
693     *) ac_cv_host_alias=$nonopt ;;
694     esac ;;
695   esac
696
697   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
698   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
699   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
700   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
701 else
702   echo $ac_n "(cached) $ac_c" 1>&6
703 fi
704
705 echo "$ac_t""$ac_cv_host" 1>&6
706
707 host=$ac_cv_host
708 host_alias=$ac_cv_host_alias
709 host_cpu=$ac_cv_host_cpu
710 host_vendor=$ac_cv_host_vendor
711 host_os=$ac_cv_host_os
712
713
714
715
716
717 echo $ac_n "checking target system type""... $ac_c" 1>&6
718 echo "configure:719: checking target system type" >&5
719 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
720
721 # Make sure we can run config.sub.
722   if $ac_config_sub sun4 >/dev/null 2>&1; then :
723     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
724   fi
725
726   ac_cv_target_alias=$target
727   case "$ac_cv_target_alias" in
728   NONE)
729     case $nonopt in
730     NONE)
731       ac_cv_target_alias=$host_alias ;;
732
733     *) ac_cv_target_alias=$nonopt ;;
734     esac ;;
735   esac
736
737   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
738   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
739   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
740   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
741 else
742   echo $ac_n "(cached) $ac_c" 1>&6
743 fi
744
745 echo "$ac_t""$ac_cv_target" 1>&6
746
747 target=$ac_cv_target
748 target_alias=$ac_cv_target_alias
749 target_cpu=$ac_cv_target_cpu
750 target_vendor=$ac_cv_target_vendor
751 target_os=$ac_cv_target_os
752
753
754
755
756
757 echo $ac_n "checking build system type""... $ac_c" 1>&6
758 echo "configure:759: checking build system type" >&5
759 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
760
761 # Make sure we can run config.sub.
762   if $ac_config_sub sun4 >/dev/null 2>&1; then :
763     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
764   fi
765
766   ac_cv_build_alias=$build
767   case "$ac_cv_build_alias" in
768   NONE)
769     case $nonopt in
770     NONE)
771       ac_cv_build_alias=$host_alias ;;
772
773     *) ac_cv_build_alias=$nonopt ;;
774     esac ;;
775   esac
776
777   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
778   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
779   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
780   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
781 else
782   echo $ac_n "(cached) $ac_c" 1>&6
783 fi
784
785 echo "$ac_t""$ac_cv_build" 1>&6
786
787 build=$ac_cv_build
788 build_alias=$ac_cv_build_alias
789 build_cpu=$ac_cv_build_cpu
790 build_vendor=$ac_cv_build_vendor
791 build_os=$ac_cv_build_os
792
793
794
795
796
797 # Do some error checking and defaulting for the host and target type.
798 # The inputs are:
799 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
800 #
801 # The rules are:
802 # 1. You are not allowed to specify --host, --target, and nonopt at the
803 #    same time.
804 # 2. Host defaults to nonopt.
805 # 3. If nonopt is not specified, then host defaults to the current host,
806 #    as determined by config.guess.
807 # 4. Target and build default to nonopt.
808 # 5. If nonopt is not specified, then target and build default to host.
809
810 # The aliases save the names the user supplied, while $host etc.
811 # will get canonicalized.
812 case $host---$target---$nonopt in
813 NONE---*---* | *---NONE---* | *---*---NONE) ;;
814 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
815 esac
816
817 test "$host_alias" != "$target_alias" &&
818   test "$program_prefix$program_suffix$program_transform_name" = \
819     NONENONEs,x,x, &&
820   program_prefix=${target_alias}-
821
822
823 # Find a good install program.  We prefer a C program (faster),
824 # so one script is as good as another.  But avoid the broken or
825 # incompatible versions:
826 # SysV /etc/install, /usr/sbin/install
827 # SunOS /usr/etc/install
828 # IRIX /sbin/install
829 # AIX /bin/install
830 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
831 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
832 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
833 # ./install, which can be erroneously created by make from ./install.sh.
834 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
835 echo "configure:836: checking for a BSD compatible install" >&5
836 if test -z "$INSTALL"; then
837 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
838   echo $ac_n "(cached) $ac_c" 1>&6
839 else
840     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
841   for ac_dir in $PATH; do
842     # Account for people who put trailing slashes in PATH elements.
843     case "$ac_dir/" in
844     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
845     *)
846       # OSF1 and SCO ODT 3.0 have their own names for install.
847       # Don't use installbsd from OSF since it installs stuff as root
848       # by default.
849       for ac_prog in ginstall scoinst install; do
850         if test -f $ac_dir/$ac_prog; then
851           if test $ac_prog = install &&
852             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
853             # AIX install.  It has an incompatible calling convention.
854             :
855           elif test $ac_prog = install &&
856             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
857             # program-specific install script used by HP pwplus--don't use.
858             :
859           else
860             ac_cv_path_install="$ac_dir/$ac_prog -c"
861             break 2
862           fi
863         fi
864       done
865       ;;
866     esac
867   done
868   IFS="$ac_save_IFS"
869
870 fi
871   if test "${ac_cv_path_install+set}" = set; then
872     INSTALL="$ac_cv_path_install"
873   else
874     # As a last resort, use the slow shell script.  We don't cache a
875     # path for INSTALL within a source directory, because that will
876     # break other packages using the cache if that directory is
877     # removed, or if the path is relative.
878     INSTALL="$ac_install_sh"
879   fi
880 fi
881 echo "$ac_t""$INSTALL" 1>&6
882
883 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
884 # It thinks the first close brace ends the variable substitution.
885 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
886
887 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
888
889 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
890
891 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
892 echo "configure:893: checking whether build environment is sane" >&5
893 # Just in case
894 sleep 1
895 echo timestamp > conftestfile
896 # Do `set' in a subshell so we don't clobber the current shell's
897 # arguments.  Must try -L first in case configure is actually a
898 # symlink; some systems play weird games with the mod time of symlinks
899 # (eg FreeBSD returns the mod time of the symlink's containing
900 # directory).
901 if (
902    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
903    if test "$*" = "X"; then
904       # -L didn't work.
905       set X `ls -t $srcdir/configure conftestfile`
906    fi
907    if test "$*" != "X $srcdir/configure conftestfile" \
908       && test "$*" != "X conftestfile $srcdir/configure"; then
909
910       # If neither matched, then we have a broken ls.  This can happen
911       # if, for instance, CONFIG_SHELL is bash and it inherits a
912       # broken ls alias from the environment.  This has actually
913       # happened.  Such a system could not be considered "sane".
914       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
915 alias in your environment" 1>&2; exit 1; }
916    fi
917
918    test "$2" = conftestfile
919    )
920 then
921    # Ok.
922    :
923 else
924    { echo "configure: error: newly created file is older than distributed files!
925 Check your system clock" 1>&2; exit 1; }
926 fi
927 rm -f conftest*
928 echo "$ac_t""yes" 1>&6
929 if test "$program_transform_name" = s,x,x,; then
930   program_transform_name=
931 else
932   # Double any \ or $.  echo might interpret backslashes.
933   cat <<\EOF_SED > conftestsed
934 s,\\,\\\\,g; s,\$,$$,g
935 EOF_SED
936   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
937   rm -f conftestsed
938 fi
939 test "$program_prefix" != NONE &&
940   program_transform_name="s,^,${program_prefix},;$program_transform_name"
941 # Use a double $ so make ignores it.
942 test "$program_suffix" != NONE &&
943   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
944
945 # sed with no file args requires a program.
946 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
947
948 for ac_prog in mawk gawk nawk awk
949 do
950 # Extract the first word of "$ac_prog", so it can be a program name with args.
951 set dummy $ac_prog; ac_word=$2
952 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
953 echo "configure:954: checking for $ac_word" >&5
954 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
955   echo $ac_n "(cached) $ac_c" 1>&6
956 else
957   if test -n "$AWK"; then
958   ac_cv_prog_AWK="$AWK" # Let the user override the test.
959 else
960   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
961   ac_dummy="$PATH"
962   for ac_dir in $ac_dummy; do
963     test -z "$ac_dir" && ac_dir=.
964     if test -f $ac_dir/$ac_word; then
965       ac_cv_prog_AWK="$ac_prog"
966       break
967     fi
968   done
969   IFS="$ac_save_ifs"
970 fi
971 fi
972 AWK="$ac_cv_prog_AWK"
973 if test -n "$AWK"; then
974   echo "$ac_t""$AWK" 1>&6
975 else
976   echo "$ac_t""no" 1>&6
977 fi
978
979 test -n "$AWK" && break
980 done
981
982 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
983 echo "configure:984: checking whether ${MAKE-make} sets \${MAKE}" >&5
984 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
985 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
986   echo $ac_n "(cached) $ac_c" 1>&6
987 else
988   cat > conftestmake <<\EOF
989 all:
990         @echo 'ac_maketemp="${MAKE}"'
991 EOF
992 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
993 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
994 if test -n "$ac_maketemp"; then
995   eval ac_cv_prog_make_${ac_make}_set=yes
996 else
997   eval ac_cv_prog_make_${ac_make}_set=no
998 fi
999 rm -f conftestmake
1000 fi
1001 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1002   echo "$ac_t""yes" 1>&6
1003   SET_MAKE=
1004 else
1005   echo "$ac_t""no" 1>&6
1006   SET_MAKE="MAKE=${MAKE-make}"
1007 fi
1008
1009
1010
1011 PACKAGE=OpenLDAP
1012
1013 VERSION=$OL_VERSION
1014
1015 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1016   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1017 fi
1018
1019
1020
1021 missing_dir=`cd $ac_aux_dir && pwd`
1022 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1023 echo "configure:1024: checking for working aclocal" >&5
1024 # Run test in a subshell; some versions of sh will print an error if
1025 # an executable is not found, even if stderr is redirected.
1026 # Redirect stdin to placate older versions of autoconf.  Sigh.
1027 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1028    ACLOCAL=aclocal
1029    echo "$ac_t""found" 1>&6
1030 else
1031    ACLOCAL="$missing_dir/missing aclocal"
1032    echo "$ac_t""missing" 1>&6
1033 fi
1034
1035 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1036 echo "configure:1037: checking for working autoconf" >&5
1037 # Run test in a subshell; some versions of sh will print an error if
1038 # an executable is not found, even if stderr is redirected.
1039 # Redirect stdin to placate older versions of autoconf.  Sigh.
1040 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1041    AUTOCONF=autoconf
1042    echo "$ac_t""found" 1>&6
1043 else
1044    AUTOCONF="$missing_dir/missing autoconf"
1045    echo "$ac_t""missing" 1>&6
1046 fi
1047
1048 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1049 echo "configure:1050: checking for working automake" >&5
1050 # Run test in a subshell; some versions of sh will print an error if
1051 # an executable is not found, even if stderr is redirected.
1052 # Redirect stdin to placate older versions of autoconf.  Sigh.
1053 if (automake --version) < /dev/null > /dev/null 2>&1; then
1054    AUTOMAKE=automake
1055    echo "$ac_t""found" 1>&6
1056 else
1057    AUTOMAKE="$missing_dir/missing automake"
1058    echo "$ac_t""missing" 1>&6
1059 fi
1060
1061 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1062 echo "configure:1063: checking for working autoheader" >&5
1063 # Run test in a subshell; some versions of sh will print an error if
1064 # an executable is not found, even if stderr is redirected.
1065 # Redirect stdin to placate older versions of autoconf.  Sigh.
1066 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1067    AUTOHEADER=autoheader
1068    echo "$ac_t""found" 1>&6
1069 else
1070    AUTOHEADER="$missing_dir/missing autoheader"
1071    echo "$ac_t""missing" 1>&6
1072 fi
1073
1074 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1075 echo "configure:1076: checking for working makeinfo" >&5
1076 # Run test in a subshell; some versions of sh will print an error if
1077 # an executable is not found, even if stderr is redirected.
1078 # Redirect stdin to placate older versions of autoconf.  Sigh.
1079 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1080    MAKEINFO=makeinfo
1081    echo "$ac_t""found" 1>&6
1082 else
1083    MAKEINFO="$missing_dir/missing makeinfo"
1084    echo "$ac_t""missing" 1>&6
1085 fi
1086
1087 install_sh="$missing_dir/install-sh"
1088 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1089
1090 for ac_prog in gnutar gtar tar
1091 do
1092 # Extract the first word of "$ac_prog", so it can be a program name with args.
1093 set dummy $ac_prog; ac_word=$2
1094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1095 echo "configure:1096: checking for $ac_word" >&5
1096 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1097   echo $ac_n "(cached) $ac_c" 1>&6
1098 else
1099   if test -n "$AMTAR"; then
1100   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1101 else
1102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1103   ac_dummy="$PATH"
1104   for ac_dir in $ac_dummy; do
1105     test -z "$ac_dir" && ac_dir=.
1106     if test -f $ac_dir/$ac_word; then
1107       ac_cv_prog_AMTAR="$ac_prog"
1108       break
1109     fi
1110   done
1111   IFS="$ac_save_ifs"
1112 fi
1113 fi
1114 AMTAR="$ac_cv_prog_AMTAR"
1115 if test -n "$AMTAR"; then
1116   echo "$ac_t""$AMTAR" 1>&6
1117 else
1118   echo "$ac_t""no" 1>&6
1119 fi
1120
1121 test -n "$AMTAR" && break
1122 done
1123
1124
1125 AMTARFLAGS=
1126 if test -n "$AMTAR"; then
1127   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1128         AMTARFLAGS=o
1129   fi
1130 fi
1131
1132
1133
1134 cat >> confdefs.h <<EOF
1135 #define OPENLDAP_PACKAGE "$PACKAGE"
1136 EOF
1137
1138 cat >> confdefs.h <<EOF
1139 #define OPENLDAP_VERSION "$VERSION"
1140 EOF
1141
1142
1143
1144
1145 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1146 echo "configure:1147: checking configure arguments" >&5
1147
1148
1149 top_builddir=`pwd`
1150
1151 ldap_subdir="/openldap"
1152
1153 # Check whether --with-subdir or --without-subdir was given.
1154 if test "${with_subdir+set}" = set; then
1155   withval="$with_subdir"
1156   case "$withval" in
1157         no) ldap_subdir=""
1158                 ;;
1159         yes)
1160                 ;;
1161         /*|\\*)
1162                 ldap_subdir="$withval"
1163                 ;;
1164         *)
1165                 ldap_subdir="/$withval"
1166                 ;;
1167 esac
1168
1169 fi
1170
1171
1172 # OpenLDAP --enable-debug
1173         # Check whether --enable-debug or --disable-debug was given.
1174 if test "${enable_debug+set}" = set; then
1175   enableval="$enable_debug"
1176   
1177         ol_arg=invalid
1178         for ol_val in auto yes no ; do
1179                 if test "$enableval" = "$ol_val" ; then
1180                         ol_arg="$ol_val"
1181                 fi
1182         done
1183         if test "$ol_arg" = "invalid" ; then
1184                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1185         fi
1186         ol_enable_debug="$ol_arg"
1187
1188 else
1189         ol_enable_debug="yes"
1190 fi
1191 # end --enable-debug
1192 # OpenLDAP --enable-syslog
1193         # Check whether --enable-syslog or --disable-syslog was given.
1194 if test "${enable_syslog+set}" = set; then
1195   enableval="$enable_syslog"
1196   
1197         ol_arg=invalid
1198         for ol_val in auto yes no ; do
1199                 if test "$enableval" = "$ol_val" ; then
1200                         ol_arg="$ol_val"
1201                 fi
1202         done
1203         if test "$ol_arg" = "invalid" ; then
1204                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1205         fi
1206         ol_enable_syslog="$ol_arg"
1207
1208 else
1209         ol_enable_syslog="auto"
1210 fi
1211 # end --enable-syslog
1212 # OpenLDAP --enable-proctitle
1213         # Check whether --enable-proctitle or --disable-proctitle was given.
1214 if test "${enable_proctitle+set}" = set; then
1215   enableval="$enable_proctitle"
1216   
1217         ol_arg=invalid
1218         for ol_val in auto yes no ; do
1219                 if test "$enableval" = "$ol_val" ; then
1220                         ol_arg="$ol_val"
1221                 fi
1222         done
1223         if test "$ol_arg" = "invalid" ; then
1224                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1225         fi
1226         ol_enable_proctitle="$ol_arg"
1227
1228 else
1229         ol_enable_proctitle="yes"
1230 fi
1231 # end --enable-proctitle
1232 # OpenLDAP --enable-cache
1233         # Check whether --enable-cache or --disable-cache was given.
1234 if test "${enable_cache+set}" = set; then
1235   enableval="$enable_cache"
1236   
1237         ol_arg=invalid
1238         for ol_val in auto yes no ; do
1239                 if test "$enableval" = "$ol_val" ; then
1240                         ol_arg="$ol_val"
1241                 fi
1242         done
1243         if test "$ol_arg" = "invalid" ; then
1244                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1245         fi
1246         ol_enable_cache="$ol_arg"
1247
1248 else
1249         ol_enable_cache="yes"
1250 fi
1251 # end --enable-cache
1252 # OpenLDAP --enable-dns
1253         # Check whether --enable-dns or --disable-dns was given.
1254 if test "${enable_dns+set}" = set; then
1255   enableval="$enable_dns"
1256   
1257         ol_arg=invalid
1258         for ol_val in auto yes no ; do
1259                 if test "$enableval" = "$ol_val" ; then
1260                         ol_arg="$ol_val"
1261                 fi
1262         done
1263         if test "$ol_arg" = "invalid" ; then
1264                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1265         fi
1266         ol_enable_dns="$ol_arg"
1267
1268 else
1269         ol_enable_dns="no"
1270 fi
1271 # end --enable-dns
1272 # OpenLDAP --enable-referrals
1273         # Check whether --enable-referrals or --disable-referrals was given.
1274 if test "${enable_referrals+set}" = set; then
1275   enableval="$enable_referrals"
1276   
1277         ol_arg=invalid
1278         for ol_val in auto yes no ; do
1279                 if test "$enableval" = "$ol_val" ; then
1280                         ol_arg="$ol_val"
1281                 fi
1282         done
1283         if test "$ol_arg" = "invalid" ; then
1284                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1285         fi
1286         ol_enable_referrals="$ol_arg"
1287
1288 else
1289         ol_enable_referrals="yes"
1290 fi
1291 # end --enable-referrals
1292 # OpenLDAP --enable-kbind
1293         # Check whether --enable-kbind or --disable-kbind was given.
1294 if test "${enable_kbind+set}" = set; then
1295   enableval="$enable_kbind"
1296   
1297         ol_arg=invalid
1298         for ol_val in auto yes no ; do
1299                 if test "$enableval" = "$ol_val" ; then
1300                         ol_arg="$ol_val"
1301                 fi
1302         done
1303         if test "$ol_arg" = "invalid" ; then
1304                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1305         fi
1306         ol_enable_kbind="$ol_arg"
1307
1308 else
1309         ol_enable_kbind="auto"
1310 fi
1311 # end --enable-kbind
1312 # OpenLDAP --enable-cldap
1313         # Check whether --enable-cldap or --disable-cldap was given.
1314 if test "${enable_cldap+set}" = set; then
1315   enableval="$enable_cldap"
1316   
1317         ol_arg=invalid
1318         for ol_val in auto yes no ; do
1319                 if test "$enableval" = "$ol_val" ; then
1320                         ol_arg="$ol_val"
1321                 fi
1322         done
1323         if test "$ol_arg" = "invalid" ; then
1324                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1325         fi
1326         ol_enable_cldap="$ol_arg"
1327
1328 else
1329         ol_enable_cldap="no"
1330 fi
1331 # end --enable-cldap
1332 # OpenLDAP --enable-ldapi
1333         # Check whether --enable-ldapi or --disable-ldapi was given.
1334 if test "${enable_ldapi+set}" = set; then
1335   enableval="$enable_ldapi"
1336   
1337         ol_arg=invalid
1338         for ol_val in auto yes no ; do
1339                 if test "$enableval" = "$ol_val" ; then
1340                         ol_arg="$ol_val"
1341                 fi
1342         done
1343         if test "$ol_arg" = "invalid" ; then
1344                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1345         fi
1346         ol_enable_ldapi="$ol_arg"
1347
1348 else
1349         ol_enable_ldapi="no"
1350 fi
1351 # end --enable-ldapi
1352 # OpenLDAP --enable-x_compile
1353         # Check whether --enable-x_compile or --disable-x_compile was given.
1354 if test "${enable_x_compile+set}" = set; then
1355   enableval="$enable_x_compile"
1356   
1357         ol_arg=invalid
1358         for ol_val in yes no ; do
1359                 if test "$enableval" = "$ol_val" ; then
1360                         ol_arg="$ol_val"
1361                 fi
1362         done
1363         if test "$ol_arg" = "invalid" ; then
1364                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1365         fi
1366         ol_enable_x_compile="$ol_arg"
1367
1368 else
1369         ol_enable_x_compile="no"
1370 fi
1371 # end --enable-x_compile
1372
1373 # OpenLDAP --enable-dmalloc
1374         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1375 if test "${enable_dmalloc+set}" = set; then
1376   enableval="$enable_dmalloc"
1377   
1378         ol_arg=invalid
1379         for ol_val in auto yes no ; do
1380                 if test "$enableval" = "$ol_val" ; then
1381                         ol_arg="$ol_val"
1382                 fi
1383         done
1384         if test "$ol_arg" = "invalid" ; then
1385                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1386         fi
1387         ol_enable_dmalloc="$ol_arg"
1388
1389 else
1390         ol_enable_dmalloc="no"
1391 fi
1392 # end --enable-dmalloc
1393
1394 # OpenLDAP --with-cyrus_sasl
1395         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1396 if test "${with_cyrus_sasl+set}" = set; then
1397   withval="$with_cyrus_sasl"
1398   
1399         ol_arg=invalid
1400         for ol_val in auto yes no  ; do
1401                 if test "$withval" = "$ol_val" ; then
1402                         ol_arg="$ol_val"
1403                 fi
1404         done
1405         if test "$ol_arg" = "invalid" ; then
1406                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1407         fi
1408         ol_with_cyrus_sasl="$ol_arg"
1409
1410 else
1411         ol_with_cyrus_sasl="auto"
1412 fi
1413 # end --with-cyrus_sasl
1414
1415 # OpenLDAP --with-fetch
1416         # Check whether --with-fetch or --without-fetch was given.
1417 if test "${with_fetch+set}" = set; then
1418   withval="$with_fetch"
1419   
1420         ol_arg=invalid
1421         for ol_val in auto yes no  ; do
1422                 if test "$withval" = "$ol_val" ; then
1423                         ol_arg="$ol_val"
1424                 fi
1425         done
1426         if test "$ol_arg" = "invalid" ; then
1427                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1428         fi
1429         ol_with_fetch="$ol_arg"
1430
1431 else
1432         ol_with_fetch="auto"
1433 fi
1434 # end --with-fetch
1435
1436 # OpenLDAP --with-kerberos
1437         # Check whether --with-kerberos or --without-kerberos was given.
1438 if test "${with_kerberos+set}" = set; then
1439   withval="$with_kerberos"
1440   
1441         ol_arg=invalid
1442         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1443                 if test "$withval" = "$ol_val" ; then
1444                         ol_arg="$ol_val"
1445                 fi
1446         done
1447         if test "$ol_arg" = "invalid" ; then
1448                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1449         fi
1450         ol_with_kerberos="$ol_arg"
1451
1452 else
1453         ol_with_kerberos="auto"
1454 fi
1455 # end --with-kerberos
1456
1457 # OpenLDAP --with-readline
1458         # Check whether --with-readline or --without-readline was given.
1459 if test "${with_readline+set}" = set; then
1460   withval="$with_readline"
1461   
1462         ol_arg=invalid
1463         for ol_val in auto yes no  ; do
1464                 if test "$withval" = "$ol_val" ; then
1465                         ol_arg="$ol_val"
1466                 fi
1467         done
1468         if test "$ol_arg" = "invalid" ; then
1469                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1470         fi
1471         ol_with_readline="$ol_arg"
1472
1473 else
1474         ol_with_readline="auto"
1475 fi
1476 # end --with-readline
1477
1478 # OpenLDAP --with-threads
1479         # Check whether --with-threads or --without-threads was given.
1480 if test "${with_threads+set}" = set; then
1481   withval="$with_threads"
1482   
1483         ol_arg=invalid
1484         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1485                 if test "$withval" = "$ol_val" ; then
1486                         ol_arg="$ol_val"
1487                 fi
1488         done
1489         if test "$ol_arg" = "invalid" ; then
1490                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1491         fi
1492         ol_with_threads="$ol_arg"
1493
1494 else
1495         ol_with_threads="auto"
1496 fi
1497 # end --with-threads
1498
1499 # OpenLDAP --with-tls
1500         # Check whether --with-tls or --without-tls was given.
1501 if test "${with_tls+set}" = set; then
1502   withval="$with_tls"
1503   
1504         ol_arg=invalid
1505         for ol_val in auto ssleay openssl yes no  ; do
1506                 if test "$withval" = "$ol_val" ; then
1507                         ol_arg="$ol_val"
1508                 fi
1509         done
1510         if test "$ol_arg" = "invalid" ; then
1511                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1512         fi
1513         ol_with_tls="$ol_arg"
1514
1515 else
1516         ol_with_tls="auto"
1517 fi
1518 # end --with-tls
1519
1520 # OpenLDAP --with-yielding_select
1521         # Check whether --with-yielding_select or --without-yielding_select was given.
1522 if test "${with_yielding_select+set}" = set; then
1523   withval="$with_yielding_select"
1524   
1525         ol_arg=invalid
1526         for ol_val in auto yes no manual  ; do
1527                 if test "$withval" = "$ol_val" ; then
1528                         ol_arg="$ol_val"
1529                 fi
1530         done
1531         if test "$ol_arg" = "invalid" ; then
1532                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1533         fi
1534         ol_with_yielding_select="$ol_arg"
1535
1536 else
1537         ol_with_yielding_select="auto"
1538 fi
1539 # end --with-yielding_select
1540
1541
1542 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1543 if test "${with_xxldapdoptions+set}" = set; then
1544   withval="$with_xxldapdoptions"
1545   :
1546 fi
1547
1548 # OpenLDAP --enable-ldapd
1549         # Check whether --enable-ldapd or --disable-ldapd was given.
1550 if test "${enable_ldapd+set}" = set; then
1551   enableval="$enable_ldapd"
1552   
1553         ol_arg=invalid
1554         for ol_val in auto yes no ; do
1555                 if test "$enableval" = "$ol_val" ; then
1556                         ol_arg="$ol_val"
1557                 fi
1558         done
1559         if test "$ol_arg" = "invalid" ; then
1560                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1561         fi
1562         ol_enable_ldapd="$ol_arg"
1563
1564 else
1565         ol_enable_ldapd="no"
1566 fi
1567 # end --enable-ldapd
1568
1569 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1570 if test "${with_xxslapdoptions+set}" = set; then
1571   withval="$with_xxslapdoptions"
1572   :
1573 fi
1574
1575 # OpenLDAP --enable-slapd
1576         # Check whether --enable-slapd or --disable-slapd was given.
1577 if test "${enable_slapd+set}" = set; then
1578   enableval="$enable_slapd"
1579   
1580         ol_arg=invalid
1581         for ol_val in auto yes no ; do
1582                 if test "$enableval" = "$ol_val" ; then
1583                         ol_arg="$ol_val"
1584                 fi
1585         done
1586         if test "$ol_arg" = "invalid" ; then
1587                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1588         fi
1589         ol_enable_slapd="$ol_arg"
1590
1591 else
1592         ol_enable_slapd="yes"
1593 fi
1594 # end --enable-slapd
1595 # OpenLDAP --enable-cleartext
1596         # Check whether --enable-cleartext or --disable-cleartext was given.
1597 if test "${enable_cleartext+set}" = set; then
1598   enableval="$enable_cleartext"
1599   
1600         ol_arg=invalid
1601         for ol_val in auto yes no ; do
1602                 if test "$enableval" = "$ol_val" ; then
1603                         ol_arg="$ol_val"
1604                 fi
1605         done
1606         if test "$ol_arg" = "invalid" ; then
1607                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1608         fi
1609         ol_enable_cleartext="$ol_arg"
1610
1611 else
1612         ol_enable_cleartext="yes"
1613 fi
1614 # end --enable-cleartext
1615 # OpenLDAP --enable-crypt
1616         # Check whether --enable-crypt or --disable-crypt was given.
1617 if test "${enable_crypt+set}" = set; then
1618   enableval="$enable_crypt"
1619   
1620         ol_arg=invalid
1621         for ol_val in auto yes no ; do
1622                 if test "$enableval" = "$ol_val" ; then
1623                         ol_arg="$ol_val"
1624                 fi
1625         done
1626         if test "$ol_arg" = "invalid" ; then
1627                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1628         fi
1629         ol_enable_crypt="$ol_arg"
1630
1631 else
1632         ol_enable_crypt="auto"
1633 fi
1634 # end --enable-crypt
1635 # OpenLDAP --enable-kpasswd
1636         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1637 if test "${enable_kpasswd+set}" = set; then
1638   enableval="$enable_kpasswd"
1639   
1640         ol_arg=invalid
1641         for ol_val in auto yes no ; do
1642                 if test "$enableval" = "$ol_val" ; then
1643                         ol_arg="$ol_val"
1644                 fi
1645         done
1646         if test "$ol_arg" = "invalid" ; then
1647                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1648         fi
1649         ol_enable_kpasswd="$ol_arg"
1650
1651 else
1652         ol_enable_kpasswd="no"
1653 fi
1654 # end --enable-kpasswd
1655 # OpenLDAP --enable-modules
1656         # Check whether --enable-modules or --disable-modules was given.
1657 if test "${enable_modules+set}" = set; then
1658   enableval="$enable_modules"
1659   
1660         ol_arg=invalid
1661         for ol_val in auto yes no ; do
1662                 if test "$enableval" = "$ol_val" ; then
1663                         ol_arg="$ol_val"
1664                 fi
1665         done
1666         if test "$ol_arg" = "invalid" ; then
1667                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1668         fi
1669         ol_enable_modules="$ol_arg"
1670
1671 else
1672         ol_enable_modules="no"
1673 fi
1674 # end --enable-modules
1675 # OpenLDAP --enable-multimaster
1676         # Check whether --enable-multimaster or --disable-multimaster was given.
1677 if test "${enable_multimaster+set}" = set; then
1678   enableval="$enable_multimaster"
1679   
1680         ol_arg=invalid
1681         for ol_val in auto yes no ; do
1682                 if test "$enableval" = "$ol_val" ; then
1683                         ol_arg="$ol_val"
1684                 fi
1685         done
1686         if test "$ol_arg" = "invalid" ; then
1687                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1688         fi
1689         ol_enable_multimaster="$ol_arg"
1690
1691 else
1692         ol_enable_multimaster="no"
1693 fi
1694 # end --enable-multimaster
1695 # OpenLDAP --enable-phonetic
1696         # Check whether --enable-phonetic or --disable-phonetic was given.
1697 if test "${enable_phonetic+set}" = set; then
1698   enableval="$enable_phonetic"
1699   
1700         ol_arg=invalid
1701         for ol_val in auto yes no ; do
1702                 if test "$enableval" = "$ol_val" ; then
1703                         ol_arg="$ol_val"
1704                 fi
1705         done
1706         if test "$ol_arg" = "invalid" ; then
1707                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1708         fi
1709         ol_enable_phonetic="$ol_arg"
1710
1711 else
1712         ol_enable_phonetic="no"
1713 fi
1714 # end --enable-phonetic
1715 # OpenLDAP --enable-quipu
1716         # Check whether --enable-quipu or --disable-quipu was given.
1717 if test "${enable_quipu+set}" = set; then
1718   enableval="$enable_quipu"
1719   
1720         ol_arg=invalid
1721         for ol_val in auto yes no ; do
1722                 if test "$enableval" = "$ol_val" ; then
1723                         ol_arg="$ol_val"
1724                 fi
1725         done
1726         if test "$ol_arg" = "invalid" ; then
1727                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1728         fi
1729         ol_enable_quipu="$ol_arg"
1730
1731 else
1732         ol_enable_quipu="no"
1733 fi
1734 # end --enable-quipu
1735 # OpenLDAP --enable-rlookups
1736         # Check whether --enable-rlookups or --disable-rlookups was given.
1737 if test "${enable_rlookups+set}" = set; then
1738   enableval="$enable_rlookups"
1739   
1740         ol_arg=invalid
1741         for ol_val in auto yes no ; do
1742                 if test "$enableval" = "$ol_val" ; then
1743                         ol_arg="$ol_val"
1744                 fi
1745         done
1746         if test "$ol_arg" = "invalid" ; then
1747                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1748         fi
1749         ol_enable_rlookups="$ol_arg"
1750
1751 else
1752         ol_enable_rlookups="auto"
1753 fi
1754 # end --enable-rlookups
1755 # OpenLDAP --enable-aci
1756         # Check whether --enable-aci or --disable-aci was given.
1757 if test "${enable_aci+set}" = set; then
1758   enableval="$enable_aci"
1759   
1760         ol_arg=invalid
1761         for ol_val in auto yes no ; do
1762                 if test "$enableval" = "$ol_val" ; then
1763                         ol_arg="$ol_val"
1764                 fi
1765         done
1766         if test "$ol_arg" = "invalid" ; then
1767                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1768         fi
1769         ol_enable_aci="$ol_arg"
1770
1771 else
1772         ol_enable_aci="no"
1773 fi
1774 # end --enable-aci
1775 # OpenLDAP --enable-wrappers
1776         # Check whether --enable-wrappers or --disable-wrappers was given.
1777 if test "${enable_wrappers+set}" = set; then
1778   enableval="$enable_wrappers"
1779   
1780         ol_arg=invalid
1781         for ol_val in auto yes no ; do
1782                 if test "$enableval" = "$ol_val" ; then
1783                         ol_arg="$ol_val"
1784                 fi
1785         done
1786         if test "$ol_arg" = "invalid" ; then
1787                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1788         fi
1789         ol_enable_wrappers="$ol_arg"
1790
1791 else
1792         ol_enable_wrappers="no"
1793 fi
1794 # end --enable-wrappers
1795 # OpenLDAP --enable-dynamic
1796         # Check whether --enable-dynamic or --disable-dynamic was given.
1797 if test "${enable_dynamic+set}" = set; then
1798   enableval="$enable_dynamic"
1799   
1800         ol_arg=invalid
1801         for ol_val in auto yes no ; do
1802                 if test "$enableval" = "$ol_val" ; then
1803                         ol_arg="$ol_val"
1804                 fi
1805         done
1806         if test "$ol_arg" = "invalid" ; then
1807                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1808         fi
1809         ol_enable_dynamic="$ol_arg"
1810
1811 else
1812         ol_enable_dynamic="no"
1813 fi
1814 # end --enable-dynamic
1815
1816 # OpenLDAP --enable-bdb2
1817         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1818 if test "${enable_bdb2+set}" = set; then
1819   enableval="$enable_bdb2"
1820   
1821         ol_arg=invalid
1822         for ol_val in auto yes no ; do
1823                 if test "$enableval" = "$ol_val" ; then
1824                         ol_arg="$ol_val"
1825                 fi
1826         done
1827         if test "$ol_arg" = "invalid" ; then
1828                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1829         fi
1830         ol_enable_bdb2="$ol_arg"
1831
1832 else
1833         ol_enable_bdb2="no"
1834 fi
1835 # end --enable-bdb2
1836 # OpenLDAP --with-bdb2_module
1837         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1838 if test "${with_bdb2_module+set}" = set; then
1839   withval="$with_bdb2_module"
1840   
1841         ol_arg=invalid
1842         for ol_val in static dynamic ; do
1843                 if test "$withval" = "$ol_val" ; then
1844                         ol_arg="$ol_val"
1845                 fi
1846         done
1847         if test "$ol_arg" = "invalid" ; then
1848                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1849         fi
1850         ol_with_bdb2_module="$ol_arg"
1851
1852 else
1853         ol_with_bdb2_module="static"
1854 fi
1855 # end --with-bdb2_module
1856
1857 # OpenLDAP --enable-ldap
1858         # Check whether --enable-ldap or --disable-ldap was given.
1859 if test "${enable_ldap+set}" = set; then
1860   enableval="$enable_ldap"
1861   
1862         ol_arg=invalid
1863         for ol_val in auto yes no ; do
1864                 if test "$enableval" = "$ol_val" ; then
1865                         ol_arg="$ol_val"
1866                 fi
1867         done
1868         if test "$ol_arg" = "invalid" ; then
1869                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1870         fi
1871         ol_enable_ldap="$ol_arg"
1872
1873 else
1874         ol_enable_ldap="no"
1875 fi
1876 # end --enable-ldap
1877 # OpenLDAP --with-ldap_module
1878         # Check whether --with-ldap_module or --without-ldap_module was given.
1879 if test "${with_ldap_module+set}" = set; then
1880   withval="$with_ldap_module"
1881   
1882         ol_arg=invalid
1883         for ol_val in static dynamic ; do
1884                 if test "$withval" = "$ol_val" ; then
1885                         ol_arg="$ol_val"
1886                 fi
1887         done
1888         if test "$ol_arg" = "invalid" ; then
1889                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1890         fi
1891         ol_with_ldap_module="$ol_arg"
1892
1893 else
1894         ol_with_ldap_module="static"
1895 fi
1896 # end --with-ldap_module
1897
1898 # OpenLDAP --enable-ldbm
1899         # Check whether --enable-ldbm or --disable-ldbm was given.
1900 if test "${enable_ldbm+set}" = set; then
1901   enableval="$enable_ldbm"
1902   
1903         ol_arg=invalid
1904         for ol_val in auto yes no ; do
1905                 if test "$enableval" = "$ol_val" ; then
1906                         ol_arg="$ol_val"
1907                 fi
1908         done
1909         if test "$ol_arg" = "invalid" ; then
1910                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1911         fi
1912         ol_enable_ldbm="$ol_arg"
1913
1914 else
1915         ol_enable_ldbm="yes"
1916 fi
1917 # end --enable-ldbm
1918 # OpenLDAP --with-ldbm_api
1919         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1920 if test "${with_ldbm_api+set}" = set; then
1921   withval="$with_ldbm_api"
1922   
1923         ol_arg=invalid
1924         for ol_val in auto db2 db mdbm gdbm manual ; do
1925                 if test "$withval" = "$ol_val" ; then
1926                         ol_arg="$ol_val"
1927                 fi
1928         done
1929         if test "$ol_arg" = "invalid" ; then
1930                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1931         fi
1932         ol_with_ldbm_api="$ol_arg"
1933
1934 else
1935         ol_with_ldbm_api="auto"
1936 fi
1937 # end --with-ldbm_api
1938
1939 # OpenLDAP --with-ldbm_module
1940         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1941 if test "${with_ldbm_module+set}" = set; then
1942   withval="$with_ldbm_module"
1943   
1944         ol_arg=invalid
1945         for ol_val in static dynamic ; do
1946                 if test "$withval" = "$ol_val" ; then
1947                         ol_arg="$ol_val"
1948                 fi
1949         done
1950         if test "$ol_arg" = "invalid" ; then
1951                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1952         fi
1953         ol_with_ldbm_module="$ol_arg"
1954
1955 else
1956         ol_with_ldbm_module="static"
1957 fi
1958 # end --with-ldbm_module
1959
1960 # OpenLDAP --with-ldbm_type
1961         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1962 if test "${with_ldbm_type+set}" = set; then
1963   withval="$with_ldbm_type"
1964   
1965         ol_arg=invalid
1966         for ol_val in auto btree hash ; do
1967                 if test "$withval" = "$ol_val" ; then
1968                         ol_arg="$ol_val"
1969                 fi
1970         done
1971         if test "$ol_arg" = "invalid" ; then
1972                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1973         fi
1974         ol_with_ldbm_type="$ol_arg"
1975
1976 else
1977         ol_with_ldbm_type="auto"
1978 fi
1979 # end --with-ldbm_type
1980
1981
1982 # OpenLDAP --enable-passwd
1983         # Check whether --enable-passwd or --disable-passwd was given.
1984 if test "${enable_passwd+set}" = set; then
1985   enableval="$enable_passwd"
1986   
1987         ol_arg=invalid
1988         for ol_val in auto yes no ; do
1989                 if test "$enableval" = "$ol_val" ; then
1990                         ol_arg="$ol_val"
1991                 fi
1992         done
1993         if test "$ol_arg" = "invalid" ; then
1994                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1995         fi
1996         ol_enable_passwd="$ol_arg"
1997
1998 else
1999         ol_enable_passwd="no"
2000 fi
2001 # end --enable-passwd
2002 # OpenLDAP --with-passwd_module
2003         # Check whether --with-passwd_module or --without-passwd_module was given.
2004 if test "${with_passwd_module+set}" = set; then
2005   withval="$with_passwd_module"
2006   
2007         ol_arg=invalid
2008         for ol_val in static dynamic ; do
2009                 if test "$withval" = "$ol_val" ; then
2010                         ol_arg="$ol_val"
2011                 fi
2012         done
2013         if test "$ol_arg" = "invalid" ; then
2014                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2015         fi
2016         ol_with_passwd_module="$ol_arg"
2017
2018 else
2019         ol_with_passwd_module="static"
2020 fi
2021 # end --with-passwd_module
2022
2023 # OpenLDAP --enable-perl
2024         # Check whether --enable-perl or --disable-perl was given.
2025 if test "${enable_perl+set}" = set; then
2026   enableval="$enable_perl"
2027   
2028         ol_arg=invalid
2029         for ol_val in auto yes no ; do
2030                 if test "$enableval" = "$ol_val" ; then
2031                         ol_arg="$ol_val"
2032                 fi
2033         done
2034         if test "$ol_arg" = "invalid" ; then
2035                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2036         fi
2037         ol_enable_perl="$ol_arg"
2038
2039 else
2040         ol_enable_perl="no"
2041 fi
2042 # end --enable-perl
2043 # OpenLDAP --with-perl_module
2044         # Check whether --with-perl_module or --without-perl_module was given.
2045 if test "${with_perl_module+set}" = set; then
2046   withval="$with_perl_module"
2047   
2048         ol_arg=invalid
2049         for ol_val in static dynamic ; do
2050                 if test "$withval" = "$ol_val" ; then
2051                         ol_arg="$ol_val"
2052                 fi
2053         done
2054         if test "$ol_arg" = "invalid" ; then
2055                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2056         fi
2057         ol_with_perl_module="$ol_arg"
2058
2059 else
2060         ol_with_perl_module="static"
2061 fi
2062 # end --with-perl_module
2063
2064 # OpenLDAP --enable-shell
2065         # Check whether --enable-shell or --disable-shell was given.
2066 if test "${enable_shell+set}" = set; then
2067   enableval="$enable_shell"
2068   
2069         ol_arg=invalid
2070         for ol_val in auto yes no ; do
2071                 if test "$enableval" = "$ol_val" ; then
2072                         ol_arg="$ol_val"
2073                 fi
2074         done
2075         if test "$ol_arg" = "invalid" ; then
2076                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2077         fi
2078         ol_enable_shell="$ol_arg"
2079
2080 else
2081         ol_enable_shell="no"
2082 fi
2083 # end --enable-shell
2084 # OpenLDAP --with-shell_module
2085         # Check whether --with-shell_module or --without-shell_module was given.
2086 if test "${with_shell_module+set}" = set; then
2087   withval="$with_shell_module"
2088   
2089         ol_arg=invalid
2090         for ol_val in static dynamic ; do
2091                 if test "$withval" = "$ol_val" ; then
2092                         ol_arg="$ol_val"
2093                 fi
2094         done
2095         if test "$ol_arg" = "invalid" ; then
2096                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2097         fi
2098         ol_with_shell_module="$ol_arg"
2099
2100 else
2101         ol_with_shell_module="static"
2102 fi
2103 # end --with-shell_module
2104
2105 # OpenLDAP --enable-tcl
2106         # Check whether --enable-tcl or --disable-tcl was given.
2107 if test "${enable_tcl+set}" = set; then
2108   enableval="$enable_tcl"
2109   
2110         ol_arg=invalid
2111         for ol_val in auto yes no ; do
2112                 if test "$enableval" = "$ol_val" ; then
2113                         ol_arg="$ol_val"
2114                 fi
2115         done
2116         if test "$ol_arg" = "invalid" ; then
2117                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2118         fi
2119         ol_enable_tcl="$ol_arg"
2120
2121 else
2122         ol_enable_tcl="no"
2123 fi
2124 # end --enable-tcl
2125 # OpenLDAP --with-tcl_module
2126         # Check whether --with-tcl_module or --without-tcl_module was given.
2127 if test "${with_tcl_module+set}" = set; then
2128   withval="$with_tcl_module"
2129   
2130         ol_arg=invalid
2131         for ol_val in static dynamic ; do
2132                 if test "$withval" = "$ol_val" ; then
2133                         ol_arg="$ol_val"
2134                 fi
2135         done
2136         if test "$ol_arg" = "invalid" ; then
2137                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2138         fi
2139         ol_with_tcl_module="$ol_arg"
2140
2141 else
2142         ol_with_tcl_module="static"
2143 fi
2144 # end --with-tcl_module
2145
2146
2147 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2148 if test "${with_xxslurpdoptions+set}" = set; then
2149   withval="$with_xxslurpdoptions"
2150   :
2151 fi
2152
2153 # OpenLDAP --enable-slurpd
2154         # Check whether --enable-slurpd or --disable-slurpd was given.
2155 if test "${enable_slurpd+set}" = set; then
2156   enableval="$enable_slurpd"
2157   
2158         ol_arg=invalid
2159         for ol_val in auto yes no ; do
2160                 if test "$enableval" = "$ol_val" ; then
2161                         ol_arg="$ol_val"
2162                 fi
2163         done
2164         if test "$ol_arg" = "invalid" ; then
2165                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2166         fi
2167         ol_enable_slurpd="$ol_arg"
2168
2169 else
2170         ol_enable_slurpd="auto"
2171 fi
2172 # end --enable-slurpd
2173
2174 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2175 if test "${with_xxliboptions+set}" = set; then
2176   withval="$with_xxliboptions"
2177   :
2178 fi
2179
2180 # Check whether --enable-static or --disable-static was given.
2181 if test "${enable_static+set}" = set; then
2182   enableval="$enable_static"
2183   p=${PACKAGE-default}
2184 case "$enableval" in
2185 yes) enable_static=yes ;;
2186 no) enable_static=no ;;
2187 *)
2188   enable_static=no
2189   # Look at the argument we got.  We use all the common list separators.
2190   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2191   for pkg in $enableval; do
2192     if test "X$pkg" = "X$p"; then
2193       enable_static=yes
2194     fi
2195   done
2196   IFS="$ac_save_ifs"
2197   ;;
2198 esac
2199 else
2200   enable_static=yes
2201 fi
2202
2203 # Check whether --enable-shared or --disable-shared was given.
2204 if test "${enable_shared+set}" = set; then
2205   enableval="$enable_shared"
2206   p=${PACKAGE-default}
2207 case "$enableval" in
2208 yes) enable_shared=yes ;;
2209 no) enable_shared=no ;;
2210 *)
2211   enable_shared=no
2212   # Look at the argument we got.  We use all the common list separators.
2213   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2214   for pkg in $enableval; do
2215     if test "X$pkg" = "X$p"; then
2216       enable_shared=yes
2217     fi
2218   done
2219   IFS="$ac_save_ifs"
2220   ;;
2221 esac
2222 else
2223   enable_shared=yes
2224 fi
2225
2226
2227
2228 # validate options
2229 if test $ol_enable_dns = yes ; then
2230         if test $ol_enable_referrals = no ; then
2231                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2232         fi
2233         if test $ol_enable_referrals = auto ; then
2234                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2235                 ol_enable_referrals=yes
2236         fi
2237 fi
2238
2239 if test $ol_enable_slapd = no ; then
2240                 if test $ol_enable_bdb2 = yes ; then
2241                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2242         fi
2243         if test $ol_enable_ldap = yes ; then
2244                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2245         fi
2246         if test $ol_enable_ldbm = yes ; then
2247                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2248         fi
2249         if test $ol_enable_passwd = yes ; then
2250                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2251         fi
2252         if test $ol_enable_perl = yes ; then
2253                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2254         fi
2255         if test $ol_enable_shell = yes ; then
2256                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2257         fi
2258         if test $ol_enable_tcl = yes ; then
2259                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2260         fi
2261         if test $ol_enable_modules = yes ; then
2262                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2263         fi
2264         if test $ol_enable_multimaster = yes ; then
2265                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2266         fi
2267         if test $ol_enable_wrappers = yes ; then
2268                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2269         fi
2270         if test $ol_enable_phonetic = yes ; then
2271                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2272         fi
2273         if test $ol_enable_quipu = yes ; then
2274                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2275         fi
2276         if test $ol_enable_rlookups = yes ; then
2277                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2278         fi
2279         if test $ol_enable_aci = yes ; then
2280                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2281         fi
2282         if test $ol_with_ldbm_api != auto ; then
2283                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2284         fi
2285         if test $ol_with_ldbm_type != auto ; then
2286                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2287         fi
2288         if test $ol_with_bdb2_module != static ; then
2289                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2290         fi
2291         if test $ol_with_ldap_module != static ; then
2292                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2293         fi
2294         if test $ol_with_ldbm_module != static ; then
2295                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2296         fi
2297         if test $ol_with_passwd_module != static ; then
2298                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2299         fi
2300         if test $ol_with_perl_module != static ; then
2301                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2302         fi
2303         if test $ol_with_shell_module != static ; then
2304                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2305         fi
2306         if test $ol_with_tcl_module != static ; then
2307                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2308         fi
2309         if test $ol_enable_slurpd = yes ; then
2310                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2311         fi
2312
2313         # force settings to no
2314         ol_enable_bdb2=no
2315         ol_enable_ldap=no
2316         ol_enable_ldbm=no
2317         ol_enable_passwd=no
2318         ol_enable_perl=no
2319         ol_enable_shell=no
2320         ol_enable_tcl=no
2321
2322         ol_enable_modules=no
2323         ol_enable_multimaster=no
2324         ol_enable_phonetic=no
2325         ol_enable_quipu=no
2326         ol_enable_rlookups=no
2327         ol_enable_aci=no
2328         ol_enable_wrappers=no
2329         ol_enable_dynamic=no
2330
2331         ol_with_ldbm_api=no
2332         ol_with_ldbm_type=no
2333
2334         ol_with_bdb2_module=static
2335         ol_with_ldap_module=static
2336         ol_with_ldbm_module=static
2337         ol_with_passwd_module=static
2338         ol_with_perl_module=static
2339         ol_with_shell_module=static
2340         ol_with_tcl_module=static
2341
2342         ol_enable_slurpd=no
2343
2344 elif test $ol_enable_ldbm = no ; then
2345         
2346         if test $ol_with_ldbm_api != auto ; then
2347                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2348         fi
2349
2350         if test $ol_with_ldbm_type != auto ; then
2351                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2352         fi
2353
2354         if test $ol_with_ldbm_module != static ; then
2355                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2356         fi
2357
2358         if test $ol_enable_bdb2 = yes ; then
2359                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2360         fi
2361
2362         if test $ol_enable_modules != yes -a \
2363                 $ol_enable_ldap = no -a \
2364                 $ol_enable_passwd = no -a \
2365                 $ol_enable_perl = no -a \
2366                 $ol_enable_shell = no -a \
2367                 $ol_enable_tcl = no ; then
2368                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2369         fi
2370
2371         ol_with_ldbm_api=no
2372         ol_with_ldbm_type=no
2373         ol_with_ldbm_module=static
2374
2375 elif test $ol_enable_bdb2 = yes ; then
2376         
2377         if test $ol_with_ldbm_api != auto -a \
2378                 $ol_with_ldbm_api != db2 ; then
2379                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2380         fi
2381
2382         ol_with_ldbm_api=db2
2383
2384 else
2385         
2386         if test $ol_enable_bdb2 != no ; then
2387                 if test $ol_with_ldbm_api != auto -a \
2388                         $ol_with_ldbm_api != db2 ; then
2389                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2390                         ol_enable_bdb2=no
2391                 fi
2392         fi
2393
2394         if test $ol_with_ldbm_api = gdbm -a \
2395                 $ol_with_ldbm_type = btree ; then
2396                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2397         fi
2398         if test $ol_with_ldbm_api = mdbm -a \
2399                 $ol_with_ldbm_type = btree ; then
2400                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2401         fi
2402         if test $ol_with_ldbm_api = ndbm -a \
2403                 $ol_with_ldbm_type = btree ; then
2404                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2405         fi
2406 fi
2407
2408 if test $ol_enable_slurpd = yes ; then
2409                 if test $ol_with_threads = no ; then
2410                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2411         fi
2412 fi
2413
2414 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2415         if test $ol_with_kerberos = no ; then
2416                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2417         fi
2418 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2419         if test $ol_with_kerberos != auto ; then
2420                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2421         else
2422                 ol_with_kerberos=no
2423         fi
2424 fi
2425
2426 echo "$ac_t""done" 1>&6
2427
2428 LDAP_LIBS=
2429 LDIF_LIBS=
2430 LDBM_LIBS=
2431 LTHREAD_LIBS=
2432 LUTIL_LIBS=
2433
2434 LDAPD_LIBS=
2435 SLAPD_LIBS=
2436 SLURPD_LIBS=
2437
2438 BUILD_LDAPD=no
2439 BUILD_SLAPD=no
2440 BUILD_SLURPD=no
2441
2442 BUILD_BDB2=no
2443 BUILD_LDAP=no
2444 BUILD_LDBM=no
2445 BUILD_PASSWD=no
2446 BUILD_PERL=no
2447 BUILD_QUIPU=no
2448 BUILD_SHELL=no
2449 BUILD_TCL=no
2450 BUILD_THREAD=no
2451
2452 BUILD_BDB2_DYNAMIC=static
2453 BUILD_LDAP_DYNAMIC=static
2454 BUILD_LDBM_DYNAMIC=static
2455 BUILD_PASSWD_DYNAMIC=static
2456 BUILD_PERL_DYNAMIC=static
2457 BUILD_SHELL_DYNAMIC=static
2458 BUILD_TCL_DYNAMIC=static
2459
2460 SLAPD_MODULES_LDFLAGS=
2461 SLAPD_MODULES_CPPFLAGS=
2462 SLAPD_MODULES_LIST=
2463
2464 SLAPD_PERL_LDFLAGS=
2465 MOD_PERL_LDFLAGS=
2466 PERL_CPPFLAGS=
2467
2468 MOD_TCL_LIB=
2469 KRB4_LIBS=
2470 KRB5_LIBS=
2471 READLINE_LIBS=
2472 SASL_LIBS=
2473 TERMCAP_LIBS=
2474 TLS_LIBS=
2475 MODULES_LIBS=
2476
2477
2478
2479 cat >> confdefs.h <<\EOF
2480 #define HAVE_MKVERSION 1
2481 EOF
2482
2483
2484
2485
2486 ol_aix_threads=no
2487 case "$target" in
2488 *-*-aix*)       if test -z "$CC" ; then
2489                 case "$ol_with_threads" in
2490                 auto | yes |  posix) ol_aix_threads=yes ;;
2491                 esac
2492         fi
2493 ;;
2494 esac
2495
2496 if test $ol_aix_threads = yes ; then
2497         if test -z "${CC}" ; then
2498                 for ac_prog in cc_r xlc_r cc
2499 do
2500 # Extract the first word of "$ac_prog", so it can be a program name with args.
2501 set dummy $ac_prog; ac_word=$2
2502 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2503 echo "configure:2504: checking for $ac_word" >&5
2504 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2505   echo $ac_n "(cached) $ac_c" 1>&6
2506 else
2507   if test -n "$CC"; then
2508   ac_cv_prog_CC="$CC" # Let the user override the test.
2509 else
2510   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2511   ac_dummy="$PATH"
2512   for ac_dir in $ac_dummy; do
2513     test -z "$ac_dir" && ac_dir=.
2514     if test -f $ac_dir/$ac_word; then
2515       ac_cv_prog_CC="$ac_prog"
2516       break
2517     fi
2518   done
2519   IFS="$ac_save_ifs"
2520 fi
2521 fi
2522 CC="$ac_cv_prog_CC"
2523 if test -n "$CC"; then
2524   echo "$ac_t""$CC" 1>&6
2525 else
2526   echo "$ac_t""no" 1>&6
2527 fi
2528
2529 test -n "$CC" && break
2530 done
2531
2532
2533                 if test "$CC" = cc ; then
2534                                                 if test $ol_with_threads != auto ; then
2535                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2536                         else
2537                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2538                         fi
2539                         ol_with_threads=no
2540                 fi
2541         fi
2542
2543         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2544                 ol_with_threads=posix
2545                 ol_cv_pthread_create=yes
2546         fi
2547 fi
2548
2549 if test -z "${CC}"; then
2550         for ac_prog in cc
2551 do
2552 # Extract the first word of "$ac_prog", so it can be a program name with args.
2553 set dummy $ac_prog; ac_word=$2
2554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2555 echo "configure:2556: checking for $ac_word" >&5
2556 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2557   echo $ac_n "(cached) $ac_c" 1>&6
2558 else
2559   if test -n "$CC"; then
2560   ac_cv_prog_CC="$CC" # Let the user override the test.
2561 else
2562   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2563   ac_dummy="$PATH"
2564   for ac_dir in $ac_dummy; do
2565     test -z "$ac_dir" && ac_dir=.
2566     if test -f $ac_dir/$ac_word; then
2567       ac_cv_prog_CC="$ac_prog"
2568       break
2569     fi
2570   done
2571   IFS="$ac_save_ifs"
2572 fi
2573 fi
2574 CC="$ac_cv_prog_CC"
2575 if test -n "$CC"; then
2576   echo "$ac_t""$CC" 1>&6
2577 else
2578   echo "$ac_t""no" 1>&6
2579 fi
2580
2581 test -n "$CC" && break
2582 done
2583
2584 fi
2585
2586
2587
2588
2589 # Check whether --enable-fast-install or --disable-fast-install was given.
2590 if test "${enable_fast_install+set}" = set; then
2591   enableval="$enable_fast_install"
2592   p=${PACKAGE-default}
2593 case "$enableval" in
2594 yes) enable_fast_install=yes ;;
2595 no) enable_fast_install=no ;;
2596 *)
2597   enable_fast_install=no
2598   # Look at the argument we got.  We use all the common list separators.
2599   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2600   for pkg in $enableval; do
2601     if test "X$pkg" = "X$p"; then
2602       enable_fast_install=yes
2603     fi
2604   done
2605   IFS="$ac_save_ifs"
2606   ;;
2607 esac
2608 else
2609   enable_fast_install=yes
2610 fi
2611
2612 # Extract the first word of "ranlib", so it can be a program name with args.
2613 set dummy ranlib; ac_word=$2
2614 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2615 echo "configure:2616: checking for $ac_word" >&5
2616 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2617   echo $ac_n "(cached) $ac_c" 1>&6
2618 else
2619   if test -n "$RANLIB"; then
2620   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2621 else
2622   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2623   ac_dummy="$PATH"
2624   for ac_dir in $ac_dummy; do
2625     test -z "$ac_dir" && ac_dir=.
2626     if test -f $ac_dir/$ac_word; then
2627       ac_cv_prog_RANLIB="ranlib"
2628       break
2629     fi
2630   done
2631   IFS="$ac_save_ifs"
2632   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2633 fi
2634 fi
2635 RANLIB="$ac_cv_prog_RANLIB"
2636 if test -n "$RANLIB"; then
2637   echo "$ac_t""$RANLIB" 1>&6
2638 else
2639   echo "$ac_t""no" 1>&6
2640 fi
2641
2642 # Extract the first word of "gcc", so it can be a program name with args.
2643 set dummy gcc; ac_word=$2
2644 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2645 echo "configure:2646: checking for $ac_word" >&5
2646 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2647   echo $ac_n "(cached) $ac_c" 1>&6
2648 else
2649   if test -n "$CC"; then
2650   ac_cv_prog_CC="$CC" # Let the user override the test.
2651 else
2652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2653   ac_dummy="$PATH"
2654   for ac_dir in $ac_dummy; do
2655     test -z "$ac_dir" && ac_dir=.
2656     if test -f $ac_dir/$ac_word; then
2657       ac_cv_prog_CC="gcc"
2658       break
2659     fi
2660   done
2661   IFS="$ac_save_ifs"
2662 fi
2663 fi
2664 CC="$ac_cv_prog_CC"
2665 if test -n "$CC"; then
2666   echo "$ac_t""$CC" 1>&6
2667 else
2668   echo "$ac_t""no" 1>&6
2669 fi
2670
2671 if test -z "$CC"; then
2672   # Extract the first word of "cc", so it can be a program name with args.
2673 set dummy cc; ac_word=$2
2674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2675 echo "configure:2676: checking for $ac_word" >&5
2676 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2677   echo $ac_n "(cached) $ac_c" 1>&6
2678 else
2679   if test -n "$CC"; then
2680   ac_cv_prog_CC="$CC" # Let the user override the test.
2681 else
2682   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2683   ac_prog_rejected=no
2684   ac_dummy="$PATH"
2685   for ac_dir in $ac_dummy; do
2686     test -z "$ac_dir" && ac_dir=.
2687     if test -f $ac_dir/$ac_word; then
2688       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2689         ac_prog_rejected=yes
2690         continue
2691       fi
2692       ac_cv_prog_CC="cc"
2693       break
2694     fi
2695   done
2696   IFS="$ac_save_ifs"
2697 if test $ac_prog_rejected = yes; then
2698   # We found a bogon in the path, so make sure we never use it.
2699   set dummy $ac_cv_prog_CC
2700   shift
2701   if test $# -gt 0; then
2702     # We chose a different compiler from the bogus one.
2703     # However, it has the same basename, so the bogon will be chosen
2704     # first if we set CC to just the basename; use the full file name.
2705     shift
2706     set dummy "$ac_dir/$ac_word" "$@"
2707     shift
2708     ac_cv_prog_CC="$@"
2709   fi
2710 fi
2711 fi
2712 fi
2713 CC="$ac_cv_prog_CC"
2714 if test -n "$CC"; then
2715   echo "$ac_t""$CC" 1>&6
2716 else
2717   echo "$ac_t""no" 1>&6
2718 fi
2719
2720   if test -z "$CC"; then
2721     case "`uname -s`" in
2722     *win32* | *WIN32* | *CYGWIN*)
2723       # Extract the first word of "cl", so it can be a program name with args.
2724 set dummy cl; ac_word=$2
2725 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2726 echo "configure:2727: checking for $ac_word" >&5
2727 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2728   echo $ac_n "(cached) $ac_c" 1>&6
2729 else
2730   if test -n "$CC"; then
2731   ac_cv_prog_CC="$CC" # Let the user override the test.
2732 else
2733   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2734   ac_dummy="$PATH"
2735   for ac_dir in $ac_dummy; do
2736     test -z "$ac_dir" && ac_dir=.
2737     if test -f $ac_dir/$ac_word; then
2738       ac_cv_prog_CC="cl"
2739       break
2740     fi
2741   done
2742   IFS="$ac_save_ifs"
2743 fi
2744 fi
2745 CC="$ac_cv_prog_CC"
2746 if test -n "$CC"; then
2747   echo "$ac_t""$CC" 1>&6
2748 else
2749   echo "$ac_t""no" 1>&6
2750 fi
2751  ;;
2752     esac
2753   fi
2754   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2755 fi
2756
2757 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2758 echo "configure:2759: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2759
2760 ac_ext=c
2761 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2762 ac_cpp='$CPP $CPPFLAGS'
2763 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2764 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2765 cross_compiling=$ac_cv_prog_cc_cross
2766
2767 cat > conftest.$ac_ext << EOF
2768
2769 #line 2770 "configure"
2770 #include "confdefs.h"
2771
2772 main(){return(0);}
2773 EOF
2774 if { (eval echo configure:2775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2775   ac_cv_prog_cc_works=yes
2776   # If we can't run a trivial program, we are probably using a cross compiler.
2777   if (./conftest; exit) 2>/dev/null; then
2778     ac_cv_prog_cc_cross=no
2779   else
2780     ac_cv_prog_cc_cross=yes
2781   fi
2782 else
2783   echo "configure: failed program was:" >&5
2784   cat conftest.$ac_ext >&5
2785   ac_cv_prog_cc_works=no
2786 fi
2787 rm -fr conftest*
2788 ac_ext=c
2789 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2790 ac_cpp='$CPP $CPPFLAGS'
2791 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2792 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2793 cross_compiling=$ac_cv_prog_cc_cross
2794
2795 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2796 if test $ac_cv_prog_cc_works = no; then
2797   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2798 fi
2799 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2800 echo "configure:2801: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2801 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2802 cross_compiling=$ac_cv_prog_cc_cross
2803
2804 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2805 echo "configure:2806: checking whether we are using GNU C" >&5
2806 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2807   echo $ac_n "(cached) $ac_c" 1>&6
2808 else
2809   cat > conftest.c <<EOF
2810 #ifdef __GNUC__
2811   yes;
2812 #endif
2813 EOF
2814 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2815   ac_cv_prog_gcc=yes
2816 else
2817   ac_cv_prog_gcc=no
2818 fi
2819 fi
2820
2821 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2822
2823 if test $ac_cv_prog_gcc = yes; then
2824   GCC=yes
2825 else
2826   GCC=
2827 fi
2828
2829 ac_test_CFLAGS="${CFLAGS+set}"
2830 ac_save_CFLAGS="$CFLAGS"
2831 CFLAGS=
2832 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2833 echo "configure:2834: checking whether ${CC-cc} accepts -g" >&5
2834 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2835   echo $ac_n "(cached) $ac_c" 1>&6
2836 else
2837   echo 'void f(){}' > conftest.c
2838 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2839   ac_cv_prog_cc_g=yes
2840 else
2841   ac_cv_prog_cc_g=no
2842 fi
2843 rm -f conftest*
2844
2845 fi
2846
2847 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2848 if test "$ac_test_CFLAGS" = set; then
2849   CFLAGS="$ac_save_CFLAGS"
2850 elif test $ac_cv_prog_cc_g = yes; then
2851   if test "$GCC" = yes; then
2852     CFLAGS="-g -O2"
2853   else
2854     CFLAGS="-g"
2855   fi
2856 else
2857   if test "$GCC" = yes; then
2858     CFLAGS="-O2"
2859   else
2860     CFLAGS=
2861   fi
2862 fi
2863
2864 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2865 if test "${with_gnu_ld+set}" = set; then
2866   withval="$with_gnu_ld"
2867   test "$withval" = no || with_gnu_ld=yes
2868 else
2869   with_gnu_ld=no
2870 fi
2871
2872 ac_prog=ld
2873 if test "$ac_cv_prog_gcc" = yes; then
2874   # Check if gcc -print-prog-name=ld gives a path.
2875   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2876 echo "configure:2877: checking for ld used by GCC" >&5
2877   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2878   case "$ac_prog" in
2879     # Accept absolute paths.
2880     [\\/]* | [A-Za-z]:[\\/]*)
2881       re_direlt='/[^/][^/]*/\.\./'
2882       # Canonicalize the path of ld
2883       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2884       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2885         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2886       done
2887       test -z "$LD" && LD="$ac_prog"
2888       ;;
2889   "")
2890     # If it fails, then pretend we aren't using GCC.
2891     ac_prog=ld
2892     ;;
2893   *)
2894     # If it is relative, then search for the first ld in PATH.
2895     with_gnu_ld=unknown
2896     ;;
2897   esac
2898 elif test "$with_gnu_ld" = yes; then
2899   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2900 echo "configure:2901: checking for GNU ld" >&5
2901 else
2902   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2903 echo "configure:2904: checking for non-GNU ld" >&5
2904 fi
2905 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2906   echo $ac_n "(cached) $ac_c" 1>&6
2907 else
2908   if test -z "$LD"; then
2909   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2910   for ac_dir in $PATH; do
2911     test -z "$ac_dir" && ac_dir=.
2912     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2913       ac_cv_path_LD="$ac_dir/$ac_prog"
2914       # Check to see if the program is GNU ld.  I'd rather use --version,
2915       # but apparently some GNU ld's only accept -v.
2916       # Break only if it was the GNU/non-GNU ld that we prefer.
2917       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2918         test "$with_gnu_ld" != no && break
2919       else
2920         test "$with_gnu_ld" != yes && break
2921       fi
2922     fi
2923   done
2924   IFS="$ac_save_ifs"
2925 else
2926   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2927 fi
2928 fi
2929
2930 LD="$ac_cv_path_LD"
2931 if test -n "$LD"; then
2932   echo "$ac_t""$LD" 1>&6
2933 else
2934   echo "$ac_t""no" 1>&6
2935 fi
2936 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2937
2938 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2939 echo "configure:2940: checking if the linker ($LD) is GNU ld" >&5
2940 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2941   echo $ac_n "(cached) $ac_c" 1>&6
2942 else
2943   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2944 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2945   ac_cv_prog_gnu_ld=yes
2946 else
2947   ac_cv_prog_gnu_ld=no
2948 fi
2949 fi
2950
2951 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2952
2953
2954 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2955 echo "configure:2956: checking for BSD-compatible nm" >&5
2956 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2957   echo $ac_n "(cached) $ac_c" 1>&6
2958 else
2959   if test -n "$NM"; then
2960   # Let the user override the test.
2961   ac_cv_path_NM="$NM"
2962 else
2963   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2964   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2965     test -z "$ac_dir" && ac_dir=.
2966     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2967       # Check to see if the nm accepts a BSD-compat flag.
2968       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2969       #   nm: unknown option "B" ignored
2970       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2971         ac_cv_path_NM="$ac_dir/nm -B"
2972         break
2973       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2974         ac_cv_path_NM="$ac_dir/nm -p"
2975         break
2976       else
2977         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2978         continue # so that we can try to find one that supports BSD flags
2979       fi
2980     fi
2981   done
2982   IFS="$ac_save_ifs"
2983   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2984 fi
2985 fi
2986
2987 NM="$ac_cv_path_NM"
2988 echo "$ac_t""$NM" 1>&6
2989
2990
2991 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2992 echo "configure:2993: checking whether ln -s works" >&5
2993 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2994   echo $ac_n "(cached) $ac_c" 1>&6
2995 else
2996   rm -f conftestdata
2997 if ln -s X conftestdata 2>/dev/null
2998 then
2999   rm -f conftestdata
3000   ac_cv_prog_LN_S="ln -s"
3001 else
3002   ac_cv_prog_LN_S=ln
3003 fi
3004 fi
3005 LN_S="$ac_cv_prog_LN_S"
3006 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3007   echo "$ac_t""yes" 1>&6
3008 else
3009   echo "$ac_t""no" 1>&6
3010 fi
3011
3012 if test $host != $build; then
3013   ac_tool_prefix=${host_alias}-
3014 else
3015   ac_tool_prefix=
3016 fi
3017
3018
3019 # Check for any special flags to pass to ltconfig.
3020 libtool_flags="--cache-file=$cache_file"
3021 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3022 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3023 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3024 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3025 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3026 libtool_flags="$libtool_flags --enable-dlopen"
3027 libtool_flags="$libtool_flags --enable-win32-dll"
3028 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3029 if test "${enable_libtool_lock+set}" = set; then
3030   enableval="$enable_libtool_lock"
3031   :
3032 fi
3033
3034 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3035 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3036
3037 # Some flags need to be propagated to the compiler or linker for good
3038 # libtool support.
3039 case "$host" in
3040 *-*-irix6*)
3041   # Find out which ABI we are using.
3042   echo '#line 3043 "configure"' > conftest.$ac_ext
3043   if { (eval echo configure:3044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3044     case "`/usr/bin/file conftest.o`" in
3045     *32-bit*)
3046       LD="${LD-ld} -32"
3047       ;;
3048     *N32*)
3049       LD="${LD-ld} -n32"
3050       ;;
3051     *64-bit*)
3052       LD="${LD-ld} -64"
3053       ;;
3054     esac
3055   fi
3056   rm -rf conftest*
3057   ;;
3058
3059 *-*-sco3.2v5*)
3060   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3061   SAVE_CFLAGS="$CFLAGS"
3062   CFLAGS="$CFLAGS -belf"
3063   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3064 echo "configure:3065: checking whether the C compiler needs -belf" >&5
3065 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3066   echo $ac_n "(cached) $ac_c" 1>&6
3067 else
3068   cat > conftest.$ac_ext <<EOF
3069 #line 3070 "configure"
3070 #include "confdefs.h"
3071
3072 int main() {
3073
3074 ; return 0; }
3075 EOF
3076 if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3077   rm -rf conftest*
3078   lt_cv_cc_needs_belf=yes
3079 else
3080   echo "configure: failed program was:" >&5
3081   cat conftest.$ac_ext >&5
3082   rm -rf conftest*
3083   lt_cv_cc_needs_belf=no
3084 fi
3085 rm -f conftest*
3086 fi
3087
3088 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3089   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3090     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3091     CFLAGS="$SAVE_CFLAGS"
3092   fi
3093   ;;
3094
3095 *-*-cygwin* | *-*-mingw*)
3096   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3097 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3098 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3099 echo "configure:3100: checking for $ac_word" >&5
3100 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3101   echo $ac_n "(cached) $ac_c" 1>&6
3102 else
3103   if test -n "$DLLTOOL"; then
3104   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3105 else
3106   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3107   ac_dummy="$PATH"
3108   for ac_dir in $ac_dummy; do
3109     test -z "$ac_dir" && ac_dir=.
3110     if test -f $ac_dir/$ac_word; then
3111       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3112       break
3113     fi
3114   done
3115   IFS="$ac_save_ifs"
3116 fi
3117 fi
3118 DLLTOOL="$ac_cv_prog_DLLTOOL"
3119 if test -n "$DLLTOOL"; then
3120   echo "$ac_t""$DLLTOOL" 1>&6
3121 else
3122   echo "$ac_t""no" 1>&6
3123 fi
3124
3125
3126 if test -z "$ac_cv_prog_DLLTOOL"; then
3127 if test -n "$ac_tool_prefix"; then
3128   # Extract the first word of "dlltool", so it can be a program name with args.
3129 set dummy dlltool; ac_word=$2
3130 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3131 echo "configure:3132: checking for $ac_word" >&5
3132 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3133   echo $ac_n "(cached) $ac_c" 1>&6
3134 else
3135   if test -n "$DLLTOOL"; then
3136   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3137 else
3138   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3139   ac_dummy="$PATH"
3140   for ac_dir in $ac_dummy; do
3141     test -z "$ac_dir" && ac_dir=.
3142     if test -f $ac_dir/$ac_word; then
3143       ac_cv_prog_DLLTOOL="dlltool"
3144       break
3145     fi
3146   done
3147   IFS="$ac_save_ifs"
3148   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3149 fi
3150 fi
3151 DLLTOOL="$ac_cv_prog_DLLTOOL"
3152 if test -n "$DLLTOOL"; then
3153   echo "$ac_t""$DLLTOOL" 1>&6
3154 else
3155   echo "$ac_t""no" 1>&6
3156 fi
3157
3158 else
3159   DLLTOOL="false"
3160 fi
3161 fi
3162
3163   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3164 set dummy ${ac_tool_prefix}as; ac_word=$2
3165 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3166 echo "configure:3167: checking for $ac_word" >&5
3167 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3168   echo $ac_n "(cached) $ac_c" 1>&6
3169 else
3170   if test -n "$AS"; then
3171   ac_cv_prog_AS="$AS" # Let the user override the test.
3172 else
3173   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3174   ac_dummy="$PATH"
3175   for ac_dir in $ac_dummy; do
3176     test -z "$ac_dir" && ac_dir=.
3177     if test -f $ac_dir/$ac_word; then
3178       ac_cv_prog_AS="${ac_tool_prefix}as"
3179       break
3180     fi
3181   done
3182   IFS="$ac_save_ifs"
3183 fi
3184 fi
3185 AS="$ac_cv_prog_AS"
3186 if test -n "$AS"; then
3187   echo "$ac_t""$AS" 1>&6
3188 else
3189   echo "$ac_t""no" 1>&6
3190 fi
3191
3192
3193 if test -z "$ac_cv_prog_AS"; then
3194 if test -n "$ac_tool_prefix"; then
3195   # Extract the first word of "as", so it can be a program name with args.
3196 set dummy as; ac_word=$2
3197 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3198 echo "configure:3199: checking for $ac_word" >&5
3199 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3200   echo $ac_n "(cached) $ac_c" 1>&6
3201 else
3202   if test -n "$AS"; then
3203   ac_cv_prog_AS="$AS" # Let the user override the test.
3204 else
3205   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3206   ac_dummy="$PATH"
3207   for ac_dir in $ac_dummy; do
3208     test -z "$ac_dir" && ac_dir=.
3209     if test -f $ac_dir/$ac_word; then
3210       ac_cv_prog_AS="as"
3211       break
3212     fi
3213   done
3214   IFS="$ac_save_ifs"
3215   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3216 fi
3217 fi
3218 AS="$ac_cv_prog_AS"
3219 if test -n "$AS"; then
3220   echo "$ac_t""$AS" 1>&6
3221 else
3222   echo "$ac_t""no" 1>&6
3223 fi
3224
3225 else
3226   AS="false"
3227 fi
3228 fi
3229
3230   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3231 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3232 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3233 echo "configure:3234: checking for $ac_word" >&5
3234 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3235   echo $ac_n "(cached) $ac_c" 1>&6
3236 else
3237   if test -n "$OBJDUMP"; then
3238   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3239 else
3240   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3241   ac_dummy="$PATH"
3242   for ac_dir in $ac_dummy; do
3243     test -z "$ac_dir" && ac_dir=.
3244     if test -f $ac_dir/$ac_word; then
3245       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3246       break
3247     fi
3248   done
3249   IFS="$ac_save_ifs"
3250 fi
3251 fi
3252 OBJDUMP="$ac_cv_prog_OBJDUMP"
3253 if test -n "$OBJDUMP"; then
3254   echo "$ac_t""$OBJDUMP" 1>&6
3255 else
3256   echo "$ac_t""no" 1>&6
3257 fi
3258
3259
3260 if test -z "$ac_cv_prog_OBJDUMP"; then
3261 if test -n "$ac_tool_prefix"; then
3262   # Extract the first word of "objdump", so it can be a program name with args.
3263 set dummy objdump; ac_word=$2
3264 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3265 echo "configure:3266: checking for $ac_word" >&5
3266 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269   if test -n "$OBJDUMP"; then
3270   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3271 else
3272   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3273   ac_dummy="$PATH"
3274   for ac_dir in $ac_dummy; do
3275     test -z "$ac_dir" && ac_dir=.
3276     if test -f $ac_dir/$ac_word; then
3277       ac_cv_prog_OBJDUMP="objdump"
3278       break
3279     fi
3280   done
3281   IFS="$ac_save_ifs"
3282   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3283 fi
3284 fi
3285 OBJDUMP="$ac_cv_prog_OBJDUMP"
3286 if test -n "$OBJDUMP"; then
3287   echo "$ac_t""$OBJDUMP" 1>&6
3288 else
3289   echo "$ac_t""no" 1>&6
3290 fi
3291
3292 else
3293   OBJDUMP="false"
3294 fi
3295 fi
3296
3297   ;;
3298
3299 esac
3300
3301
3302 # Save cache, so that ltconfig can load it
3303
3304
3305 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3306 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3307 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3308 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3309 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3310 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3311 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3312 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3313
3314 # Reload cache, that may have been modified by ltconfig
3315
3316
3317 # This can be used to rebuild libtool when needed
3318 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3319
3320 # Always use our own libtool.
3321 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3322
3323 # Redirect the config.log output again, so that the ltconfig log is not
3324 # clobbered by the next message.
3325 exec 5>>./config.log
3326
3327
3328 for ac_prog in mawk gawk nawk awk
3329 do
3330 # Extract the first word of "$ac_prog", so it can be a program name with args.
3331 set dummy $ac_prog; ac_word=$2
3332 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3333 echo "configure:3334: checking for $ac_word" >&5
3334 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   if test -n "$AWK"; then
3338   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3339 else
3340   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3341   ac_dummy="$PATH"
3342   for ac_dir in $ac_dummy; do
3343     test -z "$ac_dir" && ac_dir=.
3344     if test -f $ac_dir/$ac_word; then
3345       ac_cv_prog_AWK="$ac_prog"
3346       break
3347     fi
3348   done
3349   IFS="$ac_save_ifs"
3350 fi
3351 fi
3352 AWK="$ac_cv_prog_AWK"
3353 if test -n "$AWK"; then
3354   echo "$ac_t""$AWK" 1>&6
3355 else
3356   echo "$ac_t""no" 1>&6
3357 fi
3358
3359 test -n "$AWK" && break
3360 done
3361
3362 # test for ln hardlink support
3363 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3364 echo "configure:3365: checking whether ln works" >&5
3365 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3366   echo $ac_n "(cached) $ac_c" 1>&6
3367 else
3368   rm -f conftest.src conftest.dst
3369 echo "conftest" > conftest.src
3370 if ln conftest.src conftest.dst 2>/dev/null
3371 then
3372   ol_cv_prog_LN_H="ln"
3373 else
3374   ol_cv_prog_LN_H="cp"
3375 fi
3376 rm -f conftest.src conftest.dst
3377
3378 fi
3379 LN_H="$ol_cv_prog_LN_H"
3380 if test "$ol_cv_prog_LN_H" = "ln"; then
3381         echo "$ac_t""yes" 1>&6
3382 else
3383         echo "$ac_t""no" 1>&6
3384 fi
3385
3386 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3387 echo "configure:3388: checking whether ln -s works" >&5
3388 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3389   echo $ac_n "(cached) $ac_c" 1>&6
3390 else
3391   rm -f conftestdata
3392 if ln -s X conftestdata 2>/dev/null
3393 then
3394   rm -f conftestdata
3395   ac_cv_prog_LN_S="ln -s"
3396 else
3397   ac_cv_prog_LN_S=ln
3398 fi
3399 fi
3400 LN_S="$ac_cv_prog_LN_S"
3401 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3402   echo "$ac_t""yes" 1>&6
3403 else
3404   echo "$ac_t""no" 1>&6
3405 fi
3406
3407
3408 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3409         LN_S="$LN_H"
3410 fi
3411
3412 # Extract the first word of "sendmail", so it can be a program name with args.
3413 set dummy sendmail; ac_word=$2
3414 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3415 echo "configure:3416: checking for $ac_word" >&5
3416 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3417   echo $ac_n "(cached) $ac_c" 1>&6
3418 else
3419   case "$SENDMAIL" in
3420   /*)
3421   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3422   ;;
3423   ?:/*)
3424   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3425   ;;
3426   *)
3427   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3428   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3429   for ac_dir in $ac_dummy; do 
3430     test -z "$ac_dir" && ac_dir=.
3431     if test -f $ac_dir/$ac_word; then
3432       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3433       break
3434     fi
3435   done
3436   IFS="$ac_save_ifs"
3437   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3438   ;;
3439 esac
3440 fi
3441 SENDMAIL="$ac_cv_path_SENDMAIL"
3442 if test -n "$SENDMAIL"; then
3443   echo "$ac_t""$SENDMAIL" 1>&6
3444 else
3445   echo "$ac_t""no" 1>&6
3446 fi
3447
3448 # Extract the first word of "vi", so it can be a program name with args.
3449 set dummy vi; ac_word=$2
3450 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3451 echo "configure:3452: checking for $ac_word" >&5
3452 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3453   echo $ac_n "(cached) $ac_c" 1>&6
3454 else
3455   case "$EDITOR" in
3456   /*)
3457   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3458   ;;
3459   ?:/*)
3460   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3461   ;;
3462   *)
3463   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3464   ac_dummy="$PATH:/usr/ucb"
3465   for ac_dir in $ac_dummy; do 
3466     test -z "$ac_dir" && ac_dir=.
3467     if test -f $ac_dir/$ac_word; then
3468       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3469       break
3470     fi
3471   done
3472   IFS="$ac_save_ifs"
3473   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3474   ;;
3475 esac
3476 fi
3477 EDITOR="$ac_cv_path_EDITOR"
3478 if test -n "$EDITOR"; then
3479   echo "$ac_t""$EDITOR" 1>&6
3480 else
3481   echo "$ac_t""no" 1>&6
3482 fi
3483
3484 # Extract the first word of "finger", so it can be a program name with args.
3485 set dummy finger; ac_word=$2
3486 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3487 echo "configure:3488: checking for $ac_word" >&5
3488 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3489   echo $ac_n "(cached) $ac_c" 1>&6
3490 else
3491   case "$FINGER" in
3492   /*)
3493   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3494   ;;
3495   ?:/*)
3496   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3497   ;;
3498   *)
3499   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3500   ac_dummy="$PATH:/usr/ucb"
3501   for ac_dir in $ac_dummy; do 
3502     test -z "$ac_dir" && ac_dir=.
3503     if test -f $ac_dir/$ac_word; then
3504       ac_cv_path_FINGER="$ac_dir/$ac_word"
3505       break
3506     fi
3507   done
3508   IFS="$ac_save_ifs"
3509   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3510   ;;
3511 esac
3512 fi
3513 FINGER="$ac_cv_path_FINGER"
3514 if test -n "$FINGER"; then
3515   echo "$ac_t""$FINGER" 1>&6
3516 else
3517   echo "$ac_t""no" 1>&6
3518 fi
3519
3520
3521 ol_link_perl=no
3522 if test $ol_enable_perl != no ; then
3523         # Extract the first word of "perl", so it can be a program name with args.
3524 set dummy perl; ac_word=$2
3525 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3526 echo "configure:3527: checking for $ac_word" >&5
3527 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3528   echo $ac_n "(cached) $ac_c" 1>&6
3529 else
3530   case "$PERLBIN" in
3531   /*)
3532   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3533   ;;
3534   ?:/*)
3535   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3536   ;;
3537   *)
3538   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3539   ac_dummy="$PATH"
3540   for ac_dir in $ac_dummy; do 
3541     test -z "$ac_dir" && ac_dir=.
3542     if test -f $ac_dir/$ac_word; then
3543       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3544       break
3545     fi
3546   done
3547   IFS="$ac_save_ifs"
3548   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3549   ;;
3550 esac
3551 fi
3552 PERLBIN="$ac_cv_path_PERLBIN"
3553 if test -n "$PERLBIN"; then
3554   echo "$ac_t""$PERLBIN" 1>&6
3555 else
3556   echo "$ac_t""no" 1>&6
3557 fi
3558
3559
3560         if test "no$PERLBIN" = "no" ; then
3561                 if test $ol_enable_perl = yes ; then
3562                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3563                 fi
3564
3565         else
3566                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3567                 if test x"$ol_with_perl_module" = "xstatic" ; then
3568                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3569                 else
3570                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3571                 fi
3572                                 ol_link_perl=yes
3573         fi
3574 fi
3575
3576 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3577 echo "configure:3578: checking how to run the C preprocessor" >&5
3578 # On Suns, sometimes $CPP names a directory.
3579 if test -n "$CPP" && test -d "$CPP"; then
3580   CPP=
3581 fi
3582 if test -z "$CPP"; then
3583 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3584   echo $ac_n "(cached) $ac_c" 1>&6
3585 else
3586     # This must be in double quotes, not single quotes, because CPP may get
3587   # substituted into the Makefile and "${CC-cc}" will confuse make.
3588   CPP="${CC-cc} -E"
3589   # On the NeXT, cc -E runs the code through the compiler's parser,
3590   # not just through cpp.
3591   cat > conftest.$ac_ext <<EOF
3592 #line 3593 "configure"
3593 #include "confdefs.h"
3594 #include <assert.h>
3595 Syntax Error
3596 EOF
3597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3598 { (eval echo configure:3599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3600 if test -z "$ac_err"; then
3601   :
3602 else
3603   echo "$ac_err" >&5
3604   echo "configure: failed program was:" >&5
3605   cat conftest.$ac_ext >&5
3606   rm -rf conftest*
3607   CPP="${CC-cc} -E -traditional-cpp"
3608   cat > conftest.$ac_ext <<EOF
3609 #line 3610 "configure"
3610 #include "confdefs.h"
3611 #include <assert.h>
3612 Syntax Error
3613 EOF
3614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3615 { (eval echo configure:3616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3617 if test -z "$ac_err"; then
3618   :
3619 else
3620   echo "$ac_err" >&5
3621   echo "configure: failed program was:" >&5
3622   cat conftest.$ac_ext >&5
3623   rm -rf conftest*
3624   CPP="${CC-cc} -nologo -E"
3625   cat > conftest.$ac_ext <<EOF
3626 #line 3627 "configure"
3627 #include "confdefs.h"
3628 #include <assert.h>
3629 Syntax Error
3630 EOF
3631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3632 { (eval echo configure:3633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3634 if test -z "$ac_err"; then
3635   :
3636 else
3637   echo "$ac_err" >&5
3638   echo "configure: failed program was:" >&5
3639   cat conftest.$ac_ext >&5
3640   rm -rf conftest*
3641   CPP=/lib/cpp
3642 fi
3643 rm -f conftest*
3644 fi
3645 rm -f conftest*
3646 fi
3647 rm -f conftest*
3648   ac_cv_prog_CPP="$CPP"
3649 fi
3650   CPP="$ac_cv_prog_CPP"
3651 else
3652   ac_cv_prog_CPP="$CPP"
3653 fi
3654 echo "$ac_t""$CPP" 1>&6
3655
3656
3657 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3658         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3659
3660 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3661         echo "configure: warning: programs compiled here do run here..." 1>&2
3662         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3663
3664 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3665         echo "configure: warning: programs compiled here do not run here..." 1>&2
3666         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3667 fi
3668
3669 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3670 echo "configure:3671: checking for AIX" >&5
3671 cat > conftest.$ac_ext <<EOF
3672 #line 3673 "configure"
3673 #include "confdefs.h"
3674 #ifdef _AIX
3675   yes
3676 #endif
3677
3678 EOF
3679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3680   egrep "yes" >/dev/null 2>&1; then
3681   rm -rf conftest*
3682   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3683 #define _ALL_SOURCE 1
3684 EOF
3685
3686 else
3687   rm -rf conftest*
3688   echo "$ac_t""no" 1>&6
3689 fi
3690 rm -f conftest*
3691
3692
3693 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3694 echo "configure:3695: checking for POSIXized ISC" >&5
3695 if test -d /etc/conf/kconfig.d &&
3696   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3697 then
3698   echo "$ac_t""yes" 1>&6
3699   ISC=yes # If later tests want to check for ISC.
3700   cat >> confdefs.h <<\EOF
3701 #define _POSIX_SOURCE 1
3702 EOF
3703
3704   if test "$GCC" = yes; then
3705     CC="$CC -posix"
3706   else
3707     CC="$CC -Xp"
3708   fi
3709 else
3710   echo "$ac_t""no" 1>&6
3711   ISC=
3712 fi
3713
3714 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3715 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3716 echo "configure:3717: checking for minix/config.h" >&5
3717 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3718   echo $ac_n "(cached) $ac_c" 1>&6
3719 else
3720   cat > conftest.$ac_ext <<EOF
3721 #line 3722 "configure"
3722 #include "confdefs.h"
3723 #include <minix/config.h>
3724 EOF
3725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3726 { (eval echo configure:3727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3728 if test -z "$ac_err"; then
3729   rm -rf conftest*
3730   eval "ac_cv_header_$ac_safe=yes"
3731 else
3732   echo "$ac_err" >&5
3733   echo "configure: failed program was:" >&5
3734   cat conftest.$ac_ext >&5
3735   rm -rf conftest*
3736   eval "ac_cv_header_$ac_safe=no"
3737 fi
3738 rm -f conftest*
3739 fi
3740 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3741   echo "$ac_t""yes" 1>&6
3742   MINIX=yes
3743 else
3744   echo "$ac_t""no" 1>&6
3745 MINIX=
3746 fi
3747
3748 if test "$MINIX" = yes; then
3749   cat >> confdefs.h <<\EOF
3750 #define _POSIX_SOURCE 1
3751 EOF
3752
3753   cat >> confdefs.h <<\EOF
3754 #define _POSIX_1_SOURCE 2
3755 EOF
3756
3757   cat >> confdefs.h <<\EOF
3758 #define _MINIX 1
3759 EOF
3760
3761 fi
3762
3763
3764 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3765 echo "configure:3766: checking for Cygwin environment" >&5
3766 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3767   echo $ac_n "(cached) $ac_c" 1>&6
3768 else
3769   cat > conftest.$ac_ext <<EOF
3770 #line 3771 "configure"
3771 #include "confdefs.h"
3772
3773 int main() {
3774
3775 #ifndef __CYGWIN__
3776 #define __CYGWIN__ __CYGWIN32__
3777 #endif
3778 return __CYGWIN__;
3779 ; return 0; }
3780 EOF
3781 if { (eval echo configure:3782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3782   rm -rf conftest*
3783   ac_cv_cygwin=yes
3784 else
3785   echo "configure: failed program was:" >&5
3786   cat conftest.$ac_ext >&5
3787   rm -rf conftest*
3788   ac_cv_cygwin=no
3789 fi
3790 rm -f conftest*
3791 fi
3792
3793 echo "$ac_t""$ac_cv_cygwin" 1>&6
3794 CYGWIN=
3795 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3796 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3797 echo "configure:3798: checking for mingw32 environment" >&5
3798 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3799   echo $ac_n "(cached) $ac_c" 1>&6
3800 else
3801   cat > conftest.$ac_ext <<EOF
3802 #line 3803 "configure"
3803 #include "confdefs.h"
3804
3805 int main() {
3806 return __MINGW32__;
3807 ; return 0; }
3808 EOF
3809 if { (eval echo configure:3810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3810   rm -rf conftest*
3811   ac_cv_mingw32=yes
3812 else
3813   echo "configure: failed program was:" >&5
3814   cat conftest.$ac_ext >&5
3815   rm -rf conftest*
3816   ac_cv_mingw32=no
3817 fi
3818 rm -f conftest*
3819 fi
3820
3821 echo "$ac_t""$ac_cv_mingw32" 1>&6
3822 MINGW32=
3823 test "$ac_cv_mingw32" = yes && MINGW32=yes
3824 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3825 echo "configure:3826: checking for EMX OS/2 environment" >&5
3826 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3827   echo $ac_n "(cached) $ac_c" 1>&6
3828 else
3829   cat > conftest.$ac_ext <<EOF
3830 #line 3831 "configure"
3831 #include "confdefs.h"
3832
3833 int main() {
3834 return __EMX__;
3835 ; return 0; }
3836 EOF
3837 if { (eval echo configure:3838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3838   rm -rf conftest*
3839   ac_cv_emxos2=yes
3840 else
3841   echo "configure: failed program was:" >&5
3842   cat conftest.$ac_ext >&5
3843   rm -rf conftest*
3844   ac_cv_emxos2=no
3845 fi
3846 rm -f conftest*
3847 fi
3848
3849 echo "$ac_t""$ac_cv_emxos2" 1>&6
3850 EMXOS2=
3851 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3852
3853
3854
3855 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3856 echo "configure:3857: checking for executable suffix" >&5
3857 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3858   echo $ac_n "(cached) $ac_c" 1>&6
3859 else
3860   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3861   ac_cv_exeext=.exe
3862 else
3863   rm -f conftest*
3864   echo 'int main () { return 0; }' > conftest.$ac_ext
3865   ac_cv_exeext=
3866   if { (eval echo configure:3867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3867     for file in conftest.*; do
3868       case $file in
3869       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3870       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3871       esac
3872     done
3873   else
3874     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3875   fi
3876   rm -f conftest*
3877   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3878 fi
3879 fi
3880
3881 EXEEXT=""
3882 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3883 echo "$ac_t""${ac_cv_exeext}" 1>&6
3884 ac_exeext=$EXEEXT
3885
3886 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3887 echo "configure:3888: checking for object suffix" >&5
3888 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3889   echo $ac_n "(cached) $ac_c" 1>&6
3890 else
3891   rm -f conftest*
3892 echo 'int i = 1;' > conftest.$ac_ext
3893 if { (eval echo configure:3894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3894   for ac_file in conftest.*; do
3895     case $ac_file in
3896     *.c) ;;
3897     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3898     esac
3899   done
3900 else
3901   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3902 fi
3903 rm -f conftest*
3904 fi
3905
3906 echo "$ac_t""$ac_cv_objext" 1>&6
3907 OBJEXT=$ac_cv_objext
3908 ac_objext=$ac_cv_objext
3909
3910
3911 cat >> confdefs.h <<EOF
3912 #define EXEEXT "${EXEEXT}"
3913 EOF
3914
3915
3916 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3917 echo "configure:3918: checking for be_app in -lbe" >&5
3918 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3919 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3920   echo $ac_n "(cached) $ac_c" 1>&6
3921 else
3922   ac_save_LIBS="$LIBS"
3923 LIBS="-lbe -lroot -lnet $LIBS"
3924 cat > conftest.$ac_ext <<EOF
3925 #line 3926 "configure"
3926 #include "confdefs.h"
3927 /* Override any gcc2 internal prototype to avoid an error.  */
3928 /* We use char because int might match the return type of a gcc2
3929     builtin and then its argument prototype would still apply.  */
3930 char be_app();
3931
3932 int main() {
3933 be_app()
3934 ; return 0; }
3935 EOF
3936 if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3937   rm -rf conftest*
3938   eval "ac_cv_lib_$ac_lib_var=yes"
3939 else
3940   echo "configure: failed program was:" >&5
3941   cat conftest.$ac_ext >&5
3942   rm -rf conftest*
3943   eval "ac_cv_lib_$ac_lib_var=no"
3944 fi
3945 rm -f conftest*
3946 LIBS="$ac_save_LIBS"
3947
3948 fi
3949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3950   echo "$ac_t""yes" 1>&6
3951   LIBS="$LIBS -lbe -lroot -lnet"
3952 else
3953   echo "$ac_t""no" 1>&6
3954 :
3955 fi
3956
3957
3958
3959
3960
3961 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3962 echo "configure:3963: checking for ${CC-cc} option to accept ANSI C" >&5
3963 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3964   echo $ac_n "(cached) $ac_c" 1>&6
3965 else
3966   am_cv_prog_cc_stdc=no
3967 ac_save_CC="$CC"
3968 # Don't try gcc -ansi; that turns off useful extensions and
3969 # breaks some systems' header files.
3970 # AIX                   -qlanglvl=ansi
3971 # Ultrix and OSF/1      -std1
3972 # HP-UX 10.20 and later -Ae
3973 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3974 # SVR4                  -Xc -D__EXTENSIONS__
3975 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3976 do
3977   CC="$ac_save_CC $ac_arg"
3978   cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981 #include <stdarg.h>
3982 #include <stdio.h>
3983 #include <sys/types.h>
3984 #include <sys/stat.h>
3985 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3986 struct buf { int x; };
3987 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3988 static char *e (p, i)
3989      char **p;
3990      int i;
3991 {
3992   return p[i];
3993 }
3994 static char *f (char * (*g) (char **, int), char **p, ...)
3995 {
3996   char *s;
3997   va_list v;
3998   va_start (v,p);
3999   s = g (p, va_arg (v,int));
4000   va_end (v);
4001   return s;
4002 }
4003 int test (int i, double x);
4004 struct s1 {int (*f) (int a);};
4005 struct s2 {int (*f) (double a);};
4006 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4007 int argc;
4008 char **argv;
4009
4010 int main() {
4011
4012 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4013
4014 ; return 0; }
4015 EOF
4016 if { (eval echo configure:4017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4017   rm -rf conftest*
4018   am_cv_prog_cc_stdc="$ac_arg"; break
4019 else
4020   echo "configure: failed program was:" >&5
4021   cat conftest.$ac_ext >&5
4022 fi
4023 rm -f conftest*
4024 done
4025 CC="$ac_save_CC"
4026
4027 fi
4028
4029 if test -z "$am_cv_prog_cc_stdc"; then
4030   echo "$ac_t""none needed" 1>&6
4031 else
4032   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4033 fi
4034 case "x$am_cv_prog_cc_stdc" in
4035   x|xno) ;;
4036   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4037 esac
4038
4039 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4040         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4041 fi
4042
4043 # test for make depend flag
4044 OL_MKDEP=
4045 OL_MKDEP_FLAGS=
4046 if test -z "${MKDEP}"; then
4047         OL_MKDEP="${CC-cc}"
4048         if test -z "${MKDEP_FLAGS}"; then
4049                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4050 echo "configure:4051: checking for ${OL_MKDEP} depend flag" >&5
4051 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4052   echo $ac_n "(cached) $ac_c" 1>&6
4053 else
4054   
4055                         ol_cv_mkdep=no
4056                         for flag in "-M" "-xM"; do
4057                                 cat > conftest.c <<EOF
4058  noCode;
4059 EOF
4060                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4061                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4062                                 then
4063                                         if test ! -f conftest."${ac_object}" ; then
4064                                                 ol_cv_mkdep=$flag
4065                                                 OL_MKDEP_FLAGS="$flag"
4066                                                 break
4067                                         fi
4068                                 fi
4069                         done
4070                         rm -f conftest*
4071                 
4072 fi
4073
4074 echo "$ac_t""$ol_cv_mkdep" 1>&6
4075         else
4076                 cc_cv_mkdep=yes
4077                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4078         fi
4079 else
4080         cc_cv_mkdep=yes
4081         OL_MKDEP="${MKDEP}"
4082         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4083 fi
4084
4085
4086
4087 if test "${ol_cv_mkdep}" = no ; then
4088         # this will soon become an error
4089         echo "configure: warning: do not know how to generate dependencies" 1>&2
4090 fi
4091
4092 ol_link_modules=no
4093 if test $ol_enable_modules != no ; then
4094         for ac_hdr in ltdl.h
4095 do
4096 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4097 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4098 echo "configure:4099: checking for $ac_hdr" >&5
4099 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4100   echo $ac_n "(cached) $ac_c" 1>&6
4101 else
4102   cat > conftest.$ac_ext <<EOF
4103 #line 4104 "configure"
4104 #include "confdefs.h"
4105 #include <$ac_hdr>
4106 EOF
4107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4108 { (eval echo configure:4109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4109 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4110 if test -z "$ac_err"; then
4111   rm -rf conftest*
4112   eval "ac_cv_header_$ac_safe=yes"
4113 else
4114   echo "$ac_err" >&5
4115   echo "configure: failed program was:" >&5
4116   cat conftest.$ac_ext >&5
4117   rm -rf conftest*
4118   eval "ac_cv_header_$ac_safe=no"
4119 fi
4120 rm -f conftest*
4121 fi
4122 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4123   echo "$ac_t""yes" 1>&6
4124     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4125   cat >> confdefs.h <<EOF
4126 #define $ac_tr_hdr 1
4127 EOF
4128  
4129 else
4130   echo "$ac_t""no" 1>&6
4131 fi
4132 done
4133
4134
4135         if test $ac_cv_header_ltdl_h = no ; then
4136                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4137         fi
4138
4139         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4140 echo "configure:4141: checking for lt_dlinit in -lltdl" >&5
4141 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4142 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4143   echo $ac_n "(cached) $ac_c" 1>&6
4144 else
4145   ac_save_LIBS="$LIBS"
4146 LIBS="-lltdl  $LIBS"
4147 cat > conftest.$ac_ext <<EOF
4148 #line 4149 "configure"
4149 #include "confdefs.h"
4150 /* Override any gcc2 internal prototype to avoid an error.  */
4151 /* We use char because int might match the return type of a gcc2
4152     builtin and then its argument prototype would still apply.  */
4153 char lt_dlinit();
4154
4155 int main() {
4156 lt_dlinit()
4157 ; return 0; }
4158 EOF
4159 if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4160   rm -rf conftest*
4161   eval "ac_cv_lib_$ac_lib_var=yes"
4162 else
4163   echo "configure: failed program was:" >&5
4164   cat conftest.$ac_ext >&5
4165   rm -rf conftest*
4166   eval "ac_cv_lib_$ac_lib_var=no"
4167 fi
4168 rm -f conftest*
4169 LIBS="$ac_save_LIBS"
4170
4171 fi
4172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4173   echo "$ac_t""yes" 1>&6
4174   
4175             MODULES_LIBS=-lltdl
4176             cat >> confdefs.h <<\EOF
4177 #define HAVE_LIBLTDL 1
4178 EOF
4179
4180         
4181 else
4182   echo "$ac_t""no" 1>&6
4183 fi
4184
4185
4186         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4187                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4188         fi
4189         ol_link_modules=yes
4190 else
4191         ol_with_bdb2_module=static
4192         ol_with_ldap_module=static
4193         ol_with_ldbm_module=static
4194         ol_with_passwd_module=static
4195         ol_with_perl_module=static
4196         ol_with_shell_module=static
4197         ol_with_tcl_module=static
4198 fi
4199
4200 # test for EBCDIC
4201 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4202 echo "configure:4203: checking for EBCDIC" >&5
4203 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4204   echo $ac_n "(cached) $ac_c" 1>&6
4205 else
4206   
4207         cat > conftest.$ac_ext <<EOF
4208 #line 4209 "configure"
4209 #include "confdefs.h"
4210
4211 #if !('M' == 0xd4)
4212 #include <__ASCII__/generate_error.h>
4213 #endif
4214
4215 EOF
4216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4217 { (eval echo configure:4218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4219 if test -z "$ac_err"; then
4220   rm -rf conftest*
4221   ol_cv_cpp_ebcdic=yes
4222 else
4223   echo "$ac_err" >&5
4224   echo "configure: failed program was:" >&5
4225   cat conftest.$ac_ext >&5
4226   rm -rf conftest*
4227   ol_cv_cpp_ebcdic=no
4228 fi
4229 rm -f conftest*
4230 fi
4231
4232 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4233 if test $ol_cv_cpp_ebcdic = yes ; then
4234         cat >> confdefs.h <<\EOF
4235 #define HAVE_EBCDIC 1
4236 EOF
4237
4238 fi
4239
4240 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4241 echo "configure:4242: checking for ANSI C header files" >&5
4242 if eval "test \"\${ol_cv_header_stdc+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 <stdlib.h>
4249 #include <stdarg.h>
4250 #include <string.h>
4251 #include <float.h>
4252 EOF
4253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4254 { (eval echo configure:4255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4256 if test -z "$ac_err"; then
4257   rm -rf conftest*
4258   ol_cv_header_stdc=yes
4259 else
4260   echo "$ac_err" >&5
4261   echo "configure: failed program was:" >&5
4262   cat conftest.$ac_ext >&5
4263   rm -rf conftest*
4264   ol_cv_header_stdc=no
4265 fi
4266 rm -f conftest*
4267
4268 if test $ol_cv_header_stdc = yes; then
4269   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4270 cat > conftest.$ac_ext <<EOF
4271 #line 4272 "configure"
4272 #include "confdefs.h"
4273 #include <string.h>
4274 EOF
4275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4276   egrep "memchr" >/dev/null 2>&1; then
4277   :
4278 else
4279   rm -rf conftest*
4280   ol_cv_header_stdc=no
4281 fi
4282 rm -f conftest*
4283
4284 fi
4285
4286 if test $ol_cv_header_stdc = yes; then
4287   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4288 cat > conftest.$ac_ext <<EOF
4289 #line 4290 "configure"
4290 #include "confdefs.h"
4291 #include <stdlib.h>
4292 EOF
4293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4294   egrep "free" >/dev/null 2>&1; then
4295   :
4296 else
4297   rm -rf conftest*
4298   ol_cv_header_stdc=no
4299 fi
4300 rm -f conftest*
4301
4302 fi
4303
4304 if test $ol_cv_header_stdc = yes; then
4305   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4306 if test "$cross_compiling" = yes; then
4307   :
4308 else
4309   cat > conftest.$ac_ext <<EOF
4310 #line 4311 "configure"
4311 #include "confdefs.h"
4312 #include <ctype.h>
4313 #ifndef HAVE_EBCDIC
4314 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4315 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4316 #else
4317 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4318                 || ('j' <= (c) && (c) <= 'r') \
4319                 || ('s' <= (c) && (c) <= 'z'))
4320 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4321 #endif
4322 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4323 int main () { int i; for (i = 0; i < 256; i++)
4324 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4325 exit (0); }
4326
4327 EOF
4328 if { (eval echo configure:4329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4329 then
4330   :
4331 else
4332   echo "configure: failed program was:" >&5
4333   cat conftest.$ac_ext >&5
4334   rm -fr conftest*
4335   ol_cv_header_stdc=no
4336 fi
4337 rm -fr conftest*
4338 fi
4339
4340 fi
4341 fi
4342
4343 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4344 if test $ol_cv_header_stdc = yes; then
4345   cat >> confdefs.h <<\EOF
4346 #define STDC_HEADERS 1
4347 EOF
4348
4349 fi
4350 ac_cv_header_stdc=disable
4351
4352
4353 if test $ol_cv_header_stdc != yes; then
4354         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4355 fi
4356
4357 ac_header_dirent=no
4358 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4359 do
4360 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4361 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4362 echo "configure:4363: checking for $ac_hdr that defines DIR" >&5
4363 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4364   echo $ac_n "(cached) $ac_c" 1>&6
4365 else
4366   cat > conftest.$ac_ext <<EOF
4367 #line 4368 "configure"
4368 #include "confdefs.h"
4369 #include <sys/types.h>
4370 #include <$ac_hdr>
4371 int main() {
4372 DIR *dirp = 0;
4373 ; return 0; }
4374 EOF
4375 if { (eval echo configure:4376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4376   rm -rf conftest*
4377   eval "ac_cv_header_dirent_$ac_safe=yes"
4378 else
4379   echo "configure: failed program was:" >&5
4380   cat conftest.$ac_ext >&5
4381   rm -rf conftest*
4382   eval "ac_cv_header_dirent_$ac_safe=no"
4383 fi
4384 rm -f conftest*
4385 fi
4386 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4387   echo "$ac_t""yes" 1>&6
4388     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4389   cat >> confdefs.h <<EOF
4390 #define $ac_tr_hdr 1
4391 EOF
4392  ac_header_dirent=$ac_hdr; break
4393 else
4394   echo "$ac_t""no" 1>&6
4395 fi
4396 done
4397 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4398 if test $ac_header_dirent = dirent.h; then
4399 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4400 echo "configure:4401: checking for opendir in -ldir" >&5
4401 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4402 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4403   echo $ac_n "(cached) $ac_c" 1>&6
4404 else
4405   ac_save_LIBS="$LIBS"
4406 LIBS="-ldir  $LIBS"
4407 cat > conftest.$ac_ext <<EOF
4408 #line 4409 "configure"
4409 #include "confdefs.h"
4410 /* Override any gcc2 internal prototype to avoid an error.  */
4411 /* We use char because int might match the return type of a gcc2
4412     builtin and then its argument prototype would still apply.  */
4413 char opendir();
4414
4415 int main() {
4416 opendir()
4417 ; return 0; }
4418 EOF
4419 if { (eval echo configure:4420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4420   rm -rf conftest*
4421   eval "ac_cv_lib_$ac_lib_var=yes"
4422 else
4423   echo "configure: failed program was:" >&5
4424   cat conftest.$ac_ext >&5
4425   rm -rf conftest*
4426   eval "ac_cv_lib_$ac_lib_var=no"
4427 fi
4428 rm -f conftest*
4429 LIBS="$ac_save_LIBS"
4430
4431 fi
4432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4433   echo "$ac_t""yes" 1>&6
4434   LIBS="$LIBS -ldir"
4435 else
4436   echo "$ac_t""no" 1>&6
4437 fi
4438
4439 else
4440 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4441 echo "configure:4442: checking for opendir in -lx" >&5
4442 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4443 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4444   echo $ac_n "(cached) $ac_c" 1>&6
4445 else
4446   ac_save_LIBS="$LIBS"
4447 LIBS="-lx  $LIBS"
4448 cat > conftest.$ac_ext <<EOF
4449 #line 4450 "configure"
4450 #include "confdefs.h"
4451 /* Override any gcc2 internal prototype to avoid an error.  */
4452 /* We use char because int might match the return type of a gcc2
4453     builtin and then its argument prototype would still apply.  */
4454 char opendir();
4455
4456 int main() {
4457 opendir()
4458 ; return 0; }
4459 EOF
4460 if { (eval echo configure:4461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4461   rm -rf conftest*
4462   eval "ac_cv_lib_$ac_lib_var=yes"
4463 else
4464   echo "configure: failed program was:" >&5
4465   cat conftest.$ac_ext >&5
4466   rm -rf conftest*
4467   eval "ac_cv_lib_$ac_lib_var=no"
4468 fi
4469 rm -f conftest*
4470 LIBS="$ac_save_LIBS"
4471
4472 fi
4473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4474   echo "$ac_t""yes" 1>&6
4475   LIBS="$LIBS -lx"
4476 else
4477   echo "$ac_t""no" 1>&6
4478 fi
4479
4480 fi
4481
4482 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4483 echo "configure:4484: checking for sys/wait.h that is POSIX.1 compatible" >&5
4484 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4485   echo $ac_n "(cached) $ac_c" 1>&6
4486 else
4487   cat > conftest.$ac_ext <<EOF
4488 #line 4489 "configure"
4489 #include "confdefs.h"
4490 #include <sys/types.h>
4491 #include <sys/wait.h>
4492 #ifndef WEXITSTATUS
4493 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4494 #endif
4495 #ifndef WIFEXITED
4496 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4497 #endif
4498 int main() {
4499 int s;
4500 wait (&s);
4501 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4502 ; return 0; }
4503 EOF
4504 if { (eval echo configure:4505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4505   rm -rf conftest*
4506   ac_cv_header_sys_wait_h=yes
4507 else
4508   echo "configure: failed program was:" >&5
4509   cat conftest.$ac_ext >&5
4510   rm -rf conftest*
4511   ac_cv_header_sys_wait_h=no
4512 fi
4513 rm -f conftest*
4514 fi
4515
4516 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4517 if test $ac_cv_header_sys_wait_h = yes; then
4518   cat >> confdefs.h <<\EOF
4519 #define HAVE_SYS_WAIT_H 1
4520 EOF
4521
4522 fi
4523
4524 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4525 echo "configure:4526: checking POSIX termios" >&5
4526 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4527   echo $ac_n "(cached) $ac_c" 1>&6
4528 else
4529   cat > conftest.$ac_ext <<EOF
4530 #line 4531 "configure"
4531 #include "confdefs.h"
4532 #include <sys/types.h>
4533 #include <unistd.h>
4534 #include <termios.h>
4535 int main() {
4536 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4537    tcgetattr(0, 0);
4538 ; return 0; }
4539 EOF
4540 if { (eval echo configure:4541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4541   rm -rf conftest*
4542   am_cv_sys_posix_termios=yes
4543 else
4544   echo "configure: failed program was:" >&5
4545   cat conftest.$ac_ext >&5
4546   rm -rf conftest*
4547   am_cv_sys_posix_termios=no
4548 fi
4549 rm -f conftest*
4550 fi
4551
4552 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4553
4554
4555  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4556 echo "configure:4557: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4557 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4558   echo $ac_n "(cached) $ac_c" 1>&6
4559 else
4560   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4561
4562   gwinsz_in_termios_h=no
4563   if test $am_cv_sys_posix_termios = yes; then
4564     cat > conftest.$ac_ext <<EOF
4565 #line 4566 "configure"
4566 #include "confdefs.h"
4567 #include <sys/types.h>
4568 #     include <termios.h>
4569 #     ifdef TIOCGWINSZ
4570         yes
4571 #     endif
4572     
4573 EOF
4574 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4575   egrep "yes" >/dev/null 2>&1; then
4576   rm -rf conftest*
4577   gwinsz_in_termios_h=yes
4578 fi
4579 rm -f conftest*
4580
4581   fi
4582
4583   if test $gwinsz_in_termios_h = no; then
4584     cat > conftest.$ac_ext <<EOF
4585 #line 4586 "configure"
4586 #include "confdefs.h"
4587 #include <sys/types.h>
4588 #     include <sys/ioctl.h>
4589 #     ifdef TIOCGWINSZ
4590         yes
4591 #     endif
4592     
4593 EOF
4594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4595   egrep "yes" >/dev/null 2>&1; then
4596   rm -rf conftest*
4597   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4598 fi
4599 rm -f conftest*
4600
4601   fi
4602   
4603 fi
4604
4605 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4606   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4607     cat >> confdefs.h <<\EOF
4608 #define GWINSZ_IN_SYS_IOCTL 1
4609 EOF
4610
4611   fi
4612
4613 if test $am_cv_sys_posix_termios = yes ; then
4614         cat >> confdefs.h <<\EOF
4615 #define HAVE_POSIX_TERMIOS 1
4616 EOF
4617
4618 fi
4619
4620 for ac_hdr in \
4621         arpa/inet.h             \
4622         arpa/nameser.h  \
4623         assert.h                \
4624         conio.h                 \
4625         crypt.h                 \
4626         direct.h                \
4627         errno.h                 \
4628         fcntl.h                 \
4629         filio.h                 \
4630         getopt.h                \
4631         grp.h                   \
4632         io.h                    \
4633         libutil.h               \
4634         limits.h                \
4635         locale.h                \
4636         netinet/tcp.h   \
4637         malloc.h                \
4638         memory.h                \
4639         psap.h                  \
4640         pwd.h                   \
4641         process.h               \
4642         resolv.h                \
4643         sgtty.h                 \
4644         shadow.h                \
4645         stddef.h                \
4646         string.h                \
4647         strings.h               \
4648         sysexits.h              \
4649         sys/file.h              \
4650         sys/filio.h             \
4651         sys/errno.h             \
4652         sys/ioctl.h             \
4653         sys/param.h             \
4654         sys/resource.h  \
4655         sys/select.h    \
4656         sys/socket.h    \
4657         sys/syslog.h    \
4658         sys/time.h              \
4659         sys/types.h             \
4660         syslog.h                \
4661         termios.h               \
4662         unistd.h                \
4663         winsock.h               \
4664
4665 do
4666 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4667 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4668 echo "configure:4669: checking for $ac_hdr" >&5
4669 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4670   echo $ac_n "(cached) $ac_c" 1>&6
4671 else
4672   cat > conftest.$ac_ext <<EOF
4673 #line 4674 "configure"
4674 #include "confdefs.h"
4675 #include <$ac_hdr>
4676 EOF
4677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4678 { (eval echo configure:4679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4680 if test -z "$ac_err"; then
4681   rm -rf conftest*
4682   eval "ac_cv_header_$ac_safe=yes"
4683 else
4684   echo "$ac_err" >&5
4685   echo "configure: failed program was:" >&5
4686   cat conftest.$ac_ext >&5
4687   rm -rf conftest*
4688   eval "ac_cv_header_$ac_safe=no"
4689 fi
4690 rm -f conftest*
4691 fi
4692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4693   echo "$ac_t""yes" 1>&6
4694     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4695   cat >> confdefs.h <<EOF
4696 #define $ac_tr_hdr 1
4697 EOF
4698  
4699 else
4700   echo "$ac_t""no" 1>&6
4701 fi
4702 done
4703
4704
4705
4706
4707 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4708 echo "configure:4709: checking for sigset in -lV3" >&5
4709 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4710 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4711   echo $ac_n "(cached) $ac_c" 1>&6
4712 else
4713   ac_save_LIBS="$LIBS"
4714 LIBS="-lV3  $LIBS"
4715 cat > conftest.$ac_ext <<EOF
4716 #line 4717 "configure"
4717 #include "confdefs.h"
4718 /* Override any gcc2 internal prototype to avoid an error.  */
4719 /* We use char because int might match the return type of a gcc2
4720     builtin and then its argument prototype would still apply.  */
4721 char sigset();
4722
4723 int main() {
4724 sigset()
4725 ; return 0; }
4726 EOF
4727 if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4728   rm -rf conftest*
4729   eval "ac_cv_lib_$ac_lib_var=yes"
4730 else
4731   echo "configure: failed program was:" >&5
4732   cat conftest.$ac_ext >&5
4733   rm -rf conftest*
4734   eval "ac_cv_lib_$ac_lib_var=no"
4735 fi
4736 rm -f conftest*
4737 LIBS="$ac_save_LIBS"
4738
4739 fi
4740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4741   echo "$ac_t""yes" 1>&6
4742     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4743     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4744   cat >> confdefs.h <<EOF
4745 #define $ac_tr_lib 1
4746 EOF
4747
4748   LIBS="-lV3 $LIBS"
4749
4750 else
4751   echo "$ac_t""no" 1>&6
4752 fi
4753
4754
4755 if test $ac_cv_header_winsock_h = yes; then
4756         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4757 echo "configure:4758: checking for winsock" >&5
4758 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4759   echo $ac_n "(cached) $ac_c" 1>&6
4760 else
4761   cat > conftest.$ac_ext <<EOF
4762 #line 4763 "configure"
4763 #include "confdefs.h"
4764 #include <winsock.h>
4765 int main() {
4766
4767                         socket(0,0,0);
4768                         select(0,NULL,NULL,NULL,NULL);
4769                         closesocket(0);
4770                         gethostname(NULL,0);
4771         
4772 ; return 0; }
4773 EOF
4774 if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4775   rm -rf conftest*
4776   ol_cv_winsock=yes
4777 else
4778   echo "configure: failed program was:" >&5
4779   cat conftest.$ac_ext >&5
4780   rm -rf conftest*
4781   ol_cv_winsock=no
4782 fi
4783 rm -f conftest*]
4784 fi
4785
4786 echo "$ac_t""$ol_cv_winsock" 1>&6
4787
4788         if test $ol_cv_winsock = yes ; then
4789                 cat >> confdefs.h <<\EOF
4790 #define HAVE_WINSOCK 1
4791 EOF
4792
4793                 ac_cv_func_socket=yes
4794                 ac_cv_func_select=yes
4795                 ac_cv_func_closesocket=yes
4796                 ac_cv_func_gethostname=yes
4797         fi
4798 fi
4799
4800
4801 echo $ac_n "checking for socket""... $ac_c" 1>&6
4802 echo "configure:4803: checking for socket" >&5
4803 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4804   echo $ac_n "(cached) $ac_c" 1>&6
4805 else
4806   cat > conftest.$ac_ext <<EOF
4807 #line 4808 "configure"
4808 #include "confdefs.h"
4809 /* System header to define __stub macros and hopefully few prototypes,
4810     which can conflict with char socket(); below.  */
4811 #include <assert.h>
4812 /* Override any gcc2 internal prototype to avoid an error.  */
4813 /* We use char because int might match the return type of a gcc2
4814     builtin and then its argument prototype would still apply.  */
4815 char socket();
4816 char (*f)();
4817
4818 int main() {
4819
4820 /* The GNU C library defines this for functions which it implements
4821     to always fail with ENOSYS.  Some functions are actually named
4822     something starting with __ and the normal name is an alias.  */
4823 #if defined (__stub_socket) || defined (__stub___socket)
4824 choke me
4825 #else
4826 f = socket;
4827 #endif
4828
4829 ; return 0; }
4830 EOF
4831 if { (eval echo configure:4832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4832   rm -rf conftest*
4833   eval "ac_cv_func_socket=yes"
4834 else
4835   echo "configure: failed program was:" >&5
4836   cat conftest.$ac_ext >&5
4837   rm -rf conftest*
4838   eval "ac_cv_func_socket=no"
4839 fi
4840 rm -f conftest*
4841 fi
4842
4843 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4844   echo "$ac_t""yes" 1>&6
4845   :
4846 else
4847   echo "$ac_t""no" 1>&6
4848         
4849         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4850 echo "configure:4851: checking for main in -lsocket" >&5
4851 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4852 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4853   echo $ac_n "(cached) $ac_c" 1>&6
4854 else
4855   ac_save_LIBS="$LIBS"
4856 LIBS="-lsocket  $LIBS"
4857 cat > conftest.$ac_ext <<EOF
4858 #line 4859 "configure"
4859 #include "confdefs.h"
4860
4861 int main() {
4862 main()
4863 ; return 0; }
4864 EOF
4865 if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4866   rm -rf conftest*
4867   eval "ac_cv_lib_$ac_lib_var=yes"
4868 else
4869   echo "configure: failed program was:" >&5
4870   cat conftest.$ac_ext >&5
4871   rm -rf conftest*
4872   eval "ac_cv_lib_$ac_lib_var=no"
4873 fi
4874 rm -f conftest*
4875 LIBS="$ac_save_LIBS"
4876
4877 fi
4878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4879   echo "$ac_t""yes" 1>&6
4880     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4881     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4882   cat >> confdefs.h <<EOF
4883 #define $ac_tr_lib 1
4884 EOF
4885
4886   LIBS="-lsocket $LIBS"
4887
4888 else
4889   echo "$ac_t""no" 1>&6
4890 fi
4891
4892         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4893 echo "configure:4894: checking for main in -lnet" >&5
4894 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4895 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4896   echo $ac_n "(cached) $ac_c" 1>&6
4897 else
4898   ac_save_LIBS="$LIBS"
4899 LIBS="-lnet  $LIBS"
4900 cat > conftest.$ac_ext <<EOF
4901 #line 4902 "configure"
4902 #include "confdefs.h"
4903
4904 int main() {
4905 main()
4906 ; return 0; }
4907 EOF
4908 if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4909   rm -rf conftest*
4910   eval "ac_cv_lib_$ac_lib_var=yes"
4911 else
4912   echo "configure: failed program was:" >&5
4913   cat conftest.$ac_ext >&5
4914   rm -rf conftest*
4915   eval "ac_cv_lib_$ac_lib_var=no"
4916 fi
4917 rm -f conftest*
4918 LIBS="$ac_save_LIBS"
4919
4920 fi
4921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4922   echo "$ac_t""yes" 1>&6
4923     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4924     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4925   cat >> confdefs.h <<EOF
4926 #define $ac_tr_lib 1
4927 EOF
4928
4929   LIBS="-lnet $LIBS"
4930
4931 else
4932   echo "$ac_t""no" 1>&6
4933 fi
4934
4935         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4936 echo "configure:4937: checking for main in -lnsl_s" >&5
4937 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4939   echo $ac_n "(cached) $ac_c" 1>&6
4940 else
4941   ac_save_LIBS="$LIBS"
4942 LIBS="-lnsl_s  $LIBS"
4943 cat > conftest.$ac_ext <<EOF
4944 #line 4945 "configure"
4945 #include "confdefs.h"
4946
4947 int main() {
4948 main()
4949 ; return 0; }
4950 EOF
4951 if { (eval echo configure:4952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4952   rm -rf conftest*
4953   eval "ac_cv_lib_$ac_lib_var=yes"
4954 else
4955   echo "configure: failed program was:" >&5
4956   cat conftest.$ac_ext >&5
4957   rm -rf conftest*
4958   eval "ac_cv_lib_$ac_lib_var=no"
4959 fi
4960 rm -f conftest*
4961 LIBS="$ac_save_LIBS"
4962
4963 fi
4964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4965   echo "$ac_t""yes" 1>&6
4966     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4967     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4968   cat >> confdefs.h <<EOF
4969 #define $ac_tr_lib 1
4970 EOF
4971
4972   LIBS="-lnsl_s $LIBS"
4973
4974 else
4975   echo "$ac_t""no" 1>&6
4976 fi
4977
4978         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4979 echo "configure:4980: checking for main in -lnsl" >&5
4980 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4981 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4982   echo $ac_n "(cached) $ac_c" 1>&6
4983 else
4984   ac_save_LIBS="$LIBS"
4985 LIBS="-lnsl  $LIBS"
4986 cat > conftest.$ac_ext <<EOF
4987 #line 4988 "configure"
4988 #include "confdefs.h"
4989
4990 int main() {
4991 main()
4992 ; return 0; }
4993 EOF
4994 if { (eval echo configure:4995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4995   rm -rf conftest*
4996   eval "ac_cv_lib_$ac_lib_var=yes"
4997 else
4998   echo "configure: failed program was:" >&5
4999   cat conftest.$ac_ext >&5
5000   rm -rf conftest*
5001   eval "ac_cv_lib_$ac_lib_var=no"
5002 fi
5003 rm -f conftest*
5004 LIBS="$ac_save_LIBS"
5005
5006 fi
5007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5008   echo "$ac_t""yes" 1>&6
5009     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5010     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5011   cat >> confdefs.h <<EOF
5012 #define $ac_tr_lib 1
5013 EOF
5014
5015   LIBS="-lnsl $LIBS"
5016
5017 else
5018   echo "$ac_t""no" 1>&6
5019 fi
5020
5021         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5022 echo "configure:5023: checking for socket in -linet" >&5
5023 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5025   echo $ac_n "(cached) $ac_c" 1>&6
5026 else
5027   ac_save_LIBS="$LIBS"
5028 LIBS="-linet  $LIBS"
5029 cat > conftest.$ac_ext <<EOF
5030 #line 5031 "configure"
5031 #include "confdefs.h"
5032 /* Override any gcc2 internal prototype to avoid an error.  */
5033 /* We use char because int might match the return type of a gcc2
5034     builtin and then its argument prototype would still apply.  */
5035 char socket();
5036
5037 int main() {
5038 socket()
5039 ; return 0; }
5040 EOF
5041 if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5042   rm -rf conftest*
5043   eval "ac_cv_lib_$ac_lib_var=yes"
5044 else
5045   echo "configure: failed program was:" >&5
5046   cat conftest.$ac_ext >&5
5047   rm -rf conftest*
5048   eval "ac_cv_lib_$ac_lib_var=no"
5049 fi
5050 rm -f conftest*
5051 LIBS="$ac_save_LIBS"
5052
5053 fi
5054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5055   echo "$ac_t""yes" 1>&6
5056     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5057     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5058   cat >> confdefs.h <<EOF
5059 #define $ac_tr_lib 1
5060 EOF
5061
5062   LIBS="-linet $LIBS"
5063
5064 else
5065   echo "$ac_t""no" 1>&6
5066 fi
5067
5068         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5069 echo "configure:5070: checking for main in -lgen" >&5
5070 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5071 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5072   echo $ac_n "(cached) $ac_c" 1>&6
5073 else
5074   ac_save_LIBS="$LIBS"
5075 LIBS="-lgen  $LIBS"
5076 cat > conftest.$ac_ext <<EOF
5077 #line 5078 "configure"
5078 #include "confdefs.h"
5079
5080 int main() {
5081 main()
5082 ; return 0; }
5083 EOF
5084 if { (eval echo configure:5085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5085   rm -rf conftest*
5086   eval "ac_cv_lib_$ac_lib_var=yes"
5087 else
5088   echo "configure: failed program was:" >&5
5089   cat conftest.$ac_ext >&5
5090   rm -rf conftest*
5091   eval "ac_cv_lib_$ac_lib_var=no"
5092 fi
5093 rm -f conftest*
5094 LIBS="$ac_save_LIBS"
5095
5096 fi
5097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5098   echo "$ac_t""yes" 1>&6
5099     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5100     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5101   cat >> confdefs.h <<EOF
5102 #define $ac_tr_lib 1
5103 EOF
5104
5105   LIBS="-lgen $LIBS"
5106
5107 else
5108   echo "$ac_t""no" 1>&6
5109 fi
5110
5111
5112 fi
5113
5114
5115 echo $ac_n "checking for select""... $ac_c" 1>&6
5116 echo "configure:5117: checking for select" >&5
5117 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5118   echo $ac_n "(cached) $ac_c" 1>&6
5119 else
5120   cat > conftest.$ac_ext <<EOF
5121 #line 5122 "configure"
5122 #include "confdefs.h"
5123 /* System header to define __stub macros and hopefully few prototypes,
5124     which can conflict with char select(); below.  */
5125 #include <assert.h>
5126 /* Override any gcc2 internal prototype to avoid an error.  */
5127 /* We use char because int might match the return type of a gcc2
5128     builtin and then its argument prototype would still apply.  */
5129 char select();
5130 char (*f)();
5131
5132 int main() {
5133
5134 /* The GNU C library defines this for functions which it implements
5135     to always fail with ENOSYS.  Some functions are actually named
5136     something starting with __ and the normal name is an alias.  */
5137 #if defined (__stub_select) || defined (__stub___select)
5138 choke me
5139 #else
5140 f = select;
5141 #endif
5142
5143 ; return 0; }
5144 EOF
5145 if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5146   rm -rf conftest*
5147   eval "ac_cv_func_select=yes"
5148 else
5149   echo "configure: failed program was:" >&5
5150   cat conftest.$ac_ext >&5
5151   rm -rf conftest*
5152   eval "ac_cv_func_select=no"
5153 fi
5154 rm -f conftest*
5155 fi
5156
5157 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5158   echo "$ac_t""yes" 1>&6
5159   :
5160 else
5161   echo "$ac_t""no" 1>&6
5162 { echo "configure: error: select() required." 1>&2; exit 1; }
5163 fi
5164
5165
5166 if test "${ac_cv_header_winsock_h}" != yes; then
5167                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5168 echo "configure:5169: checking types of arguments for select()" >&5
5169  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5170   echo $ac_n "(cached) $ac_c" 1>&6
5171 else
5172    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5173   echo $ac_n "(cached) $ac_c" 1>&6
5174 else
5175     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5176   echo $ac_n "(cached) $ac_c" 1>&6
5177 else
5178      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5179      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5180       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5181        cat > conftest.$ac_ext <<EOF
5182 #line 5183 "configure"
5183 #include "confdefs.h"
5184 #ifdef HAVE_SYS_TYPES_H
5185 #include <sys/types.h>
5186 #endif
5187 #ifdef HAVE_SYS_TIME_H
5188 #include <sys/time.h>
5189 #endif
5190 #ifdef HAVE_SYS_SELECT_H
5191 #include <sys/select.h>
5192 #endif
5193 #ifdef HAVE_SYS_SOCKET_H
5194 #include <sys/socket.h>
5195 #endif
5196 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);
5197 int main() {
5198
5199 ; return 0; }
5200 EOF
5201 if { (eval echo configure:5202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5202   rm -rf conftest*
5203           ac_not_found=no ; break 3
5204 else
5205   echo "configure: failed program was:" >&5
5206   cat conftest.$ac_ext >&5
5207   rm -rf conftest*
5208   ac_not_found=yes
5209 fi
5210 rm -f conftest*
5211       done
5212      done
5213     done
5214    
5215 fi
5216   
5217 fi
5218  
5219 fi
5220  if test "$ac_not_found" = yes; then
5221   ac_cv_func_select_arg1=int 
5222   ac_cv_func_select_arg234='int *' 
5223   ac_cv_func_select_arg5='struct timeval *'
5224  fi
5225  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5226  cat >> confdefs.h <<EOF
5227 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5228 EOF
5229
5230  cat >> confdefs.h <<EOF
5231 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5232 EOF
5233
5234  cat >> confdefs.h <<EOF
5235 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5236 EOF
5237
5238
5239 fi
5240
5241
5242 for ac_hdr in regex.h 
5243 do
5244 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5245 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5246 echo "configure:5247: checking for $ac_hdr" >&5
5247 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5248   echo $ac_n "(cached) $ac_c" 1>&6
5249 else
5250   cat > conftest.$ac_ext <<EOF
5251 #line 5252 "configure"
5252 #include "confdefs.h"
5253 #include <$ac_hdr>
5254 EOF
5255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5256 { (eval echo configure:5257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5258 if test -z "$ac_err"; then
5259   rm -rf conftest*
5260   eval "ac_cv_header_$ac_safe=yes"
5261 else
5262   echo "$ac_err" >&5
5263   echo "configure: failed program was:" >&5
5264   cat conftest.$ac_ext >&5
5265   rm -rf conftest*
5266   eval "ac_cv_header_$ac_safe=no"
5267 fi
5268 rm -f conftest*
5269 fi
5270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5271   echo "$ac_t""yes" 1>&6
5272     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5273   cat >> confdefs.h <<EOF
5274 #define $ac_tr_hdr 1
5275 EOF
5276  
5277 else
5278   echo "$ac_t""no" 1>&6
5279 fi
5280 done
5281
5282 if test "$ac_cv_header_regex_h" != yes ; then
5283         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5284 fi
5285 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5286 echo "configure:5287: checking for regfree" >&5
5287 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290   cat > conftest.$ac_ext <<EOF
5291 #line 5292 "configure"
5292 #include "confdefs.h"
5293 /* System header to define __stub macros and hopefully few prototypes,
5294     which can conflict with char regfree(); below.  */
5295 #include <assert.h>
5296 /* Override any gcc2 internal prototype to avoid an error.  */
5297 /* We use char because int might match the return type of a gcc2
5298     builtin and then its argument prototype would still apply.  */
5299 char regfree();
5300 char (*f)();
5301
5302 int main() {
5303
5304 /* The GNU C library defines this for functions which it implements
5305     to always fail with ENOSYS.  Some functions are actually named
5306     something starting with __ and the normal name is an alias.  */
5307 #if defined (__stub_regfree) || defined (__stub___regfree)
5308 choke me
5309 #else
5310 f = regfree;
5311 #endif
5312
5313 ; return 0; }
5314 EOF
5315 if { (eval echo configure:5316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5316   rm -rf conftest*
5317   eval "ac_cv_func_regfree=yes"
5318 else
5319   echo "configure: failed program was:" >&5
5320   cat conftest.$ac_ext >&5
5321   rm -rf conftest*
5322   eval "ac_cv_func_regfree=no"
5323 fi
5324 rm -f conftest*
5325 fi
5326
5327 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5328   echo "$ac_t""yes" 1>&6
5329   :
5330 else
5331   echo "$ac_t""no" 1>&6
5332 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5333 fi
5334
5335
5336
5337 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5338 echo "configure:5339: checking for compatible POSIX regex" >&5
5339 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5340   echo $ac_n "(cached) $ac_c" 1>&6
5341 else
5342   
5343         if test "$cross_compiling" = yes; then
5344   ol_cv_c_posix_regex=cross
5345 else
5346   cat > conftest.$ac_ext <<EOF
5347 #line 5348 "configure"
5348 #include "confdefs.h"
5349
5350 #include <sys/types.h>
5351 #include <regex.h>
5352 static char *pattern, *string;
5353 main()
5354 {
5355         int rc;
5356         regex_t re;
5357
5358         pattern = "^A";
5359
5360         if(regcomp(&re, pattern, 0)) {
5361                 return -1;
5362         }
5363         
5364         string = "ALL MATCH";
5365         
5366         rc = regexec(&re, string, 0, (void*)0, 0);
5367
5368         regfree(&re);
5369
5370         return rc;
5371 }
5372 EOF
5373 if { (eval echo configure:5374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5374 then
5375   ol_cv_c_posix_regex=yes
5376 else
5377   echo "configure: failed program was:" >&5
5378   cat conftest.$ac_ext >&5
5379   rm -fr conftest*
5380   ol_cv_c_posix_regex=no
5381 fi
5382 rm -fr conftest*
5383 fi
5384
5385 fi
5386
5387 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5388
5389 if test "$ol_cv_c_posix_regex" = no ; then
5390         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5391 fi
5392
5393 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5394 echo "configure:5395: checking for res_search" >&5
5395 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5396   echo $ac_n "(cached) $ac_c" 1>&6
5397 else
5398   cat > conftest.$ac_ext <<EOF
5399 #line 5400 "configure"
5400 #include "confdefs.h"
5401 /* System header to define __stub macros and hopefully few prototypes,
5402     which can conflict with char res_search(); below.  */
5403 #include <assert.h>
5404 /* Override any gcc2 internal prototype to avoid an error.  */
5405 /* We use char because int might match the return type of a gcc2
5406     builtin and then its argument prototype would still apply.  */
5407 char res_search();
5408 char (*f)();
5409
5410 int main() {
5411
5412 /* The GNU C library defines this for functions which it implements
5413     to always fail with ENOSYS.  Some functions are actually named
5414     something starting with __ and the normal name is an alias.  */
5415 #if defined (__stub_res_search) || defined (__stub___res_search)
5416 choke me
5417 #else
5418 f = res_search;
5419 #endif
5420
5421 ; return 0; }
5422 EOF
5423 if { (eval echo configure:5424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5424   rm -rf conftest*
5425   eval "ac_cv_func_res_search=yes"
5426 else
5427   echo "configure: failed program was:" >&5
5428   cat conftest.$ac_ext >&5
5429   rm -rf conftest*
5430   eval "ac_cv_func_res_search=no"
5431 fi
5432 rm -f conftest*
5433 fi
5434
5435 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5436   echo "$ac_t""yes" 1>&6
5437   :
5438 else
5439   echo "$ac_t""no" 1>&6
5440 fi
5441
5442 if test $ac_cv_func_res_search = no ; then 
5443         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5444 echo "configure:5445: checking for res_search in -lbind" >&5
5445 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5446 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5447   echo $ac_n "(cached) $ac_c" 1>&6
5448 else
5449   ac_save_LIBS="$LIBS"
5450 LIBS="-lbind  $LIBS"
5451 cat > conftest.$ac_ext <<EOF
5452 #line 5453 "configure"
5453 #include "confdefs.h"
5454 /* Override any gcc2 internal prototype to avoid an error.  */
5455 /* We use char because int might match the return type of a gcc2
5456     builtin and then its argument prototype would still apply.  */
5457 char res_search();
5458
5459 int main() {
5460 res_search()
5461 ; return 0; }
5462 EOF
5463 if { (eval echo configure:5464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5464   rm -rf conftest*
5465   eval "ac_cv_lib_$ac_lib_var=yes"
5466 else
5467   echo "configure: failed program was:" >&5
5468   cat conftest.$ac_ext >&5
5469   rm -rf conftest*
5470   eval "ac_cv_lib_$ac_lib_var=no"
5471 fi
5472 rm -f conftest*
5473 LIBS="$ac_save_LIBS"
5474
5475 fi
5476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5477   echo "$ac_t""yes" 1>&6
5478     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5479     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5480   cat >> confdefs.h <<EOF
5481 #define $ac_tr_lib 1
5482 EOF
5483
5484   LIBS="-lbind $LIBS"
5485
5486 else
5487   echo "$ac_t""no" 1>&6
5488 fi
5489
5490         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5491 fi
5492
5493 if test $ac_cv_func_res_search = no ; then 
5494         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5495 echo "configure:5496: checking for __res_search in -lbind" >&5
5496 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5497 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5498   echo $ac_n "(cached) $ac_c" 1>&6
5499 else
5500   ac_save_LIBS="$LIBS"
5501 LIBS="-lbind  $LIBS"
5502 cat > conftest.$ac_ext <<EOF
5503 #line 5504 "configure"
5504 #include "confdefs.h"
5505 /* Override any gcc2 internal prototype to avoid an error.  */
5506 /* We use char because int might match the return type of a gcc2
5507     builtin and then its argument prototype would still apply.  */
5508 char __res_search();
5509
5510 int main() {
5511 __res_search()
5512 ; return 0; }
5513 EOF
5514 if { (eval echo configure:5515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5515   rm -rf conftest*
5516   eval "ac_cv_lib_$ac_lib_var=yes"
5517 else
5518   echo "configure: failed program was:" >&5
5519   cat conftest.$ac_ext >&5
5520   rm -rf conftest*
5521   eval "ac_cv_lib_$ac_lib_var=no"
5522 fi
5523 rm -f conftest*
5524 LIBS="$ac_save_LIBS"
5525
5526 fi
5527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5528   echo "$ac_t""yes" 1>&6
5529     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5530     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5531   cat >> confdefs.h <<EOF
5532 #define $ac_tr_lib 1
5533 EOF
5534
5535   LIBS="-lbind $LIBS"
5536
5537 else
5538   echo "$ac_t""no" 1>&6
5539 fi
5540
5541         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5542 fi
5543
5544 if test $ac_cv_func_res_search = no ; then 
5545         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5546 echo "configure:5547: checking for res_search in -lresolv" >&5
5547 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5548 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5549   echo $ac_n "(cached) $ac_c" 1>&6
5550 else
5551   ac_save_LIBS="$LIBS"
5552 LIBS="-lresolv  $LIBS"
5553 cat > conftest.$ac_ext <<EOF
5554 #line 5555 "configure"
5555 #include "confdefs.h"
5556 /* Override any gcc2 internal prototype to avoid an error.  */
5557 /* We use char because int might match the return type of a gcc2
5558     builtin and then its argument prototype would still apply.  */
5559 char res_search();
5560
5561 int main() {
5562 res_search()
5563 ; return 0; }
5564 EOF
5565 if { (eval echo configure:5566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5566   rm -rf conftest*
5567   eval "ac_cv_lib_$ac_lib_var=yes"
5568 else
5569   echo "configure: failed program was:" >&5
5570   cat conftest.$ac_ext >&5
5571   rm -rf conftest*
5572   eval "ac_cv_lib_$ac_lib_var=no"
5573 fi
5574 rm -f conftest*
5575 LIBS="$ac_save_LIBS"
5576
5577 fi
5578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5579   echo "$ac_t""yes" 1>&6
5580     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5581     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5582   cat >> confdefs.h <<EOF
5583 #define $ac_tr_lib 1
5584 EOF
5585
5586   LIBS="-lresolv $LIBS"
5587
5588 else
5589   echo "$ac_t""no" 1>&6
5590 fi
5591
5592         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5593 fi
5594
5595 if test "$ac_cv_func_res_search" = yes ; then
5596         cat >> confdefs.h <<\EOF
5597 #define HAVE_RES_SEARCH 1
5598 EOF
5599
5600 elif test $ol_enable_dns = yes ; then
5601         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5602 elif test $ol_enable_dns != no ; then
5603         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5604 fi
5605
5606
5607 ol_link_isode=no
5608 if test $ol_enable_ldapd != no ; then
5609         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5610
5611                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5612 echo "configure:5613: checking for main in -lxtpp" >&5
5613 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5614 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5615   echo $ac_n "(cached) $ac_c" 1>&6
5616 else
5617   ac_save_LIBS="$LIBS"
5618 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5619 cat > conftest.$ac_ext <<EOF
5620 #line 5621 "configure"
5621 #include "confdefs.h"
5622
5623 int main() {
5624 main()
5625 ; return 0; }
5626 EOF
5627 if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5628   rm -rf conftest*
5629   eval "ac_cv_lib_$ac_lib_var=yes"
5630 else
5631   echo "configure: failed program was:" >&5
5632   cat conftest.$ac_ext >&5
5633   rm -rf conftest*
5634   eval "ac_cv_lib_$ac_lib_var=no"
5635 fi
5636 rm -f conftest*
5637 LIBS="$ac_save_LIBS"
5638
5639 fi
5640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5641   echo "$ac_t""yes" 1>&6
5642   
5643                 ol_link_isode=yes
5644                 cat >> confdefs.h <<\EOF
5645 #define HAVE_XTPP 1
5646 EOF
5647
5648                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5649                 
5650 else
5651   echo "$ac_t""no" 1>&6
5652 :
5653 fi
5654
5655         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5656 echo "configure:5657: checking for main in -ldsap" >&5
5657 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5658 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5659   echo $ac_n "(cached) $ac_c" 1>&6
5660 else
5661   ac_save_LIBS="$LIBS"
5662 LIBS="-ldsap -lisode $LIBS"
5663 cat > conftest.$ac_ext <<EOF
5664 #line 5665 "configure"
5665 #include "confdefs.h"
5666
5667 int main() {
5668 main()
5669 ; return 0; }
5670 EOF
5671 if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5672   rm -rf conftest*
5673   eval "ac_cv_lib_$ac_lib_var=yes"
5674 else
5675   echo "configure: failed program was:" >&5
5676   cat conftest.$ac_ext >&5
5677   rm -rf conftest*
5678   eval "ac_cv_lib_$ac_lib_var=no"
5679 fi
5680 rm -f conftest*
5681 LIBS="$ac_save_LIBS"
5682
5683 fi
5684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5685   echo "$ac_t""yes" 1>&6
5686   
5687                 ol_link_isode=yes
5688                 cat >> confdefs.h <<\EOF
5689 #define HAVE_DSAP 1
5690 EOF
5691
5692                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5693                 
5694 else
5695   echo "$ac_t""no" 1>&6
5696 :
5697 fi
5698
5699         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5700 echo "configure:5701: checking for main in -lisode" >&5
5701 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5702 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5703   echo $ac_n "(cached) $ac_c" 1>&6
5704 else
5705   ac_save_LIBS="$LIBS"
5706 LIBS="-lisode  $LIBS"
5707 cat > conftest.$ac_ext <<EOF
5708 #line 5709 "configure"
5709 #include "confdefs.h"
5710
5711 int main() {
5712 main()
5713 ; return 0; }
5714 EOF
5715 if { (eval echo configure:5716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5716   rm -rf conftest*
5717   eval "ac_cv_lib_$ac_lib_var=yes"
5718 else
5719   echo "configure: failed program was:" >&5
5720   cat conftest.$ac_ext >&5
5721   rm -rf conftest*
5722   eval "ac_cv_lib_$ac_lib_var=no"
5723 fi
5724 rm -f conftest*
5725 LIBS="$ac_save_LIBS"
5726
5727 fi
5728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5729   echo "$ac_t""yes" 1>&6
5730   
5731                 ol_link_isode=yes
5732                 cat >> confdefs.h <<\EOF
5733 #define HAVE_ISODE 1
5734 EOF
5735
5736                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5737                 
5738 else
5739   echo "$ac_t""no" 1>&6
5740 :
5741 fi
5742
5743 fi
5744
5745 if test $ol_link_isode != no; then
5746         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5747 echo "configure:5748: checking for main in -lpp" >&5
5748 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5749 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5750   echo $ac_n "(cached) $ac_c" 1>&6
5751 else
5752   ac_save_LIBS="$LIBS"
5753 LIBS="-lpp  $LIBS"
5754 cat > conftest.$ac_ext <<EOF
5755 #line 5756 "configure"
5756 #include "confdefs.h"
5757
5758 int main() {
5759 main()
5760 ; return 0; }
5761 EOF
5762 if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5763   rm -rf conftest*
5764   eval "ac_cv_lib_$ac_lib_var=yes"
5765 else
5766   echo "configure: failed program was:" >&5
5767   cat conftest.$ac_ext >&5
5768   rm -rf conftest*
5769   eval "ac_cv_lib_$ac_lib_var=no"
5770 fi
5771 rm -f conftest*
5772 LIBS="$ac_save_LIBS"
5773
5774 fi
5775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5776   echo "$ac_t""yes" 1>&6
5777   
5778                 cat >> confdefs.h <<\EOF
5779 #define HAVE_PP 1
5780 EOF
5781
5782                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5783                 
5784 else
5785   echo "$ac_t""no" 1>&6
5786 :
5787 fi
5788
5789
5790         # Extract the first word of "pepsy", so it can be a program name with args.
5791 set dummy pepsy; ac_word=$2
5792 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5793 echo "configure:5794: checking for $ac_word" >&5
5794 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5795   echo $ac_n "(cached) $ac_c" 1>&6
5796 else
5797   case "$PEPSY" in
5798   /*)
5799   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5800   ;;
5801   ?:/*)
5802   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5803   ;;
5804   *)
5805   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5806   ac_dummy="$PATH"
5807   for ac_dir in $ac_dummy; do 
5808     test -z "$ac_dir" && ac_dir=.
5809     if test -f $ac_dir/$ac_word; then
5810       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5811       break
5812     fi
5813   done
5814   IFS="$ac_save_ifs"
5815   ;;
5816 esac
5817 fi
5818 PEPSY="$ac_cv_path_PEPSY"
5819 if test -n "$PEPSY"; then
5820   echo "$ac_t""$PEPSY" 1>&6
5821 else
5822   echo "$ac_t""no" 1>&6
5823 fi
5824
5825 fi
5826
5827 if test $ol_enable_quipu != no ; then
5828         for ac_hdr in quipu/commonarg.h
5829 do
5830 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5831 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5832 echo "configure:5833: checking for $ac_hdr" >&5
5833 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5834   echo $ac_n "(cached) $ac_c" 1>&6
5835 else
5836   cat > conftest.$ac_ext <<EOF
5837 #line 5838 "configure"
5838 #include "confdefs.h"
5839 #include <$ac_hdr>
5840 EOF
5841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5842 { (eval echo configure:5843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5844 if test -z "$ac_err"; then
5845   rm -rf conftest*
5846   eval "ac_cv_header_$ac_safe=yes"
5847 else
5848   echo "$ac_err" >&5
5849   echo "configure: failed program was:" >&5
5850   cat conftest.$ac_ext >&5
5851   rm -rf conftest*
5852   eval "ac_cv_header_$ac_safe=no"
5853 fi
5854 rm -f conftest*
5855 fi
5856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5857   echo "$ac_t""yes" 1>&6
5858     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5859   cat >> confdefs.h <<EOF
5860 #define $ac_tr_hdr 1
5861 EOF
5862  
5863 else
5864   echo "$ac_t""no" 1>&6
5865 fi
5866 done
5867
5868
5869         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5870                 BUILD_QUIPU=yes
5871         elif test $ol_enable_quipu = auto ; then
5872                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5873         else
5874                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5875         fi
5876 fi
5877
5878 ol_link_kbind=no
5879 ol_link_kpasswd=no
5880 ol_link_krb5=no
5881 ol_link_krb4=no
5882
5883 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5884         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5885
5886         for ac_hdr in krb5.h
5887 do
5888 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5889 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5890 echo "configure:5891: checking for $ac_hdr" >&5
5891 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5892   echo $ac_n "(cached) $ac_c" 1>&6
5893 else
5894   cat > conftest.$ac_ext <<EOF
5895 #line 5896 "configure"
5896 #include "confdefs.h"
5897 #include <$ac_hdr>
5898 EOF
5899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5900 { (eval echo configure:5901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5901 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5902 if test -z "$ac_err"; then
5903   rm -rf conftest*
5904   eval "ac_cv_header_$ac_safe=yes"
5905 else
5906   echo "$ac_err" >&5
5907   echo "configure: failed program was:" >&5
5908   cat conftest.$ac_ext >&5
5909   rm -rf conftest*
5910   eval "ac_cv_header_$ac_safe=no"
5911 fi
5912 rm -f conftest*
5913 fi
5914 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5915   echo "$ac_t""yes" 1>&6
5916     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5917   cat >> confdefs.h <<EOF
5918 #define $ac_tr_hdr 1
5919 EOF
5920  
5921 else
5922   echo "$ac_t""no" 1>&6
5923 fi
5924 done
5925
5926
5927         if test $ac_cv_header_krb5_h = yes ; then
5928                                 for ac_hdr in heim_err.h
5929 do
5930 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5931 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5932 echo "configure:5933: checking for $ac_hdr" >&5
5933 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5934   echo $ac_n "(cached) $ac_c" 1>&6
5935 else
5936   cat > conftest.$ac_ext <<EOF
5937 #line 5938 "configure"
5938 #include "confdefs.h"
5939 #include <$ac_hdr>
5940 EOF
5941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5942 { (eval echo configure:5943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5943 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5944 if test -z "$ac_err"; then
5945   rm -rf conftest*
5946   eval "ac_cv_header_$ac_safe=yes"
5947 else
5948   echo "$ac_err" >&5
5949   echo "configure: failed program was:" >&5
5950   cat conftest.$ac_ext >&5
5951   rm -rf conftest*
5952   eval "ac_cv_header_$ac_safe=no"
5953 fi
5954 rm -f conftest*
5955 fi
5956 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5957   echo "$ac_t""yes" 1>&6
5958     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5959   cat >> confdefs.h <<EOF
5960 #define $ac_tr_hdr 1
5961 EOF
5962  
5963 else
5964   echo "$ac_t""no" 1>&6
5965 fi
5966 done
5967
5968                 if test $ac_cv_header_heim_err_h = yes ; then
5969                         krb5_impl=heimdal
5970                 else
5971                         krb5_impl=mit
5972                 fi
5973
5974                 if test $krb5_impl = mit; then
5975                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5976 echo "configure:5977: checking for main in -lkrb5" >&5
5977 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5978 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5979   echo $ac_n "(cached) $ac_c" 1>&6
5980 else
5981   ac_save_LIBS="$LIBS"
5982 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5983 cat > conftest.$ac_ext <<EOF
5984 #line 5985 "configure"
5985 #include "confdefs.h"
5986
5987 int main() {
5988 main()
5989 ; return 0; }
5990 EOF
5991 if { (eval echo configure:5992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5992   rm -rf conftest*
5993   eval "ac_cv_lib_$ac_lib_var=yes"
5994 else
5995   echo "configure: failed program was:" >&5
5996   cat conftest.$ac_ext >&5
5997   rm -rf conftest*
5998   eval "ac_cv_lib_$ac_lib_var=no"
5999 fi
6000 rm -f conftest*
6001 LIBS="$ac_save_LIBS"
6002
6003 fi
6004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6005   echo "$ac_t""yes" 1>&6
6006   have_krb5=yes
6007                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6008 else
6009   echo "$ac_t""no" 1>&6
6010 have_krb5=no
6011 fi
6012
6013
6014                 elif test $krb5_impl = heimdal; then
6015                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6016 echo "configure:6017: checking for main in -lkrb5" >&5
6017 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6018 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6019   echo $ac_n "(cached) $ac_c" 1>&6
6020 else
6021   ac_save_LIBS="$LIBS"
6022 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6023 cat > conftest.$ac_ext <<EOF
6024 #line 6025 "configure"
6025 #include "confdefs.h"
6026
6027 int main() {
6028 main()
6029 ; return 0; }
6030 EOF
6031 if { (eval echo configure:6032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6032   rm -rf conftest*
6033   eval "ac_cv_lib_$ac_lib_var=yes"
6034 else
6035   echo "configure: failed program was:" >&5
6036   cat conftest.$ac_ext >&5
6037   rm -rf conftest*
6038   eval "ac_cv_lib_$ac_lib_var=no"
6039 fi
6040 rm -f conftest*
6041 LIBS="$ac_save_LIBS"
6042
6043 fi
6044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6045   echo "$ac_t""yes" 1>&6
6046   have_krb5=yes
6047                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6048 else
6049   echo "$ac_t""no" 1>&6
6050 have_krb5=no
6051 fi
6052
6053
6054                         cat >> confdefs.h <<\EOF
6055 #define HAVE_HEIMDAL_KERBEROS 1
6056 EOF
6057
6058                 else
6059                         have_krb5=no
6060                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6061                 fi
6062
6063                 if test $have_krb5 = yes ; then
6064                         ol_link_krb5=yes
6065
6066                         cat >> confdefs.h <<\EOF
6067 #define HAVE_KRB5 1
6068 EOF
6069
6070
6071                         if test $ol_enable_kpasswd != no ; then
6072                                 ol_link_kpasswd=yes;
6073                         fi
6074
6075                         if test $ol_with_kerberos = k5only ; then
6076                                 ol_with_kerberos=found
6077                         fi
6078
6079                 elif test $ol_with_kerberos != auto ; then
6080                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6081                 fi
6082
6083         fi
6084 fi
6085
6086 if test $ol_link_krb5 = yes -a \
6087         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6088
6089         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6090 do
6091 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6092 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6093 echo "configure:6094: checking for $ac_hdr" >&5
6094 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6095   echo $ac_n "(cached) $ac_c" 1>&6
6096 else
6097   cat > conftest.$ac_ext <<EOF
6098 #line 6099 "configure"
6099 #include "confdefs.h"
6100 #include <$ac_hdr>
6101 EOF
6102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6103 { (eval echo configure:6104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6105 if test -z "$ac_err"; then
6106   rm -rf conftest*
6107   eval "ac_cv_header_$ac_safe=yes"
6108 else
6109   echo "$ac_err" >&5
6110   echo "configure: failed program was:" >&5
6111   cat conftest.$ac_ext >&5
6112   rm -rf conftest*
6113   eval "ac_cv_header_$ac_safe=no"
6114 fi
6115 rm -f conftest*
6116 fi
6117 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6118   echo "$ac_t""yes" 1>&6
6119     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6120   cat >> confdefs.h <<EOF
6121 #define $ac_tr_hdr 1
6122 EOF
6123  
6124 else
6125   echo "$ac_t""no" 1>&6
6126 fi
6127 done
6128
6129
6130         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6131                 if test $krb5_impl = mit; then
6132                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6133 echo "configure:6134: checking for main in -lkrb4" >&5
6134 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6135 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6136   echo $ac_n "(cached) $ac_c" 1>&6
6137 else
6138   ac_save_LIBS="$LIBS"
6139 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6140 cat > conftest.$ac_ext <<EOF
6141 #line 6142 "configure"
6142 #include "confdefs.h"
6143
6144 int main() {
6145 main()
6146 ; return 0; }
6147 EOF
6148 if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6149   rm -rf conftest*
6150   eval "ac_cv_lib_$ac_lib_var=yes"
6151 else
6152   echo "configure: failed program was:" >&5
6153   cat conftest.$ac_ext >&5
6154   rm -rf conftest*
6155   eval "ac_cv_lib_$ac_lib_var=no"
6156 fi
6157 rm -f conftest*
6158 LIBS="$ac_save_LIBS"
6159
6160 fi
6161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6162   echo "$ac_t""yes" 1>&6
6163   have_k425=yes
6164                                 KRB4_LIBS="-lkrb4 -ldes425"
6165 else
6166   echo "$ac_t""no" 1>&6
6167 have_k425=no
6168 fi
6169
6170
6171                 elif test $krb5_impl = heimdal; then
6172                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6173 echo "configure:6174: checking for main in -lkrb4" >&5
6174 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6175 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6176   echo $ac_n "(cached) $ac_c" 1>&6
6177 else
6178   ac_save_LIBS="$LIBS"
6179 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6180 cat > conftest.$ac_ext <<EOF
6181 #line 6182 "configure"
6182 #include "confdefs.h"
6183
6184 int main() {
6185 main()
6186 ; return 0; }
6187 EOF
6188 if { (eval echo configure:6189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6189   rm -rf conftest*
6190   eval "ac_cv_lib_$ac_lib_var=yes"
6191 else
6192   echo "configure: failed program was:" >&5
6193   cat conftest.$ac_ext >&5
6194   rm -rf conftest*
6195   eval "ac_cv_lib_$ac_lib_var=no"
6196 fi
6197 rm -f conftest*
6198 LIBS="$ac_save_LIBS"
6199
6200 fi
6201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6202   echo "$ac_t""yes" 1>&6
6203   have_k425=yes
6204                                 KRB4_LIBS="-lkrb4"
6205 else
6206   echo "$ac_t""no" 1>&6
6207 have_k425=no
6208 fi
6209
6210
6211                 else
6212                         have_425=no
6213                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6214                 fi
6215
6216                 if test $have_k425 = yes ; then
6217                         ol_with_kerberos=found
6218                         ol_link_krb4=yes
6219
6220                         cat >> confdefs.h <<\EOF
6221 #define HAVE_KRB425 1
6222 EOF
6223
6224                         cat >> confdefs.h <<\EOF
6225 #define HAVE_KRB4 1
6226 EOF
6227
6228
6229                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6230 echo "configure:6231: checking for des_debug in Kerberos libraries" >&5
6231 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6232   echo $ac_n "(cached) $ac_c" 1>&6
6233 else
6234   
6235                                                                 save_LIBS="$LIBS"
6236                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6237                                 cat > conftest.$ac_ext <<EOF
6238 #line 6239 "configure"
6239 #include "confdefs.h"
6240
6241 #include <kerberosIV/krb.h>
6242 #include <kerberosIV/des.h>
6243 extern int des_debug;
6244
6245 int main() {
6246
6247 des_debug = 1;
6248
6249 ; return 0; }
6250 EOF
6251 if { (eval echo configure:6252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6252   rm -rf conftest*
6253   ol_cv_var_des_debug=yes
6254 else
6255   echo "configure: failed program was:" >&5
6256   cat conftest.$ac_ext >&5
6257   rm -rf conftest*
6258   ol_cv_var_des_debug=no
6259 fi
6260 rm -f conftest*
6261                                                                 LIBS="$save_LIBS"
6262                         
6263 fi
6264
6265 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6266
6267                         if test $ol_cv_var_des_debug = yes ; then
6268                                 cat >> confdefs.h <<\EOF
6269 #define HAVE_DES_DEBUG 1
6270 EOF
6271
6272                         fi
6273
6274                         LIBS="$save_LIBS"
6275                 fi
6276         fi
6277 fi
6278
6279 if test $ol_link_krb5 = yes ; then
6280         ol_with_kerberos=found
6281 fi
6282
6283 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6284         -o $ol_with_kerberos = kth ; then
6285
6286         for ac_hdr in krb.h des.h krb-archaeology.h 
6287 do
6288 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6289 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6290 echo "configure:6291: checking for $ac_hdr" >&5
6291 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6292   echo $ac_n "(cached) $ac_c" 1>&6
6293 else
6294   cat > conftest.$ac_ext <<EOF
6295 #line 6296 "configure"
6296 #include "confdefs.h"
6297 #include <$ac_hdr>
6298 EOF
6299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6300 { (eval echo configure:6301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6302 if test -z "$ac_err"; then
6303   rm -rf conftest*
6304   eval "ac_cv_header_$ac_safe=yes"
6305 else
6306   echo "$ac_err" >&5
6307   echo "configure: failed program was:" >&5
6308   cat conftest.$ac_ext >&5
6309   rm -rf conftest*
6310   eval "ac_cv_header_$ac_safe=no"
6311 fi
6312 rm -f conftest*
6313 fi
6314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6315   echo "$ac_t""yes" 1>&6
6316     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6317   cat >> confdefs.h <<EOF
6318 #define $ac_tr_hdr 1
6319 EOF
6320  
6321 else
6322   echo "$ac_t""no" 1>&6
6323 fi
6324 done
6325
6326
6327         if test $ac_cv_header_krb_h = yes ; then
6328                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6329 echo "configure:6330: checking for main in -lkrb" >&5
6330 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6331 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6332   echo $ac_n "(cached) $ac_c" 1>&6
6333 else
6334   ac_save_LIBS="$LIBS"
6335 LIBS="-lkrb -ldes $LIBS"
6336 cat > conftest.$ac_ext <<EOF
6337 #line 6338 "configure"
6338 #include "confdefs.h"
6339
6340 int main() {
6341 main()
6342 ; return 0; }
6343 EOF
6344 if { (eval echo configure:6345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6345   rm -rf conftest*
6346   eval "ac_cv_lib_$ac_lib_var=yes"
6347 else
6348   echo "configure: failed program was:" >&5
6349   cat conftest.$ac_ext >&5
6350   rm -rf conftest*
6351   eval "ac_cv_lib_$ac_lib_var=no"
6352 fi
6353 rm -f conftest*
6354 LIBS="$ac_save_LIBS"
6355
6356 fi
6357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6358   echo "$ac_t""yes" 1>&6
6359   have_k4=yes
6360 else
6361   echo "$ac_t""no" 1>&6
6362 have_k4=no
6363 fi
6364
6365
6366                 if test $have_k4 = yes ; then
6367                         ol_with_kerberos=found
6368                         ol_link_krb4=yes
6369
6370                         cat >> confdefs.h <<\EOF
6371 #define HAVE_KRB4 1
6372 EOF
6373
6374
6375                         KRB4_LIBS="-lkrb -ldes"
6376
6377                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6378                                 cat >> confdefs.h <<\EOF
6379 #define HAVE_KTH_KERBEROS 1
6380 EOF
6381
6382                         fi
6383                 fi
6384         fi
6385 fi
6386
6387 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6388         ol_link_kpasswd=yes;
6389 fi
6390
6391 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6392         cat >> confdefs.h <<\EOF
6393 #define HAVE_KERBEROS 1
6394 EOF
6395
6396
6397 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6398         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6399 fi
6400
6401 ol_link_tls=no
6402 if test $ol_with_tls != no ; then
6403         
6404         for ac_hdr in openssl/ssl.h ssl.h
6405 do
6406 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6407 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6408 echo "configure:6409: checking for $ac_hdr" >&5
6409 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6410   echo $ac_n "(cached) $ac_c" 1>&6
6411 else
6412   cat > conftest.$ac_ext <<EOF
6413 #line 6414 "configure"
6414 #include "confdefs.h"
6415 #include <$ac_hdr>
6416 EOF
6417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6418 { (eval echo configure:6419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6419 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6420 if test -z "$ac_err"; then
6421   rm -rf conftest*
6422   eval "ac_cv_header_$ac_safe=yes"
6423 else
6424   echo "$ac_err" >&5
6425   echo "configure: failed program was:" >&5
6426   cat conftest.$ac_ext >&5
6427   rm -rf conftest*
6428   eval "ac_cv_header_$ac_safe=no"
6429 fi
6430 rm -f conftest*
6431 fi
6432 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6433   echo "$ac_t""yes" 1>&6
6434     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6435   cat >> confdefs.h <<EOF
6436 #define $ac_tr_hdr 1
6437 EOF
6438  
6439 else
6440   echo "$ac_t""no" 1>&6
6441 fi
6442 done
6443
6444         
6445         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6446                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6447 echo "configure:6448: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6448 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6449 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6450   echo $ac_n "(cached) $ac_c" 1>&6
6451 else
6452   ac_save_LIBS="$LIBS"
6453 LIBS="-lssl -lcrypto $LIBS"
6454 cat > conftest.$ac_ext <<EOF
6455 #line 6456 "configure"
6456 #include "confdefs.h"
6457 /* Override any gcc2 internal prototype to avoid an error.  */
6458 /* We use char because int might match the return type of a gcc2
6459     builtin and then its argument prototype would still apply.  */
6460 char SSLeay_add_ssl_algorithms();
6461
6462 int main() {
6463 SSLeay_add_ssl_algorithms()
6464 ; return 0; }
6465 EOF
6466 if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6467   rm -rf conftest*
6468   eval "ac_cv_lib_$ac_lib_var=yes"
6469 else
6470   echo "configure: failed program was:" >&5
6471   cat conftest.$ac_ext >&5
6472   rm -rf conftest*
6473   eval "ac_cv_lib_$ac_lib_var=no"
6474 fi
6475 rm -f conftest*
6476 LIBS="$ac_save_LIBS"
6477
6478 fi
6479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6480   echo "$ac_t""yes" 1>&6
6481   have_ssleay=yes
6482                         need_rsaref=no
6483 else
6484   echo "$ac_t""no" 1>&6
6485 have_ssleay=no
6486 fi
6487
6488                         
6489                 if test $have_ssleay = no ; then
6490                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6491 echo "configure:6492: checking for SSL_library_init in -lssl" >&5
6492 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6493 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6494   echo $ac_n "(cached) $ac_c" 1>&6
6495 else
6496   ac_save_LIBS="$LIBS"
6497 LIBS="-lssl -lcrypto $LIBS"
6498 cat > conftest.$ac_ext <<EOF
6499 #line 6500 "configure"
6500 #include "confdefs.h"
6501 /* Override any gcc2 internal prototype to avoid an error.  */
6502 /* We use char because int might match the return type of a gcc2
6503     builtin and then its argument prototype would still apply.  */
6504 char SSL_library_init();
6505
6506 int main() {
6507 SSL_library_init()
6508 ; return 0; }
6509 EOF
6510 if { (eval echo configure:6511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6511   rm -rf conftest*
6512   eval "ac_cv_lib_$ac_lib_var=yes"
6513 else
6514   echo "configure: failed program was:" >&5
6515   cat conftest.$ac_ext >&5
6516   rm -rf conftest*
6517   eval "ac_cv_lib_$ac_lib_var=no"
6518 fi
6519 rm -f conftest*
6520 LIBS="$ac_save_LIBS"
6521
6522 fi
6523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6524   echo "$ac_t""yes" 1>&6
6525   have_ssleay=yes
6526                                 need_rsaref=no
6527 else
6528   echo "$ac_t""no" 1>&6
6529 have_ssleay=no
6530 fi
6531
6532                 fi
6533
6534                 if test $have_ssleay = no ; then
6535                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6536 echo "configure:6537: checking for ssl3_accept in -lssl" >&5
6537 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6538 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6539   echo $ac_n "(cached) $ac_c" 1>&6
6540 else
6541   ac_save_LIBS="$LIBS"
6542 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6543 cat > conftest.$ac_ext <<EOF
6544 #line 6545 "configure"
6545 #include "confdefs.h"
6546 /* Override any gcc2 internal prototype to avoid an error.  */
6547 /* We use char because int might match the return type of a gcc2
6548     builtin and then its argument prototype would still apply.  */
6549 char ssl3_accept();
6550
6551 int main() {
6552 ssl3_accept()
6553 ; return 0; }
6554 EOF
6555 if { (eval echo configure:6556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6556   rm -rf conftest*
6557   eval "ac_cv_lib_$ac_lib_var=yes"
6558 else
6559   echo "configure: failed program was:" >&5
6560   cat conftest.$ac_ext >&5
6561   rm -rf conftest*
6562   eval "ac_cv_lib_$ac_lib_var=no"
6563 fi
6564 rm -f conftest*
6565 LIBS="$ac_save_LIBS"
6566
6567 fi
6568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6569   echo "$ac_t""yes" 1>&6
6570   have_ssleay=yes
6571                                 need_rsaref=yes
6572 else
6573   echo "$ac_t""no" 1>&6
6574 have_ssleay=no
6575 fi
6576
6577                 fi
6578
6579                 if test $have_ssleay = yes ; then
6580                         ol_with_tls=found
6581                         ol_link_tls=yes
6582
6583                         cat >> confdefs.h <<\EOF
6584 #define HAVE_SSLEAY 1
6585 EOF
6586
6587
6588                         if test $need_rsaref = yes; then
6589                                 cat >> confdefs.h <<\EOF
6590 #define HAVE_RSAREF 1
6591 EOF
6592
6593
6594                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6595                         else
6596                                 TLS_LIBS="-lssl -lcrypto"
6597                         fi
6598                 fi
6599         fi
6600 fi
6601
6602 if test $ol_link_tls = yes ; then
6603         cat >> confdefs.h <<\EOF
6604 #define HAVE_TLS 1
6605 EOF
6606
6607 fi      
6608
6609 for ac_func in \
6610         ctime_r                 \
6611         gethostbyname_r gethostbyaddr_r \
6612
6613 do
6614 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6615 echo "configure:6616: checking for $ac_func" >&5
6616 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6617   echo $ac_n "(cached) $ac_c" 1>&6
6618 else
6619   cat > conftest.$ac_ext <<EOF
6620 #line 6621 "configure"
6621 #include "confdefs.h"
6622 /* System header to define __stub macros and hopefully few prototypes,
6623     which can conflict with char $ac_func(); below.  */
6624 #include <assert.h>
6625 /* Override any gcc2 internal prototype to avoid an error.  */
6626 /* We use char because int might match the return type of a gcc2
6627     builtin and then its argument prototype would still apply.  */
6628 char $ac_func();
6629 char (*f)();
6630
6631 int main() {
6632
6633 /* The GNU C library defines this for functions which it implements
6634     to always fail with ENOSYS.  Some functions are actually named
6635     something starting with __ and the normal name is an alias.  */
6636 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6637 choke me
6638 #else
6639 f = $ac_func;
6640 #endif
6641
6642 ; return 0; }
6643 EOF
6644 if { (eval echo configure:6645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6645   rm -rf conftest*
6646   eval "ac_cv_func_$ac_func=yes"
6647 else
6648   echo "configure: failed program was:" >&5
6649   cat conftest.$ac_ext >&5
6650   rm -rf conftest*
6651   eval "ac_cv_func_$ac_func=no"
6652 fi
6653 rm -f conftest*
6654 fi
6655
6656 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6657   echo "$ac_t""yes" 1>&6
6658     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6659   cat >> confdefs.h <<EOF
6660 #define $ac_tr_func 1
6661 EOF
6662  
6663 else
6664   echo "$ac_t""no" 1>&6
6665 fi
6666 done
6667
6668
6669 if test "$ac_cv_func_ctime_r" = no ; then
6670         ol_cv_func_ctime_r_nargs=0
6671 else
6672         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6673 echo "configure:6674: checking number of arguments of ctime_r" >&5
6674 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6675   echo $ac_n "(cached) $ac_c" 1>&6
6676 else
6677   cat > conftest.$ac_ext <<EOF
6678 #line 6679 "configure"
6679 #include "confdefs.h"
6680 #include <time.h>
6681 int main() {
6682 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6683 ; return 0; }
6684 EOF
6685 if { (eval echo configure:6686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6686   rm -rf conftest*
6687   ol_cv_func_ctime_r_nargs3=yes
6688 else
6689   echo "configure: failed program was:" >&5
6690   cat conftest.$ac_ext >&5
6691   rm -rf conftest*
6692   ol_cv_func_ctime_r_nargs3=no
6693 fi
6694 rm -f conftest*
6695
6696         cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 #include <time.h>
6700 int main() {
6701 time_t ti; char *buffer; ctime_r(&ti,buffer);
6702 ; return 0; }
6703 EOF
6704 if { (eval echo configure:6705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6705   rm -rf conftest*
6706   ol_cv_func_ctime_r_nargs2=yes
6707 else
6708   echo "configure: failed program was:" >&5
6709   cat conftest.$ac_ext >&5
6710   rm -rf conftest*
6711   ol_cv_func_ctime_r_nargs2=no
6712 fi
6713 rm -f conftest*
6714
6715         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6716                 $ol_cv_func_ctime_r_nargs2 = no ; then
6717
6718                 ol_cv_func_ctime_r_nargs=3
6719
6720         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6721                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6722
6723                 ol_cv_func_ctime_r_nargs=2
6724
6725         else
6726                 ol_cv_func_ctime_r_nargs=0
6727         fi
6728   
6729 fi
6730
6731 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6732
6733   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6734         cat >> confdefs.h <<EOF
6735 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6736 EOF
6737
6738   fi
6739
6740 fi
6741
6742 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6743         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6744 echo "configure:6745: checking number of arguments of gethostbyname_r" >&5
6745 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6746   echo $ac_n "(cached) $ac_c" 1>&6
6747 else
6748   cat > conftest.$ac_ext <<EOF
6749 #line 6750 "configure"
6750 #include "confdefs.h"
6751 #include <sys/types.h>
6752 #include <sys/socket.h>
6753 #include <netinet/in.h>
6754 #include <netdb.h>
6755 #define BUFSIZE (sizeof(struct hostent)+10)
6756 int main() {
6757 struct hostent hent; char buffer[BUFSIZE];
6758                 int bufsize=BUFSIZE;int h_errno;
6759                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6760                         buffer, bufsize, &h_errno);
6761 ; return 0; }
6762 EOF
6763 if { (eval echo configure:6764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6764   rm -rf conftest*
6765   ol_cv_func_gethostbyname_r_nargs5=yes
6766 else
6767   echo "configure: failed program was:" >&5
6768   cat conftest.$ac_ext >&5
6769   rm -rf conftest*
6770   ol_cv_func_gethostbyname_r_nargs5=no
6771 fi
6772 rm -f conftest*
6773
6774         cat > conftest.$ac_ext <<EOF
6775 #line 6776 "configure"
6776 #include "confdefs.h"
6777 #include <sys/types.h>
6778 #include <sys/socket.h>
6779 #include <netinet/in.h>
6780 #include <netdb.h>
6781 #define BUFSIZE (sizeof(struct hostent)+10)
6782 int main() {
6783 struct hostent hent;struct hostent *rhent;
6784                 char buffer[BUFSIZE];
6785                 int bufsize=BUFSIZE;int h_errno;
6786                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6787                         &rhent, &h_errno);
6788 ; return 0; }
6789 EOF
6790 if { (eval echo configure:6791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6791   rm -rf conftest*
6792   ol_cv_func_gethostbyname_r_nargs6=yes
6793 else
6794   echo "configure: failed program was:" >&5
6795   cat conftest.$ac_ext >&5
6796   rm -rf conftest*
6797   ol_cv_func_gethostbyname_r_nargs6=no
6798 fi
6799 rm -f conftest*
6800
6801         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6802                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6803
6804                 ol_cv_func_gethostbyname_r_nargs=5
6805
6806         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6807                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6808
6809                 ol_cv_func_gethostbyname_r_nargs=6
6810
6811         else
6812                 ol_cv_func_gethostbyname_r_nargs=0
6813         fi
6814   
6815 fi
6816
6817 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6818   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6819         cat >> confdefs.h <<EOF
6820 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6821 EOF
6822
6823   fi
6824
6825 else
6826         ol_cv_func_gethostbyname_r_nargs=0
6827 fi
6828  
6829 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6830         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6831 echo "configure:6832: checking number of arguments of gethostbyaddr_r" >&5
6832 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6833   echo $ac_n "(cached) $ac_c" 1>&6
6834 else
6835   cat > conftest.$ac_ext <<EOF
6836 #line 6837 "configure"
6837 #include "confdefs.h"
6838 #include <sys/types.h>
6839 #include <sys/socket.h>
6840 #include <netinet/in.h>
6841 #include <netdb.h>
6842 #define BUFSIZE (sizeof(struct hostent)+10)
6843 int main() {
6844 struct hostent hent; char buffer[BUFSIZE]; 
6845             struct in_addr add;
6846             size_t alen=sizeof(struct in_addr);
6847             int bufsize=BUFSIZE;int h_errno;
6848                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6849                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6850 ; return 0; }
6851 EOF
6852 if { (eval echo configure:6853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6853   rm -rf conftest*
6854   ol_cv_func_gethostbyaddr_r_nargs7=yes
6855 else
6856   echo "configure: failed program was:" >&5
6857   cat conftest.$ac_ext >&5
6858   rm -rf conftest*
6859   ol_cv_func_gethostbyaddr_r_nargs7=no
6860 fi
6861 rm -f conftest*
6862
6863         cat > conftest.$ac_ext <<EOF
6864 #line 6865 "configure"
6865 #include "confdefs.h"
6866 #include <sys/types.h>
6867 #include <sys/socket.h>
6868 #include <netinet/in.h>
6869 #include <netdb.h>
6870 #define BUFSIZE (sizeof(struct hostent)+10)
6871 int main() {
6872 struct hostent hent;
6873                 struct hostent *rhent; char buffer[BUFSIZE]; 
6874                 struct in_addr add;
6875                 size_t alen=sizeof(struct in_addr);
6876                 int bufsize=BUFSIZE;int h_errno;
6877                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6878                         alen, AF_INET, &hent, buffer, bufsize, 
6879                         &rhent, &h_errno);
6880 ; return 0; }
6881 EOF
6882 if { (eval echo configure:6883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6883   rm -rf conftest*
6884   ol_cv_func_gethostbyaddr_r_nargs8=yes
6885 else
6886   echo "configure: failed program was:" >&5
6887   cat conftest.$ac_ext >&5
6888   rm -rf conftest*
6889   ol_cv_func_gethostbyaddr_r_nargs8=no
6890 fi
6891 rm -f conftest*
6892
6893         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6894                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6895
6896                 ol_cv_func_gethostbyaddr_r_nargs=7
6897
6898         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6899                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6900
6901                 ol_cv_func_gethostbyaddr_r_nargs=8
6902
6903         else
6904                 ol_cv_func_gethostbyaddr_r_nargs=0
6905         fi
6906   
6907 fi
6908
6909 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6910   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6911     cat >> confdefs.h <<EOF
6912 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6913 EOF
6914
6915   fi
6916
6917 else
6918         ol_cv_func_gethostbyaddr_r_nargs=0
6919 fi
6920
6921 if test "$ac_cv_func_ctime_r" = yes \
6922         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6923         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6924         -a "$ac_cv_func_gethostbyname_r" = yes \
6925         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6926         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6927         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6928         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6929         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6930         ; then
6931  
6932         cat >> confdefs.h <<\EOF
6933 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6934 EOF
6935
6936 fi
6937
6938 ol_link_threads=no
6939
6940 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6941         -o $ol_with_threads = nt ; then
6942
6943         
6944         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6945 echo "configure:6946: checking for NT Threads" >&5
6946 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6947   echo $ac_n "(cached) $ac_c" 1>&6
6948 else
6949   
6950                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6951 echo "configure:6952: checking for _beginthread" >&5
6952 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6953   echo $ac_n "(cached) $ac_c" 1>&6
6954 else
6955   cat > conftest.$ac_ext <<EOF
6956 #line 6957 "configure"
6957 #include "confdefs.h"
6958 /* System header to define __stub macros and hopefully few prototypes,
6959     which can conflict with char _beginthread(); below.  */
6960 #include <assert.h>
6961 /* Override any gcc2 internal prototype to avoid an error.  */
6962 /* We use char because int might match the return type of a gcc2
6963     builtin and then its argument prototype would still apply.  */
6964 char _beginthread();
6965 char (*f)();
6966
6967 int main() {
6968
6969 /* The GNU C library defines this for functions which it implements
6970     to always fail with ENOSYS.  Some functions are actually named
6971     something starting with __ and the normal name is an alias.  */
6972 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6973 choke me
6974 #else
6975 f = _beginthread;
6976 #endif
6977
6978 ; return 0; }
6979 EOF
6980 if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6981   rm -rf conftest*
6982   eval "ac_cv_func__beginthread=yes"
6983 else
6984   echo "configure: failed program was:" >&5
6985   cat conftest.$ac_ext >&5
6986   rm -rf conftest*
6987   eval "ac_cv_func__beginthread=no"
6988 fi
6989 rm -f conftest*
6990 fi
6991
6992 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6993   echo "$ac_t""yes" 1>&6
6994   ol_cv_nt_threads=yes
6995 else
6996   echo "$ac_t""no" 1>&6
6997 ol_cv_nt_threads=no
6998 fi
6999
7000         
7001 fi
7002
7003 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7004
7005         if test $ol_cv_nt_threads = yes ; then
7006                 cat >> confdefs.h <<\EOF
7007 #define HAVE_NT_THREADS 1
7008 EOF
7009
7010         fi
7011
7012
7013         if test "$ol_cv_nt_threads" = yes ; then
7014         ol_link_threads=nt
7015         ol_with_threads=found
7016         ol_with_yielding_select=yes
7017
7018                 cat >> confdefs.h <<\EOF
7019 #define HAVE_NT_SERVICE_MANAGER 1
7020 EOF
7021
7022                 cat >> confdefs.h <<\EOF
7023 #define HAVE_NT_EVENT_LOG 1
7024 EOF
7025
7026         fi
7027
7028         if test $ol_with_threads = nt ; then
7029                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7030         fi
7031 fi
7032
7033 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7034         -o $ol_with_threads = posix ; then
7035
7036         for ac_hdr in pthread.h
7037 do
7038 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7039 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7040 echo "configure:7041: checking for $ac_hdr" >&5
7041 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7042   echo $ac_n "(cached) $ac_c" 1>&6
7043 else
7044   cat > conftest.$ac_ext <<EOF
7045 #line 7046 "configure"
7046 #include "confdefs.h"
7047 #include <$ac_hdr>
7048 EOF
7049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7050 { (eval echo configure:7051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7051 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7052 if test -z "$ac_err"; then
7053   rm -rf conftest*
7054   eval "ac_cv_header_$ac_safe=yes"
7055 else
7056   echo "$ac_err" >&5
7057   echo "configure: failed program was:" >&5
7058   cat conftest.$ac_ext >&5
7059   rm -rf conftest*
7060   eval "ac_cv_header_$ac_safe=no"
7061 fi
7062 rm -f conftest*
7063 fi
7064 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7065   echo "$ac_t""yes" 1>&6
7066     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7067   cat >> confdefs.h <<EOF
7068 #define $ac_tr_hdr 1
7069 EOF
7070  
7071 else
7072   echo "$ac_t""no" 1>&6
7073 fi
7074 done
7075
7076
7077         if test $ac_cv_header_pthread_h = yes ; then
7078                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7079 echo "configure:7080: checking POSIX thread version" >&5
7080 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7081   echo $ac_n "(cached) $ac_c" 1>&6
7082 else
7083   
7084         cat > conftest.$ac_ext <<EOF
7085 #line 7086 "configure"
7086 #include "confdefs.h"
7087
7088 #               include <pthread.h>
7089                 /* this check could be improved */
7090 #               ifdef PTHREAD_ONCE_INIT
7091                         pthread_version_final;
7092 #               endif
7093         
7094 EOF
7095 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7096   egrep "pthread_version_final" >/dev/null 2>&1; then
7097   rm -rf conftest*
7098   ol_pthread_final=yes
7099 else
7100   rm -rf conftest*
7101   ol_pthread_final=no
7102 fi
7103 rm -f conftest*
7104
7105
7106         cat > conftest.$ac_ext <<EOF
7107 #line 7108 "configure"
7108 #include "confdefs.h"
7109
7110 #               include <pthread.h>
7111                 /* this check could be improved */
7112 #               ifdef pthread_once_init
7113                         pthread_version_draft4;
7114 #               endif
7115         
7116 EOF
7117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7118   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7119   rm -rf conftest*
7120   ol_pthread_draft4=yes
7121 else
7122   rm -rf conftest*
7123   ol_pthread_draft4=no
7124 fi
7125 rm -f conftest*
7126
7127
7128         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7129                 ol_cv_pthread_version=final
7130         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7131                 ol_cv_pthread_version=draft4
7132         else
7133                 ol_cv_pthread_version=unknown
7134         fi
7135
7136 fi
7137
7138 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7139
7140
7141                 if test $ol_cv_pthread_version = final ; then
7142                         cat >> confdefs.h <<\EOF
7143 #define HAVE_PTHREADS_FINAL 1
7144 EOF
7145
7146                 elif test $ol_cv_pthread_version = draft4 ; then
7147                         cat >> confdefs.h <<\EOF
7148 #define HAVE_PTHREADS_D4 1
7149 EOF
7150
7151                 else
7152                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7153                 fi
7154
7155                 # consider threads found
7156                 ol_with_threads=found
7157
7158                 
7159         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7160 echo "configure:7161: checking for LinuxThreads pthread.h" >&5
7161 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7162   echo $ac_n "(cached) $ac_c" 1>&6
7163 else
7164   cat > conftest.$ac_ext <<EOF
7165 #line 7166 "configure"
7166 #include "confdefs.h"
7167 #include <pthread.h>
7168 EOF
7169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7170   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7171   rm -rf conftest*
7172   ol_cv_header_linux_threads=yes
7173 else
7174   rm -rf conftest*
7175   ol_cv_header_linux_threads=no
7176 fi
7177 rm -f conftest*
7178
7179                 
7180 fi
7181
7182 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7183         if test $ol_cv_header_linux_threads = yes; then
7184                 cat >> confdefs.h <<\EOF
7185 #define HAVE_LINUX_THREADS 1
7186 EOF
7187
7188         fi
7189
7190                 
7191         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7192 echo "configure:7193: checking for GNU Pth pthread.h" >&5
7193 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7194   echo $ac_n "(cached) $ac_c" 1>&6
7195 else
7196   cat > conftest.$ac_ext <<EOF
7197 #line 7198 "configure"
7198 #include "confdefs.h"
7199 #include <pthread.h>
7200 #ifdef _POSIX_THREAD_IS_GNU_PTH
7201         __gnu_pth__;
7202 #endif
7203
7204 EOF
7205 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7206   egrep "__gnu_pth__" >/dev/null 2>&1; then
7207   rm -rf conftest*
7208   ol_cv_header_gnu_pth_pthread_h=yes
7209 else
7210   rm -rf conftest*
7211   ol_cv_header_gnu_pth_pthread_h=no
7212 fi
7213 rm -f conftest*
7214
7215                 
7216 fi
7217
7218 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7219
7220
7221                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7222                         for ac_hdr in sched.h
7223 do
7224 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7225 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7226 echo "configure:7227: checking for $ac_hdr" >&5
7227 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7228   echo $ac_n "(cached) $ac_c" 1>&6
7229 else
7230   cat > conftest.$ac_ext <<EOF
7231 #line 7232 "configure"
7232 #include "confdefs.h"
7233 #include <$ac_hdr>
7234 EOF
7235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7236 { (eval echo configure:7237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7238 if test -z "$ac_err"; then
7239   rm -rf conftest*
7240   eval "ac_cv_header_$ac_safe=yes"
7241 else
7242   echo "$ac_err" >&5
7243   echo "configure: failed program was:" >&5
7244   cat conftest.$ac_ext >&5
7245   rm -rf conftest*
7246   eval "ac_cv_header_$ac_safe=no"
7247 fi
7248 rm -f conftest*
7249 fi
7250 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7251   echo "$ac_t""yes" 1>&6
7252     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7253   cat >> confdefs.h <<EOF
7254 #define $ac_tr_hdr 1
7255 EOF
7256  
7257 else
7258   echo "$ac_t""no" 1>&6
7259 fi
7260 done
7261
7262                 fi
7263
7264                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7265                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7266 echo "configure:7267: checking for pthread_create in default libraries" >&5
7267 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7268   echo $ac_n "(cached) $ac_c" 1>&6
7269 else
7270   
7271                 if test "$cross_compiling" = yes; then
7272   cat > conftest.$ac_ext <<EOF
7273 #line 7274 "configure"
7274 #include "confdefs.h"
7275 /* pthread test headers */
7276 #include <pthread.h>
7277 #ifndef NULL
7278 #define NULL (void*)0
7279 #endif
7280
7281 static void *task(p)
7282         void *p;
7283 {
7284         return (void *) (p == NULL);
7285 }
7286
7287 int main() {
7288
7289         /* pthread test function */
7290         pthread_t t;
7291         int status;
7292
7293         /* make sure pthread_create() isn't just a stub */
7294 #if HAVE_PTHREADS_D4
7295         status = pthread_create(&t, pthread_attr_default, task, NULL);
7296 #else
7297         status = pthread_create(&t, NULL, task, NULL);
7298 #endif
7299
7300         if( status ) exit( status );
7301
7302         /* make sure pthread_detach() isn't just a stub */
7303 #if HAVE_PTHREADS_D4
7304         status = pthread_detach( &t );
7305 #else
7306         status = pthread_detach( t );
7307 #endif
7308
7309 #ifdef HAVE_LINUX_THREADS
7310         pthread_kill_other_threads_np();
7311 #endif
7312
7313         exit( status );
7314
7315 ; return 0; }
7316 EOF
7317 if { (eval echo configure:7318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7318   rm -rf conftest*
7319   ol_cv_pthread_create=yes
7320 else
7321   echo "configure: failed program was:" >&5
7322   cat conftest.$ac_ext >&5
7323   rm -rf conftest*
7324   ol_cv_pthread_create=no
7325 fi
7326 rm -f conftest*
7327 else
7328   cat > conftest.$ac_ext <<EOF
7329 #line 7330 "configure"
7330 #include "confdefs.h"
7331 /* pthread test headers */
7332 #include <pthread.h>
7333 #ifndef NULL
7334 #define NULL (void*)0
7335 #endif
7336
7337 static void *task(p)
7338         void *p;
7339 {
7340         return (void *) (p == NULL);
7341 }
7342
7343
7344 int main(argc, argv)
7345         int argc;
7346         char **argv;
7347 {
7348
7349         /* pthread test function */
7350         pthread_t t;
7351         int status;
7352
7353         /* make sure pthread_create() isn't just a stub */
7354 #if HAVE_PTHREADS_D4
7355         status = pthread_create(&t, pthread_attr_default, task, NULL);
7356 #else
7357         status = pthread_create(&t, NULL, task, NULL);
7358 #endif
7359
7360         if( status ) exit( status );
7361
7362         /* make sure pthread_detach() isn't just a stub */
7363 #if HAVE_PTHREADS_D4
7364         status = pthread_detach( &t );
7365 #else
7366         status = pthread_detach( t );
7367 #endif
7368
7369 #ifdef HAVE_LINUX_THREADS
7370         pthread_kill_other_threads_np();
7371 #endif
7372
7373         exit( status );
7374
7375 }
7376
7377 EOF
7378 if { (eval echo configure:7379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7379 then
7380   ol_cv_pthread_create=yes
7381 else
7382   echo "configure: failed program was:" >&5
7383   cat conftest.$ac_ext >&5
7384   rm -fr conftest*
7385   ol_cv_pthread_create=no
7386 fi
7387 rm -fr conftest*
7388 fi
7389
7390 fi
7391
7392 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7393
7394                 if test $ol_cv_pthread_create != no ; then
7395                         ol_link_threads=posix
7396                         ol_link_pthreads=""
7397                 fi
7398                 
7399                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7400 if test "$ol_link_threads" = no ; then
7401         # try -kthread
7402         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7403 echo "configure:7404: checking for pthread link with -kthread" >&5
7404 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7405   echo $ac_n "(cached) $ac_c" 1>&6
7406 else
7407   
7408                 # save the flags
7409                 ol_LIBS="$LIBS"
7410                 LIBS="-kthread $LIBS"
7411
7412                 if test "$cross_compiling" = yes; then
7413   cat > conftest.$ac_ext <<EOF
7414 #line 7415 "configure"
7415 #include "confdefs.h"
7416 /* pthread test headers */
7417 #include <pthread.h>
7418 #ifndef NULL
7419 #define NULL (void*)0
7420 #endif
7421
7422 static void *task(p)
7423         void *p;
7424 {
7425         return (void *) (p == NULL);
7426 }
7427
7428 int main() {
7429
7430         /* pthread test function */
7431         pthread_t t;
7432         int status;
7433
7434         /* make sure pthread_create() isn't just a stub */
7435 #if HAVE_PTHREADS_D4
7436         status = pthread_create(&t, pthread_attr_default, task, NULL);
7437 #else
7438         status = pthread_create(&t, NULL, task, NULL);
7439 #endif
7440
7441         if( status ) exit( status );
7442
7443         /* make sure pthread_detach() isn't just a stub */
7444 #if HAVE_PTHREADS_D4
7445         status = pthread_detach( &t );
7446 #else
7447         status = pthread_detach( t );
7448 #endif
7449
7450 #ifdef HAVE_LINUX_THREADS
7451         pthread_kill_other_threads_np();
7452 #endif
7453
7454         exit( status );
7455
7456 ; return 0; }
7457 EOF
7458 if { (eval echo configure:7459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7459   rm -rf conftest*
7460   ol_cv_pthread_kthread=yes
7461 else
7462   echo "configure: failed program was:" >&5
7463   cat conftest.$ac_ext >&5
7464   rm -rf conftest*
7465   ol_cv_pthread_kthread=no
7466 fi
7467 rm -f conftest*
7468 else
7469   cat > conftest.$ac_ext <<EOF
7470 #line 7471 "configure"
7471 #include "confdefs.h"
7472 /* pthread test headers */
7473 #include <pthread.h>
7474 #ifndef NULL
7475 #define NULL (void*)0
7476 #endif
7477
7478 static void *task(p)
7479         void *p;
7480 {
7481         return (void *) (p == NULL);
7482 }
7483
7484
7485 int main(argc, argv)
7486         int argc;
7487         char **argv;
7488 {
7489
7490         /* pthread test function */
7491         pthread_t t;
7492         int status;
7493
7494         /* make sure pthread_create() isn't just a stub */
7495 #if HAVE_PTHREADS_D4
7496         status = pthread_create(&t, pthread_attr_default, task, NULL);
7497 #else
7498         status = pthread_create(&t, NULL, task, NULL);
7499 #endif
7500
7501         if( status ) exit( status );
7502
7503         /* make sure pthread_detach() isn't just a stub */
7504 #if HAVE_PTHREADS_D4
7505         status = pthread_detach( &t );
7506 #else
7507         status = pthread_detach( t );
7508 #endif
7509
7510 #ifdef HAVE_LINUX_THREADS
7511         pthread_kill_other_threads_np();
7512 #endif
7513
7514         exit( status );
7515
7516 }
7517
7518 EOF
7519 if { (eval echo configure:7520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7520 then
7521   ol_cv_pthread_kthread=yes
7522 else
7523   echo "configure: failed program was:" >&5
7524   cat conftest.$ac_ext >&5
7525   rm -fr conftest*
7526   ol_cv_pthread_kthread=no
7527 fi
7528 rm -fr conftest*
7529 fi
7530
7531
7532                 # restore the LIBS
7533                 LIBS="$ol_LIBS"
7534         
7535 fi
7536
7537 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7538
7539         if test $ol_cv_pthread_kthread = yes ; then
7540                 ol_link_pthreads="-kthread"
7541                 ol_link_threads=posix
7542         fi
7543 fi
7544
7545                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7546 if test "$ol_link_threads" = no ; then
7547         # try -pthread
7548         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7549 echo "configure:7550: checking for pthread link with -pthread" >&5
7550 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7551   echo $ac_n "(cached) $ac_c" 1>&6
7552 else
7553   
7554                 # save the flags
7555                 ol_LIBS="$LIBS"
7556                 LIBS="-pthread $LIBS"
7557
7558                 if test "$cross_compiling" = yes; then
7559   cat > conftest.$ac_ext <<EOF
7560 #line 7561 "configure"
7561 #include "confdefs.h"
7562 /* pthread test headers */
7563 #include <pthread.h>
7564 #ifndef NULL
7565 #define NULL (void*)0
7566 #endif
7567
7568 static void *task(p)
7569         void *p;
7570 {
7571         return (void *) (p == NULL);
7572 }
7573
7574 int main() {
7575
7576         /* pthread test function */
7577         pthread_t t;
7578         int status;
7579
7580         /* make sure pthread_create() isn't just a stub */
7581 #if HAVE_PTHREADS_D4
7582         status = pthread_create(&t, pthread_attr_default, task, NULL);
7583 #else
7584         status = pthread_create(&t, NULL, task, NULL);
7585 #endif
7586
7587         if( status ) exit( status );
7588
7589         /* make sure pthread_detach() isn't just a stub */
7590 #if HAVE_PTHREADS_D4
7591         status = pthread_detach( &t );
7592 #else
7593         status = pthread_detach( t );
7594 #endif
7595
7596 #ifdef HAVE_LINUX_THREADS
7597         pthread_kill_other_threads_np();
7598 #endif
7599
7600         exit( status );
7601
7602 ; return 0; }
7603 EOF
7604 if { (eval echo configure:7605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7605   rm -rf conftest*
7606   ol_cv_pthread_pthread=yes
7607 else
7608   echo "configure: failed program was:" >&5
7609   cat conftest.$ac_ext >&5
7610   rm -rf conftest*
7611   ol_cv_pthread_pthread=no
7612 fi
7613 rm -f conftest*
7614 else
7615   cat > conftest.$ac_ext <<EOF
7616 #line 7617 "configure"
7617 #include "confdefs.h"
7618 /* pthread test headers */
7619 #include <pthread.h>
7620 #ifndef NULL
7621 #define NULL (void*)0
7622 #endif
7623
7624 static void *task(p)
7625         void *p;
7626 {
7627         return (void *) (p == NULL);
7628 }
7629
7630
7631 int main(argc, argv)
7632         int argc;
7633         char **argv;
7634 {
7635
7636         /* pthread test function */
7637         pthread_t t;
7638         int status;
7639
7640         /* make sure pthread_create() isn't just a stub */
7641 #if HAVE_PTHREADS_D4
7642         status = pthread_create(&t, pthread_attr_default, task, NULL);
7643 #else
7644         status = pthread_create(&t, NULL, task, NULL);
7645 #endif
7646
7647         if( status ) exit( status );
7648
7649         /* make sure pthread_detach() isn't just a stub */
7650 #if HAVE_PTHREADS_D4
7651         status = pthread_detach( &t );
7652 #else
7653         status = pthread_detach( t );
7654 #endif
7655
7656 #ifdef HAVE_LINUX_THREADS
7657         pthread_kill_other_threads_np();
7658 #endif
7659
7660         exit( status );
7661
7662 }
7663
7664 EOF
7665 if { (eval echo configure:7666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7666 then
7667   ol_cv_pthread_pthread=yes
7668 else
7669   echo "configure: failed program was:" >&5
7670   cat conftest.$ac_ext >&5
7671   rm -fr conftest*
7672   ol_cv_pthread_pthread=no
7673 fi
7674 rm -fr conftest*
7675 fi
7676
7677
7678                 # restore the LIBS
7679                 LIBS="$ol_LIBS"
7680         
7681 fi
7682
7683 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7684
7685         if test $ol_cv_pthread_pthread = yes ; then
7686                 ol_link_pthreads="-pthread"
7687                 ol_link_threads=posix
7688         fi
7689 fi
7690
7691                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7692 if test "$ol_link_threads" = no ; then
7693         # try -pthreads
7694         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7695 echo "configure:7696: checking for pthread link with -pthreads" >&5
7696 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7697   echo $ac_n "(cached) $ac_c" 1>&6
7698 else
7699   
7700                 # save the flags
7701                 ol_LIBS="$LIBS"
7702                 LIBS="-pthreads $LIBS"
7703
7704                 if test "$cross_compiling" = yes; then
7705   cat > conftest.$ac_ext <<EOF
7706 #line 7707 "configure"
7707 #include "confdefs.h"
7708 /* pthread test headers */
7709 #include <pthread.h>
7710 #ifndef NULL
7711 #define NULL (void*)0
7712 #endif
7713
7714 static void *task(p)
7715         void *p;
7716 {
7717         return (void *) (p == NULL);
7718 }
7719
7720 int main() {
7721
7722         /* pthread test function */
7723         pthread_t t;
7724         int status;
7725
7726         /* make sure pthread_create() isn't just a stub */
7727 #if HAVE_PTHREADS_D4
7728         status = pthread_create(&t, pthread_attr_default, task, NULL);
7729 #else
7730         status = pthread_create(&t, NULL, task, NULL);
7731 #endif
7732
7733         if( status ) exit( status );
7734
7735         /* make sure pthread_detach() isn't just a stub */
7736 #if HAVE_PTHREADS_D4
7737         status = pthread_detach( &t );
7738 #else
7739         status = pthread_detach( t );
7740 #endif
7741
7742 #ifdef HAVE_LINUX_THREADS
7743         pthread_kill_other_threads_np();
7744 #endif
7745
7746         exit( status );
7747
7748 ; return 0; }
7749 EOF
7750 if { (eval echo configure:7751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7751   rm -rf conftest*
7752   ol_cv_pthread_pthreads=yes
7753 else
7754   echo "configure: failed program was:" >&5
7755   cat conftest.$ac_ext >&5
7756   rm -rf conftest*
7757   ol_cv_pthread_pthreads=no
7758 fi
7759 rm -f conftest*
7760 else
7761   cat > conftest.$ac_ext <<EOF
7762 #line 7763 "configure"
7763 #include "confdefs.h"
7764 /* pthread test headers */
7765 #include <pthread.h>
7766 #ifndef NULL
7767 #define NULL (void*)0
7768 #endif
7769
7770 static void *task(p)
7771         void *p;
7772 {
7773         return (void *) (p == NULL);
7774 }
7775
7776
7777 int main(argc, argv)
7778         int argc;
7779         char **argv;
7780 {
7781
7782         /* pthread test function */
7783         pthread_t t;
7784         int status;
7785
7786         /* make sure pthread_create() isn't just a stub */
7787 #if HAVE_PTHREADS_D4
7788         status = pthread_create(&t, pthread_attr_default, task, NULL);
7789 #else
7790         status = pthread_create(&t, NULL, task, NULL);
7791 #endif
7792
7793         if( status ) exit( status );
7794
7795         /* make sure pthread_detach() isn't just a stub */
7796 #if HAVE_PTHREADS_D4
7797         status = pthread_detach( &t );
7798 #else
7799         status = pthread_detach( t );
7800 #endif
7801
7802 #ifdef HAVE_LINUX_THREADS
7803         pthread_kill_other_threads_np();
7804 #endif
7805
7806         exit( status );
7807
7808 }
7809
7810 EOF
7811 if { (eval echo configure:7812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7812 then
7813   ol_cv_pthread_pthreads=yes
7814 else
7815   echo "configure: failed program was:" >&5
7816   cat conftest.$ac_ext >&5
7817   rm -fr conftest*
7818   ol_cv_pthread_pthreads=no
7819 fi
7820 rm -fr conftest*
7821 fi
7822
7823
7824                 # restore the LIBS
7825                 LIBS="$ol_LIBS"
7826         
7827 fi
7828
7829 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7830
7831         if test $ol_cv_pthread_pthreads = yes ; then
7832                 ol_link_pthreads="-pthreads"
7833                 ol_link_threads=posix
7834         fi
7835 fi
7836
7837                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7838 if test "$ol_link_threads" = no ; then
7839         # try -mthreads
7840         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7841 echo "configure:7842: checking for pthread link with -mthreads" >&5
7842 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7843   echo $ac_n "(cached) $ac_c" 1>&6
7844 else
7845   
7846                 # save the flags
7847                 ol_LIBS="$LIBS"
7848                 LIBS="-mthreads $LIBS"
7849
7850                 if test "$cross_compiling" = yes; then
7851   cat > conftest.$ac_ext <<EOF
7852 #line 7853 "configure"
7853 #include "confdefs.h"
7854 /* pthread test headers */
7855 #include <pthread.h>
7856 #ifndef NULL
7857 #define NULL (void*)0
7858 #endif
7859
7860 static void *task(p)
7861         void *p;
7862 {
7863         return (void *) (p == NULL);
7864 }
7865
7866 int main() {
7867
7868         /* pthread test function */
7869         pthread_t t;
7870         int status;
7871
7872         /* make sure pthread_create() isn't just a stub */
7873 #if HAVE_PTHREADS_D4
7874         status = pthread_create(&t, pthread_attr_default, task, NULL);
7875 #else
7876         status = pthread_create(&t, NULL, task, NULL);
7877 #endif
7878
7879         if( status ) exit( status );
7880
7881         /* make sure pthread_detach() isn't just a stub */
7882 #if HAVE_PTHREADS_D4
7883         status = pthread_detach( &t );
7884 #else
7885         status = pthread_detach( t );
7886 #endif
7887
7888 #ifdef HAVE_LINUX_THREADS
7889         pthread_kill_other_threads_np();
7890 #endif
7891
7892         exit( status );
7893
7894 ; return 0; }
7895 EOF
7896 if { (eval echo configure:7897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7897   rm -rf conftest*
7898   ol_cv_pthread_mthreads=yes
7899 else
7900   echo "configure: failed program was:" >&5
7901   cat conftest.$ac_ext >&5
7902   rm -rf conftest*
7903   ol_cv_pthread_mthreads=no
7904 fi
7905 rm -f conftest*
7906 else
7907   cat > conftest.$ac_ext <<EOF
7908 #line 7909 "configure"
7909 #include "confdefs.h"
7910 /* pthread test headers */
7911 #include <pthread.h>
7912 #ifndef NULL
7913 #define NULL (void*)0
7914 #endif
7915
7916 static void *task(p)
7917         void *p;
7918 {
7919         return (void *) (p == NULL);
7920 }
7921
7922
7923 int main(argc, argv)
7924         int argc;
7925         char **argv;
7926 {
7927
7928         /* pthread test function */
7929         pthread_t t;
7930         int status;
7931
7932         /* make sure pthread_create() isn't just a stub */
7933 #if HAVE_PTHREADS_D4
7934         status = pthread_create(&t, pthread_attr_default, task, NULL);
7935 #else
7936         status = pthread_create(&t, NULL, task, NULL);
7937 #endif
7938
7939         if( status ) exit( status );
7940
7941         /* make sure pthread_detach() isn't just a stub */
7942 #if HAVE_PTHREADS_D4
7943         status = pthread_detach( &t );
7944 #else
7945         status = pthread_detach( t );
7946 #endif
7947
7948 #ifdef HAVE_LINUX_THREADS
7949         pthread_kill_other_threads_np();
7950 #endif
7951
7952         exit( status );
7953
7954 }
7955
7956 EOF
7957 if { (eval echo configure:7958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7958 then
7959   ol_cv_pthread_mthreads=yes
7960 else
7961   echo "configure: failed program was:" >&5
7962   cat conftest.$ac_ext >&5
7963   rm -fr conftest*
7964   ol_cv_pthread_mthreads=no
7965 fi
7966 rm -fr conftest*
7967 fi
7968
7969
7970                 # restore the LIBS
7971                 LIBS="$ol_LIBS"
7972         
7973 fi
7974
7975 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7976
7977         if test $ol_cv_pthread_mthreads = yes ; then
7978                 ol_link_pthreads="-mthreads"
7979                 ol_link_threads=posix
7980         fi
7981 fi
7982
7983                 # Pthread try link: -thread (ol_cv_pthread_thread)
7984 if test "$ol_link_threads" = no ; then
7985         # try -thread
7986         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7987 echo "configure:7988: checking for pthread link with -thread" >&5
7988 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7989   echo $ac_n "(cached) $ac_c" 1>&6
7990 else
7991   
7992                 # save the flags
7993                 ol_LIBS="$LIBS"
7994                 LIBS="-thread $LIBS"
7995
7996                 if test "$cross_compiling" = yes; then
7997   cat > conftest.$ac_ext <<EOF
7998 #line 7999 "configure"
7999 #include "confdefs.h"
8000 /* pthread test headers */
8001 #include <pthread.h>
8002 #ifndef NULL
8003 #define NULL (void*)0
8004 #endif
8005
8006 static void *task(p)
8007         void *p;
8008 {
8009         return (void *) (p == NULL);
8010 }
8011
8012 int main() {
8013
8014         /* pthread test function */
8015         pthread_t t;
8016         int status;
8017
8018         /* make sure pthread_create() isn't just a stub */
8019 #if HAVE_PTHREADS_D4
8020         status = pthread_create(&t, pthread_attr_default, task, NULL);
8021 #else
8022         status = pthread_create(&t, NULL, task, NULL);
8023 #endif
8024
8025         if( status ) exit( status );
8026
8027         /* make sure pthread_detach() isn't just a stub */
8028 #if HAVE_PTHREADS_D4
8029         status = pthread_detach( &t );
8030 #else
8031         status = pthread_detach( t );
8032 #endif
8033
8034 #ifdef HAVE_LINUX_THREADS
8035         pthread_kill_other_threads_np();
8036 #endif
8037
8038         exit( status );
8039
8040 ; return 0; }
8041 EOF
8042 if { (eval echo configure:8043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8043   rm -rf conftest*
8044   ol_cv_pthread_thread=yes
8045 else
8046   echo "configure: failed program was:" >&5
8047   cat conftest.$ac_ext >&5
8048   rm -rf conftest*
8049   ol_cv_pthread_thread=no
8050 fi
8051 rm -f conftest*
8052 else
8053   cat > conftest.$ac_ext <<EOF
8054 #line 8055 "configure"
8055 #include "confdefs.h"
8056 /* pthread test headers */
8057 #include <pthread.h>
8058 #ifndef NULL
8059 #define NULL (void*)0
8060 #endif
8061
8062 static void *task(p)
8063         void *p;
8064 {
8065         return (void *) (p == NULL);
8066 }
8067
8068
8069 int main(argc, argv)
8070         int argc;
8071         char **argv;
8072 {
8073
8074         /* pthread test function */
8075         pthread_t t;
8076         int status;
8077
8078         /* make sure pthread_create() isn't just a stub */
8079 #if HAVE_PTHREADS_D4
8080         status = pthread_create(&t, pthread_attr_default, task, NULL);
8081 #else
8082         status = pthread_create(&t, NULL, task, NULL);
8083 #endif
8084
8085         if( status ) exit( status );
8086
8087         /* make sure pthread_detach() isn't just a stub */
8088 #if HAVE_PTHREADS_D4
8089         status = pthread_detach( &t );
8090 #else
8091         status = pthread_detach( t );
8092 #endif
8093
8094 #ifdef HAVE_LINUX_THREADS
8095         pthread_kill_other_threads_np();
8096 #endif
8097
8098         exit( status );
8099
8100 }
8101
8102 EOF
8103 if { (eval echo configure:8104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8104 then
8105   ol_cv_pthread_thread=yes
8106 else
8107   echo "configure: failed program was:" >&5
8108   cat conftest.$ac_ext >&5
8109   rm -fr conftest*
8110   ol_cv_pthread_thread=no
8111 fi
8112 rm -fr conftest*
8113 fi
8114
8115
8116                 # restore the LIBS
8117                 LIBS="$ol_LIBS"
8118         
8119 fi
8120
8121 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8122
8123         if test $ol_cv_pthread_thread = yes ; then
8124                 ol_link_pthreads="-thread"
8125                 ol_link_threads=posix
8126         fi
8127 fi
8128
8129
8130                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8131 if test "$ol_link_threads" = no ; then
8132         # try -lpthread -lmach -lexc -lc_r
8133         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8134 echo "configure:8135: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8135 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8136   echo $ac_n "(cached) $ac_c" 1>&6
8137 else
8138   
8139                 # save the flags
8140                 ol_LIBS="$LIBS"
8141                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8142
8143                 if test "$cross_compiling" = yes; then
8144   cat > conftest.$ac_ext <<EOF
8145 #line 8146 "configure"
8146 #include "confdefs.h"
8147 /* pthread test headers */
8148 #include <pthread.h>
8149 #ifndef NULL
8150 #define NULL (void*)0
8151 #endif
8152
8153 static void *task(p)
8154         void *p;
8155 {
8156         return (void *) (p == NULL);
8157 }
8158
8159 int main() {
8160
8161         /* pthread test function */
8162         pthread_t t;
8163         int status;
8164
8165         /* make sure pthread_create() isn't just a stub */
8166 #if HAVE_PTHREADS_D4
8167         status = pthread_create(&t, pthread_attr_default, task, NULL);
8168 #else
8169         status = pthread_create(&t, NULL, task, NULL);
8170 #endif
8171
8172         if( status ) exit( status );
8173
8174         /* make sure pthread_detach() isn't just a stub */
8175 #if HAVE_PTHREADS_D4
8176         status = pthread_detach( &t );
8177 #else
8178         status = pthread_detach( t );
8179 #endif
8180
8181 #ifdef HAVE_LINUX_THREADS
8182         pthread_kill_other_threads_np();
8183 #endif
8184
8185         exit( status );
8186
8187 ; return 0; }
8188 EOF
8189 if { (eval echo configure:8190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8190   rm -rf conftest*
8191   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8192 else
8193   echo "configure: failed program was:" >&5
8194   cat conftest.$ac_ext >&5
8195   rm -rf conftest*
8196   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8197 fi
8198 rm -f conftest*
8199 else
8200   cat > conftest.$ac_ext <<EOF
8201 #line 8202 "configure"
8202 #include "confdefs.h"
8203 /* pthread test headers */
8204 #include <pthread.h>
8205 #ifndef NULL
8206 #define NULL (void*)0
8207 #endif
8208
8209 static void *task(p)
8210         void *p;
8211 {
8212         return (void *) (p == NULL);
8213 }
8214
8215
8216 int main(argc, argv)
8217         int argc;
8218         char **argv;
8219 {
8220
8221         /* pthread test function */
8222         pthread_t t;
8223         int status;
8224
8225         /* make sure pthread_create() isn't just a stub */
8226 #if HAVE_PTHREADS_D4
8227         status = pthread_create(&t, pthread_attr_default, task, NULL);
8228 #else
8229         status = pthread_create(&t, NULL, task, NULL);
8230 #endif
8231
8232         if( status ) exit( status );
8233
8234         /* make sure pthread_detach() isn't just a stub */
8235 #if HAVE_PTHREADS_D4
8236         status = pthread_detach( &t );
8237 #else
8238         status = pthread_detach( t );
8239 #endif
8240
8241 #ifdef HAVE_LINUX_THREADS
8242         pthread_kill_other_threads_np();
8243 #endif
8244
8245         exit( status );
8246
8247 }
8248
8249 EOF
8250 if { (eval echo configure:8251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8251 then
8252   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8253 else
8254   echo "configure: failed program was:" >&5
8255   cat conftest.$ac_ext >&5
8256   rm -fr conftest*
8257   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8258 fi
8259 rm -fr conftest*
8260 fi
8261
8262
8263                 # restore the LIBS
8264                 LIBS="$ol_LIBS"
8265         
8266 fi
8267
8268 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8269
8270         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8271                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8272                 ol_link_threads=posix
8273         fi
8274 fi
8275
8276                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8277 if test "$ol_link_threads" = no ; then
8278         # try -lpthread -lmach -lexc
8279         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8280 echo "configure:8281: checking for pthread link with -lpthread -lmach -lexc" >&5
8281 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8282   echo $ac_n "(cached) $ac_c" 1>&6
8283 else
8284   
8285                 # save the flags
8286                 ol_LIBS="$LIBS"
8287                 LIBS="-lpthread -lmach -lexc $LIBS"
8288
8289                 if test "$cross_compiling" = yes; then
8290   cat > conftest.$ac_ext <<EOF
8291 #line 8292 "configure"
8292 #include "confdefs.h"
8293 /* pthread test headers */
8294 #include <pthread.h>
8295 #ifndef NULL
8296 #define NULL (void*)0
8297 #endif
8298
8299 static void *task(p)
8300         void *p;
8301 {
8302         return (void *) (p == NULL);
8303 }
8304
8305 int main() {
8306
8307         /* pthread test function */
8308         pthread_t t;
8309         int status;
8310
8311         /* make sure pthread_create() isn't just a stub */
8312 #if HAVE_PTHREADS_D4
8313         status = pthread_create(&t, pthread_attr_default, task, NULL);
8314 #else
8315         status = pthread_create(&t, NULL, task, NULL);
8316 #endif
8317
8318         if( status ) exit( status );
8319
8320         /* make sure pthread_detach() isn't just a stub */
8321 #if HAVE_PTHREADS_D4
8322         status = pthread_detach( &t );
8323 #else
8324         status = pthread_detach( t );
8325 #endif
8326
8327 #ifdef HAVE_LINUX_THREADS
8328         pthread_kill_other_threads_np();
8329 #endif
8330
8331         exit( status );
8332
8333 ; return 0; }
8334 EOF
8335 if { (eval echo configure:8336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8336   rm -rf conftest*
8337   ol_cv_pthread_lpthread_lmach_lexc=yes
8338 else
8339   echo "configure: failed program was:" >&5
8340   cat conftest.$ac_ext >&5
8341   rm -rf conftest*
8342   ol_cv_pthread_lpthread_lmach_lexc=no
8343 fi
8344 rm -f conftest*
8345 else
8346   cat > conftest.$ac_ext <<EOF
8347 #line 8348 "configure"
8348 #include "confdefs.h"
8349 /* pthread test headers */
8350 #include <pthread.h>
8351 #ifndef NULL
8352 #define NULL (void*)0
8353 #endif
8354
8355 static void *task(p)
8356         void *p;
8357 {
8358         return (void *) (p == NULL);
8359 }
8360
8361
8362 int main(argc, argv)
8363         int argc;
8364         char **argv;
8365 {
8366
8367         /* pthread test function */
8368         pthread_t t;
8369         int status;
8370
8371         /* make sure pthread_create() isn't just a stub */
8372 #if HAVE_PTHREADS_D4
8373         status = pthread_create(&t, pthread_attr_default, task, NULL);
8374 #else
8375         status = pthread_create(&t, NULL, task, NULL);
8376 #endif
8377
8378         if( status ) exit( status );
8379
8380         /* make sure pthread_detach() isn't just a stub */
8381 #if HAVE_PTHREADS_D4
8382         status = pthread_detach( &t );
8383 #else
8384         status = pthread_detach( t );
8385 #endif
8386
8387 #ifdef HAVE_LINUX_THREADS
8388         pthread_kill_other_threads_np();
8389 #endif
8390
8391         exit( status );
8392
8393 }
8394
8395 EOF
8396 if { (eval echo configure:8397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8397 then
8398   ol_cv_pthread_lpthread_lmach_lexc=yes
8399 else
8400   echo "configure: failed program was:" >&5
8401   cat conftest.$ac_ext >&5
8402   rm -fr conftest*
8403   ol_cv_pthread_lpthread_lmach_lexc=no
8404 fi
8405 rm -fr conftest*
8406 fi
8407
8408
8409                 # restore the LIBS
8410                 LIBS="$ol_LIBS"
8411         
8412 fi
8413
8414 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8415
8416         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8417                 ol_link_pthreads="-lpthread -lmach -lexc"
8418                 ol_link_threads=posix
8419         fi
8420 fi
8421
8422
8423                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8424 if test "$ol_link_threads" = no ; then
8425         # try -lpthread -Wl,-woff,85
8426         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8427 echo "configure:8428: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8428 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8429   echo $ac_n "(cached) $ac_c" 1>&6
8430 else
8431   
8432                 # save the flags
8433                 ol_LIBS="$LIBS"
8434                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8435
8436                 if test "$cross_compiling" = yes; then
8437   cat > conftest.$ac_ext <<EOF
8438 #line 8439 "configure"
8439 #include "confdefs.h"
8440 /* pthread test headers */
8441 #include <pthread.h>
8442 #ifndef NULL
8443 #define NULL (void*)0
8444 #endif
8445
8446 static void *task(p)
8447         void *p;
8448 {
8449         return (void *) (p == NULL);
8450 }
8451
8452 int main() {
8453
8454         /* pthread test function */
8455         pthread_t t;
8456         int status;
8457
8458         /* make sure pthread_create() isn't just a stub */
8459 #if HAVE_PTHREADS_D4
8460         status = pthread_create(&t, pthread_attr_default, task, NULL);
8461 #else
8462         status = pthread_create(&t, NULL, task, NULL);
8463 #endif
8464
8465         if( status ) exit( status );
8466
8467         /* make sure pthread_detach() isn't just a stub */
8468 #if HAVE_PTHREADS_D4
8469         status = pthread_detach( &t );
8470 #else
8471         status = pthread_detach( t );
8472 #endif
8473
8474 #ifdef HAVE_LINUX_THREADS
8475         pthread_kill_other_threads_np();
8476 #endif
8477
8478         exit( status );
8479
8480 ; return 0; }
8481 EOF
8482 if { (eval echo configure:8483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8483   rm -rf conftest*
8484   ol_cv_pthread_lib_lpthread_woff=yes
8485 else
8486   echo "configure: failed program was:" >&5
8487   cat conftest.$ac_ext >&5
8488   rm -rf conftest*
8489   ol_cv_pthread_lib_lpthread_woff=no
8490 fi
8491 rm -f conftest*
8492 else
8493   cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 /* pthread test headers */
8497 #include <pthread.h>
8498 #ifndef NULL
8499 #define NULL (void*)0
8500 #endif
8501
8502 static void *task(p)
8503         void *p;
8504 {
8505         return (void *) (p == NULL);
8506 }
8507
8508
8509 int main(argc, argv)
8510         int argc;
8511         char **argv;
8512 {
8513
8514         /* pthread test function */
8515         pthread_t t;
8516         int status;
8517
8518         /* make sure pthread_create() isn't just a stub */
8519 #if HAVE_PTHREADS_D4
8520         status = pthread_create(&t, pthread_attr_default, task, NULL);
8521 #else
8522         status = pthread_create(&t, NULL, task, NULL);
8523 #endif
8524
8525         if( status ) exit( status );
8526
8527         /* make sure pthread_detach() isn't just a stub */
8528 #if HAVE_PTHREADS_D4
8529         status = pthread_detach( &t );
8530 #else
8531         status = pthread_detach( t );
8532 #endif
8533
8534 #ifdef HAVE_LINUX_THREADS
8535         pthread_kill_other_threads_np();
8536 #endif
8537
8538         exit( status );
8539
8540 }
8541
8542 EOF
8543 if { (eval echo configure:8544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8544 then
8545   ol_cv_pthread_lib_lpthread_woff=yes
8546 else
8547   echo "configure: failed program was:" >&5
8548   cat conftest.$ac_ext >&5
8549   rm -fr conftest*
8550   ol_cv_pthread_lib_lpthread_woff=no
8551 fi
8552 rm -fr conftest*
8553 fi
8554
8555
8556                 # restore the LIBS
8557                 LIBS="$ol_LIBS"
8558         
8559 fi
8560
8561 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8562
8563         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8564                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8565                 ol_link_threads=posix
8566         fi
8567 fi
8568
8569
8570                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8571 if test "$ol_link_threads" = no ; then
8572         # try -lpthread
8573         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8574 echo "configure:8575: checking for pthread link with -lpthread" >&5
8575 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8576   echo $ac_n "(cached) $ac_c" 1>&6
8577 else
8578   
8579                 # save the flags
8580                 ol_LIBS="$LIBS"
8581                 LIBS="-lpthread $LIBS"
8582
8583                 if test "$cross_compiling" = yes; then
8584   cat > conftest.$ac_ext <<EOF
8585 #line 8586 "configure"
8586 #include "confdefs.h"
8587 /* pthread test headers */
8588 #include <pthread.h>
8589 #ifndef NULL
8590 #define NULL (void*)0
8591 #endif
8592
8593 static void *task(p)
8594         void *p;
8595 {
8596         return (void *) (p == NULL);
8597 }
8598
8599 int main() {
8600
8601         /* pthread test function */
8602         pthread_t t;
8603         int status;
8604
8605         /* make sure pthread_create() isn't just a stub */
8606 #if HAVE_PTHREADS_D4
8607         status = pthread_create(&t, pthread_attr_default, task, NULL);
8608 #else
8609         status = pthread_create(&t, NULL, task, NULL);
8610 #endif
8611
8612         if( status ) exit( status );
8613
8614         /* make sure pthread_detach() isn't just a stub */
8615 #if HAVE_PTHREADS_D4
8616         status = pthread_detach( &t );
8617 #else
8618         status = pthread_detach( t );
8619 #endif
8620
8621 #ifdef HAVE_LINUX_THREADS
8622         pthread_kill_other_threads_np();
8623 #endif
8624
8625         exit( status );
8626
8627 ; return 0; }
8628 EOF
8629 if { (eval echo configure:8630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8630   rm -rf conftest*
8631   ol_cv_pthread_lpthread=yes
8632 else
8633   echo "configure: failed program was:" >&5
8634   cat conftest.$ac_ext >&5
8635   rm -rf conftest*
8636   ol_cv_pthread_lpthread=no
8637 fi
8638 rm -f conftest*
8639 else
8640   cat > conftest.$ac_ext <<EOF
8641 #line 8642 "configure"
8642 #include "confdefs.h"
8643 /* pthread test headers */
8644 #include <pthread.h>
8645 #ifndef NULL
8646 #define NULL (void*)0
8647 #endif
8648
8649 static void *task(p)
8650         void *p;
8651 {
8652         return (void *) (p == NULL);
8653 }
8654
8655
8656 int main(argc, argv)
8657         int argc;
8658         char **argv;
8659 {
8660
8661         /* pthread test function */
8662         pthread_t t;
8663         int status;
8664
8665         /* make sure pthread_create() isn't just a stub */
8666 #if HAVE_PTHREADS_D4
8667         status = pthread_create(&t, pthread_attr_default, task, NULL);
8668 #else
8669         status = pthread_create(&t, NULL, task, NULL);
8670 #endif
8671
8672         if( status ) exit( status );
8673
8674         /* make sure pthread_detach() isn't just a stub */
8675 #if HAVE_PTHREADS_D4
8676         status = pthread_detach( &t );
8677 #else
8678         status = pthread_detach( t );
8679 #endif
8680
8681 #ifdef HAVE_LINUX_THREADS
8682         pthread_kill_other_threads_np();
8683 #endif
8684
8685         exit( status );
8686
8687 }
8688
8689 EOF
8690 if { (eval echo configure:8691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8691 then
8692   ol_cv_pthread_lpthread=yes
8693 else
8694   echo "configure: failed program was:" >&5
8695   cat conftest.$ac_ext >&5
8696   rm -fr conftest*
8697   ol_cv_pthread_lpthread=no
8698 fi
8699 rm -fr conftest*
8700 fi
8701
8702
8703                 # restore the LIBS
8704                 LIBS="$ol_LIBS"
8705         
8706 fi
8707
8708 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8709
8710         if test $ol_cv_pthread_lpthread = yes ; then
8711                 ol_link_pthreads="-lpthread"
8712                 ol_link_threads=posix
8713         fi
8714 fi
8715
8716                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8717 if test "$ol_link_threads" = no ; then
8718         # try -lc_r
8719         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8720 echo "configure:8721: checking for pthread link with -lc_r" >&5
8721 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8722   echo $ac_n "(cached) $ac_c" 1>&6
8723 else
8724   
8725                 # save the flags
8726                 ol_LIBS="$LIBS"
8727                 LIBS="-lc_r $LIBS"
8728
8729                 if test "$cross_compiling" = yes; then
8730   cat > conftest.$ac_ext <<EOF
8731 #line 8732 "configure"
8732 #include "confdefs.h"
8733 /* pthread test headers */
8734 #include <pthread.h>
8735 #ifndef NULL
8736 #define NULL (void*)0
8737 #endif
8738
8739 static void *task(p)
8740         void *p;
8741 {
8742         return (void *) (p == NULL);
8743 }
8744
8745 int main() {
8746
8747         /* pthread test function */
8748         pthread_t t;
8749         int status;
8750
8751         /* make sure pthread_create() isn't just a stub */
8752 #if HAVE_PTHREADS_D4
8753         status = pthread_create(&t, pthread_attr_default, task, NULL);
8754 #else
8755         status = pthread_create(&t, NULL, task, NULL);
8756 #endif
8757
8758         if( status ) exit( status );
8759
8760         /* make sure pthread_detach() isn't just a stub */
8761 #if HAVE_PTHREADS_D4
8762         status = pthread_detach( &t );
8763 #else
8764         status = pthread_detach( t );
8765 #endif
8766
8767 #ifdef HAVE_LINUX_THREADS
8768         pthread_kill_other_threads_np();
8769 #endif
8770
8771         exit( status );
8772
8773 ; return 0; }
8774 EOF
8775 if { (eval echo configure:8776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8776   rm -rf conftest*
8777   ol_cv_pthread_lc_r=yes
8778 else
8779   echo "configure: failed program was:" >&5
8780   cat conftest.$ac_ext >&5
8781   rm -rf conftest*
8782   ol_cv_pthread_lc_r=no
8783 fi
8784 rm -f conftest*
8785 else
8786   cat > conftest.$ac_ext <<EOF
8787 #line 8788 "configure"
8788 #include "confdefs.h"
8789 /* pthread test headers */
8790 #include <pthread.h>
8791 #ifndef NULL
8792 #define NULL (void*)0
8793 #endif
8794
8795 static void *task(p)
8796         void *p;
8797 {
8798         return (void *) (p == NULL);
8799 }
8800
8801
8802 int main(argc, argv)
8803         int argc;
8804         char **argv;
8805 {
8806
8807         /* pthread test function */
8808         pthread_t t;
8809         int status;
8810
8811         /* make sure pthread_create() isn't just a stub */
8812 #if HAVE_PTHREADS_D4
8813         status = pthread_create(&t, pthread_attr_default, task, NULL);
8814 #else
8815         status = pthread_create(&t, NULL, task, NULL);
8816 #endif
8817
8818         if( status ) exit( status );
8819
8820         /* make sure pthread_detach() isn't just a stub */
8821 #if HAVE_PTHREADS_D4
8822         status = pthread_detach( &t );
8823 #else
8824         status = pthread_detach( t );
8825 #endif
8826
8827 #ifdef HAVE_LINUX_THREADS
8828         pthread_kill_other_threads_np();
8829 #endif
8830
8831         exit( status );
8832
8833 }
8834
8835 EOF
8836 if { (eval echo configure:8837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8837 then
8838   ol_cv_pthread_lc_r=yes
8839 else
8840   echo "configure: failed program was:" >&5
8841   cat conftest.$ac_ext >&5
8842   rm -fr conftest*
8843   ol_cv_pthread_lc_r=no
8844 fi
8845 rm -fr conftest*
8846 fi
8847
8848
8849                 # restore the LIBS
8850                 LIBS="$ol_LIBS"
8851         
8852 fi
8853
8854 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8855
8856         if test $ol_cv_pthread_lc_r = yes ; then
8857                 ol_link_pthreads="-lc_r"
8858                 ol_link_threads=posix
8859         fi
8860 fi
8861
8862
8863                 # Pthread try link: -threads (ol_cv_pthread_threads)
8864 if test "$ol_link_threads" = no ; then
8865         # try -threads
8866         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8867 echo "configure:8868: checking for pthread link with -threads" >&5
8868 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8869   echo $ac_n "(cached) $ac_c" 1>&6
8870 else
8871   
8872                 # save the flags
8873                 ol_LIBS="$LIBS"
8874                 LIBS="-threads $LIBS"
8875
8876                 if test "$cross_compiling" = yes; then
8877   cat > conftest.$ac_ext <<EOF
8878 #line 8879 "configure"
8879 #include "confdefs.h"
8880 /* pthread test headers */
8881 #include <pthread.h>
8882 #ifndef NULL
8883 #define NULL (void*)0
8884 #endif
8885
8886 static void *task(p)
8887         void *p;
8888 {
8889         return (void *) (p == NULL);
8890 }
8891
8892 int main() {
8893
8894         /* pthread test function */
8895         pthread_t t;
8896         int status;
8897
8898         /* make sure pthread_create() isn't just a stub */
8899 #if HAVE_PTHREADS_D4
8900         status = pthread_create(&t, pthread_attr_default, task, NULL);
8901 #else
8902         status = pthread_create(&t, NULL, task, NULL);
8903 #endif
8904
8905         if( status ) exit( status );
8906
8907         /* make sure pthread_detach() isn't just a stub */
8908 #if HAVE_PTHREADS_D4
8909         status = pthread_detach( &t );
8910 #else
8911         status = pthread_detach( t );
8912 #endif
8913
8914 #ifdef HAVE_LINUX_THREADS
8915         pthread_kill_other_threads_np();
8916 #endif
8917
8918         exit( status );
8919
8920 ; return 0; }
8921 EOF
8922 if { (eval echo configure:8923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8923   rm -rf conftest*
8924   ol_cv_pthread_threads=yes
8925 else
8926   echo "configure: failed program was:" >&5
8927   cat conftest.$ac_ext >&5
8928   rm -rf conftest*
8929   ol_cv_pthread_threads=no
8930 fi
8931 rm -f conftest*
8932 else
8933   cat > conftest.$ac_ext <<EOF
8934 #line 8935 "configure"
8935 #include "confdefs.h"
8936 /* pthread test headers */
8937 #include <pthread.h>
8938 #ifndef NULL
8939 #define NULL (void*)0
8940 #endif
8941
8942 static void *task(p)
8943         void *p;
8944 {
8945         return (void *) (p == NULL);
8946 }
8947
8948
8949 int main(argc, argv)
8950         int argc;
8951         char **argv;
8952 {
8953
8954         /* pthread test function */
8955         pthread_t t;
8956         int status;
8957
8958         /* make sure pthread_create() isn't just a stub */
8959 #if HAVE_PTHREADS_D4
8960         status = pthread_create(&t, pthread_attr_default, task, NULL);
8961 #else
8962         status = pthread_create(&t, NULL, task, NULL);
8963 #endif
8964
8965         if( status ) exit( status );
8966
8967         /* make sure pthread_detach() isn't just a stub */
8968 #if HAVE_PTHREADS_D4
8969         status = pthread_detach( &t );
8970 #else
8971         status = pthread_detach( t );
8972 #endif
8973
8974 #ifdef HAVE_LINUX_THREADS
8975         pthread_kill_other_threads_np();
8976 #endif
8977
8978         exit( status );
8979
8980 }
8981
8982 EOF
8983 if { (eval echo configure:8984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8984 then
8985   ol_cv_pthread_threads=yes
8986 else
8987   echo "configure: failed program was:" >&5
8988   cat conftest.$ac_ext >&5
8989   rm -fr conftest*
8990   ol_cv_pthread_threads=no
8991 fi
8992 rm -fr conftest*
8993 fi
8994
8995
8996                 # restore the LIBS
8997                 LIBS="$ol_LIBS"
8998         
8999 fi
9000
9001 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9002
9003         if test $ol_cv_pthread_threads = yes ; then
9004                 ol_link_pthreads="-threads"
9005                 ol_link_threads=posix
9006         fi
9007 fi
9008
9009
9010                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9011 if test "$ol_link_threads" = no ; then
9012         # try -lpthreads -lmach -lexc -lc_r
9013         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9014 echo "configure:9015: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9015 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9016   echo $ac_n "(cached) $ac_c" 1>&6
9017 else
9018   
9019                 # save the flags
9020                 ol_LIBS="$LIBS"
9021                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9022
9023                 if test "$cross_compiling" = yes; then
9024   cat > conftest.$ac_ext <<EOF
9025 #line 9026 "configure"
9026 #include "confdefs.h"
9027 /* pthread test headers */
9028 #include <pthread.h>
9029 #ifndef NULL
9030 #define NULL (void*)0
9031 #endif
9032
9033 static void *task(p)
9034         void *p;
9035 {
9036         return (void *) (p == NULL);
9037 }
9038
9039 int main() {
9040
9041         /* pthread test function */
9042         pthread_t t;
9043         int status;
9044
9045         /* make sure pthread_create() isn't just a stub */
9046 #if HAVE_PTHREADS_D4
9047         status = pthread_create(&t, pthread_attr_default, task, NULL);
9048 #else
9049         status = pthread_create(&t, NULL, task, NULL);
9050 #endif
9051
9052         if( status ) exit( status );
9053
9054         /* make sure pthread_detach() isn't just a stub */
9055 #if HAVE_PTHREADS_D4
9056         status = pthread_detach( &t );
9057 #else
9058         status = pthread_detach( t );
9059 #endif
9060
9061 #ifdef HAVE_LINUX_THREADS
9062         pthread_kill_other_threads_np();
9063 #endif
9064
9065         exit( status );
9066
9067 ; return 0; }
9068 EOF
9069 if { (eval echo configure:9070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9070   rm -rf conftest*
9071   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9072 else
9073   echo "configure: failed program was:" >&5
9074   cat conftest.$ac_ext >&5
9075   rm -rf conftest*
9076   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9077 fi
9078 rm -f conftest*
9079 else
9080   cat > conftest.$ac_ext <<EOF
9081 #line 9082 "configure"
9082 #include "confdefs.h"
9083 /* pthread test headers */
9084 #include <pthread.h>
9085 #ifndef NULL
9086 #define NULL (void*)0
9087 #endif
9088
9089 static void *task(p)
9090         void *p;
9091 {
9092         return (void *) (p == NULL);
9093 }
9094
9095
9096 int main(argc, argv)
9097         int argc;
9098         char **argv;
9099 {
9100
9101         /* pthread test function */
9102         pthread_t t;
9103         int status;
9104
9105         /* make sure pthread_create() isn't just a stub */
9106 #if HAVE_PTHREADS_D4
9107         status = pthread_create(&t, pthread_attr_default, task, NULL);
9108 #else
9109         status = pthread_create(&t, NULL, task, NULL);
9110 #endif
9111
9112         if( status ) exit( status );
9113
9114         /* make sure pthread_detach() isn't just a stub */
9115 #if HAVE_PTHREADS_D4
9116         status = pthread_detach( &t );
9117 #else
9118         status = pthread_detach( t );
9119 #endif
9120
9121 #ifdef HAVE_LINUX_THREADS
9122         pthread_kill_other_threads_np();
9123 #endif
9124
9125         exit( status );
9126
9127 }
9128
9129 EOF
9130 if { (eval echo configure:9131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9131 then
9132   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9133 else
9134   echo "configure: failed program was:" >&5
9135   cat conftest.$ac_ext >&5
9136   rm -fr conftest*
9137   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9138 fi
9139 rm -fr conftest*
9140 fi
9141
9142
9143                 # restore the LIBS
9144                 LIBS="$ol_LIBS"
9145         
9146 fi
9147
9148 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9149
9150         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9151                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9152                 ol_link_threads=posix
9153         fi
9154 fi
9155
9156                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9157 if test "$ol_link_threads" = no ; then
9158         # try -lpthreads -lmach -lexc
9159         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9160 echo "configure:9161: checking for pthread link with -lpthreads -lmach -lexc" >&5
9161 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9162   echo $ac_n "(cached) $ac_c" 1>&6
9163 else
9164   
9165                 # save the flags
9166                 ol_LIBS="$LIBS"
9167                 LIBS="-lpthreads -lmach -lexc $LIBS"
9168
9169                 if test "$cross_compiling" = yes; then
9170   cat > conftest.$ac_ext <<EOF
9171 #line 9172 "configure"
9172 #include "confdefs.h"
9173 /* pthread test headers */
9174 #include <pthread.h>
9175 #ifndef NULL
9176 #define NULL (void*)0
9177 #endif
9178
9179 static void *task(p)
9180         void *p;
9181 {
9182         return (void *) (p == NULL);
9183 }
9184
9185 int main() {
9186
9187         /* pthread test function */
9188         pthread_t t;
9189         int status;
9190
9191         /* make sure pthread_create() isn't just a stub */
9192 #if HAVE_PTHREADS_D4
9193         status = pthread_create(&t, pthread_attr_default, task, NULL);
9194 #else
9195         status = pthread_create(&t, NULL, task, NULL);
9196 #endif
9197
9198         if( status ) exit( status );
9199
9200         /* make sure pthread_detach() isn't just a stub */
9201 #if HAVE_PTHREADS_D4
9202         status = pthread_detach( &t );
9203 #else
9204         status = pthread_detach( t );
9205 #endif
9206
9207 #ifdef HAVE_LINUX_THREADS
9208         pthread_kill_other_threads_np();
9209 #endif
9210
9211         exit( status );
9212
9213 ; return 0; }
9214 EOF
9215 if { (eval echo configure:9216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9216   rm -rf conftest*
9217   ol_cv_pthread_lpthreads_lmach_lexc=yes
9218 else
9219   echo "configure: failed program was:" >&5
9220   cat conftest.$ac_ext >&5
9221   rm -rf conftest*
9222   ol_cv_pthread_lpthreads_lmach_lexc=no
9223 fi
9224 rm -f conftest*
9225 else
9226   cat > conftest.$ac_ext <<EOF
9227 #line 9228 "configure"
9228 #include "confdefs.h"
9229 /* pthread test headers */
9230 #include <pthread.h>
9231 #ifndef NULL
9232 #define NULL (void*)0
9233 #endif
9234
9235 static void *task(p)
9236         void *p;
9237 {
9238         return (void *) (p == NULL);
9239 }
9240
9241
9242 int main(argc, argv)
9243         int argc;
9244         char **argv;
9245 {
9246
9247         /* pthread test function */
9248         pthread_t t;
9249         int status;
9250
9251         /* make sure pthread_create() isn't just a stub */
9252 #if HAVE_PTHREADS_D4
9253         status = pthread_create(&t, pthread_attr_default, task, NULL);
9254 #else
9255         status = pthread_create(&t, NULL, task, NULL);
9256 #endif
9257
9258         if( status ) exit( status );
9259
9260         /* make sure pthread_detach() isn't just a stub */
9261 #if HAVE_PTHREADS_D4
9262         status = pthread_detach( &t );
9263 #else
9264         status = pthread_detach( t );
9265 #endif
9266
9267 #ifdef HAVE_LINUX_THREADS
9268         pthread_kill_other_threads_np();
9269 #endif
9270
9271         exit( status );
9272
9273 }
9274
9275 EOF
9276 if { (eval echo configure:9277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9277 then
9278   ol_cv_pthread_lpthreads_lmach_lexc=yes
9279 else
9280   echo "configure: failed program was:" >&5
9281   cat conftest.$ac_ext >&5
9282   rm -fr conftest*
9283   ol_cv_pthread_lpthreads_lmach_lexc=no
9284 fi
9285 rm -fr conftest*
9286 fi
9287
9288
9289                 # restore the LIBS
9290                 LIBS="$ol_LIBS"
9291         
9292 fi
9293
9294 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9295
9296         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9297                 ol_link_pthreads="-lpthreads -lmach -lexc"
9298                 ol_link_threads=posix
9299         fi
9300 fi
9301
9302                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9303 if test "$ol_link_threads" = no ; then
9304         # try -lpthreads -lexc
9305         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9306 echo "configure:9307: checking for pthread link with -lpthreads -lexc" >&5
9307 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9308   echo $ac_n "(cached) $ac_c" 1>&6
9309 else
9310   
9311                 # save the flags
9312                 ol_LIBS="$LIBS"
9313                 LIBS="-lpthreads -lexc $LIBS"
9314
9315                 if test "$cross_compiling" = yes; then
9316   cat > conftest.$ac_ext <<EOF
9317 #line 9318 "configure"
9318 #include "confdefs.h"
9319 /* pthread test headers */
9320 #include <pthread.h>
9321 #ifndef NULL
9322 #define NULL (void*)0
9323 #endif
9324
9325 static void *task(p)
9326         void *p;
9327 {
9328         return (void *) (p == NULL);
9329 }
9330
9331 int main() {
9332
9333         /* pthread test function */
9334         pthread_t t;
9335         int status;
9336
9337         /* make sure pthread_create() isn't just a stub */
9338 #if HAVE_PTHREADS_D4
9339         status = pthread_create(&t, pthread_attr_default, task, NULL);
9340 #else
9341         status = pthread_create(&t, NULL, task, NULL);
9342 #endif
9343
9344         if( status ) exit( status );
9345
9346         /* make sure pthread_detach() isn't just a stub */
9347 #if HAVE_PTHREADS_D4
9348         status = pthread_detach( &t );
9349 #else
9350         status = pthread_detach( t );
9351 #endif
9352
9353 #ifdef HAVE_LINUX_THREADS
9354         pthread_kill_other_threads_np();
9355 #endif
9356
9357         exit( status );
9358
9359 ; return 0; }
9360 EOF
9361 if { (eval echo configure:9362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9362   rm -rf conftest*
9363   ol_cv_pthread_lpthreads_lexc=yes
9364 else
9365   echo "configure: failed program was:" >&5
9366   cat conftest.$ac_ext >&5
9367   rm -rf conftest*
9368   ol_cv_pthread_lpthreads_lexc=no
9369 fi
9370 rm -f conftest*
9371 else
9372   cat > conftest.$ac_ext <<EOF
9373 #line 9374 "configure"
9374 #include "confdefs.h"
9375 /* pthread test headers */
9376 #include <pthread.h>
9377 #ifndef NULL
9378 #define NULL (void*)0
9379 #endif
9380
9381 static void *task(p)
9382         void *p;
9383 {
9384         return (void *) (p == NULL);
9385 }
9386
9387
9388 int main(argc, argv)
9389         int argc;
9390         char **argv;
9391 {
9392
9393         /* pthread test function */
9394         pthread_t t;
9395         int status;
9396
9397         /* make sure pthread_create() isn't just a stub */
9398 #if HAVE_PTHREADS_D4
9399         status = pthread_create(&t, pthread_attr_default, task, NULL);
9400 #else
9401         status = pthread_create(&t, NULL, task, NULL);
9402 #endif
9403
9404         if( status ) exit( status );
9405
9406         /* make sure pthread_detach() isn't just a stub */
9407 #if HAVE_PTHREADS_D4
9408         status = pthread_detach( &t );
9409 #else
9410         status = pthread_detach( t );
9411 #endif
9412
9413 #ifdef HAVE_LINUX_THREADS
9414         pthread_kill_other_threads_np();
9415 #endif
9416
9417         exit( status );
9418
9419 }
9420
9421 EOF
9422 if { (eval echo configure:9423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9423 then
9424   ol_cv_pthread_lpthreads_lexc=yes
9425 else
9426   echo "configure: failed program was:" >&5
9427   cat conftest.$ac_ext >&5
9428   rm -fr conftest*
9429   ol_cv_pthread_lpthreads_lexc=no
9430 fi
9431 rm -fr conftest*
9432 fi
9433
9434
9435                 # restore the LIBS
9436                 LIBS="$ol_LIBS"
9437         
9438 fi
9439
9440 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9441
9442         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9443                 ol_link_pthreads="-lpthreads -lexc"
9444                 ol_link_threads=posix
9445         fi
9446 fi
9447
9448
9449                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9450 if test "$ol_link_threads" = no ; then
9451         # try -lpthreads
9452         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9453 echo "configure:9454: checking for pthread link with -lpthreads" >&5
9454 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9455   echo $ac_n "(cached) $ac_c" 1>&6
9456 else
9457   
9458                 # save the flags
9459                 ol_LIBS="$LIBS"
9460                 LIBS="-lpthreads $LIBS"
9461
9462                 if test "$cross_compiling" = yes; then
9463   cat > conftest.$ac_ext <<EOF
9464 #line 9465 "configure"
9465 #include "confdefs.h"
9466 /* pthread test headers */
9467 #include <pthread.h>
9468 #ifndef NULL
9469 #define NULL (void*)0
9470 #endif
9471
9472 static void *task(p)
9473         void *p;
9474 {
9475         return (void *) (p == NULL);
9476 }
9477
9478 int main() {
9479
9480         /* pthread test function */
9481         pthread_t t;
9482         int status;
9483
9484         /* make sure pthread_create() isn't just a stub */
9485 #if HAVE_PTHREADS_D4
9486         status = pthread_create(&t, pthread_attr_default, task, NULL);
9487 #else
9488         status = pthread_create(&t, NULL, task, NULL);
9489 #endif
9490
9491         if( status ) exit( status );
9492
9493         /* make sure pthread_detach() isn't just a stub */
9494 #if HAVE_PTHREADS_D4
9495         status = pthread_detach( &t );
9496 #else
9497         status = pthread_detach( t );
9498 #endif
9499
9500 #ifdef HAVE_LINUX_THREADS
9501         pthread_kill_other_threads_np();
9502 #endif
9503
9504         exit( status );
9505
9506 ; return 0; }
9507 EOF
9508 if { (eval echo configure:9509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9509   rm -rf conftest*
9510   ol_cv_pthread_lib_lpthreads=yes
9511 else
9512   echo "configure: failed program was:" >&5
9513   cat conftest.$ac_ext >&5
9514   rm -rf conftest*
9515   ol_cv_pthread_lib_lpthreads=no
9516 fi
9517 rm -f conftest*
9518 else
9519   cat > conftest.$ac_ext <<EOF
9520 #line 9521 "configure"
9521 #include "confdefs.h"
9522 /* pthread test headers */
9523 #include <pthread.h>
9524 #ifndef NULL
9525 #define NULL (void*)0
9526 #endif
9527
9528 static void *task(p)
9529         void *p;
9530 {
9531         return (void *) (p == NULL);
9532 }
9533
9534
9535 int main(argc, argv)
9536         int argc;
9537         char **argv;
9538 {
9539
9540         /* pthread test function */
9541         pthread_t t;
9542         int status;
9543
9544         /* make sure pthread_create() isn't just a stub */
9545 #if HAVE_PTHREADS_D4
9546         status = pthread_create(&t, pthread_attr_default, task, NULL);
9547 #else
9548         status = pthread_create(&t, NULL, task, NULL);
9549 #endif
9550
9551         if( status ) exit( status );
9552
9553         /* make sure pthread_detach() isn't just a stub */
9554 #if HAVE_PTHREADS_D4
9555         status = pthread_detach( &t );
9556 #else
9557         status = pthread_detach( t );
9558 #endif
9559
9560 #ifdef HAVE_LINUX_THREADS
9561         pthread_kill_other_threads_np();
9562 #endif
9563
9564         exit( status );
9565
9566 }
9567
9568 EOF
9569 if { (eval echo configure:9570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9570 then
9571   ol_cv_pthread_lib_lpthreads=yes
9572 else
9573   echo "configure: failed program was:" >&5
9574   cat conftest.$ac_ext >&5
9575   rm -fr conftest*
9576   ol_cv_pthread_lib_lpthreads=no
9577 fi
9578 rm -fr conftest*
9579 fi
9580
9581
9582                 # restore the LIBS
9583                 LIBS="$ol_LIBS"
9584         
9585 fi
9586
9587 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9588
9589         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9590                 ol_link_pthreads="-lpthreads"
9591                 ol_link_threads=posix
9592         fi
9593 fi
9594
9595
9596                 if test $ol_link_threads != no ; then
9597                         cat >> confdefs.h <<\EOF
9598 #define HAVE_PTHREADS 1
9599 EOF
9600
9601
9602                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9603
9604                                                 save_CPPFLAGS="$CPPFLAGS"
9605                         save_LIBS="$LIBS"
9606                         LIBS="$LTHREAD_LIBS $LIBS"
9607
9608                                                                                                 for ac_func in sched_yield pthread_yield
9609 do
9610 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9611 echo "configure:9612: checking for $ac_func" >&5
9612 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9613   echo $ac_n "(cached) $ac_c" 1>&6
9614 else
9615   cat > conftest.$ac_ext <<EOF
9616 #line 9617 "configure"
9617 #include "confdefs.h"
9618 /* System header to define __stub macros and hopefully few prototypes,
9619     which can conflict with char $ac_func(); below.  */
9620 #include <assert.h>
9621 /* Override any gcc2 internal prototype to avoid an error.  */
9622 /* We use char because int might match the return type of a gcc2
9623     builtin and then its argument prototype would still apply.  */
9624 char $ac_func();
9625 char (*f)();
9626
9627 int main() {
9628
9629 /* The GNU C library defines this for functions which it implements
9630     to always fail with ENOSYS.  Some functions are actually named
9631     something starting with __ and the normal name is an alias.  */
9632 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9633 choke me
9634 #else
9635 f = $ac_func;
9636 #endif
9637
9638 ; return 0; }
9639 EOF
9640 if { (eval echo configure:9641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9641   rm -rf conftest*
9642   eval "ac_cv_func_$ac_func=yes"
9643 else
9644   echo "configure: failed program was:" >&5
9645   cat conftest.$ac_ext >&5
9646   rm -rf conftest*
9647   eval "ac_cv_func_$ac_func=no"
9648 fi
9649 rm -f conftest*
9650 fi
9651
9652 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9653   echo "$ac_t""yes" 1>&6
9654     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9655   cat >> confdefs.h <<EOF
9656 #define $ac_tr_func 1
9657 EOF
9658  
9659 else
9660   echo "$ac_t""no" 1>&6
9661 fi
9662 done
9663
9664
9665                         if test $ac_cv_func_sched_yield = no -a \
9666                                 $ac_cv_func_pthread_yield = no ; then
9667                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9668 echo "configure:9669: checking for sched_yield in -lrt" >&5
9669 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9670 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9671   echo $ac_n "(cached) $ac_c" 1>&6
9672 else
9673   ac_save_LIBS="$LIBS"
9674 LIBS="-lrt  $LIBS"
9675 cat > conftest.$ac_ext <<EOF
9676 #line 9677 "configure"
9677 #include "confdefs.h"
9678 /* Override any gcc2 internal prototype to avoid an error.  */
9679 /* We use char because int might match the return type of a gcc2
9680     builtin and then its argument prototype would still apply.  */
9681 char sched_yield();
9682
9683 int main() {
9684 sched_yield()
9685 ; return 0; }
9686 EOF
9687 if { (eval echo configure:9688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9688   rm -rf conftest*
9689   eval "ac_cv_lib_$ac_lib_var=yes"
9690 else
9691   echo "configure: failed program was:" >&5
9692   cat conftest.$ac_ext >&5
9693   rm -rf conftest*
9694   eval "ac_cv_lib_$ac_lib_var=no"
9695 fi
9696 rm -f conftest*
9697 LIBS="$ac_save_LIBS"
9698
9699 fi
9700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9701   echo "$ac_t""yes" 1>&6
9702   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9703                                         cat >> confdefs.h <<\EOF
9704 #define HAVE_SCHED_YIELD 1
9705 EOF
9706
9707                                         ac_cv_func_sched_yield=yes
9708 else
9709   echo "$ac_t""no" 1>&6
9710 ac_cv_func_sched_yield=no
9711 fi
9712
9713                         fi
9714                         if test $ac_cv_func_sched_yield = no -a \
9715                                 $ac_cv_func_pthread_yield = no ; then
9716                                                                                                 for ac_func in thr_yield
9717 do
9718 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9719 echo "configure:9720: checking for $ac_func" >&5
9720 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9721   echo $ac_n "(cached) $ac_c" 1>&6
9722 else
9723   cat > conftest.$ac_ext <<EOF
9724 #line 9725 "configure"
9725 #include "confdefs.h"
9726 /* System header to define __stub macros and hopefully few prototypes,
9727     which can conflict with char $ac_func(); below.  */
9728 #include <assert.h>
9729 /* Override any gcc2 internal prototype to avoid an error.  */
9730 /* We use char because int might match the return type of a gcc2
9731     builtin and then its argument prototype would still apply.  */
9732 char $ac_func();
9733 char (*f)();
9734
9735 int main() {
9736
9737 /* The GNU C library defines this for functions which it implements
9738     to always fail with ENOSYS.  Some functions are actually named
9739     something starting with __ and the normal name is an alias.  */
9740 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9741 choke me
9742 #else
9743 f = $ac_func;
9744 #endif
9745
9746 ; return 0; }
9747 EOF
9748 if { (eval echo configure:9749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9749   rm -rf conftest*
9750   eval "ac_cv_func_$ac_func=yes"
9751 else
9752   echo "configure: failed program was:" >&5
9753   cat conftest.$ac_ext >&5
9754   rm -rf conftest*
9755   eval "ac_cv_func_$ac_func=no"
9756 fi
9757 rm -f conftest*
9758 fi
9759
9760 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9761   echo "$ac_t""yes" 1>&6
9762     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9763   cat >> confdefs.h <<EOF
9764 #define $ac_tr_func 1
9765 EOF
9766  
9767 else
9768   echo "$ac_t""no" 1>&6
9769 fi
9770 done
9771
9772                         fi
9773                         if test $ac_cv_func_sched_yield = no -a \
9774                                 $ac_cv_func_pthread_yield = no -a \
9775                                 "$ac_cv_func_thr_yield" = no ; then
9776                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9777                         fi
9778
9779                                                 for ac_func in pthread_kill
9780 do
9781 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9782 echo "configure:9783: checking for $ac_func" >&5
9783 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9784   echo $ac_n "(cached) $ac_c" 1>&6
9785 else
9786   cat > conftest.$ac_ext <<EOF
9787 #line 9788 "configure"
9788 #include "confdefs.h"
9789 /* System header to define __stub macros and hopefully few prototypes,
9790     which can conflict with char $ac_func(); below.  */
9791 #include <assert.h>
9792 /* Override any gcc2 internal prototype to avoid an error.  */
9793 /* We use char because int might match the return type of a gcc2
9794     builtin and then its argument prototype would still apply.  */
9795 char $ac_func();
9796 char (*f)();
9797
9798 int main() {
9799
9800 /* The GNU C library defines this for functions which it implements
9801     to always fail with ENOSYS.  Some functions are actually named
9802     something starting with __ and the normal name is an alias.  */
9803 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9804 choke me
9805 #else
9806 f = $ac_func;
9807 #endif
9808
9809 ; return 0; }
9810 EOF
9811 if { (eval echo configure:9812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9812   rm -rf conftest*
9813   eval "ac_cv_func_$ac_func=yes"
9814 else
9815   echo "configure: failed program was:" >&5
9816   cat conftest.$ac_ext >&5
9817   rm -rf conftest*
9818   eval "ac_cv_func_$ac_func=no"
9819 fi
9820 rm -f conftest*
9821 fi
9822
9823 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9824   echo "$ac_t""yes" 1>&6
9825     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9826   cat >> confdefs.h <<EOF
9827 #define $ac_tr_func 1
9828 EOF
9829  
9830 else
9831   echo "$ac_t""no" 1>&6
9832 fi
9833 done
9834
9835
9836                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9837 echo "configure:9838: checking for pthread_detach with <pthread.h>" >&5
9838 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9839   echo $ac_n "(cached) $ac_c" 1>&6
9840 else
9841   
9842                                                                 cat > conftest.$ac_ext <<EOF
9843 #line 9844 "configure"
9844 #include "confdefs.h"
9845
9846 #include <pthread.h>
9847 #ifndef NULL
9848 #define NULL (void*)0
9849 #endif
9850
9851 int main() {
9852 pthread_detach(NULL);
9853 ; return 0; }
9854 EOF
9855 if { (eval echo configure:9856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9856   rm -rf conftest*
9857   ol_cv_func_pthread_detach=yes
9858 else
9859   echo "configure: failed program was:" >&5
9860   cat conftest.$ac_ext >&5
9861   rm -rf conftest*
9862   ol_cv_func_pthread_detach=no
9863 fi
9864 rm -f conftest*
9865                         
9866 fi
9867
9868 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9869
9870                         if test $ol_cv_func_pthread_detach = no ; then
9871                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9872                         fi
9873
9874                         cat >> confdefs.h <<\EOF
9875 #define HAVE_PTHREAD_DETACH 1
9876 EOF
9877
9878
9879                                                 for ac_func in \
9880                                 pthread_setconcurrency \
9881                                 pthread_getconcurrency \
9882                                 thr_setconcurrency \
9883                                 thr_getconcurrency \
9884                         
9885 do
9886 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9887 echo "configure:9888: checking for $ac_func" >&5
9888 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9889   echo $ac_n "(cached) $ac_c" 1>&6
9890 else
9891   cat > conftest.$ac_ext <<EOF
9892 #line 9893 "configure"
9893 #include "confdefs.h"
9894 /* System header to define __stub macros and hopefully few prototypes,
9895     which can conflict with char $ac_func(); below.  */
9896 #include <assert.h>
9897 /* Override any gcc2 internal prototype to avoid an error.  */
9898 /* We use char because int might match the return type of a gcc2
9899     builtin and then its argument prototype would still apply.  */
9900 char $ac_func();
9901 char (*f)();
9902
9903 int main() {
9904
9905 /* The GNU C library defines this for functions which it implements
9906     to always fail with ENOSYS.  Some functions are actually named
9907     something starting with __ and the normal name is an alias.  */
9908 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9909 choke me
9910 #else
9911 f = $ac_func;
9912 #endif
9913
9914 ; return 0; }
9915 EOF
9916 if { (eval echo configure:9917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9917   rm -rf conftest*
9918   eval "ac_cv_func_$ac_func=yes"
9919 else
9920   echo "configure: failed program was:" >&5
9921   cat conftest.$ac_ext >&5
9922   rm -rf conftest*
9923   eval "ac_cv_func_$ac_func=no"
9924 fi
9925 rm -f conftest*
9926 fi
9927
9928 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9929   echo "$ac_t""yes" 1>&6
9930     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9931   cat >> confdefs.h <<EOF
9932 #define $ac_tr_func 1
9933 EOF
9934  
9935 else
9936   echo "$ac_t""no" 1>&6
9937 fi
9938 done
9939
9940
9941                         
9942         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9943 echo "configure:9944: checking for pthread_kill_other_threads_np" >&5
9944 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9945   echo $ac_n "(cached) $ac_c" 1>&6
9946 else
9947   cat > conftest.$ac_ext <<EOF
9948 #line 9949 "configure"
9949 #include "confdefs.h"
9950 /* System header to define __stub macros and hopefully few prototypes,
9951     which can conflict with char pthread_kill_other_threads_np(); below.  */
9952 #include <assert.h>
9953 /* Override any gcc2 internal prototype to avoid an error.  */
9954 /* We use char because int might match the return type of a gcc2
9955     builtin and then its argument prototype would still apply.  */
9956 char pthread_kill_other_threads_np();
9957 char (*f)();
9958
9959 int main() {
9960
9961 /* The GNU C library defines this for functions which it implements
9962     to always fail with ENOSYS.  Some functions are actually named
9963     something starting with __ and the normal name is an alias.  */
9964 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9965 choke me
9966 #else
9967 f = pthread_kill_other_threads_np;
9968 #endif
9969
9970 ; return 0; }
9971 EOF
9972 if { (eval echo configure:9973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9973   rm -rf conftest*
9974   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9975 else
9976   echo "configure: failed program was:" >&5
9977   cat conftest.$ac_ext >&5
9978   rm -rf conftest*
9979   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9980 fi
9981 rm -f conftest*
9982 fi
9983
9984 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9985   echo "$ac_t""yes" 1>&6
9986   :
9987 else
9988   echo "$ac_t""no" 1>&6
9989 fi
9990
9991         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9992 echo "configure:9993: checking for LinuxThreads implementation" >&5
9993 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9994   echo $ac_n "(cached) $ac_c" 1>&6
9995 else
9996   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9997 fi
9998
9999 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10000
10001                         
10002         
10003         
10004         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10005 echo "configure:10006: checking for LinuxThreads consistency" >&5
10006 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10007   echo $ac_n "(cached) $ac_c" 1>&6
10008 else
10009   
10010                 if test $ol_cv_header_linux_threads = yes -a \
10011                         $ol_cv_sys_linux_threads = yes; then
10012                         ol_cv_linux_threads=yes
10013                 elif test $ol_cv_header_linux_threads = no -a \
10014                         $ol_cv_sys_linux_threads = no; then
10015                         ol_cv_linux_threads=no
10016                 else
10017                         ol_cv_linux_threads=error
10018                 fi
10019         
10020 fi
10021
10022 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10023
10024
10025                         if test $ol_cv_linux_threads = error; then
10026                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10027                         fi
10028
10029                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10030 echo "configure:10031: checking if pthread_create() works" >&5
10031 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10032   echo $ac_n "(cached) $ac_c" 1>&6
10033 else
10034   
10035                         if test "$cross_compiling" = yes; then
10036                                 ol_cv_pthread_create_works=yes
10037 else
10038   cat > conftest.$ac_ext <<EOF
10039 #line 10040 "configure"
10040 #include "confdefs.h"
10041 /* pthread test headers */
10042 #include <pthread.h>
10043 #ifndef NULL
10044 #define NULL (void*)0
10045 #endif
10046
10047 static void *task(p)
10048         void *p;
10049 {
10050         return (void *) (p == NULL);
10051 }
10052
10053
10054 int main(argc, argv)
10055         int argc;
10056         char **argv;
10057 {
10058
10059         /* pthread test function */
10060         pthread_t t;
10061         int status;
10062
10063         /* make sure pthread_create() isn't just a stub */
10064 #if HAVE_PTHREADS_D4
10065         status = pthread_create(&t, pthread_attr_default, task, NULL);
10066 #else
10067         status = pthread_create(&t, NULL, task, NULL);
10068 #endif
10069
10070         if( status ) exit( status );
10071
10072         /* make sure pthread_detach() isn't just a stub */
10073 #if HAVE_PTHREADS_D4
10074         status = pthread_detach( &t );
10075 #else
10076         status = pthread_detach( t );
10077 #endif
10078
10079 #ifdef HAVE_LINUX_THREADS
10080         pthread_kill_other_threads_np();
10081 #endif
10082
10083         exit( status );
10084
10085 }
10086
10087 EOF
10088 if { (eval echo configure:10089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10089 then
10090   ol_cv_pthread_create_works=yes
10091 else
10092   echo "configure: failed program was:" >&5
10093   cat conftest.$ac_ext >&5
10094   rm -fr conftest*
10095   ol_cv_pthread_create_works=no
10096 fi
10097 rm -fr conftest*
10098 fi
10099
10100 fi
10101
10102 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10103
10104                         if test $ol_cv_pthread_create_works = no ; then
10105                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10106                         fi
10107
10108                                                 if test $ol_with_yielding_select = auto ; then
10109                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10110 echo "configure:10111: checking if select yields when using pthreads" >&5
10111 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10112   echo $ac_n "(cached) $ac_c" 1>&6
10113 else
10114   
10115                                 if test "$cross_compiling" = yes; then
10116   ol_cv_pthread_select_yields=cross
10117 else
10118   cat > conftest.$ac_ext <<EOF
10119 #line 10120 "configure"
10120 #include "confdefs.h"
10121
10122 #include <sys/types.h>
10123 #include <sys/time.h>
10124 #include <unistd.h>
10125 #include <pthread.h>
10126 #ifndef NULL
10127 #define NULL (void*) 0
10128 #endif
10129
10130 static int fildes[2];
10131
10132 static void *task(p)
10133         void *p;
10134 {
10135         int i;
10136         struct timeval tv;
10137
10138         fd_set rfds;
10139
10140         tv.tv_sec=10;
10141         tv.tv_usec=0;
10142
10143         FD_ZERO(&rfds);
10144         FD_SET(fildes[0], &rfds);
10145
10146         /* we're not interested in any fds */
10147         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10148
10149         if(i < 0) {
10150                 perror("select");
10151                 exit(10);
10152         }
10153
10154         exit(0); /* if we exit here, the select blocked the whole process */
10155 }
10156
10157 int main(argc, argv)
10158         int argc;
10159         char **argv;
10160 {
10161         pthread_t t;
10162
10163         /* create a pipe to select */
10164         if(pipe(&fildes[0])) {
10165                 perror("select");
10166                 exit(1);
10167         }
10168
10169 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10170         (void) pthread_setconcurrency(2);
10171 #else
10172 #ifdef HAVE_THR_SETCONCURRENCY
10173         /* Set Solaris LWP concurrency to 2 */
10174         thr_setconcurrency(2);
10175 #endif
10176 #endif
10177
10178 #if HAVE_PTHREADS_D4
10179         pthread_create(&t, pthread_attr_default, task, NULL);
10180 #else
10181         pthread_create(&t, NULL, task, NULL);
10182 #endif
10183
10184 #if HAVE_SCHED_YIELD
10185         sched_yield();  /* make sure task runs first */
10186 #else
10187 #ifdef HAVE_PTHREAD_YIELD
10188         pthread_yield();        /* make sure task runs first */
10189 #endif
10190 #endif
10191
10192         exit(2);
10193 }
10194 EOF
10195 if { (eval echo configure:10196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10196 then
10197   ol_cv_pthread_select_yields=no
10198 else
10199   echo "configure: failed program was:" >&5
10200   cat conftest.$ac_ext >&5
10201   rm -fr conftest*
10202   ol_cv_pthread_select_yields=yes
10203 fi
10204 rm -fr conftest*
10205 fi
10206
10207 fi
10208
10209 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10210
10211                                 if test $ol_cv_pthread_select_yields = cross ; then
10212                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10213                                 fi
10214
10215                                 if test $ol_cv_pthread_select_yields = yes ; then
10216                                         ol_with_yielding_select=yes
10217                                 fi
10218                         fi
10219
10220                                                 CPPFLAGS="$save_CPPFLAGS"
10221                         LIBS="$save_LIBS"
10222                 else
10223                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10224                 fi
10225         fi
10226
10227         if test $ol_with_threads = posix ; then
10228                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10229         fi
10230 fi
10231
10232 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10233         -o $ol_with_threads = mach ; then
10234
10235                 for ac_hdr in mach/cthreads.h
10236 do
10237 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10238 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10239 echo "configure:10240: checking for $ac_hdr" >&5
10240 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10241   echo $ac_n "(cached) $ac_c" 1>&6
10242 else
10243   cat > conftest.$ac_ext <<EOF
10244 #line 10245 "configure"
10245 #include "confdefs.h"
10246 #include <$ac_hdr>
10247 EOF
10248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10249 { (eval echo configure:10250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10251 if test -z "$ac_err"; then
10252   rm -rf conftest*
10253   eval "ac_cv_header_$ac_safe=yes"
10254 else
10255   echo "$ac_err" >&5
10256   echo "configure: failed program was:" >&5
10257   cat conftest.$ac_ext >&5
10258   rm -rf conftest*
10259   eval "ac_cv_header_$ac_safe=no"
10260 fi
10261 rm -f conftest*
10262 fi
10263 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10264   echo "$ac_t""yes" 1>&6
10265     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10266   cat >> confdefs.h <<EOF
10267 #define $ac_tr_hdr 1
10268 EOF
10269  
10270 else
10271   echo "$ac_t""no" 1>&6
10272 fi
10273 done
10274
10275         if test $ac_cv_header_mach_cthreads_h = yes ; then
10276                 ol_with_threads=found
10277
10278                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10279 echo "configure:10280: checking for cthread_fork" >&5
10280 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10281   echo $ac_n "(cached) $ac_c" 1>&6
10282 else
10283   cat > conftest.$ac_ext <<EOF
10284 #line 10285 "configure"
10285 #include "confdefs.h"
10286 /* System header to define __stub macros and hopefully few prototypes,
10287     which can conflict with char cthread_fork(); below.  */
10288 #include <assert.h>
10289 /* Override any gcc2 internal prototype to avoid an error.  */
10290 /* We use char because int might match the return type of a gcc2
10291     builtin and then its argument prototype would still apply.  */
10292 char cthread_fork();
10293 char (*f)();
10294
10295 int main() {
10296
10297 /* The GNU C library defines this for functions which it implements
10298     to always fail with ENOSYS.  Some functions are actually named
10299     something starting with __ and the normal name is an alias.  */
10300 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10301 choke me
10302 #else
10303 f = cthread_fork;
10304 #endif
10305
10306 ; return 0; }
10307 EOF
10308 if { (eval echo configure:10309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10309   rm -rf conftest*
10310   eval "ac_cv_func_cthread_fork=yes"
10311 else
10312   echo "configure: failed program was:" >&5
10313   cat conftest.$ac_ext >&5
10314   rm -rf conftest*
10315   eval "ac_cv_func_cthread_fork=no"
10316 fi
10317 rm -f conftest*
10318 fi
10319
10320 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10321   echo "$ac_t""yes" 1>&6
10322   ol_link_threads=yes
10323 else
10324   echo "$ac_t""no" 1>&6
10325 fi
10326
10327
10328                 if test $ol_link_threads = no ; then
10329                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10330 echo "configure:10331: checking for cthread_fork with -all_load" >&5
10331 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10332   echo $ac_n "(cached) $ac_c" 1>&6
10333 else
10334   
10335                                                                 save_LIBS="$LIBS"
10336                                 LIBS="-all_load $LIBS"
10337                                 cat > conftest.$ac_ext <<EOF
10338 #line 10339 "configure"
10339 #include "confdefs.h"
10340 #include <mach/cthreads.h>
10341 int main() {
10342
10343                                         cthread_fork((void *)0, (void *)0);
10344                                         
10345 ; return 0; }
10346 EOF
10347 if { (eval echo configure:10348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10348   rm -rf conftest*
10349   ol_cv_cthread_all_load=yes
10350 else
10351   echo "configure: failed program was:" >&5
10352   cat conftest.$ac_ext >&5
10353   rm -rf conftest*
10354   ol_cv_cthread_all_load=no
10355 fi
10356 rm -f conftest*
10357                                                                 LIBS="$save_LIBS"
10358                         
10359 fi
10360
10361 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10362
10363                         if test $ol_cv_cthread_all_load = yes ; then
10364                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10365                                 ol_link_threads=mach
10366                         fi
10367                 fi
10368
10369                 if test $ol_link_threads != no ; then
10370                         : check for cthread specific functionality here
10371                         cat >> confdefs.h <<\EOF
10372 #define HAVE_MACH_CTHREADS 1
10373 EOF
10374
10375                 else
10376                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10377                 fi
10378         fi
10379
10380         if test $ol_with_threads = mach ; then
10381                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10382         fi
10383 fi
10384
10385 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10386         -o $ol_with_threads = pth ; then
10387
10388         for ac_hdr in pth.h
10389 do
10390 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10391 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10392 echo "configure:10393: checking for $ac_hdr" >&5
10393 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10394   echo $ac_n "(cached) $ac_c" 1>&6
10395 else
10396   cat > conftest.$ac_ext <<EOF
10397 #line 10398 "configure"
10398 #include "confdefs.h"
10399 #include <$ac_hdr>
10400 EOF
10401 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10402 { (eval echo configure:10403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10403 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10404 if test -z "$ac_err"; then
10405   rm -rf conftest*
10406   eval "ac_cv_header_$ac_safe=yes"
10407 else
10408   echo "$ac_err" >&5
10409   echo "configure: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   rm -rf conftest*
10412   eval "ac_cv_header_$ac_safe=no"
10413 fi
10414 rm -f conftest*
10415 fi
10416 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10417   echo "$ac_t""yes" 1>&6
10418     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10419   cat >> confdefs.h <<EOF
10420 #define $ac_tr_hdr 1
10421 EOF
10422  
10423 else
10424   echo "$ac_t""no" 1>&6
10425 fi
10426 done
10427
10428
10429         if test $ac_cv_header_pth_h = yes ; then
10430                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10431 echo "configure:10432: checking for pth_version in -lpth" >&5
10432 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10433 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10434   echo $ac_n "(cached) $ac_c" 1>&6
10435 else
10436   ac_save_LIBS="$LIBS"
10437 LIBS="-lpth  $LIBS"
10438 cat > conftest.$ac_ext <<EOF
10439 #line 10440 "configure"
10440 #include "confdefs.h"
10441 /* Override any gcc2 internal prototype to avoid an error.  */
10442 /* We use char because int might match the return type of a gcc2
10443     builtin and then its argument prototype would still apply.  */
10444 char pth_version();
10445
10446 int main() {
10447 pth_version()
10448 ; return 0; }
10449 EOF
10450 if { (eval echo configure:10451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10451   rm -rf conftest*
10452   eval "ac_cv_lib_$ac_lib_var=yes"
10453 else
10454   echo "configure: failed program was:" >&5
10455   cat conftest.$ac_ext >&5
10456   rm -rf conftest*
10457   eval "ac_cv_lib_$ac_lib_var=no"
10458 fi
10459 rm -f conftest*
10460 LIBS="$ac_save_LIBS"
10461
10462 fi
10463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10464   echo "$ac_t""yes" 1>&6
10465   have_pth=yes
10466 else
10467   echo "$ac_t""no" 1>&6
10468 have_pth=no
10469 fi
10470
10471
10472                 if test $have_pth = yes ; then
10473                         cat >> confdefs.h <<\EOF
10474 #define HAVE_GNU_PTH 1
10475 EOF
10476
10477                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10478                         ol_link_threads=pth
10479
10480                         if test $ol_with_yielding_select = auto ; then
10481                                 ol_with_yielding_select=yes
10482                         fi
10483                 fi
10484         fi
10485 fi
10486
10487 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10488         -o $ol_with_threads = lwp ; then
10489
10490                 for ac_hdr in thread.h synch.h
10491 do
10492 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10493 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10494 echo "configure:10495: checking for $ac_hdr" >&5
10495 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10496   echo $ac_n "(cached) $ac_c" 1>&6
10497 else
10498   cat > conftest.$ac_ext <<EOF
10499 #line 10500 "configure"
10500 #include "confdefs.h"
10501 #include <$ac_hdr>
10502 EOF
10503 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10504 { (eval echo configure:10505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10505 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10506 if test -z "$ac_err"; then
10507   rm -rf conftest*
10508   eval "ac_cv_header_$ac_safe=yes"
10509 else
10510   echo "$ac_err" >&5
10511   echo "configure: failed program was:" >&5
10512   cat conftest.$ac_ext >&5
10513   rm -rf conftest*
10514   eval "ac_cv_header_$ac_safe=no"
10515 fi
10516 rm -f conftest*
10517 fi
10518 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10519   echo "$ac_t""yes" 1>&6
10520     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10521   cat >> confdefs.h <<EOF
10522 #define $ac_tr_hdr 1
10523 EOF
10524  
10525 else
10526   echo "$ac_t""no" 1>&6
10527 fi
10528 done
10529
10530         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10531                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10532 echo "configure:10533: checking for thr_create in -lthread" >&5
10533 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10534 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10535   echo $ac_n "(cached) $ac_c" 1>&6
10536 else
10537   ac_save_LIBS="$LIBS"
10538 LIBS="-lthread  $LIBS"
10539 cat > conftest.$ac_ext <<EOF
10540 #line 10541 "configure"
10541 #include "confdefs.h"
10542 /* Override any gcc2 internal prototype to avoid an error.  */
10543 /* We use char because int might match the return type of a gcc2
10544     builtin and then its argument prototype would still apply.  */
10545 char thr_create();
10546
10547 int main() {
10548 thr_create()
10549 ; return 0; }
10550 EOF
10551 if { (eval echo configure:10552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10552   rm -rf conftest*
10553   eval "ac_cv_lib_$ac_lib_var=yes"
10554 else
10555   echo "configure: failed program was:" >&5
10556   cat conftest.$ac_ext >&5
10557   rm -rf conftest*
10558   eval "ac_cv_lib_$ac_lib_var=no"
10559 fi
10560 rm -f conftest*
10561 LIBS="$ac_save_LIBS"
10562
10563 fi
10564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10565   echo "$ac_t""yes" 1>&6
10566   have_thr=yes
10567 else
10568   echo "$ac_t""no" 1>&6
10569 have_thr=no
10570 fi
10571
10572
10573                 if test $have_thr = yes ; then
10574                         cat >> confdefs.h <<\EOF
10575 #define HAVE_THR 1
10576 EOF
10577
10578                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10579                         ol_link_threads=thr
10580
10581                         if test $ol_with_yielding_select = auto ; then
10582                                 ol_with_yielding_select=yes
10583                         fi
10584
10585                                                 for ac_func in \
10586                                 thr_setconcurrency \
10587                                 thr_getconcurrency \
10588                         
10589 do
10590 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10591 echo "configure:10592: checking for $ac_func" >&5
10592 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10593   echo $ac_n "(cached) $ac_c" 1>&6
10594 else
10595   cat > conftest.$ac_ext <<EOF
10596 #line 10597 "configure"
10597 #include "confdefs.h"
10598 /* System header to define __stub macros and hopefully few prototypes,
10599     which can conflict with char $ac_func(); below.  */
10600 #include <assert.h>
10601 /* Override any gcc2 internal prototype to avoid an error.  */
10602 /* We use char because int might match the return type of a gcc2
10603     builtin and then its argument prototype would still apply.  */
10604 char $ac_func();
10605 char (*f)();
10606
10607 int main() {
10608
10609 /* The GNU C library defines this for functions which it implements
10610     to always fail with ENOSYS.  Some functions are actually named
10611     something starting with __ and the normal name is an alias.  */
10612 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10613 choke me
10614 #else
10615 f = $ac_func;
10616 #endif
10617
10618 ; return 0; }
10619 EOF
10620 if { (eval echo configure:10621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10621   rm -rf conftest*
10622   eval "ac_cv_func_$ac_func=yes"
10623 else
10624   echo "configure: failed program was:" >&5
10625   cat conftest.$ac_ext >&5
10626   rm -rf conftest*
10627   eval "ac_cv_func_$ac_func=no"
10628 fi
10629 rm -f conftest*
10630 fi
10631
10632 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10633   echo "$ac_t""yes" 1>&6
10634     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10635   cat >> confdefs.h <<EOF
10636 #define $ac_tr_func 1
10637 EOF
10638  
10639 else
10640   echo "$ac_t""no" 1>&6
10641 fi
10642 done
10643
10644                 fi
10645         fi
10646
10647                 for ac_hdr in lwp/lwp.h
10648 do
10649 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10650 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10651 echo "configure:10652: checking for $ac_hdr" >&5
10652 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10653   echo $ac_n "(cached) $ac_c" 1>&6
10654 else
10655   cat > conftest.$ac_ext <<EOF
10656 #line 10657 "configure"
10657 #include "confdefs.h"
10658 #include <$ac_hdr>
10659 EOF
10660 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10661 { (eval echo configure:10662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10662 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10663 if test -z "$ac_err"; then
10664   rm -rf conftest*
10665   eval "ac_cv_header_$ac_safe=yes"
10666 else
10667   echo "$ac_err" >&5
10668   echo "configure: failed program was:" >&5
10669   cat conftest.$ac_ext >&5
10670   rm -rf conftest*
10671   eval "ac_cv_header_$ac_safe=no"
10672 fi
10673 rm -f conftest*
10674 fi
10675 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10676   echo "$ac_t""yes" 1>&6
10677     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10678   cat >> confdefs.h <<EOF
10679 #define $ac_tr_hdr 1
10680 EOF
10681  
10682 else
10683   echo "$ac_t""no" 1>&6
10684 fi
10685 done
10686
10687         if test $ac_cv_header_lwp_lwp_h = yes ; then
10688                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10689 echo "configure:10690: checking for lwp_create in -llwp" >&5
10690 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10691 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10692   echo $ac_n "(cached) $ac_c" 1>&6
10693 else
10694   ac_save_LIBS="$LIBS"
10695 LIBS="-llwp  $LIBS"
10696 cat > conftest.$ac_ext <<EOF
10697 #line 10698 "configure"
10698 #include "confdefs.h"
10699 /* Override any gcc2 internal prototype to avoid an error.  */
10700 /* We use char because int might match the return type of a gcc2
10701     builtin and then its argument prototype would still apply.  */
10702 char lwp_create();
10703
10704 int main() {
10705 lwp_create()
10706 ; return 0; }
10707 EOF
10708 if { (eval echo configure:10709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10709   rm -rf conftest*
10710   eval "ac_cv_lib_$ac_lib_var=yes"
10711 else
10712   echo "configure: failed program was:" >&5
10713   cat conftest.$ac_ext >&5
10714   rm -rf conftest*
10715   eval "ac_cv_lib_$ac_lib_var=no"
10716 fi
10717 rm -f conftest*
10718 LIBS="$ac_save_LIBS"
10719
10720 fi
10721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10722   echo "$ac_t""yes" 1>&6
10723   have_lwp=yes
10724 else
10725   echo "$ac_t""no" 1>&6
10726 have_lwp=no
10727 fi
10728
10729
10730                 if test $have_lwp = yes ; then
10731                         cat >> confdefs.h <<\EOF
10732 #define HAVE_LWP 1
10733 EOF
10734
10735                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10736                         ol_link_threads=lwp
10737
10738                         if test $ol_with_yielding_select = auto ; then
10739                                 ol_with_yielding_select=no
10740                         fi
10741                 fi
10742         fi
10743 fi
10744
10745 if test $ol_with_yielding_select = yes ; then
10746         cat >> confdefs.h <<\EOF
10747 #define HAVE_YIELDING_SELECT 1
10748 EOF
10749
10750 fi
10751
10752 if test $ol_with_threads = manual ; then
10753                 ol_link_threads=yes
10754
10755         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10756
10757         for ac_hdr in pthread.h sched.h
10758 do
10759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10761 echo "configure:10762: checking for $ac_hdr" >&5
10762 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10763   echo $ac_n "(cached) $ac_c" 1>&6
10764 else
10765   cat > conftest.$ac_ext <<EOF
10766 #line 10767 "configure"
10767 #include "confdefs.h"
10768 #include <$ac_hdr>
10769 EOF
10770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10771 { (eval echo configure:10772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10773 if test -z "$ac_err"; then
10774   rm -rf conftest*
10775   eval "ac_cv_header_$ac_safe=yes"
10776 else
10777   echo "$ac_err" >&5
10778   echo "configure: failed program was:" >&5
10779   cat conftest.$ac_ext >&5
10780   rm -rf conftest*
10781   eval "ac_cv_header_$ac_safe=no"
10782 fi
10783 rm -f conftest*
10784 fi
10785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10786   echo "$ac_t""yes" 1>&6
10787     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10788   cat >> confdefs.h <<EOF
10789 #define $ac_tr_hdr 1
10790 EOF
10791  
10792 else
10793   echo "$ac_t""no" 1>&6
10794 fi
10795 done
10796
10797         for ac_func in sched_yield pthread_yield
10798 do
10799 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10800 echo "configure:10801: checking for $ac_func" >&5
10801 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10802   echo $ac_n "(cached) $ac_c" 1>&6
10803 else
10804   cat > conftest.$ac_ext <<EOF
10805 #line 10806 "configure"
10806 #include "confdefs.h"
10807 /* System header to define __stub macros and hopefully few prototypes,
10808     which can conflict with char $ac_func(); below.  */
10809 #include <assert.h>
10810 /* Override any gcc2 internal prototype to avoid an error.  */
10811 /* We use char because int might match the return type of a gcc2
10812     builtin and then its argument prototype would still apply.  */
10813 char $ac_func();
10814 char (*f)();
10815
10816 int main() {
10817
10818 /* The GNU C library defines this for functions which it implements
10819     to always fail with ENOSYS.  Some functions are actually named
10820     something starting with __ and the normal name is an alias.  */
10821 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10822 choke me
10823 #else
10824 f = $ac_func;
10825 #endif
10826
10827 ; return 0; }
10828 EOF
10829 if { (eval echo configure:10830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10830   rm -rf conftest*
10831   eval "ac_cv_func_$ac_func=yes"
10832 else
10833   echo "configure: failed program was:" >&5
10834   cat conftest.$ac_ext >&5
10835   rm -rf conftest*
10836   eval "ac_cv_func_$ac_func=no"
10837 fi
10838 rm -f conftest*
10839 fi
10840
10841 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10842   echo "$ac_t""yes" 1>&6
10843     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10844   cat >> confdefs.h <<EOF
10845 #define $ac_tr_func 1
10846 EOF
10847  
10848 else
10849   echo "$ac_t""no" 1>&6
10850 fi
10851 done
10852
10853         
10854         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10855 echo "configure:10856: checking for LinuxThreads pthread.h" >&5
10856 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10857   echo $ac_n "(cached) $ac_c" 1>&6
10858 else
10859   cat > conftest.$ac_ext <<EOF
10860 #line 10861 "configure"
10861 #include "confdefs.h"
10862 #include <pthread.h>
10863 EOF
10864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10865   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10866   rm -rf conftest*
10867   ol_cv_header_linux_threads=yes
10868 else
10869   rm -rf conftest*
10870   ol_cv_header_linux_threads=no
10871 fi
10872 rm -f conftest*
10873
10874                 
10875 fi
10876
10877 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10878         if test $ol_cv_header_linux_threads = yes; then
10879                 cat >> confdefs.h <<\EOF
10880 #define HAVE_LINUX_THREADS 1
10881 EOF
10882
10883         fi
10884
10885
10886         for ac_hdr in mach/cthreads.h
10887 do
10888 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10889 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10890 echo "configure:10891: checking for $ac_hdr" >&5
10891 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10892   echo $ac_n "(cached) $ac_c" 1>&6
10893 else
10894   cat > conftest.$ac_ext <<EOF
10895 #line 10896 "configure"
10896 #include "confdefs.h"
10897 #include <$ac_hdr>
10898 EOF
10899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10900 { (eval echo configure:10901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10901 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10902 if test -z "$ac_err"; then
10903   rm -rf conftest*
10904   eval "ac_cv_header_$ac_safe=yes"
10905 else
10906   echo "$ac_err" >&5
10907   echo "configure: failed program was:" >&5
10908   cat conftest.$ac_ext >&5
10909   rm -rf conftest*
10910   eval "ac_cv_header_$ac_safe=no"
10911 fi
10912 rm -f conftest*
10913 fi
10914 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10915   echo "$ac_t""yes" 1>&6
10916     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10917   cat >> confdefs.h <<EOF
10918 #define $ac_tr_hdr 1
10919 EOF
10920  
10921 else
10922   echo "$ac_t""no" 1>&6
10923 fi
10924 done
10925
10926         for ac_hdr in lwp/lwp.h
10927 do
10928 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10929 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10930 echo "configure:10931: checking for $ac_hdr" >&5
10931 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10932   echo $ac_n "(cached) $ac_c" 1>&6
10933 else
10934   cat > conftest.$ac_ext <<EOF
10935 #line 10936 "configure"
10936 #include "confdefs.h"
10937 #include <$ac_hdr>
10938 EOF
10939 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10940 { (eval echo configure:10941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10941 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10942 if test -z "$ac_err"; then
10943   rm -rf conftest*
10944   eval "ac_cv_header_$ac_safe=yes"
10945 else
10946   echo "$ac_err" >&5
10947   echo "configure: failed program was:" >&5
10948   cat conftest.$ac_ext >&5
10949   rm -rf conftest*
10950   eval "ac_cv_header_$ac_safe=no"
10951 fi
10952 rm -f conftest*
10953 fi
10954 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10955   echo "$ac_t""yes" 1>&6
10956     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10957   cat >> confdefs.h <<EOF
10958 #define $ac_tr_hdr 1
10959 EOF
10960  
10961 else
10962   echo "$ac_t""no" 1>&6
10963 fi
10964 done
10965
10966         for ac_hdr in thread.h synch.h
10967 do
10968 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10969 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10970 echo "configure:10971: checking for $ac_hdr" >&5
10971 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10972   echo $ac_n "(cached) $ac_c" 1>&6
10973 else
10974   cat > conftest.$ac_ext <<EOF
10975 #line 10976 "configure"
10976 #include "confdefs.h"
10977 #include <$ac_hdr>
10978 EOF
10979 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10980 { (eval echo configure:10981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10981 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10982 if test -z "$ac_err"; then
10983   rm -rf conftest*
10984   eval "ac_cv_header_$ac_safe=yes"
10985 else
10986   echo "$ac_err" >&5
10987   echo "configure: failed program was:" >&5
10988   cat conftest.$ac_ext >&5
10989   rm -rf conftest*
10990   eval "ac_cv_header_$ac_safe=no"
10991 fi
10992 rm -f conftest*
10993 fi
10994 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10995   echo "$ac_t""yes" 1>&6
10996     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10997   cat >> confdefs.h <<EOF
10998 #define $ac_tr_hdr 1
10999 EOF
11000  
11001 else
11002   echo "$ac_t""no" 1>&6
11003 fi
11004 done
11005
11006 fi
11007
11008 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11009                         cat >> confdefs.h <<\EOF
11010 #define REENTRANT 1
11011 EOF
11012
11013         cat >> confdefs.h <<\EOF
11014 #define _REENTRANT 1
11015 EOF
11016
11017         cat >> confdefs.h <<\EOF
11018 #define THREAD_SAFE 1
11019 EOF
11020
11021         cat >> confdefs.h <<\EOF
11022 #define _THREAD_SAFE 1
11023 EOF
11024
11025         cat >> confdefs.h <<\EOF
11026 #define THREADSAFE 1
11027 EOF
11028
11029         cat >> confdefs.h <<\EOF
11030 #define _THREADSAFE 1
11031 EOF
11032
11033         cat >> confdefs.h <<\EOF
11034 #define _SGI_MP_SOURCE 1
11035 EOF
11036
11037
11038                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11039 echo "configure:11040: checking for thread specific errno" >&5
11040 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11041   echo $ac_n "(cached) $ac_c" 1>&6
11042 else
11043   
11044                 cat > conftest.$ac_ext <<EOF
11045 #line 11046 "configure"
11046 #include "confdefs.h"
11047 #include <errno.h>
11048 int main() {
11049 errno = 0;
11050 ; return 0; }
11051 EOF
11052 if { (eval echo configure:11053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11053   rm -rf conftest*
11054   ol_cv_errno_thread_specific=yes
11055 else
11056   echo "configure: failed program was:" >&5
11057   cat conftest.$ac_ext >&5
11058   rm -rf conftest*
11059   ol_cv_errno_thread_specific=no
11060 fi
11061 rm -f conftest*
11062         
11063 fi
11064
11065 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11066
11067                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11068 echo "configure:11069: checking for thread specific h_errno" >&5
11069 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11070   echo $ac_n "(cached) $ac_c" 1>&6
11071 else
11072   
11073                 cat > conftest.$ac_ext <<EOF
11074 #line 11075 "configure"
11075 #include "confdefs.h"
11076 #include <netdb.h>
11077 int main() {
11078 h_errno = 0;
11079 ; return 0; }
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11082   rm -rf conftest*
11083   ol_cv_h_errno_thread_specific=yes
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   ol_cv_h_errno_thread_specific=no
11089 fi
11090 rm -f conftest*
11091         
11092 fi
11093
11094 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11095
11096         if test $ol_cv_errno_thread_specific != yes \
11097                 -o $ol_cv_h_errno_thread_specific != yes ; then
11098                 LIBS="$LTHREAD_LIBS $LIBS"
11099                 LTHREAD_LIBS=""
11100         fi
11101
11102 fi  
11103
11104 if test $ol_link_threads = no ; then
11105         if test $ol_with_threads = yes ; then
11106                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11107         fi
11108
11109         if test $ol_with_threads = auto ; then
11110                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11111                 ol_with_threads=no
11112         fi
11113
11114         cat >> confdefs.h <<\EOF
11115 #define NO_THREADS 1
11116 EOF
11117
11118         LTHREAD_LIBS=""
11119 fi
11120
11121 if test $ol_link_threads != no ; then
11122         cat >> confdefs.h <<\EOF
11123 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11124 EOF
11125
11126 fi
11127
11128
11129 ol_link_ldbm=no 
11130 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
11131         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
11132 echo "configure:11133: checking for DB2 library" >&5
11133 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
11134   echo $ac_n "(cached) $ac_c" 1>&6
11135 else
11136         ol_LIBS="$LIBS"
11137         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
11138 echo "configure:11139: checking for db_appexit in -ldb" >&5
11139 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
11140 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11141   echo $ac_n "(cached) $ac_c" 1>&6
11142 else
11143   ac_save_LIBS="$LIBS"
11144 LIBS="-ldb  $LIBS"
11145 cat > conftest.$ac_ext <<EOF
11146 #line 11147 "configure"
11147 #include "confdefs.h"
11148 /* Override any gcc2 internal prototype to avoid an error.  */
11149 /* We use char because int might match the return type of a gcc2
11150     builtin and then its argument prototype would still apply.  */
11151 char db_appexit();
11152
11153 int main() {
11154 db_appexit()
11155 ; return 0; }
11156 EOF
11157 if { (eval echo configure:11158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11158   rm -rf conftest*
11159   eval "ac_cv_lib_$ac_lib_var=yes"
11160 else
11161   echo "configure: failed program was:" >&5
11162   cat conftest.$ac_ext >&5
11163   rm -rf conftest*
11164   eval "ac_cv_lib_$ac_lib_var=no"
11165 fi
11166 rm -f conftest*
11167 LIBS="$ac_save_LIBS"
11168
11169 fi
11170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11171   echo "$ac_t""yes" 1>&6
11172   ol_cv_lib_db2=-ldb
11173 else
11174   echo "$ac_t""no" 1>&6
11175 ol_cv_lib_db2=no
11176 fi
11177
11178         LIBS="$ol_LIBS"
11179
11180 fi
11181
11182 echo "$ac_t""$ol_cv_lib_db2" 1>&6
11183
11184 for ac_hdr in db.h
11185 do
11186 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11187 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11188 echo "configure:11189: checking for $ac_hdr" >&5
11189 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11190   echo $ac_n "(cached) $ac_c" 1>&6
11191 else
11192   cat > conftest.$ac_ext <<EOF
11193 #line 11194 "configure"
11194 #include "confdefs.h"
11195 #include <$ac_hdr>
11196 EOF
11197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11198 { (eval echo configure:11199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11200 if test -z "$ac_err"; then
11201   rm -rf conftest*
11202   eval "ac_cv_header_$ac_safe=yes"
11203 else
11204   echo "$ac_err" >&5
11205   echo "configure: failed program was:" >&5
11206   cat conftest.$ac_ext >&5
11207   rm -rf conftest*
11208   eval "ac_cv_header_$ac_safe=no"
11209 fi
11210 rm -f conftest*
11211 fi
11212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11213   echo "$ac_t""yes" 1>&6
11214     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11215   cat >> confdefs.h <<EOF
11216 #define $ac_tr_hdr 1
11217 EOF
11218  
11219 else
11220   echo "$ac_t""no" 1>&6
11221 fi
11222 done
11223
11224 if test $ac_cv_header_db_h = yes ; then
11225         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
11226 echo "configure:11227: checking if db.h is DB2" >&5
11227 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
11228   echo $ac_n "(cached) $ac_c" 1>&6
11229 else
11230   
11231                 cat > conftest.$ac_ext <<EOF
11232 #line 11233 "configure"
11233 #include "confdefs.h"
11234
11235 #                       include <db.h>
11236                         /* this check could be improved */
11237 #                       ifdef DB_VERSION_MAJOR
11238 #                               if DB_VERSION_MAJOR == 2
11239                                         __db_version_2;
11240 #                               endif
11241 #                       endif
11242                 
11243 EOF
11244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11245   egrep "__db_version_2" >/dev/null 2>&1; then
11246   rm -rf conftest*
11247   ol_cv_header_db2=yes
11248 else
11249   rm -rf conftest*
11250   ol_cv_header_db2=no
11251 fi
11252 rm -f conftest*
11253
11254 fi
11255
11256 echo "$ac_t""$ol_cv_header_db2" 1>&6
11257 else
11258         ol_cv_header_db2=no
11259 fi
11260
11261
11262  
11263  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
11264 echo "configure:11265: checking for Berkeley DB2" >&5
11265 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
11266   echo $ac_n "(cached) $ac_c" 1>&6
11267 else
11268   
11269         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
11270                 ol_cv_berkeley_db2=no
11271         else
11272                 ol_cv_berkeley_db2=yes
11273         fi
11274
11275 fi
11276
11277 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
11278  if test $ol_cv_berkeley_db2 = yes ; then
11279         cat >> confdefs.h <<\EOF
11280 #define HAVE_BERKELEY_DB2 1
11281 EOF
11282
11283  fi
11284
11285
11286         if test $ol_cv_berkeley_db2 = yes ; then
11287                 ol_link_ldbm=db2
11288                 ol_with_ldbm_api=db2
11289
11290                 if test $ol_with_ldbm_type = hash ; then
11291                         cat >> confdefs.h <<\EOF
11292 #define LDBM_USE_DBHASH 1
11293 EOF
11294
11295                 else
11296                         cat >> confdefs.h <<\EOF
11297 #define LDBM_USE_DBBTREE 1
11298 EOF
11299
11300                 fi
11301
11302                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11303 echo "configure:11304: checking for DB_THREAD support" >&5
11304 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
11305   echo $ac_n "(cached) $ac_c" 1>&6
11306 else
11307   
11308         ol_LIBS="$LIBS"
11309         if test $ol_cv_lib_db2 != yes ; then
11310                 LIBS="$ol_cv_lib_db2"
11311         fi
11312
11313         if test "$cross_compiling" = yes; then
11314   ol_cv_berkeley_db2_db_thread=cross
11315 else
11316   cat > conftest.$ac_ext <<EOF
11317 #line 11318 "configure"
11318 #include "confdefs.h"
11319
11320 #include <db.h>
11321 #ifndef NULL
11322 #define NULL ((void *)0)
11323 #endif
11324 main()
11325 {
11326         int rc;
11327         DB_ENV env;
11328         u_int32_t flags = DB_CREATE | DB_THREAD;
11329
11330         memset( &env, '\0', sizeof(env) );
11331
11332         rc = db_appinit( NULL, NULL, &env, flags );
11333
11334         if( rc == 0 ) {
11335                 db_appexit( &env );
11336         }
11337
11338         return rc;
11339 }
11340 EOF
11341 if { (eval echo configure:11342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11342 then
11343   ol_cv_berkeley_db2_db_thread=yes
11344 else
11345   echo "configure: failed program was:" >&5
11346   cat conftest.$ac_ext >&5
11347   rm -fr conftest*
11348   ol_cv_berkeley_db2_db_thread=no
11349 fi
11350 rm -fr conftest*
11351 fi
11352
11353
11354         LIBS="$ol_LIBS"
11355
11356         if test $ol_cv_berkeley_db2_db_thread != no ; then
11357                 cat >> confdefs.h <<\EOF
11358 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11359 EOF
11360
11361         fi
11362
11363 fi
11364
11365 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11366
11367                                                 if test $ol_cv_lib_db2 != yes ; then
11368                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11369                 fi
11370         fi
11371 fi
11372
11373 ol_link_bdb2=no
11374 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11375         if test $ol_cv_berkeley_db2_db_thread != no ; then
11376                 ol_link_bdb2=yes
11377         else
11378                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11379         fi
11380 fi
11381
11382 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11383         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11384 echo "configure:11385: checking for Berkeley DB library" >&5
11385 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11386   echo $ac_n "(cached) $ac_c" 1>&6
11387 else
11388   
11389         for ac_hdr in db1/db.h
11390 do
11391 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11392 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11393 echo "configure:11394: checking for $ac_hdr" >&5
11394 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11395   echo $ac_n "(cached) $ac_c" 1>&6
11396 else
11397   cat > conftest.$ac_ext <<EOF
11398 #line 11399 "configure"
11399 #include "confdefs.h"
11400 #include <$ac_hdr>
11401 EOF
11402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11403 { (eval echo configure:11404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11405 if test -z "$ac_err"; then
11406   rm -rf conftest*
11407   eval "ac_cv_header_$ac_safe=yes"
11408 else
11409   echo "$ac_err" >&5
11410   echo "configure: failed program was:" >&5
11411   cat conftest.$ac_ext >&5
11412   rm -rf conftest*
11413   eval "ac_cv_header_$ac_safe=no"
11414 fi
11415 rm -f conftest*
11416 fi
11417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11418   echo "$ac_t""yes" 1>&6
11419     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11420   cat >> confdefs.h <<EOF
11421 #define $ac_tr_hdr 1
11422 EOF
11423  
11424 else
11425   echo "$ac_t""no" 1>&6
11426 fi
11427 done
11428
11429         ol_LIBS="$LIBS"
11430         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11431 echo "configure:11432: checking for dbopen" >&5
11432 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11433   echo $ac_n "(cached) $ac_c" 1>&6
11434 else
11435   cat > conftest.$ac_ext <<EOF
11436 #line 11437 "configure"
11437 #include "confdefs.h"
11438 /* System header to define __stub macros and hopefully few prototypes,
11439     which can conflict with char dbopen(); below.  */
11440 #include <assert.h>
11441 /* Override any gcc2 internal prototype to avoid an error.  */
11442 /* We use char because int might match the return type of a gcc2
11443     builtin and then its argument prototype would still apply.  */
11444 char dbopen();
11445 char (*f)();
11446
11447 int main() {
11448
11449 /* The GNU C library defines this for functions which it implements
11450     to always fail with ENOSYS.  Some functions are actually named
11451     something starting with __ and the normal name is an alias.  */
11452 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11453 choke me
11454 #else
11455 f = dbopen;
11456 #endif
11457
11458 ; return 0; }
11459 EOF
11460 if { (eval echo configure:11461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11461   rm -rf conftest*
11462   eval "ac_cv_func_dbopen=yes"
11463 else
11464   echo "configure: failed program was:" >&5
11465   cat conftest.$ac_ext >&5
11466   rm -rf conftest*
11467   eval "ac_cv_func_dbopen=no"
11468 fi
11469 rm -f conftest*
11470 fi
11471
11472 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11473   echo "$ac_t""yes" 1>&6
11474   ol_cv_lib_db=yes
11475 else
11476   echo "$ac_t""no" 1>&6
11477
11478                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11479 echo "configure:11480: checking for dbopen in -ldb1" >&5
11480 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11481 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11482   echo $ac_n "(cached) $ac_c" 1>&6
11483 else
11484   ac_save_LIBS="$LIBS"
11485 LIBS="-ldb1  $LIBS"
11486 cat > conftest.$ac_ext <<EOF
11487 #line 11488 "configure"
11488 #include "confdefs.h"
11489 /* Override any gcc2 internal prototype to avoid an error.  */
11490 /* We use char because int might match the return type of a gcc2
11491     builtin and then its argument prototype would still apply.  */
11492 char dbopen();
11493
11494 int main() {
11495 dbopen()
11496 ; return 0; }
11497 EOF
11498 if { (eval echo configure:11499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11499   rm -rf conftest*
11500   eval "ac_cv_lib_$ac_lib_var=yes"
11501 else
11502   echo "configure: failed program was:" >&5
11503   cat conftest.$ac_ext >&5
11504   rm -rf conftest*
11505   eval "ac_cv_lib_$ac_lib_var=no"
11506 fi
11507 rm -f conftest*
11508 LIBS="$ac_save_LIBS"
11509
11510 fi
11511 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11512   echo "$ac_t""yes" 1>&6
11513   ol_cv_lib_db=-ldb1
11514 else
11515   echo "$ac_t""no" 1>&6
11516
11517                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11518 echo "configure:11519: checking for dbopen in -ldb" >&5
11519 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11520 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11521   echo $ac_n "(cached) $ac_c" 1>&6
11522 else
11523   ac_save_LIBS="$LIBS"
11524 LIBS="-ldb  $LIBS"
11525 cat > conftest.$ac_ext <<EOF
11526 #line 11527 "configure"
11527 #include "confdefs.h"
11528 /* Override any gcc2 internal prototype to avoid an error.  */
11529 /* We use char because int might match the return type of a gcc2
11530     builtin and then its argument prototype would still apply.  */
11531 char dbopen();
11532
11533 int main() {
11534 dbopen()
11535 ; return 0; }
11536 EOF
11537 if { (eval echo configure:11538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11538   rm -rf conftest*
11539   eval "ac_cv_lib_$ac_lib_var=yes"
11540 else
11541   echo "configure: failed program was:" >&5
11542   cat conftest.$ac_ext >&5
11543   rm -rf conftest*
11544   eval "ac_cv_lib_$ac_lib_var=no"
11545 fi
11546 rm -f conftest*
11547 LIBS="$ac_save_LIBS"
11548
11549 fi
11550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11551   echo "$ac_t""yes" 1>&6
11552   ol_cv_lib_db=-ldb
11553 else
11554   echo "$ac_t""no" 1>&6
11555 ol_cv_lib_db=no
11556 fi
11557
11558                 
11559 fi
11560
11561         
11562 fi
11563
11564         LIBS="$ol_LIBS"
11565
11566 fi
11567
11568 echo "$ac_t""$ol_cv_lib_db" 1>&6
11569
11570
11571 for ac_hdr in db_185.h
11572 do
11573 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11574 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11575 echo "configure:11576: checking for $ac_hdr" >&5
11576 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11577   echo $ac_n "(cached) $ac_c" 1>&6
11578 else
11579   cat > conftest.$ac_ext <<EOF
11580 #line 11581 "configure"
11581 #include "confdefs.h"
11582 #include <$ac_hdr>
11583 EOF
11584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11585 { (eval echo configure:11586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11587 if test -z "$ac_err"; then
11588   rm -rf conftest*
11589   eval "ac_cv_header_$ac_safe=yes"
11590 else
11591   echo "$ac_err" >&5
11592   echo "configure: failed program was:" >&5
11593   cat conftest.$ac_ext >&5
11594   rm -rf conftest*
11595   eval "ac_cv_header_$ac_safe=no"
11596 fi
11597 rm -f conftest*
11598 fi
11599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11600   echo "$ac_t""yes" 1>&6
11601     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11602   cat >> confdefs.h <<EOF
11603 #define $ac_tr_hdr 1
11604 EOF
11605  
11606 else
11607   echo "$ac_t""no" 1>&6
11608 fi
11609 done
11610
11611 if test "$ol_cv_header_db2" = yes ; then
11612         
11613         ol_cv_header_db=$ac_cv_header_db_185_h
11614 else
11615         ol_cv_header_db=$ac_cv_header_db_h
11616 fi
11617
11618
11619  
11620  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11621 echo "configure:11622: checking for Berkeley DB" >&5
11622 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11623   echo $ac_n "(cached) $ac_c" 1>&6
11624 else
11625   
11626         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11627                 ol_cv_berkeley_db=no
11628         else
11629                 ol_cv_berkeley_db=yes
11630         fi
11631
11632 fi
11633
11634 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11635  if test $ol_cv_berkeley_db = yes ; then
11636         cat >> confdefs.h <<\EOF
11637 #define HAVE_BERKELEY_DB 1
11638 EOF
11639
11640  fi
11641
11642
11643         if test $ol_cv_berkeley_db = yes ; then
11644                 ol_link_ldbm=db
11645                 ol_with_ldbm_api=db
11646
11647                 if test $ol_with_ldbm_type = hash ; then
11648                         cat >> confdefs.h <<\EOF
11649 #define LDBM_USE_DBHASH 1
11650 EOF
11651
11652                 else
11653                         cat >> confdefs.h <<\EOF
11654 #define LDBM_USE_DBBTREE 1
11655 EOF
11656
11657                 fi
11658
11659                                                 if test $ol_cv_lib_db != yes ; then
11660                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11661                 fi
11662         fi
11663 fi
11664
11665 if test $ol_with_ldbm_api = manual ; then
11666                 ol_link_ldbm=yes
11667
11668         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11669
11670         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11671 do
11672 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11673 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11674 echo "configure:11675: checking for $ac_hdr" >&5
11675 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11676   echo $ac_n "(cached) $ac_c" 1>&6
11677 else
11678   cat > conftest.$ac_ext <<EOF
11679 #line 11680 "configure"
11680 #include "confdefs.h"
11681 #include <$ac_hdr>
11682 EOF
11683 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11684 { (eval echo configure:11685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11685 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11686 if test -z "$ac_err"; then
11687   rm -rf conftest*
11688   eval "ac_cv_header_$ac_safe=yes"
11689 else
11690   echo "$ac_err" >&5
11691   echo "configure: failed program was:" >&5
11692   cat conftest.$ac_ext >&5
11693   rm -rf conftest*
11694   eval "ac_cv_header_$ac_safe=no"
11695 fi
11696 rm -f conftest*
11697 fi
11698 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11699   echo "$ac_t""yes" 1>&6
11700     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11701   cat >> confdefs.h <<EOF
11702 #define $ac_tr_hdr 1
11703 EOF
11704  
11705 else
11706   echo "$ac_t""no" 1>&6
11707 fi
11708 done
11709
11710 fi
11711
11712 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11713         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11714         ol_with_ldbm_api=none
11715 fi
11716
11717 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11718         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11719 echo "configure:11720: checking for MDBM library" >&5
11720 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11721   echo $ac_n "(cached) $ac_c" 1>&6
11722 else
11723         ol_LIBS="$LIBS"
11724         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11725 echo "configure:11726: checking for mdbm_set_chain" >&5
11726 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11727   echo $ac_n "(cached) $ac_c" 1>&6
11728 else
11729   cat > conftest.$ac_ext <<EOF
11730 #line 11731 "configure"
11731 #include "confdefs.h"
11732 /* System header to define __stub macros and hopefully few prototypes,
11733     which can conflict with char mdbm_set_chain(); below.  */
11734 #include <assert.h>
11735 /* Override any gcc2 internal prototype to avoid an error.  */
11736 /* We use char because int might match the return type of a gcc2
11737     builtin and then its argument prototype would still apply.  */
11738 char mdbm_set_chain();
11739 char (*f)();
11740
11741 int main() {
11742
11743 /* The GNU C library defines this for functions which it implements
11744     to always fail with ENOSYS.  Some functions are actually named
11745     something starting with __ and the normal name is an alias.  */
11746 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11747 choke me
11748 #else
11749 f = mdbm_set_chain;
11750 #endif
11751
11752 ; return 0; }
11753 EOF
11754 if { (eval echo configure:11755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11755   rm -rf conftest*
11756   eval "ac_cv_func_mdbm_set_chain=yes"
11757 else
11758   echo "configure: failed program was:" >&5
11759   cat conftest.$ac_ext >&5
11760   rm -rf conftest*
11761   eval "ac_cv_func_mdbm_set_chain=no"
11762 fi
11763 rm -f conftest*
11764 fi
11765
11766 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11767   echo "$ac_t""yes" 1>&6
11768   ol_cv_lib_mdbm=yes
11769 else
11770   echo "$ac_t""no" 1>&6
11771
11772                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11773 echo "configure:11774: checking for mdbm_set_chain in -lmdbm" >&5
11774 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11775 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11776   echo $ac_n "(cached) $ac_c" 1>&6
11777 else
11778   ac_save_LIBS="$LIBS"
11779 LIBS="-lmdbm  $LIBS"
11780 cat > conftest.$ac_ext <<EOF
11781 #line 11782 "configure"
11782 #include "confdefs.h"
11783 /* Override any gcc2 internal prototype to avoid an error.  */
11784 /* We use char because int might match the return type of a gcc2
11785     builtin and then its argument prototype would still apply.  */
11786 char mdbm_set_chain();
11787
11788 int main() {
11789 mdbm_set_chain()
11790 ; return 0; }
11791 EOF
11792 if { (eval echo configure:11793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11793   rm -rf conftest*
11794   eval "ac_cv_lib_$ac_lib_var=yes"
11795 else
11796   echo "configure: failed program was:" >&5
11797   cat conftest.$ac_ext >&5
11798   rm -rf conftest*
11799   eval "ac_cv_lib_$ac_lib_var=no"
11800 fi
11801 rm -f conftest*
11802 LIBS="$ac_save_LIBS"
11803
11804 fi
11805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11806   echo "$ac_t""yes" 1>&6
11807   ol_cv_lib_mdbm=-lmdbm
11808 else
11809   echo "$ac_t""no" 1>&6
11810 ol_cv_lib_mdbm=no
11811 fi
11812
11813         
11814 fi
11815
11816         LIBS="$ol_LIBS"
11817
11818 fi
11819
11820 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11821
11822
11823  for ac_hdr in mdbm.h
11824 do
11825 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11826 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11827 echo "configure:11828: checking for $ac_hdr" >&5
11828 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11829   echo $ac_n "(cached) $ac_c" 1>&6
11830 else
11831   cat > conftest.$ac_ext <<EOF
11832 #line 11833 "configure"
11833 #include "confdefs.h"
11834 #include <$ac_hdr>
11835 EOF
11836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11837 { (eval echo configure:11838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11839 if test -z "$ac_err"; then
11840   rm -rf conftest*
11841   eval "ac_cv_header_$ac_safe=yes"
11842 else
11843   echo "$ac_err" >&5
11844   echo "configure: failed program was:" >&5
11845   cat conftest.$ac_ext >&5
11846   rm -rf conftest*
11847   eval "ac_cv_header_$ac_safe=no"
11848 fi
11849 rm -f conftest*
11850 fi
11851 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11852   echo "$ac_t""yes" 1>&6
11853     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11854   cat >> confdefs.h <<EOF
11855 #define $ac_tr_hdr 1
11856 EOF
11857  
11858 else
11859   echo "$ac_t""no" 1>&6
11860 fi
11861 done
11862
11863  echo $ac_n "checking for db""... $ac_c" 1>&6
11864 echo "configure:11865: checking for db" >&5
11865 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11866   echo $ac_n "(cached) $ac_c" 1>&6
11867 else
11868   
11869         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11870                 ol_cv_mdbm=no
11871         else
11872                 ol_cv_mdbm=yes
11873         fi
11874
11875 fi
11876
11877 echo "$ac_t""$ol_cv_mdbm" 1>&6
11878  if test $ol_cv_mdbm = yes ; then
11879         cat >> confdefs.h <<\EOF
11880 #define HAVE_MDBM 1
11881 EOF
11882
11883  fi
11884
11885
11886         if test $ol_cv_mdbm = yes ; then
11887                 ol_link_ldbm=mdbm
11888                 ol_with_ldbm_api=mdbm
11889                 if test $ol_cv_lib_mdbm != yes ; then
11890                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11891                 fi
11892         fi
11893 fi
11894
11895 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11896         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11897 echo "configure:11898: checking for GDBM library" >&5
11898 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11899   echo $ac_n "(cached) $ac_c" 1>&6
11900 else
11901         ol_LIBS="$LIBS"
11902         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11903 echo "configure:11904: checking for gdbm_open" >&5
11904 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11905   echo $ac_n "(cached) $ac_c" 1>&6
11906 else
11907   cat > conftest.$ac_ext <<EOF
11908 #line 11909 "configure"
11909 #include "confdefs.h"
11910 /* System header to define __stub macros and hopefully few prototypes,
11911     which can conflict with char gdbm_open(); below.  */
11912 #include <assert.h>
11913 /* Override any gcc2 internal prototype to avoid an error.  */
11914 /* We use char because int might match the return type of a gcc2
11915     builtin and then its argument prototype would still apply.  */
11916 char gdbm_open();
11917 char (*f)();
11918
11919 int main() {
11920
11921 /* The GNU C library defines this for functions which it implements
11922     to always fail with ENOSYS.  Some functions are actually named
11923     something starting with __ and the normal name is an alias.  */
11924 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11925 choke me
11926 #else
11927 f = gdbm_open;
11928 #endif
11929
11930 ; return 0; }
11931 EOF
11932 if { (eval echo configure:11933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11933   rm -rf conftest*
11934   eval "ac_cv_func_gdbm_open=yes"
11935 else
11936   echo "configure: failed program was:" >&5
11937   cat conftest.$ac_ext >&5
11938   rm -rf conftest*
11939   eval "ac_cv_func_gdbm_open=no"
11940 fi
11941 rm -f conftest*
11942 fi
11943
11944 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11945   echo "$ac_t""yes" 1>&6
11946   ol_cv_lib_gdbm=yes
11947 else
11948   echo "$ac_t""no" 1>&6
11949
11950                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11951 echo "configure:11952: checking for gdbm_open in -lgdbm" >&5
11952 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11953 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11954   echo $ac_n "(cached) $ac_c" 1>&6
11955 else
11956   ac_save_LIBS="$LIBS"
11957 LIBS="-lgdbm  $LIBS"
11958 cat > conftest.$ac_ext <<EOF
11959 #line 11960 "configure"
11960 #include "confdefs.h"
11961 /* Override any gcc2 internal prototype to avoid an error.  */
11962 /* We use char because int might match the return type of a gcc2
11963     builtin and then its argument prototype would still apply.  */
11964 char gdbm_open();
11965
11966 int main() {
11967 gdbm_open()
11968 ; return 0; }
11969 EOF
11970 if { (eval echo configure:11971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11971   rm -rf conftest*
11972   eval "ac_cv_lib_$ac_lib_var=yes"
11973 else
11974   echo "configure: failed program was:" >&5
11975   cat conftest.$ac_ext >&5
11976   rm -rf conftest*
11977   eval "ac_cv_lib_$ac_lib_var=no"
11978 fi
11979 rm -f conftest*
11980 LIBS="$ac_save_LIBS"
11981
11982 fi
11983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11984   echo "$ac_t""yes" 1>&6
11985   ol_cv_lib_gdbm=-lgdbm
11986 else
11987   echo "$ac_t""no" 1>&6
11988 ol_cv_lib_gdbm=no
11989 fi
11990
11991         
11992 fi
11993
11994         LIBS="$ol_LIBS"
11995
11996 fi
11997
11998 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11999
12000
12001  for ac_hdr in gdbm.h
12002 do
12003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12004 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12005 echo "configure:12006: checking for $ac_hdr" >&5
12006 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12007   echo $ac_n "(cached) $ac_c" 1>&6
12008 else
12009   cat > conftest.$ac_ext <<EOF
12010 #line 12011 "configure"
12011 #include "confdefs.h"
12012 #include <$ac_hdr>
12013 EOF
12014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12015 { (eval echo configure:12016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12017 if test -z "$ac_err"; then
12018   rm -rf conftest*
12019   eval "ac_cv_header_$ac_safe=yes"
12020 else
12021   echo "$ac_err" >&5
12022   echo "configure: failed program was:" >&5
12023   cat conftest.$ac_ext >&5
12024   rm -rf conftest*
12025   eval "ac_cv_header_$ac_safe=no"
12026 fi
12027 rm -f conftest*
12028 fi
12029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12030   echo "$ac_t""yes" 1>&6
12031     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12032   cat >> confdefs.h <<EOF
12033 #define $ac_tr_hdr 1
12034 EOF
12035  
12036 else
12037   echo "$ac_t""no" 1>&6
12038 fi
12039 done
12040
12041  echo $ac_n "checking for db""... $ac_c" 1>&6
12042 echo "configure:12043: checking for db" >&5
12043 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12044   echo $ac_n "(cached) $ac_c" 1>&6
12045 else
12046   
12047         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12048                 ol_cv_gdbm=no
12049         else
12050                 ol_cv_gdbm=yes
12051         fi
12052
12053 fi
12054
12055 echo "$ac_t""$ol_cv_gdbm" 1>&6
12056  if test $ol_cv_gdbm = yes ; then
12057         cat >> confdefs.h <<\EOF
12058 #define HAVE_GDBM 1
12059 EOF
12060
12061  fi
12062
12063
12064         if test $ol_cv_gdbm = yes ; then
12065                 ol_link_ldbm=gdbm
12066                 ol_with_ldbm_api=gdbm
12067
12068                 if test $ol_cv_lib_gdbm != yes ; then
12069                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12070                 fi
12071         fi
12072 fi
12073
12074 if test $ol_with_ldbm_api = ndbm ; then
12075         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12076 echo "configure:12077: checking for NDBM library" >&5
12077 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12078   echo $ac_n "(cached) $ac_c" 1>&6
12079 else
12080         ol_LIBS="$LIBS"
12081         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12082 echo "configure:12083: checking for dbm_open" >&5
12083 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12084   echo $ac_n "(cached) $ac_c" 1>&6
12085 else
12086   cat > conftest.$ac_ext <<EOF
12087 #line 12088 "configure"
12088 #include "confdefs.h"
12089 /* System header to define __stub macros and hopefully few prototypes,
12090     which can conflict with char dbm_open(); below.  */
12091 #include <assert.h>
12092 /* Override any gcc2 internal prototype to avoid an error.  */
12093 /* We use char because int might match the return type of a gcc2
12094     builtin and then its argument prototype would still apply.  */
12095 char dbm_open();
12096 char (*f)();
12097
12098 int main() {
12099
12100 /* The GNU C library defines this for functions which it implements
12101     to always fail with ENOSYS.  Some functions are actually named
12102     something starting with __ and the normal name is an alias.  */
12103 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12104 choke me
12105 #else
12106 f = dbm_open;
12107 #endif
12108
12109 ; return 0; }
12110 EOF
12111 if { (eval echo configure:12112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12112   rm -rf conftest*
12113   eval "ac_cv_func_dbm_open=yes"
12114 else
12115   echo "configure: failed program was:" >&5
12116   cat conftest.$ac_ext >&5
12117   rm -rf conftest*
12118   eval "ac_cv_func_dbm_open=no"
12119 fi
12120 rm -f conftest*
12121 fi
12122
12123 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12124   echo "$ac_t""yes" 1>&6
12125   ol_cv_lib_ndbm=yes
12126 else
12127   echo "$ac_t""no" 1>&6
12128
12129                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12130 echo "configure:12131: checking for dbm_open in -lndbm" >&5
12131 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12133   echo $ac_n "(cached) $ac_c" 1>&6
12134 else
12135   ac_save_LIBS="$LIBS"
12136 LIBS="-lndbm  $LIBS"
12137 cat > conftest.$ac_ext <<EOF
12138 #line 12139 "configure"
12139 #include "confdefs.h"
12140 /* Override any gcc2 internal prototype to avoid an error.  */
12141 /* We use char because int might match the return type of a gcc2
12142     builtin and then its argument prototype would still apply.  */
12143 char dbm_open();
12144
12145 int main() {
12146 dbm_open()
12147 ; return 0; }
12148 EOF
12149 if { (eval echo configure:12150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12150   rm -rf conftest*
12151   eval "ac_cv_lib_$ac_lib_var=yes"
12152 else
12153   echo "configure: failed program was:" >&5
12154   cat conftest.$ac_ext >&5
12155   rm -rf conftest*
12156   eval "ac_cv_lib_$ac_lib_var=no"
12157 fi
12158 rm -f conftest*
12159 LIBS="$ac_save_LIBS"
12160
12161 fi
12162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12163   echo "$ac_t""yes" 1>&6
12164   ol_cv_lib_ndbm=-lndbm
12165 else
12166   echo "$ac_t""no" 1>&6
12167
12168                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12169 echo "configure:12170: checking for dbm_open in -ldbm" >&5
12170 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12171 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12172   echo $ac_n "(cached) $ac_c" 1>&6
12173 else
12174   ac_save_LIBS="$LIBS"
12175 LIBS="-ldbm  $LIBS"
12176 cat > conftest.$ac_ext <<EOF
12177 #line 12178 "configure"
12178 #include "confdefs.h"
12179 /* Override any gcc2 internal prototype to avoid an error.  */
12180 /* We use char because int might match the return type of a gcc2
12181     builtin and then its argument prototype would still apply.  */
12182 char dbm_open();
12183
12184 int main() {
12185 dbm_open()
12186 ; return 0; }
12187 EOF
12188 if { (eval echo configure:12189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12189   rm -rf conftest*
12190   eval "ac_cv_lib_$ac_lib_var=yes"
12191 else
12192   echo "configure: failed program was:" >&5
12193   cat conftest.$ac_ext >&5
12194   rm -rf conftest*
12195   eval "ac_cv_lib_$ac_lib_var=no"
12196 fi
12197 rm -f conftest*
12198 LIBS="$ac_save_LIBS"
12199
12200 fi
12201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12202   echo "$ac_t""yes" 1>&6
12203   ol_cv_lib_ndbm=-ldbm
12204 else
12205   echo "$ac_t""no" 1>&6
12206 ol_cv_lib_ndbm=no
12207 fi
12208                 
12209 fi
12210
12211         
12212 fi
12213
12214         LIBS="$ol_LIBS"
12215
12216 fi
12217
12218 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12219
12220
12221  for ac_hdr in ndbm.h
12222 do
12223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12225 echo "configure:12226: checking for $ac_hdr" >&5
12226 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12227   echo $ac_n "(cached) $ac_c" 1>&6
12228 else
12229   cat > conftest.$ac_ext <<EOF
12230 #line 12231 "configure"
12231 #include "confdefs.h"
12232 #include <$ac_hdr>
12233 EOF
12234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12235 { (eval echo configure:12236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12237 if test -z "$ac_err"; then
12238   rm -rf conftest*
12239   eval "ac_cv_header_$ac_safe=yes"
12240 else
12241   echo "$ac_err" >&5
12242   echo "configure: failed program was:" >&5
12243   cat conftest.$ac_ext >&5
12244   rm -rf conftest*
12245   eval "ac_cv_header_$ac_safe=no"
12246 fi
12247 rm -f conftest*
12248 fi
12249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12250   echo "$ac_t""yes" 1>&6
12251     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12252   cat >> confdefs.h <<EOF
12253 #define $ac_tr_hdr 1
12254 EOF
12255  
12256 else
12257   echo "$ac_t""no" 1>&6
12258 fi
12259 done
12260
12261  echo $ac_n "checking for db""... $ac_c" 1>&6
12262 echo "configure:12263: checking for db" >&5
12263 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12264   echo $ac_n "(cached) $ac_c" 1>&6
12265 else
12266   
12267         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12268                 ol_cv_ndbm=no
12269         else
12270                 ol_cv_ndbm=yes
12271         fi
12272
12273 fi
12274
12275 echo "$ac_t""$ol_cv_ndbm" 1>&6
12276  if test $ol_cv_ndbm = yes ; then
12277         cat >> confdefs.h <<\EOF
12278 #define HAVE_NDBM 1
12279 EOF
12280
12281  fi
12282
12283
12284         if test $ol_cv_ndbm = yes ; then
12285                 ol_link_ldbm=ndbm
12286                 ol_with_ldbm_api=ndbm
12287
12288                 if test $ol_cv_lib_ndbm != yes ; then
12289                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12290                 fi
12291         fi
12292 fi
12293
12294 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12295         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12296         if test $ol_enable_ldbm = yes ; then
12297                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12298         fi
12299
12300         echo "configure: warning: disabling LDBM" 1>&2
12301         ol_enable_ldbm=no
12302 fi
12303
12304 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12305         LINK_BINS_DYNAMIC="yes"
12306 else
12307         LINK_BINS_DYNAMIC="no"
12308 fi
12309
12310 if test $ol_enable_wrappers != no ; then
12311         for ac_hdr in tcpd.h
12312 do
12313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12315 echo "configure:12316: checking for $ac_hdr" >&5
12316 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12317   echo $ac_n "(cached) $ac_c" 1>&6
12318 else
12319   cat > conftest.$ac_ext <<EOF
12320 #line 12321 "configure"
12321 #include "confdefs.h"
12322 #include <$ac_hdr>
12323 EOF
12324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12325 { (eval echo configure:12326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12327 if test -z "$ac_err"; then
12328   rm -rf conftest*
12329   eval "ac_cv_header_$ac_safe=yes"
12330 else
12331   echo "$ac_err" >&5
12332   echo "configure: failed program was:" >&5
12333   cat conftest.$ac_ext >&5
12334   rm -rf conftest*
12335   eval "ac_cv_header_$ac_safe=no"
12336 fi
12337 rm -f conftest*
12338 fi
12339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12340   echo "$ac_t""yes" 1>&6
12341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12342   cat >> confdefs.h <<EOF
12343 #define $ac_tr_hdr 1
12344 EOF
12345  
12346 else
12347   echo "$ac_t""no" 1>&6
12348 fi
12349 done
12350
12351
12352         if test $ac_cv_header_tcpd_h != yes ; then
12353                 have_wrappers=no
12354         else
12355                 cat > conftest.$ac_ext <<EOF
12356 #line 12357 "configure"
12357 #include "confdefs.h"
12358
12359 int allow_severity = 0;
12360 int deny_severity  = 0;
12361                 
12362 int main() {
12363 hosts_access()
12364 ; return 0; }
12365 EOF
12366 if { (eval echo configure:12367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12367   rm -rf conftest*
12368   have_wrappers=yes
12369 else
12370   echo "configure: failed program was:" >&5
12371   cat conftest.$ac_ext >&5
12372   rm -rf conftest*
12373   have_wrappers=no
12374 fi
12375 rm -f conftest*
12376         fi
12377
12378         if test $have_wrappers = yes ; then
12379                 cat >> confdefs.h <<\EOF
12380 #define HAVE_TCPD 1
12381 EOF
12382
12383                 WRAP_LIBS="-lwrap"
12384
12385                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12386 echo "configure:12387: checking for main in -lnsl" >&5
12387 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12388 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12389   echo $ac_n "(cached) $ac_c" 1>&6
12390 else
12391   ac_save_LIBS="$LIBS"
12392 LIBS="-lnsl  $LIBS"
12393 cat > conftest.$ac_ext <<EOF
12394 #line 12395 "configure"
12395 #include "confdefs.h"
12396
12397 int main() {
12398 main()
12399 ; return 0; }
12400 EOF
12401 if { (eval echo configure:12402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12402   rm -rf conftest*
12403   eval "ac_cv_lib_$ac_lib_var=yes"
12404 else
12405   echo "configure: failed program was:" >&5
12406   cat conftest.$ac_ext >&5
12407   rm -rf conftest*
12408   eval "ac_cv_lib_$ac_lib_var=no"
12409 fi
12410 rm -f conftest*
12411 LIBS="$ac_save_LIBS"
12412
12413 fi
12414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12415   echo "$ac_t""yes" 1>&6
12416     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12417     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12418   cat >> confdefs.h <<EOF
12419 #define $ac_tr_lib 1
12420 EOF
12421
12422   LIBS="-lnsl $LIBS"
12423
12424 else
12425   echo "$ac_t""no" 1>&6
12426 fi
12427
12428         else
12429                 echo "configure: warning: could not find -lwrap" 1>&2
12430                 if test $ol_enable_wrappers = yes ; then
12431                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12432                 fi
12433
12434                 echo "configure: warning: disabling wrappers support" 1>&2
12435                 ol_enable_wrappers=no
12436                 WRAP_LIBS=""
12437         fi
12438 fi
12439
12440 if test $ol_enable_syslog != no ; then
12441         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12442 echo "configure:12443: checking for openlog" >&5
12443 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12444   echo $ac_n "(cached) $ac_c" 1>&6
12445 else
12446   cat > conftest.$ac_ext <<EOF
12447 #line 12448 "configure"
12448 #include "confdefs.h"
12449 /* System header to define __stub macros and hopefully few prototypes,
12450     which can conflict with char openlog(); below.  */
12451 #include <assert.h>
12452 /* Override any gcc2 internal prototype to avoid an error.  */
12453 /* We use char because int might match the return type of a gcc2
12454     builtin and then its argument prototype would still apply.  */
12455 char openlog();
12456 char (*f)();
12457
12458 int main() {
12459
12460 /* The GNU C library defines this for functions which it implements
12461     to always fail with ENOSYS.  Some functions are actually named
12462     something starting with __ and the normal name is an alias.  */
12463 #if defined (__stub_openlog) || defined (__stub___openlog)
12464 choke me
12465 #else
12466 f = openlog;
12467 #endif
12468
12469 ; return 0; }
12470 EOF
12471 if { (eval echo configure:12472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12472   rm -rf conftest*
12473   eval "ac_cv_func_openlog=yes"
12474 else
12475   echo "configure: failed program was:" >&5
12476   cat conftest.$ac_ext >&5
12477   rm -rf conftest*
12478   eval "ac_cv_func_openlog=no"
12479 fi
12480 rm -f conftest*
12481 fi
12482
12483 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12484   echo "$ac_t""yes" 1>&6
12485   :
12486 else
12487   echo "$ac_t""no" 1>&6
12488 fi
12489
12490         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12491                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12492         fi
12493         ol_enable_syslog=$ac_cv_func_openlog
12494 fi
12495
12496 if test $ol_enable_dmalloc != no ; then
12497         for ac_hdr in dmalloc.h
12498 do
12499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12500 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12501 echo "configure:12502: checking for $ac_hdr" >&5
12502 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12503   echo $ac_n "(cached) $ac_c" 1>&6
12504 else
12505   cat > conftest.$ac_ext <<EOF
12506 #line 12507 "configure"
12507 #include "confdefs.h"
12508 #include <$ac_hdr>
12509 EOF
12510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12511 { (eval echo configure:12512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12513 if test -z "$ac_err"; then
12514   rm -rf conftest*
12515   eval "ac_cv_header_$ac_safe=yes"
12516 else
12517   echo "$ac_err" >&5
12518   echo "configure: failed program was:" >&5
12519   cat conftest.$ac_ext >&5
12520   rm -rf conftest*
12521   eval "ac_cv_header_$ac_safe=no"
12522 fi
12523 rm -f conftest*
12524 fi
12525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12526   echo "$ac_t""yes" 1>&6
12527     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12528   cat >> confdefs.h <<EOF
12529 #define $ac_tr_hdr 1
12530 EOF
12531  
12532 else
12533   echo "$ac_t""no" 1>&6
12534 fi
12535 done
12536
12537         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12538 echo "configure:12539: checking for dmalloc_shutdown in -ldmalloc" >&5
12539 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12540 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12541   echo $ac_n "(cached) $ac_c" 1>&6
12542 else
12543   ac_save_LIBS="$LIBS"
12544 LIBS="-ldmalloc  $LIBS"
12545 cat > conftest.$ac_ext <<EOF
12546 #line 12547 "configure"
12547 #include "confdefs.h"
12548 /* Override any gcc2 internal prototype to avoid an error.  */
12549 /* We use char because int might match the return type of a gcc2
12550     builtin and then its argument prototype would still apply.  */
12551 char dmalloc_shutdown();
12552
12553 int main() {
12554 dmalloc_shutdown()
12555 ; return 0; }
12556 EOF
12557 if { (eval echo configure:12558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12558   rm -rf conftest*
12559   eval "ac_cv_lib_$ac_lib_var=yes"
12560 else
12561   echo "configure: failed program was:" >&5
12562   cat conftest.$ac_ext >&5
12563   rm -rf conftest*
12564   eval "ac_cv_lib_$ac_lib_var=no"
12565 fi
12566 rm -f conftest*
12567 LIBS="$ac_save_LIBS"
12568
12569 fi
12570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12571   echo "$ac_t""yes" 1>&6
12572     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12573     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12574   cat >> confdefs.h <<EOF
12575 #define $ac_tr_lib 1
12576 EOF
12577
12578   LIBS="-ldmalloc $LIBS"
12579
12580 else
12581   echo "$ac_t""no" 1>&6
12582 fi
12583
12584 fi
12585
12586 if test $ol_enable_tcl != no ; then
12587         for ac_hdr in tcl.h
12588 do
12589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12591 echo "configure:12592: checking for $ac_hdr" >&5
12592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12593   echo $ac_n "(cached) $ac_c" 1>&6
12594 else
12595   cat > conftest.$ac_ext <<EOF
12596 #line 12597 "configure"
12597 #include "confdefs.h"
12598 #include <$ac_hdr>
12599 EOF
12600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12601 { (eval echo configure:12602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12603 if test -z "$ac_err"; then
12604   rm -rf conftest*
12605   eval "ac_cv_header_$ac_safe=yes"
12606 else
12607   echo "$ac_err" >&5
12608   echo "configure: failed program was:" >&5
12609   cat conftest.$ac_ext >&5
12610   rm -rf conftest*
12611   eval "ac_cv_header_$ac_safe=no"
12612 fi
12613 rm -f conftest*
12614 fi
12615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12616   echo "$ac_t""yes" 1>&6
12617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12618   cat >> confdefs.h <<EOF
12619 #define $ac_tr_hdr 1
12620 EOF
12621  
12622 else
12623   echo "$ac_t""no" 1>&6
12624 fi
12625 done
12626
12627
12628         if test $ac_cv_header_tcl_h != yes ; then
12629                 have_tcl=no
12630         else
12631                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12632                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12633 echo "configure:12634: checking for main in -l$lib" >&5
12634 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12635 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12636   echo $ac_n "(cached) $ac_c" 1>&6
12637 else
12638   ac_save_LIBS="$LIBS"
12639 LIBS="-l$lib  $LIBS"
12640 cat > conftest.$ac_ext <<EOF
12641 #line 12642 "configure"
12642 #include "confdefs.h"
12643
12644 int main() {
12645 main()
12646 ; return 0; }
12647 EOF
12648 if { (eval echo configure:12649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12649   rm -rf conftest*
12650   eval "ac_cv_lib_$ac_lib_var=yes"
12651 else
12652   echo "configure: failed program was:" >&5
12653   cat conftest.$ac_ext >&5
12654   rm -rf conftest*
12655   eval "ac_cv_lib_$ac_lib_var=no"
12656 fi
12657 rm -f conftest*
12658 LIBS="$ac_save_LIBS"
12659
12660 fi
12661 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12662   echo "$ac_t""yes" 1>&6
12663   have_tcl=yes
12664                            if test x"$ol_with_tcl_module" = "xstatic" ; then
12665                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12666                            else
12667                                MOD_TCL_LIB="-l${lib}"
12668                            fi;break
12669 else
12670   echo "$ac_t""no" 1>&6
12671 have_tcl=no
12672 fi
12673
12674                 done
12675         fi
12676
12677         if test $have_tcl != yes ; then
12678                 echo "configure: warning: could not find -ltcl" 1>&2
12679                 if test $ol_enable_tcl = yes ; then
12680                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12681                 fi
12682
12683                 ol_enable_tcl=no
12684         fi
12685 fi
12686
12687 ol_link_termcap=no
12688 for ac_hdr in termcap.h ncurses.h
12689 do
12690 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12691 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12692 echo "configure:12693: checking for $ac_hdr" >&5
12693 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12694   echo $ac_n "(cached) $ac_c" 1>&6
12695 else
12696   cat > conftest.$ac_ext <<EOF
12697 #line 12698 "configure"
12698 #include "confdefs.h"
12699 #include <$ac_hdr>
12700 EOF
12701 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12702 { (eval echo configure:12703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12703 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12704 if test -z "$ac_err"; then
12705   rm -rf conftest*
12706   eval "ac_cv_header_$ac_safe=yes"
12707 else
12708   echo "$ac_err" >&5
12709   echo "configure: failed program was:" >&5
12710   cat conftest.$ac_ext >&5
12711   rm -rf conftest*
12712   eval "ac_cv_header_$ac_safe=no"
12713 fi
12714 rm -f conftest*
12715 fi
12716 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12717   echo "$ac_t""yes" 1>&6
12718     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12719   cat >> confdefs.h <<EOF
12720 #define $ac_tr_hdr 1
12721 EOF
12722  
12723 else
12724   echo "$ac_t""no" 1>&6
12725 fi
12726 done
12727
12728
12729 if test $ol_link_termcap = no ; then
12730         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12731 echo "configure:12732: checking for tputs in -ltermcap" >&5
12732 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12733 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12734   echo $ac_n "(cached) $ac_c" 1>&6
12735 else
12736   ac_save_LIBS="$LIBS"
12737 LIBS="-ltermcap  $LIBS"
12738 cat > conftest.$ac_ext <<EOF
12739 #line 12740 "configure"
12740 #include "confdefs.h"
12741 /* Override any gcc2 internal prototype to avoid an error.  */
12742 /* We use char because int might match the return type of a gcc2
12743     builtin and then its argument prototype would still apply.  */
12744 char tputs();
12745
12746 int main() {
12747 tputs()
12748 ; return 0; }
12749 EOF
12750 if { (eval echo configure:12751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12751   rm -rf conftest*
12752   eval "ac_cv_lib_$ac_lib_var=yes"
12753 else
12754   echo "configure: failed program was:" >&5
12755   cat conftest.$ac_ext >&5
12756   rm -rf conftest*
12757   eval "ac_cv_lib_$ac_lib_var=no"
12758 fi
12759 rm -f conftest*
12760 LIBS="$ac_save_LIBS"
12761
12762 fi
12763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12764   echo "$ac_t""yes" 1>&6
12765   have_termcap=yes
12766 else
12767   echo "$ac_t""no" 1>&6
12768 have_termcap=no
12769 fi
12770
12771         if test $have_termcap = yes ; then
12772                 cat >> confdefs.h <<\EOF
12773 #define HAVE_TERMCAP 1
12774 EOF
12775
12776                 ol_link_termcap=yes
12777                 TERMCAP_LIBS=-ltermcap
12778         fi
12779 fi
12780
12781 if test $ol_link_termcap = no ; then
12782         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12783 echo "configure:12784: checking for initscr in -lncurses" >&5
12784 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12785 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12786   echo $ac_n "(cached) $ac_c" 1>&6
12787 else
12788   ac_save_LIBS="$LIBS"
12789 LIBS="-lncurses  $LIBS"
12790 cat > conftest.$ac_ext <<EOF
12791 #line 12792 "configure"
12792 #include "confdefs.h"
12793 /* Override any gcc2 internal prototype to avoid an error.  */
12794 /* We use char because int might match the return type of a gcc2
12795     builtin and then its argument prototype would still apply.  */
12796 char initscr();
12797
12798 int main() {
12799 initscr()
12800 ; return 0; }
12801 EOF
12802 if { (eval echo configure:12803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12803   rm -rf conftest*
12804   eval "ac_cv_lib_$ac_lib_var=yes"
12805 else
12806   echo "configure: failed program was:" >&5
12807   cat conftest.$ac_ext >&5
12808   rm -rf conftest*
12809   eval "ac_cv_lib_$ac_lib_var=no"
12810 fi
12811 rm -f conftest*
12812 LIBS="$ac_save_LIBS"
12813
12814 fi
12815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12816   echo "$ac_t""yes" 1>&6
12817   have_ncurses=yes
12818 else
12819   echo "$ac_t""no" 1>&6
12820 have_ncurses=no
12821 fi
12822
12823         if test $have_ncurses = yes ; then
12824                 cat >> confdefs.h <<\EOF
12825 #define HAVE_NCURSES 1
12826 EOF
12827
12828                 ol_link_termcap=yes
12829                 TERMCAP_LIBS=-lncurses
12830         fi
12831 fi
12832
12833 if test $ol_link_termcap = no ; then
12834         cat >> confdefs.h <<\EOF
12835 #define NO_TERMCAP 1
12836 EOF
12837
12838         TERMCAP_LIBS=
12839 fi
12840
12841 ol_link_sasl=no
12842 if test $ol_with_cyrus_sasl != no ; then
12843         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12844 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12845 echo "configure:12846: checking for sasl.h" >&5
12846 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12847   echo $ac_n "(cached) $ac_c" 1>&6
12848 else
12849   cat > conftest.$ac_ext <<EOF
12850 #line 12851 "configure"
12851 #include "confdefs.h"
12852 #include <sasl.h>
12853 EOF
12854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12855 { (eval echo configure:12856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12857 if test -z "$ac_err"; then
12858   rm -rf conftest*
12859   eval "ac_cv_header_$ac_safe=yes"
12860 else
12861   echo "$ac_err" >&5
12862   echo "configure: failed program was:" >&5
12863   cat conftest.$ac_ext >&5
12864   rm -rf conftest*
12865   eval "ac_cv_header_$ac_safe=no"
12866 fi
12867 rm -f conftest*
12868 fi
12869 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12870   echo "$ac_t""yes" 1>&6
12871   :
12872 else
12873   echo "$ac_t""no" 1>&6
12874 fi
12875
12876
12877         if test $ac_cv_header_sasl_h = yes ; then
12878                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12879 echo "configure:12880: checking for sasl_client_init in -lsasl" >&5
12880 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12881 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12882   echo $ac_n "(cached) $ac_c" 1>&6
12883 else
12884   ac_save_LIBS="$LIBS"
12885 LIBS="-lsasl  $LIBS"
12886 cat > conftest.$ac_ext <<EOF
12887 #line 12888 "configure"
12888 #include "confdefs.h"
12889 /* Override any gcc2 internal prototype to avoid an error.  */
12890 /* We use char because int might match the return type of a gcc2
12891     builtin and then its argument prototype would still apply.  */
12892 char sasl_client_init();
12893
12894 int main() {
12895 sasl_client_init()
12896 ; return 0; }
12897 EOF
12898 if { (eval echo configure:12899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12899   rm -rf conftest*
12900   eval "ac_cv_lib_$ac_lib_var=yes"
12901 else
12902   echo "configure: failed program was:" >&5
12903   cat conftest.$ac_ext >&5
12904   rm -rf conftest*
12905   eval "ac_cv_lib_$ac_lib_var=no"
12906 fi
12907 rm -f conftest*
12908 LIBS="$ac_save_LIBS"
12909
12910 fi
12911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12912   echo "$ac_t""yes" 1>&6
12913   have_cyrus_sasl=yes
12914 else
12915   echo "$ac_t""no" 1>&6
12916 have_cyrus_sasl=no
12917 fi
12918
12919
12920                 if test $have_cyrus_sasl != no ; then
12921                         SASL_LIBS="-lsasl"
12922                         cat >> confdefs.h <<\EOF
12923 #define HAVE_CYRUS_SASL 1
12924 EOF
12925
12926                         ol_link_sasl=yes
12927                 fi
12928         fi
12929
12930         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12931                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12932         fi
12933 fi
12934
12935 if test $cross_compiling != yes ; then
12936         dev=no
12937         if test -r /dev/urandom ; then
12938                 dev="/dev/urandom";
12939         elif test -r /idev/urandom ; then
12940                 dev="/idev/urandom";
12941         elif test -r /dev/srandom ; then
12942                 dev="/dev/srandom";
12943         elif test -r /dev/random ; then
12944                 dev="/dev/random";
12945         elif test -r /idev/random ; then
12946                 dev="/idev/random";
12947         fi
12948
12949         if test $dev != no ; then
12950                 cat >> confdefs.h <<EOF
12951 #define URANDOM_DEVICE "$dev"
12952 EOF
12953
12954         fi
12955 fi
12956
12957 ol_link_fetch=no
12958 if test $ol_with_fetch != no ; then
12959         ol=$LIBS
12960 LIBS="-lfetch -lcom_err $LIBS"
12961 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12962 echo "configure:12963: checking fetch(3) library" >&5
12963 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12964   echo $ac_n "(cached) $ac_c" 1>&6
12965 else
12966   
12967         cat > conftest.$ac_ext <<EOF
12968 #line 12969 "configure"
12969 #include "confdefs.h"
12970
12971 #include <sys/param.h>
12972 #include <stdio.h>
12973 #include <fetch.h>
12974 int main() {
12975 struct url *u = fetchParseURL("file:///"); 
12976 ; return 0; }
12977 EOF
12978 if { (eval echo configure:12979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12979   rm -rf conftest*
12980   ol_cv_lib_fetch=yes
12981 else
12982   echo "configure: failed program was:" >&5
12983   cat conftest.$ac_ext >&5
12984   rm -rf conftest*
12985   ol_cv_lib_fetch=no
12986 fi
12987 rm -f conftest*
12988 fi
12989
12990 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12991 LIBS=$ol_LIBS
12992 if test $ol_cv_lib_fetch != no ; then
12993         ol_link_fetch="-lfetch -lcom_err"
12994         cat >> confdefs.h <<\EOF
12995 #define HAVE_FETCH 1
12996 EOF
12997
12998 fi
12999
13000
13001         if test $ol_cv_lib_fetch != no ; then
13002                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13003                 ol_link_fetch=freebsd
13004
13005         elif test $ol_with_fetch != auto ; then
13006                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13007         fi 
13008 fi
13009
13010 ol_link_readline=no
13011 if test $ol_with_readline != no ; then
13012         for ac_hdr in readline/readline.h readline/history.h
13013 do
13014 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13015 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13016 echo "configure:13017: checking for $ac_hdr" >&5
13017 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13018   echo $ac_n "(cached) $ac_c" 1>&6
13019 else
13020   cat > conftest.$ac_ext <<EOF
13021 #line 13022 "configure"
13022 #include "confdefs.h"
13023 #include <$ac_hdr>
13024 EOF
13025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13026 { (eval echo configure:13027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13028 if test -z "$ac_err"; then
13029   rm -rf conftest*
13030   eval "ac_cv_header_$ac_safe=yes"
13031 else
13032   echo "$ac_err" >&5
13033   echo "configure: failed program was:" >&5
13034   cat conftest.$ac_ext >&5
13035   rm -rf conftest*
13036   eval "ac_cv_header_$ac_safe=no"
13037 fi
13038 rm -f conftest*
13039 fi
13040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13041   echo "$ac_t""yes" 1>&6
13042     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13043   cat >> confdefs.h <<EOF
13044 #define $ac_tr_hdr 1
13045 EOF
13046  
13047 else
13048   echo "$ac_t""no" 1>&6
13049 fi
13050 done
13051
13052
13053         if test $ac_cv_header_readline_readline_h = yes ; then
13054                 save_LIBS="$LIBS"
13055                 LIBS="$TERMCAP_LIBS $LIBS"
13056                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13057 echo "configure:13058: checking for readline in -lreadline" >&5
13058 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13059 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13060   echo $ac_n "(cached) $ac_c" 1>&6
13061 else
13062   ac_save_LIBS="$LIBS"
13063 LIBS="-lreadline  $LIBS"
13064 cat > conftest.$ac_ext <<EOF
13065 #line 13066 "configure"
13066 #include "confdefs.h"
13067 /* Override any gcc2 internal prototype to avoid an error.  */
13068 /* We use char because int might match the return type of a gcc2
13069     builtin and then its argument prototype would still apply.  */
13070 char readline();
13071
13072 int main() {
13073 readline()
13074 ; return 0; }
13075 EOF
13076 if { (eval echo configure:13077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13077   rm -rf conftest*
13078   eval "ac_cv_lib_$ac_lib_var=yes"
13079 else
13080   echo "configure: failed program was:" >&5
13081   cat conftest.$ac_ext >&5
13082   rm -rf conftest*
13083   eval "ac_cv_lib_$ac_lib_var=no"
13084 fi
13085 rm -f conftest*
13086 LIBS="$ac_save_LIBS"
13087
13088 fi
13089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13090   echo "$ac_t""yes" 1>&6
13091   have_readline=yes
13092 else
13093   echo "$ac_t""no" 1>&6
13094 have_readline=no
13095 fi
13096
13097                 LIBS="$save_LIBS"
13098                         
13099                 if test $have_readline = yes ; then
13100                         ol_with_readline=found
13101                         ol_link_readline=yes
13102
13103                         READLINE_LIBS="-lreadline"
13104                 fi
13105         fi
13106 fi
13107
13108 if test $ol_link_readline = yes ; then
13109         cat >> confdefs.h <<\EOF
13110 #define HAVE_READLINE 1
13111 EOF
13112
13113 fi
13114
13115
13116 if test $ol_enable_crypt != no ; then
13117         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13118 echo "configure:13119: checking for crypt" >&5
13119 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13120   echo $ac_n "(cached) $ac_c" 1>&6
13121 else
13122   cat > conftest.$ac_ext <<EOF
13123 #line 13124 "configure"
13124 #include "confdefs.h"
13125 /* System header to define __stub macros and hopefully few prototypes,
13126     which can conflict with char crypt(); below.  */
13127 #include <assert.h>
13128 /* Override any gcc2 internal prototype to avoid an error.  */
13129 /* We use char because int might match the return type of a gcc2
13130     builtin and then its argument prototype would still apply.  */
13131 char crypt();
13132 char (*f)();
13133
13134 int main() {
13135
13136 /* The GNU C library defines this for functions which it implements
13137     to always fail with ENOSYS.  Some functions are actually named
13138     something starting with __ and the normal name is an alias.  */
13139 #if defined (__stub_crypt) || defined (__stub___crypt)
13140 choke me
13141 #else
13142 f = crypt;
13143 #endif
13144
13145 ; return 0; }
13146 EOF
13147 if { (eval echo configure:13148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13148   rm -rf conftest*
13149   eval "ac_cv_func_crypt=yes"
13150 else
13151   echo "configure: failed program was:" >&5
13152   cat conftest.$ac_ext >&5
13153   rm -rf conftest*
13154   eval "ac_cv_func_crypt=no"
13155 fi
13156 rm -f conftest*
13157 fi
13158
13159 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13160   echo "$ac_t""yes" 1>&6
13161   have_crypt=yes
13162 else
13163   echo "$ac_t""no" 1>&6
13164
13165                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13166 echo "configure:13167: checking for crypt in -lcrypt" >&5
13167 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13168 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13169   echo $ac_n "(cached) $ac_c" 1>&6
13170 else
13171   ac_save_LIBS="$LIBS"
13172 LIBS="-lcrypt  $LIBS"
13173 cat > conftest.$ac_ext <<EOF
13174 #line 13175 "configure"
13175 #include "confdefs.h"
13176 /* Override any gcc2 internal prototype to avoid an error.  */
13177 /* We use char because int might match the return type of a gcc2
13178     builtin and then its argument prototype would still apply.  */
13179 char crypt();
13180
13181 int main() {
13182 crypt()
13183 ; return 0; }
13184 EOF
13185 if { (eval echo configure:13186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13186   rm -rf conftest*
13187   eval "ac_cv_lib_$ac_lib_var=yes"
13188 else
13189   echo "configure: failed program was:" >&5
13190   cat conftest.$ac_ext >&5
13191   rm -rf conftest*
13192   eval "ac_cv_lib_$ac_lib_var=no"
13193 fi
13194 rm -f conftest*
13195 LIBS="$ac_save_LIBS"
13196
13197 fi
13198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13199   echo "$ac_t""yes" 1>&6
13200   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13201                         have_crypt=yes
13202 else
13203   echo "$ac_t""no" 1>&6
13204 have_crypt=no
13205 fi
13206
13207 fi
13208
13209
13210         if test $have_crypt = yes ; then
13211                 cat >> confdefs.h <<\EOF
13212 #define HAVE_CRYPT 1
13213 EOF
13214
13215         else
13216                 echo "configure: warning: could not find crypt" 1>&2
13217                 if test $ol_enable_crypt = yes ; then
13218                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13219                 fi
13220
13221                 echo "configure: warning: disabling crypt support" 1>&2
13222                 ol_enable_crypt=no
13223         fi
13224 fi
13225
13226 if test $ol_enable_proctitle != no ; then
13227         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13228 echo "configure:13229: checking for setproctitle" >&5
13229 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13230   echo $ac_n "(cached) $ac_c" 1>&6
13231 else
13232   cat > conftest.$ac_ext <<EOF
13233 #line 13234 "configure"
13234 #include "confdefs.h"
13235 /* System header to define __stub macros and hopefully few prototypes,
13236     which can conflict with char setproctitle(); below.  */
13237 #include <assert.h>
13238 /* Override any gcc2 internal prototype to avoid an error.  */
13239 /* We use char because int might match the return type of a gcc2
13240     builtin and then its argument prototype would still apply.  */
13241 char setproctitle();
13242 char (*f)();
13243
13244 int main() {
13245
13246 /* The GNU C library defines this for functions which it implements
13247     to always fail with ENOSYS.  Some functions are actually named
13248     something starting with __ and the normal name is an alias.  */
13249 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13250 choke me
13251 #else
13252 f = setproctitle;
13253 #endif
13254
13255 ; return 0; }
13256 EOF
13257 if { (eval echo configure:13258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13258   rm -rf conftest*
13259   eval "ac_cv_func_setproctitle=yes"
13260 else
13261   echo "configure: failed program was:" >&5
13262   cat conftest.$ac_ext >&5
13263   rm -rf conftest*
13264   eval "ac_cv_func_setproctitle=no"
13265 fi
13266 rm -f conftest*
13267 fi
13268
13269 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13270   echo "$ac_t""yes" 1>&6
13271   have_setproctitle=yes
13272 else
13273   echo "$ac_t""no" 1>&6
13274
13275                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13276 echo "configure:13277: checking for setproctitle in -lutil" >&5
13277 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13278 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13279   echo $ac_n "(cached) $ac_c" 1>&6
13280 else
13281   ac_save_LIBS="$LIBS"
13282 LIBS="-lutil  $LIBS"
13283 cat > conftest.$ac_ext <<EOF
13284 #line 13285 "configure"
13285 #include "confdefs.h"
13286 /* Override any gcc2 internal prototype to avoid an error.  */
13287 /* We use char because int might match the return type of a gcc2
13288     builtin and then its argument prototype would still apply.  */
13289 char setproctitle();
13290
13291 int main() {
13292 setproctitle()
13293 ; return 0; }
13294 EOF
13295 if { (eval echo configure:13296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13296   rm -rf conftest*
13297   eval "ac_cv_lib_$ac_lib_var=yes"
13298 else
13299   echo "configure: failed program was:" >&5
13300   cat conftest.$ac_ext >&5
13301   rm -rf conftest*
13302   eval "ac_cv_lib_$ac_lib_var=no"
13303 fi
13304 rm -f conftest*
13305 LIBS="$ac_save_LIBS"
13306
13307 fi
13308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13309   echo "$ac_t""yes" 1>&6
13310   have_setproctitle=yes
13311                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13312 else
13313   echo "$ac_t""no" 1>&6
13314 have_setproctitle=no
13315                         LIBOBJS="$LIBOBJS setproctitle.o"
13316                         LIBSRCS="$LIBSRCS setproctitle.c"
13317 fi
13318
13319 fi
13320
13321
13322         if test $have_setproctitle = yes ; then
13323                 cat >> confdefs.h <<\EOF
13324 #define HAVE_SETPROCTITLE 1
13325 EOF
13326
13327         fi
13328 fi
13329
13330 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13331 echo "configure:13332: checking for ANSI C header files" >&5
13332 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13333   echo $ac_n "(cached) $ac_c" 1>&6
13334 else
13335   cat > conftest.$ac_ext <<EOF
13336 #line 13337 "configure"
13337 #include "confdefs.h"
13338 #include <stdlib.h>
13339 #include <stdarg.h>
13340 #include <string.h>
13341 #include <float.h>
13342 EOF
13343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13344 { (eval echo configure:13345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13346 if test -z "$ac_err"; then
13347   rm -rf conftest*
13348   ac_cv_header_stdc=yes
13349 else
13350   echo "$ac_err" >&5
13351   echo "configure: failed program was:" >&5
13352   cat conftest.$ac_ext >&5
13353   rm -rf conftest*
13354   ac_cv_header_stdc=no
13355 fi
13356 rm -f conftest*
13357
13358 if test $ac_cv_header_stdc = yes; then
13359   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13360 cat > conftest.$ac_ext <<EOF
13361 #line 13362 "configure"
13362 #include "confdefs.h"
13363 #include <string.h>
13364 EOF
13365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13366   egrep "memchr" >/dev/null 2>&1; then
13367   :
13368 else
13369   rm -rf conftest*
13370   ac_cv_header_stdc=no
13371 fi
13372 rm -f conftest*
13373
13374 fi
13375
13376 if test $ac_cv_header_stdc = yes; then
13377   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13378 cat > conftest.$ac_ext <<EOF
13379 #line 13380 "configure"
13380 #include "confdefs.h"
13381 #include <stdlib.h>
13382 EOF
13383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13384   egrep "free" >/dev/null 2>&1; then
13385   :
13386 else
13387   rm -rf conftest*
13388   ac_cv_header_stdc=no
13389 fi
13390 rm -f conftest*
13391
13392 fi
13393
13394 if test $ac_cv_header_stdc = yes; then
13395   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13396 if test "$cross_compiling" = yes; then
13397   :
13398 else
13399   cat > conftest.$ac_ext <<EOF
13400 #line 13401 "configure"
13401 #include "confdefs.h"
13402 #include <ctype.h>
13403 #if ((' ' & 0x0FF) == 0x020)
13404 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13405 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13406 #else
13407 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13408  || ('j' <= (c) && (c) <= 'r') \
13409  || ('s' <= (c) && (c) <= 'z'))
13410 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13411 #endif
13412 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13413 int main () { int i; for (i = 0; i < 256; i++)
13414 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13415 exit (0); }
13416
13417 EOF
13418 if { (eval echo configure:13419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13419 then
13420   :
13421 else
13422   echo "configure: failed program was:" >&5
13423   cat conftest.$ac_ext >&5
13424   rm -fr conftest*
13425   ac_cv_header_stdc=no
13426 fi
13427 rm -fr conftest*
13428 fi
13429
13430 fi
13431 fi
13432
13433 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13434 if test $ac_cv_header_stdc = yes; then
13435   cat >> confdefs.h <<\EOF
13436 #define STDC_HEADERS 1
13437 EOF
13438
13439 fi
13440
13441 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13442 echo "configure:13443: checking for mode_t" >&5
13443 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13444   echo $ac_n "(cached) $ac_c" 1>&6
13445 else
13446   cat > conftest.$ac_ext <<EOF
13447 #line 13448 "configure"
13448 #include "confdefs.h"
13449 #include <sys/types.h>
13450 #if STDC_HEADERS
13451 #include <stdlib.h>
13452 #include <stddef.h>
13453 #endif
13454
13455 EOF
13456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13457   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13458   rm -rf conftest*
13459   eval "ac_cv_type_mode_t=yes"
13460 else
13461   rm -rf conftest*
13462   eval "ac_cv_type_mode_t=no"
13463 fi
13464 rm -f conftest*
13465
13466 fi
13467 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13468   echo "$ac_t""yes" 1>&6
13469 else
13470   echo "$ac_t""no" 1>&6
13471   cat >> confdefs.h <<EOF
13472 #define mode_t int
13473 EOF
13474
13475 fi
13476
13477 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13478 echo "configure:13479: checking for off_t" >&5
13479 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13480   echo $ac_n "(cached) $ac_c" 1>&6
13481 else
13482   cat > conftest.$ac_ext <<EOF
13483 #line 13484 "configure"
13484 #include "confdefs.h"
13485 #include <sys/types.h>
13486 #if STDC_HEADERS
13487 #include <stdlib.h>
13488 #include <stddef.h>
13489 #endif
13490
13491 EOF
13492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13493   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13494   rm -rf conftest*
13495   eval "ac_cv_type_off_t=yes"
13496 else
13497   rm -rf conftest*
13498   eval "ac_cv_type_off_t=no"
13499 fi
13500 rm -f conftest*
13501
13502 fi
13503 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13504   echo "$ac_t""yes" 1>&6
13505 else
13506   echo "$ac_t""no" 1>&6
13507   cat >> confdefs.h <<EOF
13508 #define off_t long
13509 EOF
13510
13511 fi
13512
13513 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13514 echo "configure:13515: checking for pid_t" >&5
13515 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13516   echo $ac_n "(cached) $ac_c" 1>&6
13517 else
13518   cat > conftest.$ac_ext <<EOF
13519 #line 13520 "configure"
13520 #include "confdefs.h"
13521 #include <sys/types.h>
13522 #if STDC_HEADERS
13523 #include <stdlib.h>
13524 #include <stddef.h>
13525 #endif
13526
13527 EOF
13528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13529   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13530   rm -rf conftest*
13531   eval "ac_cv_type_pid_t=yes"
13532 else
13533   rm -rf conftest*
13534   eval "ac_cv_type_pid_t=no"
13535 fi
13536 rm -f conftest*
13537
13538 fi
13539 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13540   echo "$ac_t""yes" 1>&6
13541 else
13542   echo "$ac_t""no" 1>&6
13543   cat >> confdefs.h <<EOF
13544 #define pid_t int
13545 EOF
13546
13547 fi
13548
13549 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13550 echo "configure:13551: checking for ptrdiff_t" >&5
13551 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13552   echo $ac_n "(cached) $ac_c" 1>&6
13553 else
13554   cat > conftest.$ac_ext <<EOF
13555 #line 13556 "configure"
13556 #include "confdefs.h"
13557 #include <stddef.h>
13558 int main() {
13559 ptrdiff_t p
13560 ; return 0; }
13561 EOF
13562 if { (eval echo configure:13563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13563   rm -rf conftest*
13564   am_cv_type_ptrdiff_t=yes
13565 else
13566   echo "configure: failed program was:" >&5
13567   cat conftest.$ac_ext >&5
13568   rm -rf conftest*
13569   am_cv_type_ptrdiff_t=no
13570 fi
13571 rm -f conftest*
13572 fi
13573
13574 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13575    if test $am_cv_type_ptrdiff_t = yes; then
13576      cat >> confdefs.h <<\EOF
13577 #define HAVE_PTRDIFF_T 1
13578 EOF
13579
13580    fi
13581
13582 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13583 echo "configure:13584: checking return type of signal handlers" >&5
13584 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13585   echo $ac_n "(cached) $ac_c" 1>&6
13586 else
13587   cat > conftest.$ac_ext <<EOF
13588 #line 13589 "configure"
13589 #include "confdefs.h"
13590 #include <sys/types.h>
13591 #include <signal.h>
13592 #ifdef signal
13593 #undef signal
13594 #endif
13595 #ifdef __cplusplus
13596 extern "C" void (*signal (int, void (*)(int)))(int);
13597 #else
13598 void (*signal ()) ();
13599 #endif
13600
13601 int main() {
13602 int i;
13603 ; return 0; }
13604 EOF
13605 if { (eval echo configure:13606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13606   rm -rf conftest*
13607   ac_cv_type_signal=void
13608 else
13609   echo "configure: failed program was:" >&5
13610   cat conftest.$ac_ext >&5
13611   rm -rf conftest*
13612   ac_cv_type_signal=int
13613 fi
13614 rm -f conftest*
13615 fi
13616
13617 echo "$ac_t""$ac_cv_type_signal" 1>&6
13618 cat >> confdefs.h <<EOF
13619 #define RETSIGTYPE $ac_cv_type_signal
13620 EOF
13621
13622
13623 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13624 echo "configure:13625: checking for size_t" >&5
13625 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13626   echo $ac_n "(cached) $ac_c" 1>&6
13627 else
13628   cat > conftest.$ac_ext <<EOF
13629 #line 13630 "configure"
13630 #include "confdefs.h"
13631 #include <sys/types.h>
13632 #if STDC_HEADERS
13633 #include <stdlib.h>
13634 #include <stddef.h>
13635 #endif
13636
13637 EOF
13638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13639   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13640   rm -rf conftest*
13641   eval "ac_cv_type_size_t=yes"
13642 else
13643   rm -rf conftest*
13644   eval "ac_cv_type_size_t=no"
13645 fi
13646 rm -f conftest*
13647
13648 fi
13649 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13650   echo "$ac_t""yes" 1>&6
13651 else
13652   echo "$ac_t""no" 1>&6
13653   cat >> confdefs.h <<EOF
13654 #define size_t unsigned
13655 EOF
13656
13657 fi
13658
13659
13660 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13661 echo "configure:13662: checking for ssize_t" >&5
13662 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13663   echo $ac_n "(cached) $ac_c" 1>&6
13664 else
13665   cat > conftest.$ac_ext <<EOF
13666 #line 13667 "configure"
13667 #include "confdefs.h"
13668 #include <sys/types.h>
13669 #if STDC_HEADERS
13670 #include <stdlib.h>
13671 #include <stddef.h>
13672 #endif
13673
13674 EOF
13675 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13676   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13677   rm -rf conftest*
13678   eval "ac_cv_type_ssize_t=yes"
13679 else
13680   rm -rf conftest*
13681   eval "ac_cv_type_ssize_t=no"
13682 fi
13683 rm -f conftest*
13684
13685 fi
13686 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13687   echo "$ac_t""yes" 1>&6
13688 else
13689   echo "$ac_t""no" 1>&6
13690   cat >> confdefs.h <<EOF
13691 #define ssize_t signed int
13692 EOF
13693
13694 fi
13695
13696 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13697 echo "configure:13698: checking for caddr_t" >&5
13698 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13699   echo $ac_n "(cached) $ac_c" 1>&6
13700 else
13701   cat > conftest.$ac_ext <<EOF
13702 #line 13703 "configure"
13703 #include "confdefs.h"
13704 #include <sys/types.h>
13705 #if STDC_HEADERS
13706 #include <stdlib.h>
13707 #include <stddef.h>
13708 #endif
13709
13710 EOF
13711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13712   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13713   rm -rf conftest*
13714   eval "ac_cv_type_caddr_t=yes"
13715 else
13716   rm -rf conftest*
13717   eval "ac_cv_type_caddr_t=no"
13718 fi
13719 rm -f conftest*
13720
13721 fi
13722 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13723   echo "$ac_t""yes" 1>&6
13724 else
13725   echo "$ac_t""no" 1>&6
13726   cat >> confdefs.h <<EOF
13727 #define caddr_t char *
13728 EOF
13729
13730 fi
13731
13732
13733 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13734 echo "configure:13735: checking for socklen_t" >&5
13735 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13736   echo $ac_n "(cached) $ac_c" 1>&6
13737 else
13738   cat > conftest.$ac_ext <<EOF
13739 #line 13740 "configure"
13740 #include "confdefs.h"
13741
13742 #ifdef HAVE_SYS_TYPES_H
13743 #include <sys/types.h>
13744 #endif
13745 #ifdef HAVE_SYS_SOCKET_H
13746 #include <sys/socket.h>
13747 #endif
13748
13749 int main() {
13750 socklen_t len;
13751 ; return 0; }
13752 EOF
13753 if { (eval echo configure:13754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13754   rm -rf conftest*
13755   ol_cv_type_socklen_t=yes
13756 else
13757   echo "configure: failed program was:" >&5
13758   cat conftest.$ac_ext >&5
13759   rm -rf conftest*
13760   ol_cv_type_socklen_t=no
13761 fi
13762 rm -f conftest*
13763 fi
13764
13765 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13766   if test $ol_cv_type_socklen_t = no; then
13767     cat >> confdefs.h <<\EOF
13768 #define socklen_t int
13769 EOF
13770
13771   fi
13772  
13773 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13774 echo "configure:13775: checking for member st_blksize in aggregate type struct stat" >&5
13775 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13776   echo $ac_n "(cached) $ac_c" 1>&6
13777 else
13778   cat > conftest.$ac_ext <<EOF
13779 #line 13780 "configure"
13780 #include "confdefs.h"
13781 #include <sys/types.h>
13782 #include <sys/stat.h>
13783 int main() {
13784 struct stat foo; foo.st_blksize;
13785 ; return 0; }
13786 EOF
13787 if { (eval echo configure:13788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13788   rm -rf conftest*
13789   ac_cv_c_struct_member_st_blksize=yes
13790 else
13791   echo "configure: failed program was:" >&5
13792   cat conftest.$ac_ext >&5
13793   rm -rf conftest*
13794   ac_cv_c_struct_member_st_blksize=no
13795 fi
13796 rm -f conftest*
13797 fi
13798
13799 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13800 st_blksize="$ac_cv_c_struct_member_st_blksize"
13801 if test $ac_cv_c_struct_member_st_blksize = yes; then
13802   cat >> confdefs.h <<\EOF
13803 #define HAVE_ST_BLKSIZE 1
13804 EOF
13805
13806 fi
13807
13808 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13809 echo "configure:13810: checking whether time.h and sys/time.h may both be included" >&5
13810 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13811   echo $ac_n "(cached) $ac_c" 1>&6
13812 else
13813   cat > conftest.$ac_ext <<EOF
13814 #line 13815 "configure"
13815 #include "confdefs.h"
13816 #include <sys/types.h>
13817 #include <sys/time.h>
13818 #include <time.h>
13819 int main() {
13820 struct tm *tp;
13821 ; return 0; }
13822 EOF
13823 if { (eval echo configure:13824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13824   rm -rf conftest*
13825   ac_cv_header_time=yes
13826 else
13827   echo "configure: failed program was:" >&5
13828   cat conftest.$ac_ext >&5
13829   rm -rf conftest*
13830   ac_cv_header_time=no
13831 fi
13832 rm -f conftest*
13833 fi
13834
13835 echo "$ac_t""$ac_cv_header_time" 1>&6
13836 if test $ac_cv_header_time = yes; then
13837   cat >> confdefs.h <<\EOF
13838 #define TIME_WITH_SYS_TIME 1
13839 EOF
13840
13841 fi
13842
13843 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13844 echo "configure:13845: checking whether struct tm is in sys/time.h or time.h" >&5
13845 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13846   echo $ac_n "(cached) $ac_c" 1>&6
13847 else
13848   cat > conftest.$ac_ext <<EOF
13849 #line 13850 "configure"
13850 #include "confdefs.h"
13851 #include <sys/types.h>
13852 #include <time.h>
13853 int main() {
13854 struct tm *tp; tp->tm_sec;
13855 ; return 0; }
13856 EOF
13857 if { (eval echo configure:13858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13858   rm -rf conftest*
13859   ac_cv_struct_tm=time.h
13860 else
13861   echo "configure: failed program was:" >&5
13862   cat conftest.$ac_ext >&5
13863   rm -rf conftest*
13864   ac_cv_struct_tm=sys/time.h
13865 fi
13866 rm -f conftest*
13867 fi
13868
13869 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13870 if test $ac_cv_struct_tm = sys/time.h; then
13871   cat >> confdefs.h <<\EOF
13872 #define TM_IN_SYS_TIME 1
13873 EOF
13874
13875 fi
13876
13877 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13878 echo "configure:13879: checking for uid_t in sys/types.h" >&5
13879 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13880   echo $ac_n "(cached) $ac_c" 1>&6
13881 else
13882   cat > conftest.$ac_ext <<EOF
13883 #line 13884 "configure"
13884 #include "confdefs.h"
13885 #include <sys/types.h>
13886 EOF
13887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13888   egrep "uid_t" >/dev/null 2>&1; then
13889   rm -rf conftest*
13890   ac_cv_type_uid_t=yes
13891 else
13892   rm -rf conftest*
13893   ac_cv_type_uid_t=no
13894 fi
13895 rm -f conftest*
13896
13897 fi
13898
13899 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13900 if test $ac_cv_type_uid_t = no; then
13901   cat >> confdefs.h <<\EOF
13902 #define uid_t int
13903 EOF
13904
13905   cat >> confdefs.h <<\EOF
13906 #define gid_t int
13907 EOF
13908
13909 fi
13910
13911 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13912 echo "configure:13913: checking for sig_atomic_t" >&5
13913 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13914   echo $ac_n "(cached) $ac_c" 1>&6
13915 else
13916   cat > conftest.$ac_ext <<EOF
13917 #line 13918 "configure"
13918 #include "confdefs.h"
13919 #include <signal.h>
13920 int main() {
13921 sig_atomic_t atomic;
13922 ; return 0; }
13923 EOF
13924 if { (eval echo configure:13925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13925   rm -rf conftest*
13926   ol_cv_type_sig_atomic_t=yes
13927 else
13928   echo "configure: failed program was:" >&5
13929   cat conftest.$ac_ext >&5
13930   rm -rf conftest*
13931   ol_cv_type_sig_atomic_t=no
13932 fi
13933 rm -f conftest*
13934 fi
13935
13936 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13937   if test $ol_cv_type_sig_atomic_t = no; then
13938     cat >> confdefs.h <<\EOF
13939 #define sig_atomic_t int
13940 EOF
13941
13942   fi
13943  
13944
13945
13946 # test for pw_gecos in struct passwd
13947 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13948 echo "configure:13949: checking struct passwd for pw_gecos" >&5
13949 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13950   echo $ac_n "(cached) $ac_c" 1>&6
13951 else
13952   
13953         cat > conftest.$ac_ext <<EOF
13954 #line 13955 "configure"
13955 #include "confdefs.h"
13956 #include <pwd.h>
13957 int main() {
13958
13959         struct passwd pwd;
13960         pwd.pw_gecos = pwd.pw_name;
13961
13962 ; return 0; }
13963 EOF
13964 if { (eval echo configure:13965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13965   rm -rf conftest*
13966   ol_cv_struct_passwd_pw_gecos=yes
13967 else
13968   echo "configure: failed program was:" >&5
13969   cat conftest.$ac_ext >&5
13970   rm -rf conftest*
13971   ol_cv_struct_passwd_pw_gecos=no
13972 fi
13973 rm -f conftest*
13974 fi
13975
13976 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13977 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13978         cat >> confdefs.h <<\EOF
13979 #define HAVE_PW_GECOS 1
13980 EOF
13981
13982 fi
13983
13984 # test for pw_passwd in struct passwd
13985 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13986 echo "configure:13987: checking struct passwd for pw_passwd" >&5
13987 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13988   echo $ac_n "(cached) $ac_c" 1>&6
13989 else
13990   
13991         cat > conftest.$ac_ext <<EOF
13992 #line 13993 "configure"
13993 #include "confdefs.h"
13994 #include <pwd.h>
13995 int main() {
13996
13997         struct passwd pwd;
13998         pwd.pw_passwd = pwd.pw_name;
13999
14000 ; return 0; }
14001 EOF
14002 if { (eval echo configure:14003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14003   rm -rf conftest*
14004   ol_cv_struct_passwd_pw_passwd=yes
14005 else
14006   echo "configure: failed program was:" >&5
14007   cat conftest.$ac_ext >&5
14008   rm -rf conftest*
14009   ol_cv_struct_passwd_pw_passwd=no
14010 fi
14011 rm -f conftest*
14012 fi
14013
14014 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14015 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14016         cat >> confdefs.h <<\EOF
14017 #define HAVE_PW_PASSWD 1
14018 EOF
14019
14020 fi
14021
14022
14023 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14024 echo "configure:14025: checking if toupper() requires islower()" >&5
14025 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14026   echo $ac_n "(cached) $ac_c" 1>&6
14027 else
14028   
14029         if test "$cross_compiling" = yes; then
14030   ol_cv_c_upper_lower=safe
14031 else
14032   cat > conftest.$ac_ext <<EOF
14033 #line 14034 "configure"
14034 #include "confdefs.h"
14035
14036 #include <ctype.h>
14037 main()
14038 {
14039         if ('C' == toupper('C'))
14040                 exit(0);
14041         else
14042                 exit(1);
14043 }
14044 EOF
14045 if { (eval echo configure:14046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14046 then
14047   ol_cv_c_upper_lower=no
14048 else
14049   echo "configure: failed program was:" >&5
14050   cat conftest.$ac_ext >&5
14051   rm -fr conftest*
14052   ol_cv_c_upper_lower=yes
14053 fi
14054 rm -fr conftest*
14055 fi
14056
14057 fi
14058
14059 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14060 if test $ol_cv_c_upper_lower != no ; then
14061         cat >> confdefs.h <<\EOF
14062 #define C_UPPER_LOWER 1
14063 EOF
14064
14065 fi
14066
14067 echo $ac_n "checking for working const""... $ac_c" 1>&6
14068 echo "configure:14069: checking for working const" >&5
14069 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14070   echo $ac_n "(cached) $ac_c" 1>&6
14071 else
14072   cat > conftest.$ac_ext <<EOF
14073 #line 14074 "configure"
14074 #include "confdefs.h"
14075
14076 int main() {
14077
14078 /* Ultrix mips cc rejects this.  */
14079 typedef int charset[2]; const charset x;
14080 /* SunOS 4.1.1 cc rejects this.  */
14081 char const *const *ccp;
14082 char **p;
14083 /* NEC SVR4.0.2 mips cc rejects this.  */
14084 struct point {int x, y;};
14085 static struct point const zero = {0,0};
14086 /* AIX XL C 1.02.0.0 rejects this.
14087    It does not let you subtract one const X* pointer from another in an arm
14088    of an if-expression whose if-part is not a constant expression */
14089 const char *g = "string";
14090 ccp = &g + (g ? g-g : 0);
14091 /* HPUX 7.0 cc rejects these. */
14092 ++ccp;
14093 p = (char**) ccp;
14094 ccp = (char const *const *) p;
14095 { /* SCO 3.2v4 cc rejects this.  */
14096   char *t;
14097   char const *s = 0 ? (char *) 0 : (char const *) 0;
14098
14099   *t++ = 0;
14100 }
14101 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14102   int x[] = {25, 17};
14103   const int *foo = &x[0];
14104   ++foo;
14105 }
14106 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14107   typedef const int *iptr;
14108   iptr p = 0;
14109   ++p;
14110 }
14111 { /* AIX XL C 1.02.0.0 rejects this saying
14112      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14113   struct s { int j; const int *ap[3]; };
14114   struct s *b; b->j = 5;
14115 }
14116 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14117   const int foo = 10;
14118 }
14119
14120 ; return 0; }
14121 EOF
14122 if { (eval echo configure:14123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14123   rm -rf conftest*
14124   ac_cv_c_const=yes
14125 else
14126   echo "configure: failed program was:" >&5
14127   cat conftest.$ac_ext >&5
14128   rm -rf conftest*
14129   ac_cv_c_const=no
14130 fi
14131 rm -f conftest*
14132 fi
14133
14134 echo "$ac_t""$ac_cv_c_const" 1>&6
14135 if test $ac_cv_c_const = no; then
14136   cat >> confdefs.h <<\EOF
14137 #define const 
14138 EOF
14139
14140 fi
14141
14142 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14143 echo "configure:14144: checking if compiler understands volatile" >&5
14144 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14145   echo $ac_n "(cached) $ac_c" 1>&6
14146 else
14147   cat > conftest.$ac_ext <<EOF
14148 #line 14149 "configure"
14149 #include "confdefs.h"
14150 int x, y, z;
14151 int main() {
14152 volatile int a; int * volatile b = x ? &y : &z;
14153       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14154       *b = 0;
14155 ; return 0; }
14156 EOF
14157 if { (eval echo configure:14158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14158   rm -rf conftest*
14159   ol_cv_c_volatile=yes
14160 else
14161   echo "configure: failed program was:" >&5
14162   cat conftest.$ac_ext >&5
14163   rm -rf conftest*
14164   ol_cv_c_volatile=no
14165 fi
14166 rm -f conftest*
14167 fi
14168
14169 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14170   if test $ol_cv_c_volatile = yes; then
14171     : 
14172   else
14173     cat >> confdefs.h <<\EOF
14174 #define volatile 
14175 EOF
14176
14177   fi
14178  
14179
14180 if test $cross_compiling = yes ; then
14181         cat >> confdefs.h <<\EOF
14182 #define CROSS_COMPILING 1
14183 EOF
14184
14185 else
14186         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14187 echo "configure:14188: checking whether byte ordering is bigendian" >&5
14188 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14189   echo $ac_n "(cached) $ac_c" 1>&6
14190 else
14191   ac_cv_c_bigendian=unknown
14192 # See if sys/param.h defines the BYTE_ORDER macro.
14193 cat > conftest.$ac_ext <<EOF
14194 #line 14195 "configure"
14195 #include "confdefs.h"
14196 #include <sys/types.h>
14197 #include <sys/param.h>
14198 int main() {
14199
14200 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14201  bogus endian macros
14202 #endif
14203 ; return 0; }
14204 EOF
14205 if { (eval echo configure:14206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14206   rm -rf conftest*
14207   # It does; now see whether it defined to BIG_ENDIAN or not.
14208 cat > conftest.$ac_ext <<EOF
14209 #line 14210 "configure"
14210 #include "confdefs.h"
14211 #include <sys/types.h>
14212 #include <sys/param.h>
14213 int main() {
14214
14215 #if BYTE_ORDER != BIG_ENDIAN
14216  not big endian
14217 #endif
14218 ; return 0; }
14219 EOF
14220 if { (eval echo configure:14221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14221   rm -rf conftest*
14222   ac_cv_c_bigendian=yes
14223 else
14224   echo "configure: failed program was:" >&5
14225   cat conftest.$ac_ext >&5
14226   rm -rf conftest*
14227   ac_cv_c_bigendian=no
14228 fi
14229 rm -f conftest*
14230 else
14231   echo "configure: failed program was:" >&5
14232   cat conftest.$ac_ext >&5
14233 fi
14234 rm -f conftest*
14235 if test $ac_cv_c_bigendian = unknown; then
14236 if test "$cross_compiling" = yes; then
14237     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14238 else
14239   cat > conftest.$ac_ext <<EOF
14240 #line 14241 "configure"
14241 #include "confdefs.h"
14242 main () {
14243   /* Are we little or big endian?  From Harbison&Steele.  */
14244   union
14245   {
14246     long l;
14247     char c[sizeof (long)];
14248   } u;
14249   u.l = 1;
14250   exit (u.c[sizeof (long) - 1] == 1);
14251 }
14252 EOF
14253 if { (eval echo configure:14254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14254 then
14255   ac_cv_c_bigendian=no
14256 else
14257   echo "configure: failed program was:" >&5
14258   cat conftest.$ac_ext >&5
14259   rm -fr conftest*
14260   ac_cv_c_bigendian=yes
14261 fi
14262 rm -fr conftest*
14263 fi
14264
14265 fi
14266 fi
14267
14268 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14269 if test $ac_cv_c_bigendian = yes; then
14270   cat >> confdefs.h <<\EOF
14271 #define WORDS_BIGENDIAN 1
14272 EOF
14273
14274 fi
14275
14276 fi
14277
14278 echo $ac_n "checking size of short""... $ac_c" 1>&6
14279 echo "configure:14280: checking size of short" >&5 
14280 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14281   echo $ac_n "(cached) $ac_c" 1>&6
14282 else
14283   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14284   cat > conftest.$ac_ext <<EOF
14285 #line 14286 "configure"
14286 #include "confdefs.h"
14287 #include "confdefs.h" 
14288 #include <sys/types.h> 
14289  
14290
14291 int main() {
14292 switch (0) case 0: case (sizeof (short) == $ac_size):;
14293 ; return 0; }
14294 EOF
14295 if { (eval echo configure:14296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14296   rm -rf conftest*
14297   ac_cv_sizeof_short=$ac_size
14298 else
14299   echo "configure: failed program was:" >&5
14300   cat conftest.$ac_ext >&5
14301 fi
14302 rm -f conftest* 
14303   if test x$ac_cv_sizeof_short != x ; then break; fi 
14304 done 
14305
14306 fi
14307  
14308 if test x$ac_cv_sizeof_short = x ; then 
14309   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14310 fi 
14311 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14312 cat >> confdefs.h <<EOF
14313 #define SIZEOF_SHORT $ac_cv_sizeof_short
14314 EOF
14315  
14316  
14317 echo $ac_n "checking size of int""... $ac_c" 1>&6
14318 echo "configure:14319: checking size of int" >&5 
14319 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14320   echo $ac_n "(cached) $ac_c" 1>&6
14321 else
14322   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14323   cat > conftest.$ac_ext <<EOF
14324 #line 14325 "configure"
14325 #include "confdefs.h"
14326 #include "confdefs.h" 
14327 #include <sys/types.h> 
14328  
14329
14330 int main() {
14331 switch (0) case 0: case (sizeof (int) == $ac_size):;
14332 ; return 0; }
14333 EOF
14334 if { (eval echo configure:14335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14335   rm -rf conftest*
14336   ac_cv_sizeof_int=$ac_size
14337 else
14338   echo "configure: failed program was:" >&5
14339   cat conftest.$ac_ext >&5
14340 fi
14341 rm -f conftest* 
14342   if test x$ac_cv_sizeof_int != x ; then break; fi 
14343 done 
14344
14345 fi
14346  
14347 if test x$ac_cv_sizeof_int = x ; then 
14348   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14349 fi 
14350 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14351 cat >> confdefs.h <<EOF
14352 #define SIZEOF_INT $ac_cv_sizeof_int
14353 EOF
14354  
14355  
14356 echo $ac_n "checking size of long""... $ac_c" 1>&6
14357 echo "configure:14358: checking size of long" >&5 
14358 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14359   echo $ac_n "(cached) $ac_c" 1>&6
14360 else
14361   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14362   cat > conftest.$ac_ext <<EOF
14363 #line 14364 "configure"
14364 #include "confdefs.h"
14365 #include "confdefs.h" 
14366 #include <sys/types.h> 
14367  
14368
14369 int main() {
14370 switch (0) case 0: case (sizeof (long) == $ac_size):;
14371 ; return 0; }
14372 EOF
14373 if { (eval echo configure:14374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14374   rm -rf conftest*
14375   ac_cv_sizeof_long=$ac_size
14376 else
14377   echo "configure: failed program was:" >&5
14378   cat conftest.$ac_ext >&5
14379 fi
14380 rm -f conftest* 
14381   if test x$ac_cv_sizeof_long != x ; then break; fi 
14382 done 
14383
14384 fi
14385  
14386 if test x$ac_cv_sizeof_long = x ; then 
14387   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14388 fi 
14389 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14390 cat >> confdefs.h <<EOF
14391 #define SIZEOF_LONG $ac_cv_sizeof_long
14392 EOF
14393  
14394
14395
14396 if test "$ac_cv_sizeof_int" -lt 4 ; then
14397         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14398
14399         cat >> confdefs.h <<\EOF
14400 #define LBER_INT_T long
14401 EOF
14402
14403 else
14404         cat >> confdefs.h <<\EOF
14405 #define LBER_INT_T int
14406 EOF
14407
14408 fi
14409
14410 cat >> confdefs.h <<\EOF
14411 #define LBER_LEN_T long
14412 EOF
14413
14414 cat >> confdefs.h <<\EOF
14415 #define LBER_SOCKET_T int
14416 EOF
14417
14418 cat >> confdefs.h <<\EOF
14419 #define LBER_TAG_T long
14420 EOF
14421
14422
14423 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14424 echo "configure:14425: checking for 8-bit clean memcmp" >&5
14425 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14426   echo $ac_n "(cached) $ac_c" 1>&6
14427 else
14428   if test "$cross_compiling" = yes; then
14429   ac_cv_func_memcmp_clean=no
14430 else
14431   cat > conftest.$ac_ext <<EOF
14432 #line 14433 "configure"
14433 #include "confdefs.h"
14434
14435 main()
14436 {
14437   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14438   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14439 }
14440
14441 EOF
14442 if { (eval echo configure:14443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14443 then
14444   ac_cv_func_memcmp_clean=yes
14445 else
14446   echo "configure: failed program was:" >&5
14447   cat conftest.$ac_ext >&5
14448   rm -fr conftest*
14449   ac_cv_func_memcmp_clean=no
14450 fi
14451 rm -fr conftest*
14452 fi
14453
14454 fi
14455
14456 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14457 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14458
14459 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14460 echo "configure:14461: checking for strftime" >&5
14461 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14462   echo $ac_n "(cached) $ac_c" 1>&6
14463 else
14464   cat > conftest.$ac_ext <<EOF
14465 #line 14466 "configure"
14466 #include "confdefs.h"
14467 /* System header to define __stub macros and hopefully few prototypes,
14468     which can conflict with char strftime(); below.  */
14469 #include <assert.h>
14470 /* Override any gcc2 internal prototype to avoid an error.  */
14471 /* We use char because int might match the return type of a gcc2
14472     builtin and then its argument prototype would still apply.  */
14473 char strftime();
14474 char (*f)();
14475
14476 int main() {
14477
14478 /* The GNU C library defines this for functions which it implements
14479     to always fail with ENOSYS.  Some functions are actually named
14480     something starting with __ and the normal name is an alias.  */
14481 #if defined (__stub_strftime) || defined (__stub___strftime)
14482 choke me
14483 #else
14484 f = strftime;
14485 #endif
14486
14487 ; return 0; }
14488 EOF
14489 if { (eval echo configure:14490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14490   rm -rf conftest*
14491   eval "ac_cv_func_strftime=yes"
14492 else
14493   echo "configure: failed program was:" >&5
14494   cat conftest.$ac_ext >&5
14495   rm -rf conftest*
14496   eval "ac_cv_func_strftime=no"
14497 fi
14498 rm -f conftest*
14499 fi
14500
14501 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14502   echo "$ac_t""yes" 1>&6
14503   cat >> confdefs.h <<\EOF
14504 #define HAVE_STRFTIME 1
14505 EOF
14506
14507 else
14508   echo "$ac_t""no" 1>&6
14509 # strftime is in -lintl on SCO UNIX.
14510 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14511 echo "configure:14512: checking for strftime in -lintl" >&5
14512 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14513 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14514   echo $ac_n "(cached) $ac_c" 1>&6
14515 else
14516   ac_save_LIBS="$LIBS"
14517 LIBS="-lintl  $LIBS"
14518 cat > conftest.$ac_ext <<EOF
14519 #line 14520 "configure"
14520 #include "confdefs.h"
14521 /* Override any gcc2 internal prototype to avoid an error.  */
14522 /* We use char because int might match the return type of a gcc2
14523     builtin and then its argument prototype would still apply.  */
14524 char strftime();
14525
14526 int main() {
14527 strftime()
14528 ; return 0; }
14529 EOF
14530 if { (eval echo configure:14531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14531   rm -rf conftest*
14532   eval "ac_cv_lib_$ac_lib_var=yes"
14533 else
14534   echo "configure: failed program was:" >&5
14535   cat conftest.$ac_ext >&5
14536   rm -rf conftest*
14537   eval "ac_cv_lib_$ac_lib_var=no"
14538 fi
14539 rm -f conftest*
14540 LIBS="$ac_save_LIBS"
14541
14542 fi
14543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14544   echo "$ac_t""yes" 1>&6
14545   cat >> confdefs.h <<\EOF
14546 #define HAVE_STRFTIME 1
14547 EOF
14548
14549 LIBS="-lintl $LIBS"
14550 else
14551   echo "$ac_t""no" 1>&6
14552 fi
14553
14554 fi
14555
14556
14557 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14558 echo "configure:14559: checking for inet_aton()" >&5
14559 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14560   echo $ac_n "(cached) $ac_c" 1>&6
14561 else
14562   cat > conftest.$ac_ext <<EOF
14563 #line 14564 "configure"
14564 #include "confdefs.h"
14565
14566 #ifdef HAVE_SYS_TYPES_H
14567 #       include <sys/types.h>
14568 #endif
14569 #ifdef HAVE_SYS_SOCKET_H
14570 #       include <sys/socket.h>
14571 #       ifdef HAVE_SYS_SELECT_H
14572 #               include <sys/select.h>
14573 #       endif
14574 #       include <netinet/in.h>
14575 #       ifdef HAVE_ARPA_INET_H
14576 #               include <arpa/inet.h>
14577 #       endif
14578 #endif
14579
14580 int main() {
14581 struct in_addr in;
14582 int rc = inet_aton( "255.255.255.255", &in );
14583 ; return 0; }
14584 EOF
14585 if { (eval echo configure:14586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14586   rm -rf conftest*
14587   ol_cv_func_inet_aton=yes
14588 else
14589   echo "configure: failed program was:" >&5
14590   cat conftest.$ac_ext >&5
14591   rm -rf conftest*
14592   ol_cv_func_inet_aton=no
14593 fi
14594 rm -f conftest*
14595 fi
14596
14597 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14598   if test $ol_cv_func_inet_aton != no; then
14599     cat >> confdefs.h <<\EOF
14600 #define HAVE_INET_ATON 1
14601 EOF
14602
14603   fi
14604  
14605
14606 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14607 echo "configure:14608: checking for _spawnlp" >&5
14608 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14609   echo $ac_n "(cached) $ac_c" 1>&6
14610 else
14611   cat > conftest.$ac_ext <<EOF
14612 #line 14613 "configure"
14613 #include "confdefs.h"
14614 /* System header to define __stub macros and hopefully few prototypes,
14615     which can conflict with char _spawnlp(); below.  */
14616 #include <assert.h>
14617 /* Override any gcc2 internal prototype to avoid an error.  */
14618 /* We use char because int might match the return type of a gcc2
14619     builtin and then its argument prototype would still apply.  */
14620 char _spawnlp();
14621 char (*f)();
14622
14623 int main() {
14624
14625 /* The GNU C library defines this for functions which it implements
14626     to always fail with ENOSYS.  Some functions are actually named
14627     something starting with __ and the normal name is an alias.  */
14628 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14629 choke me
14630 #else
14631 f = _spawnlp;
14632 #endif
14633
14634 ; return 0; }
14635 EOF
14636 if { (eval echo configure:14637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14637   rm -rf conftest*
14638   eval "ac_cv_func__spawnlp=yes"
14639 else
14640   echo "configure: failed program was:" >&5
14641   cat conftest.$ac_ext >&5
14642   rm -rf conftest*
14643   eval "ac_cv_func__spawnlp=no"
14644 fi
14645 rm -f conftest*
14646 fi
14647
14648 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14649   echo "$ac_t""yes" 1>&6
14650   cat >> confdefs.h <<\EOF
14651 #define HAVE_SPAWNLP 1
14652 EOF
14653
14654 else
14655   echo "$ac_t""no" 1>&6
14656 fi
14657
14658
14659 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14660 echo "configure:14661: checking for _snprintf" >&5
14661 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14662   echo $ac_n "(cached) $ac_c" 1>&6
14663 else
14664   cat > conftest.$ac_ext <<EOF
14665 #line 14666 "configure"
14666 #include "confdefs.h"
14667 /* System header to define __stub macros and hopefully few prototypes,
14668     which can conflict with char _snprintf(); below.  */
14669 #include <assert.h>
14670 /* Override any gcc2 internal prototype to avoid an error.  */
14671 /* We use char because int might match the return type of a gcc2
14672     builtin and then its argument prototype would still apply.  */
14673 char _snprintf();
14674 char (*f)();
14675
14676 int main() {
14677
14678 /* The GNU C library defines this for functions which it implements
14679     to always fail with ENOSYS.  Some functions are actually named
14680     something starting with __ and the normal name is an alias.  */
14681 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14682 choke me
14683 #else
14684 f = _snprintf;
14685 #endif
14686
14687 ; return 0; }
14688 EOF
14689 if { (eval echo configure:14690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14690   rm -rf conftest*
14691   eval "ac_cv_func__snprintf=yes"
14692 else
14693   echo "configure: failed program was:" >&5
14694   cat conftest.$ac_ext >&5
14695   rm -rf conftest*
14696   eval "ac_cv_func__snprintf=no"
14697 fi
14698 rm -f conftest*
14699 fi
14700
14701 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14702   echo "$ac_t""yes" 1>&6
14703   ac_cv_func_snprintf=yes
14704         cat >> confdefs.h <<\EOF
14705 #define snprintf _snprintf
14706 EOF
14707
14708
14709 else
14710   echo "$ac_t""no" 1>&6
14711 fi
14712
14713
14714 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14715 echo "configure:14716: checking for _vsnprintf" >&5
14716 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14717   echo $ac_n "(cached) $ac_c" 1>&6
14718 else
14719   cat > conftest.$ac_ext <<EOF
14720 #line 14721 "configure"
14721 #include "confdefs.h"
14722 /* System header to define __stub macros and hopefully few prototypes,
14723     which can conflict with char _vsnprintf(); below.  */
14724 #include <assert.h>
14725 /* Override any gcc2 internal prototype to avoid an error.  */
14726 /* We use char because int might match the return type of a gcc2
14727     builtin and then its argument prototype would still apply.  */
14728 char _vsnprintf();
14729 char (*f)();
14730
14731 int main() {
14732
14733 /* The GNU C library defines this for functions which it implements
14734     to always fail with ENOSYS.  Some functions are actually named
14735     something starting with __ and the normal name is an alias.  */
14736 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14737 choke me
14738 #else
14739 f = _vsnprintf;
14740 #endif
14741
14742 ; return 0; }
14743 EOF
14744 if { (eval echo configure:14745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14745   rm -rf conftest*
14746   eval "ac_cv_func__vsnprintf=yes"
14747 else
14748   echo "configure: failed program was:" >&5
14749   cat conftest.$ac_ext >&5
14750   rm -rf conftest*
14751   eval "ac_cv_func__vsnprintf=no"
14752 fi
14753 rm -f conftest*
14754 fi
14755
14756 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14757   echo "$ac_t""yes" 1>&6
14758   ac_cv_func_vsnprintf=yes
14759         cat >> confdefs.h <<\EOF
14760 #define vsnprintf _vsnprintf
14761 EOF
14762
14763
14764 else
14765   echo "$ac_t""no" 1>&6
14766 fi
14767
14768
14769 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14770 echo "configure:14771: checking for vprintf" >&5
14771 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14772   echo $ac_n "(cached) $ac_c" 1>&6
14773 else
14774   cat > conftest.$ac_ext <<EOF
14775 #line 14776 "configure"
14776 #include "confdefs.h"
14777 /* System header to define __stub macros and hopefully few prototypes,
14778     which can conflict with char vprintf(); below.  */
14779 #include <assert.h>
14780 /* Override any gcc2 internal prototype to avoid an error.  */
14781 /* We use char because int might match the return type of a gcc2
14782     builtin and then its argument prototype would still apply.  */
14783 char vprintf();
14784 char (*f)();
14785
14786 int main() {
14787
14788 /* The GNU C library defines this for functions which it implements
14789     to always fail with ENOSYS.  Some functions are actually named
14790     something starting with __ and the normal name is an alias.  */
14791 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14792 choke me
14793 #else
14794 f = vprintf;
14795 #endif
14796
14797 ; return 0; }
14798 EOF
14799 if { (eval echo configure:14800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14800   rm -rf conftest*
14801   eval "ac_cv_func_vprintf=yes"
14802 else
14803   echo "configure: failed program was:" >&5
14804   cat conftest.$ac_ext >&5
14805   rm -rf conftest*
14806   eval "ac_cv_func_vprintf=no"
14807 fi
14808 rm -f conftest*
14809 fi
14810
14811 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14812   echo "$ac_t""yes" 1>&6
14813   cat >> confdefs.h <<\EOF
14814 #define HAVE_VPRINTF 1
14815 EOF
14816
14817 else
14818   echo "$ac_t""no" 1>&6
14819 fi
14820
14821 if test "$ac_cv_func_vprintf" != yes; then
14822 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14823 echo "configure:14824: checking for _doprnt" >&5
14824 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14825   echo $ac_n "(cached) $ac_c" 1>&6
14826 else
14827   cat > conftest.$ac_ext <<EOF
14828 #line 14829 "configure"
14829 #include "confdefs.h"
14830 /* System header to define __stub macros and hopefully few prototypes,
14831     which can conflict with char _doprnt(); below.  */
14832 #include <assert.h>
14833 /* Override any gcc2 internal prototype to avoid an error.  */
14834 /* We use char because int might match the return type of a gcc2
14835     builtin and then its argument prototype would still apply.  */
14836 char _doprnt();
14837 char (*f)();
14838
14839 int main() {
14840
14841 /* The GNU C library defines this for functions which it implements
14842     to always fail with ENOSYS.  Some functions are actually named
14843     something starting with __ and the normal name is an alias.  */
14844 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14845 choke me
14846 #else
14847 f = _doprnt;
14848 #endif
14849
14850 ; return 0; }
14851 EOF
14852 if { (eval echo configure:14853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14853   rm -rf conftest*
14854   eval "ac_cv_func__doprnt=yes"
14855 else
14856   echo "configure: failed program was:" >&5
14857   cat conftest.$ac_ext >&5
14858   rm -rf conftest*
14859   eval "ac_cv_func__doprnt=no"
14860 fi
14861 rm -f conftest*
14862 fi
14863
14864 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14865   echo "$ac_t""yes" 1>&6
14866   cat >> confdefs.h <<\EOF
14867 #define HAVE_DOPRNT 1
14868 EOF
14869
14870 else
14871   echo "$ac_t""no" 1>&6
14872 fi
14873
14874 fi
14875
14876
14877 if test $ac_cv_func_vprintf = yes ; then
14878                 for ac_func in vsnprintf vsprintf
14879 do
14880 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14881 echo "configure:14882: checking for $ac_func" >&5
14882 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14883   echo $ac_n "(cached) $ac_c" 1>&6
14884 else
14885   cat > conftest.$ac_ext <<EOF
14886 #line 14887 "configure"
14887 #include "confdefs.h"
14888 /* System header to define __stub macros and hopefully few prototypes,
14889     which can conflict with char $ac_func(); below.  */
14890 #include <assert.h>
14891 /* Override any gcc2 internal prototype to avoid an error.  */
14892 /* We use char because int might match the return type of a gcc2
14893     builtin and then its argument prototype would still apply.  */
14894 char $ac_func();
14895 char (*f)();
14896
14897 int main() {
14898
14899 /* The GNU C library defines this for functions which it implements
14900     to always fail with ENOSYS.  Some functions are actually named
14901     something starting with __ and the normal name is an alias.  */
14902 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14903 choke me
14904 #else
14905 f = $ac_func;
14906 #endif
14907
14908 ; return 0; }
14909 EOF
14910 if { (eval echo configure:14911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14911   rm -rf conftest*
14912   eval "ac_cv_func_$ac_func=yes"
14913 else
14914   echo "configure: failed program was:" >&5
14915   cat conftest.$ac_ext >&5
14916   rm -rf conftest*
14917   eval "ac_cv_func_$ac_func=no"
14918 fi
14919 rm -f conftest*
14920 fi
14921
14922 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14923   echo "$ac_t""yes" 1>&6
14924     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14925   cat >> confdefs.h <<EOF
14926 #define $ac_tr_func 1
14927 EOF
14928  
14929 else
14930   echo "$ac_t""no" 1>&6
14931 fi
14932 done
14933
14934 fi
14935
14936 for ac_func in \
14937         bcopy                   \
14938         closesocket             \
14939         endgrent                \
14940         endpwent                \
14941         flock                   \
14942         getdtablesize   \
14943         getgrgid                \
14944         gethostname             \
14945         getpass                 \
14946         getpwuid                \
14947         getpwnam                \
14948         getspnam                \
14949         gettimeofday    \
14950         initgroups              \
14951         lockf                   \
14952         memcpy                  \
14953         memmove                 \
14954         mkstemp                 \
14955         pipe                    \
14956         read                    \
14957         recv                    \
14958         recvfrom                \
14959         setpwfile               \
14960         setgid                  \
14961         setegid                 \
14962         setsid                  \
14963         setuid                  \
14964         seteuid                 \
14965         sigaction               \
14966         signal                  \
14967         sigset                  \
14968         snprintf                \
14969         strdup                  \
14970         strerror                \
14971         strpbrk                 \
14972         strrchr                 \
14973         strsep                  \
14974         strstr                  \
14975         strtol                  \
14976         strtoul                 \
14977         strspn                  \
14978         sysconf                 \
14979         waitpid                 \
14980         wait4                   \
14981         write                   \
14982         send                    \
14983         sendto                  \
14984
14985 do
14986 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14987 echo "configure:14988: checking for $ac_func" >&5
14988 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14989   echo $ac_n "(cached) $ac_c" 1>&6
14990 else
14991   cat > conftest.$ac_ext <<EOF
14992 #line 14993 "configure"
14993 #include "confdefs.h"
14994 /* System header to define __stub macros and hopefully few prototypes,
14995     which can conflict with char $ac_func(); below.  */
14996 #include <assert.h>
14997 /* Override any gcc2 internal prototype to avoid an error.  */
14998 /* We use char because int might match the return type of a gcc2
14999     builtin and then its argument prototype would still apply.  */
15000 char $ac_func();
15001 char (*f)();
15002
15003 int main() {
15004
15005 /* The GNU C library defines this for functions which it implements
15006     to always fail with ENOSYS.  Some functions are actually named
15007     something starting with __ and the normal name is an alias.  */
15008 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15009 choke me
15010 #else
15011 f = $ac_func;
15012 #endif
15013
15014 ; return 0; }
15015 EOF
15016 if { (eval echo configure:15017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15017   rm -rf conftest*
15018   eval "ac_cv_func_$ac_func=yes"
15019 else
15020   echo "configure: failed program was:" >&5
15021   cat conftest.$ac_ext >&5
15022   rm -rf conftest*
15023   eval "ac_cv_func_$ac_func=no"
15024 fi
15025 rm -f conftest*
15026 fi
15027
15028 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15029   echo "$ac_t""yes" 1>&6
15030     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15031   cat >> confdefs.h <<EOF
15032 #define $ac_tr_func 1
15033 EOF
15034  
15035 else
15036   echo "$ac_t""no" 1>&6
15037 fi
15038 done
15039
15040
15041 for ac_func in getopt tempnam
15042 do
15043 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15044 echo "configure:15045: checking for $ac_func" >&5
15045 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15046   echo $ac_n "(cached) $ac_c" 1>&6
15047 else
15048   cat > conftest.$ac_ext <<EOF
15049 #line 15050 "configure"
15050 #include "confdefs.h"
15051 /* System header to define __stub macros and hopefully few prototypes,
15052     which can conflict with char $ac_func(); below.  */
15053 #include <assert.h>
15054 /* Override any gcc2 internal prototype to avoid an error.  */
15055 /* We use char because int might match the return type of a gcc2
15056     builtin and then its argument prototype would still apply.  */
15057 char $ac_func();
15058 char (*f)();
15059
15060 int main() {
15061
15062 /* The GNU C library defines this for functions which it implements
15063     to always fail with ENOSYS.  Some functions are actually named
15064     something starting with __ and the normal name is an alias.  */
15065 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15066 choke me
15067 #else
15068 f = $ac_func;
15069 #endif
15070
15071 ; return 0; }
15072 EOF
15073 if { (eval echo configure:15074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15074   rm -rf conftest*
15075   eval "ac_cv_func_$ac_func=yes"
15076 else
15077   echo "configure: failed program was:" >&5
15078   cat conftest.$ac_ext >&5
15079   rm -rf conftest*
15080   eval "ac_cv_func_$ac_func=no"
15081 fi
15082 rm -f conftest*
15083 fi
15084
15085 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15086   echo "$ac_t""yes" 1>&6
15087     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15088   cat >> confdefs.h <<EOF
15089 #define $ac_tr_func 1
15090 EOF
15091  
15092 else
15093   echo "$ac_t""no" 1>&6
15094 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15095 fi
15096 done
15097
15098
15099
15100 if test "$ac_cv_func_getopt" != yes; then
15101     LIBSRCS="$LIBSRCS getopt.c"
15102 fi
15103
15104 if test "$ac_cv_func_tempnam" != yes; then
15105     LIBSRCS="$LIBSRCS tempnam.c"
15106 fi
15107
15108 # Check Configuration
15109 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15110 echo "configure:15111: checking declaration of sys_errlist" >&5
15111 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15112   echo $ac_n "(cached) $ac_c" 1>&6
15113 else
15114   
15115         cat > conftest.$ac_ext <<EOF
15116 #line 15117 "configure"
15117 #include "confdefs.h"
15118
15119 #include <stdio.h>
15120 #include <sys/types.h>
15121 #include <errno.h>
15122 #ifdef WINNT
15123 #include <stdlib.h>
15124 #endif 
15125 int main() {
15126 char *c = (char *) *sys_errlist
15127 ; return 0; }
15128 EOF
15129 if { (eval echo configure:15130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15130   rm -rf conftest*
15131   ol_cv_dcl_sys_errlist=yes
15132         ol_cv_have_sys_errlist=yes
15133 else
15134   echo "configure: failed program was:" >&5
15135   cat conftest.$ac_ext >&5
15136   rm -rf conftest*
15137   ol_cv_dcl_sys_errlist=no
15138 fi
15139 rm -f conftest*
15140 fi
15141
15142 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15143 #
15144 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15145 if test $ol_cv_dcl_sys_errlist = no ; then
15146         cat >> confdefs.h <<\EOF
15147 #define DECL_SYS_ERRLIST 1
15148 EOF
15149
15150
15151         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15152 echo "configure:15153: checking existence of sys_errlist" >&5
15153 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15154   echo $ac_n "(cached) $ac_c" 1>&6
15155 else
15156   
15157                 cat > conftest.$ac_ext <<EOF
15158 #line 15159 "configure"
15159 #include "confdefs.h"
15160 #include <errno.h>
15161 int main() {
15162 char *c = (char *) *sys_errlist
15163 ; return 0; }
15164 EOF
15165 if { (eval echo configure:15166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15166   rm -rf conftest*
15167   ol_cv_have_sys_errlist=yes
15168 else
15169   echo "configure: failed program was:" >&5
15170   cat conftest.$ac_ext >&5
15171   rm -rf conftest*
15172   ol_cv_have_sys_errlist=no
15173 fi
15174 rm -f conftest*
15175 fi
15176
15177 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15178 fi
15179 if test $ol_cv_have_sys_errlist = yes ; then
15180         cat >> confdefs.h <<\EOF
15181 #define HAVE_SYS_ERRLIST 1
15182 EOF
15183
15184 fi
15185
15186
15187
15188 if test "$ol_enable_debug" != no ; then
15189         cat >> confdefs.h <<\EOF
15190 #define LDAP_DEBUG 1
15191 EOF
15192
15193 fi
15194 if test "$ol_enable_syslog" = yes ; then
15195         cat >> confdefs.h <<\EOF
15196 #define LDAP_SYSLOG 1
15197 EOF
15198
15199 fi
15200 if test "$ol_enable_libui" = yes ; then
15201         cat >> confdefs.h <<\EOF
15202 #define LDAP_LIBUI 1
15203 EOF
15204
15205 fi
15206 if test "$ol_enable_cache" = no ; then
15207         cat >> confdefs.h <<\EOF
15208 #define LDAP_NOCACHE 1
15209 EOF
15210
15211 fi
15212 if test "$ol_link_kbind" != no ; then
15213         cat >> confdefs.h <<\EOF
15214 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15215 EOF
15216
15217 fi
15218 if test "$ol_enable_dns" != no ; then
15219         cat >> confdefs.h <<\EOF
15220 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
15221 EOF
15222
15223 fi
15224 if test "$ol_enable_proctitle" != no ; then
15225         cat >> confdefs.h <<\EOF
15226 #define LDAP_PROCTITLE 1
15227 EOF
15228
15229 fi
15230 if test "$ol_enable_referrals" != no ; then
15231         cat >> confdefs.h <<\EOF
15232 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15233 EOF
15234
15235 fi
15236 if test "$ol_enable_cldap" != no ; then
15237         cat >> confdefs.h <<\EOF
15238 #define LDAP_CONNECTIONLESS 1
15239 EOF
15240
15241 fi
15242 if test "$ol_enable_ldapi" != no; then
15243         cat >> confdefs.h <<\EOF
15244 #define USE_PF_LOCAL 1
15245 EOF
15246
15247 fi
15248
15249 if test "$ol_enable_cleartext" != no ; then
15250         cat >> confdefs.h <<\EOF
15251 #define SLAPD_CLEARTEXT 1
15252 EOF
15253
15254 fi
15255 if test "$ol_enable_crypt" != no ; then
15256         cat >> confdefs.h <<\EOF
15257 #define SLAPD_CRYPT 1
15258 EOF
15259
15260 fi
15261 if test "$ol_link_kpasswd" != no ; then
15262         cat >> confdefs.h <<\EOF
15263 #define SLAPD_KPASSWD 1
15264 EOF
15265
15266 fi
15267 if test "$ol_enable_multimaster" != no ; then
15268         cat >> confdefs.h <<\EOF
15269 #define SLAPD_MULTIMASTER 1
15270 EOF
15271
15272 fi
15273 if test "$ol_enable_phonetic" != no ; then
15274         cat >> confdefs.h <<\EOF
15275 #define SLAPD_PHONETIC 1
15276 EOF
15277
15278 fi
15279 if test "$ol_enable_rlookups" != no ; then
15280         cat >> confdefs.h <<\EOF
15281 #define SLAPD_RLOOKUPS 1
15282 EOF
15283
15284 fi
15285 if test "$ol_enable_aci" != no ; then
15286         cat >> confdefs.h <<\EOF
15287 #define SLAPD_ACI_ENABLED 1
15288 EOF
15289
15290 fi
15291
15292 if test "$ol_link_modules" != no ; then
15293         cat >> confdefs.h <<\EOF
15294 #define SLAPD_MODULES 1
15295 EOF
15296
15297         BUILD_SLAPD=yes
15298         SLAPD_MODULES_LDFLAGS="-dlopen self"
15299 fi
15300
15301 if test "$ol_link_bdb2" != no ; then
15302         cat >> confdefs.h <<\EOF
15303 #define SLAPD_BDB2 1
15304 EOF
15305
15306         BUILD_SLAPD=yes
15307         BUILD_BDB2=yes
15308         if test "$ol_with_bdb2_module" != static ; then
15309                 cat >> confdefs.h <<\EOF
15310 #define SLAPD_BDB2_DYNAMIC 1
15311 EOF
15312
15313                 BUILD_BDB2=mod
15314                 BUILD_BDB2_DYNAMIC=shared
15315                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15316         fi
15317 fi
15318
15319 if test "$ol_enable_ldap" != no ; then
15320         cat >> confdefs.h <<\EOF
15321 #define SLAPD_LDAP 1
15322 EOF
15323
15324         BUILD_SLAPD=yes
15325         BUILD_LDAP=yes
15326         if test "$ol_with_ldap_module" != static ; then
15327                 cat >> confdefs.h <<\EOF
15328 #define SLAPD_LDAP_DYNAMIC 1
15329 EOF
15330
15331                 BUILD_LDAP=mod
15332                 BUILD_LDAP_DYNAMIC=shared
15333                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15334         fi
15335 fi
15336
15337 if test "$ol_link_ldbm" != no ; then
15338         cat >> confdefs.h <<\EOF
15339 #define SLAPD_LDBM 1
15340 EOF
15341
15342         BUILD_SLAPD=yes
15343         BUILD_LDBM=yes
15344         if test "$ol_with_ldbm_module" != static ; then
15345                 cat >> confdefs.h <<\EOF
15346 #define SLAPD_LDBM_DYNAMIC 1
15347 EOF
15348
15349                 BUILD_LDBM=mod
15350                 BUILD_LDBM_DYNAMIC=shared
15351                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15352         fi
15353 fi
15354
15355 if test "$ol_enable_passwd" != no ; then
15356         cat >> confdefs.h <<\EOF
15357 #define SLAPD_PASSWD 1
15358 EOF
15359
15360         BUILD_SLAPD=yes
15361         BUILD_PASSWD=yes
15362         if test "$ol_with_passwd_module" != static ; then
15363                 cat >> confdefs.h <<\EOF
15364 #define SLAPD_PASSWD_DYNAMIC 1
15365 EOF
15366
15367                 BUILD_PASSWD=mod
15368                 BUILD_PASSWD_DYNAMIC=shared
15369                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15370         fi
15371 fi
15372
15373 if test "$ol_link_perl" != no ; then
15374         cat >> confdefs.h <<\EOF
15375 #define SLAPD_PERL 1
15376 EOF
15377
15378         BUILD_SLAPD=yes
15379         BUILD_PERL=yes
15380         if test "$ol_with_perl_module" != static ; then
15381                 cat >> confdefs.h <<\EOF
15382 #define SLAPD_PERL_DYNAMIC 1
15383 EOF
15384
15385                 BUILD_PERL=mod
15386                 BUILD_PERL_DYNAMIC=shared
15387                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15388         fi
15389 fi
15390
15391 if test "$ol_enable_shell" != no ; then
15392         cat >> confdefs.h <<\EOF
15393 #define SLAPD_SHELL 1
15394 EOF
15395
15396         BUILD_SLAPD=yes
15397         BUILD_SHELL=yes
15398         if test "$ol_with_shell_module" != static ; then
15399                 cat >> confdefs.h <<\EOF
15400 #define SLAPD_SHELL_DYNAMIC 1
15401 EOF
15402
15403                 BUILD_SHELL=mod
15404                 BUILD_SHELL_DYNAMIC=shared
15405                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15406         fi
15407 fi
15408
15409 if test "$ol_enable_tcl" != no ; then
15410         cat >> confdefs.h <<\EOF
15411 #define SLAPD_TCL 1
15412 EOF
15413
15414         BUILD_SLAPD=yes
15415         BUILD_TCL=yes
15416         if test "$ol_with_tcl_module" != static; then
15417                 cat >> confdefs.h <<\EOF
15418 #define SLAPD_TCL_DYNAMIC 1
15419 EOF
15420
15421                 BUILD_TCL=mod
15422                 BUILD_TCL_DYNAMIC=shared
15423                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15424         fi
15425 fi
15426
15427 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15428         $BUILD_SLAPD = yes ; then
15429         BUILD_SLURPD=yes
15430 fi
15431
15432 if test "$ol_link_isode" != no ; then
15433         BUILD_LDAPD=yes
15434 fi
15435
15436
15437 if test "$LINK_BINS_DYNAMIC" = yes; then
15438     LIB_LINKAGE=DYN
15439     LT_LIB_LINKAGE=shared
15440 else
15441     LIB_LINKAGE=STAT
15442     LT_LIB_LINKAGE=static
15443 fi
15444
15445 if test "$ac_cv_mingw32" = yes ; then
15446     PLAT=NT
15447     DYN_EXT=dll
15448 else
15449     PLAT=UNIX
15450     DYN_EXT=so
15451 fi
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462   
15463   
15464   
15465   
15466   
15467   
15468   
15469   
15470   
15471   
15472   
15473   
15474   
15475   
15476   
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508 trap '' 1 2 15
15509
15510 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15511
15512 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15513 # Let make expand exec_prefix.
15514 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15515
15516 # Any assignment to VPATH causes Sun make to only execute
15517 # the first set of double-colon rules, so remove it if not needed.
15518 # If there is a colon in the path, we need to keep it.
15519 if test "x$srcdir" = x.; then
15520   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15521 fi
15522
15523 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15524
15525 DEFS=-DHAVE_CONFIG_H
15526
15527 # Without the "./", some shells look in PATH for config.status.
15528 : ${CONFIG_STATUS=./config.status}
15529
15530 echo creating $CONFIG_STATUS
15531 rm -f $CONFIG_STATUS
15532 cat > $CONFIG_STATUS <<EOF
15533 #! /bin/sh
15534 # Generated automatically by configure.
15535 # Run this file to recreate the current configuration.
15536 # This directory was configured as follows,
15537 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15538 #
15539 # $0 $ac_configure_args
15540 #
15541 # Compiler output produced by configure, useful for debugging
15542 # configure, is in ./config.log if it exists.
15543
15544 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15545 for ac_option
15546 do
15547   case "\$ac_option" in
15548   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15549     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15550     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15551   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15552     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15553     exit 0 ;;
15554   -help | --help | --hel | --he | --h)
15555     echo "\$ac_cs_usage"; exit 0 ;;
15556   *) echo "\$ac_cs_usage"; exit 1 ;;
15557   esac
15558 done
15559
15560 ac_given_srcdir=$srcdir
15561 ac_given_INSTALL="$INSTALL"
15562
15563 trap 'rm -fr `echo "\
15564 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15565 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15566 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15567 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15568 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15569 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15570 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15571 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15572 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15573 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15574 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15575 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15576 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15577 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15578 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15579 include/Makefile:build/top.mk:include/Makefile.in \
15580 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15581 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15582 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15583 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15584 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15585 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15586 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15587 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15588 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15589 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15590 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15591 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15592 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15593 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15594 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15595 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15596 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15597 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15598 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15599 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15600 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15601 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15602 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15603 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15604 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15605 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15606 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15607  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15608 EOF
15609 cat >> $CONFIG_STATUS <<EOF
15610
15611 # Protect against being on the right side of a sed subst in config.status.
15612 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15613  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15614 $ac_vpsub
15615 $extrasub
15616 s%@SHELL@%$SHELL%g
15617 s%@CFLAGS@%$CFLAGS%g
15618 s%@CPPFLAGS@%$CPPFLAGS%g
15619 s%@CXXFLAGS@%$CXXFLAGS%g
15620 s%@FFLAGS@%$FFLAGS%g
15621 s%@DEFS@%$DEFS%g
15622 s%@LDFLAGS@%$LDFLAGS%g
15623 s%@LIBS@%$LIBS%g
15624 s%@exec_prefix@%$exec_prefix%g
15625 s%@prefix@%$prefix%g
15626 s%@program_transform_name@%$program_transform_name%g
15627 s%@bindir@%$bindir%g
15628 s%@sbindir@%$sbindir%g
15629 s%@libexecdir@%$libexecdir%g
15630 s%@datadir@%$datadir%g
15631 s%@sysconfdir@%$sysconfdir%g
15632 s%@sharedstatedir@%$sharedstatedir%g
15633 s%@localstatedir@%$localstatedir%g
15634 s%@libdir@%$libdir%g
15635 s%@includedir@%$includedir%g
15636 s%@oldincludedir@%$oldincludedir%g
15637 s%@infodir@%$infodir%g
15638 s%@mandir@%$mandir%g
15639 s%@host@%$host%g
15640 s%@host_alias@%$host_alias%g
15641 s%@host_cpu@%$host_cpu%g
15642 s%@host_vendor@%$host_vendor%g
15643 s%@host_os@%$host_os%g
15644 s%@target@%$target%g
15645 s%@target_alias@%$target_alias%g
15646 s%@target_cpu@%$target_cpu%g
15647 s%@target_vendor@%$target_vendor%g
15648 s%@target_os@%$target_os%g
15649 s%@build@%$build%g
15650 s%@build_alias@%$build_alias%g
15651 s%@build_cpu@%$build_cpu%g
15652 s%@build_vendor@%$build_vendor%g
15653 s%@build_os@%$build_os%g
15654 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15655 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15656 s%@INSTALL_DATA@%$INSTALL_DATA%g
15657 s%@PACKAGE@%$PACKAGE%g
15658 s%@VERSION@%$VERSION%g
15659 s%@ACLOCAL@%$ACLOCAL%g
15660 s%@AUTOCONF@%$AUTOCONF%g
15661 s%@AUTOMAKE@%$AUTOMAKE%g
15662 s%@AUTOHEADER@%$AUTOHEADER%g
15663 s%@MAKEINFO@%$MAKEINFO%g
15664 s%@install_sh@%$install_sh%g
15665 s%@AMTAR@%$AMTAR%g
15666 s%@AWK@%$AWK%g
15667 s%@AMTARFLAGS@%$AMTARFLAGS%g
15668 s%@SET_MAKE@%$SET_MAKE%g
15669 s%@top_builddir@%$top_builddir%g
15670 s%@ldap_subdir@%$ldap_subdir%g
15671 s%@CC@%$CC%g
15672 s%@RANLIB@%$RANLIB%g
15673 s%@LD@%$LD%g
15674 s%@NM@%$NM%g
15675 s%@LN_S@%$LN_S%g
15676 s%@DLLTOOL@%$DLLTOOL%g
15677 s%@AS@%$AS%g
15678 s%@OBJDUMP@%$OBJDUMP%g
15679 s%@LIBTOOL@%$LIBTOOL%g
15680 s%@LN_H@%$LN_H%g
15681 s%@SENDMAIL@%$SENDMAIL%g
15682 s%@EDITOR@%$EDITOR%g
15683 s%@FINGER@%$FINGER%g
15684 s%@PERLBIN@%$PERLBIN%g
15685 s%@CPP@%$CPP%g
15686 s%@EXEEXT@%$EXEEXT%g
15687 s%@OBJEXT@%$OBJEXT%g
15688 s%@OL_MKDEP@%$OL_MKDEP%g
15689 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15690 s%@PEPSY@%$PEPSY%g
15691 s%@LIBOBJS@%$LIBOBJS%g
15692 s%@LIBSRCS@%$LIBSRCS%g
15693 s%@PLAT@%$PLAT%g
15694 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15695 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15696 s%@DYN_EXT@%$DYN_EXT%g
15697 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15698 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15699 s%@BUILD_BDB2@%$BUILD_BDB2%g
15700 s%@BUILD_LDAP@%$BUILD_LDAP%g
15701 s%@BUILD_LDBM@%$BUILD_LDBM%g
15702 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15703 s%@BUILD_PERL@%$BUILD_PERL%g
15704 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15705 s%@BUILD_SHELL@%$BUILD_SHELL%g
15706 s%@BUILD_TCL@%$BUILD_TCL%g
15707 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15708 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15709 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15710 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15711 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15712 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15713 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15714 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15715 s%@LDAP_LIBS@%$LDAP_LIBS%g
15716 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15717 s%@LDIF_LIBS@%$LDIF_LIBS%g
15718 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15719 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15720 s%@LDBM_LIBS@%$LDBM_LIBS%g
15721 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15722 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15723 s%@WRAP_LIBS@%$WRAP_LIBS%g
15724 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15725 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15726 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15727 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15728 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15729 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15730 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15731 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15732 s%@KRB4_LIBS@%$KRB4_LIBS%g
15733 s%@KRB5_LIBS@%$KRB5_LIBS%g
15734 s%@READLINE_LIBS@%$READLINE_LIBS%g
15735 s%@SASL_LIBS@%$SASL_LIBS%g
15736 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15737 s%@TLS_LIBS@%$TLS_LIBS%g
15738 s%@MODULES_LIBS@%$MODULES_LIBS%g
15739
15740 CEOF
15741 EOF
15742
15743 cat >> $CONFIG_STATUS <<\EOF
15744
15745 # Split the substitutions into bite-sized pieces for seds with
15746 # small command number limits, like on Digital OSF/1 and HP-UX.
15747 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15748 ac_file=1 # Number of current file.
15749 ac_beg=1 # First line for current file.
15750 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15751 ac_more_lines=:
15752 ac_sed_cmds=""
15753 while $ac_more_lines; do
15754   if test $ac_beg -gt 1; then
15755     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15756   else
15757     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15758   fi
15759   if test ! -s conftest.s$ac_file; then
15760     ac_more_lines=false
15761     rm -f conftest.s$ac_file
15762   else
15763     if test -z "$ac_sed_cmds"; then
15764       ac_sed_cmds="sed -f conftest.s$ac_file"
15765     else
15766       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15767     fi
15768     ac_file=`expr $ac_file + 1`
15769     ac_beg=$ac_end
15770     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15771   fi
15772 done
15773 if test -z "$ac_sed_cmds"; then
15774   ac_sed_cmds=cat
15775 fi
15776 EOF
15777
15778 cat >> $CONFIG_STATUS <<EOF
15779
15780 CONFIG_FILES=\${CONFIG_FILES-"\
15781 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15782 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15783 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15784 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15785 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15786 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15787 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15788 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15789 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15790 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15791 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15792 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15793 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15794 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15795 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15796 include/Makefile:build/top.mk:include/Makefile.in \
15797 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15798 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15799 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15800 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15801 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15802 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15803 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15804 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15805 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15806 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15807 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15808 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15809 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15810 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15811 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15812 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15813 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15814 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15815 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15816 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15817 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15818 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15819 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15820 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15821 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15822 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15823 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15824 "}
15825 EOF
15826 cat >> $CONFIG_STATUS <<\EOF
15827 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15828   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15829   case "$ac_file" in
15830   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15831        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15832   *) ac_file_in="${ac_file}.in" ;;
15833   esac
15834
15835   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15836
15837   # Remove last slash and all that follows it.  Not all systems have dirname.
15838   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15839   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15840     # The file is in a subdirectory.
15841     test ! -d "$ac_dir" && mkdir "$ac_dir"
15842     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15843     # A "../" for each directory in $ac_dir_suffix.
15844     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15845   else
15846     ac_dir_suffix= ac_dots=
15847   fi
15848
15849   case "$ac_given_srcdir" in
15850   .)  srcdir=.
15851       if test -z "$ac_dots"; then top_srcdir=.
15852       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15853   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15854   *) # Relative path.
15855     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15856     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15857   esac
15858
15859   case "$ac_given_INSTALL" in
15860   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15861   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15862   esac
15863
15864   echo creating "$ac_file"
15865   rm -f "$ac_file"
15866   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15867   case "$ac_file" in
15868   *[Mm]akefile*) ac_comsub="1i\\
15869 # $configure_input" ;;
15870   *) ac_comsub= ;;
15871   esac
15872
15873   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15874   sed -e "$ac_comsub
15875 s%@configure_input@%$configure_input%g
15876 s%@srcdir@%$srcdir%g
15877 s%@top_srcdir@%$top_srcdir%g
15878 s%@INSTALL@%$INSTALL%g
15879 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15880 fi; done
15881 rm -f conftest.s*
15882
15883 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15884 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15885 #
15886 # ac_d sets the value in "#define NAME VALUE" lines.
15887 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15888 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15889 ac_dC='\3'
15890 ac_dD='%g'
15891 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15892 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15893 ac_uB='\([      ]\)%\1#\2define\3'
15894 ac_uC=' '
15895 ac_uD='\4%g'
15896 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15897 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15898 ac_eB='$%\1#\2define\3'
15899 ac_eC=' '
15900 ac_eD='%g'
15901
15902 if test "${CONFIG_HEADERS+set}" != set; then
15903 EOF
15904 cat >> $CONFIG_STATUS <<EOF
15905   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15906 EOF
15907 cat >> $CONFIG_STATUS <<\EOF
15908 fi
15909 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15910   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15911   case "$ac_file" in
15912   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15913        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15914   *) ac_file_in="${ac_file}.in" ;;
15915   esac
15916
15917   echo creating $ac_file
15918
15919   rm -f conftest.frag conftest.in conftest.out
15920   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15921   cat $ac_file_inputs > conftest.in
15922
15923 EOF
15924
15925 # Transform confdefs.h into a sed script conftest.vals that substitutes
15926 # the proper values into config.h.in to produce config.h.  And first:
15927 # Protect against being on the right side of a sed subst in config.status.
15928 # Protect against being in an unquoted here document in config.status.
15929 rm -f conftest.vals
15930 cat > conftest.hdr <<\EOF
15931 s/[\\&%]/\\&/g
15932 s%[\\$`]%\\&%g
15933 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15934 s%ac_d%ac_u%gp
15935 s%ac_u%ac_e%gp
15936 EOF
15937 sed -n -f conftest.hdr confdefs.h > conftest.vals
15938 rm -f conftest.hdr
15939
15940 # This sed command replaces #undef with comments.  This is necessary, for
15941 # example, in the case of _POSIX_SOURCE, which is predefined and required
15942 # on some systems where configure will not decide to define it.
15943 cat >> conftest.vals <<\EOF
15944 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15945 EOF
15946
15947 # Break up conftest.vals because some shells have a limit on
15948 # the size of here documents, and old seds have small limits too.
15949
15950 rm -f conftest.tail
15951 while :
15952 do
15953   ac_lines=`grep -c . conftest.vals`
15954   # grep -c gives empty output for an empty file on some AIX systems.
15955   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15956   # Write a limited-size here document to conftest.frag.
15957   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15958   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15959   echo 'CEOF
15960   sed -f conftest.frag conftest.in > conftest.out
15961   rm -f conftest.in
15962   mv conftest.out conftest.in
15963 ' >> $CONFIG_STATUS
15964   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15965   rm -f conftest.vals
15966   mv conftest.tail conftest.vals
15967 done
15968 rm -f conftest.vals
15969
15970 cat >> $CONFIG_STATUS <<\EOF
15971   rm -f conftest.frag conftest.h
15972   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15973   cat conftest.in >> conftest.h
15974   rm -f conftest.in
15975   if cmp -s $ac_file conftest.h 2>/dev/null; then
15976     echo "$ac_file is unchanged"
15977     rm -f conftest.h
15978   else
15979     # Remove last slash and all that follows it.  Not all systems have dirname.
15980       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15981       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15982       # The file is in a subdirectory.
15983       test ! -d "$ac_dir" && mkdir "$ac_dir"
15984     fi
15985     rm -f $ac_file
15986     mv conftest.h $ac_file
15987   fi
15988 fi; done
15989
15990 EOF
15991 cat >> $CONFIG_STATUS <<EOF
15992
15993 EOF
15994 cat >> $CONFIG_STATUS <<\EOF
15995
15996 date > stamp-h
15997 echo Please \"make depend\" to build dependencies
15998
15999 exit 0
16000 EOF
16001 chmod +x $CONFIG_STATUS
16002 rm -fr confdefs* $ac_clean_files
16003 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16004