]> git.sur5r.net Git - openldap/blob - configure
4e62974e29d044403fdbe0166a3032cf592a1092
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.292 2000/03/16 17:54:11 mit 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     --enable-sql        enable sql backend (no)"
129 ac_help="$ac_help
130       --with-sql-module module type (static)"
131 ac_help="$ac_help
132 SLURPD (Replication Daemon) Options:"
133 ac_help="$ac_help
134   --enable-slurpd       enable building slurpd (auto)"
135 ac_help="$ac_help
136 Library Generation & Linking Options"
137 ac_help="$ac_help
138   --enable-static[=PKGS]  build static libraries [default=yes]"
139 ac_help="$ac_help
140   --enable-shared[=PKGS]  build shared libraries [default=yes]"
141 ac_help="$ac_help
142   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
143 ac_help="$ac_help
144   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
145 ac_help="$ac_help
146   --disable-libtool-lock  avoid locking (might break parallel builds)"
147
148 # Initialize some variables set by options.
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 build=NONE
152 cache_file=./config.cache
153 exec_prefix=NONE
154 host=NONE
155 no_create=
156 nonopt=NONE
157 no_recursion=
158 prefix=NONE
159 program_prefix=NONE
160 program_suffix=NONE
161 program_transform_name=s,x,x,
162 silent=
163 site=
164 srcdir=
165 target=NONE
166 verbose=
167 x_includes=NONE
168 x_libraries=NONE
169 bindir='${exec_prefix}/bin'
170 sbindir='${exec_prefix}/sbin'
171 libexecdir='${exec_prefix}/libexec'
172 datadir='${prefix}/share'
173 sysconfdir='${prefix}/etc'
174 sharedstatedir='${prefix}/com'
175 localstatedir='${prefix}/var'
176 libdir='${exec_prefix}/lib'
177 includedir='${prefix}/include'
178 oldincludedir='/usr/include'
179 infodir='${prefix}/info'
180 mandir='${prefix}/man'
181
182 # Initialize some other variables.
183 subdirs=
184 MFLAGS= MAKEFLAGS=
185 SHELL=${CONFIG_SHELL-/bin/sh}
186 # Maximum number of lines to put in a shell here document.
187 ac_max_here_lines=12
188
189 ac_prev=
190 for ac_option
191 do
192
193   # If the previous option needs an argument, assign it.
194   if test -n "$ac_prev"; then
195     eval "$ac_prev=\$ac_option"
196     ac_prev=
197     continue
198   fi
199
200   case "$ac_option" in
201   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
202   *) ac_optarg= ;;
203   esac
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case "$ac_option" in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir="$ac_optarg" ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build="$ac_optarg" ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file="$ac_optarg" ;;
225
226   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
227     ac_prev=datadir ;;
228   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
229   | --da=*)
230     datadir="$ac_optarg" ;;
231
232   -disable-* | --disable-*)
233     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
234     # Reject names that are not valid shell variable names.
235     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
236       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
237     fi
238     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
239     eval "enable_${ac_feature}=no" ;;
240
241   -enable-* | --enable-*)
242     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
243     # Reject names that are not valid shell variable names.
244     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
245       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
246     fi
247     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
248     case "$ac_option" in
249       *=*) ;;
250       *) ac_optarg=yes ;;
251     esac
252     eval "enable_${ac_feature}='$ac_optarg'" ;;
253
254   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
255   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
256   | --exec | --exe | --ex)
257     ac_prev=exec_prefix ;;
258   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
259   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
260   | --exec=* | --exe=* | --ex=*)
261     exec_prefix="$ac_optarg" ;;
262
263   -gas | --gas | --ga | --g)
264     # Obsolete; use --with-gas.
265     with_gas=yes ;;
266
267   -help | --help | --hel | --he)
268     # Omit some internal or obsolete options to make the list less imposing.
269     # This message is too long to be a string in the A/UX 3.1 sh.
270     cat << EOF
271 Usage: configure [options] [host]
272 Options: [defaults in brackets after descriptions]
273 Configuration:
274   --cache-file=FILE       cache test results in FILE
275   --help                  print this message
276   --no-create             do not create output files
277   --quiet, --silent       do not print \`checking...' messages
278   --version               print the version of autoconf that created configure
279 Directory and file names:
280   --prefix=PREFIX         install architecture-independent files in PREFIX
281                           [$ac_default_prefix]
282   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
283                           [same as prefix]
284   --bindir=DIR            user executables in DIR [EPREFIX/bin]
285   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
286   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
287   --datadir=DIR           read-only architecture-independent data in DIR
288                           [PREFIX/share]
289   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
290   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
291                           [PREFIX/com]
292   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
293   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
294   --includedir=DIR        C header files in DIR [PREFIX/include]
295   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
296   --infodir=DIR           info documentation in DIR [PREFIX/info]
297   --mandir=DIR            man documentation in DIR [PREFIX/man]
298   --srcdir=DIR            find the sources in DIR [configure dir or ..]
299   --program-prefix=PREFIX prepend PREFIX to installed program names
300   --program-suffix=SUFFIX append SUFFIX to installed program names
301   --program-transform-name=PROGRAM
302                           run sed PROGRAM on installed program names
303 EOF
304     cat << EOF
305 Host type:
306   --build=BUILD           configure for building on BUILD [BUILD=HOST]
307   --host=HOST             configure for HOST [guessed]
308   --target=TARGET         configure for TARGET [TARGET=HOST]
309 Features and packages:
310   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
311   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
312   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
313   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
314   --x-includes=DIR        X include files are in DIR
315   --x-libraries=DIR       X library files are in DIR
316 EOF
317     if test -n "$ac_help"; then
318       echo "--enable and --with options recognized:$ac_help"
319     fi
320     exit 0 ;;
321
322   -host | --host | --hos | --ho)
323     ac_prev=host ;;
324   -host=* | --host=* | --hos=* | --ho=*)
325     host="$ac_optarg" ;;
326
327   -includedir | --includedir | --includedi | --included | --include \
328   | --includ | --inclu | --incl | --inc)
329     ac_prev=includedir ;;
330   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
331   | --includ=* | --inclu=* | --incl=* | --inc=*)
332     includedir="$ac_optarg" ;;
333
334   -infodir | --infodir | --infodi | --infod | --info | --inf)
335     ac_prev=infodir ;;
336   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
337     infodir="$ac_optarg" ;;
338
339   -libdir | --libdir | --libdi | --libd)
340     ac_prev=libdir ;;
341   -libdir=* | --libdir=* | --libdi=* | --libd=*)
342     libdir="$ac_optarg" ;;
343
344   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
345   | --libexe | --libex | --libe)
346     ac_prev=libexecdir ;;
347   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
348   | --libexe=* | --libex=* | --libe=*)
349     libexecdir="$ac_optarg" ;;
350
351   -localstatedir | --localstatedir | --localstatedi | --localstated \
352   | --localstate | --localstat | --localsta | --localst \
353   | --locals | --local | --loca | --loc | --lo)
354     ac_prev=localstatedir ;;
355   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
356   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
357   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
358     localstatedir="$ac_optarg" ;;
359
360   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
361     ac_prev=mandir ;;
362   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
363     mandir="$ac_optarg" ;;
364
365   -nfp | --nfp | --nf)
366     # Obsolete; use --without-fp.
367     with_fp=no ;;
368
369   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
370   | --no-cr | --no-c)
371     no_create=yes ;;
372
373   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
374   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
375     no_recursion=yes ;;
376
377   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
378   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
379   | --oldin | --oldi | --old | --ol | --o)
380     ac_prev=oldincludedir ;;
381   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
382   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
383   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
384     oldincludedir="$ac_optarg" ;;
385
386   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
387     ac_prev=prefix ;;
388   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
389     prefix="$ac_optarg" ;;
390
391   -program-prefix | --program-prefix | --program-prefi | --program-pref \
392   | --program-pre | --program-pr | --program-p)
393     ac_prev=program_prefix ;;
394   -program-prefix=* | --program-prefix=* | --program-prefi=* \
395   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
396     program_prefix="$ac_optarg" ;;
397
398   -program-suffix | --program-suffix | --program-suffi | --program-suff \
399   | --program-suf | --program-su | --program-s)
400     ac_prev=program_suffix ;;
401   -program-suffix=* | --program-suffix=* | --program-suffi=* \
402   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
403     program_suffix="$ac_optarg" ;;
404
405   -program-transform-name | --program-transform-name \
406   | --program-transform-nam | --program-transform-na \
407   | --program-transform-n | --program-transform- \
408   | --program-transform | --program-transfor \
409   | --program-transfo | --program-transf \
410   | --program-trans | --program-tran \
411   | --progr-tra | --program-tr | --program-t)
412     ac_prev=program_transform_name ;;
413   -program-transform-name=* | --program-transform-name=* \
414   | --program-transform-nam=* | --program-transform-na=* \
415   | --program-transform-n=* | --program-transform-=* \
416   | --program-transform=* | --program-transfor=* \
417   | --program-transfo=* | --program-transf=* \
418   | --program-trans=* | --program-tran=* \
419   | --progr-tra=* | --program-tr=* | --program-t=*)
420     program_transform_name="$ac_optarg" ;;
421
422   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
423   | -silent | --silent | --silen | --sile | --sil)
424     silent=yes ;;
425
426   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
427     ac_prev=sbindir ;;
428   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
429   | --sbi=* | --sb=*)
430     sbindir="$ac_optarg" ;;
431
432   -sharedstatedir | --sharedstatedir | --sharedstatedi \
433   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
434   | --sharedst | --shareds | --shared | --share | --shar \
435   | --sha | --sh)
436     ac_prev=sharedstatedir ;;
437   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
438   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
439   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
440   | --sha=* | --sh=*)
441     sharedstatedir="$ac_optarg" ;;
442
443   -site | --site | --sit)
444     ac_prev=site ;;
445   -site=* | --site=* | --sit=*)
446     site="$ac_optarg" ;;
447
448   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
449     ac_prev=srcdir ;;
450   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
451     srcdir="$ac_optarg" ;;
452
453   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
454   | --syscon | --sysco | --sysc | --sys | --sy)
455     ac_prev=sysconfdir ;;
456   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
457   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
458     sysconfdir="$ac_optarg" ;;
459
460   -target | --target | --targe | --targ | --tar | --ta | --t)
461     ac_prev=target ;;
462   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
463     target="$ac_optarg" ;;
464
465   -v | -verbose | --verbose | --verbos | --verbo | --verb)
466     verbose=yes ;;
467
468   -version | --version | --versio | --versi | --vers)
469     echo "configure generated by autoconf version 2.13.1"
470     exit 0 ;;
471
472   -with-* | --with-*)
473     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
474     # Reject names that are not valid shell variable names.
475     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
476       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
477     fi
478     ac_package=`echo $ac_package| sed 's/-/_/g'`
479     case "$ac_option" in
480       *=*) ;;
481       *) ac_optarg=yes ;;
482     esac
483     eval "with_${ac_package}='$ac_optarg'" ;;
484
485   -without-* | --without-*)
486     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
487     # Reject names that are not valid shell variable names.
488     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
489       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
490     fi
491     ac_package=`echo $ac_package| sed 's/-/_/g'`
492     eval "with_${ac_package}=no" ;;
493
494   --x)
495     # Obsolete; use --with-x.
496     with_x=yes ;;
497
498   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
499   | --x-incl | --x-inc | --x-in | --x-i)
500     ac_prev=x_includes ;;
501   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
502   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503     x_includes="$ac_optarg" ;;
504
505   -x-libraries | --x-libraries | --x-librarie | --x-librari \
506   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
507     ac_prev=x_libraries ;;
508   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
509   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
510     x_libraries="$ac_optarg" ;;
511
512   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
513     ;;
514
515   *)
516     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
517       echo "configure: warning: $ac_option: invalid host type" 1>&2
518     fi
519     if test "x$nonopt" != xNONE; then
520       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
521     fi
522     nonopt="$ac_option"
523     ;;
524
525   esac
526 done
527
528 if test -n "$ac_prev"; then
529   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
530 fi
531
532 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
533
534 # File descriptor usage:
535 # 0 standard input
536 # 1 file creation
537 # 2 errors and warnings
538 # 3 some systems may open it to /dev/tty
539 # 4 used on the Kubota Titan
540 # 6 checking for... messages and results
541 # 5 compiler messages saved in config.log
542 if test "$silent" = yes; then
543   exec 6>/dev/null
544 else
545   exec 6>&1
546 fi
547 exec 5>./config.log
548
549 echo "\
550 This file contains any messages produced by compilers while
551 running configure, to aid debugging if configure makes a mistake.
552 " 1>&5
553
554 # Strip out --no-create and --no-recursion so they do not pile up.
555 # Also quote any args containing shell metacharacters.
556 ac_configure_args=
557 for ac_arg
558 do
559   case "$ac_arg" in
560   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
561   | --no-cr | --no-c) ;;
562   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
563   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
564   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
565   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
566   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
567   esac
568 done
569
570 # NLS nuisances.
571 # Only set these to C if already set.  These must not be set unconditionally
572 # because not all systems understand e.g. LANG=C (notably SCO).
573 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
574 # Non-C LC_CTYPE values break the ctype check.
575 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
576 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
577 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
578 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
579
580 # confdefs.h avoids OS command line length limits that DEFS can exceed.
581 rm -rf conftest* confdefs.h
582 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
583 echo > confdefs.h
584
585 # A filename unique to this package, relative to the directory that
586 # configure is in, which we can look for to find out if srcdir is correct.
587 ac_unique_file=build/version
588
589 # Find the source files, if location was not specified.
590 if test -z "$srcdir"; then
591   ac_srcdir_defaulted=yes
592   # Try the directory containing this script, then its parent.
593   ac_prog=$0
594   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
595   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
596   srcdir=$ac_confdir
597   if test ! -r $srcdir/$ac_unique_file; then
598     srcdir=..
599   fi
600 else
601   ac_srcdir_defaulted=no
602 fi
603 if test ! -r $srcdir/$ac_unique_file; then
604   if test "$ac_srcdir_defaulted" = yes; then
605     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
606   else
607     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
608   fi
609 fi
610 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
611
612 # Prefer explicitly selected file to automatically selected ones.
613 if test -z "$CONFIG_SITE"; then
614   if test "x$prefix" != xNONE; then
615     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
616   else
617     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
618   fi
619 fi
620 for ac_site_file in $CONFIG_SITE; do
621   if test -r "$ac_site_file"; then
622     echo "loading site script $ac_site_file"
623     . "$ac_site_file"
624   fi
625 done
626
627
628 ac_ext=c
629 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
630 ac_cpp='$CPP $CPPFLAGS'
631 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
632 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
633 cross_compiling=$ac_cv_prog_cc_cross
634
635 ac_exeext=
636 ac_objext=o
637 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
638   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
639   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
640     ac_n= ac_c='
641 ' ac_t='        '
642   else
643     ac_n=-n ac_c= ac_t=
644   fi
645 else
646   ac_n= ac_c='\c' ac_t=
647 fi
648
649 ac_aux_dir=
650 for ac_dir in build $srcdir/build; do
651   if test -f $ac_dir/install-sh; then
652     ac_aux_dir=$ac_dir
653     ac_install_sh="$ac_aux_dir/install-sh -c"
654     break
655   elif test -f $ac_dir/install.sh; then
656     ac_aux_dir=$ac_dir
657     ac_install_sh="$ac_aux_dir/install.sh -c"
658     break
659   elif test -f $ac_dir/shtool; then
660     ac_aux_dir=$ac_dir
661     ac_install_sh="$ac_aux_dir/shtool install -c"
662     break
663   fi
664 done
665 if test -z "$ac_aux_dir"; then
666   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
667 fi
668 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
669 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
670 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
671
672 OL_VERSION=`cat $ac_aux_dir/version`
673 if test -z "$OL_VERSION"; then
674         { echo "configure: error: could not determine version" 1>&2; exit 1; }
675 fi
676
677 echo "Configuring OpenLDAP $OL_VERSION ..."
678
679
680 echo $ac_n "checking host system type""... $ac_c" 1>&6
681 echo "configure:682: checking host system type" >&5
682 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
683
684 # Make sure we can run config.sub.
685   if $ac_config_sub sun4 >/dev/null 2>&1; then :
686     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
687   fi
688
689   ac_cv_host_alias=$host
690   case "$ac_cv_host_alias" in
691   NONE)
692     case $nonopt in
693     NONE)
694       if ac_cv_host_alias=`$ac_config_guess`; then :
695       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
696       fi ;;
697     *) ac_cv_host_alias=$nonopt ;;
698     esac ;;
699   esac
700
701   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
702   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
703   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
704   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
705 else
706   echo $ac_n "(cached) $ac_c" 1>&6
707 fi
708
709 echo "$ac_t""$ac_cv_host" 1>&6
710
711 host=$ac_cv_host
712 host_alias=$ac_cv_host_alias
713 host_cpu=$ac_cv_host_cpu
714 host_vendor=$ac_cv_host_vendor
715 host_os=$ac_cv_host_os
716
717
718
719
720
721 echo $ac_n "checking target system type""... $ac_c" 1>&6
722 echo "configure:723: checking target system type" >&5
723 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
724
725 # Make sure we can run config.sub.
726   if $ac_config_sub sun4 >/dev/null 2>&1; then :
727     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
728   fi
729
730   ac_cv_target_alias=$target
731   case "$ac_cv_target_alias" in
732   NONE)
733     case $nonopt in
734     NONE)
735       ac_cv_target_alias=$host_alias ;;
736
737     *) ac_cv_target_alias=$nonopt ;;
738     esac ;;
739   esac
740
741   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
742   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
743   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
744   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
745 else
746   echo $ac_n "(cached) $ac_c" 1>&6
747 fi
748
749 echo "$ac_t""$ac_cv_target" 1>&6
750
751 target=$ac_cv_target
752 target_alias=$ac_cv_target_alias
753 target_cpu=$ac_cv_target_cpu
754 target_vendor=$ac_cv_target_vendor
755 target_os=$ac_cv_target_os
756
757
758
759
760
761 echo $ac_n "checking build system type""... $ac_c" 1>&6
762 echo "configure:763: checking build system type" >&5
763 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
764
765 # Make sure we can run config.sub.
766   if $ac_config_sub sun4 >/dev/null 2>&1; then :
767     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
768   fi
769
770   ac_cv_build_alias=$build
771   case "$ac_cv_build_alias" in
772   NONE)
773     case $nonopt in
774     NONE)
775       ac_cv_build_alias=$host_alias ;;
776
777     *) ac_cv_build_alias=$nonopt ;;
778     esac ;;
779   esac
780
781   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
782   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
783   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
784   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
785 else
786   echo $ac_n "(cached) $ac_c" 1>&6
787 fi
788
789 echo "$ac_t""$ac_cv_build" 1>&6
790
791 build=$ac_cv_build
792 build_alias=$ac_cv_build_alias
793 build_cpu=$ac_cv_build_cpu
794 build_vendor=$ac_cv_build_vendor
795 build_os=$ac_cv_build_os
796
797
798
799
800
801 # Do some error checking and defaulting for the host and target type.
802 # The inputs are:
803 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
804 #
805 # The rules are:
806 # 1. You are not allowed to specify --host, --target, and nonopt at the
807 #    same time.
808 # 2. Host defaults to nonopt.
809 # 3. If nonopt is not specified, then host defaults to the current host,
810 #    as determined by config.guess.
811 # 4. Target and build default to nonopt.
812 # 5. If nonopt is not specified, then target and build default to host.
813
814 # The aliases save the names the user supplied, while $host etc.
815 # will get canonicalized.
816 case $host---$target---$nonopt in
817 NONE---*---* | *---NONE---* | *---*---NONE) ;;
818 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
819 esac
820
821 test "$host_alias" != "$target_alias" &&
822   test "$program_prefix$program_suffix$program_transform_name" = \
823     NONENONEs,x,x, &&
824   program_prefix=${target_alias}-
825
826
827 # Find a good install program.  We prefer a C program (faster),
828 # so one script is as good as another.  But avoid the broken or
829 # incompatible versions:
830 # SysV /etc/install, /usr/sbin/install
831 # SunOS /usr/etc/install
832 # IRIX /sbin/install
833 # AIX /bin/install
834 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
835 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
836 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
837 # ./install, which can be erroneously created by make from ./install.sh.
838 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
839 echo "configure:840: checking for a BSD compatible install" >&5
840 if test -z "$INSTALL"; then
841 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
842   echo $ac_n "(cached) $ac_c" 1>&6
843 else
844     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
845   for ac_dir in $PATH; do
846     # Account for people who put trailing slashes in PATH elements.
847     case "$ac_dir/" in
848     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
849     *)
850       # OSF1 and SCO ODT 3.0 have their own names for install.
851       # Don't use installbsd from OSF since it installs stuff as root
852       # by default.
853       for ac_prog in ginstall scoinst install; do
854         if test -f $ac_dir/$ac_prog; then
855           if test $ac_prog = install &&
856             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
857             # AIX install.  It has an incompatible calling convention.
858             :
859           elif test $ac_prog = install &&
860             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
861             # program-specific install script used by HP pwplus--don't use.
862             :
863           else
864             ac_cv_path_install="$ac_dir/$ac_prog -c"
865             break 2
866           fi
867         fi
868       done
869       ;;
870     esac
871   done
872   IFS="$ac_save_IFS"
873
874 fi
875   if test "${ac_cv_path_install+set}" = set; then
876     INSTALL="$ac_cv_path_install"
877   else
878     # As a last resort, use the slow shell script.  We don't cache a
879     # path for INSTALL within a source directory, because that will
880     # break other packages using the cache if that directory is
881     # removed, or if the path is relative.
882     INSTALL="$ac_install_sh"
883   fi
884 fi
885 echo "$ac_t""$INSTALL" 1>&6
886
887 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
888 # It thinks the first close brace ends the variable substitution.
889 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
890
891 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
892
893 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
894
895 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
896 echo "configure:897: checking whether build environment is sane" >&5
897 # Just in case
898 sleep 1
899 echo timestamp > conftestfile
900 # Do `set' in a subshell so we don't clobber the current shell's
901 # arguments.  Must try -L first in case configure is actually a
902 # symlink; some systems play weird games with the mod time of symlinks
903 # (eg FreeBSD returns the mod time of the symlink's containing
904 # directory).
905 if (
906    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
907    if test "$*" = "X"; then
908       # -L didn't work.
909       set X `ls -t $srcdir/configure conftestfile`
910    fi
911    if test "$*" != "X $srcdir/configure conftestfile" \
912       && test "$*" != "X conftestfile $srcdir/configure"; then
913
914       # If neither matched, then we have a broken ls.  This can happen
915       # if, for instance, CONFIG_SHELL is bash and it inherits a
916       # broken ls alias from the environment.  This has actually
917       # happened.  Such a system could not be considered "sane".
918       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
919 alias in your environment" 1>&2; exit 1; }
920    fi
921
922    test "$2" = conftestfile
923    )
924 then
925    # Ok.
926    :
927 else
928    { echo "configure: error: newly created file is older than distributed files!
929 Check your system clock" 1>&2; exit 1; }
930 fi
931 rm -f conftest*
932 echo "$ac_t""yes" 1>&6
933 if test "$program_transform_name" = s,x,x,; then
934   program_transform_name=
935 else
936   # Double any \ or $.  echo might interpret backslashes.
937   cat <<\EOF_SED > conftestsed
938 s,\\,\\\\,g; s,\$,$$,g
939 EOF_SED
940   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
941   rm -f conftestsed
942 fi
943 test "$program_prefix" != NONE &&
944   program_transform_name="s,^,${program_prefix},;$program_transform_name"
945 # Use a double $ so make ignores it.
946 test "$program_suffix" != NONE &&
947   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
948
949 # sed with no file args requires a program.
950 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
951
952 for ac_prog in mawk gawk nawk awk
953 do
954 # Extract the first word of "$ac_prog", so it can be a program name with args.
955 set dummy $ac_prog; ac_word=$2
956 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
957 echo "configure:958: checking for $ac_word" >&5
958 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
959   echo $ac_n "(cached) $ac_c" 1>&6
960 else
961   if test -n "$AWK"; then
962   ac_cv_prog_AWK="$AWK" # Let the user override the test.
963 else
964   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
965   ac_dummy="$PATH"
966   for ac_dir in $ac_dummy; do
967     test -z "$ac_dir" && ac_dir=.
968     if test -f $ac_dir/$ac_word; then
969       ac_cv_prog_AWK="$ac_prog"
970       break
971     fi
972   done
973   IFS="$ac_save_ifs"
974 fi
975 fi
976 AWK="$ac_cv_prog_AWK"
977 if test -n "$AWK"; then
978   echo "$ac_t""$AWK" 1>&6
979 else
980   echo "$ac_t""no" 1>&6
981 fi
982
983 test -n "$AWK" && break
984 done
985
986 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
987 echo "configure:988: checking whether ${MAKE-make} sets \${MAKE}" >&5
988 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
989 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
990   echo $ac_n "(cached) $ac_c" 1>&6
991 else
992   cat > conftestmake <<\EOF
993 all:
994         @echo 'ac_maketemp="${MAKE}"'
995 EOF
996 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
997 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
998 if test -n "$ac_maketemp"; then
999   eval ac_cv_prog_make_${ac_make}_set=yes
1000 else
1001   eval ac_cv_prog_make_${ac_make}_set=no
1002 fi
1003 rm -f conftestmake
1004 fi
1005 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1006   echo "$ac_t""yes" 1>&6
1007   SET_MAKE=
1008 else
1009   echo "$ac_t""no" 1>&6
1010   SET_MAKE="MAKE=${MAKE-make}"
1011 fi
1012
1013
1014
1015 PACKAGE=OpenLDAP
1016
1017 VERSION=$OL_VERSION
1018
1019 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1020   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1021 fi
1022
1023
1024
1025 missing_dir=`cd $ac_aux_dir && pwd`
1026 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1027 echo "configure:1028: checking for working aclocal" >&5
1028 # Run test in a subshell; some versions of sh will print an error if
1029 # an executable is not found, even if stderr is redirected.
1030 # Redirect stdin to placate older versions of autoconf.  Sigh.
1031 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1032    ACLOCAL=aclocal
1033    echo "$ac_t""found" 1>&6
1034 else
1035    ACLOCAL="$missing_dir/missing aclocal"
1036    echo "$ac_t""missing" 1>&6
1037 fi
1038
1039 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1040 echo "configure:1041: checking for working autoconf" >&5
1041 # Run test in a subshell; some versions of sh will print an error if
1042 # an executable is not found, even if stderr is redirected.
1043 # Redirect stdin to placate older versions of autoconf.  Sigh.
1044 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1045    AUTOCONF=autoconf
1046    echo "$ac_t""found" 1>&6
1047 else
1048    AUTOCONF="$missing_dir/missing autoconf"
1049    echo "$ac_t""missing" 1>&6
1050 fi
1051
1052 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1053 echo "configure:1054: checking for working automake" >&5
1054 # Run test in a subshell; some versions of sh will print an error if
1055 # an executable is not found, even if stderr is redirected.
1056 # Redirect stdin to placate older versions of autoconf.  Sigh.
1057 if (automake --version) < /dev/null > /dev/null 2>&1; then
1058    AUTOMAKE=automake
1059    echo "$ac_t""found" 1>&6
1060 else
1061    AUTOMAKE="$missing_dir/missing automake"
1062    echo "$ac_t""missing" 1>&6
1063 fi
1064
1065 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1066 echo "configure:1067: checking for working autoheader" >&5
1067 # Run test in a subshell; some versions of sh will print an error if
1068 # an executable is not found, even if stderr is redirected.
1069 # Redirect stdin to placate older versions of autoconf.  Sigh.
1070 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1071    AUTOHEADER=autoheader
1072    echo "$ac_t""found" 1>&6
1073 else
1074    AUTOHEADER="$missing_dir/missing autoheader"
1075    echo "$ac_t""missing" 1>&6
1076 fi
1077
1078 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1079 echo "configure:1080: checking for working makeinfo" >&5
1080 # Run test in a subshell; some versions of sh will print an error if
1081 # an executable is not found, even if stderr is redirected.
1082 # Redirect stdin to placate older versions of autoconf.  Sigh.
1083 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1084    MAKEINFO=makeinfo
1085    echo "$ac_t""found" 1>&6
1086 else
1087    MAKEINFO="$missing_dir/missing makeinfo"
1088    echo "$ac_t""missing" 1>&6
1089 fi
1090
1091 install_sh="$missing_dir/install-sh"
1092 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1093
1094 for ac_prog in gnutar gtar tar
1095 do
1096 # Extract the first word of "$ac_prog", so it can be a program name with args.
1097 set dummy $ac_prog; ac_word=$2
1098 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1099 echo "configure:1100: checking for $ac_word" >&5
1100 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1101   echo $ac_n "(cached) $ac_c" 1>&6
1102 else
1103   if test -n "$AMTAR"; then
1104   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1105 else
1106   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1107   ac_dummy="$PATH"
1108   for ac_dir in $ac_dummy; do
1109     test -z "$ac_dir" && ac_dir=.
1110     if test -f $ac_dir/$ac_word; then
1111       ac_cv_prog_AMTAR="$ac_prog"
1112       break
1113     fi
1114   done
1115   IFS="$ac_save_ifs"
1116 fi
1117 fi
1118 AMTAR="$ac_cv_prog_AMTAR"
1119 if test -n "$AMTAR"; then
1120   echo "$ac_t""$AMTAR" 1>&6
1121 else
1122   echo "$ac_t""no" 1>&6
1123 fi
1124
1125 test -n "$AMTAR" && break
1126 done
1127
1128
1129 AMTARFLAGS=
1130 if test -n "$AMTAR"; then
1131   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1132         AMTARFLAGS=o
1133   fi
1134 fi
1135
1136
1137
1138 cat >> confdefs.h <<EOF
1139 #define OPENLDAP_PACKAGE "$PACKAGE"
1140 EOF
1141
1142 cat >> confdefs.h <<EOF
1143 #define OPENLDAP_VERSION "$VERSION"
1144 EOF
1145
1146
1147
1148
1149 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1150 echo "configure:1151: checking configure arguments" >&5
1151
1152
1153 top_builddir=`pwd`
1154
1155 ldap_subdir="/openldap"
1156
1157 # Check whether --with-subdir or --without-subdir was given.
1158 if test "${with_subdir+set}" = set; then
1159   withval="$with_subdir"
1160   case "$withval" in
1161         no) ldap_subdir=""
1162                 ;;
1163         yes)
1164                 ;;
1165         /*|\\*)
1166                 ldap_subdir="$withval"
1167                 ;;
1168         *)
1169                 ldap_subdir="/$withval"
1170                 ;;
1171 esac
1172
1173 fi
1174
1175
1176 # OpenLDAP --enable-debug
1177         # Check whether --enable-debug or --disable-debug was given.
1178 if test "${enable_debug+set}" = set; then
1179   enableval="$enable_debug"
1180   
1181         ol_arg=invalid
1182         for ol_val in auto yes no ; do
1183                 if test "$enableval" = "$ol_val" ; then
1184                         ol_arg="$ol_val"
1185                 fi
1186         done
1187         if test "$ol_arg" = "invalid" ; then
1188                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1189         fi
1190         ol_enable_debug="$ol_arg"
1191
1192 else
1193         ol_enable_debug="yes"
1194 fi
1195 # end --enable-debug
1196 # OpenLDAP --enable-syslog
1197         # Check whether --enable-syslog or --disable-syslog was given.
1198 if test "${enable_syslog+set}" = set; then
1199   enableval="$enable_syslog"
1200   
1201         ol_arg=invalid
1202         for ol_val in auto yes no ; do
1203                 if test "$enableval" = "$ol_val" ; then
1204                         ol_arg="$ol_val"
1205                 fi
1206         done
1207         if test "$ol_arg" = "invalid" ; then
1208                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1209         fi
1210         ol_enable_syslog="$ol_arg"
1211
1212 else
1213         ol_enable_syslog="auto"
1214 fi
1215 # end --enable-syslog
1216 # OpenLDAP --enable-proctitle
1217         # Check whether --enable-proctitle or --disable-proctitle was given.
1218 if test "${enable_proctitle+set}" = set; then
1219   enableval="$enable_proctitle"
1220   
1221         ol_arg=invalid
1222         for ol_val in auto yes no ; do
1223                 if test "$enableval" = "$ol_val" ; then
1224                         ol_arg="$ol_val"
1225                 fi
1226         done
1227         if test "$ol_arg" = "invalid" ; then
1228                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1229         fi
1230         ol_enable_proctitle="$ol_arg"
1231
1232 else
1233         ol_enable_proctitle="yes"
1234 fi
1235 # end --enable-proctitle
1236 # OpenLDAP --enable-cache
1237         # Check whether --enable-cache or --disable-cache was given.
1238 if test "${enable_cache+set}" = set; then
1239   enableval="$enable_cache"
1240   
1241         ol_arg=invalid
1242         for ol_val in auto yes no ; do
1243                 if test "$enableval" = "$ol_val" ; then
1244                         ol_arg="$ol_val"
1245                 fi
1246         done
1247         if test "$ol_arg" = "invalid" ; then
1248                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1249         fi
1250         ol_enable_cache="$ol_arg"
1251
1252 else
1253         ol_enable_cache="yes"
1254 fi
1255 # end --enable-cache
1256 # OpenLDAP --enable-dns
1257         # Check whether --enable-dns or --disable-dns was given.
1258 if test "${enable_dns+set}" = set; then
1259   enableval="$enable_dns"
1260   
1261         ol_arg=invalid
1262         for ol_val in auto yes no ; do
1263                 if test "$enableval" = "$ol_val" ; then
1264                         ol_arg="$ol_val"
1265                 fi
1266         done
1267         if test "$ol_arg" = "invalid" ; then
1268                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1269         fi
1270         ol_enable_dns="$ol_arg"
1271
1272 else
1273         ol_enable_dns="no"
1274 fi
1275 # end --enable-dns
1276 # OpenLDAP --enable-referrals
1277         # Check whether --enable-referrals or --disable-referrals was given.
1278 if test "${enable_referrals+set}" = set; then
1279   enableval="$enable_referrals"
1280   
1281         ol_arg=invalid
1282         for ol_val in auto yes no ; do
1283                 if test "$enableval" = "$ol_val" ; then
1284                         ol_arg="$ol_val"
1285                 fi
1286         done
1287         if test "$ol_arg" = "invalid" ; then
1288                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1289         fi
1290         ol_enable_referrals="$ol_arg"
1291
1292 else
1293         ol_enable_referrals="yes"
1294 fi
1295 # end --enable-referrals
1296 # OpenLDAP --enable-kbind
1297         # Check whether --enable-kbind or --disable-kbind was given.
1298 if test "${enable_kbind+set}" = set; then
1299   enableval="$enable_kbind"
1300   
1301         ol_arg=invalid
1302         for ol_val in auto yes no ; do
1303                 if test "$enableval" = "$ol_val" ; then
1304                         ol_arg="$ol_val"
1305                 fi
1306         done
1307         if test "$ol_arg" = "invalid" ; then
1308                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1309         fi
1310         ol_enable_kbind="$ol_arg"
1311
1312 else
1313         ol_enable_kbind="auto"
1314 fi
1315 # end --enable-kbind
1316 # OpenLDAP --enable-cldap
1317         # Check whether --enable-cldap or --disable-cldap was given.
1318 if test "${enable_cldap+set}" = set; then
1319   enableval="$enable_cldap"
1320   
1321         ol_arg=invalid
1322         for ol_val in auto yes no ; do
1323                 if test "$enableval" = "$ol_val" ; then
1324                         ol_arg="$ol_val"
1325                 fi
1326         done
1327         if test "$ol_arg" = "invalid" ; then
1328                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1329         fi
1330         ol_enable_cldap="$ol_arg"
1331
1332 else
1333         ol_enable_cldap="no"
1334 fi
1335 # end --enable-cldap
1336 # OpenLDAP --enable-ldapi
1337         # Check whether --enable-ldapi or --disable-ldapi was given.
1338 if test "${enable_ldapi+set}" = set; then
1339   enableval="$enable_ldapi"
1340   
1341         ol_arg=invalid
1342         for ol_val in auto yes no ; do
1343                 if test "$enableval" = "$ol_val" ; then
1344                         ol_arg="$ol_val"
1345                 fi
1346         done
1347         if test "$ol_arg" = "invalid" ; then
1348                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1349         fi
1350         ol_enable_ldapi="$ol_arg"
1351
1352 else
1353         ol_enable_ldapi="no"
1354 fi
1355 # end --enable-ldapi
1356 # OpenLDAP --enable-x_compile
1357         # Check whether --enable-x_compile or --disable-x_compile was given.
1358 if test "${enable_x_compile+set}" = set; then
1359   enableval="$enable_x_compile"
1360   
1361         ol_arg=invalid
1362         for ol_val in yes no ; do
1363                 if test "$enableval" = "$ol_val" ; then
1364                         ol_arg="$ol_val"
1365                 fi
1366         done
1367         if test "$ol_arg" = "invalid" ; then
1368                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1369         fi
1370         ol_enable_x_compile="$ol_arg"
1371
1372 else
1373         ol_enable_x_compile="no"
1374 fi
1375 # end --enable-x_compile
1376
1377 # OpenLDAP --enable-dmalloc
1378         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1379 if test "${enable_dmalloc+set}" = set; then
1380   enableval="$enable_dmalloc"
1381   
1382         ol_arg=invalid
1383         for ol_val in auto yes no ; do
1384                 if test "$enableval" = "$ol_val" ; then
1385                         ol_arg="$ol_val"
1386                 fi
1387         done
1388         if test "$ol_arg" = "invalid" ; then
1389                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1390         fi
1391         ol_enable_dmalloc="$ol_arg"
1392
1393 else
1394         ol_enable_dmalloc="no"
1395 fi
1396 # end --enable-dmalloc
1397
1398 # OpenLDAP --with-cyrus_sasl
1399         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1400 if test "${with_cyrus_sasl+set}" = set; then
1401   withval="$with_cyrus_sasl"
1402   
1403         ol_arg=invalid
1404         for ol_val in auto yes no  ; do
1405                 if test "$withval" = "$ol_val" ; then
1406                         ol_arg="$ol_val"
1407                 fi
1408         done
1409         if test "$ol_arg" = "invalid" ; then
1410                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1411         fi
1412         ol_with_cyrus_sasl="$ol_arg"
1413
1414 else
1415         ol_with_cyrus_sasl="auto"
1416 fi
1417 # end --with-cyrus_sasl
1418
1419 # OpenLDAP --with-fetch
1420         # Check whether --with-fetch or --without-fetch was given.
1421 if test "${with_fetch+set}" = set; then
1422   withval="$with_fetch"
1423   
1424         ol_arg=invalid
1425         for ol_val in auto yes no  ; do
1426                 if test "$withval" = "$ol_val" ; then
1427                         ol_arg="$ol_val"
1428                 fi
1429         done
1430         if test "$ol_arg" = "invalid" ; then
1431                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1432         fi
1433         ol_with_fetch="$ol_arg"
1434
1435 else
1436         ol_with_fetch="auto"
1437 fi
1438 # end --with-fetch
1439
1440 # OpenLDAP --with-kerberos
1441         # Check whether --with-kerberos or --without-kerberos was given.
1442 if test "${with_kerberos+set}" = set; then
1443   withval="$with_kerberos"
1444   
1445         ol_arg=invalid
1446         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1447                 if test "$withval" = "$ol_val" ; then
1448                         ol_arg="$ol_val"
1449                 fi
1450         done
1451         if test "$ol_arg" = "invalid" ; then
1452                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1453         fi
1454         ol_with_kerberos="$ol_arg"
1455
1456 else
1457         ol_with_kerberos="auto"
1458 fi
1459 # end --with-kerberos
1460
1461 # OpenLDAP --with-readline
1462         # Check whether --with-readline or --without-readline was given.
1463 if test "${with_readline+set}" = set; then
1464   withval="$with_readline"
1465   
1466         ol_arg=invalid
1467         for ol_val in auto yes no  ; do
1468                 if test "$withval" = "$ol_val" ; then
1469                         ol_arg="$ol_val"
1470                 fi
1471         done
1472         if test "$ol_arg" = "invalid" ; then
1473                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1474         fi
1475         ol_with_readline="$ol_arg"
1476
1477 else
1478         ol_with_readline="auto"
1479 fi
1480 # end --with-readline
1481
1482 # OpenLDAP --with-threads
1483         # Check whether --with-threads or --without-threads was given.
1484 if test "${with_threads+set}" = set; then
1485   withval="$with_threads"
1486   
1487         ol_arg=invalid
1488         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1489                 if test "$withval" = "$ol_val" ; then
1490                         ol_arg="$ol_val"
1491                 fi
1492         done
1493         if test "$ol_arg" = "invalid" ; then
1494                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1495         fi
1496         ol_with_threads="$ol_arg"
1497
1498 else
1499         ol_with_threads="auto"
1500 fi
1501 # end --with-threads
1502
1503 # OpenLDAP --with-tls
1504         # Check whether --with-tls or --without-tls was given.
1505 if test "${with_tls+set}" = set; then
1506   withval="$with_tls"
1507   
1508         ol_arg=invalid
1509         for ol_val in auto ssleay openssl yes no  ; do
1510                 if test "$withval" = "$ol_val" ; then
1511                         ol_arg="$ol_val"
1512                 fi
1513         done
1514         if test "$ol_arg" = "invalid" ; then
1515                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1516         fi
1517         ol_with_tls="$ol_arg"
1518
1519 else
1520         ol_with_tls="auto"
1521 fi
1522 # end --with-tls
1523
1524 # OpenLDAP --with-yielding_select
1525         # Check whether --with-yielding_select or --without-yielding_select was given.
1526 if test "${with_yielding_select+set}" = set; then
1527   withval="$with_yielding_select"
1528   
1529         ol_arg=invalid
1530         for ol_val in auto yes no manual  ; do
1531                 if test "$withval" = "$ol_val" ; then
1532                         ol_arg="$ol_val"
1533                 fi
1534         done
1535         if test "$ol_arg" = "invalid" ; then
1536                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1537         fi
1538         ol_with_yielding_select="$ol_arg"
1539
1540 else
1541         ol_with_yielding_select="auto"
1542 fi
1543 # end --with-yielding_select
1544
1545
1546 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1547 if test "${with_xxldapdoptions+set}" = set; then
1548   withval="$with_xxldapdoptions"
1549   :
1550 fi
1551
1552 # OpenLDAP --enable-ldapd
1553         # Check whether --enable-ldapd or --disable-ldapd was given.
1554 if test "${enable_ldapd+set}" = set; then
1555   enableval="$enable_ldapd"
1556   
1557         ol_arg=invalid
1558         for ol_val in auto yes no ; do
1559                 if test "$enableval" = "$ol_val" ; then
1560                         ol_arg="$ol_val"
1561                 fi
1562         done
1563         if test "$ol_arg" = "invalid" ; then
1564                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1565         fi
1566         ol_enable_ldapd="$ol_arg"
1567
1568 else
1569         ol_enable_ldapd="no"
1570 fi
1571 # end --enable-ldapd
1572
1573 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1574 if test "${with_xxslapdoptions+set}" = set; then
1575   withval="$with_xxslapdoptions"
1576   :
1577 fi
1578
1579 # OpenLDAP --enable-slapd
1580         # Check whether --enable-slapd or --disable-slapd was given.
1581 if test "${enable_slapd+set}" = set; then
1582   enableval="$enable_slapd"
1583   
1584         ol_arg=invalid
1585         for ol_val in auto yes no ; do
1586                 if test "$enableval" = "$ol_val" ; then
1587                         ol_arg="$ol_val"
1588                 fi
1589         done
1590         if test "$ol_arg" = "invalid" ; then
1591                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1592         fi
1593         ol_enable_slapd="$ol_arg"
1594
1595 else
1596         ol_enable_slapd="yes"
1597 fi
1598 # end --enable-slapd
1599 # OpenLDAP --enable-cleartext
1600         # Check whether --enable-cleartext or --disable-cleartext was given.
1601 if test "${enable_cleartext+set}" = set; then
1602   enableval="$enable_cleartext"
1603   
1604         ol_arg=invalid
1605         for ol_val in auto yes no ; do
1606                 if test "$enableval" = "$ol_val" ; then
1607                         ol_arg="$ol_val"
1608                 fi
1609         done
1610         if test "$ol_arg" = "invalid" ; then
1611                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1612         fi
1613         ol_enable_cleartext="$ol_arg"
1614
1615 else
1616         ol_enable_cleartext="yes"
1617 fi
1618 # end --enable-cleartext
1619 # OpenLDAP --enable-crypt
1620         # Check whether --enable-crypt or --disable-crypt was given.
1621 if test "${enable_crypt+set}" = set; then
1622   enableval="$enable_crypt"
1623   
1624         ol_arg=invalid
1625         for ol_val in auto yes no ; do
1626                 if test "$enableval" = "$ol_val" ; then
1627                         ol_arg="$ol_val"
1628                 fi
1629         done
1630         if test "$ol_arg" = "invalid" ; then
1631                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1632         fi
1633         ol_enable_crypt="$ol_arg"
1634
1635 else
1636         ol_enable_crypt="auto"
1637 fi
1638 # end --enable-crypt
1639 # OpenLDAP --enable-kpasswd
1640         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1641 if test "${enable_kpasswd+set}" = set; then
1642   enableval="$enable_kpasswd"
1643   
1644         ol_arg=invalid
1645         for ol_val in auto yes no ; do
1646                 if test "$enableval" = "$ol_val" ; then
1647                         ol_arg="$ol_val"
1648                 fi
1649         done
1650         if test "$ol_arg" = "invalid" ; then
1651                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1652         fi
1653         ol_enable_kpasswd="$ol_arg"
1654
1655 else
1656         ol_enable_kpasswd="no"
1657 fi
1658 # end --enable-kpasswd
1659 # OpenLDAP --enable-modules
1660         # Check whether --enable-modules or --disable-modules was given.
1661 if test "${enable_modules+set}" = set; then
1662   enableval="$enable_modules"
1663   
1664         ol_arg=invalid
1665         for ol_val in auto yes no ; do
1666                 if test "$enableval" = "$ol_val" ; then
1667                         ol_arg="$ol_val"
1668                 fi
1669         done
1670         if test "$ol_arg" = "invalid" ; then
1671                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1672         fi
1673         ol_enable_modules="$ol_arg"
1674
1675 else
1676         ol_enable_modules="no"
1677 fi
1678 # end --enable-modules
1679 # OpenLDAP --enable-multimaster
1680         # Check whether --enable-multimaster or --disable-multimaster was given.
1681 if test "${enable_multimaster+set}" = set; then
1682   enableval="$enable_multimaster"
1683   
1684         ol_arg=invalid
1685         for ol_val in auto yes no ; do
1686                 if test "$enableval" = "$ol_val" ; then
1687                         ol_arg="$ol_val"
1688                 fi
1689         done
1690         if test "$ol_arg" = "invalid" ; then
1691                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1692         fi
1693         ol_enable_multimaster="$ol_arg"
1694
1695 else
1696         ol_enable_multimaster="no"
1697 fi
1698 # end --enable-multimaster
1699 # OpenLDAP --enable-phonetic
1700         # Check whether --enable-phonetic or --disable-phonetic was given.
1701 if test "${enable_phonetic+set}" = set; then
1702   enableval="$enable_phonetic"
1703   
1704         ol_arg=invalid
1705         for ol_val in auto yes no ; do
1706                 if test "$enableval" = "$ol_val" ; then
1707                         ol_arg="$ol_val"
1708                 fi
1709         done
1710         if test "$ol_arg" = "invalid" ; then
1711                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1712         fi
1713         ol_enable_phonetic="$ol_arg"
1714
1715 else
1716         ol_enable_phonetic="no"
1717 fi
1718 # end --enable-phonetic
1719 # OpenLDAP --enable-quipu
1720         # Check whether --enable-quipu or --disable-quipu was given.
1721 if test "${enable_quipu+set}" = set; then
1722   enableval="$enable_quipu"
1723   
1724         ol_arg=invalid
1725         for ol_val in auto yes no ; do
1726                 if test "$enableval" = "$ol_val" ; then
1727                         ol_arg="$ol_val"
1728                 fi
1729         done
1730         if test "$ol_arg" = "invalid" ; then
1731                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1732         fi
1733         ol_enable_quipu="$ol_arg"
1734
1735 else
1736         ol_enable_quipu="no"
1737 fi
1738 # end --enable-quipu
1739 # OpenLDAP --enable-rlookups
1740         # Check whether --enable-rlookups or --disable-rlookups was given.
1741 if test "${enable_rlookups+set}" = set; then
1742   enableval="$enable_rlookups"
1743   
1744         ol_arg=invalid
1745         for ol_val in auto yes no ; do
1746                 if test "$enableval" = "$ol_val" ; then
1747                         ol_arg="$ol_val"
1748                 fi
1749         done
1750         if test "$ol_arg" = "invalid" ; then
1751                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1752         fi
1753         ol_enable_rlookups="$ol_arg"
1754
1755 else
1756         ol_enable_rlookups="auto"
1757 fi
1758 # end --enable-rlookups
1759 # OpenLDAP --enable-aci
1760         # Check whether --enable-aci or --disable-aci was given.
1761 if test "${enable_aci+set}" = set; then
1762   enableval="$enable_aci"
1763   
1764         ol_arg=invalid
1765         for ol_val in auto yes no ; do
1766                 if test "$enableval" = "$ol_val" ; then
1767                         ol_arg="$ol_val"
1768                 fi
1769         done
1770         if test "$ol_arg" = "invalid" ; then
1771                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1772         fi
1773         ol_enable_aci="$ol_arg"
1774
1775 else
1776         ol_enable_aci="no"
1777 fi
1778 # end --enable-aci
1779 # OpenLDAP --enable-wrappers
1780         # Check whether --enable-wrappers or --disable-wrappers was given.
1781 if test "${enable_wrappers+set}" = set; then
1782   enableval="$enable_wrappers"
1783   
1784         ol_arg=invalid
1785         for ol_val in auto yes no ; do
1786                 if test "$enableval" = "$ol_val" ; then
1787                         ol_arg="$ol_val"
1788                 fi
1789         done
1790         if test "$ol_arg" = "invalid" ; then
1791                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1792         fi
1793         ol_enable_wrappers="$ol_arg"
1794
1795 else
1796         ol_enable_wrappers="no"
1797 fi
1798 # end --enable-wrappers
1799 # OpenLDAP --enable-dynamic
1800         # Check whether --enable-dynamic or --disable-dynamic was given.
1801 if test "${enable_dynamic+set}" = set; then
1802   enableval="$enable_dynamic"
1803   
1804         ol_arg=invalid
1805         for ol_val in auto yes no ; do
1806                 if test "$enableval" = "$ol_val" ; then
1807                         ol_arg="$ol_val"
1808                 fi
1809         done
1810         if test "$ol_arg" = "invalid" ; then
1811                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1812         fi
1813         ol_enable_dynamic="$ol_arg"
1814
1815 else
1816         ol_enable_dynamic="no"
1817 fi
1818 # end --enable-dynamic
1819
1820 # OpenLDAP --enable-bdb2
1821         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1822 if test "${enable_bdb2+set}" = set; then
1823   enableval="$enable_bdb2"
1824   
1825         ol_arg=invalid
1826         for ol_val in auto yes no ; do
1827                 if test "$enableval" = "$ol_val" ; then
1828                         ol_arg="$ol_val"
1829                 fi
1830         done
1831         if test "$ol_arg" = "invalid" ; then
1832                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1833         fi
1834         ol_enable_bdb2="$ol_arg"
1835
1836 else
1837         ol_enable_bdb2="no"
1838 fi
1839 # end --enable-bdb2
1840 # OpenLDAP --with-bdb2_module
1841         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1842 if test "${with_bdb2_module+set}" = set; then
1843   withval="$with_bdb2_module"
1844   
1845         ol_arg=invalid
1846         for ol_val in static dynamic ; do
1847                 if test "$withval" = "$ol_val" ; then
1848                         ol_arg="$ol_val"
1849                 fi
1850         done
1851         if test "$ol_arg" = "invalid" ; then
1852                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1853         fi
1854         ol_with_bdb2_module="$ol_arg"
1855
1856 else
1857         ol_with_bdb2_module="static"
1858 fi
1859 # end --with-bdb2_module
1860
1861 # OpenLDAP --enable-ldap
1862         # Check whether --enable-ldap or --disable-ldap was given.
1863 if test "${enable_ldap+set}" = set; then
1864   enableval="$enable_ldap"
1865   
1866         ol_arg=invalid
1867         for ol_val in auto yes no ; do
1868                 if test "$enableval" = "$ol_val" ; then
1869                         ol_arg="$ol_val"
1870                 fi
1871         done
1872         if test "$ol_arg" = "invalid" ; then
1873                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1874         fi
1875         ol_enable_ldap="$ol_arg"
1876
1877 else
1878         ol_enable_ldap="no"
1879 fi
1880 # end --enable-ldap
1881 # OpenLDAP --with-ldap_module
1882         # Check whether --with-ldap_module or --without-ldap_module was given.
1883 if test "${with_ldap_module+set}" = set; then
1884   withval="$with_ldap_module"
1885   
1886         ol_arg=invalid
1887         for ol_val in static dynamic ; do
1888                 if test "$withval" = "$ol_val" ; then
1889                         ol_arg="$ol_val"
1890                 fi
1891         done
1892         if test "$ol_arg" = "invalid" ; then
1893                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1894         fi
1895         ol_with_ldap_module="$ol_arg"
1896
1897 else
1898         ol_with_ldap_module="static"
1899 fi
1900 # end --with-ldap_module
1901
1902 # OpenLDAP --enable-ldbm
1903         # Check whether --enable-ldbm or --disable-ldbm was given.
1904 if test "${enable_ldbm+set}" = set; then
1905   enableval="$enable_ldbm"
1906   
1907         ol_arg=invalid
1908         for ol_val in auto yes no ; do
1909                 if test "$enableval" = "$ol_val" ; then
1910                         ol_arg="$ol_val"
1911                 fi
1912         done
1913         if test "$ol_arg" = "invalid" ; then
1914                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1915         fi
1916         ol_enable_ldbm="$ol_arg"
1917
1918 else
1919         ol_enable_ldbm="yes"
1920 fi
1921 # end --enable-ldbm
1922 # OpenLDAP --with-ldbm_api
1923         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1924 if test "${with_ldbm_api+set}" = set; then
1925   withval="$with_ldbm_api"
1926   
1927         ol_arg=invalid
1928         for ol_val in auto db2 db mdbm gdbm manual ; do
1929                 if test "$withval" = "$ol_val" ; then
1930                         ol_arg="$ol_val"
1931                 fi
1932         done
1933         if test "$ol_arg" = "invalid" ; then
1934                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1935         fi
1936         ol_with_ldbm_api="$ol_arg"
1937
1938 else
1939         ol_with_ldbm_api="auto"
1940 fi
1941 # end --with-ldbm_api
1942
1943 # OpenLDAP --with-ldbm_module
1944         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1945 if test "${with_ldbm_module+set}" = set; then
1946   withval="$with_ldbm_module"
1947   
1948         ol_arg=invalid
1949         for ol_val in static dynamic ; do
1950                 if test "$withval" = "$ol_val" ; then
1951                         ol_arg="$ol_val"
1952                 fi
1953         done
1954         if test "$ol_arg" = "invalid" ; then
1955                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1956         fi
1957         ol_with_ldbm_module="$ol_arg"
1958
1959 else
1960         ol_with_ldbm_module="static"
1961 fi
1962 # end --with-ldbm_module
1963
1964 # OpenLDAP --with-ldbm_type
1965         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1966 if test "${with_ldbm_type+set}" = set; then
1967   withval="$with_ldbm_type"
1968   
1969         ol_arg=invalid
1970         for ol_val in auto btree hash ; do
1971                 if test "$withval" = "$ol_val" ; then
1972                         ol_arg="$ol_val"
1973                 fi
1974         done
1975         if test "$ol_arg" = "invalid" ; then
1976                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1977         fi
1978         ol_with_ldbm_type="$ol_arg"
1979
1980 else
1981         ol_with_ldbm_type="auto"
1982 fi
1983 # end --with-ldbm_type
1984
1985
1986 # OpenLDAP --enable-passwd
1987         # Check whether --enable-passwd or --disable-passwd was given.
1988 if test "${enable_passwd+set}" = set; then
1989   enableval="$enable_passwd"
1990   
1991         ol_arg=invalid
1992         for ol_val in auto yes no ; do
1993                 if test "$enableval" = "$ol_val" ; then
1994                         ol_arg="$ol_val"
1995                 fi
1996         done
1997         if test "$ol_arg" = "invalid" ; then
1998                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1999         fi
2000         ol_enable_passwd="$ol_arg"
2001
2002 else
2003         ol_enable_passwd="no"
2004 fi
2005 # end --enable-passwd
2006 # OpenLDAP --with-passwd_module
2007         # Check whether --with-passwd_module or --without-passwd_module was given.
2008 if test "${with_passwd_module+set}" = set; then
2009   withval="$with_passwd_module"
2010   
2011         ol_arg=invalid
2012         for ol_val in static dynamic ; do
2013                 if test "$withval" = "$ol_val" ; then
2014                         ol_arg="$ol_val"
2015                 fi
2016         done
2017         if test "$ol_arg" = "invalid" ; then
2018                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2019         fi
2020         ol_with_passwd_module="$ol_arg"
2021
2022 else
2023         ol_with_passwd_module="static"
2024 fi
2025 # end --with-passwd_module
2026
2027 # OpenLDAP --enable-perl
2028         # Check whether --enable-perl or --disable-perl was given.
2029 if test "${enable_perl+set}" = set; then
2030   enableval="$enable_perl"
2031   
2032         ol_arg=invalid
2033         for ol_val in auto yes no ; do
2034                 if test "$enableval" = "$ol_val" ; then
2035                         ol_arg="$ol_val"
2036                 fi
2037         done
2038         if test "$ol_arg" = "invalid" ; then
2039                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2040         fi
2041         ol_enable_perl="$ol_arg"
2042
2043 else
2044         ol_enable_perl="no"
2045 fi
2046 # end --enable-perl
2047 # OpenLDAP --with-perl_module
2048         # Check whether --with-perl_module or --without-perl_module was given.
2049 if test "${with_perl_module+set}" = set; then
2050   withval="$with_perl_module"
2051   
2052         ol_arg=invalid
2053         for ol_val in static dynamic ; do
2054                 if test "$withval" = "$ol_val" ; then
2055                         ol_arg="$ol_val"
2056                 fi
2057         done
2058         if test "$ol_arg" = "invalid" ; then
2059                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2060         fi
2061         ol_with_perl_module="$ol_arg"
2062
2063 else
2064         ol_with_perl_module="static"
2065 fi
2066 # end --with-perl_module
2067
2068 # OpenLDAP --enable-shell
2069         # Check whether --enable-shell or --disable-shell was given.
2070 if test "${enable_shell+set}" = set; then
2071   enableval="$enable_shell"
2072   
2073         ol_arg=invalid
2074         for ol_val in auto yes no ; do
2075                 if test "$enableval" = "$ol_val" ; then
2076                         ol_arg="$ol_val"
2077                 fi
2078         done
2079         if test "$ol_arg" = "invalid" ; then
2080                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2081         fi
2082         ol_enable_shell="$ol_arg"
2083
2084 else
2085         ol_enable_shell="no"
2086 fi
2087 # end --enable-shell
2088 # OpenLDAP --with-shell_module
2089         # Check whether --with-shell_module or --without-shell_module was given.
2090 if test "${with_shell_module+set}" = set; then
2091   withval="$with_shell_module"
2092   
2093         ol_arg=invalid
2094         for ol_val in static dynamic ; do
2095                 if test "$withval" = "$ol_val" ; then
2096                         ol_arg="$ol_val"
2097                 fi
2098         done
2099         if test "$ol_arg" = "invalid" ; then
2100                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2101         fi
2102         ol_with_shell_module="$ol_arg"
2103
2104 else
2105         ol_with_shell_module="static"
2106 fi
2107 # end --with-shell_module
2108
2109 # OpenLDAP --enable-tcl
2110         # Check whether --enable-tcl or --disable-tcl was given.
2111 if test "${enable_tcl+set}" = set; then
2112   enableval="$enable_tcl"
2113   
2114         ol_arg=invalid
2115         for ol_val in auto yes no ; do
2116                 if test "$enableval" = "$ol_val" ; then
2117                         ol_arg="$ol_val"
2118                 fi
2119         done
2120         if test "$ol_arg" = "invalid" ; then
2121                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2122         fi
2123         ol_enable_tcl="$ol_arg"
2124
2125 else
2126         ol_enable_tcl="no"
2127 fi
2128 # end --enable-tcl
2129 # OpenLDAP --with-tcl_module
2130         # Check whether --with-tcl_module or --without-tcl_module was given.
2131 if test "${with_tcl_module+set}" = set; then
2132   withval="$with_tcl_module"
2133   
2134         ol_arg=invalid
2135         for ol_val in static dynamic ; do
2136                 if test "$withval" = "$ol_val" ; then
2137                         ol_arg="$ol_val"
2138                 fi
2139         done
2140         if test "$ol_arg" = "invalid" ; then
2141                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2142         fi
2143         ol_with_tcl_module="$ol_arg"
2144
2145 else
2146         ol_with_tcl_module="static"
2147 fi
2148 # end --with-tcl_module
2149
2150 # OpenLDAP --enable-sql
2151         # Check whether --enable-sql or --disable-sql was given.
2152 if test "${enable_sql+set}" = set; then
2153   enableval="$enable_sql"
2154   
2155         ol_arg=invalid
2156         for ol_val in auto yes no ; do
2157                 if test "$enableval" = "$ol_val" ; then
2158                         ol_arg="$ol_val"
2159                 fi
2160         done
2161         if test "$ol_arg" = "invalid" ; then
2162                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2163         fi
2164         ol_enable_sql="$ol_arg"
2165
2166 else
2167         ol_enable_sql="no"
2168 fi
2169 # end --enable-sql
2170 # OpenLDAP --with-sql_module
2171         # Check whether --with-sql_module or --without-sql_module was given.
2172 if test "${with_sql_module+set}" = set; then
2173   withval="$with_sql_module"
2174   
2175         ol_arg=invalid
2176         for ol_val in static dynamic ; do
2177                 if test "$withval" = "$ol_val" ; then
2178                         ol_arg="$ol_val"
2179                 fi
2180         done
2181         if test "$ol_arg" = "invalid" ; then
2182                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2183         fi
2184         ol_with_sql_module="$ol_arg"
2185
2186 else
2187         ol_with_sql_module="static"
2188 fi
2189 # end --with-sql_module
2190
2191
2192 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2193 if test "${with_xxslurpdoptions+set}" = set; then
2194   withval="$with_xxslurpdoptions"
2195   :
2196 fi
2197
2198 # OpenLDAP --enable-slurpd
2199         # Check whether --enable-slurpd or --disable-slurpd was given.
2200 if test "${enable_slurpd+set}" = set; then
2201   enableval="$enable_slurpd"
2202   
2203         ol_arg=invalid
2204         for ol_val in auto yes no ; do
2205                 if test "$enableval" = "$ol_val" ; then
2206                         ol_arg="$ol_val"
2207                 fi
2208         done
2209         if test "$ol_arg" = "invalid" ; then
2210                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2211         fi
2212         ol_enable_slurpd="$ol_arg"
2213
2214 else
2215         ol_enable_slurpd="auto"
2216 fi
2217 # end --enable-slurpd
2218
2219 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2220 if test "${with_xxliboptions+set}" = set; then
2221   withval="$with_xxliboptions"
2222   :
2223 fi
2224
2225 # Check whether --enable-static or --disable-static was given.
2226 if test "${enable_static+set}" = set; then
2227   enableval="$enable_static"
2228   p=${PACKAGE-default}
2229 case "$enableval" in
2230 yes) enable_static=yes ;;
2231 no) enable_static=no ;;
2232 *)
2233   enable_static=no
2234   # Look at the argument we got.  We use all the common list separators.
2235   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2236   for pkg in $enableval; do
2237     if test "X$pkg" = "X$p"; then
2238       enable_static=yes
2239     fi
2240   done
2241   IFS="$ac_save_ifs"
2242   ;;
2243 esac
2244 else
2245   enable_static=yes
2246 fi
2247
2248 # Check whether --enable-shared or --disable-shared was given.
2249 if test "${enable_shared+set}" = set; then
2250   enableval="$enable_shared"
2251   p=${PACKAGE-default}
2252 case "$enableval" in
2253 yes) enable_shared=yes ;;
2254 no) enable_shared=no ;;
2255 *)
2256   enable_shared=no
2257   # Look at the argument we got.  We use all the common list separators.
2258   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2259   for pkg in $enableval; do
2260     if test "X$pkg" = "X$p"; then
2261       enable_shared=yes
2262     fi
2263   done
2264   IFS="$ac_save_ifs"
2265   ;;
2266 esac
2267 else
2268   enable_shared=yes
2269 fi
2270
2271
2272
2273 # validate options
2274 if test $ol_enable_dns = yes ; then
2275         if test $ol_enable_referrals = no ; then
2276                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2277         fi
2278         if test $ol_enable_referrals = auto ; then
2279                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2280                 ol_enable_referrals=yes
2281         fi
2282 fi
2283
2284 if test $ol_enable_slapd = no ; then
2285                 if test $ol_enable_bdb2 = yes ; then
2286                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2287         fi
2288         if test $ol_enable_ldap = yes ; then
2289                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2290         fi
2291         if test $ol_enable_ldbm = yes ; then
2292                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2293         fi
2294         if test $ol_enable_passwd = yes ; then
2295                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2296         fi
2297         if test $ol_enable_perl = yes ; then
2298                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2299         fi
2300         if test $ol_enable_shell = yes ; then
2301                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2302         fi
2303         if test $ol_enable_tcl = yes ; then
2304                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2305         fi
2306         if test $ol_enable_sql = yes ; then
2307                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2308         fi
2309         if test $ol_enable_modules = yes ; then
2310                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2311         fi
2312         if test $ol_enable_multimaster = yes ; then
2313                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2314         fi
2315         if test $ol_enable_wrappers = yes ; then
2316                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2317         fi
2318         if test $ol_enable_phonetic = yes ; then
2319                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2320         fi
2321         if test $ol_enable_quipu = yes ; then
2322                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2323         fi
2324         if test $ol_enable_rlookups = yes ; then
2325                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2326         fi
2327         if test $ol_enable_aci = yes ; then
2328                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2329         fi
2330         if test $ol_with_ldbm_api != auto ; then
2331                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2332         fi
2333         if test $ol_with_ldbm_type != auto ; then
2334                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2335         fi
2336         if test $ol_with_bdb2_module != static ; then
2337                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2338         fi
2339         if test $ol_with_ldap_module != static ; then
2340                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2341         fi
2342         if test $ol_with_ldbm_module != static ; then
2343                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2344         fi
2345         if test $ol_with_passwd_module != static ; then
2346                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2347         fi
2348         if test $ol_with_perl_module != static ; then
2349                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2350         fi
2351         if test $ol_with_shell_module != static ; then
2352                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2353         fi
2354         if test $ol_with_tcl_module != static ; then
2355                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2356         fi
2357         if test $ol_with_sql_module != static ; then
2358                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2359         fi
2360         if test $ol_enable_slurpd = yes ; then
2361                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2362         fi
2363
2364         # force settings to no
2365         ol_enable_bdb2=no
2366         ol_enable_ldap=no
2367         ol_enable_ldbm=no
2368         ol_enable_passwd=no
2369         ol_enable_perl=no
2370         ol_enable_shell=no
2371         ol_enable_tcl=no
2372         ol_enable_sql=no
2373
2374         ol_enable_modules=no
2375         ol_enable_multimaster=no
2376         ol_enable_phonetic=no
2377         ol_enable_quipu=no
2378         ol_enable_rlookups=no
2379         ol_enable_aci=no
2380         ol_enable_wrappers=no
2381         ol_enable_dynamic=no
2382
2383         ol_with_ldbm_api=no
2384         ol_with_ldbm_type=no
2385
2386         ol_with_bdb2_module=static
2387         ol_with_ldap_module=static
2388         ol_with_ldbm_module=static
2389         ol_with_passwd_module=static
2390         ol_with_perl_module=static
2391         ol_with_shell_module=static
2392         ol_with_tcl_module=static
2393         ol_with_sql_module=static
2394
2395         ol_enable_slurpd=no
2396
2397 elif test $ol_enable_ldbm = no ; then
2398         
2399         if test $ol_with_ldbm_api != auto ; then
2400                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2401         fi
2402
2403         if test $ol_with_ldbm_type != auto ; then
2404                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2405         fi
2406
2407         if test $ol_with_ldbm_module != static ; then
2408                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2409         fi
2410
2411         if test $ol_enable_bdb2 = yes ; then
2412                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2413         fi
2414
2415         if test $ol_enable_modules != yes -a \
2416                 $ol_enable_ldap = no -a \
2417                 $ol_enable_passwd = no -a \
2418                 $ol_enable_perl = no -a \
2419                 $ol_enable_shell = no -a \
2420                 $ol_enable_tcl = no -a \
2421                 $ol_enable_sql = no ; then
2422                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2423         fi
2424
2425         ol_with_ldbm_api=no
2426         ol_with_ldbm_type=no
2427         ol_with_ldbm_module=static
2428
2429 elif test $ol_enable_bdb2 = yes ; then
2430         
2431         if test $ol_with_ldbm_api != auto -a \
2432                 $ol_with_ldbm_api != db2 ; then
2433                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2434         fi
2435
2436         ol_with_ldbm_api=db2
2437
2438 else
2439         
2440         if test $ol_enable_bdb2 != no ; then
2441                 if test $ol_with_ldbm_api != auto -a \
2442                         $ol_with_ldbm_api != db2 ; then
2443                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2444                         ol_enable_bdb2=no
2445                 fi
2446         fi
2447
2448         if test $ol_with_ldbm_api = gdbm -a \
2449                 $ol_with_ldbm_type = btree ; then
2450                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2451         fi
2452         if test $ol_with_ldbm_api = mdbm -a \
2453                 $ol_with_ldbm_type = btree ; then
2454                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2455         fi
2456         if test $ol_with_ldbm_api = ndbm -a \
2457                 $ol_with_ldbm_type = btree ; then
2458                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2459         fi
2460 fi
2461
2462 if test $ol_enable_slurpd = yes ; then
2463                 if test $ol_with_threads = no ; then
2464                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2465         fi
2466 fi
2467
2468 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2469         if test $ol_with_kerberos = no ; then
2470                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2471         fi
2472 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2473         if test $ol_with_kerberos != auto ; then
2474                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2475         else
2476                 ol_with_kerberos=no
2477         fi
2478 fi
2479
2480 echo "$ac_t""done" 1>&6
2481
2482 LDAP_LIBS=
2483 LDIF_LIBS=
2484 LDBM_LIBS=
2485 LTHREAD_LIBS=
2486 LUTIL_LIBS=
2487
2488 LDAPD_LIBS=
2489 SLAPD_LIBS=
2490 SLURPD_LIBS=
2491
2492 BUILD_LDAPD=no
2493 BUILD_SLAPD=no
2494 BUILD_SLURPD=no
2495
2496 BUILD_BDB2=no
2497 BUILD_LDAP=no
2498 BUILD_LDBM=no
2499 BUILD_PASSWD=no
2500 BUILD_PERL=no
2501 BUILD_QUIPU=no
2502 BUILD_SHELL=no
2503 BUILD_TCL=no
2504 BUILD_SQL=no
2505 BUILD_THREAD=no
2506
2507 BUILD_BDB2_DYNAMIC=static
2508 BUILD_LDAP_DYNAMIC=static
2509 BUILD_LDBM_DYNAMIC=static
2510 BUILD_PASSWD_DYNAMIC=static
2511 BUILD_PERL_DYNAMIC=static
2512 BUILD_SHELL_DYNAMIC=static
2513 BUILD_TCL_DYNAMIC=static
2514 BUILD_SQL_DYNAMIC=static
2515
2516 SLAPD_MODULES_LDFLAGS=
2517 SLAPD_MODULES_CPPFLAGS=
2518 SLAPD_MODULES_LIST=
2519
2520 SLAPD_PERL_LDFLAGS=
2521 MOD_PERL_LDFLAGS=
2522 PERL_CPPFLAGS=
2523
2524 SLAPD_SQL_LDFLAGS=
2525 SLAPD_SQL_LIBS=
2526 SLAPD_SQL_INCLUDES=
2527
2528 MOD_TCL_LIB=
2529 KRB4_LIBS=
2530 KRB5_LIBS=
2531 READLINE_LIBS=
2532 SASL_LIBS=
2533 TERMCAP_LIBS=
2534 TLS_LIBS=
2535 MODULES_LIBS=
2536
2537
2538
2539 cat >> confdefs.h <<\EOF
2540 #define HAVE_MKVERSION 1
2541 EOF
2542
2543
2544
2545
2546 ol_aix_threads=no
2547 case "$target" in
2548 *-*-aix*)       if test -z "$CC" ; then
2549                 case "$ol_with_threads" in
2550                 auto | yes |  posix) ol_aix_threads=yes ;;
2551                 esac
2552         fi
2553 ;;
2554 esac
2555
2556 if test $ol_aix_threads = yes ; then
2557         if test -z "${CC}" ; then
2558                 for ac_prog in cc_r xlc_r cc
2559 do
2560 # Extract the first word of "$ac_prog", so it can be a program name with args.
2561 set dummy $ac_prog; ac_word=$2
2562 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2563 echo "configure:2564: checking for $ac_word" >&5
2564 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2565   echo $ac_n "(cached) $ac_c" 1>&6
2566 else
2567   if test -n "$CC"; then
2568   ac_cv_prog_CC="$CC" # Let the user override the test.
2569 else
2570   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2571   ac_dummy="$PATH"
2572   for ac_dir in $ac_dummy; do
2573     test -z "$ac_dir" && ac_dir=.
2574     if test -f $ac_dir/$ac_word; then
2575       ac_cv_prog_CC="$ac_prog"
2576       break
2577     fi
2578   done
2579   IFS="$ac_save_ifs"
2580 fi
2581 fi
2582 CC="$ac_cv_prog_CC"
2583 if test -n "$CC"; then
2584   echo "$ac_t""$CC" 1>&6
2585 else
2586   echo "$ac_t""no" 1>&6
2587 fi
2588
2589 test -n "$CC" && break
2590 done
2591
2592
2593                 if test "$CC" = cc ; then
2594                                                 if test $ol_with_threads != auto ; then
2595                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2596                         else
2597                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2598                         fi
2599                         ol_with_threads=no
2600                 fi
2601         fi
2602
2603         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2604                 ol_with_threads=posix
2605                 ol_cv_pthread_create=yes
2606         fi
2607 fi
2608
2609 if test -z "${CC}"; then
2610         for ac_prog in cc
2611 do
2612 # Extract the first word of "$ac_prog", so it can be a program name with args.
2613 set dummy $ac_prog; 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_CC+set}\" = set"; then
2617   echo $ac_n "(cached) $ac_c" 1>&6
2618 else
2619   if test -n "$CC"; then
2620   ac_cv_prog_CC="$CC" # 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_CC="$ac_prog"
2628       break
2629     fi
2630   done
2631   IFS="$ac_save_ifs"
2632 fi
2633 fi
2634 CC="$ac_cv_prog_CC"
2635 if test -n "$CC"; then
2636   echo "$ac_t""$CC" 1>&6
2637 else
2638   echo "$ac_t""no" 1>&6
2639 fi
2640
2641 test -n "$CC" && break
2642 done
2643
2644 fi
2645
2646
2647
2648
2649 # Check whether --enable-fast-install or --disable-fast-install was given.
2650 if test "${enable_fast_install+set}" = set; then
2651   enableval="$enable_fast_install"
2652   p=${PACKAGE-default}
2653 case "$enableval" in
2654 yes) enable_fast_install=yes ;;
2655 no) enable_fast_install=no ;;
2656 *)
2657   enable_fast_install=no
2658   # Look at the argument we got.  We use all the common list separators.
2659   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2660   for pkg in $enableval; do
2661     if test "X$pkg" = "X$p"; then
2662       enable_fast_install=yes
2663     fi
2664   done
2665   IFS="$ac_save_ifs"
2666   ;;
2667 esac
2668 else
2669   enable_fast_install=yes
2670 fi
2671
2672 # Extract the first word of "ranlib", so it can be a program name with args.
2673 set dummy ranlib; 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_RANLIB+set}\" = set"; then
2677   echo $ac_n "(cached) $ac_c" 1>&6
2678 else
2679   if test -n "$RANLIB"; then
2680   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2681 else
2682   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2683   ac_dummy="$PATH"
2684   for ac_dir in $ac_dummy; do
2685     test -z "$ac_dir" && ac_dir=.
2686     if test -f $ac_dir/$ac_word; then
2687       ac_cv_prog_RANLIB="ranlib"
2688       break
2689     fi
2690   done
2691   IFS="$ac_save_ifs"
2692   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2693 fi
2694 fi
2695 RANLIB="$ac_cv_prog_RANLIB"
2696 if test -n "$RANLIB"; then
2697   echo "$ac_t""$RANLIB" 1>&6
2698 else
2699   echo "$ac_t""no" 1>&6
2700 fi
2701
2702 # Extract the first word of "gcc", so it can be a program name with args.
2703 set dummy gcc; ac_word=$2
2704 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2705 echo "configure:2706: checking for $ac_word" >&5
2706 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2707   echo $ac_n "(cached) $ac_c" 1>&6
2708 else
2709   if test -n "$CC"; then
2710   ac_cv_prog_CC="$CC" # Let the user override the test.
2711 else
2712   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2713   ac_dummy="$PATH"
2714   for ac_dir in $ac_dummy; do
2715     test -z "$ac_dir" && ac_dir=.
2716     if test -f $ac_dir/$ac_word; then
2717       ac_cv_prog_CC="gcc"
2718       break
2719     fi
2720   done
2721   IFS="$ac_save_ifs"
2722 fi
2723 fi
2724 CC="$ac_cv_prog_CC"
2725 if test -n "$CC"; then
2726   echo "$ac_t""$CC" 1>&6
2727 else
2728   echo "$ac_t""no" 1>&6
2729 fi
2730
2731 if test -z "$CC"; then
2732   # Extract the first word of "cc", so it can be a program name with args.
2733 set dummy cc; ac_word=$2
2734 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2735 echo "configure:2736: checking for $ac_word" >&5
2736 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2737   echo $ac_n "(cached) $ac_c" 1>&6
2738 else
2739   if test -n "$CC"; then
2740   ac_cv_prog_CC="$CC" # Let the user override the test.
2741 else
2742   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2743   ac_prog_rejected=no
2744   ac_dummy="$PATH"
2745   for ac_dir in $ac_dummy; do
2746     test -z "$ac_dir" && ac_dir=.
2747     if test -f $ac_dir/$ac_word; then
2748       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2749         ac_prog_rejected=yes
2750         continue
2751       fi
2752       ac_cv_prog_CC="cc"
2753       break
2754     fi
2755   done
2756   IFS="$ac_save_ifs"
2757 if test $ac_prog_rejected = yes; then
2758   # We found a bogon in the path, so make sure we never use it.
2759   set dummy $ac_cv_prog_CC
2760   shift
2761   if test $# -gt 0; then
2762     # We chose a different compiler from the bogus one.
2763     # However, it has the same basename, so the bogon will be chosen
2764     # first if we set CC to just the basename; use the full file name.
2765     shift
2766     set dummy "$ac_dir/$ac_word" "$@"
2767     shift
2768     ac_cv_prog_CC="$@"
2769   fi
2770 fi
2771 fi
2772 fi
2773 CC="$ac_cv_prog_CC"
2774 if test -n "$CC"; then
2775   echo "$ac_t""$CC" 1>&6
2776 else
2777   echo "$ac_t""no" 1>&6
2778 fi
2779
2780   if test -z "$CC"; then
2781     case "`uname -s`" in
2782     *win32* | *WIN32* | *CYGWIN*)
2783       # Extract the first word of "cl", so it can be a program name with args.
2784 set dummy cl; ac_word=$2
2785 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2786 echo "configure:2787: checking for $ac_word" >&5
2787 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2788   echo $ac_n "(cached) $ac_c" 1>&6
2789 else
2790   if test -n "$CC"; then
2791   ac_cv_prog_CC="$CC" # Let the user override the test.
2792 else
2793   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2794   ac_dummy="$PATH"
2795   for ac_dir in $ac_dummy; do
2796     test -z "$ac_dir" && ac_dir=.
2797     if test -f $ac_dir/$ac_word; then
2798       ac_cv_prog_CC="cl"
2799       break
2800     fi
2801   done
2802   IFS="$ac_save_ifs"
2803 fi
2804 fi
2805 CC="$ac_cv_prog_CC"
2806 if test -n "$CC"; then
2807   echo "$ac_t""$CC" 1>&6
2808 else
2809   echo "$ac_t""no" 1>&6
2810 fi
2811  ;;
2812     esac
2813   fi
2814   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2815 fi
2816
2817 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2818 echo "configure:2819: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2819
2820 ac_ext=c
2821 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2822 ac_cpp='$CPP $CPPFLAGS'
2823 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2824 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2825 cross_compiling=$ac_cv_prog_cc_cross
2826
2827 cat > conftest.$ac_ext << EOF
2828
2829 #line 2830 "configure"
2830 #include "confdefs.h"
2831
2832 main(){return(0);}
2833 EOF
2834 if { (eval echo configure:2835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2835   ac_cv_prog_cc_works=yes
2836   # If we can't run a trivial program, we are probably using a cross compiler.
2837   if (./conftest; exit) 2>/dev/null; then
2838     ac_cv_prog_cc_cross=no
2839   else
2840     ac_cv_prog_cc_cross=yes
2841   fi
2842 else
2843   echo "configure: failed program was:" >&5
2844   cat conftest.$ac_ext >&5
2845   ac_cv_prog_cc_works=no
2846 fi
2847 rm -fr conftest*
2848 ac_ext=c
2849 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2850 ac_cpp='$CPP $CPPFLAGS'
2851 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2852 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2853 cross_compiling=$ac_cv_prog_cc_cross
2854
2855 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2856 if test $ac_cv_prog_cc_works = no; then
2857   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2858 fi
2859 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2860 echo "configure:2861: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2861 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2862 cross_compiling=$ac_cv_prog_cc_cross
2863
2864 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2865 echo "configure:2866: checking whether we are using GNU C" >&5
2866 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2867   echo $ac_n "(cached) $ac_c" 1>&6
2868 else
2869   cat > conftest.c <<EOF
2870 #ifdef __GNUC__
2871   yes;
2872 #endif
2873 EOF
2874 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2875   ac_cv_prog_gcc=yes
2876 else
2877   ac_cv_prog_gcc=no
2878 fi
2879 fi
2880
2881 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2882
2883 if test $ac_cv_prog_gcc = yes; then
2884   GCC=yes
2885 else
2886   GCC=
2887 fi
2888
2889 ac_test_CFLAGS="${CFLAGS+set}"
2890 ac_save_CFLAGS="$CFLAGS"
2891 CFLAGS=
2892 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2893 echo "configure:2894: checking whether ${CC-cc} accepts -g" >&5
2894 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2895   echo $ac_n "(cached) $ac_c" 1>&6
2896 else
2897   echo 'void f(){}' > conftest.c
2898 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2899   ac_cv_prog_cc_g=yes
2900 else
2901   ac_cv_prog_cc_g=no
2902 fi
2903 rm -f conftest*
2904
2905 fi
2906
2907 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2908 if test "$ac_test_CFLAGS" = set; then
2909   CFLAGS="$ac_save_CFLAGS"
2910 elif test $ac_cv_prog_cc_g = yes; then
2911   if test "$GCC" = yes; then
2912     CFLAGS="-g -O2"
2913   else
2914     CFLAGS="-g"
2915   fi
2916 else
2917   if test "$GCC" = yes; then
2918     CFLAGS="-O2"
2919   else
2920     CFLAGS=
2921   fi
2922 fi
2923
2924 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2925 if test "${with_gnu_ld+set}" = set; then
2926   withval="$with_gnu_ld"
2927   test "$withval" = no || with_gnu_ld=yes
2928 else
2929   with_gnu_ld=no
2930 fi
2931
2932 ac_prog=ld
2933 if test "$ac_cv_prog_gcc" = yes; then
2934   # Check if gcc -print-prog-name=ld gives a path.
2935   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2936 echo "configure:2937: checking for ld used by GCC" >&5
2937   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2938   case "$ac_prog" in
2939     # Accept absolute paths.
2940     [\\/]* | [A-Za-z]:[\\/]*)
2941       re_direlt='/[^/][^/]*/\.\./'
2942       # Canonicalize the path of ld
2943       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2944       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2945         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2946       done
2947       test -z "$LD" && LD="$ac_prog"
2948       ;;
2949   "")
2950     # If it fails, then pretend we aren't using GCC.
2951     ac_prog=ld
2952     ;;
2953   *)
2954     # If it is relative, then search for the first ld in PATH.
2955     with_gnu_ld=unknown
2956     ;;
2957   esac
2958 elif test "$with_gnu_ld" = yes; then
2959   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2960 echo "configure:2961: checking for GNU ld" >&5
2961 else
2962   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2963 echo "configure:2964: checking for non-GNU ld" >&5
2964 fi
2965 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2966   echo $ac_n "(cached) $ac_c" 1>&6
2967 else
2968   if test -z "$LD"; then
2969   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2970   for ac_dir in $PATH; do
2971     test -z "$ac_dir" && ac_dir=.
2972     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2973       ac_cv_path_LD="$ac_dir/$ac_prog"
2974       # Check to see if the program is GNU ld.  I'd rather use --version,
2975       # but apparently some GNU ld's only accept -v.
2976       # Break only if it was the GNU/non-GNU ld that we prefer.
2977       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2978         test "$with_gnu_ld" != no && break
2979       else
2980         test "$with_gnu_ld" != yes && break
2981       fi
2982     fi
2983   done
2984   IFS="$ac_save_ifs"
2985 else
2986   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2987 fi
2988 fi
2989
2990 LD="$ac_cv_path_LD"
2991 if test -n "$LD"; then
2992   echo "$ac_t""$LD" 1>&6
2993 else
2994   echo "$ac_t""no" 1>&6
2995 fi
2996 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2997
2998 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2999 echo "configure:3000: checking if the linker ($LD) is GNU ld" >&5
3000 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3001   echo $ac_n "(cached) $ac_c" 1>&6
3002 else
3003   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3004 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3005   ac_cv_prog_gnu_ld=yes
3006 else
3007   ac_cv_prog_gnu_ld=no
3008 fi
3009 fi
3010
3011 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3012
3013
3014 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3015 echo "configure:3016: checking for BSD-compatible nm" >&5
3016 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3017   echo $ac_n "(cached) $ac_c" 1>&6
3018 else
3019   if test -n "$NM"; then
3020   # Let the user override the test.
3021   ac_cv_path_NM="$NM"
3022 else
3023   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3024   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3025     test -z "$ac_dir" && ac_dir=.
3026     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3027       # Check to see if the nm accepts a BSD-compat flag.
3028       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3029       #   nm: unknown option "B" ignored
3030       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3031         ac_cv_path_NM="$ac_dir/nm -B"
3032         break
3033       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3034         ac_cv_path_NM="$ac_dir/nm -p"
3035         break
3036       else
3037         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3038         continue # so that we can try to find one that supports BSD flags
3039       fi
3040     fi
3041   done
3042   IFS="$ac_save_ifs"
3043   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3044 fi
3045 fi
3046
3047 NM="$ac_cv_path_NM"
3048 echo "$ac_t""$NM" 1>&6
3049
3050
3051 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3052 echo "configure:3053: checking whether ln -s works" >&5
3053 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3054   echo $ac_n "(cached) $ac_c" 1>&6
3055 else
3056   rm -f conftestdata
3057 if ln -s X conftestdata 2>/dev/null
3058 then
3059   rm -f conftestdata
3060   ac_cv_prog_LN_S="ln -s"
3061 else
3062   ac_cv_prog_LN_S=ln
3063 fi
3064 fi
3065 LN_S="$ac_cv_prog_LN_S"
3066 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3067   echo "$ac_t""yes" 1>&6
3068 else
3069   echo "$ac_t""no" 1>&6
3070 fi
3071
3072 if test $host != $build; then
3073   ac_tool_prefix=${host_alias}-
3074 else
3075   ac_tool_prefix=
3076 fi
3077
3078
3079 # Check for any special flags to pass to ltconfig.
3080 libtool_flags="--cache-file=$cache_file"
3081 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3082 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3083 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3084 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3085 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3086 libtool_flags="$libtool_flags --enable-dlopen"
3087 libtool_flags="$libtool_flags --enable-win32-dll"
3088 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3089 if test "${enable_libtool_lock+set}" = set; then
3090   enableval="$enable_libtool_lock"
3091   :
3092 fi
3093
3094 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3095 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3096
3097 # Some flags need to be propagated to the compiler or linker for good
3098 # libtool support.
3099 case "$host" in
3100 *-*-irix6*)
3101   # Find out which ABI we are using.
3102   echo '#line 3103 "configure"' > conftest.$ac_ext
3103   if { (eval echo configure:3104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3104     case "`/usr/bin/file conftest.o`" in
3105     *32-bit*)
3106       LD="${LD-ld} -32"
3107       ;;
3108     *N32*)
3109       LD="${LD-ld} -n32"
3110       ;;
3111     *64-bit*)
3112       LD="${LD-ld} -64"
3113       ;;
3114     esac
3115   fi
3116   rm -rf conftest*
3117   ;;
3118
3119 *-*-sco3.2v5*)
3120   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3121   SAVE_CFLAGS="$CFLAGS"
3122   CFLAGS="$CFLAGS -belf"
3123   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3124 echo "configure:3125: checking whether the C compiler needs -belf" >&5
3125 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3126   echo $ac_n "(cached) $ac_c" 1>&6
3127 else
3128   cat > conftest.$ac_ext <<EOF
3129 #line 3130 "configure"
3130 #include "confdefs.h"
3131
3132 int main() {
3133
3134 ; return 0; }
3135 EOF
3136 if { (eval echo configure:3137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3137   rm -rf conftest*
3138   lt_cv_cc_needs_belf=yes
3139 else
3140   echo "configure: failed program was:" >&5
3141   cat conftest.$ac_ext >&5
3142   rm -rf conftest*
3143   lt_cv_cc_needs_belf=no
3144 fi
3145 rm -f conftest*
3146 fi
3147
3148 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3149   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3150     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3151     CFLAGS="$SAVE_CFLAGS"
3152   fi
3153   ;;
3154
3155 *-*-cygwin* | *-*-mingw*)
3156   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3157 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3158 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3159 echo "configure:3160: checking for $ac_word" >&5
3160 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3161   echo $ac_n "(cached) $ac_c" 1>&6
3162 else
3163   if test -n "$DLLTOOL"; then
3164   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3165 else
3166   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3167   ac_dummy="$PATH"
3168   for ac_dir in $ac_dummy; do
3169     test -z "$ac_dir" && ac_dir=.
3170     if test -f $ac_dir/$ac_word; then
3171       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3172       break
3173     fi
3174   done
3175   IFS="$ac_save_ifs"
3176 fi
3177 fi
3178 DLLTOOL="$ac_cv_prog_DLLTOOL"
3179 if test -n "$DLLTOOL"; then
3180   echo "$ac_t""$DLLTOOL" 1>&6
3181 else
3182   echo "$ac_t""no" 1>&6
3183 fi
3184
3185
3186 if test -z "$ac_cv_prog_DLLTOOL"; then
3187 if test -n "$ac_tool_prefix"; then
3188   # Extract the first word of "dlltool", so it can be a program name with args.
3189 set dummy dlltool; ac_word=$2
3190 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3191 echo "configure:3192: checking for $ac_word" >&5
3192 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3193   echo $ac_n "(cached) $ac_c" 1>&6
3194 else
3195   if test -n "$DLLTOOL"; then
3196   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3197 else
3198   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3199   ac_dummy="$PATH"
3200   for ac_dir in $ac_dummy; do
3201     test -z "$ac_dir" && ac_dir=.
3202     if test -f $ac_dir/$ac_word; then
3203       ac_cv_prog_DLLTOOL="dlltool"
3204       break
3205     fi
3206   done
3207   IFS="$ac_save_ifs"
3208   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3209 fi
3210 fi
3211 DLLTOOL="$ac_cv_prog_DLLTOOL"
3212 if test -n "$DLLTOOL"; then
3213   echo "$ac_t""$DLLTOOL" 1>&6
3214 else
3215   echo "$ac_t""no" 1>&6
3216 fi
3217
3218 else
3219   DLLTOOL="false"
3220 fi
3221 fi
3222
3223   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3224 set dummy ${ac_tool_prefix}as; ac_word=$2
3225 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3226 echo "configure:3227: checking for $ac_word" >&5
3227 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3228   echo $ac_n "(cached) $ac_c" 1>&6
3229 else
3230   if test -n "$AS"; then
3231   ac_cv_prog_AS="$AS" # Let the user override the test.
3232 else
3233   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3234   ac_dummy="$PATH"
3235   for ac_dir in $ac_dummy; do
3236     test -z "$ac_dir" && ac_dir=.
3237     if test -f $ac_dir/$ac_word; then
3238       ac_cv_prog_AS="${ac_tool_prefix}as"
3239       break
3240     fi
3241   done
3242   IFS="$ac_save_ifs"
3243 fi
3244 fi
3245 AS="$ac_cv_prog_AS"
3246 if test -n "$AS"; then
3247   echo "$ac_t""$AS" 1>&6
3248 else
3249   echo "$ac_t""no" 1>&6
3250 fi
3251
3252
3253 if test -z "$ac_cv_prog_AS"; then
3254 if test -n "$ac_tool_prefix"; then
3255   # Extract the first word of "as", so it can be a program name with args.
3256 set dummy as; ac_word=$2
3257 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3258 echo "configure:3259: checking for $ac_word" >&5
3259 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3260   echo $ac_n "(cached) $ac_c" 1>&6
3261 else
3262   if test -n "$AS"; then
3263   ac_cv_prog_AS="$AS" # Let the user override the test.
3264 else
3265   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3266   ac_dummy="$PATH"
3267   for ac_dir in $ac_dummy; do
3268     test -z "$ac_dir" && ac_dir=.
3269     if test -f $ac_dir/$ac_word; then
3270       ac_cv_prog_AS="as"
3271       break
3272     fi
3273   done
3274   IFS="$ac_save_ifs"
3275   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3276 fi
3277 fi
3278 AS="$ac_cv_prog_AS"
3279 if test -n "$AS"; then
3280   echo "$ac_t""$AS" 1>&6
3281 else
3282   echo "$ac_t""no" 1>&6
3283 fi
3284
3285 else
3286   AS="false"
3287 fi
3288 fi
3289
3290   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3291 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3292 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3293 echo "configure:3294: checking for $ac_word" >&5
3294 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3295   echo $ac_n "(cached) $ac_c" 1>&6
3296 else
3297   if test -n "$OBJDUMP"; then
3298   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3299 else
3300   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3301   ac_dummy="$PATH"
3302   for ac_dir in $ac_dummy; do
3303     test -z "$ac_dir" && ac_dir=.
3304     if test -f $ac_dir/$ac_word; then
3305       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3306       break
3307     fi
3308   done
3309   IFS="$ac_save_ifs"
3310 fi
3311 fi
3312 OBJDUMP="$ac_cv_prog_OBJDUMP"
3313 if test -n "$OBJDUMP"; then
3314   echo "$ac_t""$OBJDUMP" 1>&6
3315 else
3316   echo "$ac_t""no" 1>&6
3317 fi
3318
3319
3320 if test -z "$ac_cv_prog_OBJDUMP"; then
3321 if test -n "$ac_tool_prefix"; then
3322   # Extract the first word of "objdump", so it can be a program name with args.
3323 set dummy objdump; ac_word=$2
3324 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3325 echo "configure:3326: checking for $ac_word" >&5
3326 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3327   echo $ac_n "(cached) $ac_c" 1>&6
3328 else
3329   if test -n "$OBJDUMP"; then
3330   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3331 else
3332   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3333   ac_dummy="$PATH"
3334   for ac_dir in $ac_dummy; do
3335     test -z "$ac_dir" && ac_dir=.
3336     if test -f $ac_dir/$ac_word; then
3337       ac_cv_prog_OBJDUMP="objdump"
3338       break
3339     fi
3340   done
3341   IFS="$ac_save_ifs"
3342   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3343 fi
3344 fi
3345 OBJDUMP="$ac_cv_prog_OBJDUMP"
3346 if test -n "$OBJDUMP"; then
3347   echo "$ac_t""$OBJDUMP" 1>&6
3348 else
3349   echo "$ac_t""no" 1>&6
3350 fi
3351
3352 else
3353   OBJDUMP="false"
3354 fi
3355 fi
3356
3357   ;;
3358
3359 esac
3360
3361
3362 # Save cache, so that ltconfig can load it
3363
3364
3365 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3366 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3367 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3368 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3369 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3370 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3371 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3372 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3373
3374 # Reload cache, that may have been modified by ltconfig
3375
3376
3377 # This can be used to rebuild libtool when needed
3378 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3379
3380 # Always use our own libtool.
3381 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3382
3383 # Redirect the config.log output again, so that the ltconfig log is not
3384 # clobbered by the next message.
3385 exec 5>>./config.log
3386
3387
3388 for ac_prog in mawk gawk nawk awk
3389 do
3390 # Extract the first word of "$ac_prog", so it can be a program name with args.
3391 set dummy $ac_prog; ac_word=$2
3392 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3393 echo "configure:3394: checking for $ac_word" >&5
3394 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3395   echo $ac_n "(cached) $ac_c" 1>&6
3396 else
3397   if test -n "$AWK"; then
3398   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3399 else
3400   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3401   ac_dummy="$PATH"
3402   for ac_dir in $ac_dummy; do
3403     test -z "$ac_dir" && ac_dir=.
3404     if test -f $ac_dir/$ac_word; then
3405       ac_cv_prog_AWK="$ac_prog"
3406       break
3407     fi
3408   done
3409   IFS="$ac_save_ifs"
3410 fi
3411 fi
3412 AWK="$ac_cv_prog_AWK"
3413 if test -n "$AWK"; then
3414   echo "$ac_t""$AWK" 1>&6
3415 else
3416   echo "$ac_t""no" 1>&6
3417 fi
3418
3419 test -n "$AWK" && break
3420 done
3421
3422 # test for ln hardlink support
3423 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3424 echo "configure:3425: checking whether ln works" >&5
3425 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3426   echo $ac_n "(cached) $ac_c" 1>&6
3427 else
3428   rm -f conftest.src conftest.dst
3429 echo "conftest" > conftest.src
3430 if ln conftest.src conftest.dst 2>/dev/null
3431 then
3432   ol_cv_prog_LN_H="ln"
3433 else
3434   ol_cv_prog_LN_H="cp"
3435 fi
3436 rm -f conftest.src conftest.dst
3437
3438 fi
3439 LN_H="$ol_cv_prog_LN_H"
3440 if test "$ol_cv_prog_LN_H" = "ln"; then
3441         echo "$ac_t""yes" 1>&6
3442 else
3443         echo "$ac_t""no" 1>&6
3444 fi
3445
3446 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3447 echo "configure:3448: checking whether ln -s works" >&5
3448 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3449   echo $ac_n "(cached) $ac_c" 1>&6
3450 else
3451   rm -f conftestdata
3452 if ln -s X conftestdata 2>/dev/null
3453 then
3454   rm -f conftestdata
3455   ac_cv_prog_LN_S="ln -s"
3456 else
3457   ac_cv_prog_LN_S=ln
3458 fi
3459 fi
3460 LN_S="$ac_cv_prog_LN_S"
3461 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3462   echo "$ac_t""yes" 1>&6
3463 else
3464   echo "$ac_t""no" 1>&6
3465 fi
3466
3467
3468 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3469         LN_S="$LN_H"
3470 fi
3471
3472 # Extract the first word of "sendmail", so it can be a program name with args.
3473 set dummy sendmail; ac_word=$2
3474 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3475 echo "configure:3476: checking for $ac_word" >&5
3476 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3477   echo $ac_n "(cached) $ac_c" 1>&6
3478 else
3479   case "$SENDMAIL" in
3480   /*)
3481   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3482   ;;
3483   ?:/*)
3484   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3485   ;;
3486   *)
3487   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3488   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3489   for ac_dir in $ac_dummy; do 
3490     test -z "$ac_dir" && ac_dir=.
3491     if test -f $ac_dir/$ac_word; then
3492       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3493       break
3494     fi
3495   done
3496   IFS="$ac_save_ifs"
3497   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3498   ;;
3499 esac
3500 fi
3501 SENDMAIL="$ac_cv_path_SENDMAIL"
3502 if test -n "$SENDMAIL"; then
3503   echo "$ac_t""$SENDMAIL" 1>&6
3504 else
3505   echo "$ac_t""no" 1>&6
3506 fi
3507
3508 # Extract the first word of "vi", so it can be a program name with args.
3509 set dummy vi; ac_word=$2
3510 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3511 echo "configure:3512: checking for $ac_word" >&5
3512 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515   case "$EDITOR" in
3516   /*)
3517   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3518   ;;
3519   ?:/*)
3520   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3521   ;;
3522   *)
3523   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3524   ac_dummy="$PATH:/usr/ucb"
3525   for ac_dir in $ac_dummy; do 
3526     test -z "$ac_dir" && ac_dir=.
3527     if test -f $ac_dir/$ac_word; then
3528       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3529       break
3530     fi
3531   done
3532   IFS="$ac_save_ifs"
3533   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3534   ;;
3535 esac
3536 fi
3537 EDITOR="$ac_cv_path_EDITOR"
3538 if test -n "$EDITOR"; then
3539   echo "$ac_t""$EDITOR" 1>&6
3540 else
3541   echo "$ac_t""no" 1>&6
3542 fi
3543
3544 # Extract the first word of "finger", so it can be a program name with args.
3545 set dummy finger; ac_word=$2
3546 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3547 echo "configure:3548: checking for $ac_word" >&5
3548 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3549   echo $ac_n "(cached) $ac_c" 1>&6
3550 else
3551   case "$FINGER" in
3552   /*)
3553   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3554   ;;
3555   ?:/*)
3556   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3557   ;;
3558   *)
3559   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3560   ac_dummy="$PATH:/usr/ucb"
3561   for ac_dir in $ac_dummy; do 
3562     test -z "$ac_dir" && ac_dir=.
3563     if test -f $ac_dir/$ac_word; then
3564       ac_cv_path_FINGER="$ac_dir/$ac_word"
3565       break
3566     fi
3567   done
3568   IFS="$ac_save_ifs"
3569   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3570   ;;
3571 esac
3572 fi
3573 FINGER="$ac_cv_path_FINGER"
3574 if test -n "$FINGER"; then
3575   echo "$ac_t""$FINGER" 1>&6
3576 else
3577   echo "$ac_t""no" 1>&6
3578 fi
3579
3580
3581 ol_link_perl=no
3582 if test $ol_enable_perl != no ; then
3583         # Extract the first word of "perl", so it can be a program name with args.
3584 set dummy perl; ac_word=$2
3585 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3586 echo "configure:3587: checking for $ac_word" >&5
3587 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3588   echo $ac_n "(cached) $ac_c" 1>&6
3589 else
3590   case "$PERLBIN" in
3591   /*)
3592   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3593   ;;
3594   ?:/*)
3595   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3596   ;;
3597   *)
3598   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3599   ac_dummy="$PATH"
3600   for ac_dir in $ac_dummy; do 
3601     test -z "$ac_dir" && ac_dir=.
3602     if test -f $ac_dir/$ac_word; then
3603       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3604       break
3605     fi
3606   done
3607   IFS="$ac_save_ifs"
3608   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3609   ;;
3610 esac
3611 fi
3612 PERLBIN="$ac_cv_path_PERLBIN"
3613 if test -n "$PERLBIN"; then
3614   echo "$ac_t""$PERLBIN" 1>&6
3615 else
3616   echo "$ac_t""no" 1>&6
3617 fi
3618
3619
3620         if test "no$PERLBIN" = "no" ; then
3621                 if test $ol_enable_perl = yes ; then
3622                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3623                 fi
3624
3625         else
3626                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3627                 if test x"$ol_with_perl_module" = "xstatic" ; then
3628                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3629                 else
3630                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3631                 fi
3632                                 ol_link_perl=yes
3633         fi
3634 fi
3635
3636 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3637 echo "configure:3638: checking how to run the C preprocessor" >&5
3638 # On Suns, sometimes $CPP names a directory.
3639 if test -n "$CPP" && test -d "$CPP"; then
3640   CPP=
3641 fi
3642 if test -z "$CPP"; then
3643 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3644   echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646     # This must be in double quotes, not single quotes, because CPP may get
3647   # substituted into the Makefile and "${CC-cc}" will confuse make.
3648   CPP="${CC-cc} -E"
3649   # On the NeXT, cc -E runs the code through the compiler's parser,
3650   # not just through cpp.
3651   cat > conftest.$ac_ext <<EOF
3652 #line 3653 "configure"
3653 #include "confdefs.h"
3654 #include <assert.h>
3655 Syntax Error
3656 EOF
3657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3658 { (eval echo configure:3659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3660 if test -z "$ac_err"; then
3661   :
3662 else
3663   echo "$ac_err" >&5
3664   echo "configure: failed program was:" >&5
3665   cat conftest.$ac_ext >&5
3666   rm -rf conftest*
3667   CPP="${CC-cc} -E -traditional-cpp"
3668   cat > conftest.$ac_ext <<EOF
3669 #line 3670 "configure"
3670 #include "confdefs.h"
3671 #include <assert.h>
3672 Syntax Error
3673 EOF
3674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3675 { (eval echo configure:3676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3677 if test -z "$ac_err"; then
3678   :
3679 else
3680   echo "$ac_err" >&5
3681   echo "configure: failed program was:" >&5
3682   cat conftest.$ac_ext >&5
3683   rm -rf conftest*
3684   CPP="${CC-cc} -nologo -E"
3685   cat > conftest.$ac_ext <<EOF
3686 #line 3687 "configure"
3687 #include "confdefs.h"
3688 #include <assert.h>
3689 Syntax Error
3690 EOF
3691 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3692 { (eval echo configure:3693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3693 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3694 if test -z "$ac_err"; then
3695   :
3696 else
3697   echo "$ac_err" >&5
3698   echo "configure: failed program was:" >&5
3699   cat conftest.$ac_ext >&5
3700   rm -rf conftest*
3701   CPP=/lib/cpp
3702 fi
3703 rm -f conftest*
3704 fi
3705 rm -f conftest*
3706 fi
3707 rm -f conftest*
3708   ac_cv_prog_CPP="$CPP"
3709 fi
3710   CPP="$ac_cv_prog_CPP"
3711 else
3712   ac_cv_prog_CPP="$CPP"
3713 fi
3714 echo "$ac_t""$CPP" 1>&6
3715
3716
3717 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3718         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3719
3720 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3721         echo "configure: warning: programs compiled here do run here..." 1>&2
3722         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3723
3724 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3725         echo "configure: warning: programs compiled here do not run here..." 1>&2
3726         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3727 fi
3728
3729 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3730 echo "configure:3731: checking for AIX" >&5
3731 cat > conftest.$ac_ext <<EOF
3732 #line 3733 "configure"
3733 #include "confdefs.h"
3734 #ifdef _AIX
3735   yes
3736 #endif
3737
3738 EOF
3739 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3740   egrep "yes" >/dev/null 2>&1; then
3741   rm -rf conftest*
3742   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3743 #define _ALL_SOURCE 1
3744 EOF
3745
3746 else
3747   rm -rf conftest*
3748   echo "$ac_t""no" 1>&6
3749 fi
3750 rm -f conftest*
3751
3752
3753 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3754 echo "configure:3755: checking for POSIXized ISC" >&5
3755 if test -d /etc/conf/kconfig.d &&
3756   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3757 then
3758   echo "$ac_t""yes" 1>&6
3759   ISC=yes # If later tests want to check for ISC.
3760   cat >> confdefs.h <<\EOF
3761 #define _POSIX_SOURCE 1
3762 EOF
3763
3764   if test "$GCC" = yes; then
3765     CC="$CC -posix"
3766   else
3767     CC="$CC -Xp"
3768   fi
3769 else
3770   echo "$ac_t""no" 1>&6
3771   ISC=
3772 fi
3773
3774 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3775 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3776 echo "configure:3777: checking for minix/config.h" >&5
3777 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3778   echo $ac_n "(cached) $ac_c" 1>&6
3779 else
3780   cat > conftest.$ac_ext <<EOF
3781 #line 3782 "configure"
3782 #include "confdefs.h"
3783 #include <minix/config.h>
3784 EOF
3785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3786 { (eval echo configure:3787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3788 if test -z "$ac_err"; then
3789   rm -rf conftest*
3790   eval "ac_cv_header_$ac_safe=yes"
3791 else
3792   echo "$ac_err" >&5
3793   echo "configure: failed program was:" >&5
3794   cat conftest.$ac_ext >&5
3795   rm -rf conftest*
3796   eval "ac_cv_header_$ac_safe=no"
3797 fi
3798 rm -f conftest*
3799 fi
3800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3801   echo "$ac_t""yes" 1>&6
3802   MINIX=yes
3803 else
3804   echo "$ac_t""no" 1>&6
3805 MINIX=
3806 fi
3807
3808 if test "$MINIX" = yes; then
3809   cat >> confdefs.h <<\EOF
3810 #define _POSIX_SOURCE 1
3811 EOF
3812
3813   cat >> confdefs.h <<\EOF
3814 #define _POSIX_1_SOURCE 2
3815 EOF
3816
3817   cat >> confdefs.h <<\EOF
3818 #define _MINIX 1
3819 EOF
3820
3821 fi
3822
3823
3824 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3825 echo "configure:3826: checking for Cygwin environment" >&5
3826 if eval "test \"\${ac_cv_cygwin+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
3835 #ifndef __CYGWIN__
3836 #define __CYGWIN__ __CYGWIN32__
3837 #endif
3838 return __CYGWIN__;
3839 ; return 0; }
3840 EOF
3841 if { (eval echo configure:3842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3842   rm -rf conftest*
3843   ac_cv_cygwin=yes
3844 else
3845   echo "configure: failed program was:" >&5
3846   cat conftest.$ac_ext >&5
3847   rm -rf conftest*
3848   ac_cv_cygwin=no
3849 fi
3850 rm -f conftest*
3851 fi
3852
3853 echo "$ac_t""$ac_cv_cygwin" 1>&6
3854 CYGWIN=
3855 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3856 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3857 echo "configure:3858: checking for mingw32 environment" >&5
3858 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3859   echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861   cat > conftest.$ac_ext <<EOF
3862 #line 3863 "configure"
3863 #include "confdefs.h"
3864
3865 int main() {
3866 return __MINGW32__;
3867 ; return 0; }
3868 EOF
3869 if { (eval echo configure:3870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3870   rm -rf conftest*
3871   ac_cv_mingw32=yes
3872 else
3873   echo "configure: failed program was:" >&5
3874   cat conftest.$ac_ext >&5
3875   rm -rf conftest*
3876   ac_cv_mingw32=no
3877 fi
3878 rm -f conftest*
3879 fi
3880
3881 echo "$ac_t""$ac_cv_mingw32" 1>&6
3882 MINGW32=
3883 test "$ac_cv_mingw32" = yes && MINGW32=yes
3884 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3885 echo "configure:3886: checking for EMX OS/2 environment" >&5
3886 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3887   echo $ac_n "(cached) $ac_c" 1>&6
3888 else
3889   cat > conftest.$ac_ext <<EOF
3890 #line 3891 "configure"
3891 #include "confdefs.h"
3892
3893 int main() {
3894 return __EMX__;
3895 ; return 0; }
3896 EOF
3897 if { (eval echo configure:3898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3898   rm -rf conftest*
3899   ac_cv_emxos2=yes
3900 else
3901   echo "configure: failed program was:" >&5
3902   cat conftest.$ac_ext >&5
3903   rm -rf conftest*
3904   ac_cv_emxos2=no
3905 fi
3906 rm -f conftest*
3907 fi
3908
3909 echo "$ac_t""$ac_cv_emxos2" 1>&6
3910 EMXOS2=
3911 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3912
3913
3914
3915 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3916 echo "configure:3917: checking for executable suffix" >&5
3917 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3918   echo $ac_n "(cached) $ac_c" 1>&6
3919 else
3920   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3921   ac_cv_exeext=.exe
3922 else
3923   rm -f conftest*
3924   echo 'int main () { return 0; }' > conftest.$ac_ext
3925   ac_cv_exeext=
3926   if { (eval echo configure:3927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3927     for file in conftest.*; do
3928       case $file in
3929       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3930       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3931       esac
3932     done
3933   else
3934     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3935   fi
3936   rm -f conftest*
3937   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3938 fi
3939 fi
3940
3941 EXEEXT=""
3942 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3943 echo "$ac_t""${ac_cv_exeext}" 1>&6
3944 ac_exeext=$EXEEXT
3945
3946 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3947 echo "configure:3948: checking for object suffix" >&5
3948 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3949   echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951   rm -f conftest*
3952 echo 'int i = 1;' > conftest.$ac_ext
3953 if { (eval echo configure:3954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3954   for ac_file in conftest.*; do
3955     case $ac_file in
3956     *.c) ;;
3957     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3958     esac
3959   done
3960 else
3961   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3962 fi
3963 rm -f conftest*
3964 fi
3965
3966 echo "$ac_t""$ac_cv_objext" 1>&6
3967 OBJEXT=$ac_cv_objext
3968 ac_objext=$ac_cv_objext
3969
3970
3971 cat >> confdefs.h <<EOF
3972 #define EXEEXT "${EXEEXT}"
3973 EOF
3974
3975
3976 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3977 echo "configure:3978: checking for be_app in -lbe" >&5
3978 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3979 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3980   echo $ac_n "(cached) $ac_c" 1>&6
3981 else
3982   ac_save_LIBS="$LIBS"
3983 LIBS="-lbe -lroot -lnet $LIBS"
3984 cat > conftest.$ac_ext <<EOF
3985 #line 3986 "configure"
3986 #include "confdefs.h"
3987 /* Override any gcc2 internal prototype to avoid an error.  */
3988 /* We use char because int might match the return type of a gcc2
3989     builtin and then its argument prototype would still apply.  */
3990 char be_app();
3991
3992 int main() {
3993 be_app()
3994 ; return 0; }
3995 EOF
3996 if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3997   rm -rf conftest*
3998   eval "ac_cv_lib_$ac_lib_var=yes"
3999 else
4000   echo "configure: failed program was:" >&5
4001   cat conftest.$ac_ext >&5
4002   rm -rf conftest*
4003   eval "ac_cv_lib_$ac_lib_var=no"
4004 fi
4005 rm -f conftest*
4006 LIBS="$ac_save_LIBS"
4007
4008 fi
4009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4010   echo "$ac_t""yes" 1>&6
4011   LIBS="$LIBS -lbe -lroot -lnet"
4012 else
4013   echo "$ac_t""no" 1>&6
4014 :
4015 fi
4016
4017
4018
4019
4020
4021 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4022 echo "configure:4023: checking for ${CC-cc} option to accept ANSI C" >&5
4023 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4024   echo $ac_n "(cached) $ac_c" 1>&6
4025 else
4026   am_cv_prog_cc_stdc=no
4027 ac_save_CC="$CC"
4028 # Don't try gcc -ansi; that turns off useful extensions and
4029 # breaks some systems' header files.
4030 # AIX                   -qlanglvl=ansi
4031 # Ultrix and OSF/1      -std1
4032 # HP-UX 10.20 and later -Ae
4033 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4034 # SVR4                  -Xc -D__EXTENSIONS__
4035 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4036 do
4037   CC="$ac_save_CC $ac_arg"
4038   cat > conftest.$ac_ext <<EOF
4039 #line 4040 "configure"
4040 #include "confdefs.h"
4041 #include <stdarg.h>
4042 #include <stdio.h>
4043 #include <sys/types.h>
4044 #include <sys/stat.h>
4045 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4046 struct buf { int x; };
4047 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4048 static char *e (p, i)
4049      char **p;
4050      int i;
4051 {
4052   return p[i];
4053 }
4054 static char *f (char * (*g) (char **, int), char **p, ...)
4055 {
4056   char *s;
4057   va_list v;
4058   va_start (v,p);
4059   s = g (p, va_arg (v,int));
4060   va_end (v);
4061   return s;
4062 }
4063 int test (int i, double x);
4064 struct s1 {int (*f) (int a);};
4065 struct s2 {int (*f) (double a);};
4066 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4067 int argc;
4068 char **argv;
4069
4070 int main() {
4071
4072 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4073
4074 ; return 0; }
4075 EOF
4076 if { (eval echo configure:4077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4077   rm -rf conftest*
4078   am_cv_prog_cc_stdc="$ac_arg"; break
4079 else
4080   echo "configure: failed program was:" >&5
4081   cat conftest.$ac_ext >&5
4082 fi
4083 rm -f conftest*
4084 done
4085 CC="$ac_save_CC"
4086
4087 fi
4088
4089 if test -z "$am_cv_prog_cc_stdc"; then
4090   echo "$ac_t""none needed" 1>&6
4091 else
4092   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4093 fi
4094 case "x$am_cv_prog_cc_stdc" in
4095   x|xno) ;;
4096   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4097 esac
4098
4099 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4100         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4101 fi
4102
4103 # test for make depend flag
4104 OL_MKDEP=
4105 OL_MKDEP_FLAGS=
4106 if test -z "${MKDEP}"; then
4107         OL_MKDEP="${CC-cc}"
4108         if test -z "${MKDEP_FLAGS}"; then
4109                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4110 echo "configure:4111: checking for ${OL_MKDEP} depend flag" >&5
4111 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4112   echo $ac_n "(cached) $ac_c" 1>&6
4113 else
4114   
4115                         ol_cv_mkdep=no
4116                         for flag in "-M" "-xM"; do
4117                                 cat > conftest.c <<EOF
4118  noCode;
4119 EOF
4120                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4121                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4122                                 then
4123                                         if test ! -f conftest."${ac_object}" ; then
4124                                                 ol_cv_mkdep=$flag
4125                                                 OL_MKDEP_FLAGS="$flag"
4126                                                 break
4127                                         fi
4128                                 fi
4129                         done
4130                         rm -f conftest*
4131                 
4132 fi
4133
4134 echo "$ac_t""$ol_cv_mkdep" 1>&6
4135         else
4136                 cc_cv_mkdep=yes
4137                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4138         fi
4139 else
4140         cc_cv_mkdep=yes
4141         OL_MKDEP="${MKDEP}"
4142         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4143 fi
4144
4145
4146
4147 if test "${ol_cv_mkdep}" = no ; then
4148         # this will soon become an error
4149         echo "configure: warning: do not know how to generate dependencies" 1>&2
4150 fi
4151
4152 ol_link_modules=no
4153 if test $ol_enable_modules != no ; then
4154         for ac_hdr in ltdl.h
4155 do
4156 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4157 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4158 echo "configure:4159: checking for $ac_hdr" >&5
4159 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4160   echo $ac_n "(cached) $ac_c" 1>&6
4161 else
4162   cat > conftest.$ac_ext <<EOF
4163 #line 4164 "configure"
4164 #include "confdefs.h"
4165 #include <$ac_hdr>
4166 EOF
4167 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4168 { (eval echo configure:4169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4169 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4170 if test -z "$ac_err"; then
4171   rm -rf conftest*
4172   eval "ac_cv_header_$ac_safe=yes"
4173 else
4174   echo "$ac_err" >&5
4175   echo "configure: failed program was:" >&5
4176   cat conftest.$ac_ext >&5
4177   rm -rf conftest*
4178   eval "ac_cv_header_$ac_safe=no"
4179 fi
4180 rm -f conftest*
4181 fi
4182 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4183   echo "$ac_t""yes" 1>&6
4184     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4185   cat >> confdefs.h <<EOF
4186 #define $ac_tr_hdr 1
4187 EOF
4188  
4189 else
4190   echo "$ac_t""no" 1>&6
4191 fi
4192 done
4193
4194
4195         if test $ac_cv_header_ltdl_h = no ; then
4196                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4197         fi
4198
4199         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4200 echo "configure:4201: checking for lt_dlinit in -lltdl" >&5
4201 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4202 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4203   echo $ac_n "(cached) $ac_c" 1>&6
4204 else
4205   ac_save_LIBS="$LIBS"
4206 LIBS="-lltdl  $LIBS"
4207 cat > conftest.$ac_ext <<EOF
4208 #line 4209 "configure"
4209 #include "confdefs.h"
4210 /* Override any gcc2 internal prototype to avoid an error.  */
4211 /* We use char because int might match the return type of a gcc2
4212     builtin and then its argument prototype would still apply.  */
4213 char lt_dlinit();
4214
4215 int main() {
4216 lt_dlinit()
4217 ; return 0; }
4218 EOF
4219 if { (eval echo configure:4220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4220   rm -rf conftest*
4221   eval "ac_cv_lib_$ac_lib_var=yes"
4222 else
4223   echo "configure: failed program was:" >&5
4224   cat conftest.$ac_ext >&5
4225   rm -rf conftest*
4226   eval "ac_cv_lib_$ac_lib_var=no"
4227 fi
4228 rm -f conftest*
4229 LIBS="$ac_save_LIBS"
4230
4231 fi
4232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4233   echo "$ac_t""yes" 1>&6
4234   
4235             MODULES_LIBS=-lltdl
4236             cat >> confdefs.h <<\EOF
4237 #define HAVE_LIBLTDL 1
4238 EOF
4239
4240         
4241 else
4242   echo "$ac_t""no" 1>&6
4243 fi
4244
4245
4246         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4247                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4248         fi
4249         ol_link_modules=yes
4250 else
4251         ol_with_bdb2_module=static
4252         ol_with_ldap_module=static
4253         ol_with_ldbm_module=static
4254         ol_with_passwd_module=static
4255         ol_with_perl_module=static
4256         ol_with_shell_module=static
4257         ol_with_tcl_module=static
4258         ol_with_sql_module=static
4259 fi
4260
4261 # test for EBCDIC
4262 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4263 echo "configure:4264: checking for EBCDIC" >&5
4264 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4265   echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267   
4268         cat > conftest.$ac_ext <<EOF
4269 #line 4270 "configure"
4270 #include "confdefs.h"
4271
4272 #if !('M' == 0xd4)
4273 #include <__ASCII__/generate_error.h>
4274 #endif
4275
4276 EOF
4277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4278 { (eval echo configure:4279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4280 if test -z "$ac_err"; then
4281   rm -rf conftest*
4282   ol_cv_cpp_ebcdic=yes
4283 else
4284   echo "$ac_err" >&5
4285   echo "configure: failed program was:" >&5
4286   cat conftest.$ac_ext >&5
4287   rm -rf conftest*
4288   ol_cv_cpp_ebcdic=no
4289 fi
4290 rm -f conftest*
4291 fi
4292
4293 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4294 if test $ol_cv_cpp_ebcdic = yes ; then
4295         cat >> confdefs.h <<\EOF
4296 #define HAVE_EBCDIC 1
4297 EOF
4298
4299 fi
4300
4301 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4302 echo "configure:4303: checking for ANSI C header files" >&5
4303 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4304   echo $ac_n "(cached) $ac_c" 1>&6
4305 else
4306   cat > conftest.$ac_ext <<EOF
4307 #line 4308 "configure"
4308 #include "confdefs.h"
4309 #include <stdlib.h>
4310 #include <stdarg.h>
4311 #include <string.h>
4312 #include <float.h>
4313 EOF
4314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4315 { (eval echo configure:4316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4317 if test -z "$ac_err"; then
4318   rm -rf conftest*
4319   ol_cv_header_stdc=yes
4320 else
4321   echo "$ac_err" >&5
4322   echo "configure: failed program was:" >&5
4323   cat conftest.$ac_ext >&5
4324   rm -rf conftest*
4325   ol_cv_header_stdc=no
4326 fi
4327 rm -f conftest*
4328
4329 if test $ol_cv_header_stdc = yes; then
4330   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4331 cat > conftest.$ac_ext <<EOF
4332 #line 4333 "configure"
4333 #include "confdefs.h"
4334 #include <string.h>
4335 EOF
4336 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4337   egrep "memchr" >/dev/null 2>&1; then
4338   :
4339 else
4340   rm -rf conftest*
4341   ol_cv_header_stdc=no
4342 fi
4343 rm -f conftest*
4344
4345 fi
4346
4347 if test $ol_cv_header_stdc = yes; then
4348   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4349 cat > conftest.$ac_ext <<EOF
4350 #line 4351 "configure"
4351 #include "confdefs.h"
4352 #include <stdlib.h>
4353 EOF
4354 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4355   egrep "free" >/dev/null 2>&1; then
4356   :
4357 else
4358   rm -rf conftest*
4359   ol_cv_header_stdc=no
4360 fi
4361 rm -f conftest*
4362
4363 fi
4364
4365 if test $ol_cv_header_stdc = yes; then
4366   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4367 if test "$cross_compiling" = yes; then
4368   :
4369 else
4370   cat > conftest.$ac_ext <<EOF
4371 #line 4372 "configure"
4372 #include "confdefs.h"
4373 #include <ctype.h>
4374 #ifndef HAVE_EBCDIC
4375 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4376 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4377 #else
4378 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4379                 || ('j' <= (c) && (c) <= 'r') \
4380                 || ('s' <= (c) && (c) <= 'z'))
4381 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4382 #endif
4383 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4384 int main () { int i; for (i = 0; i < 256; i++)
4385 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4386 exit (0); }
4387
4388 EOF
4389 if { (eval echo configure:4390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4390 then
4391   :
4392 else
4393   echo "configure: failed program was:" >&5
4394   cat conftest.$ac_ext >&5
4395   rm -fr conftest*
4396   ol_cv_header_stdc=no
4397 fi
4398 rm -fr conftest*
4399 fi
4400
4401 fi
4402 fi
4403
4404 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4405 if test $ol_cv_header_stdc = yes; then
4406   cat >> confdefs.h <<\EOF
4407 #define STDC_HEADERS 1
4408 EOF
4409
4410 fi
4411 ac_cv_header_stdc=disable
4412
4413
4414 if test $ol_cv_header_stdc != yes; then
4415         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4416 fi
4417
4418 ac_header_dirent=no
4419 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4420 do
4421 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4422 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4423 echo "configure:4424: checking for $ac_hdr that defines DIR" >&5
4424 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4425   echo $ac_n "(cached) $ac_c" 1>&6
4426 else
4427   cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 #include <sys/types.h>
4431 #include <$ac_hdr>
4432 int main() {
4433 DIR *dirp = 0;
4434 ; return 0; }
4435 EOF
4436 if { (eval echo configure:4437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4437   rm -rf conftest*
4438   eval "ac_cv_header_dirent_$ac_safe=yes"
4439 else
4440   echo "configure: failed program was:" >&5
4441   cat conftest.$ac_ext >&5
4442   rm -rf conftest*
4443   eval "ac_cv_header_dirent_$ac_safe=no"
4444 fi
4445 rm -f conftest*
4446 fi
4447 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4448   echo "$ac_t""yes" 1>&6
4449     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4450   cat >> confdefs.h <<EOF
4451 #define $ac_tr_hdr 1
4452 EOF
4453  ac_header_dirent=$ac_hdr; break
4454 else
4455   echo "$ac_t""no" 1>&6
4456 fi
4457 done
4458 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4459 if test $ac_header_dirent = dirent.h; then
4460 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4461 echo "configure:4462: checking for opendir in -ldir" >&5
4462 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4464   echo $ac_n "(cached) $ac_c" 1>&6
4465 else
4466   ac_save_LIBS="$LIBS"
4467 LIBS="-ldir  $LIBS"
4468 cat > conftest.$ac_ext <<EOF
4469 #line 4470 "configure"
4470 #include "confdefs.h"
4471 /* Override any gcc2 internal prototype to avoid an error.  */
4472 /* We use char because int might match the return type of a gcc2
4473     builtin and then its argument prototype would still apply.  */
4474 char opendir();
4475
4476 int main() {
4477 opendir()
4478 ; return 0; }
4479 EOF
4480 if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4481   rm -rf conftest*
4482   eval "ac_cv_lib_$ac_lib_var=yes"
4483 else
4484   echo "configure: failed program was:" >&5
4485   cat conftest.$ac_ext >&5
4486   rm -rf conftest*
4487   eval "ac_cv_lib_$ac_lib_var=no"
4488 fi
4489 rm -f conftest*
4490 LIBS="$ac_save_LIBS"
4491
4492 fi
4493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4494   echo "$ac_t""yes" 1>&6
4495   LIBS="$LIBS -ldir"
4496 else
4497   echo "$ac_t""no" 1>&6
4498 fi
4499
4500 else
4501 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4502 echo "configure:4503: checking for opendir in -lx" >&5
4503 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4504 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4505   echo $ac_n "(cached) $ac_c" 1>&6
4506 else
4507   ac_save_LIBS="$LIBS"
4508 LIBS="-lx  $LIBS"
4509 cat > conftest.$ac_ext <<EOF
4510 #line 4511 "configure"
4511 #include "confdefs.h"
4512 /* Override any gcc2 internal prototype to avoid an error.  */
4513 /* We use char because int might match the return type of a gcc2
4514     builtin and then its argument prototype would still apply.  */
4515 char opendir();
4516
4517 int main() {
4518 opendir()
4519 ; return 0; }
4520 EOF
4521 if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4522   rm -rf conftest*
4523   eval "ac_cv_lib_$ac_lib_var=yes"
4524 else
4525   echo "configure: failed program was:" >&5
4526   cat conftest.$ac_ext >&5
4527   rm -rf conftest*
4528   eval "ac_cv_lib_$ac_lib_var=no"
4529 fi
4530 rm -f conftest*
4531 LIBS="$ac_save_LIBS"
4532
4533 fi
4534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4535   echo "$ac_t""yes" 1>&6
4536   LIBS="$LIBS -lx"
4537 else
4538   echo "$ac_t""no" 1>&6
4539 fi
4540
4541 fi
4542
4543 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4544 echo "configure:4545: checking for sys/wait.h that is POSIX.1 compatible" >&5
4545 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4546   echo $ac_n "(cached) $ac_c" 1>&6
4547 else
4548   cat > conftest.$ac_ext <<EOF
4549 #line 4550 "configure"
4550 #include "confdefs.h"
4551 #include <sys/types.h>
4552 #include <sys/wait.h>
4553 #ifndef WEXITSTATUS
4554 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4555 #endif
4556 #ifndef WIFEXITED
4557 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4558 #endif
4559 int main() {
4560 int s;
4561 wait (&s);
4562 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4563 ; return 0; }
4564 EOF
4565 if { (eval echo configure:4566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4566   rm -rf conftest*
4567   ac_cv_header_sys_wait_h=yes
4568 else
4569   echo "configure: failed program was:" >&5
4570   cat conftest.$ac_ext >&5
4571   rm -rf conftest*
4572   ac_cv_header_sys_wait_h=no
4573 fi
4574 rm -f conftest*
4575 fi
4576
4577 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4578 if test $ac_cv_header_sys_wait_h = yes; then
4579   cat >> confdefs.h <<\EOF
4580 #define HAVE_SYS_WAIT_H 1
4581 EOF
4582
4583 fi
4584
4585 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4586 echo "configure:4587: checking POSIX termios" >&5
4587 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4588   echo $ac_n "(cached) $ac_c" 1>&6
4589 else
4590   cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 #include <sys/types.h>
4594 #include <unistd.h>
4595 #include <termios.h>
4596 int main() {
4597 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4598    tcgetattr(0, 0);
4599 ; return 0; }
4600 EOF
4601 if { (eval echo configure:4602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4602   rm -rf conftest*
4603   am_cv_sys_posix_termios=yes
4604 else
4605   echo "configure: failed program was:" >&5
4606   cat conftest.$ac_ext >&5
4607   rm -rf conftest*
4608   am_cv_sys_posix_termios=no
4609 fi
4610 rm -f conftest*
4611 fi
4612
4613 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4614
4615
4616  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4617 echo "configure:4618: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4618 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4619   echo $ac_n "(cached) $ac_c" 1>&6
4620 else
4621   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4622
4623   gwinsz_in_termios_h=no
4624   if test $am_cv_sys_posix_termios = yes; then
4625     cat > conftest.$ac_ext <<EOF
4626 #line 4627 "configure"
4627 #include "confdefs.h"
4628 #include <sys/types.h>
4629 #     include <termios.h>
4630 #     ifdef TIOCGWINSZ
4631         yes
4632 #     endif
4633     
4634 EOF
4635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4636   egrep "yes" >/dev/null 2>&1; then
4637   rm -rf conftest*
4638   gwinsz_in_termios_h=yes
4639 fi
4640 rm -f conftest*
4641
4642   fi
4643
4644   if test $gwinsz_in_termios_h = no; then
4645     cat > conftest.$ac_ext <<EOF
4646 #line 4647 "configure"
4647 #include "confdefs.h"
4648 #include <sys/types.h>
4649 #     include <sys/ioctl.h>
4650 #     ifdef TIOCGWINSZ
4651         yes
4652 #     endif
4653     
4654 EOF
4655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4656   egrep "yes" >/dev/null 2>&1; then
4657   rm -rf conftest*
4658   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4659 fi
4660 rm -f conftest*
4661
4662   fi
4663   
4664 fi
4665
4666 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4667   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4668     cat >> confdefs.h <<\EOF
4669 #define GWINSZ_IN_SYS_IOCTL 1
4670 EOF
4671
4672   fi
4673
4674 if test $am_cv_sys_posix_termios = yes ; then
4675         cat >> confdefs.h <<\EOF
4676 #define HAVE_POSIX_TERMIOS 1
4677 EOF
4678
4679 fi
4680
4681 for ac_hdr in \
4682         arpa/inet.h             \
4683         arpa/nameser.h  \
4684         assert.h                \
4685         conio.h                 \
4686         crypt.h                 \
4687         direct.h                \
4688         errno.h                 \
4689         fcntl.h                 \
4690         filio.h                 \
4691         getopt.h                \
4692         grp.h                   \
4693         io.h                    \
4694         libutil.h               \
4695         limits.h                \
4696         locale.h                \
4697         netinet/tcp.h   \
4698         malloc.h                \
4699         memory.h                \
4700         psap.h                  \
4701         pwd.h                   \
4702         process.h               \
4703         resolv.h                \
4704         sgtty.h                 \
4705         shadow.h                \
4706         stddef.h                \
4707         string.h                \
4708         strings.h               \
4709         sysexits.h              \
4710         sys/file.h              \
4711         sys/filio.h             \
4712         sys/errno.h             \
4713         sys/ioctl.h             \
4714         sys/param.h             \
4715         sys/resource.h  \
4716         sys/select.h    \
4717         sys/socket.h    \
4718         sys/syslog.h    \
4719         sys/time.h              \
4720         sys/types.h             \
4721         syslog.h                \
4722         termios.h               \
4723         unistd.h                \
4724         winsock.h               \
4725
4726 do
4727 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4728 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4729 echo "configure:4730: checking for $ac_hdr" >&5
4730 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4731   echo $ac_n "(cached) $ac_c" 1>&6
4732 else
4733   cat > conftest.$ac_ext <<EOF
4734 #line 4735 "configure"
4735 #include "confdefs.h"
4736 #include <$ac_hdr>
4737 EOF
4738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4739 { (eval echo configure:4740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4741 if test -z "$ac_err"; then
4742   rm -rf conftest*
4743   eval "ac_cv_header_$ac_safe=yes"
4744 else
4745   echo "$ac_err" >&5
4746   echo "configure: failed program was:" >&5
4747   cat conftest.$ac_ext >&5
4748   rm -rf conftest*
4749   eval "ac_cv_header_$ac_safe=no"
4750 fi
4751 rm -f conftest*
4752 fi
4753 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4754   echo "$ac_t""yes" 1>&6
4755     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4756   cat >> confdefs.h <<EOF
4757 #define $ac_tr_hdr 1
4758 EOF
4759  
4760 else
4761   echo "$ac_t""no" 1>&6
4762 fi
4763 done
4764
4765
4766
4767
4768 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4769 echo "configure:4770: checking for sigset in -lV3" >&5
4770 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4771 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4772   echo $ac_n "(cached) $ac_c" 1>&6
4773 else
4774   ac_save_LIBS="$LIBS"
4775 LIBS="-lV3  $LIBS"
4776 cat > conftest.$ac_ext <<EOF
4777 #line 4778 "configure"
4778 #include "confdefs.h"
4779 /* Override any gcc2 internal prototype to avoid an error.  */
4780 /* We use char because int might match the return type of a gcc2
4781     builtin and then its argument prototype would still apply.  */
4782 char sigset();
4783
4784 int main() {
4785 sigset()
4786 ; return 0; }
4787 EOF
4788 if { (eval echo configure:4789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4789   rm -rf conftest*
4790   eval "ac_cv_lib_$ac_lib_var=yes"
4791 else
4792   echo "configure: failed program was:" >&5
4793   cat conftest.$ac_ext >&5
4794   rm -rf conftest*
4795   eval "ac_cv_lib_$ac_lib_var=no"
4796 fi
4797 rm -f conftest*
4798 LIBS="$ac_save_LIBS"
4799
4800 fi
4801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4802   echo "$ac_t""yes" 1>&6
4803     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4804     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4805   cat >> confdefs.h <<EOF
4806 #define $ac_tr_lib 1
4807 EOF
4808
4809   LIBS="-lV3 $LIBS"
4810
4811 else
4812   echo "$ac_t""no" 1>&6
4813 fi
4814
4815
4816 if test $ac_cv_header_winsock_h = yes; then
4817         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4818 echo "configure:4819: checking for winsock" >&5
4819 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4820   echo $ac_n "(cached) $ac_c" 1>&6
4821 else
4822   cat > conftest.$ac_ext <<EOF
4823 #line 4824 "configure"
4824 #include "confdefs.h"
4825 #include <winsock.h>
4826 int main() {
4827
4828                         socket(0,0,0);
4829                         select(0,NULL,NULL,NULL,NULL);
4830                         closesocket(0);
4831                         gethostname(NULL,0);
4832         
4833 ; return 0; }
4834 EOF
4835 if { (eval echo configure:4836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4836   rm -rf conftest*
4837   ol_cv_winsock=yes
4838 else
4839   echo "configure: failed program was:" >&5
4840   cat conftest.$ac_ext >&5
4841   rm -rf conftest*
4842   ol_cv_winsock=no
4843 fi
4844 rm -f conftest*]
4845 fi
4846
4847 echo "$ac_t""$ol_cv_winsock" 1>&6
4848
4849         if test $ol_cv_winsock = yes ; then
4850                 cat >> confdefs.h <<\EOF
4851 #define HAVE_WINSOCK 1
4852 EOF
4853
4854                 ac_cv_func_socket=yes
4855                 ac_cv_func_select=yes
4856                 ac_cv_func_closesocket=yes
4857                 ac_cv_func_gethostname=yes
4858         fi
4859 fi
4860
4861
4862 echo $ac_n "checking for socket""... $ac_c" 1>&6
4863 echo "configure:4864: checking for socket" >&5
4864 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4865   echo $ac_n "(cached) $ac_c" 1>&6
4866 else
4867   cat > conftest.$ac_ext <<EOF
4868 #line 4869 "configure"
4869 #include "confdefs.h"
4870 /* System header to define __stub macros and hopefully few prototypes,
4871     which can conflict with char socket(); below.  */
4872 #include <assert.h>
4873 /* Override any gcc2 internal prototype to avoid an error.  */
4874 /* We use char because int might match the return type of a gcc2
4875     builtin and then its argument prototype would still apply.  */
4876 char socket();
4877 char (*f)();
4878
4879 int main() {
4880
4881 /* The GNU C library defines this for functions which it implements
4882     to always fail with ENOSYS.  Some functions are actually named
4883     something starting with __ and the normal name is an alias.  */
4884 #if defined (__stub_socket) || defined (__stub___socket)
4885 choke me
4886 #else
4887 f = socket;
4888 #endif
4889
4890 ; return 0; }
4891 EOF
4892 if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4893   rm -rf conftest*
4894   eval "ac_cv_func_socket=yes"
4895 else
4896   echo "configure: failed program was:" >&5
4897   cat conftest.$ac_ext >&5
4898   rm -rf conftest*
4899   eval "ac_cv_func_socket=no"
4900 fi
4901 rm -f conftest*
4902 fi
4903
4904 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4905   echo "$ac_t""yes" 1>&6
4906   :
4907 else
4908   echo "$ac_t""no" 1>&6
4909         
4910         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4911 echo "configure:4912: checking for main in -lsocket" >&5
4912 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4913 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4914   echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916   ac_save_LIBS="$LIBS"
4917 LIBS="-lsocket  $LIBS"
4918 cat > conftest.$ac_ext <<EOF
4919 #line 4920 "configure"
4920 #include "confdefs.h"
4921
4922 int main() {
4923 main()
4924 ; return 0; }
4925 EOF
4926 if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4927   rm -rf conftest*
4928   eval "ac_cv_lib_$ac_lib_var=yes"
4929 else
4930   echo "configure: failed program was:" >&5
4931   cat conftest.$ac_ext >&5
4932   rm -rf conftest*
4933   eval "ac_cv_lib_$ac_lib_var=no"
4934 fi
4935 rm -f conftest*
4936 LIBS="$ac_save_LIBS"
4937
4938 fi
4939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4940   echo "$ac_t""yes" 1>&6
4941     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4942     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4943   cat >> confdefs.h <<EOF
4944 #define $ac_tr_lib 1
4945 EOF
4946
4947   LIBS="-lsocket $LIBS"
4948
4949 else
4950   echo "$ac_t""no" 1>&6
4951 fi
4952
4953         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4954 echo "configure:4955: checking for main in -lnet" >&5
4955 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4956 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4957   echo $ac_n "(cached) $ac_c" 1>&6
4958 else
4959   ac_save_LIBS="$LIBS"
4960 LIBS="-lnet  $LIBS"
4961 cat > conftest.$ac_ext <<EOF
4962 #line 4963 "configure"
4963 #include "confdefs.h"
4964
4965 int main() {
4966 main()
4967 ; return 0; }
4968 EOF
4969 if { (eval echo configure:4970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4970   rm -rf conftest*
4971   eval "ac_cv_lib_$ac_lib_var=yes"
4972 else
4973   echo "configure: failed program was:" >&5
4974   cat conftest.$ac_ext >&5
4975   rm -rf conftest*
4976   eval "ac_cv_lib_$ac_lib_var=no"
4977 fi
4978 rm -f conftest*
4979 LIBS="$ac_save_LIBS"
4980
4981 fi
4982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4983   echo "$ac_t""yes" 1>&6
4984     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4985     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4986   cat >> confdefs.h <<EOF
4987 #define $ac_tr_lib 1
4988 EOF
4989
4990   LIBS="-lnet $LIBS"
4991
4992 else
4993   echo "$ac_t""no" 1>&6
4994 fi
4995
4996         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4997 echo "configure:4998: checking for main in -lnsl_s" >&5
4998 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4999 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5000   echo $ac_n "(cached) $ac_c" 1>&6
5001 else
5002   ac_save_LIBS="$LIBS"
5003 LIBS="-lnsl_s  $LIBS"
5004 cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007
5008 int main() {
5009 main()
5010 ; return 0; }
5011 EOF
5012 if { (eval echo configure:5013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5013   rm -rf conftest*
5014   eval "ac_cv_lib_$ac_lib_var=yes"
5015 else
5016   echo "configure: failed program was:" >&5
5017   cat conftest.$ac_ext >&5
5018   rm -rf conftest*
5019   eval "ac_cv_lib_$ac_lib_var=no"
5020 fi
5021 rm -f conftest*
5022 LIBS="$ac_save_LIBS"
5023
5024 fi
5025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5026   echo "$ac_t""yes" 1>&6
5027     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5028     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5029   cat >> confdefs.h <<EOF
5030 #define $ac_tr_lib 1
5031 EOF
5032
5033   LIBS="-lnsl_s $LIBS"
5034
5035 else
5036   echo "$ac_t""no" 1>&6
5037 fi
5038
5039         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5040 echo "configure:5041: checking for main in -lnsl" >&5
5041 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5042 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5043   echo $ac_n "(cached) $ac_c" 1>&6
5044 else
5045   ac_save_LIBS="$LIBS"
5046 LIBS="-lnsl  $LIBS"
5047 cat > conftest.$ac_ext <<EOF
5048 #line 5049 "configure"
5049 #include "confdefs.h"
5050
5051 int main() {
5052 main()
5053 ; return 0; }
5054 EOF
5055 if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5056   rm -rf conftest*
5057   eval "ac_cv_lib_$ac_lib_var=yes"
5058 else
5059   echo "configure: failed program was:" >&5
5060   cat conftest.$ac_ext >&5
5061   rm -rf conftest*
5062   eval "ac_cv_lib_$ac_lib_var=no"
5063 fi
5064 rm -f conftest*
5065 LIBS="$ac_save_LIBS"
5066
5067 fi
5068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5069   echo "$ac_t""yes" 1>&6
5070     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5071     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5072   cat >> confdefs.h <<EOF
5073 #define $ac_tr_lib 1
5074 EOF
5075
5076   LIBS="-lnsl $LIBS"
5077
5078 else
5079   echo "$ac_t""no" 1>&6
5080 fi
5081
5082         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5083 echo "configure:5084: checking for socket in -linet" >&5
5084 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5085 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5086   echo $ac_n "(cached) $ac_c" 1>&6
5087 else
5088   ac_save_LIBS="$LIBS"
5089 LIBS="-linet  $LIBS"
5090 cat > conftest.$ac_ext <<EOF
5091 #line 5092 "configure"
5092 #include "confdefs.h"
5093 /* Override any gcc2 internal prototype to avoid an error.  */
5094 /* We use char because int might match the return type of a gcc2
5095     builtin and then its argument prototype would still apply.  */
5096 char socket();
5097
5098 int main() {
5099 socket()
5100 ; return 0; }
5101 EOF
5102 if { (eval echo configure:5103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5103   rm -rf conftest*
5104   eval "ac_cv_lib_$ac_lib_var=yes"
5105 else
5106   echo "configure: failed program was:" >&5
5107   cat conftest.$ac_ext >&5
5108   rm -rf conftest*
5109   eval "ac_cv_lib_$ac_lib_var=no"
5110 fi
5111 rm -f conftest*
5112 LIBS="$ac_save_LIBS"
5113
5114 fi
5115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5116   echo "$ac_t""yes" 1>&6
5117     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5118     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5119   cat >> confdefs.h <<EOF
5120 #define $ac_tr_lib 1
5121 EOF
5122
5123   LIBS="-linet $LIBS"
5124
5125 else
5126   echo "$ac_t""no" 1>&6
5127 fi
5128
5129         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5130 echo "configure:5131: checking for main in -lgen" >&5
5131 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5133   echo $ac_n "(cached) $ac_c" 1>&6
5134 else
5135   ac_save_LIBS="$LIBS"
5136 LIBS="-lgen  $LIBS"
5137 cat > conftest.$ac_ext <<EOF
5138 #line 5139 "configure"
5139 #include "confdefs.h"
5140
5141 int main() {
5142 main()
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_lib_$ac_lib_var=yes"
5148 else
5149   echo "configure: failed program was:" >&5
5150   cat conftest.$ac_ext >&5
5151   rm -rf conftest*
5152   eval "ac_cv_lib_$ac_lib_var=no"
5153 fi
5154 rm -f conftest*
5155 LIBS="$ac_save_LIBS"
5156
5157 fi
5158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5159   echo "$ac_t""yes" 1>&6
5160     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5161     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5162   cat >> confdefs.h <<EOF
5163 #define $ac_tr_lib 1
5164 EOF
5165
5166   LIBS="-lgen $LIBS"
5167
5168 else
5169   echo "$ac_t""no" 1>&6
5170 fi
5171
5172
5173 fi
5174
5175
5176 echo $ac_n "checking for select""... $ac_c" 1>&6
5177 echo "configure:5178: checking for select" >&5
5178 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5179   echo $ac_n "(cached) $ac_c" 1>&6
5180 else
5181   cat > conftest.$ac_ext <<EOF
5182 #line 5183 "configure"
5183 #include "confdefs.h"
5184 /* System header to define __stub macros and hopefully few prototypes,
5185     which can conflict with char select(); below.  */
5186 #include <assert.h>
5187 /* Override any gcc2 internal prototype to avoid an error.  */
5188 /* We use char because int might match the return type of a gcc2
5189     builtin and then its argument prototype would still apply.  */
5190 char select();
5191 char (*f)();
5192
5193 int main() {
5194
5195 /* The GNU C library defines this for functions which it implements
5196     to always fail with ENOSYS.  Some functions are actually named
5197     something starting with __ and the normal name is an alias.  */
5198 #if defined (__stub_select) || defined (__stub___select)
5199 choke me
5200 #else
5201 f = select;
5202 #endif
5203
5204 ; return 0; }
5205 EOF
5206 if { (eval echo configure:5207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5207   rm -rf conftest*
5208   eval "ac_cv_func_select=yes"
5209 else
5210   echo "configure: failed program was:" >&5
5211   cat conftest.$ac_ext >&5
5212   rm -rf conftest*
5213   eval "ac_cv_func_select=no"
5214 fi
5215 rm -f conftest*
5216 fi
5217
5218 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5219   echo "$ac_t""yes" 1>&6
5220   :
5221 else
5222   echo "$ac_t""no" 1>&6
5223 { echo "configure: error: select() required." 1>&2; exit 1; }
5224 fi
5225
5226
5227 if test "${ac_cv_header_winsock_h}" != yes; then
5228                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5229 echo "configure:5230: checking types of arguments for select()" >&5
5230  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5231   echo $ac_n "(cached) $ac_c" 1>&6
5232 else
5233    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5234   echo $ac_n "(cached) $ac_c" 1>&6
5235 else
5236     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5237   echo $ac_n "(cached) $ac_c" 1>&6
5238 else
5239      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5240      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5241       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5242        cat > conftest.$ac_ext <<EOF
5243 #line 5244 "configure"
5244 #include "confdefs.h"
5245 #ifdef HAVE_SYS_TYPES_H
5246 #include <sys/types.h>
5247 #endif
5248 #ifdef HAVE_SYS_TIME_H
5249 #include <sys/time.h>
5250 #endif
5251 #ifdef HAVE_SYS_SELECT_H
5252 #include <sys/select.h>
5253 #endif
5254 #ifdef HAVE_SYS_SOCKET_H
5255 #include <sys/socket.h>
5256 #endif
5257 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);
5258 int main() {
5259
5260 ; return 0; }
5261 EOF
5262 if { (eval echo configure:5263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5263   rm -rf conftest*
5264           ac_not_found=no ; break 3
5265 else
5266   echo "configure: failed program was:" >&5
5267   cat conftest.$ac_ext >&5
5268   rm -rf conftest*
5269   ac_not_found=yes
5270 fi
5271 rm -f conftest*
5272       done
5273      done
5274     done
5275    
5276 fi
5277   
5278 fi
5279  
5280 fi
5281  if test "$ac_not_found" = yes; then
5282   ac_cv_func_select_arg1=int 
5283   ac_cv_func_select_arg234='int *' 
5284   ac_cv_func_select_arg5='struct timeval *'
5285  fi
5286  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5287  cat >> confdefs.h <<EOF
5288 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5289 EOF
5290
5291  cat >> confdefs.h <<EOF
5292 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5293 EOF
5294
5295  cat >> confdefs.h <<EOF
5296 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5297 EOF
5298
5299
5300 fi
5301
5302
5303 for ac_hdr in regex.h 
5304 do
5305 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5306 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5307 echo "configure:5308: checking for $ac_hdr" >&5
5308 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5309   echo $ac_n "(cached) $ac_c" 1>&6
5310 else
5311   cat > conftest.$ac_ext <<EOF
5312 #line 5313 "configure"
5313 #include "confdefs.h"
5314 #include <$ac_hdr>
5315 EOF
5316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5317 { (eval echo configure:5318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5319 if test -z "$ac_err"; then
5320   rm -rf conftest*
5321   eval "ac_cv_header_$ac_safe=yes"
5322 else
5323   echo "$ac_err" >&5
5324   echo "configure: failed program was:" >&5
5325   cat conftest.$ac_ext >&5
5326   rm -rf conftest*
5327   eval "ac_cv_header_$ac_safe=no"
5328 fi
5329 rm -f conftest*
5330 fi
5331 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5332   echo "$ac_t""yes" 1>&6
5333     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5334   cat >> confdefs.h <<EOF
5335 #define $ac_tr_hdr 1
5336 EOF
5337  
5338 else
5339   echo "$ac_t""no" 1>&6
5340 fi
5341 done
5342
5343 if test "$ac_cv_header_regex_h" != yes ; then
5344         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5345 fi
5346 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5347 echo "configure:5348: checking for regfree" >&5
5348 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5349   echo $ac_n "(cached) $ac_c" 1>&6
5350 else
5351   cat > conftest.$ac_ext <<EOF
5352 #line 5353 "configure"
5353 #include "confdefs.h"
5354 /* System header to define __stub macros and hopefully few prototypes,
5355     which can conflict with char regfree(); below.  */
5356 #include <assert.h>
5357 /* Override any gcc2 internal prototype to avoid an error.  */
5358 /* We use char because int might match the return type of a gcc2
5359     builtin and then its argument prototype would still apply.  */
5360 char regfree();
5361 char (*f)();
5362
5363 int main() {
5364
5365 /* The GNU C library defines this for functions which it implements
5366     to always fail with ENOSYS.  Some functions are actually named
5367     something starting with __ and the normal name is an alias.  */
5368 #if defined (__stub_regfree) || defined (__stub___regfree)
5369 choke me
5370 #else
5371 f = regfree;
5372 #endif
5373
5374 ; return 0; }
5375 EOF
5376 if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5377   rm -rf conftest*
5378   eval "ac_cv_func_regfree=yes"
5379 else
5380   echo "configure: failed program was:" >&5
5381   cat conftest.$ac_ext >&5
5382   rm -rf conftest*
5383   eval "ac_cv_func_regfree=no"
5384 fi
5385 rm -f conftest*
5386 fi
5387
5388 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5389   echo "$ac_t""yes" 1>&6
5390   :
5391 else
5392   echo "$ac_t""no" 1>&6
5393 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5394 fi
5395
5396
5397
5398 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5399 echo "configure:5400: checking for compatible POSIX regex" >&5
5400 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5401   echo $ac_n "(cached) $ac_c" 1>&6
5402 else
5403   
5404         if test "$cross_compiling" = yes; then
5405   ol_cv_c_posix_regex=cross
5406 else
5407   cat > conftest.$ac_ext <<EOF
5408 #line 5409 "configure"
5409 #include "confdefs.h"
5410
5411 #include <sys/types.h>
5412 #include <regex.h>
5413 static char *pattern, *string;
5414 main()
5415 {
5416         int rc;
5417         regex_t re;
5418
5419         pattern = "^A";
5420
5421         if(regcomp(&re, pattern, 0)) {
5422                 return -1;
5423         }
5424         
5425         string = "ALL MATCH";
5426         
5427         rc = regexec(&re, string, 0, (void*)0, 0);
5428
5429         regfree(&re);
5430
5431         return rc;
5432 }
5433 EOF
5434 if { (eval echo configure:5435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5435 then
5436   ol_cv_c_posix_regex=yes
5437 else
5438   echo "configure: failed program was:" >&5
5439   cat conftest.$ac_ext >&5
5440   rm -fr conftest*
5441   ol_cv_c_posix_regex=no
5442 fi
5443 rm -fr conftest*
5444 fi
5445
5446 fi
5447
5448 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5449
5450 if test "$ol_cv_c_posix_regex" = no ; then
5451         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5452 fi
5453
5454 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5455 echo "configure:5456: checking for res_search" >&5
5456 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5457   echo $ac_n "(cached) $ac_c" 1>&6
5458 else
5459   cat > conftest.$ac_ext <<EOF
5460 #line 5461 "configure"
5461 #include "confdefs.h"
5462 /* System header to define __stub macros and hopefully few prototypes,
5463     which can conflict with char res_search(); below.  */
5464 #include <assert.h>
5465 /* Override any gcc2 internal prototype to avoid an error.  */
5466 /* We use char because int might match the return type of a gcc2
5467     builtin and then its argument prototype would still apply.  */
5468 char res_search();
5469 char (*f)();
5470
5471 int main() {
5472
5473 /* The GNU C library defines this for functions which it implements
5474     to always fail with ENOSYS.  Some functions are actually named
5475     something starting with __ and the normal name is an alias.  */
5476 #if defined (__stub_res_search) || defined (__stub___res_search)
5477 choke me
5478 #else
5479 f = res_search;
5480 #endif
5481
5482 ; return 0; }
5483 EOF
5484 if { (eval echo configure:5485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5485   rm -rf conftest*
5486   eval "ac_cv_func_res_search=yes"
5487 else
5488   echo "configure: failed program was:" >&5
5489   cat conftest.$ac_ext >&5
5490   rm -rf conftest*
5491   eval "ac_cv_func_res_search=no"
5492 fi
5493 rm -f conftest*
5494 fi
5495
5496 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5497   echo "$ac_t""yes" 1>&6
5498   :
5499 else
5500   echo "$ac_t""no" 1>&6
5501 fi
5502
5503 if test $ac_cv_func_res_search = no ; then 
5504         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5505 echo "configure:5506: checking for res_search in -lbind" >&5
5506 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5507 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5508   echo $ac_n "(cached) $ac_c" 1>&6
5509 else
5510   ac_save_LIBS="$LIBS"
5511 LIBS="-lbind  $LIBS"
5512 cat > conftest.$ac_ext <<EOF
5513 #line 5514 "configure"
5514 #include "confdefs.h"
5515 /* Override any gcc2 internal prototype to avoid an error.  */
5516 /* We use char because int might match the return type of a gcc2
5517     builtin and then its argument prototype would still apply.  */
5518 char res_search();
5519
5520 int main() {
5521 res_search()
5522 ; return 0; }
5523 EOF
5524 if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5525   rm -rf conftest*
5526   eval "ac_cv_lib_$ac_lib_var=yes"
5527 else
5528   echo "configure: failed program was:" >&5
5529   cat conftest.$ac_ext >&5
5530   rm -rf conftest*
5531   eval "ac_cv_lib_$ac_lib_var=no"
5532 fi
5533 rm -f conftest*
5534 LIBS="$ac_save_LIBS"
5535
5536 fi
5537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5538   echo "$ac_t""yes" 1>&6
5539     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5540     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5541   cat >> confdefs.h <<EOF
5542 #define $ac_tr_lib 1
5543 EOF
5544
5545   LIBS="-lbind $LIBS"
5546
5547 else
5548   echo "$ac_t""no" 1>&6
5549 fi
5550
5551         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5552 fi
5553
5554 if test $ac_cv_func_res_search = no ; then 
5555         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5556 echo "configure:5557: checking for __res_search in -lbind" >&5
5557 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5558 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5559   echo $ac_n "(cached) $ac_c" 1>&6
5560 else
5561   ac_save_LIBS="$LIBS"
5562 LIBS="-lbind  $LIBS"
5563 cat > conftest.$ac_ext <<EOF
5564 #line 5565 "configure"
5565 #include "confdefs.h"
5566 /* Override any gcc2 internal prototype to avoid an error.  */
5567 /* We use char because int might match the return type of a gcc2
5568     builtin and then its argument prototype would still apply.  */
5569 char __res_search();
5570
5571 int main() {
5572 __res_search()
5573 ; return 0; }
5574 EOF
5575 if { (eval echo configure:5576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5576   rm -rf conftest*
5577   eval "ac_cv_lib_$ac_lib_var=yes"
5578 else
5579   echo "configure: failed program was:" >&5
5580   cat conftest.$ac_ext >&5
5581   rm -rf conftest*
5582   eval "ac_cv_lib_$ac_lib_var=no"
5583 fi
5584 rm -f conftest*
5585 LIBS="$ac_save_LIBS"
5586
5587 fi
5588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5589   echo "$ac_t""yes" 1>&6
5590     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5591     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5592   cat >> confdefs.h <<EOF
5593 #define $ac_tr_lib 1
5594 EOF
5595
5596   LIBS="-lbind $LIBS"
5597
5598 else
5599   echo "$ac_t""no" 1>&6
5600 fi
5601
5602         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5603 fi
5604
5605 if test $ac_cv_func_res_search = no ; then 
5606         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5607 echo "configure:5608: checking for res_search in -lresolv" >&5
5608 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5609 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5610   echo $ac_n "(cached) $ac_c" 1>&6
5611 else
5612   ac_save_LIBS="$LIBS"
5613 LIBS="-lresolv  $LIBS"
5614 cat > conftest.$ac_ext <<EOF
5615 #line 5616 "configure"
5616 #include "confdefs.h"
5617 /* Override any gcc2 internal prototype to avoid an error.  */
5618 /* We use char because int might match the return type of a gcc2
5619     builtin and then its argument prototype would still apply.  */
5620 char res_search();
5621
5622 int main() {
5623 res_search()
5624 ; return 0; }
5625 EOF
5626 if { (eval echo configure:5627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5627   rm -rf conftest*
5628   eval "ac_cv_lib_$ac_lib_var=yes"
5629 else
5630   echo "configure: failed program was:" >&5
5631   cat conftest.$ac_ext >&5
5632   rm -rf conftest*
5633   eval "ac_cv_lib_$ac_lib_var=no"
5634 fi
5635 rm -f conftest*
5636 LIBS="$ac_save_LIBS"
5637
5638 fi
5639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5640   echo "$ac_t""yes" 1>&6
5641     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5642     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5643   cat >> confdefs.h <<EOF
5644 #define $ac_tr_lib 1
5645 EOF
5646
5647   LIBS="-lresolv $LIBS"
5648
5649 else
5650   echo "$ac_t""no" 1>&6
5651 fi
5652
5653         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5654 fi
5655
5656 if test "$ac_cv_func_res_search" = yes ; then
5657         cat >> confdefs.h <<\EOF
5658 #define HAVE_RES_SEARCH 1
5659 EOF
5660
5661 elif test $ol_enable_dns = yes ; then
5662         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5663 elif test $ol_enable_dns != no ; then
5664         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5665 fi
5666
5667
5668 ol_link_isode=no
5669 if test $ol_enable_ldapd != no ; then
5670         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5671
5672                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5673 echo "configure:5674: checking for main in -lxtpp" >&5
5674 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5675 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5676   echo $ac_n "(cached) $ac_c" 1>&6
5677 else
5678   ac_save_LIBS="$LIBS"
5679 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5680 cat > conftest.$ac_ext <<EOF
5681 #line 5682 "configure"
5682 #include "confdefs.h"
5683
5684 int main() {
5685 main()
5686 ; return 0; }
5687 EOF
5688 if { (eval echo configure:5689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5689   rm -rf conftest*
5690   eval "ac_cv_lib_$ac_lib_var=yes"
5691 else
5692   echo "configure: failed program was:" >&5
5693   cat conftest.$ac_ext >&5
5694   rm -rf conftest*
5695   eval "ac_cv_lib_$ac_lib_var=no"
5696 fi
5697 rm -f conftest*
5698 LIBS="$ac_save_LIBS"
5699
5700 fi
5701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5702   echo "$ac_t""yes" 1>&6
5703   
5704                 ol_link_isode=yes
5705                 cat >> confdefs.h <<\EOF
5706 #define HAVE_XTPP 1
5707 EOF
5708
5709                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5710                 
5711 else
5712   echo "$ac_t""no" 1>&6
5713 :
5714 fi
5715
5716         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5717 echo "configure:5718: checking for main in -ldsap" >&5
5718 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5719 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5720   echo $ac_n "(cached) $ac_c" 1>&6
5721 else
5722   ac_save_LIBS="$LIBS"
5723 LIBS="-ldsap -lisode $LIBS"
5724 cat > conftest.$ac_ext <<EOF
5725 #line 5726 "configure"
5726 #include "confdefs.h"
5727
5728 int main() {
5729 main()
5730 ; return 0; }
5731 EOF
5732 if { (eval echo configure:5733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5733   rm -rf conftest*
5734   eval "ac_cv_lib_$ac_lib_var=yes"
5735 else
5736   echo "configure: failed program was:" >&5
5737   cat conftest.$ac_ext >&5
5738   rm -rf conftest*
5739   eval "ac_cv_lib_$ac_lib_var=no"
5740 fi
5741 rm -f conftest*
5742 LIBS="$ac_save_LIBS"
5743
5744 fi
5745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5746   echo "$ac_t""yes" 1>&6
5747   
5748                 ol_link_isode=yes
5749                 cat >> confdefs.h <<\EOF
5750 #define HAVE_DSAP 1
5751 EOF
5752
5753                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5754                 
5755 else
5756   echo "$ac_t""no" 1>&6
5757 :
5758 fi
5759
5760         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5761 echo "configure:5762: checking for main in -lisode" >&5
5762 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5764   echo $ac_n "(cached) $ac_c" 1>&6
5765 else
5766   ac_save_LIBS="$LIBS"
5767 LIBS="-lisode  $LIBS"
5768 cat > conftest.$ac_ext <<EOF
5769 #line 5770 "configure"
5770 #include "confdefs.h"
5771
5772 int main() {
5773 main()
5774 ; return 0; }
5775 EOF
5776 if { (eval echo configure:5777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5777   rm -rf conftest*
5778   eval "ac_cv_lib_$ac_lib_var=yes"
5779 else
5780   echo "configure: failed program was:" >&5
5781   cat conftest.$ac_ext >&5
5782   rm -rf conftest*
5783   eval "ac_cv_lib_$ac_lib_var=no"
5784 fi
5785 rm -f conftest*
5786 LIBS="$ac_save_LIBS"
5787
5788 fi
5789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5790   echo "$ac_t""yes" 1>&6
5791   
5792                 ol_link_isode=yes
5793                 cat >> confdefs.h <<\EOF
5794 #define HAVE_ISODE 1
5795 EOF
5796
5797                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5798                 
5799 else
5800   echo "$ac_t""no" 1>&6
5801 :
5802 fi
5803
5804 fi
5805
5806 if test $ol_link_isode != no; then
5807         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5808 echo "configure:5809: checking for main in -lpp" >&5
5809 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5810 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5811   echo $ac_n "(cached) $ac_c" 1>&6
5812 else
5813   ac_save_LIBS="$LIBS"
5814 LIBS="-lpp  $LIBS"
5815 cat > conftest.$ac_ext <<EOF
5816 #line 5817 "configure"
5817 #include "confdefs.h"
5818
5819 int main() {
5820 main()
5821 ; return 0; }
5822 EOF
5823 if { (eval echo configure:5824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5824   rm -rf conftest*
5825   eval "ac_cv_lib_$ac_lib_var=yes"
5826 else
5827   echo "configure: failed program was:" >&5
5828   cat conftest.$ac_ext >&5
5829   rm -rf conftest*
5830   eval "ac_cv_lib_$ac_lib_var=no"
5831 fi
5832 rm -f conftest*
5833 LIBS="$ac_save_LIBS"
5834
5835 fi
5836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5837   echo "$ac_t""yes" 1>&6
5838   
5839                 cat >> confdefs.h <<\EOF
5840 #define HAVE_PP 1
5841 EOF
5842
5843                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5844                 
5845 else
5846   echo "$ac_t""no" 1>&6
5847 :
5848 fi
5849
5850
5851         # Extract the first word of "pepsy", so it can be a program name with args.
5852 set dummy pepsy; ac_word=$2
5853 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5854 echo "configure:5855: checking for $ac_word" >&5
5855 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5856   echo $ac_n "(cached) $ac_c" 1>&6
5857 else
5858   case "$PEPSY" in
5859   /*)
5860   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5861   ;;
5862   ?:/*)
5863   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5864   ;;
5865   *)
5866   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5867   ac_dummy="$PATH"
5868   for ac_dir in $ac_dummy; do 
5869     test -z "$ac_dir" && ac_dir=.
5870     if test -f $ac_dir/$ac_word; then
5871       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5872       break
5873     fi
5874   done
5875   IFS="$ac_save_ifs"
5876   ;;
5877 esac
5878 fi
5879 PEPSY="$ac_cv_path_PEPSY"
5880 if test -n "$PEPSY"; then
5881   echo "$ac_t""$PEPSY" 1>&6
5882 else
5883   echo "$ac_t""no" 1>&6
5884 fi
5885
5886 fi
5887
5888 if test $ol_enable_quipu != no ; then
5889         for ac_hdr in quipu/commonarg.h
5890 do
5891 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5892 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5893 echo "configure:5894: checking for $ac_hdr" >&5
5894 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5895   echo $ac_n "(cached) $ac_c" 1>&6
5896 else
5897   cat > conftest.$ac_ext <<EOF
5898 #line 5899 "configure"
5899 #include "confdefs.h"
5900 #include <$ac_hdr>
5901 EOF
5902 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5903 { (eval echo configure:5904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5904 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5905 if test -z "$ac_err"; then
5906   rm -rf conftest*
5907   eval "ac_cv_header_$ac_safe=yes"
5908 else
5909   echo "$ac_err" >&5
5910   echo "configure: failed program was:" >&5
5911   cat conftest.$ac_ext >&5
5912   rm -rf conftest*
5913   eval "ac_cv_header_$ac_safe=no"
5914 fi
5915 rm -f conftest*
5916 fi
5917 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5918   echo "$ac_t""yes" 1>&6
5919     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5920   cat >> confdefs.h <<EOF
5921 #define $ac_tr_hdr 1
5922 EOF
5923  
5924 else
5925   echo "$ac_t""no" 1>&6
5926 fi
5927 done
5928
5929
5930         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5931                 BUILD_QUIPU=yes
5932         elif test $ol_enable_quipu = auto ; then
5933                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5934         else
5935                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5936         fi
5937 fi
5938
5939 ol_link_kbind=no
5940 ol_link_kpasswd=no
5941 ol_link_krb5=no
5942 ol_link_krb4=no
5943
5944 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5945         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5946
5947         for ac_hdr in krb5.h
5948 do
5949 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5950 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5951 echo "configure:5952: checking for $ac_hdr" >&5
5952 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5953   echo $ac_n "(cached) $ac_c" 1>&6
5954 else
5955   cat > conftest.$ac_ext <<EOF
5956 #line 5957 "configure"
5957 #include "confdefs.h"
5958 #include <$ac_hdr>
5959 EOF
5960 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5961 { (eval echo configure:5962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5962 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5963 if test -z "$ac_err"; then
5964   rm -rf conftest*
5965   eval "ac_cv_header_$ac_safe=yes"
5966 else
5967   echo "$ac_err" >&5
5968   echo "configure: failed program was:" >&5
5969   cat conftest.$ac_ext >&5
5970   rm -rf conftest*
5971   eval "ac_cv_header_$ac_safe=no"
5972 fi
5973 rm -f conftest*
5974 fi
5975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5976   echo "$ac_t""yes" 1>&6
5977     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5978   cat >> confdefs.h <<EOF
5979 #define $ac_tr_hdr 1
5980 EOF
5981  
5982 else
5983   echo "$ac_t""no" 1>&6
5984 fi
5985 done
5986
5987
5988         if test $ac_cv_header_krb5_h = yes ; then
5989                                 for ac_hdr in heim_err.h
5990 do
5991 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5992 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5993 echo "configure:5994: checking for $ac_hdr" >&5
5994 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5995   echo $ac_n "(cached) $ac_c" 1>&6
5996 else
5997   cat > conftest.$ac_ext <<EOF
5998 #line 5999 "configure"
5999 #include "confdefs.h"
6000 #include <$ac_hdr>
6001 EOF
6002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6003 { (eval echo configure:6004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6005 if test -z "$ac_err"; then
6006   rm -rf conftest*
6007   eval "ac_cv_header_$ac_safe=yes"
6008 else
6009   echo "$ac_err" >&5
6010   echo "configure: failed program was:" >&5
6011   cat conftest.$ac_ext >&5
6012   rm -rf conftest*
6013   eval "ac_cv_header_$ac_safe=no"
6014 fi
6015 rm -f conftest*
6016 fi
6017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6018   echo "$ac_t""yes" 1>&6
6019     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6020   cat >> confdefs.h <<EOF
6021 #define $ac_tr_hdr 1
6022 EOF
6023  
6024 else
6025   echo "$ac_t""no" 1>&6
6026 fi
6027 done
6028
6029                 if test $ac_cv_header_heim_err_h = yes ; then
6030                         krb5_impl=heimdal
6031                 else
6032                         krb5_impl=mit
6033                 fi
6034
6035                 if test $krb5_impl = mit; then
6036                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6037 echo "configure:6038: checking for main in -lkrb5" >&5
6038 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6039 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6040   echo $ac_n "(cached) $ac_c" 1>&6
6041 else
6042   ac_save_LIBS="$LIBS"
6043 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6044 cat > conftest.$ac_ext <<EOF
6045 #line 6046 "configure"
6046 #include "confdefs.h"
6047
6048 int main() {
6049 main()
6050 ; return 0; }
6051 EOF
6052 if { (eval echo configure:6053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6053   rm -rf conftest*
6054   eval "ac_cv_lib_$ac_lib_var=yes"
6055 else
6056   echo "configure: failed program was:" >&5
6057   cat conftest.$ac_ext >&5
6058   rm -rf conftest*
6059   eval "ac_cv_lib_$ac_lib_var=no"
6060 fi
6061 rm -f conftest*
6062 LIBS="$ac_save_LIBS"
6063
6064 fi
6065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6066   echo "$ac_t""yes" 1>&6
6067   have_krb5=yes
6068                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6069 else
6070   echo "$ac_t""no" 1>&6
6071 have_krb5=no
6072 fi
6073
6074
6075                 elif test $krb5_impl = heimdal; then
6076                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6077 echo "configure:6078: checking for main in -lkrb5" >&5
6078 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6079 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6080   echo $ac_n "(cached) $ac_c" 1>&6
6081 else
6082   ac_save_LIBS="$LIBS"
6083 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6084 cat > conftest.$ac_ext <<EOF
6085 #line 6086 "configure"
6086 #include "confdefs.h"
6087
6088 int main() {
6089 main()
6090 ; return 0; }
6091 EOF
6092 if { (eval echo configure:6093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6093   rm -rf conftest*
6094   eval "ac_cv_lib_$ac_lib_var=yes"
6095 else
6096   echo "configure: failed program was:" >&5
6097   cat conftest.$ac_ext >&5
6098   rm -rf conftest*
6099   eval "ac_cv_lib_$ac_lib_var=no"
6100 fi
6101 rm -f conftest*
6102 LIBS="$ac_save_LIBS"
6103
6104 fi
6105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6106   echo "$ac_t""yes" 1>&6
6107   have_krb5=yes
6108                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6109 else
6110   echo "$ac_t""no" 1>&6
6111 have_krb5=no
6112 fi
6113
6114
6115                         cat >> confdefs.h <<\EOF
6116 #define HAVE_HEIMDAL_KERBEROS 1
6117 EOF
6118
6119                 else
6120                         have_krb5=no
6121                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6122                 fi
6123
6124                 if test $have_krb5 = yes ; then
6125                         ol_link_krb5=yes
6126
6127                         cat >> confdefs.h <<\EOF
6128 #define HAVE_KRB5 1
6129 EOF
6130
6131
6132                         if test $ol_enable_kpasswd != no ; then
6133                                 ol_link_kpasswd=yes;
6134                         fi
6135
6136                         if test $ol_with_kerberos = k5only ; then
6137                                 ol_with_kerberos=found
6138                         fi
6139
6140                 elif test $ol_with_kerberos != auto ; then
6141                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6142                 fi
6143
6144         fi
6145 fi
6146
6147 if test $ol_link_krb5 = yes -a \
6148         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6149
6150         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6151 do
6152 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6153 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6154 echo "configure:6155: checking for $ac_hdr" >&5
6155 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6156   echo $ac_n "(cached) $ac_c" 1>&6
6157 else
6158   cat > conftest.$ac_ext <<EOF
6159 #line 6160 "configure"
6160 #include "confdefs.h"
6161 #include <$ac_hdr>
6162 EOF
6163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6164 { (eval echo configure:6165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6166 if test -z "$ac_err"; then
6167   rm -rf conftest*
6168   eval "ac_cv_header_$ac_safe=yes"
6169 else
6170   echo "$ac_err" >&5
6171   echo "configure: failed program was:" >&5
6172   cat conftest.$ac_ext >&5
6173   rm -rf conftest*
6174   eval "ac_cv_header_$ac_safe=no"
6175 fi
6176 rm -f conftest*
6177 fi
6178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6179   echo "$ac_t""yes" 1>&6
6180     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6181   cat >> confdefs.h <<EOF
6182 #define $ac_tr_hdr 1
6183 EOF
6184  
6185 else
6186   echo "$ac_t""no" 1>&6
6187 fi
6188 done
6189
6190
6191         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6192                 if test $krb5_impl = mit; then
6193                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6194 echo "configure:6195: checking for main in -lkrb4" >&5
6195 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6197   echo $ac_n "(cached) $ac_c" 1>&6
6198 else
6199   ac_save_LIBS="$LIBS"
6200 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6201 cat > conftest.$ac_ext <<EOF
6202 #line 6203 "configure"
6203 #include "confdefs.h"
6204
6205 int main() {
6206 main()
6207 ; return 0; }
6208 EOF
6209 if { (eval echo configure:6210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6210   rm -rf conftest*
6211   eval "ac_cv_lib_$ac_lib_var=yes"
6212 else
6213   echo "configure: failed program was:" >&5
6214   cat conftest.$ac_ext >&5
6215   rm -rf conftest*
6216   eval "ac_cv_lib_$ac_lib_var=no"
6217 fi
6218 rm -f conftest*
6219 LIBS="$ac_save_LIBS"
6220
6221 fi
6222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6223   echo "$ac_t""yes" 1>&6
6224   have_k425=yes
6225                                 KRB4_LIBS="-lkrb4 -ldes425"
6226 else
6227   echo "$ac_t""no" 1>&6
6228 have_k425=no
6229 fi
6230
6231
6232                 elif test $krb5_impl = heimdal; then
6233                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6234 echo "configure:6235: checking for main in -lkrb4" >&5
6235 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6236 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6237   echo $ac_n "(cached) $ac_c" 1>&6
6238 else
6239   ac_save_LIBS="$LIBS"
6240 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6241 cat > conftest.$ac_ext <<EOF
6242 #line 6243 "configure"
6243 #include "confdefs.h"
6244
6245 int main() {
6246 main()
6247 ; return 0; }
6248 EOF
6249 if { (eval echo configure:6250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6250   rm -rf conftest*
6251   eval "ac_cv_lib_$ac_lib_var=yes"
6252 else
6253   echo "configure: failed program was:" >&5
6254   cat conftest.$ac_ext >&5
6255   rm -rf conftest*
6256   eval "ac_cv_lib_$ac_lib_var=no"
6257 fi
6258 rm -f conftest*
6259 LIBS="$ac_save_LIBS"
6260
6261 fi
6262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6263   echo "$ac_t""yes" 1>&6
6264   have_k425=yes
6265                                 KRB4_LIBS="-lkrb4"
6266 else
6267   echo "$ac_t""no" 1>&6
6268 have_k425=no
6269 fi
6270
6271
6272                 else
6273                         have_425=no
6274                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6275                 fi
6276
6277                 if test $have_k425 = yes ; then
6278                         ol_with_kerberos=found
6279                         ol_link_krb4=yes
6280
6281                         cat >> confdefs.h <<\EOF
6282 #define HAVE_KRB425 1
6283 EOF
6284
6285                         cat >> confdefs.h <<\EOF
6286 #define HAVE_KRB4 1
6287 EOF
6288
6289
6290                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6291 echo "configure:6292: checking for des_debug in Kerberos libraries" >&5
6292 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6293   echo $ac_n "(cached) $ac_c" 1>&6
6294 else
6295   
6296                                                                 save_LIBS="$LIBS"
6297                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6298                                 cat > conftest.$ac_ext <<EOF
6299 #line 6300 "configure"
6300 #include "confdefs.h"
6301
6302 #include <kerberosIV/krb.h>
6303 #include <kerberosIV/des.h>
6304 extern int des_debug;
6305
6306 int main() {
6307
6308 des_debug = 1;
6309
6310 ; return 0; }
6311 EOF
6312 if { (eval echo configure:6313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6313   rm -rf conftest*
6314   ol_cv_var_des_debug=yes
6315 else
6316   echo "configure: failed program was:" >&5
6317   cat conftest.$ac_ext >&5
6318   rm -rf conftest*
6319   ol_cv_var_des_debug=no
6320 fi
6321 rm -f conftest*
6322                                                                 LIBS="$save_LIBS"
6323                         
6324 fi
6325
6326 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6327
6328                         if test $ol_cv_var_des_debug = yes ; then
6329                                 cat >> confdefs.h <<\EOF
6330 #define HAVE_DES_DEBUG 1
6331 EOF
6332
6333                         fi
6334
6335                         LIBS="$save_LIBS"
6336                 fi
6337         fi
6338 fi
6339
6340 if test $ol_link_krb5 = yes ; then
6341         ol_with_kerberos=found
6342 fi
6343
6344 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6345         -o $ol_with_kerberos = kth ; then
6346
6347         for ac_hdr in krb.h des.h krb-archaeology.h 
6348 do
6349 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6350 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6351 echo "configure:6352: checking for $ac_hdr" >&5
6352 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6353   echo $ac_n "(cached) $ac_c" 1>&6
6354 else
6355   cat > conftest.$ac_ext <<EOF
6356 #line 6357 "configure"
6357 #include "confdefs.h"
6358 #include <$ac_hdr>
6359 EOF
6360 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6361 { (eval echo configure:6362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6362 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6363 if test -z "$ac_err"; then
6364   rm -rf conftest*
6365   eval "ac_cv_header_$ac_safe=yes"
6366 else
6367   echo "$ac_err" >&5
6368   echo "configure: failed program was:" >&5
6369   cat conftest.$ac_ext >&5
6370   rm -rf conftest*
6371   eval "ac_cv_header_$ac_safe=no"
6372 fi
6373 rm -f conftest*
6374 fi
6375 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6376   echo "$ac_t""yes" 1>&6
6377     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6378   cat >> confdefs.h <<EOF
6379 #define $ac_tr_hdr 1
6380 EOF
6381  
6382 else
6383   echo "$ac_t""no" 1>&6
6384 fi
6385 done
6386
6387
6388         if test $ac_cv_header_krb_h = yes ; then
6389                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6390 echo "configure:6391: checking for main in -lkrb" >&5
6391 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6392 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6393   echo $ac_n "(cached) $ac_c" 1>&6
6394 else
6395   ac_save_LIBS="$LIBS"
6396 LIBS="-lkrb -ldes $LIBS"
6397 cat > conftest.$ac_ext <<EOF
6398 #line 6399 "configure"
6399 #include "confdefs.h"
6400
6401 int main() {
6402 main()
6403 ; return 0; }
6404 EOF
6405 if { (eval echo configure:6406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6406   rm -rf conftest*
6407   eval "ac_cv_lib_$ac_lib_var=yes"
6408 else
6409   echo "configure: failed program was:" >&5
6410   cat conftest.$ac_ext >&5
6411   rm -rf conftest*
6412   eval "ac_cv_lib_$ac_lib_var=no"
6413 fi
6414 rm -f conftest*
6415 LIBS="$ac_save_LIBS"
6416
6417 fi
6418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6419   echo "$ac_t""yes" 1>&6
6420   have_k4=yes
6421 else
6422   echo "$ac_t""no" 1>&6
6423 have_k4=no
6424 fi
6425
6426
6427                 if test $have_k4 = yes ; then
6428                         ol_with_kerberos=found
6429                         ol_link_krb4=yes
6430
6431                         cat >> confdefs.h <<\EOF
6432 #define HAVE_KRB4 1
6433 EOF
6434
6435
6436                         KRB4_LIBS="-lkrb -ldes"
6437
6438                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6439                                 cat >> confdefs.h <<\EOF
6440 #define HAVE_KTH_KERBEROS 1
6441 EOF
6442
6443                         fi
6444                 fi
6445         fi
6446 fi
6447
6448 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6449         ol_link_kpasswd=yes;
6450 fi
6451
6452 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6453         cat >> confdefs.h <<\EOF
6454 #define HAVE_KERBEROS 1
6455 EOF
6456
6457
6458 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6459         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6460 fi
6461
6462 ol_link_tls=no
6463 if test $ol_with_tls != no ; then
6464         
6465         for ac_hdr in openssl/ssl.h ssl.h
6466 do
6467 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6468 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6469 echo "configure:6470: checking for $ac_hdr" >&5
6470 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6471   echo $ac_n "(cached) $ac_c" 1>&6
6472 else
6473   cat > conftest.$ac_ext <<EOF
6474 #line 6475 "configure"
6475 #include "confdefs.h"
6476 #include <$ac_hdr>
6477 EOF
6478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6479 { (eval echo configure:6480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6481 if test -z "$ac_err"; then
6482   rm -rf conftest*
6483   eval "ac_cv_header_$ac_safe=yes"
6484 else
6485   echo "$ac_err" >&5
6486   echo "configure: failed program was:" >&5
6487   cat conftest.$ac_ext >&5
6488   rm -rf conftest*
6489   eval "ac_cv_header_$ac_safe=no"
6490 fi
6491 rm -f conftest*
6492 fi
6493 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6494   echo "$ac_t""yes" 1>&6
6495     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6496   cat >> confdefs.h <<EOF
6497 #define $ac_tr_hdr 1
6498 EOF
6499  
6500 else
6501   echo "$ac_t""no" 1>&6
6502 fi
6503 done
6504
6505         
6506         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6507                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6508 echo "configure:6509: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6509 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6510 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6511   echo $ac_n "(cached) $ac_c" 1>&6
6512 else
6513   ac_save_LIBS="$LIBS"
6514 LIBS="-lssl -lcrypto $LIBS"
6515 cat > conftest.$ac_ext <<EOF
6516 #line 6517 "configure"
6517 #include "confdefs.h"
6518 /* Override any gcc2 internal prototype to avoid an error.  */
6519 /* We use char because int might match the return type of a gcc2
6520     builtin and then its argument prototype would still apply.  */
6521 char SSLeay_add_ssl_algorithms();
6522
6523 int main() {
6524 SSLeay_add_ssl_algorithms()
6525 ; return 0; }
6526 EOF
6527 if { (eval echo configure:6528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6528   rm -rf conftest*
6529   eval "ac_cv_lib_$ac_lib_var=yes"
6530 else
6531   echo "configure: failed program was:" >&5
6532   cat conftest.$ac_ext >&5
6533   rm -rf conftest*
6534   eval "ac_cv_lib_$ac_lib_var=no"
6535 fi
6536 rm -f conftest*
6537 LIBS="$ac_save_LIBS"
6538
6539 fi
6540 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6541   echo "$ac_t""yes" 1>&6
6542   have_ssleay=yes
6543                         need_rsaref=no
6544 else
6545   echo "$ac_t""no" 1>&6
6546 have_ssleay=no
6547 fi
6548
6549                         
6550                 if test $have_ssleay = no ; then
6551                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6552 echo "configure:6553: checking for SSL_library_init in -lssl" >&5
6553 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6554 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6555   echo $ac_n "(cached) $ac_c" 1>&6
6556 else
6557   ac_save_LIBS="$LIBS"
6558 LIBS="-lssl -lcrypto $LIBS"
6559 cat > conftest.$ac_ext <<EOF
6560 #line 6561 "configure"
6561 #include "confdefs.h"
6562 /* Override any gcc2 internal prototype to avoid an error.  */
6563 /* We use char because int might match the return type of a gcc2
6564     builtin and then its argument prototype would still apply.  */
6565 char SSL_library_init();
6566
6567 int main() {
6568 SSL_library_init()
6569 ; return 0; }
6570 EOF
6571 if { (eval echo configure:6572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6572   rm -rf conftest*
6573   eval "ac_cv_lib_$ac_lib_var=yes"
6574 else
6575   echo "configure: failed program was:" >&5
6576   cat conftest.$ac_ext >&5
6577   rm -rf conftest*
6578   eval "ac_cv_lib_$ac_lib_var=no"
6579 fi
6580 rm -f conftest*
6581 LIBS="$ac_save_LIBS"
6582
6583 fi
6584 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6585   echo "$ac_t""yes" 1>&6
6586   have_ssleay=yes
6587                                 need_rsaref=no
6588 else
6589   echo "$ac_t""no" 1>&6
6590 have_ssleay=no
6591 fi
6592
6593                 fi
6594
6595                 if test $have_ssleay = no ; then
6596                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6597 echo "configure:6598: checking for ssl3_accept in -lssl" >&5
6598 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6599 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6600   echo $ac_n "(cached) $ac_c" 1>&6
6601 else
6602   ac_save_LIBS="$LIBS"
6603 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6604 cat > conftest.$ac_ext <<EOF
6605 #line 6606 "configure"
6606 #include "confdefs.h"
6607 /* Override any gcc2 internal prototype to avoid an error.  */
6608 /* We use char because int might match the return type of a gcc2
6609     builtin and then its argument prototype would still apply.  */
6610 char ssl3_accept();
6611
6612 int main() {
6613 ssl3_accept()
6614 ; return 0; }
6615 EOF
6616 if { (eval echo configure:6617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6617   rm -rf conftest*
6618   eval "ac_cv_lib_$ac_lib_var=yes"
6619 else
6620   echo "configure: failed program was:" >&5
6621   cat conftest.$ac_ext >&5
6622   rm -rf conftest*
6623   eval "ac_cv_lib_$ac_lib_var=no"
6624 fi
6625 rm -f conftest*
6626 LIBS="$ac_save_LIBS"
6627
6628 fi
6629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6630   echo "$ac_t""yes" 1>&6
6631   have_ssleay=yes
6632                                 need_rsaref=yes
6633 else
6634   echo "$ac_t""no" 1>&6
6635 have_ssleay=no
6636 fi
6637
6638                 fi
6639
6640                 if test $have_ssleay = yes ; then
6641                         ol_with_tls=found
6642                         ol_link_tls=yes
6643
6644                         cat >> confdefs.h <<\EOF
6645 #define HAVE_SSLEAY 1
6646 EOF
6647
6648
6649                         if test $need_rsaref = yes; then
6650                                 cat >> confdefs.h <<\EOF
6651 #define HAVE_RSAREF 1
6652 EOF
6653
6654
6655                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6656                         else
6657                                 TLS_LIBS="-lssl -lcrypto"
6658                         fi
6659                 fi
6660         fi
6661 fi
6662
6663 if test $ol_link_tls = yes ; then
6664         cat >> confdefs.h <<\EOF
6665 #define HAVE_TLS 1
6666 EOF
6667
6668 fi      
6669
6670 for ac_func in \
6671         ctime_r                 \
6672         gethostbyname_r gethostbyaddr_r \
6673
6674 do
6675 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6676 echo "configure:6677: checking for $ac_func" >&5
6677 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6678   echo $ac_n "(cached) $ac_c" 1>&6
6679 else
6680   cat > conftest.$ac_ext <<EOF
6681 #line 6682 "configure"
6682 #include "confdefs.h"
6683 /* System header to define __stub macros and hopefully few prototypes,
6684     which can conflict with char $ac_func(); below.  */
6685 #include <assert.h>
6686 /* Override any gcc2 internal prototype to avoid an error.  */
6687 /* We use char because int might match the return type of a gcc2
6688     builtin and then its argument prototype would still apply.  */
6689 char $ac_func();
6690 char (*f)();
6691
6692 int main() {
6693
6694 /* The GNU C library defines this for functions which it implements
6695     to always fail with ENOSYS.  Some functions are actually named
6696     something starting with __ and the normal name is an alias.  */
6697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6698 choke me
6699 #else
6700 f = $ac_func;
6701 #endif
6702
6703 ; return 0; }
6704 EOF
6705 if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6706   rm -rf conftest*
6707   eval "ac_cv_func_$ac_func=yes"
6708 else
6709   echo "configure: failed program was:" >&5
6710   cat conftest.$ac_ext >&5
6711   rm -rf conftest*
6712   eval "ac_cv_func_$ac_func=no"
6713 fi
6714 rm -f conftest*
6715 fi
6716
6717 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6718   echo "$ac_t""yes" 1>&6
6719     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6720   cat >> confdefs.h <<EOF
6721 #define $ac_tr_func 1
6722 EOF
6723  
6724 else
6725   echo "$ac_t""no" 1>&6
6726 fi
6727 done
6728
6729
6730 if test "$ac_cv_func_ctime_r" = no ; then
6731         ol_cv_func_ctime_r_nargs=0
6732 else
6733         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6734 echo "configure:6735: checking number of arguments of ctime_r" >&5
6735 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6736   echo $ac_n "(cached) $ac_c" 1>&6
6737 else
6738   cat > conftest.$ac_ext <<EOF
6739 #line 6740 "configure"
6740 #include "confdefs.h"
6741 #include <time.h>
6742 int main() {
6743 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6744 ; return 0; }
6745 EOF
6746 if { (eval echo configure:6747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6747   rm -rf conftest*
6748   ol_cv_func_ctime_r_nargs3=yes
6749 else
6750   echo "configure: failed program was:" >&5
6751   cat conftest.$ac_ext >&5
6752   rm -rf conftest*
6753   ol_cv_func_ctime_r_nargs3=no
6754 fi
6755 rm -f conftest*
6756
6757         cat > conftest.$ac_ext <<EOF
6758 #line 6759 "configure"
6759 #include "confdefs.h"
6760 #include <time.h>
6761 int main() {
6762 time_t ti; char *buffer; ctime_r(&ti,buffer);
6763 ; return 0; }
6764 EOF
6765 if { (eval echo configure:6766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6766   rm -rf conftest*
6767   ol_cv_func_ctime_r_nargs2=yes
6768 else
6769   echo "configure: failed program was:" >&5
6770   cat conftest.$ac_ext >&5
6771   rm -rf conftest*
6772   ol_cv_func_ctime_r_nargs2=no
6773 fi
6774 rm -f conftest*
6775
6776         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6777                 $ol_cv_func_ctime_r_nargs2 = no ; then
6778
6779                 ol_cv_func_ctime_r_nargs=3
6780
6781         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6782                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6783
6784                 ol_cv_func_ctime_r_nargs=2
6785
6786         else
6787                 ol_cv_func_ctime_r_nargs=0
6788         fi
6789   
6790 fi
6791
6792 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6793
6794   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6795         cat >> confdefs.h <<EOF
6796 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6797 EOF
6798
6799   fi
6800
6801 fi
6802
6803 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6804         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6805 echo "configure:6806: checking number of arguments of gethostbyname_r" >&5
6806 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6807   echo $ac_n "(cached) $ac_c" 1>&6
6808 else
6809   cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812 #include <sys/types.h>
6813 #include <sys/socket.h>
6814 #include <netinet/in.h>
6815 #include <netdb.h>
6816 #define BUFSIZE (sizeof(struct hostent)+10)
6817 int main() {
6818 struct hostent hent; char buffer[BUFSIZE];
6819                 int bufsize=BUFSIZE;int h_errno;
6820                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6821                         buffer, bufsize, &h_errno);
6822 ; return 0; }
6823 EOF
6824 if { (eval echo configure:6825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6825   rm -rf conftest*
6826   ol_cv_func_gethostbyname_r_nargs5=yes
6827 else
6828   echo "configure: failed program was:" >&5
6829   cat conftest.$ac_ext >&5
6830   rm -rf conftest*
6831   ol_cv_func_gethostbyname_r_nargs5=no
6832 fi
6833 rm -f conftest*
6834
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;struct hostent *rhent;
6845                 char buffer[BUFSIZE];
6846                 int bufsize=BUFSIZE;int h_errno;
6847                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6848                         &rhent, &h_errno);
6849 ; return 0; }
6850 EOF
6851 if { (eval echo configure:6852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6852   rm -rf conftest*
6853   ol_cv_func_gethostbyname_r_nargs6=yes
6854 else
6855   echo "configure: failed program was:" >&5
6856   cat conftest.$ac_ext >&5
6857   rm -rf conftest*
6858   ol_cv_func_gethostbyname_r_nargs6=no
6859 fi
6860 rm -f conftest*
6861
6862         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6863                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6864
6865                 ol_cv_func_gethostbyname_r_nargs=5
6866
6867         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6868                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6869
6870                 ol_cv_func_gethostbyname_r_nargs=6
6871
6872         else
6873                 ol_cv_func_gethostbyname_r_nargs=0
6874         fi
6875   
6876 fi
6877
6878 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6879   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6880         cat >> confdefs.h <<EOF
6881 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6882 EOF
6883
6884   fi
6885
6886 else
6887         ol_cv_func_gethostbyname_r_nargs=0
6888 fi
6889  
6890 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6891         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6892 echo "configure:6893: checking number of arguments of gethostbyaddr_r" >&5
6893 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6894   echo $ac_n "(cached) $ac_c" 1>&6
6895 else
6896   cat > conftest.$ac_ext <<EOF
6897 #line 6898 "configure"
6898 #include "confdefs.h"
6899 #include <sys/types.h>
6900 #include <sys/socket.h>
6901 #include <netinet/in.h>
6902 #include <netdb.h>
6903 #define BUFSIZE (sizeof(struct hostent)+10)
6904 int main() {
6905 struct hostent hent; char buffer[BUFSIZE]; 
6906             struct in_addr add;
6907             size_t alen=sizeof(struct in_addr);
6908             int bufsize=BUFSIZE;int h_errno;
6909                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6910                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6911 ; return 0; }
6912 EOF
6913 if { (eval echo configure:6914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6914   rm -rf conftest*
6915   ol_cv_func_gethostbyaddr_r_nargs7=yes
6916 else
6917   echo "configure: failed program was:" >&5
6918   cat conftest.$ac_ext >&5
6919   rm -rf conftest*
6920   ol_cv_func_gethostbyaddr_r_nargs7=no
6921 fi
6922 rm -f conftest*
6923
6924         cat > conftest.$ac_ext <<EOF
6925 #line 6926 "configure"
6926 #include "confdefs.h"
6927 #include <sys/types.h>
6928 #include <sys/socket.h>
6929 #include <netinet/in.h>
6930 #include <netdb.h>
6931 #define BUFSIZE (sizeof(struct hostent)+10)
6932 int main() {
6933 struct hostent hent;
6934                 struct hostent *rhent; char buffer[BUFSIZE]; 
6935                 struct in_addr add;
6936                 size_t alen=sizeof(struct in_addr);
6937                 int bufsize=BUFSIZE;int h_errno;
6938                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6939                         alen, AF_INET, &hent, buffer, bufsize, 
6940                         &rhent, &h_errno);
6941 ; return 0; }
6942 EOF
6943 if { (eval echo configure:6944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6944   rm -rf conftest*
6945   ol_cv_func_gethostbyaddr_r_nargs8=yes
6946 else
6947   echo "configure: failed program was:" >&5
6948   cat conftest.$ac_ext >&5
6949   rm -rf conftest*
6950   ol_cv_func_gethostbyaddr_r_nargs8=no
6951 fi
6952 rm -f conftest*
6953
6954         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6955                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6956
6957                 ol_cv_func_gethostbyaddr_r_nargs=7
6958
6959         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6960                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6961
6962                 ol_cv_func_gethostbyaddr_r_nargs=8
6963
6964         else
6965                 ol_cv_func_gethostbyaddr_r_nargs=0
6966         fi
6967   
6968 fi
6969
6970 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6971   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6972     cat >> confdefs.h <<EOF
6973 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6974 EOF
6975
6976   fi
6977
6978 else
6979         ol_cv_func_gethostbyaddr_r_nargs=0
6980 fi
6981
6982 if test "$ac_cv_func_ctime_r" = yes \
6983         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6984         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6985         -a "$ac_cv_func_gethostbyname_r" = yes \
6986         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6987         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6988         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6989         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6990         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6991         ; then
6992  
6993         cat >> confdefs.h <<\EOF
6994 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6995 EOF
6996
6997 fi
6998
6999 ol_link_threads=no
7000
7001 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7002         -o $ol_with_threads = nt ; then
7003
7004         
7005         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
7006 echo "configure:7007: checking for NT Threads" >&5
7007 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
7008   echo $ac_n "(cached) $ac_c" 1>&6
7009 else
7010   
7011                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7012 echo "configure:7013: checking for _beginthread" >&5
7013 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7014   echo $ac_n "(cached) $ac_c" 1>&6
7015 else
7016   cat > conftest.$ac_ext <<EOF
7017 #line 7018 "configure"
7018 #include "confdefs.h"
7019 /* System header to define __stub macros and hopefully few prototypes,
7020     which can conflict with char _beginthread(); below.  */
7021 #include <assert.h>
7022 /* Override any gcc2 internal prototype to avoid an error.  */
7023 /* We use char because int might match the return type of a gcc2
7024     builtin and then its argument prototype would still apply.  */
7025 char _beginthread();
7026 char (*f)();
7027
7028 int main() {
7029
7030 /* The GNU C library defines this for functions which it implements
7031     to always fail with ENOSYS.  Some functions are actually named
7032     something starting with __ and the normal name is an alias.  */
7033 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7034 choke me
7035 #else
7036 f = _beginthread;
7037 #endif
7038
7039 ; return 0; }
7040 EOF
7041 if { (eval echo configure:7042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7042   rm -rf conftest*
7043   eval "ac_cv_func__beginthread=yes"
7044 else
7045   echo "configure: failed program was:" >&5
7046   cat conftest.$ac_ext >&5
7047   rm -rf conftest*
7048   eval "ac_cv_func__beginthread=no"
7049 fi
7050 rm -f conftest*
7051 fi
7052
7053 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7054   echo "$ac_t""yes" 1>&6
7055   ol_cv_nt_threads=yes
7056 else
7057   echo "$ac_t""no" 1>&6
7058 ol_cv_nt_threads=no
7059 fi
7060
7061         
7062 fi
7063
7064 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7065
7066         if test $ol_cv_nt_threads = yes ; then
7067                 cat >> confdefs.h <<\EOF
7068 #define HAVE_NT_THREADS 1
7069 EOF
7070
7071         fi
7072
7073
7074         if test "$ol_cv_nt_threads" = yes ; then
7075         ol_link_threads=nt
7076         ol_with_threads=found
7077         ol_with_yielding_select=yes
7078
7079                 cat >> confdefs.h <<\EOF
7080 #define HAVE_NT_SERVICE_MANAGER 1
7081 EOF
7082
7083                 cat >> confdefs.h <<\EOF
7084 #define HAVE_NT_EVENT_LOG 1
7085 EOF
7086
7087         fi
7088
7089         if test $ol_with_threads = nt ; then
7090                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7091         fi
7092 fi
7093
7094 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7095         -o $ol_with_threads = posix ; then
7096
7097         for ac_hdr in pthread.h
7098 do
7099 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7100 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7101 echo "configure:7102: checking for $ac_hdr" >&5
7102 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7103   echo $ac_n "(cached) $ac_c" 1>&6
7104 else
7105   cat > conftest.$ac_ext <<EOF
7106 #line 7107 "configure"
7107 #include "confdefs.h"
7108 #include <$ac_hdr>
7109 EOF
7110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7111 { (eval echo configure:7112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7113 if test -z "$ac_err"; then
7114   rm -rf conftest*
7115   eval "ac_cv_header_$ac_safe=yes"
7116 else
7117   echo "$ac_err" >&5
7118   echo "configure: failed program was:" >&5
7119   cat conftest.$ac_ext >&5
7120   rm -rf conftest*
7121   eval "ac_cv_header_$ac_safe=no"
7122 fi
7123 rm -f conftest*
7124 fi
7125 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7126   echo "$ac_t""yes" 1>&6
7127     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7128   cat >> confdefs.h <<EOF
7129 #define $ac_tr_hdr 1
7130 EOF
7131  
7132 else
7133   echo "$ac_t""no" 1>&6
7134 fi
7135 done
7136
7137
7138         if test $ac_cv_header_pthread_h = yes ; then
7139                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7140 echo "configure:7141: checking POSIX thread version" >&5
7141 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7142   echo $ac_n "(cached) $ac_c" 1>&6
7143 else
7144   
7145         cat > conftest.$ac_ext <<EOF
7146 #line 7147 "configure"
7147 #include "confdefs.h"
7148
7149 #               include <pthread.h>
7150                 /* this check could be improved */
7151 #               ifdef PTHREAD_ONCE_INIT
7152                         pthread_version_final;
7153 #               endif
7154         
7155 EOF
7156 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7157   egrep "pthread_version_final" >/dev/null 2>&1; then
7158   rm -rf conftest*
7159   ol_pthread_final=yes
7160 else
7161   rm -rf conftest*
7162   ol_pthread_final=no
7163 fi
7164 rm -f conftest*
7165
7166
7167         cat > conftest.$ac_ext <<EOF
7168 #line 7169 "configure"
7169 #include "confdefs.h"
7170
7171 #               include <pthread.h>
7172                 /* this check could be improved */
7173 #               ifdef pthread_once_init
7174                         pthread_version_draft4;
7175 #               endif
7176         
7177 EOF
7178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7179   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7180   rm -rf conftest*
7181   ol_pthread_draft4=yes
7182 else
7183   rm -rf conftest*
7184   ol_pthread_draft4=no
7185 fi
7186 rm -f conftest*
7187
7188
7189         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7190                 ol_cv_pthread_version=final
7191         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7192                 ol_cv_pthread_version=draft4
7193         else
7194                 ol_cv_pthread_version=unknown
7195         fi
7196
7197 fi
7198
7199 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7200
7201
7202                 if test $ol_cv_pthread_version = final ; then
7203                         cat >> confdefs.h <<\EOF
7204 #define HAVE_PTHREADS_FINAL 1
7205 EOF
7206
7207                 elif test $ol_cv_pthread_version = draft4 ; then
7208                         cat >> confdefs.h <<\EOF
7209 #define HAVE_PTHREADS_D4 1
7210 EOF
7211
7212                 else
7213                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7214                 fi
7215
7216                 # consider threads found
7217                 ol_with_threads=found
7218
7219                 
7220         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7221 echo "configure:7222: checking for LinuxThreads pthread.h" >&5
7222 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7223   echo $ac_n "(cached) $ac_c" 1>&6
7224 else
7225   cat > conftest.$ac_ext <<EOF
7226 #line 7227 "configure"
7227 #include "confdefs.h"
7228 #include <pthread.h>
7229 EOF
7230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7231   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7232   rm -rf conftest*
7233   ol_cv_header_linux_threads=yes
7234 else
7235   rm -rf conftest*
7236   ol_cv_header_linux_threads=no
7237 fi
7238 rm -f conftest*
7239
7240                 
7241 fi
7242
7243 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7244         if test $ol_cv_header_linux_threads = yes; then
7245                 cat >> confdefs.h <<\EOF
7246 #define HAVE_LINUX_THREADS 1
7247 EOF
7248
7249         fi
7250
7251                 
7252         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7253 echo "configure:7254: checking for GNU Pth pthread.h" >&5
7254 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7255   echo $ac_n "(cached) $ac_c" 1>&6
7256 else
7257   cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260 #include <pthread.h>
7261 #ifdef _POSIX_THREAD_IS_GNU_PTH
7262         __gnu_pth__;
7263 #endif
7264
7265 EOF
7266 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7267   egrep "__gnu_pth__" >/dev/null 2>&1; then
7268   rm -rf conftest*
7269   ol_cv_header_gnu_pth_pthread_h=yes
7270 else
7271   rm -rf conftest*
7272   ol_cv_header_gnu_pth_pthread_h=no
7273 fi
7274 rm -f conftest*
7275
7276                 
7277 fi
7278
7279 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7280
7281
7282                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7283                         for ac_hdr in sched.h
7284 do
7285 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7286 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7287 echo "configure:7288: checking for $ac_hdr" >&5
7288 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7289   echo $ac_n "(cached) $ac_c" 1>&6
7290 else
7291   cat > conftest.$ac_ext <<EOF
7292 #line 7293 "configure"
7293 #include "confdefs.h"
7294 #include <$ac_hdr>
7295 EOF
7296 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7297 { (eval echo configure:7298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7298 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7299 if test -z "$ac_err"; then
7300   rm -rf conftest*
7301   eval "ac_cv_header_$ac_safe=yes"
7302 else
7303   echo "$ac_err" >&5
7304   echo "configure: failed program was:" >&5
7305   cat conftest.$ac_ext >&5
7306   rm -rf conftest*
7307   eval "ac_cv_header_$ac_safe=no"
7308 fi
7309 rm -f conftest*
7310 fi
7311 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7312   echo "$ac_t""yes" 1>&6
7313     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7314   cat >> confdefs.h <<EOF
7315 #define $ac_tr_hdr 1
7316 EOF
7317  
7318 else
7319   echo "$ac_t""no" 1>&6
7320 fi
7321 done
7322
7323                 fi
7324
7325                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7326                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7327 echo "configure:7328: checking for pthread_create in default libraries" >&5
7328 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7329   echo $ac_n "(cached) $ac_c" 1>&6
7330 else
7331   
7332                 if test "$cross_compiling" = yes; then
7333   cat > conftest.$ac_ext <<EOF
7334 #line 7335 "configure"
7335 #include "confdefs.h"
7336 /* pthread test headers */
7337 #include <pthread.h>
7338 #ifndef NULL
7339 #define NULL (void*)0
7340 #endif
7341
7342 static void *task(p)
7343         void *p;
7344 {
7345         return (void *) (p == NULL);
7346 }
7347
7348 int main() {
7349
7350         /* pthread test function */
7351         pthread_t t;
7352         int status;
7353
7354         /* make sure pthread_create() isn't just a stub */
7355 #if HAVE_PTHREADS_D4
7356         status = pthread_create(&t, pthread_attr_default, task, NULL);
7357 #else
7358         status = pthread_create(&t, NULL, task, NULL);
7359 #endif
7360
7361         if( status ) exit( status );
7362
7363         /* make sure pthread_detach() isn't just a stub */
7364 #if HAVE_PTHREADS_D4
7365         status = pthread_detach( &t );
7366 #else
7367         status = pthread_detach( t );
7368 #endif
7369
7370 #ifdef HAVE_LINUX_THREADS
7371         pthread_kill_other_threads_np();
7372 #endif
7373
7374         exit( status );
7375
7376 ; return 0; }
7377 EOF
7378 if { (eval echo configure:7379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7379   rm -rf conftest*
7380   ol_cv_pthread_create=yes
7381 else
7382   echo "configure: failed program was:" >&5
7383   cat conftest.$ac_ext >&5
7384   rm -rf conftest*
7385   ol_cv_pthread_create=no
7386 fi
7387 rm -f conftest*
7388 else
7389   cat > conftest.$ac_ext <<EOF
7390 #line 7391 "configure"
7391 #include "confdefs.h"
7392 /* pthread test headers */
7393 #include <pthread.h>
7394 #ifndef NULL
7395 #define NULL (void*)0
7396 #endif
7397
7398 static void *task(p)
7399         void *p;
7400 {
7401         return (void *) (p == NULL);
7402 }
7403
7404
7405 int main(argc, argv)
7406         int argc;
7407         char **argv;
7408 {
7409
7410         /* pthread test function */
7411         pthread_t t;
7412         int status;
7413
7414         /* make sure pthread_create() isn't just a stub */
7415 #if HAVE_PTHREADS_D4
7416         status = pthread_create(&t, pthread_attr_default, task, NULL);
7417 #else
7418         status = pthread_create(&t, NULL, task, NULL);
7419 #endif
7420
7421         if( status ) exit( status );
7422
7423         /* make sure pthread_detach() isn't just a stub */
7424 #if HAVE_PTHREADS_D4
7425         status = pthread_detach( &t );
7426 #else
7427         status = pthread_detach( t );
7428 #endif
7429
7430 #ifdef HAVE_LINUX_THREADS
7431         pthread_kill_other_threads_np();
7432 #endif
7433
7434         exit( status );
7435
7436 }
7437
7438 EOF
7439 if { (eval echo configure:7440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7440 then
7441   ol_cv_pthread_create=yes
7442 else
7443   echo "configure: failed program was:" >&5
7444   cat conftest.$ac_ext >&5
7445   rm -fr conftest*
7446   ol_cv_pthread_create=no
7447 fi
7448 rm -fr conftest*
7449 fi
7450
7451 fi
7452
7453 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7454
7455                 if test $ol_cv_pthread_create != no ; then
7456                         ol_link_threads=posix
7457                         ol_link_pthreads=""
7458                 fi
7459                 
7460                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7461 if test "$ol_link_threads" = no ; then
7462         # try -kthread
7463         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7464 echo "configure:7465: checking for pthread link with -kthread" >&5
7465 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7466   echo $ac_n "(cached) $ac_c" 1>&6
7467 else
7468   
7469                 # save the flags
7470                 ol_LIBS="$LIBS"
7471                 LIBS="-kthread $LIBS"
7472
7473                 if test "$cross_compiling" = yes; then
7474   cat > conftest.$ac_ext <<EOF
7475 #line 7476 "configure"
7476 #include "confdefs.h"
7477 /* pthread test headers */
7478 #include <pthread.h>
7479 #ifndef NULL
7480 #define NULL (void*)0
7481 #endif
7482
7483 static void *task(p)
7484         void *p;
7485 {
7486         return (void *) (p == NULL);
7487 }
7488
7489 int main() {
7490
7491         /* pthread test function */
7492         pthread_t t;
7493         int status;
7494
7495         /* make sure pthread_create() isn't just a stub */
7496 #if HAVE_PTHREADS_D4
7497         status = pthread_create(&t, pthread_attr_default, task, NULL);
7498 #else
7499         status = pthread_create(&t, NULL, task, NULL);
7500 #endif
7501
7502         if( status ) exit( status );
7503
7504         /* make sure pthread_detach() isn't just a stub */
7505 #if HAVE_PTHREADS_D4
7506         status = pthread_detach( &t );
7507 #else
7508         status = pthread_detach( t );
7509 #endif
7510
7511 #ifdef HAVE_LINUX_THREADS
7512         pthread_kill_other_threads_np();
7513 #endif
7514
7515         exit( status );
7516
7517 ; return 0; }
7518 EOF
7519 if { (eval echo configure:7520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7520   rm -rf conftest*
7521   ol_cv_pthread_kthread=yes
7522 else
7523   echo "configure: failed program was:" >&5
7524   cat conftest.$ac_ext >&5
7525   rm -rf conftest*
7526   ol_cv_pthread_kthread=no
7527 fi
7528 rm -f conftest*
7529 else
7530   cat > conftest.$ac_ext <<EOF
7531 #line 7532 "configure"
7532 #include "confdefs.h"
7533 /* pthread test headers */
7534 #include <pthread.h>
7535 #ifndef NULL
7536 #define NULL (void*)0
7537 #endif
7538
7539 static void *task(p)
7540         void *p;
7541 {
7542         return (void *) (p == NULL);
7543 }
7544
7545
7546 int main(argc, argv)
7547         int argc;
7548         char **argv;
7549 {
7550
7551         /* pthread test function */
7552         pthread_t t;
7553         int status;
7554
7555         /* make sure pthread_create() isn't just a stub */
7556 #if HAVE_PTHREADS_D4
7557         status = pthread_create(&t, pthread_attr_default, task, NULL);
7558 #else
7559         status = pthread_create(&t, NULL, task, NULL);
7560 #endif
7561
7562         if( status ) exit( status );
7563
7564         /* make sure pthread_detach() isn't just a stub */
7565 #if HAVE_PTHREADS_D4
7566         status = pthread_detach( &t );
7567 #else
7568         status = pthread_detach( t );
7569 #endif
7570
7571 #ifdef HAVE_LINUX_THREADS
7572         pthread_kill_other_threads_np();
7573 #endif
7574
7575         exit( status );
7576
7577 }
7578
7579 EOF
7580 if { (eval echo configure:7581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7581 then
7582   ol_cv_pthread_kthread=yes
7583 else
7584   echo "configure: failed program was:" >&5
7585   cat conftest.$ac_ext >&5
7586   rm -fr conftest*
7587   ol_cv_pthread_kthread=no
7588 fi
7589 rm -fr conftest*
7590 fi
7591
7592
7593                 # restore the LIBS
7594                 LIBS="$ol_LIBS"
7595         
7596 fi
7597
7598 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7599
7600         if test $ol_cv_pthread_kthread = yes ; then
7601                 ol_link_pthreads="-kthread"
7602                 ol_link_threads=posix
7603         fi
7604 fi
7605
7606                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7607 if test "$ol_link_threads" = no ; then
7608         # try -pthread
7609         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7610 echo "configure:7611: checking for pthread link with -pthread" >&5
7611 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7612   echo $ac_n "(cached) $ac_c" 1>&6
7613 else
7614   
7615                 # save the flags
7616                 ol_LIBS="$LIBS"
7617                 LIBS="-pthread $LIBS"
7618
7619                 if test "$cross_compiling" = yes; then
7620   cat > conftest.$ac_ext <<EOF
7621 #line 7622 "configure"
7622 #include "confdefs.h"
7623 /* pthread test headers */
7624 #include <pthread.h>
7625 #ifndef NULL
7626 #define NULL (void*)0
7627 #endif
7628
7629 static void *task(p)
7630         void *p;
7631 {
7632         return (void *) (p == NULL);
7633 }
7634
7635 int main() {
7636
7637         /* pthread test function */
7638         pthread_t t;
7639         int status;
7640
7641         /* make sure pthread_create() isn't just a stub */
7642 #if HAVE_PTHREADS_D4
7643         status = pthread_create(&t, pthread_attr_default, task, NULL);
7644 #else
7645         status = pthread_create(&t, NULL, task, NULL);
7646 #endif
7647
7648         if( status ) exit( status );
7649
7650         /* make sure pthread_detach() isn't just a stub */
7651 #if HAVE_PTHREADS_D4
7652         status = pthread_detach( &t );
7653 #else
7654         status = pthread_detach( t );
7655 #endif
7656
7657 #ifdef HAVE_LINUX_THREADS
7658         pthread_kill_other_threads_np();
7659 #endif
7660
7661         exit( status );
7662
7663 ; return 0; }
7664 EOF
7665 if { (eval echo configure:7666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7666   rm -rf conftest*
7667   ol_cv_pthread_pthread=yes
7668 else
7669   echo "configure: failed program was:" >&5
7670   cat conftest.$ac_ext >&5
7671   rm -rf conftest*
7672   ol_cv_pthread_pthread=no
7673 fi
7674 rm -f conftest*
7675 else
7676   cat > conftest.$ac_ext <<EOF
7677 #line 7678 "configure"
7678 #include "confdefs.h"
7679 /* pthread test headers */
7680 #include <pthread.h>
7681 #ifndef NULL
7682 #define NULL (void*)0
7683 #endif
7684
7685 static void *task(p)
7686         void *p;
7687 {
7688         return (void *) (p == NULL);
7689 }
7690
7691
7692 int main(argc, argv)
7693         int argc;
7694         char **argv;
7695 {
7696
7697         /* pthread test function */
7698         pthread_t t;
7699         int status;
7700
7701         /* make sure pthread_create() isn't just a stub */
7702 #if HAVE_PTHREADS_D4
7703         status = pthread_create(&t, pthread_attr_default, task, NULL);
7704 #else
7705         status = pthread_create(&t, NULL, task, NULL);
7706 #endif
7707
7708         if( status ) exit( status );
7709
7710         /* make sure pthread_detach() isn't just a stub */
7711 #if HAVE_PTHREADS_D4
7712         status = pthread_detach( &t );
7713 #else
7714         status = pthread_detach( t );
7715 #endif
7716
7717 #ifdef HAVE_LINUX_THREADS
7718         pthread_kill_other_threads_np();
7719 #endif
7720
7721         exit( status );
7722
7723 }
7724
7725 EOF
7726 if { (eval echo configure:7727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7727 then
7728   ol_cv_pthread_pthread=yes
7729 else
7730   echo "configure: failed program was:" >&5
7731   cat conftest.$ac_ext >&5
7732   rm -fr conftest*
7733   ol_cv_pthread_pthread=no
7734 fi
7735 rm -fr conftest*
7736 fi
7737
7738
7739                 # restore the LIBS
7740                 LIBS="$ol_LIBS"
7741         
7742 fi
7743
7744 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7745
7746         if test $ol_cv_pthread_pthread = yes ; then
7747                 ol_link_pthreads="-pthread"
7748                 ol_link_threads=posix
7749         fi
7750 fi
7751
7752                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7753 if test "$ol_link_threads" = no ; then
7754         # try -pthreads
7755         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7756 echo "configure:7757: checking for pthread link with -pthreads" >&5
7757 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7758   echo $ac_n "(cached) $ac_c" 1>&6
7759 else
7760   
7761                 # save the flags
7762                 ol_LIBS="$LIBS"
7763                 LIBS="-pthreads $LIBS"
7764
7765                 if test "$cross_compiling" = yes; then
7766   cat > conftest.$ac_ext <<EOF
7767 #line 7768 "configure"
7768 #include "confdefs.h"
7769 /* pthread test headers */
7770 #include <pthread.h>
7771 #ifndef NULL
7772 #define NULL (void*)0
7773 #endif
7774
7775 static void *task(p)
7776         void *p;
7777 {
7778         return (void *) (p == NULL);
7779 }
7780
7781 int main() {
7782
7783         /* pthread test function */
7784         pthread_t t;
7785         int status;
7786
7787         /* make sure pthread_create() isn't just a stub */
7788 #if HAVE_PTHREADS_D4
7789         status = pthread_create(&t, pthread_attr_default, task, NULL);
7790 #else
7791         status = pthread_create(&t, NULL, task, NULL);
7792 #endif
7793
7794         if( status ) exit( status );
7795
7796         /* make sure pthread_detach() isn't just a stub */
7797 #if HAVE_PTHREADS_D4
7798         status = pthread_detach( &t );
7799 #else
7800         status = pthread_detach( t );
7801 #endif
7802
7803 #ifdef HAVE_LINUX_THREADS
7804         pthread_kill_other_threads_np();
7805 #endif
7806
7807         exit( status );
7808
7809 ; return 0; }
7810 EOF
7811 if { (eval echo configure:7812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7812   rm -rf conftest*
7813   ol_cv_pthread_pthreads=yes
7814 else
7815   echo "configure: failed program was:" >&5
7816   cat conftest.$ac_ext >&5
7817   rm -rf conftest*
7818   ol_cv_pthread_pthreads=no
7819 fi
7820 rm -f conftest*
7821 else
7822   cat > conftest.$ac_ext <<EOF
7823 #line 7824 "configure"
7824 #include "confdefs.h"
7825 /* pthread test headers */
7826 #include <pthread.h>
7827 #ifndef NULL
7828 #define NULL (void*)0
7829 #endif
7830
7831 static void *task(p)
7832         void *p;
7833 {
7834         return (void *) (p == NULL);
7835 }
7836
7837
7838 int main(argc, argv)
7839         int argc;
7840         char **argv;
7841 {
7842
7843         /* pthread test function */
7844         pthread_t t;
7845         int status;
7846
7847         /* make sure pthread_create() isn't just a stub */
7848 #if HAVE_PTHREADS_D4
7849         status = pthread_create(&t, pthread_attr_default, task, NULL);
7850 #else
7851         status = pthread_create(&t, NULL, task, NULL);
7852 #endif
7853
7854         if( status ) exit( status );
7855
7856         /* make sure pthread_detach() isn't just a stub */
7857 #if HAVE_PTHREADS_D4
7858         status = pthread_detach( &t );
7859 #else
7860         status = pthread_detach( t );
7861 #endif
7862
7863 #ifdef HAVE_LINUX_THREADS
7864         pthread_kill_other_threads_np();
7865 #endif
7866
7867         exit( status );
7868
7869 }
7870
7871 EOF
7872 if { (eval echo configure:7873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7873 then
7874   ol_cv_pthread_pthreads=yes
7875 else
7876   echo "configure: failed program was:" >&5
7877   cat conftest.$ac_ext >&5
7878   rm -fr conftest*
7879   ol_cv_pthread_pthreads=no
7880 fi
7881 rm -fr conftest*
7882 fi
7883
7884
7885                 # restore the LIBS
7886                 LIBS="$ol_LIBS"
7887         
7888 fi
7889
7890 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7891
7892         if test $ol_cv_pthread_pthreads = yes ; then
7893                 ol_link_pthreads="-pthreads"
7894                 ol_link_threads=posix
7895         fi
7896 fi
7897
7898                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7899 if test "$ol_link_threads" = no ; then
7900         # try -mthreads
7901         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7902 echo "configure:7903: checking for pthread link with -mthreads" >&5
7903 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7904   echo $ac_n "(cached) $ac_c" 1>&6
7905 else
7906   
7907                 # save the flags
7908                 ol_LIBS="$LIBS"
7909                 LIBS="-mthreads $LIBS"
7910
7911                 if test "$cross_compiling" = yes; then
7912   cat > conftest.$ac_ext <<EOF
7913 #line 7914 "configure"
7914 #include "confdefs.h"
7915 /* pthread test headers */
7916 #include <pthread.h>
7917 #ifndef NULL
7918 #define NULL (void*)0
7919 #endif
7920
7921 static void *task(p)
7922         void *p;
7923 {
7924         return (void *) (p == NULL);
7925 }
7926
7927 int main() {
7928
7929         /* pthread test function */
7930         pthread_t t;
7931         int status;
7932
7933         /* make sure pthread_create() isn't just a stub */
7934 #if HAVE_PTHREADS_D4
7935         status = pthread_create(&t, pthread_attr_default, task, NULL);
7936 #else
7937         status = pthread_create(&t, NULL, task, NULL);
7938 #endif
7939
7940         if( status ) exit( status );
7941
7942         /* make sure pthread_detach() isn't just a stub */
7943 #if HAVE_PTHREADS_D4
7944         status = pthread_detach( &t );
7945 #else
7946         status = pthread_detach( t );
7947 #endif
7948
7949 #ifdef HAVE_LINUX_THREADS
7950         pthread_kill_other_threads_np();
7951 #endif
7952
7953         exit( status );
7954
7955 ; return 0; }
7956 EOF
7957 if { (eval echo configure:7958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7958   rm -rf conftest*
7959   ol_cv_pthread_mthreads=yes
7960 else
7961   echo "configure: failed program was:" >&5
7962   cat conftest.$ac_ext >&5
7963   rm -rf conftest*
7964   ol_cv_pthread_mthreads=no
7965 fi
7966 rm -f conftest*
7967 else
7968   cat > conftest.$ac_ext <<EOF
7969 #line 7970 "configure"
7970 #include "confdefs.h"
7971 /* pthread test headers */
7972 #include <pthread.h>
7973 #ifndef NULL
7974 #define NULL (void*)0
7975 #endif
7976
7977 static void *task(p)
7978         void *p;
7979 {
7980         return (void *) (p == NULL);
7981 }
7982
7983
7984 int main(argc, argv)
7985         int argc;
7986         char **argv;
7987 {
7988
7989         /* pthread test function */
7990         pthread_t t;
7991         int status;
7992
7993         /* make sure pthread_create() isn't just a stub */
7994 #if HAVE_PTHREADS_D4
7995         status = pthread_create(&t, pthread_attr_default, task, NULL);
7996 #else
7997         status = pthread_create(&t, NULL, task, NULL);
7998 #endif
7999
8000         if( status ) exit( status );
8001
8002         /* make sure pthread_detach() isn't just a stub */
8003 #if HAVE_PTHREADS_D4
8004         status = pthread_detach( &t );
8005 #else
8006         status = pthread_detach( t );
8007 #endif
8008
8009 #ifdef HAVE_LINUX_THREADS
8010         pthread_kill_other_threads_np();
8011 #endif
8012
8013         exit( status );
8014
8015 }
8016
8017 EOF
8018 if { (eval echo configure:8019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8019 then
8020   ol_cv_pthread_mthreads=yes
8021 else
8022   echo "configure: failed program was:" >&5
8023   cat conftest.$ac_ext >&5
8024   rm -fr conftest*
8025   ol_cv_pthread_mthreads=no
8026 fi
8027 rm -fr conftest*
8028 fi
8029
8030
8031                 # restore the LIBS
8032                 LIBS="$ol_LIBS"
8033         
8034 fi
8035
8036 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8037
8038         if test $ol_cv_pthread_mthreads = yes ; then
8039                 ol_link_pthreads="-mthreads"
8040                 ol_link_threads=posix
8041         fi
8042 fi
8043
8044                 # Pthread try link: -thread (ol_cv_pthread_thread)
8045 if test "$ol_link_threads" = no ; then
8046         # try -thread
8047         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8048 echo "configure:8049: checking for pthread link with -thread" >&5
8049 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8050   echo $ac_n "(cached) $ac_c" 1>&6
8051 else
8052   
8053                 # save the flags
8054                 ol_LIBS="$LIBS"
8055                 LIBS="-thread $LIBS"
8056
8057                 if test "$cross_compiling" = yes; then
8058   cat > conftest.$ac_ext <<EOF
8059 #line 8060 "configure"
8060 #include "confdefs.h"
8061 /* pthread test headers */
8062 #include <pthread.h>
8063 #ifndef NULL
8064 #define NULL (void*)0
8065 #endif
8066
8067 static void *task(p)
8068         void *p;
8069 {
8070         return (void *) (p == NULL);
8071 }
8072
8073 int main() {
8074
8075         /* pthread test function */
8076         pthread_t t;
8077         int status;
8078
8079         /* make sure pthread_create() isn't just a stub */
8080 #if HAVE_PTHREADS_D4
8081         status = pthread_create(&t, pthread_attr_default, task, NULL);
8082 #else
8083         status = pthread_create(&t, NULL, task, NULL);
8084 #endif
8085
8086         if( status ) exit( status );
8087
8088         /* make sure pthread_detach() isn't just a stub */
8089 #if HAVE_PTHREADS_D4
8090         status = pthread_detach( &t );
8091 #else
8092         status = pthread_detach( t );
8093 #endif
8094
8095 #ifdef HAVE_LINUX_THREADS
8096         pthread_kill_other_threads_np();
8097 #endif
8098
8099         exit( status );
8100
8101 ; return 0; }
8102 EOF
8103 if { (eval echo configure:8104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8104   rm -rf conftest*
8105   ol_cv_pthread_thread=yes
8106 else
8107   echo "configure: failed program was:" >&5
8108   cat conftest.$ac_ext >&5
8109   rm -rf conftest*
8110   ol_cv_pthread_thread=no
8111 fi
8112 rm -f conftest*
8113 else
8114   cat > conftest.$ac_ext <<EOF
8115 #line 8116 "configure"
8116 #include "confdefs.h"
8117 /* pthread test headers */
8118 #include <pthread.h>
8119 #ifndef NULL
8120 #define NULL (void*)0
8121 #endif
8122
8123 static void *task(p)
8124         void *p;
8125 {
8126         return (void *) (p == NULL);
8127 }
8128
8129
8130 int main(argc, argv)
8131         int argc;
8132         char **argv;
8133 {
8134
8135         /* pthread test function */
8136         pthread_t t;
8137         int status;
8138
8139         /* make sure pthread_create() isn't just a stub */
8140 #if HAVE_PTHREADS_D4
8141         status = pthread_create(&t, pthread_attr_default, task, NULL);
8142 #else
8143         status = pthread_create(&t, NULL, task, NULL);
8144 #endif
8145
8146         if( status ) exit( status );
8147
8148         /* make sure pthread_detach() isn't just a stub */
8149 #if HAVE_PTHREADS_D4
8150         status = pthread_detach( &t );
8151 #else
8152         status = pthread_detach( t );
8153 #endif
8154
8155 #ifdef HAVE_LINUX_THREADS
8156         pthread_kill_other_threads_np();
8157 #endif
8158
8159         exit( status );
8160
8161 }
8162
8163 EOF
8164 if { (eval echo configure:8165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8165 then
8166   ol_cv_pthread_thread=yes
8167 else
8168   echo "configure: failed program was:" >&5
8169   cat conftest.$ac_ext >&5
8170   rm -fr conftest*
8171   ol_cv_pthread_thread=no
8172 fi
8173 rm -fr conftest*
8174 fi
8175
8176
8177                 # restore the LIBS
8178                 LIBS="$ol_LIBS"
8179         
8180 fi
8181
8182 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8183
8184         if test $ol_cv_pthread_thread = yes ; then
8185                 ol_link_pthreads="-thread"
8186                 ol_link_threads=posix
8187         fi
8188 fi
8189
8190
8191                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8192 if test "$ol_link_threads" = no ; then
8193         # try -lpthread -lmach -lexc -lc_r
8194         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8195 echo "configure:8196: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8196 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8197   echo $ac_n "(cached) $ac_c" 1>&6
8198 else
8199   
8200                 # save the flags
8201                 ol_LIBS="$LIBS"
8202                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8203
8204                 if test "$cross_compiling" = yes; then
8205   cat > conftest.$ac_ext <<EOF
8206 #line 8207 "configure"
8207 #include "confdefs.h"
8208 /* pthread test headers */
8209 #include <pthread.h>
8210 #ifndef NULL
8211 #define NULL (void*)0
8212 #endif
8213
8214 static void *task(p)
8215         void *p;
8216 {
8217         return (void *) (p == NULL);
8218 }
8219
8220 int main() {
8221
8222         /* pthread test function */
8223         pthread_t t;
8224         int status;
8225
8226         /* make sure pthread_create() isn't just a stub */
8227 #if HAVE_PTHREADS_D4
8228         status = pthread_create(&t, pthread_attr_default, task, NULL);
8229 #else
8230         status = pthread_create(&t, NULL, task, NULL);
8231 #endif
8232
8233         if( status ) exit( status );
8234
8235         /* make sure pthread_detach() isn't just a stub */
8236 #if HAVE_PTHREADS_D4
8237         status = pthread_detach( &t );
8238 #else
8239         status = pthread_detach( t );
8240 #endif
8241
8242 #ifdef HAVE_LINUX_THREADS
8243         pthread_kill_other_threads_np();
8244 #endif
8245
8246         exit( status );
8247
8248 ; return 0; }
8249 EOF
8250 if { (eval echo configure:8251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8251   rm -rf conftest*
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 -rf conftest*
8257   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8258 fi
8259 rm -f conftest*
8260 else
8261   cat > conftest.$ac_ext <<EOF
8262 #line 8263 "configure"
8263 #include "confdefs.h"
8264 /* pthread test headers */
8265 #include <pthread.h>
8266 #ifndef NULL
8267 #define NULL (void*)0
8268 #endif
8269
8270 static void *task(p)
8271         void *p;
8272 {
8273         return (void *) (p == NULL);
8274 }
8275
8276
8277 int main(argc, argv)
8278         int argc;
8279         char **argv;
8280 {
8281
8282         /* pthread test function */
8283         pthread_t t;
8284         int status;
8285
8286         /* make sure pthread_create() isn't just a stub */
8287 #if HAVE_PTHREADS_D4
8288         status = pthread_create(&t, pthread_attr_default, task, NULL);
8289 #else
8290         status = pthread_create(&t, NULL, task, NULL);
8291 #endif
8292
8293         if( status ) exit( status );
8294
8295         /* make sure pthread_detach() isn't just a stub */
8296 #if HAVE_PTHREADS_D4
8297         status = pthread_detach( &t );
8298 #else
8299         status = pthread_detach( t );
8300 #endif
8301
8302 #ifdef HAVE_LINUX_THREADS
8303         pthread_kill_other_threads_np();
8304 #endif
8305
8306         exit( status );
8307
8308 }
8309
8310 EOF
8311 if { (eval echo configure:8312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8312 then
8313   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8314 else
8315   echo "configure: failed program was:" >&5
8316   cat conftest.$ac_ext >&5
8317   rm -fr conftest*
8318   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8319 fi
8320 rm -fr conftest*
8321 fi
8322
8323
8324                 # restore the LIBS
8325                 LIBS="$ol_LIBS"
8326         
8327 fi
8328
8329 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8330
8331         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8332                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8333                 ol_link_threads=posix
8334         fi
8335 fi
8336
8337                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8338 if test "$ol_link_threads" = no ; then
8339         # try -lpthread -lmach -lexc
8340         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8341 echo "configure:8342: checking for pthread link with -lpthread -lmach -lexc" >&5
8342 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8343   echo $ac_n "(cached) $ac_c" 1>&6
8344 else
8345   
8346                 # save the flags
8347                 ol_LIBS="$LIBS"
8348                 LIBS="-lpthread -lmach -lexc $LIBS"
8349
8350                 if test "$cross_compiling" = yes; then
8351   cat > conftest.$ac_ext <<EOF
8352 #line 8353 "configure"
8353 #include "confdefs.h"
8354 /* pthread test headers */
8355 #include <pthread.h>
8356 #ifndef NULL
8357 #define NULL (void*)0
8358 #endif
8359
8360 static void *task(p)
8361         void *p;
8362 {
8363         return (void *) (p == NULL);
8364 }
8365
8366 int main() {
8367
8368         /* pthread test function */
8369         pthread_t t;
8370         int status;
8371
8372         /* make sure pthread_create() isn't just a stub */
8373 #if HAVE_PTHREADS_D4
8374         status = pthread_create(&t, pthread_attr_default, task, NULL);
8375 #else
8376         status = pthread_create(&t, NULL, task, NULL);
8377 #endif
8378
8379         if( status ) exit( status );
8380
8381         /* make sure pthread_detach() isn't just a stub */
8382 #if HAVE_PTHREADS_D4
8383         status = pthread_detach( &t );
8384 #else
8385         status = pthread_detach( t );
8386 #endif
8387
8388 #ifdef HAVE_LINUX_THREADS
8389         pthread_kill_other_threads_np();
8390 #endif
8391
8392         exit( status );
8393
8394 ; return 0; }
8395 EOF
8396 if { (eval echo configure:8397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8397   rm -rf conftest*
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 -rf conftest*
8403   ol_cv_pthread_lpthread_lmach_lexc=no
8404 fi
8405 rm -f conftest*
8406 else
8407   cat > conftest.$ac_ext <<EOF
8408 #line 8409 "configure"
8409 #include "confdefs.h"
8410 /* pthread test headers */
8411 #include <pthread.h>
8412 #ifndef NULL
8413 #define NULL (void*)0
8414 #endif
8415
8416 static void *task(p)
8417         void *p;
8418 {
8419         return (void *) (p == NULL);
8420 }
8421
8422
8423 int main(argc, argv)
8424         int argc;
8425         char **argv;
8426 {
8427
8428         /* pthread test function */
8429         pthread_t t;
8430         int status;
8431
8432         /* make sure pthread_create() isn't just a stub */
8433 #if HAVE_PTHREADS_D4
8434         status = pthread_create(&t, pthread_attr_default, task, NULL);
8435 #else
8436         status = pthread_create(&t, NULL, task, NULL);
8437 #endif
8438
8439         if( status ) exit( status );
8440
8441         /* make sure pthread_detach() isn't just a stub */
8442 #if HAVE_PTHREADS_D4
8443         status = pthread_detach( &t );
8444 #else
8445         status = pthread_detach( t );
8446 #endif
8447
8448 #ifdef HAVE_LINUX_THREADS
8449         pthread_kill_other_threads_np();
8450 #endif
8451
8452         exit( status );
8453
8454 }
8455
8456 EOF
8457 if { (eval echo configure:8458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8458 then
8459   ol_cv_pthread_lpthread_lmach_lexc=yes
8460 else
8461   echo "configure: failed program was:" >&5
8462   cat conftest.$ac_ext >&5
8463   rm -fr conftest*
8464   ol_cv_pthread_lpthread_lmach_lexc=no
8465 fi
8466 rm -fr conftest*
8467 fi
8468
8469
8470                 # restore the LIBS
8471                 LIBS="$ol_LIBS"
8472         
8473 fi
8474
8475 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8476
8477         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8478                 ol_link_pthreads="-lpthread -lmach -lexc"
8479                 ol_link_threads=posix
8480         fi
8481 fi
8482
8483
8484                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8485 if test "$ol_link_threads" = no ; then
8486         # try -lpthread -Wl,-woff,85
8487         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8488 echo "configure:8489: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8489 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8490   echo $ac_n "(cached) $ac_c" 1>&6
8491 else
8492   
8493                 # save the flags
8494                 ol_LIBS="$LIBS"
8495                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8496
8497                 if test "$cross_compiling" = yes; then
8498   cat > conftest.$ac_ext <<EOF
8499 #line 8500 "configure"
8500 #include "confdefs.h"
8501 /* pthread test headers */
8502 #include <pthread.h>
8503 #ifndef NULL
8504 #define NULL (void*)0
8505 #endif
8506
8507 static void *task(p)
8508         void *p;
8509 {
8510         return (void *) (p == NULL);
8511 }
8512
8513 int main() {
8514
8515         /* pthread test function */
8516         pthread_t t;
8517         int status;
8518
8519         /* make sure pthread_create() isn't just a stub */
8520 #if HAVE_PTHREADS_D4
8521         status = pthread_create(&t, pthread_attr_default, task, NULL);
8522 #else
8523         status = pthread_create(&t, NULL, task, NULL);
8524 #endif
8525
8526         if( status ) exit( status );
8527
8528         /* make sure pthread_detach() isn't just a stub */
8529 #if HAVE_PTHREADS_D4
8530         status = pthread_detach( &t );
8531 #else
8532         status = pthread_detach( t );
8533 #endif
8534
8535 #ifdef HAVE_LINUX_THREADS
8536         pthread_kill_other_threads_np();
8537 #endif
8538
8539         exit( status );
8540
8541 ; return 0; }
8542 EOF
8543 if { (eval echo configure:8544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8544   rm -rf conftest*
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 -rf conftest*
8550   ol_cv_pthread_lib_lpthread_woff=no
8551 fi
8552 rm -f conftest*
8553 else
8554   cat > conftest.$ac_ext <<EOF
8555 #line 8556 "configure"
8556 #include "confdefs.h"
8557 /* pthread test headers */
8558 #include <pthread.h>
8559 #ifndef NULL
8560 #define NULL (void*)0
8561 #endif
8562
8563 static void *task(p)
8564         void *p;
8565 {
8566         return (void *) (p == NULL);
8567 }
8568
8569
8570 int main(argc, argv)
8571         int argc;
8572         char **argv;
8573 {
8574
8575         /* pthread test function */
8576         pthread_t t;
8577         int status;
8578
8579         /* make sure pthread_create() isn't just a stub */
8580 #if HAVE_PTHREADS_D4
8581         status = pthread_create(&t, pthread_attr_default, task, NULL);
8582 #else
8583         status = pthread_create(&t, NULL, task, NULL);
8584 #endif
8585
8586         if( status ) exit( status );
8587
8588         /* make sure pthread_detach() isn't just a stub */
8589 #if HAVE_PTHREADS_D4
8590         status = pthread_detach( &t );
8591 #else
8592         status = pthread_detach( t );
8593 #endif
8594
8595 #ifdef HAVE_LINUX_THREADS
8596         pthread_kill_other_threads_np();
8597 #endif
8598
8599         exit( status );
8600
8601 }
8602
8603 EOF
8604 if { (eval echo configure:8605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8605 then
8606   ol_cv_pthread_lib_lpthread_woff=yes
8607 else
8608   echo "configure: failed program was:" >&5
8609   cat conftest.$ac_ext >&5
8610   rm -fr conftest*
8611   ol_cv_pthread_lib_lpthread_woff=no
8612 fi
8613 rm -fr conftest*
8614 fi
8615
8616
8617                 # restore the LIBS
8618                 LIBS="$ol_LIBS"
8619         
8620 fi
8621
8622 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8623
8624         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8625                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8626                 ol_link_threads=posix
8627         fi
8628 fi
8629
8630
8631                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8632 if test "$ol_link_threads" = no ; then
8633         # try -lpthread
8634         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8635 echo "configure:8636: checking for pthread link with -lpthread" >&5
8636 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8637   echo $ac_n "(cached) $ac_c" 1>&6
8638 else
8639   
8640                 # save the flags
8641                 ol_LIBS="$LIBS"
8642                 LIBS="-lpthread $LIBS"
8643
8644                 if test "$cross_compiling" = yes; then
8645   cat > conftest.$ac_ext <<EOF
8646 #line 8647 "configure"
8647 #include "confdefs.h"
8648 /* pthread test headers */
8649 #include <pthread.h>
8650 #ifndef NULL
8651 #define NULL (void*)0
8652 #endif
8653
8654 static void *task(p)
8655         void *p;
8656 {
8657         return (void *) (p == NULL);
8658 }
8659
8660 int main() {
8661
8662         /* pthread test function */
8663         pthread_t t;
8664         int status;
8665
8666         /* make sure pthread_create() isn't just a stub */
8667 #if HAVE_PTHREADS_D4
8668         status = pthread_create(&t, pthread_attr_default, task, NULL);
8669 #else
8670         status = pthread_create(&t, NULL, task, NULL);
8671 #endif
8672
8673         if( status ) exit( status );
8674
8675         /* make sure pthread_detach() isn't just a stub */
8676 #if HAVE_PTHREADS_D4
8677         status = pthread_detach( &t );
8678 #else
8679         status = pthread_detach( t );
8680 #endif
8681
8682 #ifdef HAVE_LINUX_THREADS
8683         pthread_kill_other_threads_np();
8684 #endif
8685
8686         exit( status );
8687
8688 ; return 0; }
8689 EOF
8690 if { (eval echo configure:8691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8691   rm -rf conftest*
8692   ol_cv_pthread_lpthread=yes
8693 else
8694   echo "configure: failed program was:" >&5
8695   cat conftest.$ac_ext >&5
8696   rm -rf conftest*
8697   ol_cv_pthread_lpthread=no
8698 fi
8699 rm -f conftest*
8700 else
8701   cat > conftest.$ac_ext <<EOF
8702 #line 8703 "configure"
8703 #include "confdefs.h"
8704 /* pthread test headers */
8705 #include <pthread.h>
8706 #ifndef NULL
8707 #define NULL (void*)0
8708 #endif
8709
8710 static void *task(p)
8711         void *p;
8712 {
8713         return (void *) (p == NULL);
8714 }
8715
8716
8717 int main(argc, argv)
8718         int argc;
8719         char **argv;
8720 {
8721
8722         /* pthread test function */
8723         pthread_t t;
8724         int status;
8725
8726         /* make sure pthread_create() isn't just a stub */
8727 #if HAVE_PTHREADS_D4
8728         status = pthread_create(&t, pthread_attr_default, task, NULL);
8729 #else
8730         status = pthread_create(&t, NULL, task, NULL);
8731 #endif
8732
8733         if( status ) exit( status );
8734
8735         /* make sure pthread_detach() isn't just a stub */
8736 #if HAVE_PTHREADS_D4
8737         status = pthread_detach( &t );
8738 #else
8739         status = pthread_detach( t );
8740 #endif
8741
8742 #ifdef HAVE_LINUX_THREADS
8743         pthread_kill_other_threads_np();
8744 #endif
8745
8746         exit( status );
8747
8748 }
8749
8750 EOF
8751 if { (eval echo configure:8752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8752 then
8753   ol_cv_pthread_lpthread=yes
8754 else
8755   echo "configure: failed program was:" >&5
8756   cat conftest.$ac_ext >&5
8757   rm -fr conftest*
8758   ol_cv_pthread_lpthread=no
8759 fi
8760 rm -fr conftest*
8761 fi
8762
8763
8764                 # restore the LIBS
8765                 LIBS="$ol_LIBS"
8766         
8767 fi
8768
8769 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8770
8771         if test $ol_cv_pthread_lpthread = yes ; then
8772                 ol_link_pthreads="-lpthread"
8773                 ol_link_threads=posix
8774         fi
8775 fi
8776
8777                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8778 if test "$ol_link_threads" = no ; then
8779         # try -lc_r
8780         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8781 echo "configure:8782: checking for pthread link with -lc_r" >&5
8782 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8783   echo $ac_n "(cached) $ac_c" 1>&6
8784 else
8785   
8786                 # save the flags
8787                 ol_LIBS="$LIBS"
8788                 LIBS="-lc_r $LIBS"
8789
8790                 if test "$cross_compiling" = yes; then
8791   cat > conftest.$ac_ext <<EOF
8792 #line 8793 "configure"
8793 #include "confdefs.h"
8794 /* pthread test headers */
8795 #include <pthread.h>
8796 #ifndef NULL
8797 #define NULL (void*)0
8798 #endif
8799
8800 static void *task(p)
8801         void *p;
8802 {
8803         return (void *) (p == NULL);
8804 }
8805
8806 int main() {
8807
8808         /* pthread test function */
8809         pthread_t t;
8810         int status;
8811
8812         /* make sure pthread_create() isn't just a stub */
8813 #if HAVE_PTHREADS_D4
8814         status = pthread_create(&t, pthread_attr_default, task, NULL);
8815 #else
8816         status = pthread_create(&t, NULL, task, NULL);
8817 #endif
8818
8819         if( status ) exit( status );
8820
8821         /* make sure pthread_detach() isn't just a stub */
8822 #if HAVE_PTHREADS_D4
8823         status = pthread_detach( &t );
8824 #else
8825         status = pthread_detach( t );
8826 #endif
8827
8828 #ifdef HAVE_LINUX_THREADS
8829         pthread_kill_other_threads_np();
8830 #endif
8831
8832         exit( status );
8833
8834 ; return 0; }
8835 EOF
8836 if { (eval echo configure:8837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8837   rm -rf conftest*
8838   ol_cv_pthread_lc_r=yes
8839 else
8840   echo "configure: failed program was:" >&5
8841   cat conftest.$ac_ext >&5
8842   rm -rf conftest*
8843   ol_cv_pthread_lc_r=no
8844 fi
8845 rm -f conftest*
8846 else
8847   cat > conftest.$ac_ext <<EOF
8848 #line 8849 "configure"
8849 #include "confdefs.h"
8850 /* pthread test headers */
8851 #include <pthread.h>
8852 #ifndef NULL
8853 #define NULL (void*)0
8854 #endif
8855
8856 static void *task(p)
8857         void *p;
8858 {
8859         return (void *) (p == NULL);
8860 }
8861
8862
8863 int main(argc, argv)
8864         int argc;
8865         char **argv;
8866 {
8867
8868         /* pthread test function */
8869         pthread_t t;
8870         int status;
8871
8872         /* make sure pthread_create() isn't just a stub */
8873 #if HAVE_PTHREADS_D4
8874         status = pthread_create(&t, pthread_attr_default, task, NULL);
8875 #else
8876         status = pthread_create(&t, NULL, task, NULL);
8877 #endif
8878
8879         if( status ) exit( status );
8880
8881         /* make sure pthread_detach() isn't just a stub */
8882 #if HAVE_PTHREADS_D4
8883         status = pthread_detach( &t );
8884 #else
8885         status = pthread_detach( t );
8886 #endif
8887
8888 #ifdef HAVE_LINUX_THREADS
8889         pthread_kill_other_threads_np();
8890 #endif
8891
8892         exit( status );
8893
8894 }
8895
8896 EOF
8897 if { (eval echo configure:8898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8898 then
8899   ol_cv_pthread_lc_r=yes
8900 else
8901   echo "configure: failed program was:" >&5
8902   cat conftest.$ac_ext >&5
8903   rm -fr conftest*
8904   ol_cv_pthread_lc_r=no
8905 fi
8906 rm -fr conftest*
8907 fi
8908
8909
8910                 # restore the LIBS
8911                 LIBS="$ol_LIBS"
8912         
8913 fi
8914
8915 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8916
8917         if test $ol_cv_pthread_lc_r = yes ; then
8918                 ol_link_pthreads="-lc_r"
8919                 ol_link_threads=posix
8920         fi
8921 fi
8922
8923
8924                 # Pthread try link: -threads (ol_cv_pthread_threads)
8925 if test "$ol_link_threads" = no ; then
8926         # try -threads
8927         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8928 echo "configure:8929: checking for pthread link with -threads" >&5
8929 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8930   echo $ac_n "(cached) $ac_c" 1>&6
8931 else
8932   
8933                 # save the flags
8934                 ol_LIBS="$LIBS"
8935                 LIBS="-threads $LIBS"
8936
8937                 if test "$cross_compiling" = yes; then
8938   cat > conftest.$ac_ext <<EOF
8939 #line 8940 "configure"
8940 #include "confdefs.h"
8941 /* pthread test headers */
8942 #include <pthread.h>
8943 #ifndef NULL
8944 #define NULL (void*)0
8945 #endif
8946
8947 static void *task(p)
8948         void *p;
8949 {
8950         return (void *) (p == NULL);
8951 }
8952
8953 int main() {
8954
8955         /* pthread test function */
8956         pthread_t t;
8957         int status;
8958
8959         /* make sure pthread_create() isn't just a stub */
8960 #if HAVE_PTHREADS_D4
8961         status = pthread_create(&t, pthread_attr_default, task, NULL);
8962 #else
8963         status = pthread_create(&t, NULL, task, NULL);
8964 #endif
8965
8966         if( status ) exit( status );
8967
8968         /* make sure pthread_detach() isn't just a stub */
8969 #if HAVE_PTHREADS_D4
8970         status = pthread_detach( &t );
8971 #else
8972         status = pthread_detach( t );
8973 #endif
8974
8975 #ifdef HAVE_LINUX_THREADS
8976         pthread_kill_other_threads_np();
8977 #endif
8978
8979         exit( status );
8980
8981 ; return 0; }
8982 EOF
8983 if { (eval echo configure:8984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8984   rm -rf conftest*
8985   ol_cv_pthread_threads=yes
8986 else
8987   echo "configure: failed program was:" >&5
8988   cat conftest.$ac_ext >&5
8989   rm -rf conftest*
8990   ol_cv_pthread_threads=no
8991 fi
8992 rm -f conftest*
8993 else
8994   cat > conftest.$ac_ext <<EOF
8995 #line 8996 "configure"
8996 #include "confdefs.h"
8997 /* pthread test headers */
8998 #include <pthread.h>
8999 #ifndef NULL
9000 #define NULL (void*)0
9001 #endif
9002
9003 static void *task(p)
9004         void *p;
9005 {
9006         return (void *) (p == NULL);
9007 }
9008
9009
9010 int main(argc, argv)
9011         int argc;
9012         char **argv;
9013 {
9014
9015         /* pthread test function */
9016         pthread_t t;
9017         int status;
9018
9019         /* make sure pthread_create() isn't just a stub */
9020 #if HAVE_PTHREADS_D4
9021         status = pthread_create(&t, pthread_attr_default, task, NULL);
9022 #else
9023         status = pthread_create(&t, NULL, task, NULL);
9024 #endif
9025
9026         if( status ) exit( status );
9027
9028         /* make sure pthread_detach() isn't just a stub */
9029 #if HAVE_PTHREADS_D4
9030         status = pthread_detach( &t );
9031 #else
9032         status = pthread_detach( t );
9033 #endif
9034
9035 #ifdef HAVE_LINUX_THREADS
9036         pthread_kill_other_threads_np();
9037 #endif
9038
9039         exit( status );
9040
9041 }
9042
9043 EOF
9044 if { (eval echo configure:9045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9045 then
9046   ol_cv_pthread_threads=yes
9047 else
9048   echo "configure: failed program was:" >&5
9049   cat conftest.$ac_ext >&5
9050   rm -fr conftest*
9051   ol_cv_pthread_threads=no
9052 fi
9053 rm -fr conftest*
9054 fi
9055
9056
9057                 # restore the LIBS
9058                 LIBS="$ol_LIBS"
9059         
9060 fi
9061
9062 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9063
9064         if test $ol_cv_pthread_threads = yes ; then
9065                 ol_link_pthreads="-threads"
9066                 ol_link_threads=posix
9067         fi
9068 fi
9069
9070
9071                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9072 if test "$ol_link_threads" = no ; then
9073         # try -lpthreads -lmach -lexc -lc_r
9074         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9075 echo "configure:9076: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9076 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9077   echo $ac_n "(cached) $ac_c" 1>&6
9078 else
9079   
9080                 # save the flags
9081                 ol_LIBS="$LIBS"
9082                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9083
9084                 if test "$cross_compiling" = yes; then
9085   cat > conftest.$ac_ext <<EOF
9086 #line 9087 "configure"
9087 #include "confdefs.h"
9088 /* pthread test headers */
9089 #include <pthread.h>
9090 #ifndef NULL
9091 #define NULL (void*)0
9092 #endif
9093
9094 static void *task(p)
9095         void *p;
9096 {
9097         return (void *) (p == NULL);
9098 }
9099
9100 int main() {
9101
9102         /* pthread test function */
9103         pthread_t t;
9104         int status;
9105
9106         /* make sure pthread_create() isn't just a stub */
9107 #if HAVE_PTHREADS_D4
9108         status = pthread_create(&t, pthread_attr_default, task, NULL);
9109 #else
9110         status = pthread_create(&t, NULL, task, NULL);
9111 #endif
9112
9113         if( status ) exit( status );
9114
9115         /* make sure pthread_detach() isn't just a stub */
9116 #if HAVE_PTHREADS_D4
9117         status = pthread_detach( &t );
9118 #else
9119         status = pthread_detach( t );
9120 #endif
9121
9122 #ifdef HAVE_LINUX_THREADS
9123         pthread_kill_other_threads_np();
9124 #endif
9125
9126         exit( status );
9127
9128 ; return 0; }
9129 EOF
9130 if { (eval echo configure:9131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9131   rm -rf conftest*
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 -rf conftest*
9137   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9138 fi
9139 rm -f conftest*
9140 else
9141   cat > conftest.$ac_ext <<EOF
9142 #line 9143 "configure"
9143 #include "confdefs.h"
9144 /* pthread test headers */
9145 #include <pthread.h>
9146 #ifndef NULL
9147 #define NULL (void*)0
9148 #endif
9149
9150 static void *task(p)
9151         void *p;
9152 {
9153         return (void *) (p == NULL);
9154 }
9155
9156
9157 int main(argc, argv)
9158         int argc;
9159         char **argv;
9160 {
9161
9162         /* pthread test function */
9163         pthread_t t;
9164         int status;
9165
9166         /* make sure pthread_create() isn't just a stub */
9167 #if HAVE_PTHREADS_D4
9168         status = pthread_create(&t, pthread_attr_default, task, NULL);
9169 #else
9170         status = pthread_create(&t, NULL, task, NULL);
9171 #endif
9172
9173         if( status ) exit( status );
9174
9175         /* make sure pthread_detach() isn't just a stub */
9176 #if HAVE_PTHREADS_D4
9177         status = pthread_detach( &t );
9178 #else
9179         status = pthread_detach( t );
9180 #endif
9181
9182 #ifdef HAVE_LINUX_THREADS
9183         pthread_kill_other_threads_np();
9184 #endif
9185
9186         exit( status );
9187
9188 }
9189
9190 EOF
9191 if { (eval echo configure:9192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9192 then
9193   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9194 else
9195   echo "configure: failed program was:" >&5
9196   cat conftest.$ac_ext >&5
9197   rm -fr conftest*
9198   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9199 fi
9200 rm -fr conftest*
9201 fi
9202
9203
9204                 # restore the LIBS
9205                 LIBS="$ol_LIBS"
9206         
9207 fi
9208
9209 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9210
9211         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9212                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9213                 ol_link_threads=posix
9214         fi
9215 fi
9216
9217                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9218 if test "$ol_link_threads" = no ; then
9219         # try -lpthreads -lmach -lexc
9220         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9221 echo "configure:9222: checking for pthread link with -lpthreads -lmach -lexc" >&5
9222 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9223   echo $ac_n "(cached) $ac_c" 1>&6
9224 else
9225   
9226                 # save the flags
9227                 ol_LIBS="$LIBS"
9228                 LIBS="-lpthreads -lmach -lexc $LIBS"
9229
9230                 if test "$cross_compiling" = yes; then
9231   cat > conftest.$ac_ext <<EOF
9232 #line 9233 "configure"
9233 #include "confdefs.h"
9234 /* pthread test headers */
9235 #include <pthread.h>
9236 #ifndef NULL
9237 #define NULL (void*)0
9238 #endif
9239
9240 static void *task(p)
9241         void *p;
9242 {
9243         return (void *) (p == NULL);
9244 }
9245
9246 int main() {
9247
9248         /* pthread test function */
9249         pthread_t t;
9250         int status;
9251
9252         /* make sure pthread_create() isn't just a stub */
9253 #if HAVE_PTHREADS_D4
9254         status = pthread_create(&t, pthread_attr_default, task, NULL);
9255 #else
9256         status = pthread_create(&t, NULL, task, NULL);
9257 #endif
9258
9259         if( status ) exit( status );
9260
9261         /* make sure pthread_detach() isn't just a stub */
9262 #if HAVE_PTHREADS_D4
9263         status = pthread_detach( &t );
9264 #else
9265         status = pthread_detach( t );
9266 #endif
9267
9268 #ifdef HAVE_LINUX_THREADS
9269         pthread_kill_other_threads_np();
9270 #endif
9271
9272         exit( status );
9273
9274 ; return 0; }
9275 EOF
9276 if { (eval echo configure:9277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9277   rm -rf conftest*
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 -rf conftest*
9283   ol_cv_pthread_lpthreads_lmach_lexc=no
9284 fi
9285 rm -f conftest*
9286 else
9287   cat > conftest.$ac_ext <<EOF
9288 #line 9289 "configure"
9289 #include "confdefs.h"
9290 /* pthread test headers */
9291 #include <pthread.h>
9292 #ifndef NULL
9293 #define NULL (void*)0
9294 #endif
9295
9296 static void *task(p)
9297         void *p;
9298 {
9299         return (void *) (p == NULL);
9300 }
9301
9302
9303 int main(argc, argv)
9304         int argc;
9305         char **argv;
9306 {
9307
9308         /* pthread test function */
9309         pthread_t t;
9310         int status;
9311
9312         /* make sure pthread_create() isn't just a stub */
9313 #if HAVE_PTHREADS_D4
9314         status = pthread_create(&t, pthread_attr_default, task, NULL);
9315 #else
9316         status = pthread_create(&t, NULL, task, NULL);
9317 #endif
9318
9319         if( status ) exit( status );
9320
9321         /* make sure pthread_detach() isn't just a stub */
9322 #if HAVE_PTHREADS_D4
9323         status = pthread_detach( &t );
9324 #else
9325         status = pthread_detach( t );
9326 #endif
9327
9328 #ifdef HAVE_LINUX_THREADS
9329         pthread_kill_other_threads_np();
9330 #endif
9331
9332         exit( status );
9333
9334 }
9335
9336 EOF
9337 if { (eval echo configure:9338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9338 then
9339   ol_cv_pthread_lpthreads_lmach_lexc=yes
9340 else
9341   echo "configure: failed program was:" >&5
9342   cat conftest.$ac_ext >&5
9343   rm -fr conftest*
9344   ol_cv_pthread_lpthreads_lmach_lexc=no
9345 fi
9346 rm -fr conftest*
9347 fi
9348
9349
9350                 # restore the LIBS
9351                 LIBS="$ol_LIBS"
9352         
9353 fi
9354
9355 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9356
9357         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9358                 ol_link_pthreads="-lpthreads -lmach -lexc"
9359                 ol_link_threads=posix
9360         fi
9361 fi
9362
9363                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9364 if test "$ol_link_threads" = no ; then
9365         # try -lpthreads -lexc
9366         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9367 echo "configure:9368: checking for pthread link with -lpthreads -lexc" >&5
9368 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9369   echo $ac_n "(cached) $ac_c" 1>&6
9370 else
9371   
9372                 # save the flags
9373                 ol_LIBS="$LIBS"
9374                 LIBS="-lpthreads -lexc $LIBS"
9375
9376                 if test "$cross_compiling" = yes; then
9377   cat > conftest.$ac_ext <<EOF
9378 #line 9379 "configure"
9379 #include "confdefs.h"
9380 /* pthread test headers */
9381 #include <pthread.h>
9382 #ifndef NULL
9383 #define NULL (void*)0
9384 #endif
9385
9386 static void *task(p)
9387         void *p;
9388 {
9389         return (void *) (p == NULL);
9390 }
9391
9392 int main() {
9393
9394         /* pthread test function */
9395         pthread_t t;
9396         int status;
9397
9398         /* make sure pthread_create() isn't just a stub */
9399 #if HAVE_PTHREADS_D4
9400         status = pthread_create(&t, pthread_attr_default, task, NULL);
9401 #else
9402         status = pthread_create(&t, NULL, task, NULL);
9403 #endif
9404
9405         if( status ) exit( status );
9406
9407         /* make sure pthread_detach() isn't just a stub */
9408 #if HAVE_PTHREADS_D4
9409         status = pthread_detach( &t );
9410 #else
9411         status = pthread_detach( t );
9412 #endif
9413
9414 #ifdef HAVE_LINUX_THREADS
9415         pthread_kill_other_threads_np();
9416 #endif
9417
9418         exit( status );
9419
9420 ; return 0; }
9421 EOF
9422 if { (eval echo configure:9423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9423   rm -rf conftest*
9424   ol_cv_pthread_lpthreads_lexc=yes
9425 else
9426   echo "configure: failed program was:" >&5
9427   cat conftest.$ac_ext >&5
9428   rm -rf conftest*
9429   ol_cv_pthread_lpthreads_lexc=no
9430 fi
9431 rm -f conftest*
9432 else
9433   cat > conftest.$ac_ext <<EOF
9434 #line 9435 "configure"
9435 #include "confdefs.h"
9436 /* pthread test headers */
9437 #include <pthread.h>
9438 #ifndef NULL
9439 #define NULL (void*)0
9440 #endif
9441
9442 static void *task(p)
9443         void *p;
9444 {
9445         return (void *) (p == NULL);
9446 }
9447
9448
9449 int main(argc, argv)
9450         int argc;
9451         char **argv;
9452 {
9453
9454         /* pthread test function */
9455         pthread_t t;
9456         int status;
9457
9458         /* make sure pthread_create() isn't just a stub */
9459 #if HAVE_PTHREADS_D4
9460         status = pthread_create(&t, pthread_attr_default, task, NULL);
9461 #else
9462         status = pthread_create(&t, NULL, task, NULL);
9463 #endif
9464
9465         if( status ) exit( status );
9466
9467         /* make sure pthread_detach() isn't just a stub */
9468 #if HAVE_PTHREADS_D4
9469         status = pthread_detach( &t );
9470 #else
9471         status = pthread_detach( t );
9472 #endif
9473
9474 #ifdef HAVE_LINUX_THREADS
9475         pthread_kill_other_threads_np();
9476 #endif
9477
9478         exit( status );
9479
9480 }
9481
9482 EOF
9483 if { (eval echo configure:9484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9484 then
9485   ol_cv_pthread_lpthreads_lexc=yes
9486 else
9487   echo "configure: failed program was:" >&5
9488   cat conftest.$ac_ext >&5
9489   rm -fr conftest*
9490   ol_cv_pthread_lpthreads_lexc=no
9491 fi
9492 rm -fr conftest*
9493 fi
9494
9495
9496                 # restore the LIBS
9497                 LIBS="$ol_LIBS"
9498         
9499 fi
9500
9501 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9502
9503         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9504                 ol_link_pthreads="-lpthreads -lexc"
9505                 ol_link_threads=posix
9506         fi
9507 fi
9508
9509
9510                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9511 if test "$ol_link_threads" = no ; then
9512         # try -lpthreads
9513         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9514 echo "configure:9515: checking for pthread link with -lpthreads" >&5
9515 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9516   echo $ac_n "(cached) $ac_c" 1>&6
9517 else
9518   
9519                 # save the flags
9520                 ol_LIBS="$LIBS"
9521                 LIBS="-lpthreads $LIBS"
9522
9523                 if test "$cross_compiling" = yes; then
9524   cat > conftest.$ac_ext <<EOF
9525 #line 9526 "configure"
9526 #include "confdefs.h"
9527 /* pthread test headers */
9528 #include <pthread.h>
9529 #ifndef NULL
9530 #define NULL (void*)0
9531 #endif
9532
9533 static void *task(p)
9534         void *p;
9535 {
9536         return (void *) (p == NULL);
9537 }
9538
9539 int main() {
9540
9541         /* pthread test function */
9542         pthread_t t;
9543         int status;
9544
9545         /* make sure pthread_create() isn't just a stub */
9546 #if HAVE_PTHREADS_D4
9547         status = pthread_create(&t, pthread_attr_default, task, NULL);
9548 #else
9549         status = pthread_create(&t, NULL, task, NULL);
9550 #endif
9551
9552         if( status ) exit( status );
9553
9554         /* make sure pthread_detach() isn't just a stub */
9555 #if HAVE_PTHREADS_D4
9556         status = pthread_detach( &t );
9557 #else
9558         status = pthread_detach( t );
9559 #endif
9560
9561 #ifdef HAVE_LINUX_THREADS
9562         pthread_kill_other_threads_np();
9563 #endif
9564
9565         exit( status );
9566
9567 ; return 0; }
9568 EOF
9569 if { (eval echo configure:9570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9570   rm -rf conftest*
9571   ol_cv_pthread_lib_lpthreads=yes
9572 else
9573   echo "configure: failed program was:" >&5
9574   cat conftest.$ac_ext >&5
9575   rm -rf conftest*
9576   ol_cv_pthread_lib_lpthreads=no
9577 fi
9578 rm -f conftest*
9579 else
9580   cat > conftest.$ac_ext <<EOF
9581 #line 9582 "configure"
9582 #include "confdefs.h"
9583 /* pthread test headers */
9584 #include <pthread.h>
9585 #ifndef NULL
9586 #define NULL (void*)0
9587 #endif
9588
9589 static void *task(p)
9590         void *p;
9591 {
9592         return (void *) (p == NULL);
9593 }
9594
9595
9596 int main(argc, argv)
9597         int argc;
9598         char **argv;
9599 {
9600
9601         /* pthread test function */
9602         pthread_t t;
9603         int status;
9604
9605         /* make sure pthread_create() isn't just a stub */
9606 #if HAVE_PTHREADS_D4
9607         status = pthread_create(&t, pthread_attr_default, task, NULL);
9608 #else
9609         status = pthread_create(&t, NULL, task, NULL);
9610 #endif
9611
9612         if( status ) exit( status );
9613
9614         /* make sure pthread_detach() isn't just a stub */
9615 #if HAVE_PTHREADS_D4
9616         status = pthread_detach( &t );
9617 #else
9618         status = pthread_detach( t );
9619 #endif
9620
9621 #ifdef HAVE_LINUX_THREADS
9622         pthread_kill_other_threads_np();
9623 #endif
9624
9625         exit( status );
9626
9627 }
9628
9629 EOF
9630 if { (eval echo configure:9631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9631 then
9632   ol_cv_pthread_lib_lpthreads=yes
9633 else
9634   echo "configure: failed program was:" >&5
9635   cat conftest.$ac_ext >&5
9636   rm -fr conftest*
9637   ol_cv_pthread_lib_lpthreads=no
9638 fi
9639 rm -fr conftest*
9640 fi
9641
9642
9643                 # restore the LIBS
9644                 LIBS="$ol_LIBS"
9645         
9646 fi
9647
9648 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9649
9650         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9651                 ol_link_pthreads="-lpthreads"
9652                 ol_link_threads=posix
9653         fi
9654 fi
9655
9656
9657                 if test $ol_link_threads != no ; then
9658                         cat >> confdefs.h <<\EOF
9659 #define HAVE_PTHREADS 1
9660 EOF
9661
9662
9663                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9664
9665                                                 save_CPPFLAGS="$CPPFLAGS"
9666                         save_LIBS="$LIBS"
9667                         LIBS="$LTHREAD_LIBS $LIBS"
9668
9669                                                                                                 for ac_func in sched_yield pthread_yield
9670 do
9671 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9672 echo "configure:9673: checking for $ac_func" >&5
9673 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9674   echo $ac_n "(cached) $ac_c" 1>&6
9675 else
9676   cat > conftest.$ac_ext <<EOF
9677 #line 9678 "configure"
9678 #include "confdefs.h"
9679 /* System header to define __stub macros and hopefully few prototypes,
9680     which can conflict with char $ac_func(); below.  */
9681 #include <assert.h>
9682 /* Override any gcc2 internal prototype to avoid an error.  */
9683 /* We use char because int might match the return type of a gcc2
9684     builtin and then its argument prototype would still apply.  */
9685 char $ac_func();
9686 char (*f)();
9687
9688 int main() {
9689
9690 /* The GNU C library defines this for functions which it implements
9691     to always fail with ENOSYS.  Some functions are actually named
9692     something starting with __ and the normal name is an alias.  */
9693 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9694 choke me
9695 #else
9696 f = $ac_func;
9697 #endif
9698
9699 ; return 0; }
9700 EOF
9701 if { (eval echo configure:9702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9702   rm -rf conftest*
9703   eval "ac_cv_func_$ac_func=yes"
9704 else
9705   echo "configure: failed program was:" >&5
9706   cat conftest.$ac_ext >&5
9707   rm -rf conftest*
9708   eval "ac_cv_func_$ac_func=no"
9709 fi
9710 rm -f conftest*
9711 fi
9712
9713 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9714   echo "$ac_t""yes" 1>&6
9715     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9716   cat >> confdefs.h <<EOF
9717 #define $ac_tr_func 1
9718 EOF
9719  
9720 else
9721   echo "$ac_t""no" 1>&6
9722 fi
9723 done
9724
9725
9726                         if test $ac_cv_func_sched_yield = no -a \
9727                                 $ac_cv_func_pthread_yield = no ; then
9728                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9729 echo "configure:9730: checking for sched_yield in -lrt" >&5
9730 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9731 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9732   echo $ac_n "(cached) $ac_c" 1>&6
9733 else
9734   ac_save_LIBS="$LIBS"
9735 LIBS="-lrt  $LIBS"
9736 cat > conftest.$ac_ext <<EOF
9737 #line 9738 "configure"
9738 #include "confdefs.h"
9739 /* Override any gcc2 internal prototype to avoid an error.  */
9740 /* We use char because int might match the return type of a gcc2
9741     builtin and then its argument prototype would still apply.  */
9742 char sched_yield();
9743
9744 int main() {
9745 sched_yield()
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_lib_$ac_lib_var=yes"
9751 else
9752   echo "configure: failed program was:" >&5
9753   cat conftest.$ac_ext >&5
9754   rm -rf conftest*
9755   eval "ac_cv_lib_$ac_lib_var=no"
9756 fi
9757 rm -f conftest*
9758 LIBS="$ac_save_LIBS"
9759
9760 fi
9761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9762   echo "$ac_t""yes" 1>&6
9763   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9764                                         cat >> confdefs.h <<\EOF
9765 #define HAVE_SCHED_YIELD 1
9766 EOF
9767
9768                                         ac_cv_func_sched_yield=yes
9769 else
9770   echo "$ac_t""no" 1>&6
9771 ac_cv_func_sched_yield=no
9772 fi
9773
9774                         fi
9775                         if test $ac_cv_func_sched_yield = no -a \
9776                                 $ac_cv_func_pthread_yield = no ; then
9777                                                                                                 for ac_func in thr_yield
9778 do
9779 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9780 echo "configure:9781: checking for $ac_func" >&5
9781 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9782   echo $ac_n "(cached) $ac_c" 1>&6
9783 else
9784   cat > conftest.$ac_ext <<EOF
9785 #line 9786 "configure"
9786 #include "confdefs.h"
9787 /* System header to define __stub macros and hopefully few prototypes,
9788     which can conflict with char $ac_func(); below.  */
9789 #include <assert.h>
9790 /* Override any gcc2 internal prototype to avoid an error.  */
9791 /* We use char because int might match the return type of a gcc2
9792     builtin and then its argument prototype would still apply.  */
9793 char $ac_func();
9794 char (*f)();
9795
9796 int main() {
9797
9798 /* The GNU C library defines this for functions which it implements
9799     to always fail with ENOSYS.  Some functions are actually named
9800     something starting with __ and the normal name is an alias.  */
9801 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9802 choke me
9803 #else
9804 f = $ac_func;
9805 #endif
9806
9807 ; return 0; }
9808 EOF
9809 if { (eval echo configure:9810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9810   rm -rf conftest*
9811   eval "ac_cv_func_$ac_func=yes"
9812 else
9813   echo "configure: failed program was:" >&5
9814   cat conftest.$ac_ext >&5
9815   rm -rf conftest*
9816   eval "ac_cv_func_$ac_func=no"
9817 fi
9818 rm -f conftest*
9819 fi
9820
9821 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9822   echo "$ac_t""yes" 1>&6
9823     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9824   cat >> confdefs.h <<EOF
9825 #define $ac_tr_func 1
9826 EOF
9827  
9828 else
9829   echo "$ac_t""no" 1>&6
9830 fi
9831 done
9832
9833                         fi
9834                         if test $ac_cv_func_sched_yield = no -a \
9835                                 $ac_cv_func_pthread_yield = no -a \
9836                                 "$ac_cv_func_thr_yield" = no ; then
9837                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9838                         fi
9839
9840                                                 for ac_func in pthread_kill
9841 do
9842 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9843 echo "configure:9844: checking for $ac_func" >&5
9844 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9845   echo $ac_n "(cached) $ac_c" 1>&6
9846 else
9847   cat > conftest.$ac_ext <<EOF
9848 #line 9849 "configure"
9849 #include "confdefs.h"
9850 /* System header to define __stub macros and hopefully few prototypes,
9851     which can conflict with char $ac_func(); below.  */
9852 #include <assert.h>
9853 /* Override any gcc2 internal prototype to avoid an error.  */
9854 /* We use char because int might match the return type of a gcc2
9855     builtin and then its argument prototype would still apply.  */
9856 char $ac_func();
9857 char (*f)();
9858
9859 int main() {
9860
9861 /* The GNU C library defines this for functions which it implements
9862     to always fail with ENOSYS.  Some functions are actually named
9863     something starting with __ and the normal name is an alias.  */
9864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9865 choke me
9866 #else
9867 f = $ac_func;
9868 #endif
9869
9870 ; return 0; }
9871 EOF
9872 if { (eval echo configure:9873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9873   rm -rf conftest*
9874   eval "ac_cv_func_$ac_func=yes"
9875 else
9876   echo "configure: failed program was:" >&5
9877   cat conftest.$ac_ext >&5
9878   rm -rf conftest*
9879   eval "ac_cv_func_$ac_func=no"
9880 fi
9881 rm -f conftest*
9882 fi
9883
9884 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9885   echo "$ac_t""yes" 1>&6
9886     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9887   cat >> confdefs.h <<EOF
9888 #define $ac_tr_func 1
9889 EOF
9890  
9891 else
9892   echo "$ac_t""no" 1>&6
9893 fi
9894 done
9895
9896
9897                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9898 echo "configure:9899: checking for pthread_detach with <pthread.h>" >&5
9899 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9900   echo $ac_n "(cached) $ac_c" 1>&6
9901 else
9902   
9903                                                                 cat > conftest.$ac_ext <<EOF
9904 #line 9905 "configure"
9905 #include "confdefs.h"
9906
9907 #include <pthread.h>
9908 #ifndef NULL
9909 #define NULL (void*)0
9910 #endif
9911
9912 int main() {
9913 pthread_detach(NULL);
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   ol_cv_func_pthread_detach=yes
9919 else
9920   echo "configure: failed program was:" >&5
9921   cat conftest.$ac_ext >&5
9922   rm -rf conftest*
9923   ol_cv_func_pthread_detach=no
9924 fi
9925 rm -f conftest*
9926                         
9927 fi
9928
9929 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9930
9931                         if test $ol_cv_func_pthread_detach = no ; then
9932                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9933                         fi
9934
9935                         cat >> confdefs.h <<\EOF
9936 #define HAVE_PTHREAD_DETACH 1
9937 EOF
9938
9939
9940                                                 for ac_func in \
9941                                 pthread_setconcurrency \
9942                                 pthread_getconcurrency \
9943                                 thr_setconcurrency \
9944                                 thr_getconcurrency \
9945                         
9946 do
9947 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9948 echo "configure:9949: checking for $ac_func" >&5
9949 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9950   echo $ac_n "(cached) $ac_c" 1>&6
9951 else
9952   cat > conftest.$ac_ext <<EOF
9953 #line 9954 "configure"
9954 #include "confdefs.h"
9955 /* System header to define __stub macros and hopefully few prototypes,
9956     which can conflict with char $ac_func(); below.  */
9957 #include <assert.h>
9958 /* Override any gcc2 internal prototype to avoid an error.  */
9959 /* We use char because int might match the return type of a gcc2
9960     builtin and then its argument prototype would still apply.  */
9961 char $ac_func();
9962 char (*f)();
9963
9964 int main() {
9965
9966 /* The GNU C library defines this for functions which it implements
9967     to always fail with ENOSYS.  Some functions are actually named
9968     something starting with __ and the normal name is an alias.  */
9969 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9970 choke me
9971 #else
9972 f = $ac_func;
9973 #endif
9974
9975 ; return 0; }
9976 EOF
9977 if { (eval echo configure:9978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9978   rm -rf conftest*
9979   eval "ac_cv_func_$ac_func=yes"
9980 else
9981   echo "configure: failed program was:" >&5
9982   cat conftest.$ac_ext >&5
9983   rm -rf conftest*
9984   eval "ac_cv_func_$ac_func=no"
9985 fi
9986 rm -f conftest*
9987 fi
9988
9989 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9990   echo "$ac_t""yes" 1>&6
9991     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9992   cat >> confdefs.h <<EOF
9993 #define $ac_tr_func 1
9994 EOF
9995  
9996 else
9997   echo "$ac_t""no" 1>&6
9998 fi
9999 done
10000
10001
10002                         
10003         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10004 echo "configure:10005: checking for pthread_kill_other_threads_np" >&5
10005 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10006   echo $ac_n "(cached) $ac_c" 1>&6
10007 else
10008   cat > conftest.$ac_ext <<EOF
10009 #line 10010 "configure"
10010 #include "confdefs.h"
10011 /* System header to define __stub macros and hopefully few prototypes,
10012     which can conflict with char pthread_kill_other_threads_np(); below.  */
10013 #include <assert.h>
10014 /* Override any gcc2 internal prototype to avoid an error.  */
10015 /* We use char because int might match the return type of a gcc2
10016     builtin and then its argument prototype would still apply.  */
10017 char pthread_kill_other_threads_np();
10018 char (*f)();
10019
10020 int main() {
10021
10022 /* The GNU C library defines this for functions which it implements
10023     to always fail with ENOSYS.  Some functions are actually named
10024     something starting with __ and the normal name is an alias.  */
10025 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10026 choke me
10027 #else
10028 f = pthread_kill_other_threads_np;
10029 #endif
10030
10031 ; return 0; }
10032 EOF
10033 if { (eval echo configure:10034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10034   rm -rf conftest*
10035   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10036 else
10037   echo "configure: failed program was:" >&5
10038   cat conftest.$ac_ext >&5
10039   rm -rf conftest*
10040   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10041 fi
10042 rm -f conftest*
10043 fi
10044
10045 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10046   echo "$ac_t""yes" 1>&6
10047   :
10048 else
10049   echo "$ac_t""no" 1>&6
10050 fi
10051
10052         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10053 echo "configure:10054: checking for LinuxThreads implementation" >&5
10054 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10055   echo $ac_n "(cached) $ac_c" 1>&6
10056 else
10057   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10058 fi
10059
10060 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10061
10062                         
10063         
10064         
10065         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10066 echo "configure:10067: checking for LinuxThreads consistency" >&5
10067 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10068   echo $ac_n "(cached) $ac_c" 1>&6
10069 else
10070   
10071                 if test $ol_cv_header_linux_threads = yes -a \
10072                         $ol_cv_sys_linux_threads = yes; then
10073                         ol_cv_linux_threads=yes
10074                 elif test $ol_cv_header_linux_threads = no -a \
10075                         $ol_cv_sys_linux_threads = no; then
10076                         ol_cv_linux_threads=no
10077                 else
10078                         ol_cv_linux_threads=error
10079                 fi
10080         
10081 fi
10082
10083 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10084
10085
10086                         if test $ol_cv_linux_threads = error; then
10087                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10088                         fi
10089
10090                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10091 echo "configure:10092: checking if pthread_create() works" >&5
10092 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10093   echo $ac_n "(cached) $ac_c" 1>&6
10094 else
10095   
10096                         if test "$cross_compiling" = yes; then
10097                                 ol_cv_pthread_create_works=yes
10098 else
10099   cat > conftest.$ac_ext <<EOF
10100 #line 10101 "configure"
10101 #include "confdefs.h"
10102 /* pthread test headers */
10103 #include <pthread.h>
10104 #ifndef NULL
10105 #define NULL (void*)0
10106 #endif
10107
10108 static void *task(p)
10109         void *p;
10110 {
10111         return (void *) (p == NULL);
10112 }
10113
10114
10115 int main(argc, argv)
10116         int argc;
10117         char **argv;
10118 {
10119
10120         /* pthread test function */
10121         pthread_t t;
10122         int status;
10123
10124         /* make sure pthread_create() isn't just a stub */
10125 #if HAVE_PTHREADS_D4
10126         status = pthread_create(&t, pthread_attr_default, task, NULL);
10127 #else
10128         status = pthread_create(&t, NULL, task, NULL);
10129 #endif
10130
10131         if( status ) exit( status );
10132
10133         /* make sure pthread_detach() isn't just a stub */
10134 #if HAVE_PTHREADS_D4
10135         status = pthread_detach( &t );
10136 #else
10137         status = pthread_detach( t );
10138 #endif
10139
10140 #ifdef HAVE_LINUX_THREADS
10141         pthread_kill_other_threads_np();
10142 #endif
10143
10144         exit( status );
10145
10146 }
10147
10148 EOF
10149 if { (eval echo configure:10150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10150 then
10151   ol_cv_pthread_create_works=yes
10152 else
10153   echo "configure: failed program was:" >&5
10154   cat conftest.$ac_ext >&5
10155   rm -fr conftest*
10156   ol_cv_pthread_create_works=no
10157 fi
10158 rm -fr conftest*
10159 fi
10160
10161 fi
10162
10163 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10164
10165                         if test $ol_cv_pthread_create_works = no ; then
10166                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10167                         fi
10168
10169                                                 if test $ol_with_yielding_select = auto ; then
10170                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10171 echo "configure:10172: checking if select yields when using pthreads" >&5
10172 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10173   echo $ac_n "(cached) $ac_c" 1>&6
10174 else
10175   
10176                                 if test "$cross_compiling" = yes; then
10177   ol_cv_pthread_select_yields=cross
10178 else
10179   cat > conftest.$ac_ext <<EOF
10180 #line 10181 "configure"
10181 #include "confdefs.h"
10182
10183 #include <sys/types.h>
10184 #include <sys/time.h>
10185 #include <unistd.h>
10186 #include <pthread.h>
10187 #ifndef NULL
10188 #define NULL (void*) 0
10189 #endif
10190
10191 static int fildes[2];
10192
10193 static void *task(p)
10194         void *p;
10195 {
10196         int i;
10197         struct timeval tv;
10198
10199         fd_set rfds;
10200
10201         tv.tv_sec=10;
10202         tv.tv_usec=0;
10203
10204         FD_ZERO(&rfds);
10205         FD_SET(fildes[0], &rfds);
10206
10207         /* we're not interested in any fds */
10208         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10209
10210         if(i < 0) {
10211                 perror("select");
10212                 exit(10);
10213         }
10214
10215         exit(0); /* if we exit here, the select blocked the whole process */
10216 }
10217
10218 int main(argc, argv)
10219         int argc;
10220         char **argv;
10221 {
10222         pthread_t t;
10223
10224         /* create a pipe to select */
10225         if(pipe(&fildes[0])) {
10226                 perror("select");
10227                 exit(1);
10228         }
10229
10230 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10231         (void) pthread_setconcurrency(2);
10232 #else
10233 #ifdef HAVE_THR_SETCONCURRENCY
10234         /* Set Solaris LWP concurrency to 2 */
10235         thr_setconcurrency(2);
10236 #endif
10237 #endif
10238
10239 #if HAVE_PTHREADS_D4
10240         pthread_create(&t, pthread_attr_default, task, NULL);
10241 #else
10242         pthread_create(&t, NULL, task, NULL);
10243 #endif
10244
10245 #if HAVE_SCHED_YIELD
10246         sched_yield();  /* make sure task runs first */
10247 #else
10248 #ifdef HAVE_PTHREAD_YIELD
10249         pthread_yield();        /* make sure task runs first */
10250 #endif
10251 #endif
10252
10253         exit(2);
10254 }
10255 EOF
10256 if { (eval echo configure:10257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10257 then
10258   ol_cv_pthread_select_yields=no
10259 else
10260   echo "configure: failed program was:" >&5
10261   cat conftest.$ac_ext >&5
10262   rm -fr conftest*
10263   ol_cv_pthread_select_yields=yes
10264 fi
10265 rm -fr conftest*
10266 fi
10267
10268 fi
10269
10270 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10271
10272                                 if test $ol_cv_pthread_select_yields = cross ; then
10273                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10274                                 fi
10275
10276                                 if test $ol_cv_pthread_select_yields = yes ; then
10277                                         ol_with_yielding_select=yes
10278                                 fi
10279                         fi
10280
10281                                                 CPPFLAGS="$save_CPPFLAGS"
10282                         LIBS="$save_LIBS"
10283                 else
10284                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10285                 fi
10286         fi
10287
10288         if test $ol_with_threads = posix ; then
10289                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10290         fi
10291 fi
10292
10293 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10294         -o $ol_with_threads = mach ; then
10295
10296                 for ac_hdr in mach/cthreads.h
10297 do
10298 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10299 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10300 echo "configure:10301: checking for $ac_hdr" >&5
10301 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10302   echo $ac_n "(cached) $ac_c" 1>&6
10303 else
10304   cat > conftest.$ac_ext <<EOF
10305 #line 10306 "configure"
10306 #include "confdefs.h"
10307 #include <$ac_hdr>
10308 EOF
10309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10310 { (eval echo configure:10311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10312 if test -z "$ac_err"; then
10313   rm -rf conftest*
10314   eval "ac_cv_header_$ac_safe=yes"
10315 else
10316   echo "$ac_err" >&5
10317   echo "configure: failed program was:" >&5
10318   cat conftest.$ac_ext >&5
10319   rm -rf conftest*
10320   eval "ac_cv_header_$ac_safe=no"
10321 fi
10322 rm -f conftest*
10323 fi
10324 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10325   echo "$ac_t""yes" 1>&6
10326     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10327   cat >> confdefs.h <<EOF
10328 #define $ac_tr_hdr 1
10329 EOF
10330  
10331 else
10332   echo "$ac_t""no" 1>&6
10333 fi
10334 done
10335
10336         if test $ac_cv_header_mach_cthreads_h = yes ; then
10337                 ol_with_threads=found
10338
10339                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10340 echo "configure:10341: checking for cthread_fork" >&5
10341 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10342   echo $ac_n "(cached) $ac_c" 1>&6
10343 else
10344   cat > conftest.$ac_ext <<EOF
10345 #line 10346 "configure"
10346 #include "confdefs.h"
10347 /* System header to define __stub macros and hopefully few prototypes,
10348     which can conflict with char cthread_fork(); below.  */
10349 #include <assert.h>
10350 /* Override any gcc2 internal prototype to avoid an error.  */
10351 /* We use char because int might match the return type of a gcc2
10352     builtin and then its argument prototype would still apply.  */
10353 char cthread_fork();
10354 char (*f)();
10355
10356 int main() {
10357
10358 /* The GNU C library defines this for functions which it implements
10359     to always fail with ENOSYS.  Some functions are actually named
10360     something starting with __ and the normal name is an alias.  */
10361 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10362 choke me
10363 #else
10364 f = cthread_fork;
10365 #endif
10366
10367 ; return 0; }
10368 EOF
10369 if { (eval echo configure:10370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10370   rm -rf conftest*
10371   eval "ac_cv_func_cthread_fork=yes"
10372 else
10373   echo "configure: failed program was:" >&5
10374   cat conftest.$ac_ext >&5
10375   rm -rf conftest*
10376   eval "ac_cv_func_cthread_fork=no"
10377 fi
10378 rm -f conftest*
10379 fi
10380
10381 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10382   echo "$ac_t""yes" 1>&6
10383   ol_link_threads=yes
10384 else
10385   echo "$ac_t""no" 1>&6
10386 fi
10387
10388
10389                 if test $ol_link_threads = no ; then
10390                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10391 echo "configure:10392: checking for cthread_fork with -all_load" >&5
10392 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10393   echo $ac_n "(cached) $ac_c" 1>&6
10394 else
10395   
10396                                                                 save_LIBS="$LIBS"
10397                                 LIBS="-all_load $LIBS"
10398                                 cat > conftest.$ac_ext <<EOF
10399 #line 10400 "configure"
10400 #include "confdefs.h"
10401 #include <mach/cthreads.h>
10402 int main() {
10403
10404                                         cthread_fork((void *)0, (void *)0);
10405                                         
10406 ; return 0; }
10407 EOF
10408 if { (eval echo configure:10409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10409   rm -rf conftest*
10410   ol_cv_cthread_all_load=yes
10411 else
10412   echo "configure: failed program was:" >&5
10413   cat conftest.$ac_ext >&5
10414   rm -rf conftest*
10415   ol_cv_cthread_all_load=no
10416 fi
10417 rm -f conftest*
10418                                                                 LIBS="$save_LIBS"
10419                         
10420 fi
10421
10422 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10423
10424                         if test $ol_cv_cthread_all_load = yes ; then
10425                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10426                                 ol_link_threads=mach
10427                         fi
10428                 fi
10429
10430                 if test $ol_link_threads != no ; then
10431                         : check for cthread specific functionality here
10432                         cat >> confdefs.h <<\EOF
10433 #define HAVE_MACH_CTHREADS 1
10434 EOF
10435
10436                 else
10437                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10438                 fi
10439         fi
10440
10441         if test $ol_with_threads = mach ; then
10442                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10443         fi
10444 fi
10445
10446 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10447         -o $ol_with_threads = pth ; then
10448
10449         for ac_hdr in pth.h
10450 do
10451 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10452 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10453 echo "configure:10454: checking for $ac_hdr" >&5
10454 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10455   echo $ac_n "(cached) $ac_c" 1>&6
10456 else
10457   cat > conftest.$ac_ext <<EOF
10458 #line 10459 "configure"
10459 #include "confdefs.h"
10460 #include <$ac_hdr>
10461 EOF
10462 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10463 { (eval echo configure:10464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10464 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10465 if test -z "$ac_err"; then
10466   rm -rf conftest*
10467   eval "ac_cv_header_$ac_safe=yes"
10468 else
10469   echo "$ac_err" >&5
10470   echo "configure: failed program was:" >&5
10471   cat conftest.$ac_ext >&5
10472   rm -rf conftest*
10473   eval "ac_cv_header_$ac_safe=no"
10474 fi
10475 rm -f conftest*
10476 fi
10477 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10478   echo "$ac_t""yes" 1>&6
10479     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10480   cat >> confdefs.h <<EOF
10481 #define $ac_tr_hdr 1
10482 EOF
10483  
10484 else
10485   echo "$ac_t""no" 1>&6
10486 fi
10487 done
10488
10489
10490         if test $ac_cv_header_pth_h = yes ; then
10491                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10492 echo "configure:10493: checking for pth_version in -lpth" >&5
10493 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10494 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10495   echo $ac_n "(cached) $ac_c" 1>&6
10496 else
10497   ac_save_LIBS="$LIBS"
10498 LIBS="-lpth  $LIBS"
10499 cat > conftest.$ac_ext <<EOF
10500 #line 10501 "configure"
10501 #include "confdefs.h"
10502 /* Override any gcc2 internal prototype to avoid an error.  */
10503 /* We use char because int might match the return type of a gcc2
10504     builtin and then its argument prototype would still apply.  */
10505 char pth_version();
10506
10507 int main() {
10508 pth_version()
10509 ; return 0; }
10510 EOF
10511 if { (eval echo configure:10512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10512   rm -rf conftest*
10513   eval "ac_cv_lib_$ac_lib_var=yes"
10514 else
10515   echo "configure: failed program was:" >&5
10516   cat conftest.$ac_ext >&5
10517   rm -rf conftest*
10518   eval "ac_cv_lib_$ac_lib_var=no"
10519 fi
10520 rm -f conftest*
10521 LIBS="$ac_save_LIBS"
10522
10523 fi
10524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10525   echo "$ac_t""yes" 1>&6
10526   have_pth=yes
10527 else
10528   echo "$ac_t""no" 1>&6
10529 have_pth=no
10530 fi
10531
10532
10533                 if test $have_pth = yes ; then
10534                         cat >> confdefs.h <<\EOF
10535 #define HAVE_GNU_PTH 1
10536 EOF
10537
10538                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10539                         ol_link_threads=pth
10540
10541                         if test $ol_with_yielding_select = auto ; then
10542                                 ol_with_yielding_select=yes
10543                         fi
10544                 fi
10545         fi
10546 fi
10547
10548 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10549         -o $ol_with_threads = lwp ; then
10550
10551                 for ac_hdr in thread.h synch.h
10552 do
10553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10555 echo "configure:10556: checking for $ac_hdr" >&5
10556 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10557   echo $ac_n "(cached) $ac_c" 1>&6
10558 else
10559   cat > conftest.$ac_ext <<EOF
10560 #line 10561 "configure"
10561 #include "confdefs.h"
10562 #include <$ac_hdr>
10563 EOF
10564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10565 { (eval echo configure:10566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10567 if test -z "$ac_err"; then
10568   rm -rf conftest*
10569   eval "ac_cv_header_$ac_safe=yes"
10570 else
10571   echo "$ac_err" >&5
10572   echo "configure: failed program was:" >&5
10573   cat conftest.$ac_ext >&5
10574   rm -rf conftest*
10575   eval "ac_cv_header_$ac_safe=no"
10576 fi
10577 rm -f conftest*
10578 fi
10579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10580   echo "$ac_t""yes" 1>&6
10581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10582   cat >> confdefs.h <<EOF
10583 #define $ac_tr_hdr 1
10584 EOF
10585  
10586 else
10587   echo "$ac_t""no" 1>&6
10588 fi
10589 done
10590
10591         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10592                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10593 echo "configure:10594: checking for thr_create in -lthread" >&5
10594 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10595 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10596   echo $ac_n "(cached) $ac_c" 1>&6
10597 else
10598   ac_save_LIBS="$LIBS"
10599 LIBS="-lthread  $LIBS"
10600 cat > conftest.$ac_ext <<EOF
10601 #line 10602 "configure"
10602 #include "confdefs.h"
10603 /* Override any gcc2 internal prototype to avoid an error.  */
10604 /* We use char because int might match the return type of a gcc2
10605     builtin and then its argument prototype would still apply.  */
10606 char thr_create();
10607
10608 int main() {
10609 thr_create()
10610 ; return 0; }
10611 EOF
10612 if { (eval echo configure:10613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10613   rm -rf conftest*
10614   eval "ac_cv_lib_$ac_lib_var=yes"
10615 else
10616   echo "configure: failed program was:" >&5
10617   cat conftest.$ac_ext >&5
10618   rm -rf conftest*
10619   eval "ac_cv_lib_$ac_lib_var=no"
10620 fi
10621 rm -f conftest*
10622 LIBS="$ac_save_LIBS"
10623
10624 fi
10625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10626   echo "$ac_t""yes" 1>&6
10627   have_thr=yes
10628 else
10629   echo "$ac_t""no" 1>&6
10630 have_thr=no
10631 fi
10632
10633
10634                 if test $have_thr = yes ; then
10635                         cat >> confdefs.h <<\EOF
10636 #define HAVE_THR 1
10637 EOF
10638
10639                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10640                         ol_link_threads=thr
10641
10642                         if test $ol_with_yielding_select = auto ; then
10643                                 ol_with_yielding_select=yes
10644                         fi
10645
10646                                                 for ac_func in \
10647                                 thr_setconcurrency \
10648                                 thr_getconcurrency \
10649                         
10650 do
10651 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10652 echo "configure:10653: checking for $ac_func" >&5
10653 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10654   echo $ac_n "(cached) $ac_c" 1>&6
10655 else
10656   cat > conftest.$ac_ext <<EOF
10657 #line 10658 "configure"
10658 #include "confdefs.h"
10659 /* System header to define __stub macros and hopefully few prototypes,
10660     which can conflict with char $ac_func(); below.  */
10661 #include <assert.h>
10662 /* Override any gcc2 internal prototype to avoid an error.  */
10663 /* We use char because int might match the return type of a gcc2
10664     builtin and then its argument prototype would still apply.  */
10665 char $ac_func();
10666 char (*f)();
10667
10668 int main() {
10669
10670 /* The GNU C library defines this for functions which it implements
10671     to always fail with ENOSYS.  Some functions are actually named
10672     something starting with __ and the normal name is an alias.  */
10673 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10674 choke me
10675 #else
10676 f = $ac_func;
10677 #endif
10678
10679 ; return 0; }
10680 EOF
10681 if { (eval echo configure:10682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10682   rm -rf conftest*
10683   eval "ac_cv_func_$ac_func=yes"
10684 else
10685   echo "configure: failed program was:" >&5
10686   cat conftest.$ac_ext >&5
10687   rm -rf conftest*
10688   eval "ac_cv_func_$ac_func=no"
10689 fi
10690 rm -f conftest*
10691 fi
10692
10693 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10694   echo "$ac_t""yes" 1>&6
10695     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10696   cat >> confdefs.h <<EOF
10697 #define $ac_tr_func 1
10698 EOF
10699  
10700 else
10701   echo "$ac_t""no" 1>&6
10702 fi
10703 done
10704
10705                 fi
10706         fi
10707
10708                 for ac_hdr in lwp/lwp.h
10709 do
10710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10712 echo "configure:10713: checking for $ac_hdr" >&5
10713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10714   echo $ac_n "(cached) $ac_c" 1>&6
10715 else
10716   cat > conftest.$ac_ext <<EOF
10717 #line 10718 "configure"
10718 #include "confdefs.h"
10719 #include <$ac_hdr>
10720 EOF
10721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10722 { (eval echo configure:10723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10724 if test -z "$ac_err"; then
10725   rm -rf conftest*
10726   eval "ac_cv_header_$ac_safe=yes"
10727 else
10728   echo "$ac_err" >&5
10729   echo "configure: failed program was:" >&5
10730   cat conftest.$ac_ext >&5
10731   rm -rf conftest*
10732   eval "ac_cv_header_$ac_safe=no"
10733 fi
10734 rm -f conftest*
10735 fi
10736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10737   echo "$ac_t""yes" 1>&6
10738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10739   cat >> confdefs.h <<EOF
10740 #define $ac_tr_hdr 1
10741 EOF
10742  
10743 else
10744   echo "$ac_t""no" 1>&6
10745 fi
10746 done
10747
10748         if test $ac_cv_header_lwp_lwp_h = yes ; then
10749                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10750 echo "configure:10751: checking for lwp_create in -llwp" >&5
10751 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10752 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10753   echo $ac_n "(cached) $ac_c" 1>&6
10754 else
10755   ac_save_LIBS="$LIBS"
10756 LIBS="-llwp  $LIBS"
10757 cat > conftest.$ac_ext <<EOF
10758 #line 10759 "configure"
10759 #include "confdefs.h"
10760 /* Override any gcc2 internal prototype to avoid an error.  */
10761 /* We use char because int might match the return type of a gcc2
10762     builtin and then its argument prototype would still apply.  */
10763 char lwp_create();
10764
10765 int main() {
10766 lwp_create()
10767 ; return 0; }
10768 EOF
10769 if { (eval echo configure:10770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10770   rm -rf conftest*
10771   eval "ac_cv_lib_$ac_lib_var=yes"
10772 else
10773   echo "configure: failed program was:" >&5
10774   cat conftest.$ac_ext >&5
10775   rm -rf conftest*
10776   eval "ac_cv_lib_$ac_lib_var=no"
10777 fi
10778 rm -f conftest*
10779 LIBS="$ac_save_LIBS"
10780
10781 fi
10782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10783   echo "$ac_t""yes" 1>&6
10784   have_lwp=yes
10785 else
10786   echo "$ac_t""no" 1>&6
10787 have_lwp=no
10788 fi
10789
10790
10791                 if test $have_lwp = yes ; then
10792                         cat >> confdefs.h <<\EOF
10793 #define HAVE_LWP 1
10794 EOF
10795
10796                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10797                         ol_link_threads=lwp
10798
10799                         if test $ol_with_yielding_select = auto ; then
10800                                 ol_with_yielding_select=no
10801                         fi
10802                 fi
10803         fi
10804 fi
10805
10806 if test $ol_with_yielding_select = yes ; then
10807         cat >> confdefs.h <<\EOF
10808 #define HAVE_YIELDING_SELECT 1
10809 EOF
10810
10811 fi
10812
10813 if test $ol_with_threads = manual ; then
10814                 ol_link_threads=yes
10815
10816         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10817
10818         for ac_hdr in pthread.h sched.h
10819 do
10820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10822 echo "configure:10823: checking for $ac_hdr" >&5
10823 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10824   echo $ac_n "(cached) $ac_c" 1>&6
10825 else
10826   cat > conftest.$ac_ext <<EOF
10827 #line 10828 "configure"
10828 #include "confdefs.h"
10829 #include <$ac_hdr>
10830 EOF
10831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10832 { (eval echo configure:10833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10834 if test -z "$ac_err"; then
10835   rm -rf conftest*
10836   eval "ac_cv_header_$ac_safe=yes"
10837 else
10838   echo "$ac_err" >&5
10839   echo "configure: failed program was:" >&5
10840   cat conftest.$ac_ext >&5
10841   rm -rf conftest*
10842   eval "ac_cv_header_$ac_safe=no"
10843 fi
10844 rm -f conftest*
10845 fi
10846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10847   echo "$ac_t""yes" 1>&6
10848     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10849   cat >> confdefs.h <<EOF
10850 #define $ac_tr_hdr 1
10851 EOF
10852  
10853 else
10854   echo "$ac_t""no" 1>&6
10855 fi
10856 done
10857
10858         for ac_func in sched_yield pthread_yield
10859 do
10860 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10861 echo "configure:10862: checking for $ac_func" >&5
10862 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10863   echo $ac_n "(cached) $ac_c" 1>&6
10864 else
10865   cat > conftest.$ac_ext <<EOF
10866 #line 10867 "configure"
10867 #include "confdefs.h"
10868 /* System header to define __stub macros and hopefully few prototypes,
10869     which can conflict with char $ac_func(); below.  */
10870 #include <assert.h>
10871 /* Override any gcc2 internal prototype to avoid an error.  */
10872 /* We use char because int might match the return type of a gcc2
10873     builtin and then its argument prototype would still apply.  */
10874 char $ac_func();
10875 char (*f)();
10876
10877 int main() {
10878
10879 /* The GNU C library defines this for functions which it implements
10880     to always fail with ENOSYS.  Some functions are actually named
10881     something starting with __ and the normal name is an alias.  */
10882 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10883 choke me
10884 #else
10885 f = $ac_func;
10886 #endif
10887
10888 ; return 0; }
10889 EOF
10890 if { (eval echo configure:10891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10891   rm -rf conftest*
10892   eval "ac_cv_func_$ac_func=yes"
10893 else
10894   echo "configure: failed program was:" >&5
10895   cat conftest.$ac_ext >&5
10896   rm -rf conftest*
10897   eval "ac_cv_func_$ac_func=no"
10898 fi
10899 rm -f conftest*
10900 fi
10901
10902 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10903   echo "$ac_t""yes" 1>&6
10904     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10905   cat >> confdefs.h <<EOF
10906 #define $ac_tr_func 1
10907 EOF
10908  
10909 else
10910   echo "$ac_t""no" 1>&6
10911 fi
10912 done
10913
10914         
10915         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10916 echo "configure:10917: checking for LinuxThreads pthread.h" >&5
10917 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10918   echo $ac_n "(cached) $ac_c" 1>&6
10919 else
10920   cat > conftest.$ac_ext <<EOF
10921 #line 10922 "configure"
10922 #include "confdefs.h"
10923 #include <pthread.h>
10924 EOF
10925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10926   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10927   rm -rf conftest*
10928   ol_cv_header_linux_threads=yes
10929 else
10930   rm -rf conftest*
10931   ol_cv_header_linux_threads=no
10932 fi
10933 rm -f conftest*
10934
10935                 
10936 fi
10937
10938 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10939         if test $ol_cv_header_linux_threads = yes; then
10940                 cat >> confdefs.h <<\EOF
10941 #define HAVE_LINUX_THREADS 1
10942 EOF
10943
10944         fi
10945
10946
10947         for ac_hdr in mach/cthreads.h
10948 do
10949 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10950 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10951 echo "configure:10952: checking for $ac_hdr" >&5
10952 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10953   echo $ac_n "(cached) $ac_c" 1>&6
10954 else
10955   cat > conftest.$ac_ext <<EOF
10956 #line 10957 "configure"
10957 #include "confdefs.h"
10958 #include <$ac_hdr>
10959 EOF
10960 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10961 { (eval echo configure:10962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10962 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10963 if test -z "$ac_err"; then
10964   rm -rf conftest*
10965   eval "ac_cv_header_$ac_safe=yes"
10966 else
10967   echo "$ac_err" >&5
10968   echo "configure: failed program was:" >&5
10969   cat conftest.$ac_ext >&5
10970   rm -rf conftest*
10971   eval "ac_cv_header_$ac_safe=no"
10972 fi
10973 rm -f conftest*
10974 fi
10975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10976   echo "$ac_t""yes" 1>&6
10977     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10978   cat >> confdefs.h <<EOF
10979 #define $ac_tr_hdr 1
10980 EOF
10981  
10982 else
10983   echo "$ac_t""no" 1>&6
10984 fi
10985 done
10986
10987         for ac_hdr in lwp/lwp.h
10988 do
10989 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10990 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10991 echo "configure:10992: checking for $ac_hdr" >&5
10992 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10993   echo $ac_n "(cached) $ac_c" 1>&6
10994 else
10995   cat > conftest.$ac_ext <<EOF
10996 #line 10997 "configure"
10997 #include "confdefs.h"
10998 #include <$ac_hdr>
10999 EOF
11000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11001 { (eval echo configure:11002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11003 if test -z "$ac_err"; then
11004   rm -rf conftest*
11005   eval "ac_cv_header_$ac_safe=yes"
11006 else
11007   echo "$ac_err" >&5
11008   echo "configure: failed program was:" >&5
11009   cat conftest.$ac_ext >&5
11010   rm -rf conftest*
11011   eval "ac_cv_header_$ac_safe=no"
11012 fi
11013 rm -f conftest*
11014 fi
11015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11016   echo "$ac_t""yes" 1>&6
11017     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11018   cat >> confdefs.h <<EOF
11019 #define $ac_tr_hdr 1
11020 EOF
11021  
11022 else
11023   echo "$ac_t""no" 1>&6
11024 fi
11025 done
11026
11027         for ac_hdr in thread.h synch.h
11028 do
11029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11030 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11031 echo "configure:11032: checking for $ac_hdr" >&5
11032 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11033   echo $ac_n "(cached) $ac_c" 1>&6
11034 else
11035   cat > conftest.$ac_ext <<EOF
11036 #line 11037 "configure"
11037 #include "confdefs.h"
11038 #include <$ac_hdr>
11039 EOF
11040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11041 { (eval echo configure:11042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11043 if test -z "$ac_err"; then
11044   rm -rf conftest*
11045   eval "ac_cv_header_$ac_safe=yes"
11046 else
11047   echo "$ac_err" >&5
11048   echo "configure: failed program was:" >&5
11049   cat conftest.$ac_ext >&5
11050   rm -rf conftest*
11051   eval "ac_cv_header_$ac_safe=no"
11052 fi
11053 rm -f conftest*
11054 fi
11055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11056   echo "$ac_t""yes" 1>&6
11057     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11058   cat >> confdefs.h <<EOF
11059 #define $ac_tr_hdr 1
11060 EOF
11061  
11062 else
11063   echo "$ac_t""no" 1>&6
11064 fi
11065 done
11066
11067 fi
11068
11069 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11070                         cat >> confdefs.h <<\EOF
11071 #define REENTRANT 1
11072 EOF
11073
11074         cat >> confdefs.h <<\EOF
11075 #define _REENTRANT 1
11076 EOF
11077
11078         cat >> confdefs.h <<\EOF
11079 #define THREAD_SAFE 1
11080 EOF
11081
11082         cat >> confdefs.h <<\EOF
11083 #define _THREAD_SAFE 1
11084 EOF
11085
11086         cat >> confdefs.h <<\EOF
11087 #define THREADSAFE 1
11088 EOF
11089
11090         cat >> confdefs.h <<\EOF
11091 #define _THREADSAFE 1
11092 EOF
11093
11094         cat >> confdefs.h <<\EOF
11095 #define _SGI_MP_SOURCE 1
11096 EOF
11097
11098
11099                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11100 echo "configure:11101: checking for thread specific errno" >&5
11101 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11102   echo $ac_n "(cached) $ac_c" 1>&6
11103 else
11104   
11105                 cat > conftest.$ac_ext <<EOF
11106 #line 11107 "configure"
11107 #include "confdefs.h"
11108 #include <errno.h>
11109 int main() {
11110 errno = 0;
11111 ; return 0; }
11112 EOF
11113 if { (eval echo configure:11114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11114   rm -rf conftest*
11115   ol_cv_errno_thread_specific=yes
11116 else
11117   echo "configure: failed program was:" >&5
11118   cat conftest.$ac_ext >&5
11119   rm -rf conftest*
11120   ol_cv_errno_thread_specific=no
11121 fi
11122 rm -f conftest*
11123         
11124 fi
11125
11126 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11127
11128                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11129 echo "configure:11130: checking for thread specific h_errno" >&5
11130 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11131   echo $ac_n "(cached) $ac_c" 1>&6
11132 else
11133   
11134                 cat > conftest.$ac_ext <<EOF
11135 #line 11136 "configure"
11136 #include "confdefs.h"
11137 #include <netdb.h>
11138 int main() {
11139 h_errno = 0;
11140 ; return 0; }
11141 EOF
11142 if { (eval echo configure:11143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11143   rm -rf conftest*
11144   ol_cv_h_errno_thread_specific=yes
11145 else
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148   rm -rf conftest*
11149   ol_cv_h_errno_thread_specific=no
11150 fi
11151 rm -f conftest*
11152         
11153 fi
11154
11155 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11156
11157         if test $ol_cv_errno_thread_specific != yes \
11158                 -o $ol_cv_h_errno_thread_specific != yes ; then
11159                 LIBS="$LTHREAD_LIBS $LIBS"
11160                 LTHREAD_LIBS=""
11161         fi
11162
11163 fi  
11164
11165 if test $ol_link_threads = no ; then
11166         if test $ol_with_threads = yes ; then
11167                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11168         fi
11169
11170         if test $ol_with_threads = auto ; then
11171                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11172                 ol_with_threads=no
11173         fi
11174
11175         cat >> confdefs.h <<\EOF
11176 #define NO_THREADS 1
11177 EOF
11178
11179         LTHREAD_LIBS=""
11180 fi
11181
11182 if test $ol_link_threads != no ; then
11183         cat >> confdefs.h <<\EOF
11184 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11185 EOF
11186
11187 fi
11188
11189
11190 ol_link_ldbm=no 
11191 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
11192         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
11193 echo "configure:11194: checking for DB2 library" >&5
11194 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
11195   echo $ac_n "(cached) $ac_c" 1>&6
11196 else
11197         ol_LIBS="$LIBS"
11198         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
11199 echo "configure:11200: checking for db_appexit in -ldb" >&5
11200 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
11201 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11202   echo $ac_n "(cached) $ac_c" 1>&6
11203 else
11204   ac_save_LIBS="$LIBS"
11205 LIBS="-ldb  $LIBS"
11206 cat > conftest.$ac_ext <<EOF
11207 #line 11208 "configure"
11208 #include "confdefs.h"
11209 /* Override any gcc2 internal prototype to avoid an error.  */
11210 /* We use char because int might match the return type of a gcc2
11211     builtin and then its argument prototype would still apply.  */
11212 char db_appexit();
11213
11214 int main() {
11215 db_appexit()
11216 ; return 0; }
11217 EOF
11218 if { (eval echo configure:11219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11219   rm -rf conftest*
11220   eval "ac_cv_lib_$ac_lib_var=yes"
11221 else
11222   echo "configure: failed program was:" >&5
11223   cat conftest.$ac_ext >&5
11224   rm -rf conftest*
11225   eval "ac_cv_lib_$ac_lib_var=no"
11226 fi
11227 rm -f conftest*
11228 LIBS="$ac_save_LIBS"
11229
11230 fi
11231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11232   echo "$ac_t""yes" 1>&6
11233   ol_cv_lib_db2=-ldb
11234 else
11235   echo "$ac_t""no" 1>&6
11236 ol_cv_lib_db2=no
11237 fi
11238
11239         LIBS="$ol_LIBS"
11240
11241 fi
11242
11243 echo "$ac_t""$ol_cv_lib_db2" 1>&6
11244
11245 for ac_hdr in db.h
11246 do
11247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11249 echo "configure:11250: checking for $ac_hdr" >&5
11250 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11251   echo $ac_n "(cached) $ac_c" 1>&6
11252 else
11253   cat > conftest.$ac_ext <<EOF
11254 #line 11255 "configure"
11255 #include "confdefs.h"
11256 #include <$ac_hdr>
11257 EOF
11258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11259 { (eval echo configure:11260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11261 if test -z "$ac_err"; then
11262   rm -rf conftest*
11263   eval "ac_cv_header_$ac_safe=yes"
11264 else
11265   echo "$ac_err" >&5
11266   echo "configure: failed program was:" >&5
11267   cat conftest.$ac_ext >&5
11268   rm -rf conftest*
11269   eval "ac_cv_header_$ac_safe=no"
11270 fi
11271 rm -f conftest*
11272 fi
11273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11274   echo "$ac_t""yes" 1>&6
11275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11276   cat >> confdefs.h <<EOF
11277 #define $ac_tr_hdr 1
11278 EOF
11279  
11280 else
11281   echo "$ac_t""no" 1>&6
11282 fi
11283 done
11284
11285 if test $ac_cv_header_db_h = yes ; then
11286         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
11287 echo "configure:11288: checking if db.h is DB2" >&5
11288 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
11289   echo $ac_n "(cached) $ac_c" 1>&6
11290 else
11291   
11292                 cat > conftest.$ac_ext <<EOF
11293 #line 11294 "configure"
11294 #include "confdefs.h"
11295
11296 #                       include <db.h>
11297                         /* this check could be improved */
11298 #                       ifdef DB_VERSION_MAJOR
11299 #                               if DB_VERSION_MAJOR == 2
11300                                         __db_version_2;
11301 #                               endif
11302 #                       endif
11303                 
11304 EOF
11305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11306   egrep "__db_version_2" >/dev/null 2>&1; then
11307   rm -rf conftest*
11308   ol_cv_header_db2=yes
11309 else
11310   rm -rf conftest*
11311   ol_cv_header_db2=no
11312 fi
11313 rm -f conftest*
11314
11315 fi
11316
11317 echo "$ac_t""$ol_cv_header_db2" 1>&6
11318 else
11319         ol_cv_header_db2=no
11320 fi
11321
11322
11323  
11324  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
11325 echo "configure:11326: checking for Berkeley DB2" >&5
11326 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
11327   echo $ac_n "(cached) $ac_c" 1>&6
11328 else
11329   
11330         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
11331                 ol_cv_berkeley_db2=no
11332         else
11333                 ol_cv_berkeley_db2=yes
11334         fi
11335
11336 fi
11337
11338 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
11339  if test $ol_cv_berkeley_db2 = yes ; then
11340         cat >> confdefs.h <<\EOF
11341 #define HAVE_BERKELEY_DB2 1
11342 EOF
11343
11344  fi
11345
11346
11347         if test $ol_cv_berkeley_db2 = yes ; then
11348                 ol_link_ldbm=db2
11349                 ol_with_ldbm_api=db2
11350
11351                 if test $ol_with_ldbm_type = hash ; then
11352                         cat >> confdefs.h <<\EOF
11353 #define LDBM_USE_DBHASH 1
11354 EOF
11355
11356                 else
11357                         cat >> confdefs.h <<\EOF
11358 #define LDBM_USE_DBBTREE 1
11359 EOF
11360
11361                 fi
11362
11363                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11364 echo "configure:11365: checking for DB_THREAD support" >&5
11365 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
11366   echo $ac_n "(cached) $ac_c" 1>&6
11367 else
11368   
11369         ol_LIBS="$LIBS"
11370         if test $ol_cv_lib_db2 != yes ; then
11371                 LIBS="$ol_cv_lib_db2"
11372         fi
11373
11374         if test "$cross_compiling" = yes; then
11375   ol_cv_berkeley_db2_db_thread=cross
11376 else
11377   cat > conftest.$ac_ext <<EOF
11378 #line 11379 "configure"
11379 #include "confdefs.h"
11380
11381 #include <db.h>
11382 #ifndef NULL
11383 #define NULL ((void *)0)
11384 #endif
11385 main()
11386 {
11387         int rc;
11388         DB_ENV env;
11389         u_int32_t flags = DB_CREATE | DB_THREAD;
11390
11391         memset( &env, '\0', sizeof(env) );
11392
11393         rc = db_appinit( NULL, NULL, &env, flags );
11394
11395         if( rc == 0 ) {
11396                 db_appexit( &env );
11397         }
11398
11399         return rc;
11400 }
11401 EOF
11402 if { (eval echo configure:11403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11403 then
11404   ol_cv_berkeley_db2_db_thread=yes
11405 else
11406   echo "configure: failed program was:" >&5
11407   cat conftest.$ac_ext >&5
11408   rm -fr conftest*
11409   ol_cv_berkeley_db2_db_thread=no
11410 fi
11411 rm -fr conftest*
11412 fi
11413
11414
11415         LIBS="$ol_LIBS"
11416
11417         if test $ol_cv_berkeley_db2_db_thread != no ; then
11418                 cat >> confdefs.h <<\EOF
11419 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11420 EOF
11421
11422         fi
11423
11424 fi
11425
11426 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11427
11428                                                 if test $ol_cv_lib_db2 != yes ; then
11429                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11430                 fi
11431         fi
11432 fi
11433
11434 ol_link_bdb2=no
11435 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11436         if test $ol_cv_berkeley_db2_db_thread != no ; then
11437                 ol_link_bdb2=yes
11438         else
11439                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11440         fi
11441 fi
11442
11443 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11444         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11445 echo "configure:11446: checking for Berkeley DB library" >&5
11446 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11447   echo $ac_n "(cached) $ac_c" 1>&6
11448 else
11449   
11450         for ac_hdr in db1/db.h
11451 do
11452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11454 echo "configure:11455: checking for $ac_hdr" >&5
11455 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11456   echo $ac_n "(cached) $ac_c" 1>&6
11457 else
11458   cat > conftest.$ac_ext <<EOF
11459 #line 11460 "configure"
11460 #include "confdefs.h"
11461 #include <$ac_hdr>
11462 EOF
11463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11464 { (eval echo configure:11465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11466 if test -z "$ac_err"; then
11467   rm -rf conftest*
11468   eval "ac_cv_header_$ac_safe=yes"
11469 else
11470   echo "$ac_err" >&5
11471   echo "configure: failed program was:" >&5
11472   cat conftest.$ac_ext >&5
11473   rm -rf conftest*
11474   eval "ac_cv_header_$ac_safe=no"
11475 fi
11476 rm -f conftest*
11477 fi
11478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11479   echo "$ac_t""yes" 1>&6
11480     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11481   cat >> confdefs.h <<EOF
11482 #define $ac_tr_hdr 1
11483 EOF
11484  
11485 else
11486   echo "$ac_t""no" 1>&6
11487 fi
11488 done
11489
11490         ol_LIBS="$LIBS"
11491         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11492 echo "configure:11493: checking for dbopen" >&5
11493 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11494   echo $ac_n "(cached) $ac_c" 1>&6
11495 else
11496   cat > conftest.$ac_ext <<EOF
11497 #line 11498 "configure"
11498 #include "confdefs.h"
11499 /* System header to define __stub macros and hopefully few prototypes,
11500     which can conflict with char dbopen(); below.  */
11501 #include <assert.h>
11502 /* Override any gcc2 internal prototype to avoid an error.  */
11503 /* We use char because int might match the return type of a gcc2
11504     builtin and then its argument prototype would still apply.  */
11505 char dbopen();
11506 char (*f)();
11507
11508 int main() {
11509
11510 /* The GNU C library defines this for functions which it implements
11511     to always fail with ENOSYS.  Some functions are actually named
11512     something starting with __ and the normal name is an alias.  */
11513 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11514 choke me
11515 #else
11516 f = dbopen;
11517 #endif
11518
11519 ; return 0; }
11520 EOF
11521 if { (eval echo configure:11522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11522   rm -rf conftest*
11523   eval "ac_cv_func_dbopen=yes"
11524 else
11525   echo "configure: failed program was:" >&5
11526   cat conftest.$ac_ext >&5
11527   rm -rf conftest*
11528   eval "ac_cv_func_dbopen=no"
11529 fi
11530 rm -f conftest*
11531 fi
11532
11533 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11534   echo "$ac_t""yes" 1>&6
11535   ol_cv_lib_db=yes
11536 else
11537   echo "$ac_t""no" 1>&6
11538
11539                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11540 echo "configure:11541: checking for dbopen in -ldb1" >&5
11541 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11542 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11543   echo $ac_n "(cached) $ac_c" 1>&6
11544 else
11545   ac_save_LIBS="$LIBS"
11546 LIBS="-ldb1  $LIBS"
11547 cat > conftest.$ac_ext <<EOF
11548 #line 11549 "configure"
11549 #include "confdefs.h"
11550 /* Override any gcc2 internal prototype to avoid an error.  */
11551 /* We use char because int might match the return type of a gcc2
11552     builtin and then its argument prototype would still apply.  */
11553 char dbopen();
11554
11555 int main() {
11556 dbopen()
11557 ; return 0; }
11558 EOF
11559 if { (eval echo configure:11560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11560   rm -rf conftest*
11561   eval "ac_cv_lib_$ac_lib_var=yes"
11562 else
11563   echo "configure: failed program was:" >&5
11564   cat conftest.$ac_ext >&5
11565   rm -rf conftest*
11566   eval "ac_cv_lib_$ac_lib_var=no"
11567 fi
11568 rm -f conftest*
11569 LIBS="$ac_save_LIBS"
11570
11571 fi
11572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11573   echo "$ac_t""yes" 1>&6
11574   ol_cv_lib_db=-ldb1
11575 else
11576   echo "$ac_t""no" 1>&6
11577
11578                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11579 echo "configure:11580: checking for dbopen in -ldb" >&5
11580 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11581 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11582   echo $ac_n "(cached) $ac_c" 1>&6
11583 else
11584   ac_save_LIBS="$LIBS"
11585 LIBS="-ldb  $LIBS"
11586 cat > conftest.$ac_ext <<EOF
11587 #line 11588 "configure"
11588 #include "confdefs.h"
11589 /* Override any gcc2 internal prototype to avoid an error.  */
11590 /* We use char because int might match the return type of a gcc2
11591     builtin and then its argument prototype would still apply.  */
11592 char dbopen();
11593
11594 int main() {
11595 dbopen()
11596 ; return 0; }
11597 EOF
11598 if { (eval echo configure:11599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11599   rm -rf conftest*
11600   eval "ac_cv_lib_$ac_lib_var=yes"
11601 else
11602   echo "configure: failed program was:" >&5
11603   cat conftest.$ac_ext >&5
11604   rm -rf conftest*
11605   eval "ac_cv_lib_$ac_lib_var=no"
11606 fi
11607 rm -f conftest*
11608 LIBS="$ac_save_LIBS"
11609
11610 fi
11611 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11612   echo "$ac_t""yes" 1>&6
11613   ol_cv_lib_db=-ldb
11614 else
11615   echo "$ac_t""no" 1>&6
11616 ol_cv_lib_db=no
11617 fi
11618
11619                 
11620 fi
11621
11622         
11623 fi
11624
11625         LIBS="$ol_LIBS"
11626
11627 fi
11628
11629 echo "$ac_t""$ol_cv_lib_db" 1>&6
11630
11631
11632 for ac_hdr in db_185.h
11633 do
11634 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11635 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11636 echo "configure:11637: checking for $ac_hdr" >&5
11637 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11638   echo $ac_n "(cached) $ac_c" 1>&6
11639 else
11640   cat > conftest.$ac_ext <<EOF
11641 #line 11642 "configure"
11642 #include "confdefs.h"
11643 #include <$ac_hdr>
11644 EOF
11645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11646 { (eval echo configure:11647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11647 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11648 if test -z "$ac_err"; then
11649   rm -rf conftest*
11650   eval "ac_cv_header_$ac_safe=yes"
11651 else
11652   echo "$ac_err" >&5
11653   echo "configure: failed program was:" >&5
11654   cat conftest.$ac_ext >&5
11655   rm -rf conftest*
11656   eval "ac_cv_header_$ac_safe=no"
11657 fi
11658 rm -f conftest*
11659 fi
11660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11661   echo "$ac_t""yes" 1>&6
11662     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11663   cat >> confdefs.h <<EOF
11664 #define $ac_tr_hdr 1
11665 EOF
11666  
11667 else
11668   echo "$ac_t""no" 1>&6
11669 fi
11670 done
11671
11672 if test "$ol_cv_header_db2" = yes ; then
11673         
11674         ol_cv_header_db=$ac_cv_header_db_185_h
11675 else
11676         ol_cv_header_db=$ac_cv_header_db_h
11677 fi
11678
11679
11680  
11681  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11682 echo "configure:11683: checking for Berkeley DB" >&5
11683 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11684   echo $ac_n "(cached) $ac_c" 1>&6
11685 else
11686   
11687         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11688                 ol_cv_berkeley_db=no
11689         else
11690                 ol_cv_berkeley_db=yes
11691         fi
11692
11693 fi
11694
11695 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11696  if test $ol_cv_berkeley_db = yes ; then
11697         cat >> confdefs.h <<\EOF
11698 #define HAVE_BERKELEY_DB 1
11699 EOF
11700
11701  fi
11702
11703
11704         if test $ol_cv_berkeley_db = yes ; then
11705                 ol_link_ldbm=db
11706                 ol_with_ldbm_api=db
11707
11708                 if test $ol_with_ldbm_type = hash ; then
11709                         cat >> confdefs.h <<\EOF
11710 #define LDBM_USE_DBHASH 1
11711 EOF
11712
11713                 else
11714                         cat >> confdefs.h <<\EOF
11715 #define LDBM_USE_DBBTREE 1
11716 EOF
11717
11718                 fi
11719
11720                                                 if test $ol_cv_lib_db != yes ; then
11721                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11722                 fi
11723         fi
11724 fi
11725
11726 if test $ol_with_ldbm_api = manual ; then
11727                 ol_link_ldbm=yes
11728
11729         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11730
11731         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11732 do
11733 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11734 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11735 echo "configure:11736: checking for $ac_hdr" >&5
11736 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11737   echo $ac_n "(cached) $ac_c" 1>&6
11738 else
11739   cat > conftest.$ac_ext <<EOF
11740 #line 11741 "configure"
11741 #include "confdefs.h"
11742 #include <$ac_hdr>
11743 EOF
11744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11745 { (eval echo configure:11746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11747 if test -z "$ac_err"; then
11748   rm -rf conftest*
11749   eval "ac_cv_header_$ac_safe=yes"
11750 else
11751   echo "$ac_err" >&5
11752   echo "configure: failed program was:" >&5
11753   cat conftest.$ac_ext >&5
11754   rm -rf conftest*
11755   eval "ac_cv_header_$ac_safe=no"
11756 fi
11757 rm -f conftest*
11758 fi
11759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11760   echo "$ac_t""yes" 1>&6
11761     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11762   cat >> confdefs.h <<EOF
11763 #define $ac_tr_hdr 1
11764 EOF
11765  
11766 else
11767   echo "$ac_t""no" 1>&6
11768 fi
11769 done
11770
11771 fi
11772
11773 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11774         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11775         ol_with_ldbm_api=none
11776 fi
11777
11778 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11779         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11780 echo "configure:11781: checking for MDBM library" >&5
11781 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11782   echo $ac_n "(cached) $ac_c" 1>&6
11783 else
11784         ol_LIBS="$LIBS"
11785         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11786 echo "configure:11787: checking for mdbm_set_chain" >&5
11787 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11788   echo $ac_n "(cached) $ac_c" 1>&6
11789 else
11790   cat > conftest.$ac_ext <<EOF
11791 #line 11792 "configure"
11792 #include "confdefs.h"
11793 /* System header to define __stub macros and hopefully few prototypes,
11794     which can conflict with char mdbm_set_chain(); below.  */
11795 #include <assert.h>
11796 /* Override any gcc2 internal prototype to avoid an error.  */
11797 /* We use char because int might match the return type of a gcc2
11798     builtin and then its argument prototype would still apply.  */
11799 char mdbm_set_chain();
11800 char (*f)();
11801
11802 int main() {
11803
11804 /* The GNU C library defines this for functions which it implements
11805     to always fail with ENOSYS.  Some functions are actually named
11806     something starting with __ and the normal name is an alias.  */
11807 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11808 choke me
11809 #else
11810 f = mdbm_set_chain;
11811 #endif
11812
11813 ; return 0; }
11814 EOF
11815 if { (eval echo configure:11816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11816   rm -rf conftest*
11817   eval "ac_cv_func_mdbm_set_chain=yes"
11818 else
11819   echo "configure: failed program was:" >&5
11820   cat conftest.$ac_ext >&5
11821   rm -rf conftest*
11822   eval "ac_cv_func_mdbm_set_chain=no"
11823 fi
11824 rm -f conftest*
11825 fi
11826
11827 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11828   echo "$ac_t""yes" 1>&6
11829   ol_cv_lib_mdbm=yes
11830 else
11831   echo "$ac_t""no" 1>&6
11832
11833                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11834 echo "configure:11835: checking for mdbm_set_chain in -lmdbm" >&5
11835 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11836 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11837   echo $ac_n "(cached) $ac_c" 1>&6
11838 else
11839   ac_save_LIBS="$LIBS"
11840 LIBS="-lmdbm  $LIBS"
11841 cat > conftest.$ac_ext <<EOF
11842 #line 11843 "configure"
11843 #include "confdefs.h"
11844 /* Override any gcc2 internal prototype to avoid an error.  */
11845 /* We use char because int might match the return type of a gcc2
11846     builtin and then its argument prototype would still apply.  */
11847 char mdbm_set_chain();
11848
11849 int main() {
11850 mdbm_set_chain()
11851 ; return 0; }
11852 EOF
11853 if { (eval echo configure:11854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11854   rm -rf conftest*
11855   eval "ac_cv_lib_$ac_lib_var=yes"
11856 else
11857   echo "configure: failed program was:" >&5
11858   cat conftest.$ac_ext >&5
11859   rm -rf conftest*
11860   eval "ac_cv_lib_$ac_lib_var=no"
11861 fi
11862 rm -f conftest*
11863 LIBS="$ac_save_LIBS"
11864
11865 fi
11866 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11867   echo "$ac_t""yes" 1>&6
11868   ol_cv_lib_mdbm=-lmdbm
11869 else
11870   echo "$ac_t""no" 1>&6
11871 ol_cv_lib_mdbm=no
11872 fi
11873
11874         
11875 fi
11876
11877         LIBS="$ol_LIBS"
11878
11879 fi
11880
11881 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11882
11883
11884  for ac_hdr in mdbm.h
11885 do
11886 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11887 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11888 echo "configure:11889: checking for $ac_hdr" >&5
11889 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11890   echo $ac_n "(cached) $ac_c" 1>&6
11891 else
11892   cat > conftest.$ac_ext <<EOF
11893 #line 11894 "configure"
11894 #include "confdefs.h"
11895 #include <$ac_hdr>
11896 EOF
11897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11898 { (eval echo configure:11899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11900 if test -z "$ac_err"; then
11901   rm -rf conftest*
11902   eval "ac_cv_header_$ac_safe=yes"
11903 else
11904   echo "$ac_err" >&5
11905   echo "configure: failed program was:" >&5
11906   cat conftest.$ac_ext >&5
11907   rm -rf conftest*
11908   eval "ac_cv_header_$ac_safe=no"
11909 fi
11910 rm -f conftest*
11911 fi
11912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11913   echo "$ac_t""yes" 1>&6
11914     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11915   cat >> confdefs.h <<EOF
11916 #define $ac_tr_hdr 1
11917 EOF
11918  
11919 else
11920   echo "$ac_t""no" 1>&6
11921 fi
11922 done
11923
11924  echo $ac_n "checking for db""... $ac_c" 1>&6
11925 echo "configure:11926: checking for db" >&5
11926 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11927   echo $ac_n "(cached) $ac_c" 1>&6
11928 else
11929   
11930         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11931                 ol_cv_mdbm=no
11932         else
11933                 ol_cv_mdbm=yes
11934         fi
11935
11936 fi
11937
11938 echo "$ac_t""$ol_cv_mdbm" 1>&6
11939  if test $ol_cv_mdbm = yes ; then
11940         cat >> confdefs.h <<\EOF
11941 #define HAVE_MDBM 1
11942 EOF
11943
11944  fi
11945
11946
11947         if test $ol_cv_mdbm = yes ; then
11948                 ol_link_ldbm=mdbm
11949                 ol_with_ldbm_api=mdbm
11950                 if test $ol_cv_lib_mdbm != yes ; then
11951                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11952                 fi
11953         fi
11954 fi
11955
11956 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11957         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11958 echo "configure:11959: checking for GDBM library" >&5
11959 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11960   echo $ac_n "(cached) $ac_c" 1>&6
11961 else
11962         ol_LIBS="$LIBS"
11963         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11964 echo "configure:11965: checking for gdbm_open" >&5
11965 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11966   echo $ac_n "(cached) $ac_c" 1>&6
11967 else
11968   cat > conftest.$ac_ext <<EOF
11969 #line 11970 "configure"
11970 #include "confdefs.h"
11971 /* System header to define __stub macros and hopefully few prototypes,
11972     which can conflict with char gdbm_open(); below.  */
11973 #include <assert.h>
11974 /* Override any gcc2 internal prototype to avoid an error.  */
11975 /* We use char because int might match the return type of a gcc2
11976     builtin and then its argument prototype would still apply.  */
11977 char gdbm_open();
11978 char (*f)();
11979
11980 int main() {
11981
11982 /* The GNU C library defines this for functions which it implements
11983     to always fail with ENOSYS.  Some functions are actually named
11984     something starting with __ and the normal name is an alias.  */
11985 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11986 choke me
11987 #else
11988 f = gdbm_open;
11989 #endif
11990
11991 ; return 0; }
11992 EOF
11993 if { (eval echo configure:11994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11994   rm -rf conftest*
11995   eval "ac_cv_func_gdbm_open=yes"
11996 else
11997   echo "configure: failed program was:" >&5
11998   cat conftest.$ac_ext >&5
11999   rm -rf conftest*
12000   eval "ac_cv_func_gdbm_open=no"
12001 fi
12002 rm -f conftest*
12003 fi
12004
12005 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12006   echo "$ac_t""yes" 1>&6
12007   ol_cv_lib_gdbm=yes
12008 else
12009   echo "$ac_t""no" 1>&6
12010
12011                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12012 echo "configure:12013: checking for gdbm_open in -lgdbm" >&5
12013 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12014 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12015   echo $ac_n "(cached) $ac_c" 1>&6
12016 else
12017   ac_save_LIBS="$LIBS"
12018 LIBS="-lgdbm  $LIBS"
12019 cat > conftest.$ac_ext <<EOF
12020 #line 12021 "configure"
12021 #include "confdefs.h"
12022 /* Override any gcc2 internal prototype to avoid an error.  */
12023 /* We use char because int might match the return type of a gcc2
12024     builtin and then its argument prototype would still apply.  */
12025 char gdbm_open();
12026
12027 int main() {
12028 gdbm_open()
12029 ; return 0; }
12030 EOF
12031 if { (eval echo configure:12032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12032   rm -rf conftest*
12033   eval "ac_cv_lib_$ac_lib_var=yes"
12034 else
12035   echo "configure: failed program was:" >&5
12036   cat conftest.$ac_ext >&5
12037   rm -rf conftest*
12038   eval "ac_cv_lib_$ac_lib_var=no"
12039 fi
12040 rm -f conftest*
12041 LIBS="$ac_save_LIBS"
12042
12043 fi
12044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12045   echo "$ac_t""yes" 1>&6
12046   ol_cv_lib_gdbm=-lgdbm
12047 else
12048   echo "$ac_t""no" 1>&6
12049 ol_cv_lib_gdbm=no
12050 fi
12051
12052         
12053 fi
12054
12055         LIBS="$ol_LIBS"
12056
12057 fi
12058
12059 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12060
12061
12062  for ac_hdr in gdbm.h
12063 do
12064 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12065 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12066 echo "configure:12067: checking for $ac_hdr" >&5
12067 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12068   echo $ac_n "(cached) $ac_c" 1>&6
12069 else
12070   cat > conftest.$ac_ext <<EOF
12071 #line 12072 "configure"
12072 #include "confdefs.h"
12073 #include <$ac_hdr>
12074 EOF
12075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12076 { (eval echo configure:12077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12078 if test -z "$ac_err"; then
12079   rm -rf conftest*
12080   eval "ac_cv_header_$ac_safe=yes"
12081 else
12082   echo "$ac_err" >&5
12083   echo "configure: failed program was:" >&5
12084   cat conftest.$ac_ext >&5
12085   rm -rf conftest*
12086   eval "ac_cv_header_$ac_safe=no"
12087 fi
12088 rm -f conftest*
12089 fi
12090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12091   echo "$ac_t""yes" 1>&6
12092     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12093   cat >> confdefs.h <<EOF
12094 #define $ac_tr_hdr 1
12095 EOF
12096  
12097 else
12098   echo "$ac_t""no" 1>&6
12099 fi
12100 done
12101
12102  echo $ac_n "checking for db""... $ac_c" 1>&6
12103 echo "configure:12104: checking for db" >&5
12104 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12105   echo $ac_n "(cached) $ac_c" 1>&6
12106 else
12107   
12108         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12109                 ol_cv_gdbm=no
12110         else
12111                 ol_cv_gdbm=yes
12112         fi
12113
12114 fi
12115
12116 echo "$ac_t""$ol_cv_gdbm" 1>&6
12117  if test $ol_cv_gdbm = yes ; then
12118         cat >> confdefs.h <<\EOF
12119 #define HAVE_GDBM 1
12120 EOF
12121
12122  fi
12123
12124
12125         if test $ol_cv_gdbm = yes ; then
12126                 ol_link_ldbm=gdbm
12127                 ol_with_ldbm_api=gdbm
12128
12129                 if test $ol_cv_lib_gdbm != yes ; then
12130                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12131                 fi
12132         fi
12133 fi
12134
12135 if test $ol_with_ldbm_api = ndbm ; then
12136         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12137 echo "configure:12138: checking for NDBM library" >&5
12138 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12139   echo $ac_n "(cached) $ac_c" 1>&6
12140 else
12141         ol_LIBS="$LIBS"
12142         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12143 echo "configure:12144: checking for dbm_open" >&5
12144 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12145   echo $ac_n "(cached) $ac_c" 1>&6
12146 else
12147   cat > conftest.$ac_ext <<EOF
12148 #line 12149 "configure"
12149 #include "confdefs.h"
12150 /* System header to define __stub macros and hopefully few prototypes,
12151     which can conflict with char dbm_open(); below.  */
12152 #include <assert.h>
12153 /* Override any gcc2 internal prototype to avoid an error.  */
12154 /* We use char because int might match the return type of a gcc2
12155     builtin and then its argument prototype would still apply.  */
12156 char dbm_open();
12157 char (*f)();
12158
12159 int main() {
12160
12161 /* The GNU C library defines this for functions which it implements
12162     to always fail with ENOSYS.  Some functions are actually named
12163     something starting with __ and the normal name is an alias.  */
12164 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12165 choke me
12166 #else
12167 f = dbm_open;
12168 #endif
12169
12170 ; return 0; }
12171 EOF
12172 if { (eval echo configure:12173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12173   rm -rf conftest*
12174   eval "ac_cv_func_dbm_open=yes"
12175 else
12176   echo "configure: failed program was:" >&5
12177   cat conftest.$ac_ext >&5
12178   rm -rf conftest*
12179   eval "ac_cv_func_dbm_open=no"
12180 fi
12181 rm -f conftest*
12182 fi
12183
12184 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12185   echo "$ac_t""yes" 1>&6
12186   ol_cv_lib_ndbm=yes
12187 else
12188   echo "$ac_t""no" 1>&6
12189
12190                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12191 echo "configure:12192: checking for dbm_open in -lndbm" >&5
12192 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12194   echo $ac_n "(cached) $ac_c" 1>&6
12195 else
12196   ac_save_LIBS="$LIBS"
12197 LIBS="-lndbm  $LIBS"
12198 cat > conftest.$ac_ext <<EOF
12199 #line 12200 "configure"
12200 #include "confdefs.h"
12201 /* Override any gcc2 internal prototype to avoid an error.  */
12202 /* We use char because int might match the return type of a gcc2
12203     builtin and then its argument prototype would still apply.  */
12204 char dbm_open();
12205
12206 int main() {
12207 dbm_open()
12208 ; return 0; }
12209 EOF
12210 if { (eval echo configure:12211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12211   rm -rf conftest*
12212   eval "ac_cv_lib_$ac_lib_var=yes"
12213 else
12214   echo "configure: failed program was:" >&5
12215   cat conftest.$ac_ext >&5
12216   rm -rf conftest*
12217   eval "ac_cv_lib_$ac_lib_var=no"
12218 fi
12219 rm -f conftest*
12220 LIBS="$ac_save_LIBS"
12221
12222 fi
12223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12224   echo "$ac_t""yes" 1>&6
12225   ol_cv_lib_ndbm=-lndbm
12226 else
12227   echo "$ac_t""no" 1>&6
12228
12229                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12230 echo "configure:12231: checking for dbm_open in -ldbm" >&5
12231 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12232 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12233   echo $ac_n "(cached) $ac_c" 1>&6
12234 else
12235   ac_save_LIBS="$LIBS"
12236 LIBS="-ldbm  $LIBS"
12237 cat > conftest.$ac_ext <<EOF
12238 #line 12239 "configure"
12239 #include "confdefs.h"
12240 /* Override any gcc2 internal prototype to avoid an error.  */
12241 /* We use char because int might match the return type of a gcc2
12242     builtin and then its argument prototype would still apply.  */
12243 char dbm_open();
12244
12245 int main() {
12246 dbm_open()
12247 ; return 0; }
12248 EOF
12249 if { (eval echo configure:12250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12250   rm -rf conftest*
12251   eval "ac_cv_lib_$ac_lib_var=yes"
12252 else
12253   echo "configure: failed program was:" >&5
12254   cat conftest.$ac_ext >&5
12255   rm -rf conftest*
12256   eval "ac_cv_lib_$ac_lib_var=no"
12257 fi
12258 rm -f conftest*
12259 LIBS="$ac_save_LIBS"
12260
12261 fi
12262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12263   echo "$ac_t""yes" 1>&6
12264   ol_cv_lib_ndbm=-ldbm
12265 else
12266   echo "$ac_t""no" 1>&6
12267 ol_cv_lib_ndbm=no
12268 fi
12269                 
12270 fi
12271
12272         
12273 fi
12274
12275         LIBS="$ol_LIBS"
12276
12277 fi
12278
12279 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12280
12281
12282  for ac_hdr in ndbm.h
12283 do
12284 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12285 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12286 echo "configure:12287: checking for $ac_hdr" >&5
12287 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12288   echo $ac_n "(cached) $ac_c" 1>&6
12289 else
12290   cat > conftest.$ac_ext <<EOF
12291 #line 12292 "configure"
12292 #include "confdefs.h"
12293 #include <$ac_hdr>
12294 EOF
12295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12296 { (eval echo configure:12297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12298 if test -z "$ac_err"; then
12299   rm -rf conftest*
12300   eval "ac_cv_header_$ac_safe=yes"
12301 else
12302   echo "$ac_err" >&5
12303   echo "configure: failed program was:" >&5
12304   cat conftest.$ac_ext >&5
12305   rm -rf conftest*
12306   eval "ac_cv_header_$ac_safe=no"
12307 fi
12308 rm -f conftest*
12309 fi
12310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12311   echo "$ac_t""yes" 1>&6
12312     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12313   cat >> confdefs.h <<EOF
12314 #define $ac_tr_hdr 1
12315 EOF
12316  
12317 else
12318   echo "$ac_t""no" 1>&6
12319 fi
12320 done
12321
12322  echo $ac_n "checking for db""... $ac_c" 1>&6
12323 echo "configure:12324: checking for db" >&5
12324 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12325   echo $ac_n "(cached) $ac_c" 1>&6
12326 else
12327   
12328         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12329                 ol_cv_ndbm=no
12330         else
12331                 ol_cv_ndbm=yes
12332         fi
12333
12334 fi
12335
12336 echo "$ac_t""$ol_cv_ndbm" 1>&6
12337  if test $ol_cv_ndbm = yes ; then
12338         cat >> confdefs.h <<\EOF
12339 #define HAVE_NDBM 1
12340 EOF
12341
12342  fi
12343
12344
12345         if test $ol_cv_ndbm = yes ; then
12346                 ol_link_ldbm=ndbm
12347                 ol_with_ldbm_api=ndbm
12348
12349                 if test $ol_cv_lib_ndbm != yes ; then
12350                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12351                 fi
12352         fi
12353 fi
12354
12355 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12356         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12357         if test $ol_enable_ldbm = yes ; then
12358                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12359         fi
12360
12361         echo "configure: warning: disabling LDBM" 1>&2
12362         ol_enable_ldbm=no
12363 fi
12364
12365 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12366         LINK_BINS_DYNAMIC="yes"
12367 else
12368         LINK_BINS_DYNAMIC="no"
12369 fi
12370
12371 if test $ol_enable_wrappers != no ; then
12372         for ac_hdr in tcpd.h
12373 do
12374 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12375 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12376 echo "configure:12377: checking for $ac_hdr" >&5
12377 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12378   echo $ac_n "(cached) $ac_c" 1>&6
12379 else
12380   cat > conftest.$ac_ext <<EOF
12381 #line 12382 "configure"
12382 #include "confdefs.h"
12383 #include <$ac_hdr>
12384 EOF
12385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12386 { (eval echo configure:12387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12388 if test -z "$ac_err"; then
12389   rm -rf conftest*
12390   eval "ac_cv_header_$ac_safe=yes"
12391 else
12392   echo "$ac_err" >&5
12393   echo "configure: failed program was:" >&5
12394   cat conftest.$ac_ext >&5
12395   rm -rf conftest*
12396   eval "ac_cv_header_$ac_safe=no"
12397 fi
12398 rm -f conftest*
12399 fi
12400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12401   echo "$ac_t""yes" 1>&6
12402     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12403   cat >> confdefs.h <<EOF
12404 #define $ac_tr_hdr 1
12405 EOF
12406  
12407 else
12408   echo "$ac_t""no" 1>&6
12409 fi
12410 done
12411
12412
12413         if test $ac_cv_header_tcpd_h != yes ; then
12414                 have_wrappers=no
12415         else
12416                 cat > conftest.$ac_ext <<EOF
12417 #line 12418 "configure"
12418 #include "confdefs.h"
12419
12420 int allow_severity = 0;
12421 int deny_severity  = 0;
12422                 
12423 int main() {
12424 hosts_access()
12425 ; return 0; }
12426 EOF
12427 if { (eval echo configure:12428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12428   rm -rf conftest*
12429   have_wrappers=yes
12430 else
12431   echo "configure: failed program was:" >&5
12432   cat conftest.$ac_ext >&5
12433   rm -rf conftest*
12434   have_wrappers=no
12435 fi
12436 rm -f conftest*
12437         fi
12438
12439         if test $have_wrappers = yes ; then
12440                 cat >> confdefs.h <<\EOF
12441 #define HAVE_TCPD 1
12442 EOF
12443
12444                 WRAP_LIBS="-lwrap"
12445
12446                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12447 echo "configure:12448: checking for main in -lnsl" >&5
12448 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12449 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12450   echo $ac_n "(cached) $ac_c" 1>&6
12451 else
12452   ac_save_LIBS="$LIBS"
12453 LIBS="-lnsl  $LIBS"
12454 cat > conftest.$ac_ext <<EOF
12455 #line 12456 "configure"
12456 #include "confdefs.h"
12457
12458 int main() {
12459 main()
12460 ; return 0; }
12461 EOF
12462 if { (eval echo configure:12463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12463   rm -rf conftest*
12464   eval "ac_cv_lib_$ac_lib_var=yes"
12465 else
12466   echo "configure: failed program was:" >&5
12467   cat conftest.$ac_ext >&5
12468   rm -rf conftest*
12469   eval "ac_cv_lib_$ac_lib_var=no"
12470 fi
12471 rm -f conftest*
12472 LIBS="$ac_save_LIBS"
12473
12474 fi
12475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12476   echo "$ac_t""yes" 1>&6
12477     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12478     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12479   cat >> confdefs.h <<EOF
12480 #define $ac_tr_lib 1
12481 EOF
12482
12483   LIBS="-lnsl $LIBS"
12484
12485 else
12486   echo "$ac_t""no" 1>&6
12487 fi
12488
12489         else
12490                 echo "configure: warning: could not find -lwrap" 1>&2
12491                 if test $ol_enable_wrappers = yes ; then
12492                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12493                 fi
12494
12495                 echo "configure: warning: disabling wrappers support" 1>&2
12496                 ol_enable_wrappers=no
12497                 WRAP_LIBS=""
12498         fi
12499 fi
12500
12501 if test $ol_enable_syslog != no ; then
12502         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12503 echo "configure:12504: checking for openlog" >&5
12504 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12505   echo $ac_n "(cached) $ac_c" 1>&6
12506 else
12507   cat > conftest.$ac_ext <<EOF
12508 #line 12509 "configure"
12509 #include "confdefs.h"
12510 /* System header to define __stub macros and hopefully few prototypes,
12511     which can conflict with char openlog(); below.  */
12512 #include <assert.h>
12513 /* Override any gcc2 internal prototype to avoid an error.  */
12514 /* We use char because int might match the return type of a gcc2
12515     builtin and then its argument prototype would still apply.  */
12516 char openlog();
12517 char (*f)();
12518
12519 int main() {
12520
12521 /* The GNU C library defines this for functions which it implements
12522     to always fail with ENOSYS.  Some functions are actually named
12523     something starting with __ and the normal name is an alias.  */
12524 #if defined (__stub_openlog) || defined (__stub___openlog)
12525 choke me
12526 #else
12527 f = openlog;
12528 #endif
12529
12530 ; return 0; }
12531 EOF
12532 if { (eval echo configure:12533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12533   rm -rf conftest*
12534   eval "ac_cv_func_openlog=yes"
12535 else
12536   echo "configure: failed program was:" >&5
12537   cat conftest.$ac_ext >&5
12538   rm -rf conftest*
12539   eval "ac_cv_func_openlog=no"
12540 fi
12541 rm -f conftest*
12542 fi
12543
12544 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12545   echo "$ac_t""yes" 1>&6
12546   :
12547 else
12548   echo "$ac_t""no" 1>&6
12549 fi
12550
12551         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12552                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12553         fi
12554         ol_enable_syslog=$ac_cv_func_openlog
12555 fi
12556
12557 if test $ol_enable_dmalloc != no ; then
12558         for ac_hdr in dmalloc.h
12559 do
12560 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12561 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12562 echo "configure:12563: checking for $ac_hdr" >&5
12563 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12564   echo $ac_n "(cached) $ac_c" 1>&6
12565 else
12566   cat > conftest.$ac_ext <<EOF
12567 #line 12568 "configure"
12568 #include "confdefs.h"
12569 #include <$ac_hdr>
12570 EOF
12571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12572 { (eval echo configure:12573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12574 if test -z "$ac_err"; then
12575   rm -rf conftest*
12576   eval "ac_cv_header_$ac_safe=yes"
12577 else
12578   echo "$ac_err" >&5
12579   echo "configure: failed program was:" >&5
12580   cat conftest.$ac_ext >&5
12581   rm -rf conftest*
12582   eval "ac_cv_header_$ac_safe=no"
12583 fi
12584 rm -f conftest*
12585 fi
12586 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12587   echo "$ac_t""yes" 1>&6
12588     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12589   cat >> confdefs.h <<EOF
12590 #define $ac_tr_hdr 1
12591 EOF
12592  
12593 else
12594   echo "$ac_t""no" 1>&6
12595 fi
12596 done
12597
12598         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12599 echo "configure:12600: checking for dmalloc_shutdown in -ldmalloc" >&5
12600 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12601 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12602   echo $ac_n "(cached) $ac_c" 1>&6
12603 else
12604   ac_save_LIBS="$LIBS"
12605 LIBS="-ldmalloc  $LIBS"
12606 cat > conftest.$ac_ext <<EOF
12607 #line 12608 "configure"
12608 #include "confdefs.h"
12609 /* Override any gcc2 internal prototype to avoid an error.  */
12610 /* We use char because int might match the return type of a gcc2
12611     builtin and then its argument prototype would still apply.  */
12612 char dmalloc_shutdown();
12613
12614 int main() {
12615 dmalloc_shutdown()
12616 ; return 0; }
12617 EOF
12618 if { (eval echo configure:12619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12619   rm -rf conftest*
12620   eval "ac_cv_lib_$ac_lib_var=yes"
12621 else
12622   echo "configure: failed program was:" >&5
12623   cat conftest.$ac_ext >&5
12624   rm -rf conftest*
12625   eval "ac_cv_lib_$ac_lib_var=no"
12626 fi
12627 rm -f conftest*
12628 LIBS="$ac_save_LIBS"
12629
12630 fi
12631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12632   echo "$ac_t""yes" 1>&6
12633     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12634     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12635   cat >> confdefs.h <<EOF
12636 #define $ac_tr_lib 1
12637 EOF
12638
12639   LIBS="-ldmalloc $LIBS"
12640
12641 else
12642   echo "$ac_t""no" 1>&6
12643 fi
12644
12645 fi
12646
12647 if test $ol_enable_tcl != no ; then
12648         for ac_hdr in tcl.h
12649 do
12650 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12651 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12652 echo "configure:12653: checking for $ac_hdr" >&5
12653 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12654   echo $ac_n "(cached) $ac_c" 1>&6
12655 else
12656   cat > conftest.$ac_ext <<EOF
12657 #line 12658 "configure"
12658 #include "confdefs.h"
12659 #include <$ac_hdr>
12660 EOF
12661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12662 { (eval echo configure:12663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12664 if test -z "$ac_err"; then
12665   rm -rf conftest*
12666   eval "ac_cv_header_$ac_safe=yes"
12667 else
12668   echo "$ac_err" >&5
12669   echo "configure: failed program was:" >&5
12670   cat conftest.$ac_ext >&5
12671   rm -rf conftest*
12672   eval "ac_cv_header_$ac_safe=no"
12673 fi
12674 rm -f conftest*
12675 fi
12676 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12677   echo "$ac_t""yes" 1>&6
12678     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12679   cat >> confdefs.h <<EOF
12680 #define $ac_tr_hdr 1
12681 EOF
12682  
12683 else
12684   echo "$ac_t""no" 1>&6
12685 fi
12686 done
12687
12688
12689         if test $ac_cv_header_tcl_h != yes ; then
12690                 have_tcl=no
12691         else
12692                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12693                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12694 echo "configure:12695: checking for main in -l$lib" >&5
12695 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12696 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12697   echo $ac_n "(cached) $ac_c" 1>&6
12698 else
12699   ac_save_LIBS="$LIBS"
12700 LIBS="-l$lib  $LIBS"
12701 cat > conftest.$ac_ext <<EOF
12702 #line 12703 "configure"
12703 #include "confdefs.h"
12704
12705 int main() {
12706 main()
12707 ; return 0; }
12708 EOF
12709 if { (eval echo configure:12710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12710   rm -rf conftest*
12711   eval "ac_cv_lib_$ac_lib_var=yes"
12712 else
12713   echo "configure: failed program was:" >&5
12714   cat conftest.$ac_ext >&5
12715   rm -rf conftest*
12716   eval "ac_cv_lib_$ac_lib_var=no"
12717 fi
12718 rm -f conftest*
12719 LIBS="$ac_save_LIBS"
12720
12721 fi
12722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12723   echo "$ac_t""yes" 1>&6
12724   have_tcl=yes
12725                            if test x"$ol_with_tcl_module" = "xstatic" ; then
12726                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12727                            else
12728                                MOD_TCL_LIB="-l${lib}"
12729                            fi;break
12730 else
12731   echo "$ac_t""no" 1>&6
12732 have_tcl=no
12733 fi
12734
12735                 done
12736         fi
12737
12738         if test $have_tcl != yes ; then
12739                 echo "configure: warning: could not find -ltcl" 1>&2
12740                 if test $ol_enable_tcl = yes ; then
12741                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12742                 fi
12743
12744                 ol_enable_tcl=no
12745         fi
12746 fi
12747
12748 ol_link_termcap=no
12749 for ac_hdr in termcap.h ncurses.h
12750 do
12751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12753 echo "configure:12754: checking for $ac_hdr" >&5
12754 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12755   echo $ac_n "(cached) $ac_c" 1>&6
12756 else
12757   cat > conftest.$ac_ext <<EOF
12758 #line 12759 "configure"
12759 #include "confdefs.h"
12760 #include <$ac_hdr>
12761 EOF
12762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12763 { (eval echo configure:12764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12765 if test -z "$ac_err"; then
12766   rm -rf conftest*
12767   eval "ac_cv_header_$ac_safe=yes"
12768 else
12769   echo "$ac_err" >&5
12770   echo "configure: failed program was:" >&5
12771   cat conftest.$ac_ext >&5
12772   rm -rf conftest*
12773   eval "ac_cv_header_$ac_safe=no"
12774 fi
12775 rm -f conftest*
12776 fi
12777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12778   echo "$ac_t""yes" 1>&6
12779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12780   cat >> confdefs.h <<EOF
12781 #define $ac_tr_hdr 1
12782 EOF
12783  
12784 else
12785   echo "$ac_t""no" 1>&6
12786 fi
12787 done
12788
12789
12790 if test $ol_link_termcap = no ; then
12791         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12792 echo "configure:12793: checking for tputs in -ltermcap" >&5
12793 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12795   echo $ac_n "(cached) $ac_c" 1>&6
12796 else
12797   ac_save_LIBS="$LIBS"
12798 LIBS="-ltermcap  $LIBS"
12799 cat > conftest.$ac_ext <<EOF
12800 #line 12801 "configure"
12801 #include "confdefs.h"
12802 /* Override any gcc2 internal prototype to avoid an error.  */
12803 /* We use char because int might match the return type of a gcc2
12804     builtin and then its argument prototype would still apply.  */
12805 char tputs();
12806
12807 int main() {
12808 tputs()
12809 ; return 0; }
12810 EOF
12811 if { (eval echo configure:12812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12812   rm -rf conftest*
12813   eval "ac_cv_lib_$ac_lib_var=yes"
12814 else
12815   echo "configure: failed program was:" >&5
12816   cat conftest.$ac_ext >&5
12817   rm -rf conftest*
12818   eval "ac_cv_lib_$ac_lib_var=no"
12819 fi
12820 rm -f conftest*
12821 LIBS="$ac_save_LIBS"
12822
12823 fi
12824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12825   echo "$ac_t""yes" 1>&6
12826   have_termcap=yes
12827 else
12828   echo "$ac_t""no" 1>&6
12829 have_termcap=no
12830 fi
12831
12832         if test $have_termcap = yes ; then
12833                 cat >> confdefs.h <<\EOF
12834 #define HAVE_TERMCAP 1
12835 EOF
12836
12837                 ol_link_termcap=yes
12838                 TERMCAP_LIBS=-ltermcap
12839         fi
12840 fi
12841
12842 if test $ol_link_termcap = no ; then
12843         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12844 echo "configure:12845: checking for initscr in -lncurses" >&5
12845 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12846 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12847   echo $ac_n "(cached) $ac_c" 1>&6
12848 else
12849   ac_save_LIBS="$LIBS"
12850 LIBS="-lncurses  $LIBS"
12851 cat > conftest.$ac_ext <<EOF
12852 #line 12853 "configure"
12853 #include "confdefs.h"
12854 /* Override any gcc2 internal prototype to avoid an error.  */
12855 /* We use char because int might match the return type of a gcc2
12856     builtin and then its argument prototype would still apply.  */
12857 char initscr();
12858
12859 int main() {
12860 initscr()
12861 ; return 0; }
12862 EOF
12863 if { (eval echo configure:12864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12864   rm -rf conftest*
12865   eval "ac_cv_lib_$ac_lib_var=yes"
12866 else
12867   echo "configure: failed program was:" >&5
12868   cat conftest.$ac_ext >&5
12869   rm -rf conftest*
12870   eval "ac_cv_lib_$ac_lib_var=no"
12871 fi
12872 rm -f conftest*
12873 LIBS="$ac_save_LIBS"
12874
12875 fi
12876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12877   echo "$ac_t""yes" 1>&6
12878   have_ncurses=yes
12879 else
12880   echo "$ac_t""no" 1>&6
12881 have_ncurses=no
12882 fi
12883
12884         if test $have_ncurses = yes ; then
12885                 cat >> confdefs.h <<\EOF
12886 #define HAVE_NCURSES 1
12887 EOF
12888
12889                 ol_link_termcap=yes
12890                 TERMCAP_LIBS=-lncurses
12891         fi
12892 fi
12893
12894 if test $ol_link_termcap = no ; then
12895         cat >> confdefs.h <<\EOF
12896 #define NO_TERMCAP 1
12897 EOF
12898
12899         TERMCAP_LIBS=
12900 fi
12901
12902 ol_link_sasl=no
12903 if test $ol_with_cyrus_sasl != no ; then
12904         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12905 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12906 echo "configure:12907: checking for sasl.h" >&5
12907 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12908   echo $ac_n "(cached) $ac_c" 1>&6
12909 else
12910   cat > conftest.$ac_ext <<EOF
12911 #line 12912 "configure"
12912 #include "confdefs.h"
12913 #include <sasl.h>
12914 EOF
12915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12916 { (eval echo configure:12917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12918 if test -z "$ac_err"; then
12919   rm -rf conftest*
12920   eval "ac_cv_header_$ac_safe=yes"
12921 else
12922   echo "$ac_err" >&5
12923   echo "configure: failed program was:" >&5
12924   cat conftest.$ac_ext >&5
12925   rm -rf conftest*
12926   eval "ac_cv_header_$ac_safe=no"
12927 fi
12928 rm -f conftest*
12929 fi
12930 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12931   echo "$ac_t""yes" 1>&6
12932   :
12933 else
12934   echo "$ac_t""no" 1>&6
12935 fi
12936
12937
12938         if test $ac_cv_header_sasl_h = yes ; then
12939                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12940 echo "configure:12941: checking for sasl_client_init in -lsasl" >&5
12941 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12942 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12943   echo $ac_n "(cached) $ac_c" 1>&6
12944 else
12945   ac_save_LIBS="$LIBS"
12946 LIBS="-lsasl  $LIBS"
12947 cat > conftest.$ac_ext <<EOF
12948 #line 12949 "configure"
12949 #include "confdefs.h"
12950 /* Override any gcc2 internal prototype to avoid an error.  */
12951 /* We use char because int might match the return type of a gcc2
12952     builtin and then its argument prototype would still apply.  */
12953 char sasl_client_init();
12954
12955 int main() {
12956 sasl_client_init()
12957 ; return 0; }
12958 EOF
12959 if { (eval echo configure:12960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12960   rm -rf conftest*
12961   eval "ac_cv_lib_$ac_lib_var=yes"
12962 else
12963   echo "configure: failed program was:" >&5
12964   cat conftest.$ac_ext >&5
12965   rm -rf conftest*
12966   eval "ac_cv_lib_$ac_lib_var=no"
12967 fi
12968 rm -f conftest*
12969 LIBS="$ac_save_LIBS"
12970
12971 fi
12972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12973   echo "$ac_t""yes" 1>&6
12974   have_cyrus_sasl=yes
12975 else
12976   echo "$ac_t""no" 1>&6
12977 have_cyrus_sasl=no
12978 fi
12979
12980
12981                 if test $have_cyrus_sasl != no ; then
12982                         SASL_LIBS="-lsasl"
12983                         cat >> confdefs.h <<\EOF
12984 #define HAVE_CYRUS_SASL 1
12985 EOF
12986
12987                         ol_link_sasl=yes
12988                 fi
12989         fi
12990
12991         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12992                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12993         fi
12994 fi
12995
12996 if test $cross_compiling != yes ; then
12997         dev=no
12998         if test -r /dev/urandom ; then
12999                 dev="/dev/urandom";
13000         elif test -r /idev/urandom ; then
13001                 dev="/idev/urandom";
13002         elif test -r /dev/srandom ; then
13003                 dev="/dev/srandom";
13004         elif test -r /dev/random ; then
13005                 dev="/dev/random";
13006         elif test -r /idev/random ; then
13007                 dev="/idev/random";
13008         fi
13009
13010         if test $dev != no ; then
13011                 cat >> confdefs.h <<EOF
13012 #define URANDOM_DEVICE "$dev"
13013 EOF
13014
13015         fi
13016 fi
13017
13018 ol_link_fetch=no
13019 if test $ol_with_fetch != no ; then
13020         ol=$LIBS
13021 LIBS="-lfetch -lcom_err $LIBS"
13022 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13023 echo "configure:13024: checking fetch(3) library" >&5
13024 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13025   echo $ac_n "(cached) $ac_c" 1>&6
13026 else
13027   
13028         cat > conftest.$ac_ext <<EOF
13029 #line 13030 "configure"
13030 #include "confdefs.h"
13031
13032 #include <sys/param.h>
13033 #include <stdio.h>
13034 #include <fetch.h>
13035 int main() {
13036 struct url *u = fetchParseURL("file:///"); 
13037 ; return 0; }
13038 EOF
13039 if { (eval echo configure:13040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13040   rm -rf conftest*
13041   ol_cv_lib_fetch=yes
13042 else
13043   echo "configure: failed program was:" >&5
13044   cat conftest.$ac_ext >&5
13045   rm -rf conftest*
13046   ol_cv_lib_fetch=no
13047 fi
13048 rm -f conftest*
13049 fi
13050
13051 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13052 LIBS=$ol_LIBS
13053 if test $ol_cv_lib_fetch != no ; then
13054         ol_link_fetch="-lfetch -lcom_err"
13055         cat >> confdefs.h <<\EOF
13056 #define HAVE_FETCH 1
13057 EOF
13058
13059 fi
13060
13061
13062         if test $ol_cv_lib_fetch != no ; then
13063                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13064                 ol_link_fetch=freebsd
13065
13066         elif test $ol_with_fetch != auto ; then
13067                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13068         fi 
13069 fi
13070
13071 ol_link_readline=no
13072 if test $ol_with_readline != no ; then
13073         for ac_hdr in readline/readline.h readline/history.h
13074 do
13075 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13076 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13077 echo "configure:13078: checking for $ac_hdr" >&5
13078 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13079   echo $ac_n "(cached) $ac_c" 1>&6
13080 else
13081   cat > conftest.$ac_ext <<EOF
13082 #line 13083 "configure"
13083 #include "confdefs.h"
13084 #include <$ac_hdr>
13085 EOF
13086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13087 { (eval echo configure:13088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13089 if test -z "$ac_err"; then
13090   rm -rf conftest*
13091   eval "ac_cv_header_$ac_safe=yes"
13092 else
13093   echo "$ac_err" >&5
13094   echo "configure: failed program was:" >&5
13095   cat conftest.$ac_ext >&5
13096   rm -rf conftest*
13097   eval "ac_cv_header_$ac_safe=no"
13098 fi
13099 rm -f conftest*
13100 fi
13101 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13102   echo "$ac_t""yes" 1>&6
13103     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13104   cat >> confdefs.h <<EOF
13105 #define $ac_tr_hdr 1
13106 EOF
13107  
13108 else
13109   echo "$ac_t""no" 1>&6
13110 fi
13111 done
13112
13113
13114         if test $ac_cv_header_readline_readline_h = yes ; then
13115                 save_LIBS="$LIBS"
13116                 LIBS="$TERMCAP_LIBS $LIBS"
13117                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13118 echo "configure:13119: checking for readline in -lreadline" >&5
13119 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13120 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13121   echo $ac_n "(cached) $ac_c" 1>&6
13122 else
13123   ac_save_LIBS="$LIBS"
13124 LIBS="-lreadline  $LIBS"
13125 cat > conftest.$ac_ext <<EOF
13126 #line 13127 "configure"
13127 #include "confdefs.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 readline();
13132
13133 int main() {
13134 readline()
13135 ; return 0; }
13136 EOF
13137 if { (eval echo configure:13138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13138   rm -rf conftest*
13139   eval "ac_cv_lib_$ac_lib_var=yes"
13140 else
13141   echo "configure: failed program was:" >&5
13142   cat conftest.$ac_ext >&5
13143   rm -rf conftest*
13144   eval "ac_cv_lib_$ac_lib_var=no"
13145 fi
13146 rm -f conftest*
13147 LIBS="$ac_save_LIBS"
13148
13149 fi
13150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13151   echo "$ac_t""yes" 1>&6
13152   have_readline=yes
13153 else
13154   echo "$ac_t""no" 1>&6
13155 have_readline=no
13156 fi
13157
13158                 LIBS="$save_LIBS"
13159                         
13160                 if test $have_readline = yes ; then
13161                         ol_with_readline=found
13162                         ol_link_readline=yes
13163
13164                         READLINE_LIBS="-lreadline"
13165                 fi
13166         fi
13167 fi
13168
13169 if test $ol_link_readline = yes ; then
13170         cat >> confdefs.h <<\EOF
13171 #define HAVE_READLINE 1
13172 EOF
13173
13174 fi
13175
13176
13177 if test $ol_enable_crypt != no ; then
13178         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13179 echo "configure:13180: checking for crypt" >&5
13180 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13181   echo $ac_n "(cached) $ac_c" 1>&6
13182 else
13183   cat > conftest.$ac_ext <<EOF
13184 #line 13185 "configure"
13185 #include "confdefs.h"
13186 /* System header to define __stub macros and hopefully few prototypes,
13187     which can conflict with char crypt(); below.  */
13188 #include <assert.h>
13189 /* Override any gcc2 internal prototype to avoid an error.  */
13190 /* We use char because int might match the return type of a gcc2
13191     builtin and then its argument prototype would still apply.  */
13192 char crypt();
13193 char (*f)();
13194
13195 int main() {
13196
13197 /* The GNU C library defines this for functions which it implements
13198     to always fail with ENOSYS.  Some functions are actually named
13199     something starting with __ and the normal name is an alias.  */
13200 #if defined (__stub_crypt) || defined (__stub___crypt)
13201 choke me
13202 #else
13203 f = crypt;
13204 #endif
13205
13206 ; return 0; }
13207 EOF
13208 if { (eval echo configure:13209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13209   rm -rf conftest*
13210   eval "ac_cv_func_crypt=yes"
13211 else
13212   echo "configure: failed program was:" >&5
13213   cat conftest.$ac_ext >&5
13214   rm -rf conftest*
13215   eval "ac_cv_func_crypt=no"
13216 fi
13217 rm -f conftest*
13218 fi
13219
13220 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13221   echo "$ac_t""yes" 1>&6
13222   have_crypt=yes
13223 else
13224   echo "$ac_t""no" 1>&6
13225
13226                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13227 echo "configure:13228: checking for crypt in -lcrypt" >&5
13228 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13229 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13230   echo $ac_n "(cached) $ac_c" 1>&6
13231 else
13232   ac_save_LIBS="$LIBS"
13233 LIBS="-lcrypt  $LIBS"
13234 cat > conftest.$ac_ext <<EOF
13235 #line 13236 "configure"
13236 #include "confdefs.h"
13237 /* Override any gcc2 internal prototype to avoid an error.  */
13238 /* We use char because int might match the return type of a gcc2
13239     builtin and then its argument prototype would still apply.  */
13240 char crypt();
13241
13242 int main() {
13243 crypt()
13244 ; return 0; }
13245 EOF
13246 if { (eval echo configure:13247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13247   rm -rf conftest*
13248   eval "ac_cv_lib_$ac_lib_var=yes"
13249 else
13250   echo "configure: failed program was:" >&5
13251   cat conftest.$ac_ext >&5
13252   rm -rf conftest*
13253   eval "ac_cv_lib_$ac_lib_var=no"
13254 fi
13255 rm -f conftest*
13256 LIBS="$ac_save_LIBS"
13257
13258 fi
13259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13260   echo "$ac_t""yes" 1>&6
13261   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13262                         have_crypt=yes
13263 else
13264   echo "$ac_t""no" 1>&6
13265 have_crypt=no
13266 fi
13267
13268 fi
13269
13270
13271         if test $have_crypt = yes ; then
13272                 cat >> confdefs.h <<\EOF
13273 #define HAVE_CRYPT 1
13274 EOF
13275
13276         else
13277                 echo "configure: warning: could not find crypt" 1>&2
13278                 if test $ol_enable_crypt = yes ; then
13279                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13280                 fi
13281
13282                 echo "configure: warning: disabling crypt support" 1>&2
13283                 ol_enable_crypt=no
13284         fi
13285 fi
13286
13287 if test $ol_enable_proctitle != no ; then
13288         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13289 echo "configure:13290: checking for setproctitle" >&5
13290 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13291   echo $ac_n "(cached) $ac_c" 1>&6
13292 else
13293   cat > conftest.$ac_ext <<EOF
13294 #line 13295 "configure"
13295 #include "confdefs.h"
13296 /* System header to define __stub macros and hopefully few prototypes,
13297     which can conflict with char setproctitle(); below.  */
13298 #include <assert.h>
13299 /* Override any gcc2 internal prototype to avoid an error.  */
13300 /* We use char because int might match the return type of a gcc2
13301     builtin and then its argument prototype would still apply.  */
13302 char setproctitle();
13303 char (*f)();
13304
13305 int main() {
13306
13307 /* The GNU C library defines this for functions which it implements
13308     to always fail with ENOSYS.  Some functions are actually named
13309     something starting with __ and the normal name is an alias.  */
13310 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13311 choke me
13312 #else
13313 f = setproctitle;
13314 #endif
13315
13316 ; return 0; }
13317 EOF
13318 if { (eval echo configure:13319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13319   rm -rf conftest*
13320   eval "ac_cv_func_setproctitle=yes"
13321 else
13322   echo "configure: failed program was:" >&5
13323   cat conftest.$ac_ext >&5
13324   rm -rf conftest*
13325   eval "ac_cv_func_setproctitle=no"
13326 fi
13327 rm -f conftest*
13328 fi
13329
13330 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13331   echo "$ac_t""yes" 1>&6
13332   have_setproctitle=yes
13333 else
13334   echo "$ac_t""no" 1>&6
13335
13336                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13337 echo "configure:13338: checking for setproctitle in -lutil" >&5
13338 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13339 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13340   echo $ac_n "(cached) $ac_c" 1>&6
13341 else
13342   ac_save_LIBS="$LIBS"
13343 LIBS="-lutil  $LIBS"
13344 cat > conftest.$ac_ext <<EOF
13345 #line 13346 "configure"
13346 #include "confdefs.h"
13347 /* Override any gcc2 internal prototype to avoid an error.  */
13348 /* We use char because int might match the return type of a gcc2
13349     builtin and then its argument prototype would still apply.  */
13350 char setproctitle();
13351
13352 int main() {
13353 setproctitle()
13354 ; return 0; }
13355 EOF
13356 if { (eval echo configure:13357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13357   rm -rf conftest*
13358   eval "ac_cv_lib_$ac_lib_var=yes"
13359 else
13360   echo "configure: failed program was:" >&5
13361   cat conftest.$ac_ext >&5
13362   rm -rf conftest*
13363   eval "ac_cv_lib_$ac_lib_var=no"
13364 fi
13365 rm -f conftest*
13366 LIBS="$ac_save_LIBS"
13367
13368 fi
13369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13370   echo "$ac_t""yes" 1>&6
13371   have_setproctitle=yes
13372                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13373 else
13374   echo "$ac_t""no" 1>&6
13375 have_setproctitle=no
13376                         LIBOBJS="$LIBOBJS setproctitle.o"
13377                         LIBSRCS="$LIBSRCS setproctitle.c"
13378 fi
13379
13380 fi
13381
13382
13383         if test $have_setproctitle = yes ; then
13384                 cat >> confdefs.h <<\EOF
13385 #define HAVE_SETPROCTITLE 1
13386 EOF
13387
13388         fi
13389 fi
13390
13391 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13392 echo "configure:13393: checking for ANSI C header files" >&5
13393 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13394   echo $ac_n "(cached) $ac_c" 1>&6
13395 else
13396   cat > conftest.$ac_ext <<EOF
13397 #line 13398 "configure"
13398 #include "confdefs.h"
13399 #include <stdlib.h>
13400 #include <stdarg.h>
13401 #include <string.h>
13402 #include <float.h>
13403 EOF
13404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13405 { (eval echo configure:13406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13407 if test -z "$ac_err"; then
13408   rm -rf conftest*
13409   ac_cv_header_stdc=yes
13410 else
13411   echo "$ac_err" >&5
13412   echo "configure: failed program was:" >&5
13413   cat conftest.$ac_ext >&5
13414   rm -rf conftest*
13415   ac_cv_header_stdc=no
13416 fi
13417 rm -f conftest*
13418
13419 if test $ac_cv_header_stdc = yes; then
13420   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13421 cat > conftest.$ac_ext <<EOF
13422 #line 13423 "configure"
13423 #include "confdefs.h"
13424 #include <string.h>
13425 EOF
13426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13427   egrep "memchr" >/dev/null 2>&1; then
13428   :
13429 else
13430   rm -rf conftest*
13431   ac_cv_header_stdc=no
13432 fi
13433 rm -f conftest*
13434
13435 fi
13436
13437 if test $ac_cv_header_stdc = yes; then
13438   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13439 cat > conftest.$ac_ext <<EOF
13440 #line 13441 "configure"
13441 #include "confdefs.h"
13442 #include <stdlib.h>
13443 EOF
13444 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13445   egrep "free" >/dev/null 2>&1; then
13446   :
13447 else
13448   rm -rf conftest*
13449   ac_cv_header_stdc=no
13450 fi
13451 rm -f conftest*
13452
13453 fi
13454
13455 if test $ac_cv_header_stdc = yes; then
13456   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13457 if test "$cross_compiling" = yes; then
13458   :
13459 else
13460   cat > conftest.$ac_ext <<EOF
13461 #line 13462 "configure"
13462 #include "confdefs.h"
13463 #include <ctype.h>
13464 #if ((' ' & 0x0FF) == 0x020)
13465 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13466 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13467 #else
13468 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13469  || ('j' <= (c) && (c) <= 'r') \
13470  || ('s' <= (c) && (c) <= 'z'))
13471 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13472 #endif
13473 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13474 int main () { int i; for (i = 0; i < 256; i++)
13475 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13476 exit (0); }
13477
13478 EOF
13479 if { (eval echo configure:13480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13480 then
13481   :
13482 else
13483   echo "configure: failed program was:" >&5
13484   cat conftest.$ac_ext >&5
13485   rm -fr conftest*
13486   ac_cv_header_stdc=no
13487 fi
13488 rm -fr conftest*
13489 fi
13490
13491 fi
13492 fi
13493
13494 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13495 if test $ac_cv_header_stdc = yes; then
13496   cat >> confdefs.h <<\EOF
13497 #define STDC_HEADERS 1
13498 EOF
13499
13500 fi
13501
13502 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13503 echo "configure:13504: checking for mode_t" >&5
13504 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13505   echo $ac_n "(cached) $ac_c" 1>&6
13506 else
13507   cat > conftest.$ac_ext <<EOF
13508 #line 13509 "configure"
13509 #include "confdefs.h"
13510 #include <sys/types.h>
13511 #if STDC_HEADERS
13512 #include <stdlib.h>
13513 #include <stddef.h>
13514 #endif
13515
13516 EOF
13517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13518   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13519   rm -rf conftest*
13520   eval "ac_cv_type_mode_t=yes"
13521 else
13522   rm -rf conftest*
13523   eval "ac_cv_type_mode_t=no"
13524 fi
13525 rm -f conftest*
13526
13527 fi
13528 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13529   echo "$ac_t""yes" 1>&6
13530 else
13531   echo "$ac_t""no" 1>&6
13532   cat >> confdefs.h <<EOF
13533 #define mode_t int
13534 EOF
13535
13536 fi
13537
13538 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13539 echo "configure:13540: checking for off_t" >&5
13540 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13541   echo $ac_n "(cached) $ac_c" 1>&6
13542 else
13543   cat > conftest.$ac_ext <<EOF
13544 #line 13545 "configure"
13545 #include "confdefs.h"
13546 #include <sys/types.h>
13547 #if STDC_HEADERS
13548 #include <stdlib.h>
13549 #include <stddef.h>
13550 #endif
13551
13552 EOF
13553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13554   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13555   rm -rf conftest*
13556   eval "ac_cv_type_off_t=yes"
13557 else
13558   rm -rf conftest*
13559   eval "ac_cv_type_off_t=no"
13560 fi
13561 rm -f conftest*
13562
13563 fi
13564 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13565   echo "$ac_t""yes" 1>&6
13566 else
13567   echo "$ac_t""no" 1>&6
13568   cat >> confdefs.h <<EOF
13569 #define off_t long
13570 EOF
13571
13572 fi
13573
13574 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13575 echo "configure:13576: checking for pid_t" >&5
13576 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13577   echo $ac_n "(cached) $ac_c" 1>&6
13578 else
13579   cat > conftest.$ac_ext <<EOF
13580 #line 13581 "configure"
13581 #include "confdefs.h"
13582 #include <sys/types.h>
13583 #if STDC_HEADERS
13584 #include <stdlib.h>
13585 #include <stddef.h>
13586 #endif
13587
13588 EOF
13589 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13590   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13591   rm -rf conftest*
13592   eval "ac_cv_type_pid_t=yes"
13593 else
13594   rm -rf conftest*
13595   eval "ac_cv_type_pid_t=no"
13596 fi
13597 rm -f conftest*
13598
13599 fi
13600 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13601   echo "$ac_t""yes" 1>&6
13602 else
13603   echo "$ac_t""no" 1>&6
13604   cat >> confdefs.h <<EOF
13605 #define pid_t int
13606 EOF
13607
13608 fi
13609
13610 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13611 echo "configure:13612: checking for ptrdiff_t" >&5
13612 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13613   echo $ac_n "(cached) $ac_c" 1>&6
13614 else
13615   cat > conftest.$ac_ext <<EOF
13616 #line 13617 "configure"
13617 #include "confdefs.h"
13618 #include <stddef.h>
13619 int main() {
13620 ptrdiff_t p
13621 ; return 0; }
13622 EOF
13623 if { (eval echo configure:13624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13624   rm -rf conftest*
13625   am_cv_type_ptrdiff_t=yes
13626 else
13627   echo "configure: failed program was:" >&5
13628   cat conftest.$ac_ext >&5
13629   rm -rf conftest*
13630   am_cv_type_ptrdiff_t=no
13631 fi
13632 rm -f conftest*
13633 fi
13634
13635 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13636    if test $am_cv_type_ptrdiff_t = yes; then
13637      cat >> confdefs.h <<\EOF
13638 #define HAVE_PTRDIFF_T 1
13639 EOF
13640
13641    fi
13642
13643 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13644 echo "configure:13645: checking return type of signal handlers" >&5
13645 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13646   echo $ac_n "(cached) $ac_c" 1>&6
13647 else
13648   cat > conftest.$ac_ext <<EOF
13649 #line 13650 "configure"
13650 #include "confdefs.h"
13651 #include <sys/types.h>
13652 #include <signal.h>
13653 #ifdef signal
13654 #undef signal
13655 #endif
13656 #ifdef __cplusplus
13657 extern "C" void (*signal (int, void (*)(int)))(int);
13658 #else
13659 void (*signal ()) ();
13660 #endif
13661
13662 int main() {
13663 int i;
13664 ; return 0; }
13665 EOF
13666 if { (eval echo configure:13667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13667   rm -rf conftest*
13668   ac_cv_type_signal=void
13669 else
13670   echo "configure: failed program was:" >&5
13671   cat conftest.$ac_ext >&5
13672   rm -rf conftest*
13673   ac_cv_type_signal=int
13674 fi
13675 rm -f conftest*
13676 fi
13677
13678 echo "$ac_t""$ac_cv_type_signal" 1>&6
13679 cat >> confdefs.h <<EOF
13680 #define RETSIGTYPE $ac_cv_type_signal
13681 EOF
13682
13683
13684 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13685 echo "configure:13686: checking for size_t" >&5
13686 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13687   echo $ac_n "(cached) $ac_c" 1>&6
13688 else
13689   cat > conftest.$ac_ext <<EOF
13690 #line 13691 "configure"
13691 #include "confdefs.h"
13692 #include <sys/types.h>
13693 #if STDC_HEADERS
13694 #include <stdlib.h>
13695 #include <stddef.h>
13696 #endif
13697
13698 EOF
13699 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13700   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13701   rm -rf conftest*
13702   eval "ac_cv_type_size_t=yes"
13703 else
13704   rm -rf conftest*
13705   eval "ac_cv_type_size_t=no"
13706 fi
13707 rm -f conftest*
13708
13709 fi
13710 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13711   echo "$ac_t""yes" 1>&6
13712 else
13713   echo "$ac_t""no" 1>&6
13714   cat >> confdefs.h <<EOF
13715 #define size_t unsigned
13716 EOF
13717
13718 fi
13719
13720
13721 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13722 echo "configure:13723: checking for ssize_t" >&5
13723 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13724   echo $ac_n "(cached) $ac_c" 1>&6
13725 else
13726   cat > conftest.$ac_ext <<EOF
13727 #line 13728 "configure"
13728 #include "confdefs.h"
13729 #include <sys/types.h>
13730 #if STDC_HEADERS
13731 #include <stdlib.h>
13732 #include <stddef.h>
13733 #endif
13734
13735 EOF
13736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13737   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13738   rm -rf conftest*
13739   eval "ac_cv_type_ssize_t=yes"
13740 else
13741   rm -rf conftest*
13742   eval "ac_cv_type_ssize_t=no"
13743 fi
13744 rm -f conftest*
13745
13746 fi
13747 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13748   echo "$ac_t""yes" 1>&6
13749 else
13750   echo "$ac_t""no" 1>&6
13751   cat >> confdefs.h <<EOF
13752 #define ssize_t signed int
13753 EOF
13754
13755 fi
13756
13757 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13758 echo "configure:13759: checking for caddr_t" >&5
13759 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13760   echo $ac_n "(cached) $ac_c" 1>&6
13761 else
13762   cat > conftest.$ac_ext <<EOF
13763 #line 13764 "configure"
13764 #include "confdefs.h"
13765 #include <sys/types.h>
13766 #if STDC_HEADERS
13767 #include <stdlib.h>
13768 #include <stddef.h>
13769 #endif
13770
13771 EOF
13772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13773   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13774   rm -rf conftest*
13775   eval "ac_cv_type_caddr_t=yes"
13776 else
13777   rm -rf conftest*
13778   eval "ac_cv_type_caddr_t=no"
13779 fi
13780 rm -f conftest*
13781
13782 fi
13783 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13784   echo "$ac_t""yes" 1>&6
13785 else
13786   echo "$ac_t""no" 1>&6
13787   cat >> confdefs.h <<EOF
13788 #define caddr_t char *
13789 EOF
13790
13791 fi
13792
13793
13794 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13795 echo "configure:13796: checking for socklen_t" >&5
13796 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13797   echo $ac_n "(cached) $ac_c" 1>&6
13798 else
13799   cat > conftest.$ac_ext <<EOF
13800 #line 13801 "configure"
13801 #include "confdefs.h"
13802
13803 #ifdef HAVE_SYS_TYPES_H
13804 #include <sys/types.h>
13805 #endif
13806 #ifdef HAVE_SYS_SOCKET_H
13807 #include <sys/socket.h>
13808 #endif
13809
13810 int main() {
13811 socklen_t len;
13812 ; return 0; }
13813 EOF
13814 if { (eval echo configure:13815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13815   rm -rf conftest*
13816   ol_cv_type_socklen_t=yes
13817 else
13818   echo "configure: failed program was:" >&5
13819   cat conftest.$ac_ext >&5
13820   rm -rf conftest*
13821   ol_cv_type_socklen_t=no
13822 fi
13823 rm -f conftest*
13824 fi
13825
13826 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13827   if test $ol_cv_type_socklen_t = no; then
13828     cat >> confdefs.h <<\EOF
13829 #define socklen_t int
13830 EOF
13831
13832   fi
13833  
13834 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13835 echo "configure:13836: checking for member st_blksize in aggregate type struct stat" >&5
13836 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13837   echo $ac_n "(cached) $ac_c" 1>&6
13838 else
13839   cat > conftest.$ac_ext <<EOF
13840 #line 13841 "configure"
13841 #include "confdefs.h"
13842 #include <sys/types.h>
13843 #include <sys/stat.h>
13844 int main() {
13845 struct stat foo; foo.st_blksize;
13846 ; return 0; }
13847 EOF
13848 if { (eval echo configure:13849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13849   rm -rf conftest*
13850   ac_cv_c_struct_member_st_blksize=yes
13851 else
13852   echo "configure: failed program was:" >&5
13853   cat conftest.$ac_ext >&5
13854   rm -rf conftest*
13855   ac_cv_c_struct_member_st_blksize=no
13856 fi
13857 rm -f conftest*
13858 fi
13859
13860 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13861 st_blksize="$ac_cv_c_struct_member_st_blksize"
13862 if test $ac_cv_c_struct_member_st_blksize = yes; then
13863   cat >> confdefs.h <<\EOF
13864 #define HAVE_ST_BLKSIZE 1
13865 EOF
13866
13867 fi
13868
13869 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13870 echo "configure:13871: checking whether time.h and sys/time.h may both be included" >&5
13871 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13872   echo $ac_n "(cached) $ac_c" 1>&6
13873 else
13874   cat > conftest.$ac_ext <<EOF
13875 #line 13876 "configure"
13876 #include "confdefs.h"
13877 #include <sys/types.h>
13878 #include <sys/time.h>
13879 #include <time.h>
13880 int main() {
13881 struct tm *tp;
13882 ; return 0; }
13883 EOF
13884 if { (eval echo configure:13885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13885   rm -rf conftest*
13886   ac_cv_header_time=yes
13887 else
13888   echo "configure: failed program was:" >&5
13889   cat conftest.$ac_ext >&5
13890   rm -rf conftest*
13891   ac_cv_header_time=no
13892 fi
13893 rm -f conftest*
13894 fi
13895
13896 echo "$ac_t""$ac_cv_header_time" 1>&6
13897 if test $ac_cv_header_time = yes; then
13898   cat >> confdefs.h <<\EOF
13899 #define TIME_WITH_SYS_TIME 1
13900 EOF
13901
13902 fi
13903
13904 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13905 echo "configure:13906: checking whether struct tm is in sys/time.h or time.h" >&5
13906 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13907   echo $ac_n "(cached) $ac_c" 1>&6
13908 else
13909   cat > conftest.$ac_ext <<EOF
13910 #line 13911 "configure"
13911 #include "confdefs.h"
13912 #include <sys/types.h>
13913 #include <time.h>
13914 int main() {
13915 struct tm *tp; tp->tm_sec;
13916 ; return 0; }
13917 EOF
13918 if { (eval echo configure:13919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13919   rm -rf conftest*
13920   ac_cv_struct_tm=time.h
13921 else
13922   echo "configure: failed program was:" >&5
13923   cat conftest.$ac_ext >&5
13924   rm -rf conftest*
13925   ac_cv_struct_tm=sys/time.h
13926 fi
13927 rm -f conftest*
13928 fi
13929
13930 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13931 if test $ac_cv_struct_tm = sys/time.h; then
13932   cat >> confdefs.h <<\EOF
13933 #define TM_IN_SYS_TIME 1
13934 EOF
13935
13936 fi
13937
13938 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13939 echo "configure:13940: checking for uid_t in sys/types.h" >&5
13940 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13941   echo $ac_n "(cached) $ac_c" 1>&6
13942 else
13943   cat > conftest.$ac_ext <<EOF
13944 #line 13945 "configure"
13945 #include "confdefs.h"
13946 #include <sys/types.h>
13947 EOF
13948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13949   egrep "uid_t" >/dev/null 2>&1; then
13950   rm -rf conftest*
13951   ac_cv_type_uid_t=yes
13952 else
13953   rm -rf conftest*
13954   ac_cv_type_uid_t=no
13955 fi
13956 rm -f conftest*
13957
13958 fi
13959
13960 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13961 if test $ac_cv_type_uid_t = no; then
13962   cat >> confdefs.h <<\EOF
13963 #define uid_t int
13964 EOF
13965
13966   cat >> confdefs.h <<\EOF
13967 #define gid_t int
13968 EOF
13969
13970 fi
13971
13972 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13973 echo "configure:13974: checking for sig_atomic_t" >&5
13974 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13975   echo $ac_n "(cached) $ac_c" 1>&6
13976 else
13977   cat > conftest.$ac_ext <<EOF
13978 #line 13979 "configure"
13979 #include "confdefs.h"
13980 #include <signal.h>
13981 int main() {
13982 sig_atomic_t atomic;
13983 ; return 0; }
13984 EOF
13985 if { (eval echo configure:13986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13986   rm -rf conftest*
13987   ol_cv_type_sig_atomic_t=yes
13988 else
13989   echo "configure: failed program was:" >&5
13990   cat conftest.$ac_ext >&5
13991   rm -rf conftest*
13992   ol_cv_type_sig_atomic_t=no
13993 fi
13994 rm -f conftest*
13995 fi
13996
13997 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13998   if test $ol_cv_type_sig_atomic_t = no; then
13999     cat >> confdefs.h <<\EOF
14000 #define sig_atomic_t int
14001 EOF
14002
14003   fi
14004  
14005
14006
14007 # test for pw_gecos in struct passwd
14008 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14009 echo "configure:14010: checking struct passwd for pw_gecos" >&5
14010 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14011   echo $ac_n "(cached) $ac_c" 1>&6
14012 else
14013   
14014         cat > conftest.$ac_ext <<EOF
14015 #line 14016 "configure"
14016 #include "confdefs.h"
14017 #include <pwd.h>
14018 int main() {
14019
14020         struct passwd pwd;
14021         pwd.pw_gecos = pwd.pw_name;
14022
14023 ; return 0; }
14024 EOF
14025 if { (eval echo configure:14026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14026   rm -rf conftest*
14027   ol_cv_struct_passwd_pw_gecos=yes
14028 else
14029   echo "configure: failed program was:" >&5
14030   cat conftest.$ac_ext >&5
14031   rm -rf conftest*
14032   ol_cv_struct_passwd_pw_gecos=no
14033 fi
14034 rm -f conftest*
14035 fi
14036
14037 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14038 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14039         cat >> confdefs.h <<\EOF
14040 #define HAVE_PW_GECOS 1
14041 EOF
14042
14043 fi
14044
14045 # test for pw_passwd in struct passwd
14046 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14047 echo "configure:14048: checking struct passwd for pw_passwd" >&5
14048 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14049   echo $ac_n "(cached) $ac_c" 1>&6
14050 else
14051   
14052         cat > conftest.$ac_ext <<EOF
14053 #line 14054 "configure"
14054 #include "confdefs.h"
14055 #include <pwd.h>
14056 int main() {
14057
14058         struct passwd pwd;
14059         pwd.pw_passwd = pwd.pw_name;
14060
14061 ; return 0; }
14062 EOF
14063 if { (eval echo configure:14064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14064   rm -rf conftest*
14065   ol_cv_struct_passwd_pw_passwd=yes
14066 else
14067   echo "configure: failed program was:" >&5
14068   cat conftest.$ac_ext >&5
14069   rm -rf conftest*
14070   ol_cv_struct_passwd_pw_passwd=no
14071 fi
14072 rm -f conftest*
14073 fi
14074
14075 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14076 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14077         cat >> confdefs.h <<\EOF
14078 #define HAVE_PW_PASSWD 1
14079 EOF
14080
14081 fi
14082
14083
14084 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14085 echo "configure:14086: checking if toupper() requires islower()" >&5
14086 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14087   echo $ac_n "(cached) $ac_c" 1>&6
14088 else
14089   
14090         if test "$cross_compiling" = yes; then
14091   ol_cv_c_upper_lower=safe
14092 else
14093   cat > conftest.$ac_ext <<EOF
14094 #line 14095 "configure"
14095 #include "confdefs.h"
14096
14097 #include <ctype.h>
14098 main()
14099 {
14100         if ('C' == toupper('C'))
14101                 exit(0);
14102         else
14103                 exit(1);
14104 }
14105 EOF
14106 if { (eval echo configure:14107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14107 then
14108   ol_cv_c_upper_lower=no
14109 else
14110   echo "configure: failed program was:" >&5
14111   cat conftest.$ac_ext >&5
14112   rm -fr conftest*
14113   ol_cv_c_upper_lower=yes
14114 fi
14115 rm -fr conftest*
14116 fi
14117
14118 fi
14119
14120 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14121 if test $ol_cv_c_upper_lower != no ; then
14122         cat >> confdefs.h <<\EOF
14123 #define C_UPPER_LOWER 1
14124 EOF
14125
14126 fi
14127
14128 echo $ac_n "checking for working const""... $ac_c" 1>&6
14129 echo "configure:14130: checking for working const" >&5
14130 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14131   echo $ac_n "(cached) $ac_c" 1>&6
14132 else
14133   cat > conftest.$ac_ext <<EOF
14134 #line 14135 "configure"
14135 #include "confdefs.h"
14136
14137 int main() {
14138
14139 /* Ultrix mips cc rejects this.  */
14140 typedef int charset[2]; const charset x;
14141 /* SunOS 4.1.1 cc rejects this.  */
14142 char const *const *ccp;
14143 char **p;
14144 /* NEC SVR4.0.2 mips cc rejects this.  */
14145 struct point {int x, y;};
14146 static struct point const zero = {0,0};
14147 /* AIX XL C 1.02.0.0 rejects this.
14148    It does not let you subtract one const X* pointer from another in an arm
14149    of an if-expression whose if-part is not a constant expression */
14150 const char *g = "string";
14151 ccp = &g + (g ? g-g : 0);
14152 /* HPUX 7.0 cc rejects these. */
14153 ++ccp;
14154 p = (char**) ccp;
14155 ccp = (char const *const *) p;
14156 { /* SCO 3.2v4 cc rejects this.  */
14157   char *t;
14158   char const *s = 0 ? (char *) 0 : (char const *) 0;
14159
14160   *t++ = 0;
14161 }
14162 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14163   int x[] = {25, 17};
14164   const int *foo = &x[0];
14165   ++foo;
14166 }
14167 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14168   typedef const int *iptr;
14169   iptr p = 0;
14170   ++p;
14171 }
14172 { /* AIX XL C 1.02.0.0 rejects this saying
14173      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14174   struct s { int j; const int *ap[3]; };
14175   struct s *b; b->j = 5;
14176 }
14177 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14178   const int foo = 10;
14179 }
14180
14181 ; return 0; }
14182 EOF
14183 if { (eval echo configure:14184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14184   rm -rf conftest*
14185   ac_cv_c_const=yes
14186 else
14187   echo "configure: failed program was:" >&5
14188   cat conftest.$ac_ext >&5
14189   rm -rf conftest*
14190   ac_cv_c_const=no
14191 fi
14192 rm -f conftest*
14193 fi
14194
14195 echo "$ac_t""$ac_cv_c_const" 1>&6
14196 if test $ac_cv_c_const = no; then
14197   cat >> confdefs.h <<\EOF
14198 #define const 
14199 EOF
14200
14201 fi
14202
14203 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14204 echo "configure:14205: checking if compiler understands volatile" >&5
14205 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14206   echo $ac_n "(cached) $ac_c" 1>&6
14207 else
14208   cat > conftest.$ac_ext <<EOF
14209 #line 14210 "configure"
14210 #include "confdefs.h"
14211 int x, y, z;
14212 int main() {
14213 volatile int a; int * volatile b = x ? &y : &z;
14214       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14215       *b = 0;
14216 ; return 0; }
14217 EOF
14218 if { (eval echo configure:14219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14219   rm -rf conftest*
14220   ol_cv_c_volatile=yes
14221 else
14222   echo "configure: failed program was:" >&5
14223   cat conftest.$ac_ext >&5
14224   rm -rf conftest*
14225   ol_cv_c_volatile=no
14226 fi
14227 rm -f conftest*
14228 fi
14229
14230 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14231   if test $ol_cv_c_volatile = yes; then
14232     : 
14233   else
14234     cat >> confdefs.h <<\EOF
14235 #define volatile 
14236 EOF
14237
14238   fi
14239  
14240
14241 if test $cross_compiling = yes ; then
14242         cat >> confdefs.h <<\EOF
14243 #define CROSS_COMPILING 1
14244 EOF
14245
14246 else
14247         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14248 echo "configure:14249: checking whether byte ordering is bigendian" >&5
14249 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14250   echo $ac_n "(cached) $ac_c" 1>&6
14251 else
14252   ac_cv_c_bigendian=unknown
14253 # See if sys/param.h defines the BYTE_ORDER macro.
14254 cat > conftest.$ac_ext <<EOF
14255 #line 14256 "configure"
14256 #include "confdefs.h"
14257 #include <sys/types.h>
14258 #include <sys/param.h>
14259 int main() {
14260
14261 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14262  bogus endian macros
14263 #endif
14264 ; return 0; }
14265 EOF
14266 if { (eval echo configure:14267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14267   rm -rf conftest*
14268   # It does; now see whether it defined to BIG_ENDIAN or not.
14269 cat > conftest.$ac_ext <<EOF
14270 #line 14271 "configure"
14271 #include "confdefs.h"
14272 #include <sys/types.h>
14273 #include <sys/param.h>
14274 int main() {
14275
14276 #if BYTE_ORDER != BIG_ENDIAN
14277  not big endian
14278 #endif
14279 ; return 0; }
14280 EOF
14281 if { (eval echo configure:14282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14282   rm -rf conftest*
14283   ac_cv_c_bigendian=yes
14284 else
14285   echo "configure: failed program was:" >&5
14286   cat conftest.$ac_ext >&5
14287   rm -rf conftest*
14288   ac_cv_c_bigendian=no
14289 fi
14290 rm -f conftest*
14291 else
14292   echo "configure: failed program was:" >&5
14293   cat conftest.$ac_ext >&5
14294 fi
14295 rm -f conftest*
14296 if test $ac_cv_c_bigendian = unknown; then
14297 if test "$cross_compiling" = yes; then
14298     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14299 else
14300   cat > conftest.$ac_ext <<EOF
14301 #line 14302 "configure"
14302 #include "confdefs.h"
14303 main () {
14304   /* Are we little or big endian?  From Harbison&Steele.  */
14305   union
14306   {
14307     long l;
14308     char c[sizeof (long)];
14309   } u;
14310   u.l = 1;
14311   exit (u.c[sizeof (long) - 1] == 1);
14312 }
14313 EOF
14314 if { (eval echo configure:14315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14315 then
14316   ac_cv_c_bigendian=no
14317 else
14318   echo "configure: failed program was:" >&5
14319   cat conftest.$ac_ext >&5
14320   rm -fr conftest*
14321   ac_cv_c_bigendian=yes
14322 fi
14323 rm -fr conftest*
14324 fi
14325
14326 fi
14327 fi
14328
14329 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14330 if test $ac_cv_c_bigendian = yes; then
14331   cat >> confdefs.h <<\EOF
14332 #define WORDS_BIGENDIAN 1
14333 EOF
14334
14335 fi
14336
14337 fi
14338
14339 echo $ac_n "checking size of short""... $ac_c" 1>&6
14340 echo "configure:14341: checking size of short" >&5 
14341 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14342   echo $ac_n "(cached) $ac_c" 1>&6
14343 else
14344   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14345   cat > conftest.$ac_ext <<EOF
14346 #line 14347 "configure"
14347 #include "confdefs.h"
14348 #include "confdefs.h" 
14349 #include <sys/types.h> 
14350  
14351
14352 int main() {
14353 switch (0) case 0: case (sizeof (short) == $ac_size):;
14354 ; return 0; }
14355 EOF
14356 if { (eval echo configure:14357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14357   rm -rf conftest*
14358   ac_cv_sizeof_short=$ac_size
14359 else
14360   echo "configure: failed program was:" >&5
14361   cat conftest.$ac_ext >&5
14362 fi
14363 rm -f conftest* 
14364   if test x$ac_cv_sizeof_short != x ; then break; fi 
14365 done 
14366
14367 fi
14368  
14369 if test x$ac_cv_sizeof_short = x ; then 
14370   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14371 fi 
14372 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14373 cat >> confdefs.h <<EOF
14374 #define SIZEOF_SHORT $ac_cv_sizeof_short
14375 EOF
14376  
14377  
14378 echo $ac_n "checking size of int""... $ac_c" 1>&6
14379 echo "configure:14380: checking size of int" >&5 
14380 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14381   echo $ac_n "(cached) $ac_c" 1>&6
14382 else
14383   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14384   cat > conftest.$ac_ext <<EOF
14385 #line 14386 "configure"
14386 #include "confdefs.h"
14387 #include "confdefs.h" 
14388 #include <sys/types.h> 
14389  
14390
14391 int main() {
14392 switch (0) case 0: case (sizeof (int) == $ac_size):;
14393 ; return 0; }
14394 EOF
14395 if { (eval echo configure:14396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14396   rm -rf conftest*
14397   ac_cv_sizeof_int=$ac_size
14398 else
14399   echo "configure: failed program was:" >&5
14400   cat conftest.$ac_ext >&5
14401 fi
14402 rm -f conftest* 
14403   if test x$ac_cv_sizeof_int != x ; then break; fi 
14404 done 
14405
14406 fi
14407  
14408 if test x$ac_cv_sizeof_int = x ; then 
14409   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14410 fi 
14411 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14412 cat >> confdefs.h <<EOF
14413 #define SIZEOF_INT $ac_cv_sizeof_int
14414 EOF
14415  
14416  
14417 echo $ac_n "checking size of long""... $ac_c" 1>&6
14418 echo "configure:14419: checking size of long" >&5 
14419 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14420   echo $ac_n "(cached) $ac_c" 1>&6
14421 else
14422   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14423   cat > conftest.$ac_ext <<EOF
14424 #line 14425 "configure"
14425 #include "confdefs.h"
14426 #include "confdefs.h" 
14427 #include <sys/types.h> 
14428  
14429
14430 int main() {
14431 switch (0) case 0: case (sizeof (long) == $ac_size):;
14432 ; return 0; }
14433 EOF
14434 if { (eval echo configure:14435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14435   rm -rf conftest*
14436   ac_cv_sizeof_long=$ac_size
14437 else
14438   echo "configure: failed program was:" >&5
14439   cat conftest.$ac_ext >&5
14440 fi
14441 rm -f conftest* 
14442   if test x$ac_cv_sizeof_long != x ; then break; fi 
14443 done 
14444
14445 fi
14446  
14447 if test x$ac_cv_sizeof_long = x ; then 
14448   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14449 fi 
14450 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14451 cat >> confdefs.h <<EOF
14452 #define SIZEOF_LONG $ac_cv_sizeof_long
14453 EOF
14454  
14455
14456
14457 if test "$ac_cv_sizeof_int" -lt 4 ; then
14458         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14459
14460         cat >> confdefs.h <<\EOF
14461 #define LBER_INT_T long
14462 EOF
14463
14464 else
14465         cat >> confdefs.h <<\EOF
14466 #define LBER_INT_T int
14467 EOF
14468
14469 fi
14470
14471 cat >> confdefs.h <<\EOF
14472 #define LBER_LEN_T long
14473 EOF
14474
14475 cat >> confdefs.h <<\EOF
14476 #define LBER_SOCKET_T int
14477 EOF
14478
14479 cat >> confdefs.h <<\EOF
14480 #define LBER_TAG_T long
14481 EOF
14482
14483
14484 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14485 echo "configure:14486: checking for 8-bit clean memcmp" >&5
14486 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14487   echo $ac_n "(cached) $ac_c" 1>&6
14488 else
14489   if test "$cross_compiling" = yes; then
14490   ac_cv_func_memcmp_clean=no
14491 else
14492   cat > conftest.$ac_ext <<EOF
14493 #line 14494 "configure"
14494 #include "confdefs.h"
14495
14496 main()
14497 {
14498   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14499   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14500 }
14501
14502 EOF
14503 if { (eval echo configure:14504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14504 then
14505   ac_cv_func_memcmp_clean=yes
14506 else
14507   echo "configure: failed program was:" >&5
14508   cat conftest.$ac_ext >&5
14509   rm -fr conftest*
14510   ac_cv_func_memcmp_clean=no
14511 fi
14512 rm -fr conftest*
14513 fi
14514
14515 fi
14516
14517 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14518 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14519
14520 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14521 echo "configure:14522: checking for strftime" >&5
14522 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14523   echo $ac_n "(cached) $ac_c" 1>&6
14524 else
14525   cat > conftest.$ac_ext <<EOF
14526 #line 14527 "configure"
14527 #include "confdefs.h"
14528 /* System header to define __stub macros and hopefully few prototypes,
14529     which can conflict with char strftime(); below.  */
14530 #include <assert.h>
14531 /* Override any gcc2 internal prototype to avoid an error.  */
14532 /* We use char because int might match the return type of a gcc2
14533     builtin and then its argument prototype would still apply.  */
14534 char strftime();
14535 char (*f)();
14536
14537 int main() {
14538
14539 /* The GNU C library defines this for functions which it implements
14540     to always fail with ENOSYS.  Some functions are actually named
14541     something starting with __ and the normal name is an alias.  */
14542 #if defined (__stub_strftime) || defined (__stub___strftime)
14543 choke me
14544 #else
14545 f = strftime;
14546 #endif
14547
14548 ; return 0; }
14549 EOF
14550 if { (eval echo configure:14551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14551   rm -rf conftest*
14552   eval "ac_cv_func_strftime=yes"
14553 else
14554   echo "configure: failed program was:" >&5
14555   cat conftest.$ac_ext >&5
14556   rm -rf conftest*
14557   eval "ac_cv_func_strftime=no"
14558 fi
14559 rm -f conftest*
14560 fi
14561
14562 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14563   echo "$ac_t""yes" 1>&6
14564   cat >> confdefs.h <<\EOF
14565 #define HAVE_STRFTIME 1
14566 EOF
14567
14568 else
14569   echo "$ac_t""no" 1>&6
14570 # strftime is in -lintl on SCO UNIX.
14571 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14572 echo "configure:14573: checking for strftime in -lintl" >&5
14573 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14574 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14575   echo $ac_n "(cached) $ac_c" 1>&6
14576 else
14577   ac_save_LIBS="$LIBS"
14578 LIBS="-lintl  $LIBS"
14579 cat > conftest.$ac_ext <<EOF
14580 #line 14581 "configure"
14581 #include "confdefs.h"
14582 /* Override any gcc2 internal prototype to avoid an error.  */
14583 /* We use char because int might match the return type of a gcc2
14584     builtin and then its argument prototype would still apply.  */
14585 char strftime();
14586
14587 int main() {
14588 strftime()
14589 ; return 0; }
14590 EOF
14591 if { (eval echo configure:14592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14592   rm -rf conftest*
14593   eval "ac_cv_lib_$ac_lib_var=yes"
14594 else
14595   echo "configure: failed program was:" >&5
14596   cat conftest.$ac_ext >&5
14597   rm -rf conftest*
14598   eval "ac_cv_lib_$ac_lib_var=no"
14599 fi
14600 rm -f conftest*
14601 LIBS="$ac_save_LIBS"
14602
14603 fi
14604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14605   echo "$ac_t""yes" 1>&6
14606   cat >> confdefs.h <<\EOF
14607 #define HAVE_STRFTIME 1
14608 EOF
14609
14610 LIBS="-lintl $LIBS"
14611 else
14612   echo "$ac_t""no" 1>&6
14613 fi
14614
14615 fi
14616
14617
14618 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14619 echo "configure:14620: checking for inet_aton()" >&5
14620 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14621   echo $ac_n "(cached) $ac_c" 1>&6
14622 else
14623   cat > conftest.$ac_ext <<EOF
14624 #line 14625 "configure"
14625 #include "confdefs.h"
14626
14627 #ifdef HAVE_SYS_TYPES_H
14628 #       include <sys/types.h>
14629 #endif
14630 #ifdef HAVE_SYS_SOCKET_H
14631 #       include <sys/socket.h>
14632 #       ifdef HAVE_SYS_SELECT_H
14633 #               include <sys/select.h>
14634 #       endif
14635 #       include <netinet/in.h>
14636 #       ifdef HAVE_ARPA_INET_H
14637 #               include <arpa/inet.h>
14638 #       endif
14639 #endif
14640
14641 int main() {
14642 struct in_addr in;
14643 int rc = inet_aton( "255.255.255.255", &in );
14644 ; return 0; }
14645 EOF
14646 if { (eval echo configure:14647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14647   rm -rf conftest*
14648   ol_cv_func_inet_aton=yes
14649 else
14650   echo "configure: failed program was:" >&5
14651   cat conftest.$ac_ext >&5
14652   rm -rf conftest*
14653   ol_cv_func_inet_aton=no
14654 fi
14655 rm -f conftest*
14656 fi
14657
14658 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14659   if test $ol_cv_func_inet_aton != no; then
14660     cat >> confdefs.h <<\EOF
14661 #define HAVE_INET_ATON 1
14662 EOF
14663
14664   fi
14665  
14666
14667 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14668 echo "configure:14669: checking for _spawnlp" >&5
14669 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14670   echo $ac_n "(cached) $ac_c" 1>&6
14671 else
14672   cat > conftest.$ac_ext <<EOF
14673 #line 14674 "configure"
14674 #include "confdefs.h"
14675 /* System header to define __stub macros and hopefully few prototypes,
14676     which can conflict with char _spawnlp(); below.  */
14677 #include <assert.h>
14678 /* Override any gcc2 internal prototype to avoid an error.  */
14679 /* We use char because int might match the return type of a gcc2
14680     builtin and then its argument prototype would still apply.  */
14681 char _spawnlp();
14682 char (*f)();
14683
14684 int main() {
14685
14686 /* The GNU C library defines this for functions which it implements
14687     to always fail with ENOSYS.  Some functions are actually named
14688     something starting with __ and the normal name is an alias.  */
14689 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14690 choke me
14691 #else
14692 f = _spawnlp;
14693 #endif
14694
14695 ; return 0; }
14696 EOF
14697 if { (eval echo configure:14698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14698   rm -rf conftest*
14699   eval "ac_cv_func__spawnlp=yes"
14700 else
14701   echo "configure: failed program was:" >&5
14702   cat conftest.$ac_ext >&5
14703   rm -rf conftest*
14704   eval "ac_cv_func__spawnlp=no"
14705 fi
14706 rm -f conftest*
14707 fi
14708
14709 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14710   echo "$ac_t""yes" 1>&6
14711   cat >> confdefs.h <<\EOF
14712 #define HAVE_SPAWNLP 1
14713 EOF
14714
14715 else
14716   echo "$ac_t""no" 1>&6
14717 fi
14718
14719
14720 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14721 echo "configure:14722: checking for _snprintf" >&5
14722 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14723   echo $ac_n "(cached) $ac_c" 1>&6
14724 else
14725   cat > conftest.$ac_ext <<EOF
14726 #line 14727 "configure"
14727 #include "confdefs.h"
14728 /* System header to define __stub macros and hopefully few prototypes,
14729     which can conflict with char _snprintf(); below.  */
14730 #include <assert.h>
14731 /* Override any gcc2 internal prototype to avoid an error.  */
14732 /* We use char because int might match the return type of a gcc2
14733     builtin and then its argument prototype would still apply.  */
14734 char _snprintf();
14735 char (*f)();
14736
14737 int main() {
14738
14739 /* The GNU C library defines this for functions which it implements
14740     to always fail with ENOSYS.  Some functions are actually named
14741     something starting with __ and the normal name is an alias.  */
14742 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14743 choke me
14744 #else
14745 f = _snprintf;
14746 #endif
14747
14748 ; return 0; }
14749 EOF
14750 if { (eval echo configure:14751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14751   rm -rf conftest*
14752   eval "ac_cv_func__snprintf=yes"
14753 else
14754   echo "configure: failed program was:" >&5
14755   cat conftest.$ac_ext >&5
14756   rm -rf conftest*
14757   eval "ac_cv_func__snprintf=no"
14758 fi
14759 rm -f conftest*
14760 fi
14761
14762 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14763   echo "$ac_t""yes" 1>&6
14764   ac_cv_func_snprintf=yes
14765         cat >> confdefs.h <<\EOF
14766 #define snprintf _snprintf
14767 EOF
14768
14769
14770 else
14771   echo "$ac_t""no" 1>&6
14772 fi
14773
14774
14775 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14776 echo "configure:14777: checking for _vsnprintf" >&5
14777 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14778   echo $ac_n "(cached) $ac_c" 1>&6
14779 else
14780   cat > conftest.$ac_ext <<EOF
14781 #line 14782 "configure"
14782 #include "confdefs.h"
14783 /* System header to define __stub macros and hopefully few prototypes,
14784     which can conflict with char _vsnprintf(); below.  */
14785 #include <assert.h>
14786 /* Override any gcc2 internal prototype to avoid an error.  */
14787 /* We use char because int might match the return type of a gcc2
14788     builtin and then its argument prototype would still apply.  */
14789 char _vsnprintf();
14790 char (*f)();
14791
14792 int main() {
14793
14794 /* The GNU C library defines this for functions which it implements
14795     to always fail with ENOSYS.  Some functions are actually named
14796     something starting with __ and the normal name is an alias.  */
14797 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14798 choke me
14799 #else
14800 f = _vsnprintf;
14801 #endif
14802
14803 ; return 0; }
14804 EOF
14805 if { (eval echo configure:14806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14806   rm -rf conftest*
14807   eval "ac_cv_func__vsnprintf=yes"
14808 else
14809   echo "configure: failed program was:" >&5
14810   cat conftest.$ac_ext >&5
14811   rm -rf conftest*
14812   eval "ac_cv_func__vsnprintf=no"
14813 fi
14814 rm -f conftest*
14815 fi
14816
14817 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14818   echo "$ac_t""yes" 1>&6
14819   ac_cv_func_vsnprintf=yes
14820         cat >> confdefs.h <<\EOF
14821 #define vsnprintf _vsnprintf
14822 EOF
14823
14824
14825 else
14826   echo "$ac_t""no" 1>&6
14827 fi
14828
14829
14830 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14831 echo "configure:14832: checking for vprintf" >&5
14832 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14833   echo $ac_n "(cached) $ac_c" 1>&6
14834 else
14835   cat > conftest.$ac_ext <<EOF
14836 #line 14837 "configure"
14837 #include "confdefs.h"
14838 /* System header to define __stub macros and hopefully few prototypes,
14839     which can conflict with char vprintf(); below.  */
14840 #include <assert.h>
14841 /* Override any gcc2 internal prototype to avoid an error.  */
14842 /* We use char because int might match the return type of a gcc2
14843     builtin and then its argument prototype would still apply.  */
14844 char vprintf();
14845 char (*f)();
14846
14847 int main() {
14848
14849 /* The GNU C library defines this for functions which it implements
14850     to always fail with ENOSYS.  Some functions are actually named
14851     something starting with __ and the normal name is an alias.  */
14852 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14853 choke me
14854 #else
14855 f = vprintf;
14856 #endif
14857
14858 ; return 0; }
14859 EOF
14860 if { (eval echo configure:14861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14861   rm -rf conftest*
14862   eval "ac_cv_func_vprintf=yes"
14863 else
14864   echo "configure: failed program was:" >&5
14865   cat conftest.$ac_ext >&5
14866   rm -rf conftest*
14867   eval "ac_cv_func_vprintf=no"
14868 fi
14869 rm -f conftest*
14870 fi
14871
14872 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14873   echo "$ac_t""yes" 1>&6
14874   cat >> confdefs.h <<\EOF
14875 #define HAVE_VPRINTF 1
14876 EOF
14877
14878 else
14879   echo "$ac_t""no" 1>&6
14880 fi
14881
14882 if test "$ac_cv_func_vprintf" != yes; then
14883 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14884 echo "configure:14885: checking for _doprnt" >&5
14885 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14886   echo $ac_n "(cached) $ac_c" 1>&6
14887 else
14888   cat > conftest.$ac_ext <<EOF
14889 #line 14890 "configure"
14890 #include "confdefs.h"
14891 /* System header to define __stub macros and hopefully few prototypes,
14892     which can conflict with char _doprnt(); below.  */
14893 #include <assert.h>
14894 /* Override any gcc2 internal prototype to avoid an error.  */
14895 /* We use char because int might match the return type of a gcc2
14896     builtin and then its argument prototype would still apply.  */
14897 char _doprnt();
14898 char (*f)();
14899
14900 int main() {
14901
14902 /* The GNU C library defines this for functions which it implements
14903     to always fail with ENOSYS.  Some functions are actually named
14904     something starting with __ and the normal name is an alias.  */
14905 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14906 choke me
14907 #else
14908 f = _doprnt;
14909 #endif
14910
14911 ; return 0; }
14912 EOF
14913 if { (eval echo configure:14914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14914   rm -rf conftest*
14915   eval "ac_cv_func__doprnt=yes"
14916 else
14917   echo "configure: failed program was:" >&5
14918   cat conftest.$ac_ext >&5
14919   rm -rf conftest*
14920   eval "ac_cv_func__doprnt=no"
14921 fi
14922 rm -f conftest*
14923 fi
14924
14925 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14926   echo "$ac_t""yes" 1>&6
14927   cat >> confdefs.h <<\EOF
14928 #define HAVE_DOPRNT 1
14929 EOF
14930
14931 else
14932   echo "$ac_t""no" 1>&6
14933 fi
14934
14935 fi
14936
14937
14938 if test $ac_cv_func_vprintf = yes ; then
14939                 for ac_func in vsnprintf vsprintf
14940 do
14941 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14942 echo "configure:14943: checking for $ac_func" >&5
14943 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14944   echo $ac_n "(cached) $ac_c" 1>&6
14945 else
14946   cat > conftest.$ac_ext <<EOF
14947 #line 14948 "configure"
14948 #include "confdefs.h"
14949 /* System header to define __stub macros and hopefully few prototypes,
14950     which can conflict with char $ac_func(); below.  */
14951 #include <assert.h>
14952 /* Override any gcc2 internal prototype to avoid an error.  */
14953 /* We use char because int might match the return type of a gcc2
14954     builtin and then its argument prototype would still apply.  */
14955 char $ac_func();
14956 char (*f)();
14957
14958 int main() {
14959
14960 /* The GNU C library defines this for functions which it implements
14961     to always fail with ENOSYS.  Some functions are actually named
14962     something starting with __ and the normal name is an alias.  */
14963 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14964 choke me
14965 #else
14966 f = $ac_func;
14967 #endif
14968
14969 ; return 0; }
14970 EOF
14971 if { (eval echo configure:14972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14972   rm -rf conftest*
14973   eval "ac_cv_func_$ac_func=yes"
14974 else
14975   echo "configure: failed program was:" >&5
14976   cat conftest.$ac_ext >&5
14977   rm -rf conftest*
14978   eval "ac_cv_func_$ac_func=no"
14979 fi
14980 rm -f conftest*
14981 fi
14982
14983 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14984   echo "$ac_t""yes" 1>&6
14985     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14986   cat >> confdefs.h <<EOF
14987 #define $ac_tr_func 1
14988 EOF
14989  
14990 else
14991   echo "$ac_t""no" 1>&6
14992 fi
14993 done
14994
14995 fi
14996
14997 for ac_func in \
14998         bcopy                   \
14999         closesocket             \
15000         endgrent                \
15001         endpwent                \
15002         flock                   \
15003         getdtablesize   \
15004         getgrgid                \
15005         gethostname             \
15006         getpass                 \
15007         getpwuid                \
15008         getpwnam                \
15009         getspnam                \
15010         gettimeofday    \
15011         initgroups              \
15012         lockf                   \
15013         memcpy                  \
15014         memmove                 \
15015         mkstemp                 \
15016         pipe                    \
15017         read                    \
15018         recv                    \
15019         recvfrom                \
15020         setpwfile               \
15021         setgid                  \
15022         setegid                 \
15023         setsid                  \
15024         setuid                  \
15025         seteuid                 \
15026         sigaction               \
15027         signal                  \
15028         sigset                  \
15029         snprintf                \
15030         strdup                  \
15031         strerror                \
15032         strpbrk                 \
15033         strrchr                 \
15034         strsep                  \
15035         strstr                  \
15036         strtol                  \
15037         strtoul                 \
15038         strspn                  \
15039         sysconf                 \
15040         waitpid                 \
15041         wait4                   \
15042         write                   \
15043         send                    \
15044         sendto                  \
15045
15046 do
15047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15048 echo "configure:15049: checking for $ac_func" >&5
15049 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15050   echo $ac_n "(cached) $ac_c" 1>&6
15051 else
15052   cat > conftest.$ac_ext <<EOF
15053 #line 15054 "configure"
15054 #include "confdefs.h"
15055 /* System header to define __stub macros and hopefully few prototypes,
15056     which can conflict with char $ac_func(); below.  */
15057 #include <assert.h>
15058 /* Override any gcc2 internal prototype to avoid an error.  */
15059 /* We use char because int might match the return type of a gcc2
15060     builtin and then its argument prototype would still apply.  */
15061 char $ac_func();
15062 char (*f)();
15063
15064 int main() {
15065
15066 /* The GNU C library defines this for functions which it implements
15067     to always fail with ENOSYS.  Some functions are actually named
15068     something starting with __ and the normal name is an alias.  */
15069 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15070 choke me
15071 #else
15072 f = $ac_func;
15073 #endif
15074
15075 ; return 0; }
15076 EOF
15077 if { (eval echo configure:15078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15078   rm -rf conftest*
15079   eval "ac_cv_func_$ac_func=yes"
15080 else
15081   echo "configure: failed program was:" >&5
15082   cat conftest.$ac_ext >&5
15083   rm -rf conftest*
15084   eval "ac_cv_func_$ac_func=no"
15085 fi
15086 rm -f conftest*
15087 fi
15088
15089 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15090   echo "$ac_t""yes" 1>&6
15091     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15092   cat >> confdefs.h <<EOF
15093 #define $ac_tr_func 1
15094 EOF
15095  
15096 else
15097   echo "$ac_t""no" 1>&6
15098 fi
15099 done
15100
15101
15102 for ac_func in getopt tempnam
15103 do
15104 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15105 echo "configure:15106: checking for $ac_func" >&5
15106 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15107   echo $ac_n "(cached) $ac_c" 1>&6
15108 else
15109   cat > conftest.$ac_ext <<EOF
15110 #line 15111 "configure"
15111 #include "confdefs.h"
15112 /* System header to define __stub macros and hopefully few prototypes,
15113     which can conflict with char $ac_func(); below.  */
15114 #include <assert.h>
15115 /* Override any gcc2 internal prototype to avoid an error.  */
15116 /* We use char because int might match the return type of a gcc2
15117     builtin and then its argument prototype would still apply.  */
15118 char $ac_func();
15119 char (*f)();
15120
15121 int main() {
15122
15123 /* The GNU C library defines this for functions which it implements
15124     to always fail with ENOSYS.  Some functions are actually named
15125     something starting with __ and the normal name is an alias.  */
15126 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15127 choke me
15128 #else
15129 f = $ac_func;
15130 #endif
15131
15132 ; return 0; }
15133 EOF
15134 if { (eval echo configure:15135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15135   rm -rf conftest*
15136   eval "ac_cv_func_$ac_func=yes"
15137 else
15138   echo "configure: failed program was:" >&5
15139   cat conftest.$ac_ext >&5
15140   rm -rf conftest*
15141   eval "ac_cv_func_$ac_func=no"
15142 fi
15143 rm -f conftest*
15144 fi
15145
15146 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15147   echo "$ac_t""yes" 1>&6
15148     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15149   cat >> confdefs.h <<EOF
15150 #define $ac_tr_func 1
15151 EOF
15152  
15153 else
15154   echo "$ac_t""no" 1>&6
15155 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15156 fi
15157 done
15158
15159
15160
15161 if test "$ac_cv_func_getopt" != yes; then
15162     LIBSRCS="$LIBSRCS getopt.c"
15163 fi
15164
15165 if test "$ac_cv_func_tempnam" != yes; then
15166     LIBSRCS="$LIBSRCS tempnam.c"
15167 fi
15168
15169 # Check Configuration
15170 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15171 echo "configure:15172: checking declaration of sys_errlist" >&5
15172 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15173   echo $ac_n "(cached) $ac_c" 1>&6
15174 else
15175   
15176         cat > conftest.$ac_ext <<EOF
15177 #line 15178 "configure"
15178 #include "confdefs.h"
15179
15180 #include <stdio.h>
15181 #include <sys/types.h>
15182 #include <errno.h>
15183 #ifdef WINNT
15184 #include <stdlib.h>
15185 #endif 
15186 int main() {
15187 char *c = (char *) *sys_errlist
15188 ; return 0; }
15189 EOF
15190 if { (eval echo configure:15191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15191   rm -rf conftest*
15192   ol_cv_dcl_sys_errlist=yes
15193         ol_cv_have_sys_errlist=yes
15194 else
15195   echo "configure: failed program was:" >&5
15196   cat conftest.$ac_ext >&5
15197   rm -rf conftest*
15198   ol_cv_dcl_sys_errlist=no
15199 fi
15200 rm -f conftest*
15201 fi
15202
15203 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15204 #
15205 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15206 if test $ol_cv_dcl_sys_errlist = no ; then
15207         cat >> confdefs.h <<\EOF
15208 #define DECL_SYS_ERRLIST 1
15209 EOF
15210
15211
15212         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15213 echo "configure:15214: checking existence of sys_errlist" >&5
15214 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15215   echo $ac_n "(cached) $ac_c" 1>&6
15216 else
15217   
15218                 cat > conftest.$ac_ext <<EOF
15219 #line 15220 "configure"
15220 #include "confdefs.h"
15221 #include <errno.h>
15222 int main() {
15223 char *c = (char *) *sys_errlist
15224 ; return 0; }
15225 EOF
15226 if { (eval echo configure:15227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15227   rm -rf conftest*
15228   ol_cv_have_sys_errlist=yes
15229 else
15230   echo "configure: failed program was:" >&5
15231   cat conftest.$ac_ext >&5
15232   rm -rf conftest*
15233   ol_cv_have_sys_errlist=no
15234 fi
15235 rm -f conftest*
15236 fi
15237
15238 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15239 fi
15240 if test $ol_cv_have_sys_errlist = yes ; then
15241         cat >> confdefs.h <<\EOF
15242 #define HAVE_SYS_ERRLIST 1
15243 EOF
15244
15245 fi
15246
15247
15248
15249 if test "$ol_enable_debug" != no ; then
15250         cat >> confdefs.h <<\EOF
15251 #define LDAP_DEBUG 1
15252 EOF
15253
15254 fi
15255 if test "$ol_enable_syslog" = yes ; then
15256         cat >> confdefs.h <<\EOF
15257 #define LDAP_SYSLOG 1
15258 EOF
15259
15260 fi
15261 if test "$ol_enable_libui" = yes ; then
15262         cat >> confdefs.h <<\EOF
15263 #define LDAP_LIBUI 1
15264 EOF
15265
15266 fi
15267 if test "$ol_enable_cache" = no ; then
15268         cat >> confdefs.h <<\EOF
15269 #define LDAP_NOCACHE 1
15270 EOF
15271
15272 fi
15273 if test "$ol_link_kbind" != no ; then
15274         cat >> confdefs.h <<\EOF
15275 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15276 EOF
15277
15278 fi
15279 if test "$ol_enable_dns" != no ; then
15280         cat >> confdefs.h <<\EOF
15281 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
15282 EOF
15283
15284 fi
15285 if test "$ol_enable_proctitle" != no ; then
15286         cat >> confdefs.h <<\EOF
15287 #define LDAP_PROCTITLE 1
15288 EOF
15289
15290 fi
15291 if test "$ol_enable_referrals" != no ; then
15292         cat >> confdefs.h <<\EOF
15293 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15294 EOF
15295
15296 fi
15297 if test "$ol_enable_cldap" != no ; then
15298         cat >> confdefs.h <<\EOF
15299 #define LDAP_CONNECTIONLESS 1
15300 EOF
15301
15302 fi
15303 if test "$ol_enable_ldapi" != no; then
15304         cat >> confdefs.h <<\EOF
15305 #define USE_PF_LOCAL 1
15306 EOF
15307
15308 fi
15309
15310 if test "$ol_enable_cleartext" != no ; then
15311         cat >> confdefs.h <<\EOF
15312 #define SLAPD_CLEARTEXT 1
15313 EOF
15314
15315 fi
15316 if test "$ol_enable_crypt" != no ; then
15317         cat >> confdefs.h <<\EOF
15318 #define SLAPD_CRYPT 1
15319 EOF
15320
15321 fi
15322 if test "$ol_link_kpasswd" != no ; then
15323         cat >> confdefs.h <<\EOF
15324 #define SLAPD_KPASSWD 1
15325 EOF
15326
15327 fi
15328 if test "$ol_enable_multimaster" != no ; then
15329         cat >> confdefs.h <<\EOF
15330 #define SLAPD_MULTIMASTER 1
15331 EOF
15332
15333 fi
15334 if test "$ol_enable_phonetic" != no ; then
15335         cat >> confdefs.h <<\EOF
15336 #define SLAPD_PHONETIC 1
15337 EOF
15338
15339 fi
15340 if test "$ol_enable_rlookups" != no ; then
15341         cat >> confdefs.h <<\EOF
15342 #define SLAPD_RLOOKUPS 1
15343 EOF
15344
15345 fi
15346 if test "$ol_enable_aci" != no ; then
15347         cat >> confdefs.h <<\EOF
15348 #define SLAPD_ACI_ENABLED 1
15349 EOF
15350
15351 fi
15352
15353 if test "$ol_link_modules" != no ; then
15354         cat >> confdefs.h <<\EOF
15355 #define SLAPD_MODULES 1
15356 EOF
15357
15358         BUILD_SLAPD=yes
15359         SLAPD_MODULES_LDFLAGS="-dlopen self"
15360 fi
15361
15362 if test "$ol_link_bdb2" != no ; then
15363         cat >> confdefs.h <<\EOF
15364 #define SLAPD_BDB2 1
15365 EOF
15366
15367         BUILD_SLAPD=yes
15368         BUILD_BDB2=yes
15369         if test "$ol_with_bdb2_module" != static ; then
15370                 cat >> confdefs.h <<\EOF
15371 #define SLAPD_BDB2_DYNAMIC 1
15372 EOF
15373
15374                 BUILD_BDB2=mod
15375                 BUILD_BDB2_DYNAMIC=shared
15376                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15377         fi
15378 fi
15379
15380 if test "$ol_enable_ldap" != no ; then
15381         cat >> confdefs.h <<\EOF
15382 #define SLAPD_LDAP 1
15383 EOF
15384
15385         BUILD_SLAPD=yes
15386         BUILD_LDAP=yes
15387         if test "$ol_with_ldap_module" != static ; then
15388                 cat >> confdefs.h <<\EOF
15389 #define SLAPD_LDAP_DYNAMIC 1
15390 EOF
15391
15392                 BUILD_LDAP=mod
15393                 BUILD_LDAP_DYNAMIC=shared
15394                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15395         fi
15396 fi
15397
15398 if test "$ol_link_ldbm" != no ; then
15399         cat >> confdefs.h <<\EOF
15400 #define SLAPD_LDBM 1
15401 EOF
15402
15403         BUILD_SLAPD=yes
15404         BUILD_LDBM=yes
15405         if test "$ol_with_ldbm_module" != static ; then
15406                 cat >> confdefs.h <<\EOF
15407 #define SLAPD_LDBM_DYNAMIC 1
15408 EOF
15409
15410                 BUILD_LDBM=mod
15411                 BUILD_LDBM_DYNAMIC=shared
15412                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15413         fi
15414 fi
15415
15416 if test "$ol_enable_passwd" != no ; then
15417         cat >> confdefs.h <<\EOF
15418 #define SLAPD_PASSWD 1
15419 EOF
15420
15421         BUILD_SLAPD=yes
15422         BUILD_PASSWD=yes
15423         if test "$ol_with_passwd_module" != static ; then
15424                 cat >> confdefs.h <<\EOF
15425 #define SLAPD_PASSWD_DYNAMIC 1
15426 EOF
15427
15428                 BUILD_PASSWD=mod
15429                 BUILD_PASSWD_DYNAMIC=shared
15430                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15431         fi
15432 fi
15433
15434 if test "$ol_link_perl" != no ; then
15435         cat >> confdefs.h <<\EOF
15436 #define SLAPD_PERL 1
15437 EOF
15438
15439         BUILD_SLAPD=yes
15440         BUILD_PERL=yes
15441         if test "$ol_with_perl_module" != static ; then
15442                 cat >> confdefs.h <<\EOF
15443 #define SLAPD_PERL_DYNAMIC 1
15444 EOF
15445
15446                 BUILD_PERL=mod
15447                 BUILD_PERL_DYNAMIC=shared
15448                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15449         fi
15450 fi
15451
15452 if test "$ol_enable_shell" != no ; then
15453         cat >> confdefs.h <<\EOF
15454 #define SLAPD_SHELL 1
15455 EOF
15456
15457         BUILD_SLAPD=yes
15458         BUILD_SHELL=yes
15459         if test "$ol_with_shell_module" != static ; then
15460                 cat >> confdefs.h <<\EOF
15461 #define SLAPD_SHELL_DYNAMIC 1
15462 EOF
15463
15464                 BUILD_SHELL=mod
15465                 BUILD_SHELL_DYNAMIC=shared
15466                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15467         fi
15468 fi
15469
15470 if test "$ol_enable_tcl" != no ; then
15471         cat >> confdefs.h <<\EOF
15472 #define SLAPD_TCL 1
15473 EOF
15474
15475         BUILD_SLAPD=yes
15476         BUILD_TCL=yes
15477         if test "$ol_with_tcl_module" != static; then
15478                 cat >> confdefs.h <<\EOF
15479 #define SLAPD_TCL_DYNAMIC 1
15480 EOF
15481
15482                 BUILD_TCL=mod
15483                 BUILD_TCL_DYNAMIC=shared
15484                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15485         fi
15486 fi
15487
15488 if test "$ol_enable_sql" != no ; then
15489         cat >> confdefs.h <<\EOF
15490 #define SLAPD_SQL 1
15491 EOF
15492
15493         BUILD_SLAPD=yes
15494         BUILD_SQL=yes
15495         SLAPD_SQL_LIBS=-liodbc
15496         if test "$ol_with_sql_module" != static; then
15497                 cat >> confdefs.h <<\EOF
15498 #define SLAPD_SQL_DYNAMIC 1
15499 EOF
15500
15501                 BUILD_SQL=mod
15502                 BUILD_SQL_DYNAMIC=shared
15503                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15504         fi
15505 fi
15506
15507 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15508         $BUILD_SLAPD = yes ; then
15509         BUILD_SLURPD=yes
15510 fi
15511
15512 if test "$ol_link_isode" != no ; then
15513         BUILD_LDAPD=yes
15514 fi
15515
15516
15517 if test "$LINK_BINS_DYNAMIC" = yes; then
15518     LIB_LINKAGE=DYN
15519     LT_LIB_LINKAGE=shared
15520 else
15521     LIB_LINKAGE=STAT
15522     LT_LIB_LINKAGE=static
15523 fi
15524
15525 if test "$ac_cv_mingw32" = yes ; then
15526     PLAT=NT
15527     DYN_EXT=dll
15528 else
15529     PLAT=UNIX
15530     DYN_EXT=so
15531 fi
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542   
15543   
15544   
15545   
15546   
15547   
15548   
15549   
15550   
15551   
15552   
15553   
15554   
15555   
15556   
15557   
15558   
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594 trap '' 1 2 15
15595
15596 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15597
15598 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15599 # Let make expand exec_prefix.
15600 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15601
15602 # Any assignment to VPATH causes Sun make to only execute
15603 # the first set of double-colon rules, so remove it if not needed.
15604 # If there is a colon in the path, we need to keep it.
15605 if test "x$srcdir" = x.; then
15606   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15607 fi
15608
15609 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15610
15611 DEFS=-DHAVE_CONFIG_H
15612
15613 # Without the "./", some shells look in PATH for config.status.
15614 : ${CONFIG_STATUS=./config.status}
15615
15616 echo creating $CONFIG_STATUS
15617 rm -f $CONFIG_STATUS
15618 cat > $CONFIG_STATUS <<EOF
15619 #! /bin/sh
15620 # Generated automatically by configure.
15621 # Run this file to recreate the current configuration.
15622 # This directory was configured as follows,
15623 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15624 #
15625 # $0 $ac_configure_args
15626 #
15627 # Compiler output produced by configure, useful for debugging
15628 # configure, is in ./config.log if it exists.
15629
15630 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15631 for ac_option
15632 do
15633   case "\$ac_option" in
15634   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15635     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15636     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15637   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15638     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15639     exit 0 ;;
15640   -help | --help | --hel | --he | --h)
15641     echo "\$ac_cs_usage"; exit 0 ;;
15642   *) echo "\$ac_cs_usage"; exit 1 ;;
15643   esac
15644 done
15645
15646 ac_given_srcdir=$srcdir
15647 ac_given_INSTALL="$INSTALL"
15648
15649 trap 'rm -fr `echo "\
15650 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15651 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15652 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15653 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15654 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15655 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15656 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15657 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15658 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15659 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15660 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15661 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15662 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15663 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15664 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15665 include/Makefile:build/top.mk:include/Makefile.in \
15666 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15667 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15668 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15669 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15670 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15671 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15672 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15673 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15674 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15675 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15676 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15677 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15678 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15679 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15680 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15681 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15682 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15683 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15684 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15685 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15686 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15687 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15688 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15689 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15690 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15691 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15692 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15693 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15694  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15695 EOF
15696 cat >> $CONFIG_STATUS <<EOF
15697
15698 # Protect against being on the right side of a sed subst in config.status.
15699 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15700  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15701 $ac_vpsub
15702 $extrasub
15703 s%@SHELL@%$SHELL%g
15704 s%@CFLAGS@%$CFLAGS%g
15705 s%@CPPFLAGS@%$CPPFLAGS%g
15706 s%@CXXFLAGS@%$CXXFLAGS%g
15707 s%@FFLAGS@%$FFLAGS%g
15708 s%@DEFS@%$DEFS%g
15709 s%@LDFLAGS@%$LDFLAGS%g
15710 s%@LIBS@%$LIBS%g
15711 s%@exec_prefix@%$exec_prefix%g
15712 s%@prefix@%$prefix%g
15713 s%@program_transform_name@%$program_transform_name%g
15714 s%@bindir@%$bindir%g
15715 s%@sbindir@%$sbindir%g
15716 s%@libexecdir@%$libexecdir%g
15717 s%@datadir@%$datadir%g
15718 s%@sysconfdir@%$sysconfdir%g
15719 s%@sharedstatedir@%$sharedstatedir%g
15720 s%@localstatedir@%$localstatedir%g
15721 s%@libdir@%$libdir%g
15722 s%@includedir@%$includedir%g
15723 s%@oldincludedir@%$oldincludedir%g
15724 s%@infodir@%$infodir%g
15725 s%@mandir@%$mandir%g
15726 s%@host@%$host%g
15727 s%@host_alias@%$host_alias%g
15728 s%@host_cpu@%$host_cpu%g
15729 s%@host_vendor@%$host_vendor%g
15730 s%@host_os@%$host_os%g
15731 s%@target@%$target%g
15732 s%@target_alias@%$target_alias%g
15733 s%@target_cpu@%$target_cpu%g
15734 s%@target_vendor@%$target_vendor%g
15735 s%@target_os@%$target_os%g
15736 s%@build@%$build%g
15737 s%@build_alias@%$build_alias%g
15738 s%@build_cpu@%$build_cpu%g
15739 s%@build_vendor@%$build_vendor%g
15740 s%@build_os@%$build_os%g
15741 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15742 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15743 s%@INSTALL_DATA@%$INSTALL_DATA%g
15744 s%@PACKAGE@%$PACKAGE%g
15745 s%@VERSION@%$VERSION%g
15746 s%@ACLOCAL@%$ACLOCAL%g
15747 s%@AUTOCONF@%$AUTOCONF%g
15748 s%@AUTOMAKE@%$AUTOMAKE%g
15749 s%@AUTOHEADER@%$AUTOHEADER%g
15750 s%@MAKEINFO@%$MAKEINFO%g
15751 s%@install_sh@%$install_sh%g
15752 s%@AMTAR@%$AMTAR%g
15753 s%@AWK@%$AWK%g
15754 s%@AMTARFLAGS@%$AMTARFLAGS%g
15755 s%@SET_MAKE@%$SET_MAKE%g
15756 s%@top_builddir@%$top_builddir%g
15757 s%@ldap_subdir@%$ldap_subdir%g
15758 s%@CC@%$CC%g
15759 s%@RANLIB@%$RANLIB%g
15760 s%@LD@%$LD%g
15761 s%@NM@%$NM%g
15762 s%@LN_S@%$LN_S%g
15763 s%@DLLTOOL@%$DLLTOOL%g
15764 s%@AS@%$AS%g
15765 s%@OBJDUMP@%$OBJDUMP%g
15766 s%@LIBTOOL@%$LIBTOOL%g
15767 s%@LN_H@%$LN_H%g
15768 s%@SENDMAIL@%$SENDMAIL%g
15769 s%@EDITOR@%$EDITOR%g
15770 s%@FINGER@%$FINGER%g
15771 s%@PERLBIN@%$PERLBIN%g
15772 s%@CPP@%$CPP%g
15773 s%@EXEEXT@%$EXEEXT%g
15774 s%@OBJEXT@%$OBJEXT%g
15775 s%@OL_MKDEP@%$OL_MKDEP%g
15776 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15777 s%@PEPSY@%$PEPSY%g
15778 s%@LIBOBJS@%$LIBOBJS%g
15779 s%@LIBSRCS@%$LIBSRCS%g
15780 s%@PLAT@%$PLAT%g
15781 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15782 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15783 s%@DYN_EXT@%$DYN_EXT%g
15784 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15785 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15786 s%@BUILD_BDB2@%$BUILD_BDB2%g
15787 s%@BUILD_LDAP@%$BUILD_LDAP%g
15788 s%@BUILD_LDBM@%$BUILD_LDBM%g
15789 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15790 s%@BUILD_PERL@%$BUILD_PERL%g
15791 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15792 s%@BUILD_SHELL@%$BUILD_SHELL%g
15793 s%@BUILD_TCL@%$BUILD_TCL%g
15794 s%@BUILD_SQL@%$BUILD_SQL%g
15795 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15796 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15797 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15798 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15799 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15800 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15801 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15802 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
15803 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15804 s%@LDAP_LIBS@%$LDAP_LIBS%g
15805 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15806 s%@LDIF_LIBS@%$LDIF_LIBS%g
15807 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15808 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15809 s%@LDBM_LIBS@%$LDBM_LIBS%g
15810 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15811 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15812 s%@WRAP_LIBS@%$WRAP_LIBS%g
15813 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15814 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15815 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15816 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15817 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15818 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15819 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15820 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15821 s%@KRB4_LIBS@%$KRB4_LIBS%g
15822 s%@KRB5_LIBS@%$KRB5_LIBS%g
15823 s%@READLINE_LIBS@%$READLINE_LIBS%g
15824 s%@SASL_LIBS@%$SASL_LIBS%g
15825 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15826 s%@TLS_LIBS@%$TLS_LIBS%g
15827 s%@MODULES_LIBS@%$MODULES_LIBS%g
15828 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
15829 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
15830 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
15831
15832 CEOF
15833 EOF
15834
15835 cat >> $CONFIG_STATUS <<\EOF
15836
15837 # Split the substitutions into bite-sized pieces for seds with
15838 # small command number limits, like on Digital OSF/1 and HP-UX.
15839 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15840 ac_file=1 # Number of current file.
15841 ac_beg=1 # First line for current file.
15842 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15843 ac_more_lines=:
15844 ac_sed_cmds=""
15845 while $ac_more_lines; do
15846   if test $ac_beg -gt 1; then
15847     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15848   else
15849     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15850   fi
15851   if test ! -s conftest.s$ac_file; then
15852     ac_more_lines=false
15853     rm -f conftest.s$ac_file
15854   else
15855     if test -z "$ac_sed_cmds"; then
15856       ac_sed_cmds="sed -f conftest.s$ac_file"
15857     else
15858       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15859     fi
15860     ac_file=`expr $ac_file + 1`
15861     ac_beg=$ac_end
15862     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15863   fi
15864 done
15865 if test -z "$ac_sed_cmds"; then
15866   ac_sed_cmds=cat
15867 fi
15868 EOF
15869
15870 cat >> $CONFIG_STATUS <<EOF
15871
15872 CONFIG_FILES=\${CONFIG_FILES-"\
15873 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15874 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15875 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15876 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15877 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15878 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15879 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15880 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15881 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15882 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15883 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15884 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15885 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15886 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15887 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15888 include/Makefile:build/top.mk:include/Makefile.in \
15889 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15890 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15891 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15892 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15893 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15894 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15895 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15896 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15897 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15898 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15899 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15900 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15901 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15902 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15903 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15904 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15905 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15906 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15907 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15908 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15909 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15910 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15911 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15912 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15913 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15914 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15915 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15916 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15917 "}
15918 EOF
15919 cat >> $CONFIG_STATUS <<\EOF
15920 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15921   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15922   case "$ac_file" in
15923   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15924        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15925   *) ac_file_in="${ac_file}.in" ;;
15926   esac
15927
15928   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15929
15930   # Remove last slash and all that follows it.  Not all systems have dirname.
15931   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15932   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15933     # The file is in a subdirectory.
15934     test ! -d "$ac_dir" && mkdir "$ac_dir"
15935     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15936     # A "../" for each directory in $ac_dir_suffix.
15937     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15938   else
15939     ac_dir_suffix= ac_dots=
15940   fi
15941
15942   case "$ac_given_srcdir" in
15943   .)  srcdir=.
15944       if test -z "$ac_dots"; then top_srcdir=.
15945       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15946   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15947   *) # Relative path.
15948     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15949     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15950   esac
15951
15952   case "$ac_given_INSTALL" in
15953   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15954   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15955   esac
15956
15957   echo creating "$ac_file"
15958   rm -f "$ac_file"
15959   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15960   case "$ac_file" in
15961   *[Mm]akefile*) ac_comsub="1i\\
15962 # $configure_input" ;;
15963   *) ac_comsub= ;;
15964   esac
15965
15966   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15967   sed -e "$ac_comsub
15968 s%@configure_input@%$configure_input%g
15969 s%@srcdir@%$srcdir%g
15970 s%@top_srcdir@%$top_srcdir%g
15971 s%@INSTALL@%$INSTALL%g
15972 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15973 fi; done
15974 rm -f conftest.s*
15975
15976 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15977 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15978 #
15979 # ac_d sets the value in "#define NAME VALUE" lines.
15980 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15981 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15982 ac_dC='\3'
15983 ac_dD='%g'
15984 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15985 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15986 ac_uB='\([      ]\)%\1#\2define\3'
15987 ac_uC=' '
15988 ac_uD='\4%g'
15989 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15990 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15991 ac_eB='$%\1#\2define\3'
15992 ac_eC=' '
15993 ac_eD='%g'
15994
15995 if test "${CONFIG_HEADERS+set}" != set; then
15996 EOF
15997 cat >> $CONFIG_STATUS <<EOF
15998   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15999 EOF
16000 cat >> $CONFIG_STATUS <<\EOF
16001 fi
16002 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16003   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16004   case "$ac_file" in
16005   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16006        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16007   *) ac_file_in="${ac_file}.in" ;;
16008   esac
16009
16010   echo creating $ac_file
16011
16012   rm -f conftest.frag conftest.in conftest.out
16013   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16014   cat $ac_file_inputs > conftest.in
16015
16016 EOF
16017
16018 # Transform confdefs.h into a sed script conftest.vals that substitutes
16019 # the proper values into config.h.in to produce config.h.  And first:
16020 # Protect against being on the right side of a sed subst in config.status.
16021 # Protect against being in an unquoted here document in config.status.
16022 rm -f conftest.vals
16023 cat > conftest.hdr <<\EOF
16024 s/[\\&%]/\\&/g
16025 s%[\\$`]%\\&%g
16026 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16027 s%ac_d%ac_u%gp
16028 s%ac_u%ac_e%gp
16029 EOF
16030 sed -n -f conftest.hdr confdefs.h > conftest.vals
16031 rm -f conftest.hdr
16032
16033 # This sed command replaces #undef with comments.  This is necessary, for
16034 # example, in the case of _POSIX_SOURCE, which is predefined and required
16035 # on some systems where configure will not decide to define it.
16036 cat >> conftest.vals <<\EOF
16037 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16038 EOF
16039
16040 # Break up conftest.vals because some shells have a limit on
16041 # the size of here documents, and old seds have small limits too.
16042
16043 rm -f conftest.tail
16044 while :
16045 do
16046   ac_lines=`grep -c . conftest.vals`
16047   # grep -c gives empty output for an empty file on some AIX systems.
16048   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16049   # Write a limited-size here document to conftest.frag.
16050   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16051   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16052   echo 'CEOF
16053   sed -f conftest.frag conftest.in > conftest.out
16054   rm -f conftest.in
16055   mv conftest.out conftest.in
16056 ' >> $CONFIG_STATUS
16057   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16058   rm -f conftest.vals
16059   mv conftest.tail conftest.vals
16060 done
16061 rm -f conftest.vals
16062
16063 cat >> $CONFIG_STATUS <<\EOF
16064   rm -f conftest.frag conftest.h
16065   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16066   cat conftest.in >> conftest.h
16067   rm -f conftest.in
16068   if cmp -s $ac_file conftest.h 2>/dev/null; then
16069     echo "$ac_file is unchanged"
16070     rm -f conftest.h
16071   else
16072     # Remove last slash and all that follows it.  Not all systems have dirname.
16073       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16074       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16075       # The file is in a subdirectory.
16076       test ! -d "$ac_dir" && mkdir "$ac_dir"
16077     fi
16078     rm -f $ac_file
16079     mv conftest.h $ac_file
16080   fi
16081 fi; done
16082
16083 EOF
16084 cat >> $CONFIG_STATUS <<EOF
16085
16086 EOF
16087 cat >> $CONFIG_STATUS <<\EOF
16088
16089 date > stamp-h
16090 echo Please \"make depend\" to build dependencies
16091
16092 exit 0
16093 EOF
16094 chmod +x $CONFIG_STATUS
16095 rm -fr confdefs* $ac_clean_files
16096 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16097