]> git.sur5r.net Git - openldap/blob - configure
Add experimental code to check simple bind passwords
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.293 2000/03/16 18:14:50 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-kbind        enable V2 Kerberos IV bind (auto)"
43 ac_help="$ac_help
44   --enable-cldap        enable connectionless ldap (no)"
45 ac_help="$ac_help
46   --enable-ldapi        enable domain socket (PF_LOCAL) ldap (no)"
47 ac_help="$ac_help
48   --enable-x-compile    enable cross compiling (no)"
49 ac_help="$ac_help
50   --enable-dmalloc      enable debug malloc support (no)"
51 ac_help="$ac_help
52   --with-cyrus-sasl     with Cyrus SASL support (auto)"
53 ac_help="$ac_help
54   --with-fetch          with fetch URL support (auto)"
55 ac_help="$ac_help
56   --with-kerberos       with support (auto)"
57 ac_help="$ac_help
58   --with-readline       with readline support (auto)"
59 ac_help="$ac_help
60   --with-threads        use threads (auto)"
61 ac_help="$ac_help
62   --with-tls            with TLS/SSL support (auto)"
63 ac_help="$ac_help
64   --with-yielding-select        with implicitly yielding select (auto)"
65 ac_help="$ac_help
66 LDAPD (X.500-to-LDAP Gateway) Options:"
67 ac_help="$ac_help
68   --enable-ldapd        enable building ldapd (no)"
69 ac_help="$ac_help
70 SLAPD (Standalone LDAP Daemon) Options:"
71 ac_help="$ac_help
72   --enable-slapd        enable building slapd (yes)"
73 ac_help="$ac_help
74     --enable-cleartext  enable cleartext passwords (yes)"
75 ac_help="$ac_help
76     --enable-crypt      enable crypt(3) passwords (auto)"
77 ac_help="$ac_help
78     --enable-kpasswd    enable kerberos password verification (no)"
79 ac_help="$ac_help
80     --enable-spasswd    enable (Cyrus) SASL password verification (no)"
81 ac_help="$ac_help
82     --enable-modules    enable dynamic module support (no)"
83 ac_help="$ac_help
84     --enable-modules    enable dynamic module support (no)"
85 ac_help="$ac_help
86     --enable-multimaster        enable multimaster replication (no)"
87 ac_help="$ac_help
88     --enable-phonetic   enable phonetic/soundex (no)"
89 ac_help="$ac_help
90     --enable-quipu      build quipu migration tools (no)"
91 ac_help="$ac_help
92     --enable-rlookups   enable reverse lookups (auto)"
93 ac_help="$ac_help
94     --enable-aci        enable per-object ACIs (no)"
95 ac_help="$ac_help
96     --enable-wrappers   enable tcp wrapper support (no)"
97 ac_help="$ac_help
98     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
99 ac_help="$ac_help
100     --enable-bdb2       enable bdb2 backend (no)"
101 ac_help="$ac_help
102       --with-bdb2-module        module type (static)"
103 ac_help="$ac_help
104     --enable-ldap       enable ldap backend (no)"
105 ac_help="$ac_help
106       --with-ldap-module        module type (static)"
107 ac_help="$ac_help
108     --enable-ldbm       enable ldbm backend (yes)"
109 ac_help="$ac_help
110       --with-ldbm-api   use LDBM API (auto)"
111 ac_help="$ac_help
112       --with-ldbm-module        module type (static)"
113 ac_help="$ac_help
114       --with-ldbm-type  use LDBM type (auto)"
115 ac_help="$ac_help
116     --enable-passwd     enable passwd backend (no)"
117 ac_help="$ac_help
118       --with-passwd-module      module type (static)"
119 ac_help="$ac_help
120     --enable-perl       enable perl backend (no)"
121 ac_help="$ac_help
122       --with-perl-module        module type (static)"
123 ac_help="$ac_help
124     --enable-shell      enable shell backend (no)"
125 ac_help="$ac_help
126       --with-shell-module       module type (static)"
127 ac_help="$ac_help
128     --enable-tcl        enable tcl backend (no)"
129 ac_help="$ac_help
130       --with-tcl-module module type (static)"
131 ac_help="$ac_help
132     --enable-sql        enable sql backend (no)"
133 ac_help="$ac_help
134       --with-sql-module module type (static)"
135 ac_help="$ac_help
136 SLURPD (Replication Daemon) Options:"
137 ac_help="$ac_help
138   --enable-slurpd       enable building slurpd (auto)"
139 ac_help="$ac_help
140 Library Generation & Linking Options"
141 ac_help="$ac_help
142   --enable-static[=PKGS]  build static libraries [default=yes]"
143 ac_help="$ac_help
144   --enable-shared[=PKGS]  build shared libraries [default=yes]"
145 ac_help="$ac_help
146   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
147 ac_help="$ac_help
148   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
149 ac_help="$ac_help
150   --disable-libtool-lock  avoid locking (might break parallel builds)"
151
152 # Initialize some variables set by options.
153 # The variables have the same names as the options, with
154 # dashes changed to underlines.
155 build=NONE
156 cache_file=./config.cache
157 exec_prefix=NONE
158 host=NONE
159 no_create=
160 nonopt=NONE
161 no_recursion=
162 prefix=NONE
163 program_prefix=NONE
164 program_suffix=NONE
165 program_transform_name=s,x,x,
166 silent=
167 site=
168 srcdir=
169 target=NONE
170 verbose=
171 x_includes=NONE
172 x_libraries=NONE
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datadir='${prefix}/share'
177 sysconfdir='${prefix}/etc'
178 sharedstatedir='${prefix}/com'
179 localstatedir='${prefix}/var'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${prefix}/info'
184 mandir='${prefix}/man'
185
186 # Initialize some other variables.
187 subdirs=
188 MFLAGS= MAKEFLAGS=
189 SHELL=${CONFIG_SHELL-/bin/sh}
190 # Maximum number of lines to put in a shell here document.
191 ac_max_here_lines=12
192
193 ac_prev=
194 for ac_option
195 do
196
197   # If the previous option needs an argument, assign it.
198   if test -n "$ac_prev"; then
199     eval "$ac_prev=\$ac_option"
200     ac_prev=
201     continue
202   fi
203
204   case "$ac_option" in
205   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
206   *) ac_optarg= ;;
207   esac
208
209   # Accept the important Cygnus configure options, so we can diagnose typos.
210
211   case "$ac_option" in
212
213   -bindir | --bindir | --bindi | --bind | --bin | --bi)
214     ac_prev=bindir ;;
215   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216     bindir="$ac_optarg" ;;
217
218   -build | --build | --buil | --bui | --bu)
219     ac_prev=build ;;
220   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
221     build="$ac_optarg" ;;
222
223   -cache-file | --cache-file | --cache-fil | --cache-fi \
224   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
225     ac_prev=cache_file ;;
226   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
227   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
228     cache_file="$ac_optarg" ;;
229
230   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231     ac_prev=datadir ;;
232   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233   | --da=*)
234     datadir="$ac_optarg" ;;
235
236   -disable-* | --disable-*)
237     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
238     # Reject names that are not valid shell variable names.
239     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
240       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
241     fi
242     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
243     eval "enable_${ac_feature}=no" ;;
244
245   -enable-* | --enable-*)
246     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
247     # Reject names that are not valid shell variable names.
248     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
249       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
250     fi
251     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
252     case "$ac_option" in
253       *=*) ;;
254       *) ac_optarg=yes ;;
255     esac
256     eval "enable_${ac_feature}='$ac_optarg'" ;;
257
258   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
259   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
260   | --exec | --exe | --ex)
261     ac_prev=exec_prefix ;;
262   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
263   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
264   | --exec=* | --exe=* | --ex=*)
265     exec_prefix="$ac_optarg" ;;
266
267   -gas | --gas | --ga | --g)
268     # Obsolete; use --with-gas.
269     with_gas=yes ;;
270
271   -help | --help | --hel | --he)
272     # Omit some internal or obsolete options to make the list less imposing.
273     # This message is too long to be a string in the A/UX 3.1 sh.
274     cat << EOF
275 Usage: configure [options] [host]
276 Options: [defaults in brackets after descriptions]
277 Configuration:
278   --cache-file=FILE       cache test results in FILE
279   --help                  print this message
280   --no-create             do not create output files
281   --quiet, --silent       do not print \`checking...' messages
282   --version               print the version of autoconf that created configure
283 Directory and file names:
284   --prefix=PREFIX         install architecture-independent files in PREFIX
285                           [$ac_default_prefix]
286   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
287                           [same as prefix]
288   --bindir=DIR            user executables in DIR [EPREFIX/bin]
289   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
290   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
291   --datadir=DIR           read-only architecture-independent data in DIR
292                           [PREFIX/share]
293   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
294   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
295                           [PREFIX/com]
296   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
297   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
298   --includedir=DIR        C header files in DIR [PREFIX/include]
299   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
300   --infodir=DIR           info documentation in DIR [PREFIX/info]
301   --mandir=DIR            man documentation in DIR [PREFIX/man]
302   --srcdir=DIR            find the sources in DIR [configure dir or ..]
303   --program-prefix=PREFIX prepend PREFIX to installed program names
304   --program-suffix=SUFFIX append SUFFIX to installed program names
305   --program-transform-name=PROGRAM
306                           run sed PROGRAM on installed program names
307 EOF
308     cat << EOF
309 Host type:
310   --build=BUILD           configure for building on BUILD [BUILD=HOST]
311   --host=HOST             configure for HOST [guessed]
312   --target=TARGET         configure for TARGET [TARGET=HOST]
313 Features and packages:
314   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
315   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
316   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
317   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
318   --x-includes=DIR        X include files are in DIR
319   --x-libraries=DIR       X library files are in DIR
320 EOF
321     if test -n "$ac_help"; then
322       echo "--enable and --with options recognized:$ac_help"
323     fi
324     exit 0 ;;
325
326   -host | --host | --hos | --ho)
327     ac_prev=host ;;
328   -host=* | --host=* | --hos=* | --ho=*)
329     host="$ac_optarg" ;;
330
331   -includedir | --includedir | --includedi | --included | --include \
332   | --includ | --inclu | --incl | --inc)
333     ac_prev=includedir ;;
334   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
335   | --includ=* | --inclu=* | --incl=* | --inc=*)
336     includedir="$ac_optarg" ;;
337
338   -infodir | --infodir | --infodi | --infod | --info | --inf)
339     ac_prev=infodir ;;
340   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
341     infodir="$ac_optarg" ;;
342
343   -libdir | --libdir | --libdi | --libd)
344     ac_prev=libdir ;;
345   -libdir=* | --libdir=* | --libdi=* | --libd=*)
346     libdir="$ac_optarg" ;;
347
348   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
349   | --libexe | --libex | --libe)
350     ac_prev=libexecdir ;;
351   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
352   | --libexe=* | --libex=* | --libe=*)
353     libexecdir="$ac_optarg" ;;
354
355   -localstatedir | --localstatedir | --localstatedi | --localstated \
356   | --localstate | --localstat | --localsta | --localst \
357   | --locals | --local | --loca | --loc | --lo)
358     ac_prev=localstatedir ;;
359   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
360   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
361   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
362     localstatedir="$ac_optarg" ;;
363
364   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
365     ac_prev=mandir ;;
366   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
367     mandir="$ac_optarg" ;;
368
369   -nfp | --nfp | --nf)
370     # Obsolete; use --without-fp.
371     with_fp=no ;;
372
373   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
374   | --no-cr | --no-c)
375     no_create=yes ;;
376
377   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
378   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
379     no_recursion=yes ;;
380
381   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
382   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
383   | --oldin | --oldi | --old | --ol | --o)
384     ac_prev=oldincludedir ;;
385   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
386   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
387   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
388     oldincludedir="$ac_optarg" ;;
389
390   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
391     ac_prev=prefix ;;
392   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
393     prefix="$ac_optarg" ;;
394
395   -program-prefix | --program-prefix | --program-prefi | --program-pref \
396   | --program-pre | --program-pr | --program-p)
397     ac_prev=program_prefix ;;
398   -program-prefix=* | --program-prefix=* | --program-prefi=* \
399   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
400     program_prefix="$ac_optarg" ;;
401
402   -program-suffix | --program-suffix | --program-suffi | --program-suff \
403   | --program-suf | --program-su | --program-s)
404     ac_prev=program_suffix ;;
405   -program-suffix=* | --program-suffix=* | --program-suffi=* \
406   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
407     program_suffix="$ac_optarg" ;;
408
409   -program-transform-name | --program-transform-name \
410   | --program-transform-nam | --program-transform-na \
411   | --program-transform-n | --program-transform- \
412   | --program-transform | --program-transfor \
413   | --program-transfo | --program-transf \
414   | --program-trans | --program-tran \
415   | --progr-tra | --program-tr | --program-t)
416     ac_prev=program_transform_name ;;
417   -program-transform-name=* | --program-transform-name=* \
418   | --program-transform-nam=* | --program-transform-na=* \
419   | --program-transform-n=* | --program-transform-=* \
420   | --program-transform=* | --program-transfor=* \
421   | --program-transfo=* | --program-transf=* \
422   | --program-trans=* | --program-tran=* \
423   | --progr-tra=* | --program-tr=* | --program-t=*)
424     program_transform_name="$ac_optarg" ;;
425
426   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
427   | -silent | --silent | --silen | --sile | --sil)
428     silent=yes ;;
429
430   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
431     ac_prev=sbindir ;;
432   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
433   | --sbi=* | --sb=*)
434     sbindir="$ac_optarg" ;;
435
436   -sharedstatedir | --sharedstatedir | --sharedstatedi \
437   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
438   | --sharedst | --shareds | --shared | --share | --shar \
439   | --sha | --sh)
440     ac_prev=sharedstatedir ;;
441   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
442   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
443   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
444   | --sha=* | --sh=*)
445     sharedstatedir="$ac_optarg" ;;
446
447   -site | --site | --sit)
448     ac_prev=site ;;
449   -site=* | --site=* | --sit=*)
450     site="$ac_optarg" ;;
451
452   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
453     ac_prev=srcdir ;;
454   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
455     srcdir="$ac_optarg" ;;
456
457   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
458   | --syscon | --sysco | --sysc | --sys | --sy)
459     ac_prev=sysconfdir ;;
460   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
461   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
462     sysconfdir="$ac_optarg" ;;
463
464   -target | --target | --targe | --targ | --tar | --ta | --t)
465     ac_prev=target ;;
466   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
467     target="$ac_optarg" ;;
468
469   -v | -verbose | --verbose | --verbos | --verbo | --verb)
470     verbose=yes ;;
471
472   -version | --version | --versio | --versi | --vers)
473     echo "configure generated by autoconf version 2.13.1"
474     exit 0 ;;
475
476   -with-* | --with-*)
477     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
478     # Reject names that are not valid shell variable names.
479     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
480       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
481     fi
482     ac_package=`echo $ac_package| sed 's/-/_/g'`
483     case "$ac_option" in
484       *=*) ;;
485       *) ac_optarg=yes ;;
486     esac
487     eval "with_${ac_package}='$ac_optarg'" ;;
488
489   -without-* | --without-*)
490     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
491     # Reject names that are not valid shell variable names.
492     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
493       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
494     fi
495     ac_package=`echo $ac_package| sed 's/-/_/g'`
496     eval "with_${ac_package}=no" ;;
497
498   --x)
499     # Obsolete; use --with-x.
500     with_x=yes ;;
501
502   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
503   | --x-incl | --x-inc | --x-in | --x-i)
504     ac_prev=x_includes ;;
505   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
506   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
507     x_includes="$ac_optarg" ;;
508
509   -x-libraries | --x-libraries | --x-librarie | --x-librari \
510   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
511     ac_prev=x_libraries ;;
512   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
513   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
514     x_libraries="$ac_optarg" ;;
515
516   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
517     ;;
518
519   *)
520     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
521       echo "configure: warning: $ac_option: invalid host type" 1>&2
522     fi
523     if test "x$nonopt" != xNONE; then
524       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
525     fi
526     nonopt="$ac_option"
527     ;;
528
529   esac
530 done
531
532 if test -n "$ac_prev"; then
533   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
534 fi
535
536 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
537
538 # File descriptor usage:
539 # 0 standard input
540 # 1 file creation
541 # 2 errors and warnings
542 # 3 some systems may open it to /dev/tty
543 # 4 used on the Kubota Titan
544 # 6 checking for... messages and results
545 # 5 compiler messages saved in config.log
546 if test "$silent" = yes; then
547   exec 6>/dev/null
548 else
549   exec 6>&1
550 fi
551 exec 5>./config.log
552
553 echo "\
554 This file contains any messages produced by compilers while
555 running configure, to aid debugging if configure makes a mistake.
556 " 1>&5
557
558 # Strip out --no-create and --no-recursion so they do not pile up.
559 # Also quote any args containing shell metacharacters.
560 ac_configure_args=
561 for ac_arg
562 do
563   case "$ac_arg" in
564   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
565   | --no-cr | --no-c) ;;
566   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
567   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
568   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
569   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
570   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
571   esac
572 done
573
574 # NLS nuisances.
575 # Only set these to C if already set.  These must not be set unconditionally
576 # because not all systems understand e.g. LANG=C (notably SCO).
577 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
578 # Non-C LC_CTYPE values break the ctype check.
579 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
580 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
581 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
582 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
583
584 # confdefs.h avoids OS command line length limits that DEFS can exceed.
585 rm -rf conftest* confdefs.h
586 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
587 echo > confdefs.h
588
589 # A filename unique to this package, relative to the directory that
590 # configure is in, which we can look for to find out if srcdir is correct.
591 ac_unique_file=build/version
592
593 # Find the source files, if location was not specified.
594 if test -z "$srcdir"; then
595   ac_srcdir_defaulted=yes
596   # Try the directory containing this script, then its parent.
597   ac_prog=$0
598   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
599   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
600   srcdir=$ac_confdir
601   if test ! -r $srcdir/$ac_unique_file; then
602     srcdir=..
603   fi
604 else
605   ac_srcdir_defaulted=no
606 fi
607 if test ! -r $srcdir/$ac_unique_file; then
608   if test "$ac_srcdir_defaulted" = yes; then
609     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
610   else
611     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
612   fi
613 fi
614 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
615
616 # Prefer explicitly selected file to automatically selected ones.
617 if test -z "$CONFIG_SITE"; then
618   if test "x$prefix" != xNONE; then
619     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
620   else
621     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
622   fi
623 fi
624 for ac_site_file in $CONFIG_SITE; do
625   if test -r "$ac_site_file"; then
626     echo "loading site script $ac_site_file"
627     . "$ac_site_file"
628   fi
629 done
630
631
632 ac_ext=c
633 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
634 ac_cpp='$CPP $CPPFLAGS'
635 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
636 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
637 cross_compiling=$ac_cv_prog_cc_cross
638
639 ac_exeext=
640 ac_objext=o
641 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
642   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
643   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
644     ac_n= ac_c='
645 ' ac_t='        '
646   else
647     ac_n=-n ac_c= ac_t=
648   fi
649 else
650   ac_n= ac_c='\c' ac_t=
651 fi
652
653 ac_aux_dir=
654 for ac_dir in build $srcdir/build; do
655   if 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/install.sh; then
660     ac_aux_dir=$ac_dir
661     ac_install_sh="$ac_aux_dir/install.sh -c"
662     break
663   elif test -f $ac_dir/shtool; then
664     ac_aux_dir=$ac_dir
665     ac_install_sh="$ac_aux_dir/shtool install -c"
666     break
667   fi
668 done
669 if test -z "$ac_aux_dir"; then
670   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
671 fi
672 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
673 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
674 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
675
676 OL_VERSION=`cat $ac_aux_dir/version`
677 if test -z "$OL_VERSION"; then
678         { echo "configure: error: could not determine version" 1>&2; exit 1; }
679 fi
680
681 echo "Configuring OpenLDAP $OL_VERSION ..."
682
683
684 echo $ac_n "checking host system type""... $ac_c" 1>&6
685 echo "configure:686: checking host system type" >&5
686 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
687
688 # Make sure we can run config.sub.
689   if $ac_config_sub sun4 >/dev/null 2>&1; then :
690     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
691   fi
692
693   ac_cv_host_alias=$host
694   case "$ac_cv_host_alias" in
695   NONE)
696     case $nonopt in
697     NONE)
698       if ac_cv_host_alias=`$ac_config_guess`; then :
699       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
700       fi ;;
701     *) ac_cv_host_alias=$nonopt ;;
702     esac ;;
703   esac
704
705   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
706   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
707   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
708   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
709 else
710   echo $ac_n "(cached) $ac_c" 1>&6
711 fi
712
713 echo "$ac_t""$ac_cv_host" 1>&6
714
715 host=$ac_cv_host
716 host_alias=$ac_cv_host_alias
717 host_cpu=$ac_cv_host_cpu
718 host_vendor=$ac_cv_host_vendor
719 host_os=$ac_cv_host_os
720
721
722
723
724
725 echo $ac_n "checking target system type""... $ac_c" 1>&6
726 echo "configure:727: checking target system type" >&5
727 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
728
729 # Make sure we can run config.sub.
730   if $ac_config_sub sun4 >/dev/null 2>&1; then :
731     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
732   fi
733
734   ac_cv_target_alias=$target
735   case "$ac_cv_target_alias" in
736   NONE)
737     case $nonopt in
738     NONE)
739       ac_cv_target_alias=$host_alias ;;
740
741     *) ac_cv_target_alias=$nonopt ;;
742     esac ;;
743   esac
744
745   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
746   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
747   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
748   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
749 else
750   echo $ac_n "(cached) $ac_c" 1>&6
751 fi
752
753 echo "$ac_t""$ac_cv_target" 1>&6
754
755 target=$ac_cv_target
756 target_alias=$ac_cv_target_alias
757 target_cpu=$ac_cv_target_cpu
758 target_vendor=$ac_cv_target_vendor
759 target_os=$ac_cv_target_os
760
761
762
763
764
765 echo $ac_n "checking build system type""... $ac_c" 1>&6
766 echo "configure:767: checking build system type" >&5
767 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
768
769 # Make sure we can run config.sub.
770   if $ac_config_sub sun4 >/dev/null 2>&1; then :
771     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
772   fi
773
774   ac_cv_build_alias=$build
775   case "$ac_cv_build_alias" in
776   NONE)
777     case $nonopt in
778     NONE)
779       ac_cv_build_alias=$host_alias ;;
780
781     *) ac_cv_build_alias=$nonopt ;;
782     esac ;;
783   esac
784
785   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
786   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
787   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
788   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
789 else
790   echo $ac_n "(cached) $ac_c" 1>&6
791 fi
792
793 echo "$ac_t""$ac_cv_build" 1>&6
794
795 build=$ac_cv_build
796 build_alias=$ac_cv_build_alias
797 build_cpu=$ac_cv_build_cpu
798 build_vendor=$ac_cv_build_vendor
799 build_os=$ac_cv_build_os
800
801
802
803
804
805 # Do some error checking and defaulting for the host and target type.
806 # The inputs are:
807 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
808 #
809 # The rules are:
810 # 1. You are not allowed to specify --host, --target, and nonopt at the
811 #    same time.
812 # 2. Host defaults to nonopt.
813 # 3. If nonopt is not specified, then host defaults to the current host,
814 #    as determined by config.guess.
815 # 4. Target and build default to nonopt.
816 # 5. If nonopt is not specified, then target and build default to host.
817
818 # The aliases save the names the user supplied, while $host etc.
819 # will get canonicalized.
820 case $host---$target---$nonopt in
821 NONE---*---* | *---NONE---* | *---*---NONE) ;;
822 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
823 esac
824
825 test "$host_alias" != "$target_alias" &&
826   test "$program_prefix$program_suffix$program_transform_name" = \
827     NONENONEs,x,x, &&
828   program_prefix=${target_alias}-
829
830
831 # Find a good install program.  We prefer a C program (faster),
832 # so one script is as good as another.  But avoid the broken or
833 # incompatible versions:
834 # SysV /etc/install, /usr/sbin/install
835 # SunOS /usr/etc/install
836 # IRIX /sbin/install
837 # AIX /bin/install
838 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
839 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
840 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
841 # ./install, which can be erroneously created by make from ./install.sh.
842 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
843 echo "configure:844: checking for a BSD compatible install" >&5
844 if test -z "$INSTALL"; then
845 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
846   echo $ac_n "(cached) $ac_c" 1>&6
847 else
848     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
849   for ac_dir in $PATH; do
850     # Account for people who put trailing slashes in PATH elements.
851     case "$ac_dir/" in
852     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
853     *)
854       # OSF1 and SCO ODT 3.0 have their own names for install.
855       # Don't use installbsd from OSF since it installs stuff as root
856       # by default.
857       for ac_prog in ginstall scoinst install; do
858         if test -f $ac_dir/$ac_prog; then
859           if test $ac_prog = install &&
860             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
861             # AIX install.  It has an incompatible calling convention.
862             :
863           elif test $ac_prog = install &&
864             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
865             # program-specific install script used by HP pwplus--don't use.
866             :
867           else
868             ac_cv_path_install="$ac_dir/$ac_prog -c"
869             break 2
870           fi
871         fi
872       done
873       ;;
874     esac
875   done
876   IFS="$ac_save_IFS"
877
878 fi
879   if test "${ac_cv_path_install+set}" = set; then
880     INSTALL="$ac_cv_path_install"
881   else
882     # As a last resort, use the slow shell script.  We don't cache a
883     # path for INSTALL within a source directory, because that will
884     # break other packages using the cache if that directory is
885     # removed, or if the path is relative.
886     INSTALL="$ac_install_sh"
887   fi
888 fi
889 echo "$ac_t""$INSTALL" 1>&6
890
891 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
892 # It thinks the first close brace ends the variable substitution.
893 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
894
895 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
896
897 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
898
899 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
900 echo "configure:901: checking whether build environment is sane" >&5
901 # Just in case
902 sleep 1
903 echo timestamp > conftestfile
904 # Do `set' in a subshell so we don't clobber the current shell's
905 # arguments.  Must try -L first in case configure is actually a
906 # symlink; some systems play weird games with the mod time of symlinks
907 # (eg FreeBSD returns the mod time of the symlink's containing
908 # directory).
909 if (
910    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
911    if test "$*" = "X"; then
912       # -L didn't work.
913       set X `ls -t $srcdir/configure conftestfile`
914    fi
915    if test "$*" != "X $srcdir/configure conftestfile" \
916       && test "$*" != "X conftestfile $srcdir/configure"; then
917
918       # If neither matched, then we have a broken ls.  This can happen
919       # if, for instance, CONFIG_SHELL is bash and it inherits a
920       # broken ls alias from the environment.  This has actually
921       # happened.  Such a system could not be considered "sane".
922       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
923 alias in your environment" 1>&2; exit 1; }
924    fi
925
926    test "$2" = conftestfile
927    )
928 then
929    # Ok.
930    :
931 else
932    { echo "configure: error: newly created file is older than distributed files!
933 Check your system clock" 1>&2; exit 1; }
934 fi
935 rm -f conftest*
936 echo "$ac_t""yes" 1>&6
937 if test "$program_transform_name" = s,x,x,; then
938   program_transform_name=
939 else
940   # Double any \ or $.  echo might interpret backslashes.
941   cat <<\EOF_SED > conftestsed
942 s,\\,\\\\,g; s,\$,$$,g
943 EOF_SED
944   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
945   rm -f conftestsed
946 fi
947 test "$program_prefix" != NONE &&
948   program_transform_name="s,^,${program_prefix},;$program_transform_name"
949 # Use a double $ so make ignores it.
950 test "$program_suffix" != NONE &&
951   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
952
953 # sed with no file args requires a program.
954 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
955
956 for ac_prog in mawk gawk nawk awk
957 do
958 # Extract the first word of "$ac_prog", so it can be a program name with args.
959 set dummy $ac_prog; ac_word=$2
960 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
961 echo "configure:962: checking for $ac_word" >&5
962 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
963   echo $ac_n "(cached) $ac_c" 1>&6
964 else
965   if test -n "$AWK"; then
966   ac_cv_prog_AWK="$AWK" # Let the user override the test.
967 else
968   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
969   ac_dummy="$PATH"
970   for ac_dir in $ac_dummy; do
971     test -z "$ac_dir" && ac_dir=.
972     if test -f $ac_dir/$ac_word; then
973       ac_cv_prog_AWK="$ac_prog"
974       break
975     fi
976   done
977   IFS="$ac_save_ifs"
978 fi
979 fi
980 AWK="$ac_cv_prog_AWK"
981 if test -n "$AWK"; then
982   echo "$ac_t""$AWK" 1>&6
983 else
984   echo "$ac_t""no" 1>&6
985 fi
986
987 test -n "$AWK" && break
988 done
989
990 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
991 echo "configure:992: checking whether ${MAKE-make} sets \${MAKE}" >&5
992 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
993 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
994   echo $ac_n "(cached) $ac_c" 1>&6
995 else
996   cat > conftestmake <<\EOF
997 all:
998         @echo 'ac_maketemp="${MAKE}"'
999 EOF
1000 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1001 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1002 if test -n "$ac_maketemp"; then
1003   eval ac_cv_prog_make_${ac_make}_set=yes
1004 else
1005   eval ac_cv_prog_make_${ac_make}_set=no
1006 fi
1007 rm -f conftestmake
1008 fi
1009 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1010   echo "$ac_t""yes" 1>&6
1011   SET_MAKE=
1012 else
1013   echo "$ac_t""no" 1>&6
1014   SET_MAKE="MAKE=${MAKE-make}"
1015 fi
1016
1017
1018
1019 PACKAGE=OpenLDAP
1020
1021 VERSION=$OL_VERSION
1022
1023 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1024   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1025 fi
1026
1027
1028
1029 missing_dir=`cd $ac_aux_dir && pwd`
1030 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1031 echo "configure:1032: checking for working aclocal" >&5
1032 # Run test in a subshell; some versions of sh will print an error if
1033 # an executable is not found, even if stderr is redirected.
1034 # Redirect stdin to placate older versions of autoconf.  Sigh.
1035 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1036    ACLOCAL=aclocal
1037    echo "$ac_t""found" 1>&6
1038 else
1039    ACLOCAL="$missing_dir/missing aclocal"
1040    echo "$ac_t""missing" 1>&6
1041 fi
1042
1043 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1044 echo "configure:1045: checking for working autoconf" >&5
1045 # Run test in a subshell; some versions of sh will print an error if
1046 # an executable is not found, even if stderr is redirected.
1047 # Redirect stdin to placate older versions of autoconf.  Sigh.
1048 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1049    AUTOCONF=autoconf
1050    echo "$ac_t""found" 1>&6
1051 else
1052    AUTOCONF="$missing_dir/missing autoconf"
1053    echo "$ac_t""missing" 1>&6
1054 fi
1055
1056 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1057 echo "configure:1058: checking for working automake" >&5
1058 # Run test in a subshell; some versions of sh will print an error if
1059 # an executable is not found, even if stderr is redirected.
1060 # Redirect stdin to placate older versions of autoconf.  Sigh.
1061 if (automake --version) < /dev/null > /dev/null 2>&1; then
1062    AUTOMAKE=automake
1063    echo "$ac_t""found" 1>&6
1064 else
1065    AUTOMAKE="$missing_dir/missing automake"
1066    echo "$ac_t""missing" 1>&6
1067 fi
1068
1069 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1070 echo "configure:1071: checking for working autoheader" >&5
1071 # Run test in a subshell; some versions of sh will print an error if
1072 # an executable is not found, even if stderr is redirected.
1073 # Redirect stdin to placate older versions of autoconf.  Sigh.
1074 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1075    AUTOHEADER=autoheader
1076    echo "$ac_t""found" 1>&6
1077 else
1078    AUTOHEADER="$missing_dir/missing autoheader"
1079    echo "$ac_t""missing" 1>&6
1080 fi
1081
1082 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1083 echo "configure:1084: checking for working makeinfo" >&5
1084 # Run test in a subshell; some versions of sh will print an error if
1085 # an executable is not found, even if stderr is redirected.
1086 # Redirect stdin to placate older versions of autoconf.  Sigh.
1087 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1088    MAKEINFO=makeinfo
1089    echo "$ac_t""found" 1>&6
1090 else
1091    MAKEINFO="$missing_dir/missing makeinfo"
1092    echo "$ac_t""missing" 1>&6
1093 fi
1094
1095 install_sh="$missing_dir/install-sh"
1096 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1097
1098 for ac_prog in gnutar gtar tar
1099 do
1100 # Extract the first word of "$ac_prog", so it can be a program name with args.
1101 set dummy $ac_prog; ac_word=$2
1102 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1103 echo "configure:1104: checking for $ac_word" >&5
1104 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1105   echo $ac_n "(cached) $ac_c" 1>&6
1106 else
1107   if test -n "$AMTAR"; then
1108   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1109 else
1110   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1111   ac_dummy="$PATH"
1112   for ac_dir in $ac_dummy; do
1113     test -z "$ac_dir" && ac_dir=.
1114     if test -f $ac_dir/$ac_word; then
1115       ac_cv_prog_AMTAR="$ac_prog"
1116       break
1117     fi
1118   done
1119   IFS="$ac_save_ifs"
1120 fi
1121 fi
1122 AMTAR="$ac_cv_prog_AMTAR"
1123 if test -n "$AMTAR"; then
1124   echo "$ac_t""$AMTAR" 1>&6
1125 else
1126   echo "$ac_t""no" 1>&6
1127 fi
1128
1129 test -n "$AMTAR" && break
1130 done
1131
1132
1133 AMTARFLAGS=
1134 if test -n "$AMTAR"; then
1135   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1136         AMTARFLAGS=o
1137   fi
1138 fi
1139
1140
1141
1142 cat >> confdefs.h <<EOF
1143 #define OPENLDAP_PACKAGE "$PACKAGE"
1144 EOF
1145
1146 cat >> confdefs.h <<EOF
1147 #define OPENLDAP_VERSION "$VERSION"
1148 EOF
1149
1150
1151
1152
1153 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1154 echo "configure:1155: checking configure arguments" >&5
1155
1156
1157 top_builddir=`pwd`
1158
1159 ldap_subdir="/openldap"
1160
1161 # Check whether --with-subdir or --without-subdir was given.
1162 if test "${with_subdir+set}" = set; then
1163   withval="$with_subdir"
1164   case "$withval" in
1165         no) ldap_subdir=""
1166                 ;;
1167         yes)
1168                 ;;
1169         /*|\\*)
1170                 ldap_subdir="$withval"
1171                 ;;
1172         *)
1173                 ldap_subdir="/$withval"
1174                 ;;
1175 esac
1176
1177 fi
1178
1179
1180 # OpenLDAP --enable-debug
1181         # Check whether --enable-debug or --disable-debug was given.
1182 if test "${enable_debug+set}" = set; then
1183   enableval="$enable_debug"
1184   
1185         ol_arg=invalid
1186         for ol_val in auto yes no ; do
1187                 if test "$enableval" = "$ol_val" ; then
1188                         ol_arg="$ol_val"
1189                 fi
1190         done
1191         if test "$ol_arg" = "invalid" ; then
1192                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1193         fi
1194         ol_enable_debug="$ol_arg"
1195
1196 else
1197         ol_enable_debug="yes"
1198 fi
1199 # end --enable-debug
1200 # OpenLDAP --enable-syslog
1201         # Check whether --enable-syslog or --disable-syslog was given.
1202 if test "${enable_syslog+set}" = set; then
1203   enableval="$enable_syslog"
1204   
1205         ol_arg=invalid
1206         for ol_val in auto yes no ; do
1207                 if test "$enableval" = "$ol_val" ; then
1208                         ol_arg="$ol_val"
1209                 fi
1210         done
1211         if test "$ol_arg" = "invalid" ; then
1212                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1213         fi
1214         ol_enable_syslog="$ol_arg"
1215
1216 else
1217         ol_enable_syslog="auto"
1218 fi
1219 # end --enable-syslog
1220 # OpenLDAP --enable-proctitle
1221         # Check whether --enable-proctitle or --disable-proctitle was given.
1222 if test "${enable_proctitle+set}" = set; then
1223   enableval="$enable_proctitle"
1224   
1225         ol_arg=invalid
1226         for ol_val in auto yes no ; do
1227                 if test "$enableval" = "$ol_val" ; then
1228                         ol_arg="$ol_val"
1229                 fi
1230         done
1231         if test "$ol_arg" = "invalid" ; then
1232                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1233         fi
1234         ol_enable_proctitle="$ol_arg"
1235
1236 else
1237         ol_enable_proctitle="yes"
1238 fi
1239 # end --enable-proctitle
1240 # OpenLDAP --enable-cache
1241         # Check whether --enable-cache or --disable-cache was given.
1242 if test "${enable_cache+set}" = set; then
1243   enableval="$enable_cache"
1244   
1245         ol_arg=invalid
1246         for ol_val in auto yes no ; do
1247                 if test "$enableval" = "$ol_val" ; then
1248                         ol_arg="$ol_val"
1249                 fi
1250         done
1251         if test "$ol_arg" = "invalid" ; then
1252                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1253         fi
1254         ol_enable_cache="$ol_arg"
1255
1256 else
1257         ol_enable_cache="yes"
1258 fi
1259 # end --enable-cache
1260 # OpenLDAP --enable-dns
1261         # Check whether --enable-dns or --disable-dns was given.
1262 if test "${enable_dns+set}" = set; then
1263   enableval="$enable_dns"
1264   
1265         ol_arg=invalid
1266         for ol_val in auto yes no ; do
1267                 if test "$enableval" = "$ol_val" ; then
1268                         ol_arg="$ol_val"
1269                 fi
1270         done
1271         if test "$ol_arg" = "invalid" ; then
1272                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1273         fi
1274         ol_enable_dns="$ol_arg"
1275
1276 else
1277         ol_enable_dns="no"
1278 fi
1279 # end --enable-dns
1280 # OpenLDAP --enable-referrals
1281         # Check whether --enable-referrals or --disable-referrals was given.
1282 if test "${enable_referrals+set}" = set; then
1283   enableval="$enable_referrals"
1284   
1285         ol_arg=invalid
1286         for ol_val in auto yes no ; do
1287                 if test "$enableval" = "$ol_val" ; then
1288                         ol_arg="$ol_val"
1289                 fi
1290         done
1291         if test "$ol_arg" = "invalid" ; then
1292                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1293         fi
1294         ol_enable_referrals="$ol_arg"
1295
1296 else
1297         ol_enable_referrals="yes"
1298 fi
1299 # end --enable-referrals
1300 # OpenLDAP --enable-kbind
1301         # Check whether --enable-kbind or --disable-kbind was given.
1302 if test "${enable_kbind+set}" = set; then
1303   enableval="$enable_kbind"
1304   
1305         ol_arg=invalid
1306         for ol_val in auto yes no ; do
1307                 if test "$enableval" = "$ol_val" ; then
1308                         ol_arg="$ol_val"
1309                 fi
1310         done
1311         if test "$ol_arg" = "invalid" ; then
1312                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1313         fi
1314         ol_enable_kbind="$ol_arg"
1315
1316 else
1317         ol_enable_kbind="auto"
1318 fi
1319 # end --enable-kbind
1320 # OpenLDAP --enable-cldap
1321         # Check whether --enable-cldap or --disable-cldap was given.
1322 if test "${enable_cldap+set}" = set; then
1323   enableval="$enable_cldap"
1324   
1325         ol_arg=invalid
1326         for ol_val in auto yes no ; do
1327                 if test "$enableval" = "$ol_val" ; then
1328                         ol_arg="$ol_val"
1329                 fi
1330         done
1331         if test "$ol_arg" = "invalid" ; then
1332                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1333         fi
1334         ol_enable_cldap="$ol_arg"
1335
1336 else
1337         ol_enable_cldap="no"
1338 fi
1339 # end --enable-cldap
1340 # OpenLDAP --enable-ldapi
1341         # Check whether --enable-ldapi or --disable-ldapi was given.
1342 if test "${enable_ldapi+set}" = set; then
1343   enableval="$enable_ldapi"
1344   
1345         ol_arg=invalid
1346         for ol_val in auto yes no ; do
1347                 if test "$enableval" = "$ol_val" ; then
1348                         ol_arg="$ol_val"
1349                 fi
1350         done
1351         if test "$ol_arg" = "invalid" ; then
1352                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1353         fi
1354         ol_enable_ldapi="$ol_arg"
1355
1356 else
1357         ol_enable_ldapi="no"
1358 fi
1359 # end --enable-ldapi
1360 # OpenLDAP --enable-x_compile
1361         # Check whether --enable-x_compile or --disable-x_compile was given.
1362 if test "${enable_x_compile+set}" = set; then
1363   enableval="$enable_x_compile"
1364   
1365         ol_arg=invalid
1366         for ol_val in yes no ; do
1367                 if test "$enableval" = "$ol_val" ; then
1368                         ol_arg="$ol_val"
1369                 fi
1370         done
1371         if test "$ol_arg" = "invalid" ; then
1372                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1373         fi
1374         ol_enable_x_compile="$ol_arg"
1375
1376 else
1377         ol_enable_x_compile="no"
1378 fi
1379 # end --enable-x_compile
1380
1381 # OpenLDAP --enable-dmalloc
1382         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1383 if test "${enable_dmalloc+set}" = set; then
1384   enableval="$enable_dmalloc"
1385   
1386         ol_arg=invalid
1387         for ol_val in auto yes no ; do
1388                 if test "$enableval" = "$ol_val" ; then
1389                         ol_arg="$ol_val"
1390                 fi
1391         done
1392         if test "$ol_arg" = "invalid" ; then
1393                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1394         fi
1395         ol_enable_dmalloc="$ol_arg"
1396
1397 else
1398         ol_enable_dmalloc="no"
1399 fi
1400 # end --enable-dmalloc
1401
1402 # OpenLDAP --with-cyrus_sasl
1403         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1404 if test "${with_cyrus_sasl+set}" = set; then
1405   withval="$with_cyrus_sasl"
1406   
1407         ol_arg=invalid
1408         for ol_val in auto yes no  ; do
1409                 if test "$withval" = "$ol_val" ; then
1410                         ol_arg="$ol_val"
1411                 fi
1412         done
1413         if test "$ol_arg" = "invalid" ; then
1414                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1415         fi
1416         ol_with_cyrus_sasl="$ol_arg"
1417
1418 else
1419         ol_with_cyrus_sasl="auto"
1420 fi
1421 # end --with-cyrus_sasl
1422
1423 # OpenLDAP --with-fetch
1424         # Check whether --with-fetch or --without-fetch was given.
1425 if test "${with_fetch+set}" = set; then
1426   withval="$with_fetch"
1427   
1428         ol_arg=invalid
1429         for ol_val in auto yes no  ; do
1430                 if test "$withval" = "$ol_val" ; then
1431                         ol_arg="$ol_val"
1432                 fi
1433         done
1434         if test "$ol_arg" = "invalid" ; then
1435                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1436         fi
1437         ol_with_fetch="$ol_arg"
1438
1439 else
1440         ol_with_fetch="auto"
1441 fi
1442 # end --with-fetch
1443
1444 # OpenLDAP --with-kerberos
1445         # Check whether --with-kerberos or --without-kerberos was given.
1446 if test "${with_kerberos+set}" = set; then
1447   withval="$with_kerberos"
1448   
1449         ol_arg=invalid
1450         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1451                 if test "$withval" = "$ol_val" ; then
1452                         ol_arg="$ol_val"
1453                 fi
1454         done
1455         if test "$ol_arg" = "invalid" ; then
1456                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1457         fi
1458         ol_with_kerberos="$ol_arg"
1459
1460 else
1461         ol_with_kerberos="auto"
1462 fi
1463 # end --with-kerberos
1464
1465 # OpenLDAP --with-readline
1466         # Check whether --with-readline or --without-readline was given.
1467 if test "${with_readline+set}" = set; then
1468   withval="$with_readline"
1469   
1470         ol_arg=invalid
1471         for ol_val in auto yes no  ; do
1472                 if test "$withval" = "$ol_val" ; then
1473                         ol_arg="$ol_val"
1474                 fi
1475         done
1476         if test "$ol_arg" = "invalid" ; then
1477                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1478         fi
1479         ol_with_readline="$ol_arg"
1480
1481 else
1482         ol_with_readline="auto"
1483 fi
1484 # end --with-readline
1485
1486 # OpenLDAP --with-threads
1487         # Check whether --with-threads or --without-threads was given.
1488 if test "${with_threads+set}" = set; then
1489   withval="$with_threads"
1490   
1491         ol_arg=invalid
1492         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1493                 if test "$withval" = "$ol_val" ; then
1494                         ol_arg="$ol_val"
1495                 fi
1496         done
1497         if test "$ol_arg" = "invalid" ; then
1498                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1499         fi
1500         ol_with_threads="$ol_arg"
1501
1502 else
1503         ol_with_threads="auto"
1504 fi
1505 # end --with-threads
1506
1507 # OpenLDAP --with-tls
1508         # Check whether --with-tls or --without-tls was given.
1509 if test "${with_tls+set}" = set; then
1510   withval="$with_tls"
1511   
1512         ol_arg=invalid
1513         for ol_val in auto ssleay openssl yes no  ; do
1514                 if test "$withval" = "$ol_val" ; then
1515                         ol_arg="$ol_val"
1516                 fi
1517         done
1518         if test "$ol_arg" = "invalid" ; then
1519                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1520         fi
1521         ol_with_tls="$ol_arg"
1522
1523 else
1524         ol_with_tls="auto"
1525 fi
1526 # end --with-tls
1527
1528 # OpenLDAP --with-yielding_select
1529         # Check whether --with-yielding_select or --without-yielding_select was given.
1530 if test "${with_yielding_select+set}" = set; then
1531   withval="$with_yielding_select"
1532   
1533         ol_arg=invalid
1534         for ol_val in auto yes no manual  ; do
1535                 if test "$withval" = "$ol_val" ; then
1536                         ol_arg="$ol_val"
1537                 fi
1538         done
1539         if test "$ol_arg" = "invalid" ; then
1540                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1541         fi
1542         ol_with_yielding_select="$ol_arg"
1543
1544 else
1545         ol_with_yielding_select="auto"
1546 fi
1547 # end --with-yielding_select
1548
1549
1550 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1551 if test "${with_xxldapdoptions+set}" = set; then
1552   withval="$with_xxldapdoptions"
1553   :
1554 fi
1555
1556 # OpenLDAP --enable-ldapd
1557         # Check whether --enable-ldapd or --disable-ldapd was given.
1558 if test "${enable_ldapd+set}" = set; then
1559   enableval="$enable_ldapd"
1560   
1561         ol_arg=invalid
1562         for ol_val in auto yes no ; do
1563                 if test "$enableval" = "$ol_val" ; then
1564                         ol_arg="$ol_val"
1565                 fi
1566         done
1567         if test "$ol_arg" = "invalid" ; then
1568                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1569         fi
1570         ol_enable_ldapd="$ol_arg"
1571
1572 else
1573         ol_enable_ldapd="no"
1574 fi
1575 # end --enable-ldapd
1576
1577 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1578 if test "${with_xxslapdoptions+set}" = set; then
1579   withval="$with_xxslapdoptions"
1580   :
1581 fi
1582
1583 # OpenLDAP --enable-slapd
1584         # Check whether --enable-slapd or --disable-slapd was given.
1585 if test "${enable_slapd+set}" = set; then
1586   enableval="$enable_slapd"
1587   
1588         ol_arg=invalid
1589         for ol_val in auto yes no ; do
1590                 if test "$enableval" = "$ol_val" ; then
1591                         ol_arg="$ol_val"
1592                 fi
1593         done
1594         if test "$ol_arg" = "invalid" ; then
1595                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1596         fi
1597         ol_enable_slapd="$ol_arg"
1598
1599 else
1600         ol_enable_slapd="yes"
1601 fi
1602 # end --enable-slapd
1603 # OpenLDAP --enable-cleartext
1604         # Check whether --enable-cleartext or --disable-cleartext was given.
1605 if test "${enable_cleartext+set}" = set; then
1606   enableval="$enable_cleartext"
1607   
1608         ol_arg=invalid
1609         for ol_val in auto yes no ; do
1610                 if test "$enableval" = "$ol_val" ; then
1611                         ol_arg="$ol_val"
1612                 fi
1613         done
1614         if test "$ol_arg" = "invalid" ; then
1615                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1616         fi
1617         ol_enable_cleartext="$ol_arg"
1618
1619 else
1620         ol_enable_cleartext="yes"
1621 fi
1622 # end --enable-cleartext
1623 # OpenLDAP --enable-crypt
1624         # Check whether --enable-crypt or --disable-crypt was given.
1625 if test "${enable_crypt+set}" = set; then
1626   enableval="$enable_crypt"
1627   
1628         ol_arg=invalid
1629         for ol_val in auto yes no ; do
1630                 if test "$enableval" = "$ol_val" ; then
1631                         ol_arg="$ol_val"
1632                 fi
1633         done
1634         if test "$ol_arg" = "invalid" ; then
1635                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1636         fi
1637         ol_enable_crypt="$ol_arg"
1638
1639 else
1640         ol_enable_crypt="auto"
1641 fi
1642 # end --enable-crypt
1643 # OpenLDAP --enable-kpasswd
1644         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1645 if test "${enable_kpasswd+set}" = set; then
1646   enableval="$enable_kpasswd"
1647   
1648         ol_arg=invalid
1649         for ol_val in auto yes no ; do
1650                 if test "$enableval" = "$ol_val" ; then
1651                         ol_arg="$ol_val"
1652                 fi
1653         done
1654         if test "$ol_arg" = "invalid" ; then
1655                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1656         fi
1657         ol_enable_kpasswd="$ol_arg"
1658
1659 else
1660         ol_enable_kpasswd="no"
1661 fi
1662 # end --enable-kpasswd
1663 # OpenLDAP --enable-spasswd
1664         # Check whether --enable-spasswd or --disable-spasswd was given.
1665 if test "${enable_spasswd+set}" = set; then
1666   enableval="$enable_spasswd"
1667   
1668         ol_arg=invalid
1669         for ol_val in auto yes no ; do
1670                 if test "$enableval" = "$ol_val" ; then
1671                         ol_arg="$ol_val"
1672                 fi
1673         done
1674         if test "$ol_arg" = "invalid" ; then
1675                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1676         fi
1677         ol_enable_spasswd="$ol_arg"
1678
1679 else
1680         ol_enable_spasswd="no"
1681 fi
1682 # end --enable-spasswd
1683 # OpenLDAP --enable-modules
1684         # Check whether --enable-modules or --disable-modules was given.
1685 if test "${enable_modules+set}" = set; then
1686   enableval="$enable_modules"
1687   
1688         ol_arg=invalid
1689         for ol_val in auto yes no ; do
1690                 if test "$enableval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1696         fi
1697         ol_enable_modules="$ol_arg"
1698
1699 else
1700         ol_enable_modules="no"
1701 fi
1702 # end --enable-modules
1703 # OpenLDAP --enable-modules
1704         # Check whether --enable-modules or --disable-modules was given.
1705 if test "${enable_modules+set}" = set; then
1706   enableval="$enable_modules"
1707   
1708         ol_arg=invalid
1709         for ol_val in auto yes no ; do
1710                 if test "$enableval" = "$ol_val" ; then
1711                         ol_arg="$ol_val"
1712                 fi
1713         done
1714         if test "$ol_arg" = "invalid" ; then
1715                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1716         fi
1717         ol_enable_modules="$ol_arg"
1718
1719 else
1720         ol_enable_modules="no"
1721 fi
1722 # end --enable-modules
1723 # OpenLDAP --enable-multimaster
1724         # Check whether --enable-multimaster or --disable-multimaster was given.
1725 if test "${enable_multimaster+set}" = set; then
1726   enableval="$enable_multimaster"
1727   
1728         ol_arg=invalid
1729         for ol_val in auto yes no ; do
1730                 if test "$enableval" = "$ol_val" ; then
1731                         ol_arg="$ol_val"
1732                 fi
1733         done
1734         if test "$ol_arg" = "invalid" ; then
1735                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1736         fi
1737         ol_enable_multimaster="$ol_arg"
1738
1739 else
1740         ol_enable_multimaster="no"
1741 fi
1742 # end --enable-multimaster
1743 # OpenLDAP --enable-phonetic
1744         # Check whether --enable-phonetic or --disable-phonetic was given.
1745 if test "${enable_phonetic+set}" = set; then
1746   enableval="$enable_phonetic"
1747   
1748         ol_arg=invalid
1749         for ol_val in auto yes no ; do
1750                 if test "$enableval" = "$ol_val" ; then
1751                         ol_arg="$ol_val"
1752                 fi
1753         done
1754         if test "$ol_arg" = "invalid" ; then
1755                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1756         fi
1757         ol_enable_phonetic="$ol_arg"
1758
1759 else
1760         ol_enable_phonetic="no"
1761 fi
1762 # end --enable-phonetic
1763 # OpenLDAP --enable-quipu
1764         # Check whether --enable-quipu or --disable-quipu was given.
1765 if test "${enable_quipu+set}" = set; then
1766   enableval="$enable_quipu"
1767   
1768         ol_arg=invalid
1769         for ol_val in auto yes no ; do
1770                 if test "$enableval" = "$ol_val" ; then
1771                         ol_arg="$ol_val"
1772                 fi
1773         done
1774         if test "$ol_arg" = "invalid" ; then
1775                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1776         fi
1777         ol_enable_quipu="$ol_arg"
1778
1779 else
1780         ol_enable_quipu="no"
1781 fi
1782 # end --enable-quipu
1783 # OpenLDAP --enable-rlookups
1784         # Check whether --enable-rlookups or --disable-rlookups was given.
1785 if test "${enable_rlookups+set}" = set; then
1786   enableval="$enable_rlookups"
1787   
1788         ol_arg=invalid
1789         for ol_val in auto yes no ; do
1790                 if test "$enableval" = "$ol_val" ; then
1791                         ol_arg="$ol_val"
1792                 fi
1793         done
1794         if test "$ol_arg" = "invalid" ; then
1795                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1796         fi
1797         ol_enable_rlookups="$ol_arg"
1798
1799 else
1800         ol_enable_rlookups="auto"
1801 fi
1802 # end --enable-rlookups
1803 # OpenLDAP --enable-aci
1804         # Check whether --enable-aci or --disable-aci was given.
1805 if test "${enable_aci+set}" = set; then
1806   enableval="$enable_aci"
1807   
1808         ol_arg=invalid
1809         for ol_val in auto yes no ; do
1810                 if test "$enableval" = "$ol_val" ; then
1811                         ol_arg="$ol_val"
1812                 fi
1813         done
1814         if test "$ol_arg" = "invalid" ; then
1815                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1816         fi
1817         ol_enable_aci="$ol_arg"
1818
1819 else
1820         ol_enable_aci="no"
1821 fi
1822 # end --enable-aci
1823 # OpenLDAP --enable-wrappers
1824         # Check whether --enable-wrappers or --disable-wrappers was given.
1825 if test "${enable_wrappers+set}" = set; then
1826   enableval="$enable_wrappers"
1827   
1828         ol_arg=invalid
1829         for ol_val in auto yes no ; do
1830                 if test "$enableval" = "$ol_val" ; then
1831                         ol_arg="$ol_val"
1832                 fi
1833         done
1834         if test "$ol_arg" = "invalid" ; then
1835                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1836         fi
1837         ol_enable_wrappers="$ol_arg"
1838
1839 else
1840         ol_enable_wrappers="no"
1841 fi
1842 # end --enable-wrappers
1843 # OpenLDAP --enable-dynamic
1844         # Check whether --enable-dynamic or --disable-dynamic was given.
1845 if test "${enable_dynamic+set}" = set; then
1846   enableval="$enable_dynamic"
1847   
1848         ol_arg=invalid
1849         for ol_val in auto yes no ; do
1850                 if test "$enableval" = "$ol_val" ; then
1851                         ol_arg="$ol_val"
1852                 fi
1853         done
1854         if test "$ol_arg" = "invalid" ; then
1855                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1856         fi
1857         ol_enable_dynamic="$ol_arg"
1858
1859 else
1860         ol_enable_dynamic="no"
1861 fi
1862 # end --enable-dynamic
1863
1864 # OpenLDAP --enable-bdb2
1865         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1866 if test "${enable_bdb2+set}" = set; then
1867   enableval="$enable_bdb2"
1868   
1869         ol_arg=invalid
1870         for ol_val in auto yes no ; do
1871                 if test "$enableval" = "$ol_val" ; then
1872                         ol_arg="$ol_val"
1873                 fi
1874         done
1875         if test "$ol_arg" = "invalid" ; then
1876                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1877         fi
1878         ol_enable_bdb2="$ol_arg"
1879
1880 else
1881         ol_enable_bdb2="no"
1882 fi
1883 # end --enable-bdb2
1884 # OpenLDAP --with-bdb2_module
1885         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1886 if test "${with_bdb2_module+set}" = set; then
1887   withval="$with_bdb2_module"
1888   
1889         ol_arg=invalid
1890         for ol_val in static dynamic ; do
1891                 if test "$withval" = "$ol_val" ; then
1892                         ol_arg="$ol_val"
1893                 fi
1894         done
1895         if test "$ol_arg" = "invalid" ; then
1896                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1897         fi
1898         ol_with_bdb2_module="$ol_arg"
1899
1900 else
1901         ol_with_bdb2_module="static"
1902 fi
1903 # end --with-bdb2_module
1904
1905 # OpenLDAP --enable-ldap
1906         # Check whether --enable-ldap or --disable-ldap was given.
1907 if test "${enable_ldap+set}" = set; then
1908   enableval="$enable_ldap"
1909   
1910         ol_arg=invalid
1911         for ol_val in auto yes no ; do
1912                 if test "$enableval" = "$ol_val" ; then
1913                         ol_arg="$ol_val"
1914                 fi
1915         done
1916         if test "$ol_arg" = "invalid" ; then
1917                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1918         fi
1919         ol_enable_ldap="$ol_arg"
1920
1921 else
1922         ol_enable_ldap="no"
1923 fi
1924 # end --enable-ldap
1925 # OpenLDAP --with-ldap_module
1926         # Check whether --with-ldap_module or --without-ldap_module was given.
1927 if test "${with_ldap_module+set}" = set; then
1928   withval="$with_ldap_module"
1929   
1930         ol_arg=invalid
1931         for ol_val in static dynamic ; do
1932                 if test "$withval" = "$ol_val" ; then
1933                         ol_arg="$ol_val"
1934                 fi
1935         done
1936         if test "$ol_arg" = "invalid" ; then
1937                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1938         fi
1939         ol_with_ldap_module="$ol_arg"
1940
1941 else
1942         ol_with_ldap_module="static"
1943 fi
1944 # end --with-ldap_module
1945
1946 # OpenLDAP --enable-ldbm
1947         # Check whether --enable-ldbm or --disable-ldbm was given.
1948 if test "${enable_ldbm+set}" = set; then
1949   enableval="$enable_ldbm"
1950   
1951         ol_arg=invalid
1952         for ol_val in auto yes no ; do
1953                 if test "$enableval" = "$ol_val" ; then
1954                         ol_arg="$ol_val"
1955                 fi
1956         done
1957         if test "$ol_arg" = "invalid" ; then
1958                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1959         fi
1960         ol_enable_ldbm="$ol_arg"
1961
1962 else
1963         ol_enable_ldbm="yes"
1964 fi
1965 # end --enable-ldbm
1966 # OpenLDAP --with-ldbm_api
1967         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1968 if test "${with_ldbm_api+set}" = set; then
1969   withval="$with_ldbm_api"
1970   
1971         ol_arg=invalid
1972         for ol_val in auto db2 db mdbm gdbm manual ; do
1973                 if test "$withval" = "$ol_val" ; then
1974                         ol_arg="$ol_val"
1975                 fi
1976         done
1977         if test "$ol_arg" = "invalid" ; then
1978                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1979         fi
1980         ol_with_ldbm_api="$ol_arg"
1981
1982 else
1983         ol_with_ldbm_api="auto"
1984 fi
1985 # end --with-ldbm_api
1986
1987 # OpenLDAP --with-ldbm_module
1988         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1989 if test "${with_ldbm_module+set}" = set; then
1990   withval="$with_ldbm_module"
1991   
1992         ol_arg=invalid
1993         for ol_val in static dynamic ; do
1994                 if test "$withval" = "$ol_val" ; then
1995                         ol_arg="$ol_val"
1996                 fi
1997         done
1998         if test "$ol_arg" = "invalid" ; then
1999                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2000         fi
2001         ol_with_ldbm_module="$ol_arg"
2002
2003 else
2004         ol_with_ldbm_module="static"
2005 fi
2006 # end --with-ldbm_module
2007
2008 # OpenLDAP --with-ldbm_type
2009         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2010 if test "${with_ldbm_type+set}" = set; then
2011   withval="$with_ldbm_type"
2012   
2013         ol_arg=invalid
2014         for ol_val in auto btree hash ; do
2015                 if test "$withval" = "$ol_val" ; then
2016                         ol_arg="$ol_val"
2017                 fi
2018         done
2019         if test "$ol_arg" = "invalid" ; then
2020                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2021         fi
2022         ol_with_ldbm_type="$ol_arg"
2023
2024 else
2025         ol_with_ldbm_type="auto"
2026 fi
2027 # end --with-ldbm_type
2028
2029
2030 # OpenLDAP --enable-passwd
2031         # Check whether --enable-passwd or --disable-passwd was given.
2032 if test "${enable_passwd+set}" = set; then
2033   enableval="$enable_passwd"
2034   
2035         ol_arg=invalid
2036         for ol_val in auto yes no ; do
2037                 if test "$enableval" = "$ol_val" ; then
2038                         ol_arg="$ol_val"
2039                 fi
2040         done
2041         if test "$ol_arg" = "invalid" ; then
2042                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2043         fi
2044         ol_enable_passwd="$ol_arg"
2045
2046 else
2047         ol_enable_passwd="no"
2048 fi
2049 # end --enable-passwd
2050 # OpenLDAP --with-passwd_module
2051         # Check whether --with-passwd_module or --without-passwd_module was given.
2052 if test "${with_passwd_module+set}" = set; then
2053   withval="$with_passwd_module"
2054   
2055         ol_arg=invalid
2056         for ol_val in static dynamic ; do
2057                 if test "$withval" = "$ol_val" ; then
2058                         ol_arg="$ol_val"
2059                 fi
2060         done
2061         if test "$ol_arg" = "invalid" ; then
2062                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2063         fi
2064         ol_with_passwd_module="$ol_arg"
2065
2066 else
2067         ol_with_passwd_module="static"
2068 fi
2069 # end --with-passwd_module
2070
2071 # OpenLDAP --enable-perl
2072         # Check whether --enable-perl or --disable-perl was given.
2073 if test "${enable_perl+set}" = set; then
2074   enableval="$enable_perl"
2075   
2076         ol_arg=invalid
2077         for ol_val in auto yes no ; do
2078                 if test "$enableval" = "$ol_val" ; then
2079                         ol_arg="$ol_val"
2080                 fi
2081         done
2082         if test "$ol_arg" = "invalid" ; then
2083                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2084         fi
2085         ol_enable_perl="$ol_arg"
2086
2087 else
2088         ol_enable_perl="no"
2089 fi
2090 # end --enable-perl
2091 # OpenLDAP --with-perl_module
2092         # Check whether --with-perl_module or --without-perl_module was given.
2093 if test "${with_perl_module+set}" = set; then
2094   withval="$with_perl_module"
2095   
2096         ol_arg=invalid
2097         for ol_val in static dynamic ; do
2098                 if test "$withval" = "$ol_val" ; then
2099                         ol_arg="$ol_val"
2100                 fi
2101         done
2102         if test "$ol_arg" = "invalid" ; then
2103                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2104         fi
2105         ol_with_perl_module="$ol_arg"
2106
2107 else
2108         ol_with_perl_module="static"
2109 fi
2110 # end --with-perl_module
2111
2112 # OpenLDAP --enable-shell
2113         # Check whether --enable-shell or --disable-shell was given.
2114 if test "${enable_shell+set}" = set; then
2115   enableval="$enable_shell"
2116   
2117         ol_arg=invalid
2118         for ol_val in auto yes no ; do
2119                 if test "$enableval" = "$ol_val" ; then
2120                         ol_arg="$ol_val"
2121                 fi
2122         done
2123         if test "$ol_arg" = "invalid" ; then
2124                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2125         fi
2126         ol_enable_shell="$ol_arg"
2127
2128 else
2129         ol_enable_shell="no"
2130 fi
2131 # end --enable-shell
2132 # OpenLDAP --with-shell_module
2133         # Check whether --with-shell_module or --without-shell_module was given.
2134 if test "${with_shell_module+set}" = set; then
2135   withval="$with_shell_module"
2136   
2137         ol_arg=invalid
2138         for ol_val in static dynamic ; do
2139                 if test "$withval" = "$ol_val" ; then
2140                         ol_arg="$ol_val"
2141                 fi
2142         done
2143         if test "$ol_arg" = "invalid" ; then
2144                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2145         fi
2146         ol_with_shell_module="$ol_arg"
2147
2148 else
2149         ol_with_shell_module="static"
2150 fi
2151 # end --with-shell_module
2152
2153 # OpenLDAP --enable-tcl
2154         # Check whether --enable-tcl or --disable-tcl was given.
2155 if test "${enable_tcl+set}" = set; then
2156   enableval="$enable_tcl"
2157   
2158         ol_arg=invalid
2159         for ol_val in auto yes no ; do
2160                 if test "$enableval" = "$ol_val" ; then
2161                         ol_arg="$ol_val"
2162                 fi
2163         done
2164         if test "$ol_arg" = "invalid" ; then
2165                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2166         fi
2167         ol_enable_tcl="$ol_arg"
2168
2169 else
2170         ol_enable_tcl="no"
2171 fi
2172 # end --enable-tcl
2173 # OpenLDAP --with-tcl_module
2174         # Check whether --with-tcl_module or --without-tcl_module was given.
2175 if test "${with_tcl_module+set}" = set; then
2176   withval="$with_tcl_module"
2177   
2178         ol_arg=invalid
2179         for ol_val in static dynamic ; do
2180                 if test "$withval" = "$ol_val" ; then
2181                         ol_arg="$ol_val"
2182                 fi
2183         done
2184         if test "$ol_arg" = "invalid" ; then
2185                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2186         fi
2187         ol_with_tcl_module="$ol_arg"
2188
2189 else
2190         ol_with_tcl_module="static"
2191 fi
2192 # end --with-tcl_module
2193
2194 # OpenLDAP --enable-sql
2195         # Check whether --enable-sql or --disable-sql was given.
2196 if test "${enable_sql+set}" = set; then
2197   enableval="$enable_sql"
2198   
2199         ol_arg=invalid
2200         for ol_val in auto yes no ; do
2201                 if test "$enableval" = "$ol_val" ; then
2202                         ol_arg="$ol_val"
2203                 fi
2204         done
2205         if test "$ol_arg" = "invalid" ; then
2206                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2207         fi
2208         ol_enable_sql="$ol_arg"
2209
2210 else
2211         ol_enable_sql="no"
2212 fi
2213 # end --enable-sql
2214 # OpenLDAP --with-sql_module
2215         # Check whether --with-sql_module or --without-sql_module was given.
2216 if test "${with_sql_module+set}" = set; then
2217   withval="$with_sql_module"
2218   
2219         ol_arg=invalid
2220         for ol_val in static dynamic ; do
2221                 if test "$withval" = "$ol_val" ; then
2222                         ol_arg="$ol_val"
2223                 fi
2224         done
2225         if test "$ol_arg" = "invalid" ; then
2226                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2227         fi
2228         ol_with_sql_module="$ol_arg"
2229
2230 else
2231         ol_with_sql_module="static"
2232 fi
2233 # end --with-sql_module
2234
2235
2236 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2237 if test "${with_xxslurpdoptions+set}" = set; then
2238   withval="$with_xxslurpdoptions"
2239   :
2240 fi
2241
2242 # OpenLDAP --enable-slurpd
2243         # Check whether --enable-slurpd or --disable-slurpd was given.
2244 if test "${enable_slurpd+set}" = set; then
2245   enableval="$enable_slurpd"
2246   
2247         ol_arg=invalid
2248         for ol_val in auto yes no ; do
2249                 if test "$enableval" = "$ol_val" ; then
2250                         ol_arg="$ol_val"
2251                 fi
2252         done
2253         if test "$ol_arg" = "invalid" ; then
2254                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2255         fi
2256         ol_enable_slurpd="$ol_arg"
2257
2258 else
2259         ol_enable_slurpd="auto"
2260 fi
2261 # end --enable-slurpd
2262
2263 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2264 if test "${with_xxliboptions+set}" = set; then
2265   withval="$with_xxliboptions"
2266   :
2267 fi
2268
2269 # Check whether --enable-static or --disable-static was given.
2270 if test "${enable_static+set}" = set; then
2271   enableval="$enable_static"
2272   p=${PACKAGE-default}
2273 case "$enableval" in
2274 yes) enable_static=yes ;;
2275 no) enable_static=no ;;
2276 *)
2277   enable_static=no
2278   # Look at the argument we got.  We use all the common list separators.
2279   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2280   for pkg in $enableval; do
2281     if test "X$pkg" = "X$p"; then
2282       enable_static=yes
2283     fi
2284   done
2285   IFS="$ac_save_ifs"
2286   ;;
2287 esac
2288 else
2289   enable_static=yes
2290 fi
2291
2292 # Check whether --enable-shared or --disable-shared was given.
2293 if test "${enable_shared+set}" = set; then
2294   enableval="$enable_shared"
2295   p=${PACKAGE-default}
2296 case "$enableval" in
2297 yes) enable_shared=yes ;;
2298 no) enable_shared=no ;;
2299 *)
2300   enable_shared=no
2301   # Look at the argument we got.  We use all the common list separators.
2302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2303   for pkg in $enableval; do
2304     if test "X$pkg" = "X$p"; then
2305       enable_shared=yes
2306     fi
2307   done
2308   IFS="$ac_save_ifs"
2309   ;;
2310 esac
2311 else
2312   enable_shared=yes
2313 fi
2314
2315
2316
2317 # validate options
2318 if test $ol_enable_dns = yes ; then
2319         if test $ol_enable_referrals = no ; then
2320                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2321         fi
2322         if test $ol_enable_referrals = auto ; then
2323                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2324                 ol_enable_referrals=yes
2325         fi
2326 fi
2327
2328 if test $ol_enable_slapd = no ; then
2329                 if test $ol_enable_bdb2 = yes ; then
2330                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2331         fi
2332         if test $ol_enable_ldap = yes ; then
2333                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2334         fi
2335         if test $ol_enable_ldbm = yes ; then
2336                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2337         fi
2338         if test $ol_enable_passwd = yes ; then
2339                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2340         fi
2341         if test $ol_enable_perl = yes ; then
2342                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2343         fi
2344         if test $ol_enable_shell = yes ; then
2345                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2346         fi
2347         if test $ol_enable_tcl = yes ; then
2348                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2349         fi
2350         if test $ol_enable_sql = yes ; then
2351                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2352         fi
2353         if test $ol_enable_modules = yes ; then
2354                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2355         fi
2356         if test $ol_enable_multimaster = yes ; then
2357                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2358         fi
2359         if test $ol_enable_wrappers = yes ; then
2360                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2361         fi
2362         if test $ol_enable_phonetic = yes ; then
2363                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2364         fi
2365         if test $ol_enable_quipu = yes ; then
2366                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2367         fi
2368         if test $ol_enable_rlookups = yes ; then
2369                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2370         fi
2371         if test $ol_enable_aci = yes ; then
2372                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2373         fi
2374         if test $ol_with_ldbm_api != auto ; then
2375                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2376         fi
2377         if test $ol_with_ldbm_type != auto ; then
2378                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2379         fi
2380         if test $ol_with_bdb2_module != static ; then
2381                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2382         fi
2383         if test $ol_with_ldap_module != static ; then
2384                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2385         fi
2386         if test $ol_with_ldbm_module != static ; then
2387                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2388         fi
2389         if test $ol_with_passwd_module != static ; then
2390                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2391         fi
2392         if test $ol_with_perl_module != static ; then
2393                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2394         fi
2395         if test $ol_with_shell_module != static ; then
2396                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2397         fi
2398         if test $ol_with_tcl_module != static ; then
2399                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2400         fi
2401         if test $ol_with_sql_module != static ; then
2402                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2403         fi
2404         if test $ol_enable_slurpd = yes ; then
2405                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2406         fi
2407
2408         # force settings to no
2409         ol_enable_bdb2=no
2410         ol_enable_ldap=no
2411         ol_enable_ldbm=no
2412         ol_enable_passwd=no
2413         ol_enable_perl=no
2414         ol_enable_shell=no
2415         ol_enable_tcl=no
2416         ol_enable_sql=no
2417
2418         ol_enable_modules=no
2419         ol_enable_multimaster=no
2420         ol_enable_phonetic=no
2421         ol_enable_quipu=no
2422         ol_enable_rlookups=no
2423         ol_enable_aci=no
2424         ol_enable_wrappers=no
2425         ol_enable_dynamic=no
2426
2427         ol_with_ldbm_api=no
2428         ol_with_ldbm_type=no
2429
2430         ol_with_bdb2_module=static
2431         ol_with_ldap_module=static
2432         ol_with_ldbm_module=static
2433         ol_with_passwd_module=static
2434         ol_with_perl_module=static
2435         ol_with_shell_module=static
2436         ol_with_tcl_module=static
2437         ol_with_sql_module=static
2438
2439         ol_enable_slurpd=no
2440
2441 elif test $ol_enable_ldbm = no ; then
2442         
2443         if test $ol_with_ldbm_api != auto ; then
2444                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2445         fi
2446
2447         if test $ol_with_ldbm_type != auto ; then
2448                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2449         fi
2450
2451         if test $ol_with_ldbm_module != static ; then
2452                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2453         fi
2454
2455         if test $ol_enable_bdb2 = yes ; then
2456                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2457         fi
2458
2459         if test $ol_enable_modules != yes -a \
2460                 $ol_enable_ldap = no -a \
2461                 $ol_enable_passwd = no -a \
2462                 $ol_enable_perl = no -a \
2463                 $ol_enable_shell = no -a \
2464                 $ol_enable_tcl = no -a \
2465                 $ol_enable_sql = no ; then
2466                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2467         fi
2468
2469         ol_with_ldbm_api=no
2470         ol_with_ldbm_type=no
2471         ol_with_ldbm_module=static
2472
2473 elif test $ol_enable_bdb2 = yes ; then
2474         
2475         if test $ol_with_ldbm_api != auto -a \
2476                 $ol_with_ldbm_api != db2 ; then
2477                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2478         fi
2479
2480         ol_with_ldbm_api=db2
2481
2482 else
2483         
2484         if test $ol_enable_bdb2 != no ; then
2485                 if test $ol_with_ldbm_api != auto -a \
2486                         $ol_with_ldbm_api != db2 ; then
2487                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2488                         ol_enable_bdb2=no
2489                 fi
2490         fi
2491
2492         if test $ol_with_ldbm_api = gdbm -a \
2493                 $ol_with_ldbm_type = btree ; then
2494                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2495         fi
2496         if test $ol_with_ldbm_api = mdbm -a \
2497                 $ol_with_ldbm_type = btree ; then
2498                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2499         fi
2500         if test $ol_with_ldbm_api = ndbm -a \
2501                 $ol_with_ldbm_type = btree ; then
2502                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2503         fi
2504 fi
2505
2506 if test $ol_enable_slurpd = yes ; then
2507                 if test $ol_with_threads = no ; then
2508                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2509         fi
2510 fi
2511
2512 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2513         if test $ol_with_kerberos = no ; then
2514                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2515         fi
2516 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2517         if test $ol_with_kerberos != auto ; then
2518                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2519         else
2520                 ol_with_kerberos=no
2521         fi
2522 fi
2523
2524 if test $ol_enable_spasswd = yes ; then
2525         if test $ol_with_cyrus_sasl = no ; then
2526                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2527         fi
2528         ol_with_cyrus_sasl=yes
2529 fi
2530
2531 echo "$ac_t""done" 1>&6
2532
2533 LDAP_LIBS=
2534 LDIF_LIBS=
2535 LDBM_LIBS=
2536 LTHREAD_LIBS=
2537 LUTIL_LIBS=
2538
2539 LDAPD_LIBS=
2540 SLAPD_LIBS=
2541 SLURPD_LIBS=
2542
2543 BUILD_LDAPD=no
2544 BUILD_SLAPD=no
2545 BUILD_SLURPD=no
2546
2547 BUILD_BDB2=no
2548 BUILD_LDAP=no
2549 BUILD_LDBM=no
2550 BUILD_PASSWD=no
2551 BUILD_PERL=no
2552 BUILD_QUIPU=no
2553 BUILD_SHELL=no
2554 BUILD_TCL=no
2555 BUILD_SQL=no
2556 BUILD_THREAD=no
2557
2558 BUILD_BDB2_DYNAMIC=static
2559 BUILD_LDAP_DYNAMIC=static
2560 BUILD_LDBM_DYNAMIC=static
2561 BUILD_PASSWD_DYNAMIC=static
2562 BUILD_PERL_DYNAMIC=static
2563 BUILD_SHELL_DYNAMIC=static
2564 BUILD_TCL_DYNAMIC=static
2565 BUILD_SQL_DYNAMIC=static
2566
2567 SLAPD_MODULES_LDFLAGS=
2568 SLAPD_MODULES_CPPFLAGS=
2569 SLAPD_MODULES_LIST=
2570
2571 SLAPD_PERL_LDFLAGS=
2572 MOD_PERL_LDFLAGS=
2573 PERL_CPPFLAGS=
2574
2575 SLAPD_SQL_LDFLAGS=
2576 SLAPD_SQL_LIBS=
2577 SLAPD_SQL_INCLUDES=
2578
2579 MOD_TCL_LIB=
2580 KRB4_LIBS=
2581 KRB5_LIBS=
2582 READLINE_LIBS=
2583 SASL_LIBS=
2584 TERMCAP_LIBS=
2585 TLS_LIBS=
2586 MODULES_LIBS=
2587
2588
2589
2590 cat >> confdefs.h <<\EOF
2591 #define HAVE_MKVERSION 1
2592 EOF
2593
2594
2595
2596
2597 ol_aix_threads=no
2598 case "$target" in
2599 *-*-aix*)       if test -z "$CC" ; then
2600                 case "$ol_with_threads" in
2601                 auto | yes |  posix) ol_aix_threads=yes ;;
2602                 esac
2603         fi
2604 ;;
2605 esac
2606
2607 if test $ol_aix_threads = yes ; then
2608         if test -z "${CC}" ; then
2609                 for ac_prog in cc_r xlc_r cc
2610 do
2611 # Extract the first word of "$ac_prog", so it can be a program name with args.
2612 set dummy $ac_prog; ac_word=$2
2613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2614 echo "configure:2615: checking for $ac_word" >&5
2615 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2616   echo $ac_n "(cached) $ac_c" 1>&6
2617 else
2618   if test -n "$CC"; then
2619   ac_cv_prog_CC="$CC" # Let the user override the test.
2620 else
2621   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2622   ac_dummy="$PATH"
2623   for ac_dir in $ac_dummy; do
2624     test -z "$ac_dir" && ac_dir=.
2625     if test -f $ac_dir/$ac_word; then
2626       ac_cv_prog_CC="$ac_prog"
2627       break
2628     fi
2629   done
2630   IFS="$ac_save_ifs"
2631 fi
2632 fi
2633 CC="$ac_cv_prog_CC"
2634 if test -n "$CC"; then
2635   echo "$ac_t""$CC" 1>&6
2636 else
2637   echo "$ac_t""no" 1>&6
2638 fi
2639
2640 test -n "$CC" && break
2641 done
2642
2643
2644                 if test "$CC" = cc ; then
2645                                                 if test $ol_with_threads != auto ; then
2646                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2647                         else
2648                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2649                         fi
2650                         ol_with_threads=no
2651                 fi
2652         fi
2653
2654         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2655                 ol_with_threads=posix
2656                 ol_cv_pthread_create=yes
2657         fi
2658 fi
2659
2660 if test -z "${CC}"; then
2661         for ac_prog in cc
2662 do
2663 # Extract the first word of "$ac_prog", so it can be a program name with args.
2664 set dummy $ac_prog; ac_word=$2
2665 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2666 echo "configure:2667: checking for $ac_word" >&5
2667 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2668   echo $ac_n "(cached) $ac_c" 1>&6
2669 else
2670   if test -n "$CC"; then
2671   ac_cv_prog_CC="$CC" # Let the user override the test.
2672 else
2673   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2674   ac_dummy="$PATH"
2675   for ac_dir in $ac_dummy; do
2676     test -z "$ac_dir" && ac_dir=.
2677     if test -f $ac_dir/$ac_word; then
2678       ac_cv_prog_CC="$ac_prog"
2679       break
2680     fi
2681   done
2682   IFS="$ac_save_ifs"
2683 fi
2684 fi
2685 CC="$ac_cv_prog_CC"
2686 if test -n "$CC"; then
2687   echo "$ac_t""$CC" 1>&6
2688 else
2689   echo "$ac_t""no" 1>&6
2690 fi
2691
2692 test -n "$CC" && break
2693 done
2694
2695 fi
2696
2697
2698
2699
2700 # Check whether --enable-fast-install or --disable-fast-install was given.
2701 if test "${enable_fast_install+set}" = set; then
2702   enableval="$enable_fast_install"
2703   p=${PACKAGE-default}
2704 case "$enableval" in
2705 yes) enable_fast_install=yes ;;
2706 no) enable_fast_install=no ;;
2707 *)
2708   enable_fast_install=no
2709   # Look at the argument we got.  We use all the common list separators.
2710   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2711   for pkg in $enableval; do
2712     if test "X$pkg" = "X$p"; then
2713       enable_fast_install=yes
2714     fi
2715   done
2716   IFS="$ac_save_ifs"
2717   ;;
2718 esac
2719 else
2720   enable_fast_install=yes
2721 fi
2722
2723 # Extract the first word of "ranlib", so it can be a program name with args.
2724 set dummy ranlib; ac_word=$2
2725 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2726 echo "configure:2727: checking for $ac_word" >&5
2727 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2728   echo $ac_n "(cached) $ac_c" 1>&6
2729 else
2730   if test -n "$RANLIB"; then
2731   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2732 else
2733   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2734   ac_dummy="$PATH"
2735   for ac_dir in $ac_dummy; do
2736     test -z "$ac_dir" && ac_dir=.
2737     if test -f $ac_dir/$ac_word; then
2738       ac_cv_prog_RANLIB="ranlib"
2739       break
2740     fi
2741   done
2742   IFS="$ac_save_ifs"
2743   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2744 fi
2745 fi
2746 RANLIB="$ac_cv_prog_RANLIB"
2747 if test -n "$RANLIB"; then
2748   echo "$ac_t""$RANLIB" 1>&6
2749 else
2750   echo "$ac_t""no" 1>&6
2751 fi
2752
2753 # Extract the first word of "gcc", so it can be a program name with args.
2754 set dummy gcc; ac_word=$2
2755 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2756 echo "configure:2757: checking for $ac_word" >&5
2757 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2758   echo $ac_n "(cached) $ac_c" 1>&6
2759 else
2760   if test -n "$CC"; then
2761   ac_cv_prog_CC="$CC" # Let the user override the test.
2762 else
2763   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2764   ac_dummy="$PATH"
2765   for ac_dir in $ac_dummy; do
2766     test -z "$ac_dir" && ac_dir=.
2767     if test -f $ac_dir/$ac_word; then
2768       ac_cv_prog_CC="gcc"
2769       break
2770     fi
2771   done
2772   IFS="$ac_save_ifs"
2773 fi
2774 fi
2775 CC="$ac_cv_prog_CC"
2776 if test -n "$CC"; then
2777   echo "$ac_t""$CC" 1>&6
2778 else
2779   echo "$ac_t""no" 1>&6
2780 fi
2781
2782 if test -z "$CC"; then
2783   # Extract the first word of "cc", so it can be a program name with args.
2784 set dummy cc; 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_prog_rejected=no
2795   ac_dummy="$PATH"
2796   for ac_dir in $ac_dummy; do
2797     test -z "$ac_dir" && ac_dir=.
2798     if test -f $ac_dir/$ac_word; then
2799       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2800         ac_prog_rejected=yes
2801         continue
2802       fi
2803       ac_cv_prog_CC="cc"
2804       break
2805     fi
2806   done
2807   IFS="$ac_save_ifs"
2808 if test $ac_prog_rejected = yes; then
2809   # We found a bogon in the path, so make sure we never use it.
2810   set dummy $ac_cv_prog_CC
2811   shift
2812   if test $# -gt 0; then
2813     # We chose a different compiler from the bogus one.
2814     # However, it has the same basename, so the bogon will be chosen
2815     # first if we set CC to just the basename; use the full file name.
2816     shift
2817     set dummy "$ac_dir/$ac_word" "$@"
2818     shift
2819     ac_cv_prog_CC="$@"
2820   fi
2821 fi
2822 fi
2823 fi
2824 CC="$ac_cv_prog_CC"
2825 if test -n "$CC"; then
2826   echo "$ac_t""$CC" 1>&6
2827 else
2828   echo "$ac_t""no" 1>&6
2829 fi
2830
2831   if test -z "$CC"; then
2832     case "`uname -s`" in
2833     *win32* | *WIN32* | *CYGWIN*)
2834       # Extract the first word of "cl", so it can be a program name with args.
2835 set dummy cl; ac_word=$2
2836 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2837 echo "configure:2838: checking for $ac_word" >&5
2838 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2839   echo $ac_n "(cached) $ac_c" 1>&6
2840 else
2841   if test -n "$CC"; then
2842   ac_cv_prog_CC="$CC" # Let the user override the test.
2843 else
2844   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2845   ac_dummy="$PATH"
2846   for ac_dir in $ac_dummy; do
2847     test -z "$ac_dir" && ac_dir=.
2848     if test -f $ac_dir/$ac_word; then
2849       ac_cv_prog_CC="cl"
2850       break
2851     fi
2852   done
2853   IFS="$ac_save_ifs"
2854 fi
2855 fi
2856 CC="$ac_cv_prog_CC"
2857 if test -n "$CC"; then
2858   echo "$ac_t""$CC" 1>&6
2859 else
2860   echo "$ac_t""no" 1>&6
2861 fi
2862  ;;
2863     esac
2864   fi
2865   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2866 fi
2867
2868 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2869 echo "configure:2870: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2870
2871 ac_ext=c
2872 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2873 ac_cpp='$CPP $CPPFLAGS'
2874 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2875 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2876 cross_compiling=$ac_cv_prog_cc_cross
2877
2878 cat > conftest.$ac_ext << EOF
2879
2880 #line 2881 "configure"
2881 #include "confdefs.h"
2882
2883 main(){return(0);}
2884 EOF
2885 if { (eval echo configure:2886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2886   ac_cv_prog_cc_works=yes
2887   # If we can't run a trivial program, we are probably using a cross compiler.
2888   if (./conftest; exit) 2>/dev/null; then
2889     ac_cv_prog_cc_cross=no
2890   else
2891     ac_cv_prog_cc_cross=yes
2892   fi
2893 else
2894   echo "configure: failed program was:" >&5
2895   cat conftest.$ac_ext >&5
2896   ac_cv_prog_cc_works=no
2897 fi
2898 rm -fr conftest*
2899 ac_ext=c
2900 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2901 ac_cpp='$CPP $CPPFLAGS'
2902 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2903 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2904 cross_compiling=$ac_cv_prog_cc_cross
2905
2906 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2907 if test $ac_cv_prog_cc_works = no; then
2908   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2909 fi
2910 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2911 echo "configure:2912: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2912 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2913 cross_compiling=$ac_cv_prog_cc_cross
2914
2915 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2916 echo "configure:2917: checking whether we are using GNU C" >&5
2917 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2918   echo $ac_n "(cached) $ac_c" 1>&6
2919 else
2920   cat > conftest.c <<EOF
2921 #ifdef __GNUC__
2922   yes;
2923 #endif
2924 EOF
2925 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2926   ac_cv_prog_gcc=yes
2927 else
2928   ac_cv_prog_gcc=no
2929 fi
2930 fi
2931
2932 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2933
2934 if test $ac_cv_prog_gcc = yes; then
2935   GCC=yes
2936 else
2937   GCC=
2938 fi
2939
2940 ac_test_CFLAGS="${CFLAGS+set}"
2941 ac_save_CFLAGS="$CFLAGS"
2942 CFLAGS=
2943 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2944 echo "configure:2945: checking whether ${CC-cc} accepts -g" >&5
2945 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2946   echo $ac_n "(cached) $ac_c" 1>&6
2947 else
2948   echo 'void f(){}' > conftest.c
2949 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2950   ac_cv_prog_cc_g=yes
2951 else
2952   ac_cv_prog_cc_g=no
2953 fi
2954 rm -f conftest*
2955
2956 fi
2957
2958 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2959 if test "$ac_test_CFLAGS" = set; then
2960   CFLAGS="$ac_save_CFLAGS"
2961 elif test $ac_cv_prog_cc_g = yes; then
2962   if test "$GCC" = yes; then
2963     CFLAGS="-g -O2"
2964   else
2965     CFLAGS="-g"
2966   fi
2967 else
2968   if test "$GCC" = yes; then
2969     CFLAGS="-O2"
2970   else
2971     CFLAGS=
2972   fi
2973 fi
2974
2975 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2976 if test "${with_gnu_ld+set}" = set; then
2977   withval="$with_gnu_ld"
2978   test "$withval" = no || with_gnu_ld=yes
2979 else
2980   with_gnu_ld=no
2981 fi
2982
2983 ac_prog=ld
2984 if test "$ac_cv_prog_gcc" = yes; then
2985   # Check if gcc -print-prog-name=ld gives a path.
2986   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2987 echo "configure:2988: checking for ld used by GCC" >&5
2988   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2989   case "$ac_prog" in
2990     # Accept absolute paths.
2991     [\\/]* | [A-Za-z]:[\\/]*)
2992       re_direlt='/[^/][^/]*/\.\./'
2993       # Canonicalize the path of ld
2994       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2995       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2996         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2997       done
2998       test -z "$LD" && LD="$ac_prog"
2999       ;;
3000   "")
3001     # If it fails, then pretend we aren't using GCC.
3002     ac_prog=ld
3003     ;;
3004   *)
3005     # If it is relative, then search for the first ld in PATH.
3006     with_gnu_ld=unknown
3007     ;;
3008   esac
3009 elif test "$with_gnu_ld" = yes; then
3010   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3011 echo "configure:3012: checking for GNU ld" >&5
3012 else
3013   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3014 echo "configure:3015: checking for non-GNU ld" >&5
3015 fi
3016 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
3017   echo $ac_n "(cached) $ac_c" 1>&6
3018 else
3019   if test -z "$LD"; then
3020   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3021   for ac_dir in $PATH; do
3022     test -z "$ac_dir" && ac_dir=.
3023     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3024       ac_cv_path_LD="$ac_dir/$ac_prog"
3025       # Check to see if the program is GNU ld.  I'd rather use --version,
3026       # but apparently some GNU ld's only accept -v.
3027       # Break only if it was the GNU/non-GNU ld that we prefer.
3028       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3029         test "$with_gnu_ld" != no && break
3030       else
3031         test "$with_gnu_ld" != yes && break
3032       fi
3033     fi
3034   done
3035   IFS="$ac_save_ifs"
3036 else
3037   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3038 fi
3039 fi
3040
3041 LD="$ac_cv_path_LD"
3042 if test -n "$LD"; then
3043   echo "$ac_t""$LD" 1>&6
3044 else
3045   echo "$ac_t""no" 1>&6
3046 fi
3047 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3048
3049 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3050 echo "configure:3051: checking if the linker ($LD) is GNU ld" >&5
3051 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3052   echo $ac_n "(cached) $ac_c" 1>&6
3053 else
3054   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3055 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3056   ac_cv_prog_gnu_ld=yes
3057 else
3058   ac_cv_prog_gnu_ld=no
3059 fi
3060 fi
3061
3062 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3063
3064
3065 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3066 echo "configure:3067: checking for BSD-compatible nm" >&5
3067 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3068   echo $ac_n "(cached) $ac_c" 1>&6
3069 else
3070   if test -n "$NM"; then
3071   # Let the user override the test.
3072   ac_cv_path_NM="$NM"
3073 else
3074   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3075   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3076     test -z "$ac_dir" && ac_dir=.
3077     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3078       # Check to see if the nm accepts a BSD-compat flag.
3079       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3080       #   nm: unknown option "B" ignored
3081       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3082         ac_cv_path_NM="$ac_dir/nm -B"
3083         break
3084       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3085         ac_cv_path_NM="$ac_dir/nm -p"
3086         break
3087       else
3088         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3089         continue # so that we can try to find one that supports BSD flags
3090       fi
3091     fi
3092   done
3093   IFS="$ac_save_ifs"
3094   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3095 fi
3096 fi
3097
3098 NM="$ac_cv_path_NM"
3099 echo "$ac_t""$NM" 1>&6
3100
3101
3102 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3103 echo "configure:3104: checking whether ln -s works" >&5
3104 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3105   echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107   rm -f conftestdata
3108 if ln -s X conftestdata 2>/dev/null
3109 then
3110   rm -f conftestdata
3111   ac_cv_prog_LN_S="ln -s"
3112 else
3113   ac_cv_prog_LN_S=ln
3114 fi
3115 fi
3116 LN_S="$ac_cv_prog_LN_S"
3117 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3118   echo "$ac_t""yes" 1>&6
3119 else
3120   echo "$ac_t""no" 1>&6
3121 fi
3122
3123 if test $host != $build; then
3124   ac_tool_prefix=${host_alias}-
3125 else
3126   ac_tool_prefix=
3127 fi
3128
3129
3130 # Check for any special flags to pass to ltconfig.
3131 libtool_flags="--cache-file=$cache_file"
3132 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3133 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3134 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3135 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3136 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3137 libtool_flags="$libtool_flags --enable-dlopen"
3138 libtool_flags="$libtool_flags --enable-win32-dll"
3139 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3140 if test "${enable_libtool_lock+set}" = set; then
3141   enableval="$enable_libtool_lock"
3142   :
3143 fi
3144
3145 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3146 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3147
3148 # Some flags need to be propagated to the compiler or linker for good
3149 # libtool support.
3150 case "$host" in
3151 *-*-irix6*)
3152   # Find out which ABI we are using.
3153   echo '#line 3154 "configure"' > conftest.$ac_ext
3154   if { (eval echo configure:3155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3155     case "`/usr/bin/file conftest.o`" in
3156     *32-bit*)
3157       LD="${LD-ld} -32"
3158       ;;
3159     *N32*)
3160       LD="${LD-ld} -n32"
3161       ;;
3162     *64-bit*)
3163       LD="${LD-ld} -64"
3164       ;;
3165     esac
3166   fi
3167   rm -rf conftest*
3168   ;;
3169
3170 *-*-sco3.2v5*)
3171   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3172   SAVE_CFLAGS="$CFLAGS"
3173   CFLAGS="$CFLAGS -belf"
3174   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3175 echo "configure:3176: checking whether the C compiler needs -belf" >&5
3176 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3177   echo $ac_n "(cached) $ac_c" 1>&6
3178 else
3179   cat > conftest.$ac_ext <<EOF
3180 #line 3181 "configure"
3181 #include "confdefs.h"
3182
3183 int main() {
3184
3185 ; return 0; }
3186 EOF
3187 if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3188   rm -rf conftest*
3189   lt_cv_cc_needs_belf=yes
3190 else
3191   echo "configure: failed program was:" >&5
3192   cat conftest.$ac_ext >&5
3193   rm -rf conftest*
3194   lt_cv_cc_needs_belf=no
3195 fi
3196 rm -f conftest*
3197 fi
3198
3199 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3200   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3201     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3202     CFLAGS="$SAVE_CFLAGS"
3203   fi
3204   ;;
3205
3206 *-*-cygwin* | *-*-mingw*)
3207   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3208 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3209 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3210 echo "configure:3211: checking for $ac_word" >&5
3211 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3212   echo $ac_n "(cached) $ac_c" 1>&6
3213 else
3214   if test -n "$DLLTOOL"; then
3215   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3216 else
3217   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3218   ac_dummy="$PATH"
3219   for ac_dir in $ac_dummy; do
3220     test -z "$ac_dir" && ac_dir=.
3221     if test -f $ac_dir/$ac_word; then
3222       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3223       break
3224     fi
3225   done
3226   IFS="$ac_save_ifs"
3227 fi
3228 fi
3229 DLLTOOL="$ac_cv_prog_DLLTOOL"
3230 if test -n "$DLLTOOL"; then
3231   echo "$ac_t""$DLLTOOL" 1>&6
3232 else
3233   echo "$ac_t""no" 1>&6
3234 fi
3235
3236
3237 if test -z "$ac_cv_prog_DLLTOOL"; then
3238 if test -n "$ac_tool_prefix"; then
3239   # Extract the first word of "dlltool", so it can be a program name with args.
3240 set dummy dlltool; ac_word=$2
3241 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3242 echo "configure:3243: checking for $ac_word" >&5
3243 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3244   echo $ac_n "(cached) $ac_c" 1>&6
3245 else
3246   if test -n "$DLLTOOL"; then
3247   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3248 else
3249   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3250   ac_dummy="$PATH"
3251   for ac_dir in $ac_dummy; do
3252     test -z "$ac_dir" && ac_dir=.
3253     if test -f $ac_dir/$ac_word; then
3254       ac_cv_prog_DLLTOOL="dlltool"
3255       break
3256     fi
3257   done
3258   IFS="$ac_save_ifs"
3259   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3260 fi
3261 fi
3262 DLLTOOL="$ac_cv_prog_DLLTOOL"
3263 if test -n "$DLLTOOL"; then
3264   echo "$ac_t""$DLLTOOL" 1>&6
3265 else
3266   echo "$ac_t""no" 1>&6
3267 fi
3268
3269 else
3270   DLLTOOL="false"
3271 fi
3272 fi
3273
3274   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3275 set dummy ${ac_tool_prefix}as; ac_word=$2
3276 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3277 echo "configure:3278: checking for $ac_word" >&5
3278 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3279   echo $ac_n "(cached) $ac_c" 1>&6
3280 else
3281   if test -n "$AS"; then
3282   ac_cv_prog_AS="$AS" # Let the user override the test.
3283 else
3284   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3285   ac_dummy="$PATH"
3286   for ac_dir in $ac_dummy; do
3287     test -z "$ac_dir" && ac_dir=.
3288     if test -f $ac_dir/$ac_word; then
3289       ac_cv_prog_AS="${ac_tool_prefix}as"
3290       break
3291     fi
3292   done
3293   IFS="$ac_save_ifs"
3294 fi
3295 fi
3296 AS="$ac_cv_prog_AS"
3297 if test -n "$AS"; then
3298   echo "$ac_t""$AS" 1>&6
3299 else
3300   echo "$ac_t""no" 1>&6
3301 fi
3302
3303
3304 if test -z "$ac_cv_prog_AS"; then
3305 if test -n "$ac_tool_prefix"; then
3306   # Extract the first word of "as", so it can be a program name with args.
3307 set dummy as; ac_word=$2
3308 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3309 echo "configure:3310: checking for $ac_word" >&5
3310 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3311   echo $ac_n "(cached) $ac_c" 1>&6
3312 else
3313   if test -n "$AS"; then
3314   ac_cv_prog_AS="$AS" # Let the user override the test.
3315 else
3316   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3317   ac_dummy="$PATH"
3318   for ac_dir in $ac_dummy; do
3319     test -z "$ac_dir" && ac_dir=.
3320     if test -f $ac_dir/$ac_word; then
3321       ac_cv_prog_AS="as"
3322       break
3323     fi
3324   done
3325   IFS="$ac_save_ifs"
3326   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3327 fi
3328 fi
3329 AS="$ac_cv_prog_AS"
3330 if test -n "$AS"; then
3331   echo "$ac_t""$AS" 1>&6
3332 else
3333   echo "$ac_t""no" 1>&6
3334 fi
3335
3336 else
3337   AS="false"
3338 fi
3339 fi
3340
3341   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3342 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3343 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3344 echo "configure:3345: checking for $ac_word" >&5
3345 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3346   echo $ac_n "(cached) $ac_c" 1>&6
3347 else
3348   if test -n "$OBJDUMP"; then
3349   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3350 else
3351   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3352   ac_dummy="$PATH"
3353   for ac_dir in $ac_dummy; do
3354     test -z "$ac_dir" && ac_dir=.
3355     if test -f $ac_dir/$ac_word; then
3356       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3357       break
3358     fi
3359   done
3360   IFS="$ac_save_ifs"
3361 fi
3362 fi
3363 OBJDUMP="$ac_cv_prog_OBJDUMP"
3364 if test -n "$OBJDUMP"; then
3365   echo "$ac_t""$OBJDUMP" 1>&6
3366 else
3367   echo "$ac_t""no" 1>&6
3368 fi
3369
3370
3371 if test -z "$ac_cv_prog_OBJDUMP"; then
3372 if test -n "$ac_tool_prefix"; then
3373   # Extract the first word of "objdump", so it can be a program name with args.
3374 set dummy objdump; ac_word=$2
3375 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3376 echo "configure:3377: checking for $ac_word" >&5
3377 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3378   echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380   if test -n "$OBJDUMP"; then
3381   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3382 else
3383   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3384   ac_dummy="$PATH"
3385   for ac_dir in $ac_dummy; do
3386     test -z "$ac_dir" && ac_dir=.
3387     if test -f $ac_dir/$ac_word; then
3388       ac_cv_prog_OBJDUMP="objdump"
3389       break
3390     fi
3391   done
3392   IFS="$ac_save_ifs"
3393   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3394 fi
3395 fi
3396 OBJDUMP="$ac_cv_prog_OBJDUMP"
3397 if test -n "$OBJDUMP"; then
3398   echo "$ac_t""$OBJDUMP" 1>&6
3399 else
3400   echo "$ac_t""no" 1>&6
3401 fi
3402
3403 else
3404   OBJDUMP="false"
3405 fi
3406 fi
3407
3408   ;;
3409
3410 esac
3411
3412
3413 # Save cache, so that ltconfig can load it
3414
3415
3416 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3417 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3418 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3419 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3420 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3421 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3422 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3423 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3424
3425 # Reload cache, that may have been modified by ltconfig
3426
3427
3428 # This can be used to rebuild libtool when needed
3429 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3430
3431 # Always use our own libtool.
3432 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3433
3434 # Redirect the config.log output again, so that the ltconfig log is not
3435 # clobbered by the next message.
3436 exec 5>>./config.log
3437
3438
3439 for ac_prog in mawk gawk nawk awk
3440 do
3441 # Extract the first word of "$ac_prog", so it can be a program name with args.
3442 set dummy $ac_prog; ac_word=$2
3443 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3444 echo "configure:3445: checking for $ac_word" >&5
3445 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3446   echo $ac_n "(cached) $ac_c" 1>&6
3447 else
3448   if test -n "$AWK"; then
3449   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3450 else
3451   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3452   ac_dummy="$PATH"
3453   for ac_dir in $ac_dummy; do
3454     test -z "$ac_dir" && ac_dir=.
3455     if test -f $ac_dir/$ac_word; then
3456       ac_cv_prog_AWK="$ac_prog"
3457       break
3458     fi
3459   done
3460   IFS="$ac_save_ifs"
3461 fi
3462 fi
3463 AWK="$ac_cv_prog_AWK"
3464 if test -n "$AWK"; then
3465   echo "$ac_t""$AWK" 1>&6
3466 else
3467   echo "$ac_t""no" 1>&6
3468 fi
3469
3470 test -n "$AWK" && break
3471 done
3472
3473 # test for ln hardlink support
3474 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3475 echo "configure:3476: checking whether ln works" >&5
3476 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3477   echo $ac_n "(cached) $ac_c" 1>&6
3478 else
3479   rm -f conftest.src conftest.dst
3480 echo "conftest" > conftest.src
3481 if ln conftest.src conftest.dst 2>/dev/null
3482 then
3483   ol_cv_prog_LN_H="ln"
3484 else
3485   ol_cv_prog_LN_H="cp"
3486 fi
3487 rm -f conftest.src conftest.dst
3488
3489 fi
3490 LN_H="$ol_cv_prog_LN_H"
3491 if test "$ol_cv_prog_LN_H" = "ln"; then
3492         echo "$ac_t""yes" 1>&6
3493 else
3494         echo "$ac_t""no" 1>&6
3495 fi
3496
3497 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3498 echo "configure:3499: checking whether ln -s works" >&5
3499 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3500   echo $ac_n "(cached) $ac_c" 1>&6
3501 else
3502   rm -f conftestdata
3503 if ln -s X conftestdata 2>/dev/null
3504 then
3505   rm -f conftestdata
3506   ac_cv_prog_LN_S="ln -s"
3507 else
3508   ac_cv_prog_LN_S=ln
3509 fi
3510 fi
3511 LN_S="$ac_cv_prog_LN_S"
3512 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3513   echo "$ac_t""yes" 1>&6
3514 else
3515   echo "$ac_t""no" 1>&6
3516 fi
3517
3518
3519 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3520         LN_S="$LN_H"
3521 fi
3522
3523 # Extract the first word of "sendmail", so it can be a program name with args.
3524 set dummy sendmail; ac_word=$2
3525 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3526 echo "configure:3527: checking for $ac_word" >&5
3527 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3528   echo $ac_n "(cached) $ac_c" 1>&6
3529 else
3530   case "$SENDMAIL" in
3531   /*)
3532   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3533   ;;
3534   ?:/*)
3535   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3536   ;;
3537   *)
3538   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3539   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3540   for ac_dir in $ac_dummy; do 
3541     test -z "$ac_dir" && ac_dir=.
3542     if test -f $ac_dir/$ac_word; then
3543       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3544       break
3545     fi
3546   done
3547   IFS="$ac_save_ifs"
3548   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3549   ;;
3550 esac
3551 fi
3552 SENDMAIL="$ac_cv_path_SENDMAIL"
3553 if test -n "$SENDMAIL"; then
3554   echo "$ac_t""$SENDMAIL" 1>&6
3555 else
3556   echo "$ac_t""no" 1>&6
3557 fi
3558
3559 # Extract the first word of "vi", so it can be a program name with args.
3560 set dummy vi; ac_word=$2
3561 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3562 echo "configure:3563: checking for $ac_word" >&5
3563 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3564   echo $ac_n "(cached) $ac_c" 1>&6
3565 else
3566   case "$EDITOR" in
3567   /*)
3568   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3569   ;;
3570   ?:/*)
3571   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3572   ;;
3573   *)
3574   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3575   ac_dummy="$PATH:/usr/ucb"
3576   for ac_dir in $ac_dummy; do 
3577     test -z "$ac_dir" && ac_dir=.
3578     if test -f $ac_dir/$ac_word; then
3579       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3580       break
3581     fi
3582   done
3583   IFS="$ac_save_ifs"
3584   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3585   ;;
3586 esac
3587 fi
3588 EDITOR="$ac_cv_path_EDITOR"
3589 if test -n "$EDITOR"; then
3590   echo "$ac_t""$EDITOR" 1>&6
3591 else
3592   echo "$ac_t""no" 1>&6
3593 fi
3594
3595 # Extract the first word of "finger", so it can be a program name with args.
3596 set dummy finger; ac_word=$2
3597 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3598 echo "configure:3599: checking for $ac_word" >&5
3599 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3600   echo $ac_n "(cached) $ac_c" 1>&6
3601 else
3602   case "$FINGER" in
3603   /*)
3604   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3605   ;;
3606   ?:/*)
3607   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3608   ;;
3609   *)
3610   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3611   ac_dummy="$PATH:/usr/ucb"
3612   for ac_dir in $ac_dummy; do 
3613     test -z "$ac_dir" && ac_dir=.
3614     if test -f $ac_dir/$ac_word; then
3615       ac_cv_path_FINGER="$ac_dir/$ac_word"
3616       break
3617     fi
3618   done
3619   IFS="$ac_save_ifs"
3620   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3621   ;;
3622 esac
3623 fi
3624 FINGER="$ac_cv_path_FINGER"
3625 if test -n "$FINGER"; then
3626   echo "$ac_t""$FINGER" 1>&6
3627 else
3628   echo "$ac_t""no" 1>&6
3629 fi
3630
3631
3632 ol_link_perl=no
3633 if test $ol_enable_perl != no ; then
3634         # Extract the first word of "perl", so it can be a program name with args.
3635 set dummy perl; ac_word=$2
3636 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3637 echo "configure:3638: checking for $ac_word" >&5
3638 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3639   echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641   case "$PERLBIN" in
3642   /*)
3643   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3644   ;;
3645   ?:/*)
3646   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3647   ;;
3648   *)
3649   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3650   ac_dummy="$PATH"
3651   for ac_dir in $ac_dummy; do 
3652     test -z "$ac_dir" && ac_dir=.
3653     if test -f $ac_dir/$ac_word; then
3654       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3655       break
3656     fi
3657   done
3658   IFS="$ac_save_ifs"
3659   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3660   ;;
3661 esac
3662 fi
3663 PERLBIN="$ac_cv_path_PERLBIN"
3664 if test -n "$PERLBIN"; then
3665   echo "$ac_t""$PERLBIN" 1>&6
3666 else
3667   echo "$ac_t""no" 1>&6
3668 fi
3669
3670
3671         if test "no$PERLBIN" = "no" ; then
3672                 if test $ol_enable_perl = yes ; then
3673                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3674                 fi
3675
3676         else
3677                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3678                 if test x"$ol_with_perl_module" = "xstatic" ; then
3679                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3680                 else
3681                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3682                 fi
3683                                 ol_link_perl=yes
3684         fi
3685 fi
3686
3687 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3688 echo "configure:3689: checking how to run the C preprocessor" >&5
3689 # On Suns, sometimes $CPP names a directory.
3690 if test -n "$CPP" && test -d "$CPP"; then
3691   CPP=
3692 fi
3693 if test -z "$CPP"; then
3694 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3695   echo $ac_n "(cached) $ac_c" 1>&6
3696 else
3697     # This must be in double quotes, not single quotes, because CPP may get
3698   # substituted into the Makefile and "${CC-cc}" will confuse make.
3699   CPP="${CC-cc} -E"
3700   # On the NeXT, cc -E runs the code through the compiler's parser,
3701   # not just through cpp.
3702   cat > conftest.$ac_ext <<EOF
3703 #line 3704 "configure"
3704 #include "confdefs.h"
3705 #include <assert.h>
3706 Syntax Error
3707 EOF
3708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3709 { (eval echo configure:3710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3711 if test -z "$ac_err"; then
3712   :
3713 else
3714   echo "$ac_err" >&5
3715   echo "configure: failed program was:" >&5
3716   cat conftest.$ac_ext >&5
3717   rm -rf conftest*
3718   CPP="${CC-cc} -E -traditional-cpp"
3719   cat > conftest.$ac_ext <<EOF
3720 #line 3721 "configure"
3721 #include "confdefs.h"
3722 #include <assert.h>
3723 Syntax Error
3724 EOF
3725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3726 { (eval echo configure:3727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3728 if test -z "$ac_err"; then
3729   :
3730 else
3731   echo "$ac_err" >&5
3732   echo "configure: failed program was:" >&5
3733   cat conftest.$ac_ext >&5
3734   rm -rf conftest*
3735   CPP="${CC-cc} -nologo -E"
3736   cat > conftest.$ac_ext <<EOF
3737 #line 3738 "configure"
3738 #include "confdefs.h"
3739 #include <assert.h>
3740 Syntax Error
3741 EOF
3742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3743 { (eval echo configure:3744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3745 if test -z "$ac_err"; then
3746   :
3747 else
3748   echo "$ac_err" >&5
3749   echo "configure: failed program was:" >&5
3750   cat conftest.$ac_ext >&5
3751   rm -rf conftest*
3752   CPP=/lib/cpp
3753 fi
3754 rm -f conftest*
3755 fi
3756 rm -f conftest*
3757 fi
3758 rm -f conftest*
3759   ac_cv_prog_CPP="$CPP"
3760 fi
3761   CPP="$ac_cv_prog_CPP"
3762 else
3763   ac_cv_prog_CPP="$CPP"
3764 fi
3765 echo "$ac_t""$CPP" 1>&6
3766
3767
3768 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3769         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3770
3771 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3772         echo "configure: warning: programs compiled here do run here..." 1>&2
3773         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3774
3775 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3776         echo "configure: warning: programs compiled here do not run here..." 1>&2
3777         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3778 fi
3779
3780 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3781 echo "configure:3782: checking for AIX" >&5
3782 cat > conftest.$ac_ext <<EOF
3783 #line 3784 "configure"
3784 #include "confdefs.h"
3785 #ifdef _AIX
3786   yes
3787 #endif
3788
3789 EOF
3790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3791   egrep "yes" >/dev/null 2>&1; then
3792   rm -rf conftest*
3793   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3794 #define _ALL_SOURCE 1
3795 EOF
3796
3797 else
3798   rm -rf conftest*
3799   echo "$ac_t""no" 1>&6
3800 fi
3801 rm -f conftest*
3802
3803
3804 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3805 echo "configure:3806: checking for POSIXized ISC" >&5
3806 if test -d /etc/conf/kconfig.d &&
3807   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3808 then
3809   echo "$ac_t""yes" 1>&6
3810   ISC=yes # If later tests want to check for ISC.
3811   cat >> confdefs.h <<\EOF
3812 #define _POSIX_SOURCE 1
3813 EOF
3814
3815   if test "$GCC" = yes; then
3816     CC="$CC -posix"
3817   else
3818     CC="$CC -Xp"
3819   fi
3820 else
3821   echo "$ac_t""no" 1>&6
3822   ISC=
3823 fi
3824
3825 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3826 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3827 echo "configure:3828: checking for minix/config.h" >&5
3828 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3829   echo $ac_n "(cached) $ac_c" 1>&6
3830 else
3831   cat > conftest.$ac_ext <<EOF
3832 #line 3833 "configure"
3833 #include "confdefs.h"
3834 #include <minix/config.h>
3835 EOF
3836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3837 { (eval echo configure:3838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3839 if test -z "$ac_err"; then
3840   rm -rf conftest*
3841   eval "ac_cv_header_$ac_safe=yes"
3842 else
3843   echo "$ac_err" >&5
3844   echo "configure: failed program was:" >&5
3845   cat conftest.$ac_ext >&5
3846   rm -rf conftest*
3847   eval "ac_cv_header_$ac_safe=no"
3848 fi
3849 rm -f conftest*
3850 fi
3851 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3852   echo "$ac_t""yes" 1>&6
3853   MINIX=yes
3854 else
3855   echo "$ac_t""no" 1>&6
3856 MINIX=
3857 fi
3858
3859 if test "$MINIX" = yes; then
3860   cat >> confdefs.h <<\EOF
3861 #define _POSIX_SOURCE 1
3862 EOF
3863
3864   cat >> confdefs.h <<\EOF
3865 #define _POSIX_1_SOURCE 2
3866 EOF
3867
3868   cat >> confdefs.h <<\EOF
3869 #define _MINIX 1
3870 EOF
3871
3872 fi
3873
3874
3875 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3876 echo "configure:3877: checking for Cygwin environment" >&5
3877 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3878   echo $ac_n "(cached) $ac_c" 1>&6
3879 else
3880   cat > conftest.$ac_ext <<EOF
3881 #line 3882 "configure"
3882 #include "confdefs.h"
3883
3884 int main() {
3885
3886 #ifndef __CYGWIN__
3887 #define __CYGWIN__ __CYGWIN32__
3888 #endif
3889 return __CYGWIN__;
3890 ; return 0; }
3891 EOF
3892 if { (eval echo configure:3893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3893   rm -rf conftest*
3894   ac_cv_cygwin=yes
3895 else
3896   echo "configure: failed program was:" >&5
3897   cat conftest.$ac_ext >&5
3898   rm -rf conftest*
3899   ac_cv_cygwin=no
3900 fi
3901 rm -f conftest*
3902 fi
3903
3904 echo "$ac_t""$ac_cv_cygwin" 1>&6
3905 CYGWIN=
3906 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3907 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3908 echo "configure:3909: checking for mingw32 environment" >&5
3909 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3910   echo $ac_n "(cached) $ac_c" 1>&6
3911 else
3912   cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915
3916 int main() {
3917 return __MINGW32__;
3918 ; return 0; }
3919 EOF
3920 if { (eval echo configure:3921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3921   rm -rf conftest*
3922   ac_cv_mingw32=yes
3923 else
3924   echo "configure: failed program was:" >&5
3925   cat conftest.$ac_ext >&5
3926   rm -rf conftest*
3927   ac_cv_mingw32=no
3928 fi
3929 rm -f conftest*
3930 fi
3931
3932 echo "$ac_t""$ac_cv_mingw32" 1>&6
3933 MINGW32=
3934 test "$ac_cv_mingw32" = yes && MINGW32=yes
3935 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3936 echo "configure:3937: checking for EMX OS/2 environment" >&5
3937 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3938   echo $ac_n "(cached) $ac_c" 1>&6
3939 else
3940   cat > conftest.$ac_ext <<EOF
3941 #line 3942 "configure"
3942 #include "confdefs.h"
3943
3944 int main() {
3945 return __EMX__;
3946 ; return 0; }
3947 EOF
3948 if { (eval echo configure:3949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3949   rm -rf conftest*
3950   ac_cv_emxos2=yes
3951 else
3952   echo "configure: failed program was:" >&5
3953   cat conftest.$ac_ext >&5
3954   rm -rf conftest*
3955   ac_cv_emxos2=no
3956 fi
3957 rm -f conftest*
3958 fi
3959
3960 echo "$ac_t""$ac_cv_emxos2" 1>&6
3961 EMXOS2=
3962 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3963
3964
3965
3966 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3967 echo "configure:3968: checking for executable suffix" >&5
3968 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3969   echo $ac_n "(cached) $ac_c" 1>&6
3970 else
3971   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3972   ac_cv_exeext=.exe
3973 else
3974   rm -f conftest*
3975   echo 'int main () { return 0; }' > conftest.$ac_ext
3976   ac_cv_exeext=
3977   if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3978     for file in conftest.*; do
3979       case $file in
3980       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3981       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3982       esac
3983     done
3984   else
3985     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3986   fi
3987   rm -f conftest*
3988   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3989 fi
3990 fi
3991
3992 EXEEXT=""
3993 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3994 echo "$ac_t""${ac_cv_exeext}" 1>&6
3995 ac_exeext=$EXEEXT
3996
3997 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3998 echo "configure:3999: checking for object suffix" >&5
3999 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4000   echo $ac_n "(cached) $ac_c" 1>&6
4001 else
4002   rm -f conftest*
4003 echo 'int i = 1;' > conftest.$ac_ext
4004 if { (eval echo configure:4005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4005   for ac_file in conftest.*; do
4006     case $ac_file in
4007     *.c) ;;
4008     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4009     esac
4010   done
4011 else
4012   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4013 fi
4014 rm -f conftest*
4015 fi
4016
4017 echo "$ac_t""$ac_cv_objext" 1>&6
4018 OBJEXT=$ac_cv_objext
4019 ac_objext=$ac_cv_objext
4020
4021
4022 cat >> confdefs.h <<EOF
4023 #define EXEEXT "${EXEEXT}"
4024 EOF
4025
4026
4027 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4028 echo "configure:4029: checking for be_app in -lbe" >&5
4029 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4030 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4031   echo $ac_n "(cached) $ac_c" 1>&6
4032 else
4033   ac_save_LIBS="$LIBS"
4034 LIBS="-lbe -lroot -lnet $LIBS"
4035 cat > conftest.$ac_ext <<EOF
4036 #line 4037 "configure"
4037 #include "confdefs.h"
4038 /* Override any gcc2 internal prototype to avoid an error.  */
4039 /* We use char because int might match the return type of a gcc2
4040     builtin and then its argument prototype would still apply.  */
4041 char be_app();
4042
4043 int main() {
4044 be_app()
4045 ; return 0; }
4046 EOF
4047 if { (eval echo configure:4048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4048   rm -rf conftest*
4049   eval "ac_cv_lib_$ac_lib_var=yes"
4050 else
4051   echo "configure: failed program was:" >&5
4052   cat conftest.$ac_ext >&5
4053   rm -rf conftest*
4054   eval "ac_cv_lib_$ac_lib_var=no"
4055 fi
4056 rm -f conftest*
4057 LIBS="$ac_save_LIBS"
4058
4059 fi
4060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4061   echo "$ac_t""yes" 1>&6
4062   LIBS="$LIBS -lbe -lroot -lnet"
4063 else
4064   echo "$ac_t""no" 1>&6
4065 :
4066 fi
4067
4068
4069
4070
4071
4072 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4073 echo "configure:4074: checking for ${CC-cc} option to accept ANSI C" >&5
4074 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4075   echo $ac_n "(cached) $ac_c" 1>&6
4076 else
4077   am_cv_prog_cc_stdc=no
4078 ac_save_CC="$CC"
4079 # Don't try gcc -ansi; that turns off useful extensions and
4080 # breaks some systems' header files.
4081 # AIX                   -qlanglvl=ansi
4082 # Ultrix and OSF/1      -std1
4083 # HP-UX 10.20 and later -Ae
4084 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4085 # SVR4                  -Xc -D__EXTENSIONS__
4086 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4087 do
4088   CC="$ac_save_CC $ac_arg"
4089   cat > conftest.$ac_ext <<EOF
4090 #line 4091 "configure"
4091 #include "confdefs.h"
4092 #include <stdarg.h>
4093 #include <stdio.h>
4094 #include <sys/types.h>
4095 #include <sys/stat.h>
4096 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4097 struct buf { int x; };
4098 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4099 static char *e (p, i)
4100      char **p;
4101      int i;
4102 {
4103   return p[i];
4104 }
4105 static char *f (char * (*g) (char **, int), char **p, ...)
4106 {
4107   char *s;
4108   va_list v;
4109   va_start (v,p);
4110   s = g (p, va_arg (v,int));
4111   va_end (v);
4112   return s;
4113 }
4114 int test (int i, double x);
4115 struct s1 {int (*f) (int a);};
4116 struct s2 {int (*f) (double a);};
4117 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4118 int argc;
4119 char **argv;
4120
4121 int main() {
4122
4123 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4124
4125 ; return 0; }
4126 EOF
4127 if { (eval echo configure:4128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4128   rm -rf conftest*
4129   am_cv_prog_cc_stdc="$ac_arg"; break
4130 else
4131   echo "configure: failed program was:" >&5
4132   cat conftest.$ac_ext >&5
4133 fi
4134 rm -f conftest*
4135 done
4136 CC="$ac_save_CC"
4137
4138 fi
4139
4140 if test -z "$am_cv_prog_cc_stdc"; then
4141   echo "$ac_t""none needed" 1>&6
4142 else
4143   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4144 fi
4145 case "x$am_cv_prog_cc_stdc" in
4146   x|xno) ;;
4147   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4148 esac
4149
4150 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4151         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4152 fi
4153
4154 # test for make depend flag
4155 OL_MKDEP=
4156 OL_MKDEP_FLAGS=
4157 if test -z "${MKDEP}"; then
4158         OL_MKDEP="${CC-cc}"
4159         if test -z "${MKDEP_FLAGS}"; then
4160                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4161 echo "configure:4162: checking for ${OL_MKDEP} depend flag" >&5
4162 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4163   echo $ac_n "(cached) $ac_c" 1>&6
4164 else
4165   
4166                         ol_cv_mkdep=no
4167                         for flag in "-M" "-xM"; do
4168                                 cat > conftest.c <<EOF
4169  noCode;
4170 EOF
4171                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4172                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4173                                 then
4174                                         if test ! -f conftest."${ac_object}" ; then
4175                                                 ol_cv_mkdep=$flag
4176                                                 OL_MKDEP_FLAGS="$flag"
4177                                                 break
4178                                         fi
4179                                 fi
4180                         done
4181                         rm -f conftest*
4182                 
4183 fi
4184
4185 echo "$ac_t""$ol_cv_mkdep" 1>&6
4186         else
4187                 cc_cv_mkdep=yes
4188                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4189         fi
4190 else
4191         cc_cv_mkdep=yes
4192         OL_MKDEP="${MKDEP}"
4193         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4194 fi
4195
4196
4197
4198 if test "${ol_cv_mkdep}" = no ; then
4199         # this will soon become an error
4200         echo "configure: warning: do not know how to generate dependencies" 1>&2
4201 fi
4202
4203 ol_link_modules=no
4204 if test $ol_enable_modules != no ; then
4205         for ac_hdr in ltdl.h
4206 do
4207 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4208 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4209 echo "configure:4210: checking for $ac_hdr" >&5
4210 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4211   echo $ac_n "(cached) $ac_c" 1>&6
4212 else
4213   cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216 #include <$ac_hdr>
4217 EOF
4218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4219 { (eval echo configure:4220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4221 if test -z "$ac_err"; then
4222   rm -rf conftest*
4223   eval "ac_cv_header_$ac_safe=yes"
4224 else
4225   echo "$ac_err" >&5
4226   echo "configure: failed program was:" >&5
4227   cat conftest.$ac_ext >&5
4228   rm -rf conftest*
4229   eval "ac_cv_header_$ac_safe=no"
4230 fi
4231 rm -f conftest*
4232 fi
4233 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4234   echo "$ac_t""yes" 1>&6
4235     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4236   cat >> confdefs.h <<EOF
4237 #define $ac_tr_hdr 1
4238 EOF
4239  
4240 else
4241   echo "$ac_t""no" 1>&6
4242 fi
4243 done
4244
4245
4246         if test $ac_cv_header_ltdl_h = no ; then
4247                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4248         fi
4249
4250         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4251 echo "configure:4252: checking for lt_dlinit in -lltdl" >&5
4252 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4253 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4254   echo $ac_n "(cached) $ac_c" 1>&6
4255 else
4256   ac_save_LIBS="$LIBS"
4257 LIBS="-lltdl  $LIBS"
4258 cat > conftest.$ac_ext <<EOF
4259 #line 4260 "configure"
4260 #include "confdefs.h"
4261 /* Override any gcc2 internal prototype to avoid an error.  */
4262 /* We use char because int might match the return type of a gcc2
4263     builtin and then its argument prototype would still apply.  */
4264 char lt_dlinit();
4265
4266 int main() {
4267 lt_dlinit()
4268 ; return 0; }
4269 EOF
4270 if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4271   rm -rf conftest*
4272   eval "ac_cv_lib_$ac_lib_var=yes"
4273 else
4274   echo "configure: failed program was:" >&5
4275   cat conftest.$ac_ext >&5
4276   rm -rf conftest*
4277   eval "ac_cv_lib_$ac_lib_var=no"
4278 fi
4279 rm -f conftest*
4280 LIBS="$ac_save_LIBS"
4281
4282 fi
4283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4284   echo "$ac_t""yes" 1>&6
4285   
4286             MODULES_LIBS=-lltdl
4287             cat >> confdefs.h <<\EOF
4288 #define HAVE_LIBLTDL 1
4289 EOF
4290
4291         
4292 else
4293   echo "$ac_t""no" 1>&6
4294 fi
4295
4296
4297         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4298                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4299         fi
4300         ol_link_modules=yes
4301 else
4302         ol_with_bdb2_module=static
4303         ol_with_ldap_module=static
4304         ol_with_ldbm_module=static
4305         ol_with_passwd_module=static
4306         ol_with_perl_module=static
4307         ol_with_shell_module=static
4308         ol_with_tcl_module=static
4309         ol_with_sql_module=static
4310 fi
4311
4312 # test for EBCDIC
4313 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4314 echo "configure:4315: checking for EBCDIC" >&5
4315 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4316   echo $ac_n "(cached) $ac_c" 1>&6
4317 else
4318   
4319         cat > conftest.$ac_ext <<EOF
4320 #line 4321 "configure"
4321 #include "confdefs.h"
4322
4323 #if !('M' == 0xd4)
4324 #include <__ASCII__/generate_error.h>
4325 #endif
4326
4327 EOF
4328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4329 { (eval echo configure:4330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4331 if test -z "$ac_err"; then
4332   rm -rf conftest*
4333   ol_cv_cpp_ebcdic=yes
4334 else
4335   echo "$ac_err" >&5
4336   echo "configure: failed program was:" >&5
4337   cat conftest.$ac_ext >&5
4338   rm -rf conftest*
4339   ol_cv_cpp_ebcdic=no
4340 fi
4341 rm -f conftest*
4342 fi
4343
4344 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4345 if test $ol_cv_cpp_ebcdic = yes ; then
4346         cat >> confdefs.h <<\EOF
4347 #define HAVE_EBCDIC 1
4348 EOF
4349
4350 fi
4351
4352 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4353 echo "configure:4354: checking for ANSI C header files" >&5
4354 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4355   echo $ac_n "(cached) $ac_c" 1>&6
4356 else
4357   cat > conftest.$ac_ext <<EOF
4358 #line 4359 "configure"
4359 #include "confdefs.h"
4360 #include <stdlib.h>
4361 #include <stdarg.h>
4362 #include <string.h>
4363 #include <float.h>
4364 EOF
4365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4366 { (eval echo configure:4367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4368 if test -z "$ac_err"; then
4369   rm -rf conftest*
4370   ol_cv_header_stdc=yes
4371 else
4372   echo "$ac_err" >&5
4373   echo "configure: failed program was:" >&5
4374   cat conftest.$ac_ext >&5
4375   rm -rf conftest*
4376   ol_cv_header_stdc=no
4377 fi
4378 rm -f conftest*
4379
4380 if test $ol_cv_header_stdc = yes; then
4381   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4382 cat > conftest.$ac_ext <<EOF
4383 #line 4384 "configure"
4384 #include "confdefs.h"
4385 #include <string.h>
4386 EOF
4387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4388   egrep "memchr" >/dev/null 2>&1; then
4389   :
4390 else
4391   rm -rf conftest*
4392   ol_cv_header_stdc=no
4393 fi
4394 rm -f conftest*
4395
4396 fi
4397
4398 if test $ol_cv_header_stdc = yes; then
4399   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4400 cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403 #include <stdlib.h>
4404 EOF
4405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4406   egrep "free" >/dev/null 2>&1; then
4407   :
4408 else
4409   rm -rf conftest*
4410   ol_cv_header_stdc=no
4411 fi
4412 rm -f conftest*
4413
4414 fi
4415
4416 if test $ol_cv_header_stdc = yes; then
4417   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4418 if test "$cross_compiling" = yes; then
4419   :
4420 else
4421   cat > conftest.$ac_ext <<EOF
4422 #line 4423 "configure"
4423 #include "confdefs.h"
4424 #include <ctype.h>
4425 #ifndef HAVE_EBCDIC
4426 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4427 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4428 #else
4429 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4430                 || ('j' <= (c) && (c) <= 'r') \
4431                 || ('s' <= (c) && (c) <= 'z'))
4432 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4433 #endif
4434 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4435 int main () { int i; for (i = 0; i < 256; i++)
4436 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4437 exit (0); }
4438
4439 EOF
4440 if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4441 then
4442   :
4443 else
4444   echo "configure: failed program was:" >&5
4445   cat conftest.$ac_ext >&5
4446   rm -fr conftest*
4447   ol_cv_header_stdc=no
4448 fi
4449 rm -fr conftest*
4450 fi
4451
4452 fi
4453 fi
4454
4455 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4456 if test $ol_cv_header_stdc = yes; then
4457   cat >> confdefs.h <<\EOF
4458 #define STDC_HEADERS 1
4459 EOF
4460
4461 fi
4462 ac_cv_header_stdc=disable
4463
4464
4465 if test $ol_cv_header_stdc != yes; then
4466         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4467 fi
4468
4469 ac_header_dirent=no
4470 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4471 do
4472 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4473 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4474 echo "configure:4475: checking for $ac_hdr that defines DIR" >&5
4475 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4476   echo $ac_n "(cached) $ac_c" 1>&6
4477 else
4478   cat > conftest.$ac_ext <<EOF
4479 #line 4480 "configure"
4480 #include "confdefs.h"
4481 #include <sys/types.h>
4482 #include <$ac_hdr>
4483 int main() {
4484 DIR *dirp = 0;
4485 ; return 0; }
4486 EOF
4487 if { (eval echo configure:4488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4488   rm -rf conftest*
4489   eval "ac_cv_header_dirent_$ac_safe=yes"
4490 else
4491   echo "configure: failed program was:" >&5
4492   cat conftest.$ac_ext >&5
4493   rm -rf conftest*
4494   eval "ac_cv_header_dirent_$ac_safe=no"
4495 fi
4496 rm -f conftest*
4497 fi
4498 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4499   echo "$ac_t""yes" 1>&6
4500     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4501   cat >> confdefs.h <<EOF
4502 #define $ac_tr_hdr 1
4503 EOF
4504  ac_header_dirent=$ac_hdr; break
4505 else
4506   echo "$ac_t""no" 1>&6
4507 fi
4508 done
4509 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4510 if test $ac_header_dirent = dirent.h; then
4511 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4512 echo "configure:4513: checking for opendir in -ldir" >&5
4513 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4514 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4515   echo $ac_n "(cached) $ac_c" 1>&6
4516 else
4517   ac_save_LIBS="$LIBS"
4518 LIBS="-ldir  $LIBS"
4519 cat > conftest.$ac_ext <<EOF
4520 #line 4521 "configure"
4521 #include "confdefs.h"
4522 /* Override any gcc2 internal prototype to avoid an error.  */
4523 /* We use char because int might match the return type of a gcc2
4524     builtin and then its argument prototype would still apply.  */
4525 char opendir();
4526
4527 int main() {
4528 opendir()
4529 ; return 0; }
4530 EOF
4531 if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4532   rm -rf conftest*
4533   eval "ac_cv_lib_$ac_lib_var=yes"
4534 else
4535   echo "configure: failed program was:" >&5
4536   cat conftest.$ac_ext >&5
4537   rm -rf conftest*
4538   eval "ac_cv_lib_$ac_lib_var=no"
4539 fi
4540 rm -f conftest*
4541 LIBS="$ac_save_LIBS"
4542
4543 fi
4544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4545   echo "$ac_t""yes" 1>&6
4546   LIBS="$LIBS -ldir"
4547 else
4548   echo "$ac_t""no" 1>&6
4549 fi
4550
4551 else
4552 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4553 echo "configure:4554: checking for opendir in -lx" >&5
4554 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4555 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4556   echo $ac_n "(cached) $ac_c" 1>&6
4557 else
4558   ac_save_LIBS="$LIBS"
4559 LIBS="-lx  $LIBS"
4560 cat > conftest.$ac_ext <<EOF
4561 #line 4562 "configure"
4562 #include "confdefs.h"
4563 /* Override any gcc2 internal prototype to avoid an error.  */
4564 /* We use char because int might match the return type of a gcc2
4565     builtin and then its argument prototype would still apply.  */
4566 char opendir();
4567
4568 int main() {
4569 opendir()
4570 ; return 0; }
4571 EOF
4572 if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4573   rm -rf conftest*
4574   eval "ac_cv_lib_$ac_lib_var=yes"
4575 else
4576   echo "configure: failed program was:" >&5
4577   cat conftest.$ac_ext >&5
4578   rm -rf conftest*
4579   eval "ac_cv_lib_$ac_lib_var=no"
4580 fi
4581 rm -f conftest*
4582 LIBS="$ac_save_LIBS"
4583
4584 fi
4585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4586   echo "$ac_t""yes" 1>&6
4587   LIBS="$LIBS -lx"
4588 else
4589   echo "$ac_t""no" 1>&6
4590 fi
4591
4592 fi
4593
4594 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4595 echo "configure:4596: checking for sys/wait.h that is POSIX.1 compatible" >&5
4596 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4597   echo $ac_n "(cached) $ac_c" 1>&6
4598 else
4599   cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4602 #include <sys/types.h>
4603 #include <sys/wait.h>
4604 #ifndef WEXITSTATUS
4605 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4606 #endif
4607 #ifndef WIFEXITED
4608 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4609 #endif
4610 int main() {
4611 int s;
4612 wait (&s);
4613 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4614 ; return 0; }
4615 EOF
4616 if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4617   rm -rf conftest*
4618   ac_cv_header_sys_wait_h=yes
4619 else
4620   echo "configure: failed program was:" >&5
4621   cat conftest.$ac_ext >&5
4622   rm -rf conftest*
4623   ac_cv_header_sys_wait_h=no
4624 fi
4625 rm -f conftest*
4626 fi
4627
4628 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4629 if test $ac_cv_header_sys_wait_h = yes; then
4630   cat >> confdefs.h <<\EOF
4631 #define HAVE_SYS_WAIT_H 1
4632 EOF
4633
4634 fi
4635
4636 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4637 echo "configure:4638: checking POSIX termios" >&5
4638 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4639   echo $ac_n "(cached) $ac_c" 1>&6
4640 else
4641   cat > conftest.$ac_ext <<EOF
4642 #line 4643 "configure"
4643 #include "confdefs.h"
4644 #include <sys/types.h>
4645 #include <unistd.h>
4646 #include <termios.h>
4647 int main() {
4648 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4649    tcgetattr(0, 0);
4650 ; return 0; }
4651 EOF
4652 if { (eval echo configure:4653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4653   rm -rf conftest*
4654   am_cv_sys_posix_termios=yes
4655 else
4656   echo "configure: failed program was:" >&5
4657   cat conftest.$ac_ext >&5
4658   rm -rf conftest*
4659   am_cv_sys_posix_termios=no
4660 fi
4661 rm -f conftest*
4662 fi
4663
4664 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4665
4666
4667  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4668 echo "configure:4669: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4669 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4670   echo $ac_n "(cached) $ac_c" 1>&6
4671 else
4672   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4673
4674   gwinsz_in_termios_h=no
4675   if test $am_cv_sys_posix_termios = yes; then
4676     cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 #include <sys/types.h>
4680 #     include <termios.h>
4681 #     ifdef TIOCGWINSZ
4682         yes
4683 #     endif
4684     
4685 EOF
4686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4687   egrep "yes" >/dev/null 2>&1; then
4688   rm -rf conftest*
4689   gwinsz_in_termios_h=yes
4690 fi
4691 rm -f conftest*
4692
4693   fi
4694
4695   if test $gwinsz_in_termios_h = no; then
4696     cat > conftest.$ac_ext <<EOF
4697 #line 4698 "configure"
4698 #include "confdefs.h"
4699 #include <sys/types.h>
4700 #     include <sys/ioctl.h>
4701 #     ifdef TIOCGWINSZ
4702         yes
4703 #     endif
4704     
4705 EOF
4706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4707   egrep "yes" >/dev/null 2>&1; then
4708   rm -rf conftest*
4709   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4710 fi
4711 rm -f conftest*
4712
4713   fi
4714   
4715 fi
4716
4717 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4718   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4719     cat >> confdefs.h <<\EOF
4720 #define GWINSZ_IN_SYS_IOCTL 1
4721 EOF
4722
4723   fi
4724
4725 if test $am_cv_sys_posix_termios = yes ; then
4726         cat >> confdefs.h <<\EOF
4727 #define HAVE_POSIX_TERMIOS 1
4728 EOF
4729
4730 fi
4731
4732 for ac_hdr in \
4733         arpa/inet.h             \
4734         arpa/nameser.h  \
4735         assert.h                \
4736         conio.h                 \
4737         crypt.h                 \
4738         direct.h                \
4739         errno.h                 \
4740         fcntl.h                 \
4741         filio.h                 \
4742         getopt.h                \
4743         grp.h                   \
4744         io.h                    \
4745         libutil.h               \
4746         limits.h                \
4747         locale.h                \
4748         netinet/tcp.h   \
4749         malloc.h                \
4750         memory.h                \
4751         psap.h                  \
4752         pwd.h                   \
4753         process.h               \
4754         resolv.h                \
4755         sgtty.h                 \
4756         shadow.h                \
4757         stddef.h                \
4758         string.h                \
4759         strings.h               \
4760         sysexits.h              \
4761         sys/file.h              \
4762         sys/filio.h             \
4763         sys/errno.h             \
4764         sys/ioctl.h             \
4765         sys/param.h             \
4766         sys/resource.h  \
4767         sys/select.h    \
4768         sys/socket.h    \
4769         sys/syslog.h    \
4770         sys/time.h              \
4771         sys/types.h             \
4772         syslog.h                \
4773         termios.h               \
4774         unistd.h                \
4775         winsock.h               \
4776
4777 do
4778 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4779 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4780 echo "configure:4781: checking for $ac_hdr" >&5
4781 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4782   echo $ac_n "(cached) $ac_c" 1>&6
4783 else
4784   cat > conftest.$ac_ext <<EOF
4785 #line 4786 "configure"
4786 #include "confdefs.h"
4787 #include <$ac_hdr>
4788 EOF
4789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4790 { (eval echo configure:4791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4792 if test -z "$ac_err"; then
4793   rm -rf conftest*
4794   eval "ac_cv_header_$ac_safe=yes"
4795 else
4796   echo "$ac_err" >&5
4797   echo "configure: failed program was:" >&5
4798   cat conftest.$ac_ext >&5
4799   rm -rf conftest*
4800   eval "ac_cv_header_$ac_safe=no"
4801 fi
4802 rm -f conftest*
4803 fi
4804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4805   echo "$ac_t""yes" 1>&6
4806     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4807   cat >> confdefs.h <<EOF
4808 #define $ac_tr_hdr 1
4809 EOF
4810  
4811 else
4812   echo "$ac_t""no" 1>&6
4813 fi
4814 done
4815
4816
4817
4818
4819 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4820 echo "configure:4821: checking for sigset in -lV3" >&5
4821 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4822 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4823   echo $ac_n "(cached) $ac_c" 1>&6
4824 else
4825   ac_save_LIBS="$LIBS"
4826 LIBS="-lV3  $LIBS"
4827 cat > conftest.$ac_ext <<EOF
4828 #line 4829 "configure"
4829 #include "confdefs.h"
4830 /* Override any gcc2 internal prototype to avoid an error.  */
4831 /* We use char because int might match the return type of a gcc2
4832     builtin and then its argument prototype would still apply.  */
4833 char sigset();
4834
4835 int main() {
4836 sigset()
4837 ; return 0; }
4838 EOF
4839 if { (eval echo configure:4840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4840   rm -rf conftest*
4841   eval "ac_cv_lib_$ac_lib_var=yes"
4842 else
4843   echo "configure: failed program was:" >&5
4844   cat conftest.$ac_ext >&5
4845   rm -rf conftest*
4846   eval "ac_cv_lib_$ac_lib_var=no"
4847 fi
4848 rm -f conftest*
4849 LIBS="$ac_save_LIBS"
4850
4851 fi
4852 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4853   echo "$ac_t""yes" 1>&6
4854     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4855     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4856   cat >> confdefs.h <<EOF
4857 #define $ac_tr_lib 1
4858 EOF
4859
4860   LIBS="-lV3 $LIBS"
4861
4862 else
4863   echo "$ac_t""no" 1>&6
4864 fi
4865
4866
4867 if test $ac_cv_header_winsock_h = yes; then
4868         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4869 echo "configure:4870: checking for winsock" >&5
4870 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876 #include <winsock.h>
4877 int main() {
4878
4879                         socket(0,0,0);
4880                         select(0,NULL,NULL,NULL,NULL);
4881                         closesocket(0);
4882                         gethostname(NULL,0);
4883         
4884 ; return 0; }
4885 EOF
4886 if { (eval echo configure:4887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4887   rm -rf conftest*
4888   ol_cv_winsock=yes
4889 else
4890   echo "configure: failed program was:" >&5
4891   cat conftest.$ac_ext >&5
4892   rm -rf conftest*
4893   ol_cv_winsock=no
4894 fi
4895 rm -f conftest*]
4896 fi
4897
4898 echo "$ac_t""$ol_cv_winsock" 1>&6
4899
4900         if test $ol_cv_winsock = yes ; then
4901                 cat >> confdefs.h <<\EOF
4902 #define HAVE_WINSOCK 1
4903 EOF
4904
4905                 ac_cv_func_socket=yes
4906                 ac_cv_func_select=yes
4907                 ac_cv_func_closesocket=yes
4908                 ac_cv_func_gethostname=yes
4909         fi
4910 fi
4911
4912
4913 echo $ac_n "checking for socket""... $ac_c" 1>&6
4914 echo "configure:4915: checking for socket" >&5
4915 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4916   echo $ac_n "(cached) $ac_c" 1>&6
4917 else
4918   cat > conftest.$ac_ext <<EOF
4919 #line 4920 "configure"
4920 #include "confdefs.h"
4921 /* System header to define __stub macros and hopefully few prototypes,
4922     which can conflict with char socket(); below.  */
4923 #include <assert.h>
4924 /* Override any gcc2 internal prototype to avoid an error.  */
4925 /* We use char because int might match the return type of a gcc2
4926     builtin and then its argument prototype would still apply.  */
4927 char socket();
4928 char (*f)();
4929
4930 int main() {
4931
4932 /* The GNU C library defines this for functions which it implements
4933     to always fail with ENOSYS.  Some functions are actually named
4934     something starting with __ and the normal name is an alias.  */
4935 #if defined (__stub_socket) || defined (__stub___socket)
4936 choke me
4937 #else
4938 f = socket;
4939 #endif
4940
4941 ; return 0; }
4942 EOF
4943 if { (eval echo configure:4944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4944   rm -rf conftest*
4945   eval "ac_cv_func_socket=yes"
4946 else
4947   echo "configure: failed program was:" >&5
4948   cat conftest.$ac_ext >&5
4949   rm -rf conftest*
4950   eval "ac_cv_func_socket=no"
4951 fi
4952 rm -f conftest*
4953 fi
4954
4955 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4956   echo "$ac_t""yes" 1>&6
4957   :
4958 else
4959   echo "$ac_t""no" 1>&6
4960         
4961         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4962 echo "configure:4963: checking for main in -lsocket" >&5
4963 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4964 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4965   echo $ac_n "(cached) $ac_c" 1>&6
4966 else
4967   ac_save_LIBS="$LIBS"
4968 LIBS="-lsocket  $LIBS"
4969 cat > conftest.$ac_ext <<EOF
4970 #line 4971 "configure"
4971 #include "confdefs.h"
4972
4973 int main() {
4974 main()
4975 ; return 0; }
4976 EOF
4977 if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4978   rm -rf conftest*
4979   eval "ac_cv_lib_$ac_lib_var=yes"
4980 else
4981   echo "configure: failed program was:" >&5
4982   cat conftest.$ac_ext >&5
4983   rm -rf conftest*
4984   eval "ac_cv_lib_$ac_lib_var=no"
4985 fi
4986 rm -f conftest*
4987 LIBS="$ac_save_LIBS"
4988
4989 fi
4990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4991   echo "$ac_t""yes" 1>&6
4992     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4993     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4994   cat >> confdefs.h <<EOF
4995 #define $ac_tr_lib 1
4996 EOF
4997
4998   LIBS="-lsocket $LIBS"
4999
5000 else
5001   echo "$ac_t""no" 1>&6
5002 fi
5003
5004         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5005 echo "configure:5006: checking for main in -lnet" >&5
5006 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5008   echo $ac_n "(cached) $ac_c" 1>&6
5009 else
5010   ac_save_LIBS="$LIBS"
5011 LIBS="-lnet  $LIBS"
5012 cat > conftest.$ac_ext <<EOF
5013 #line 5014 "configure"
5014 #include "confdefs.h"
5015
5016 int main() {
5017 main()
5018 ; return 0; }
5019 EOF
5020 if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5021   rm -rf conftest*
5022   eval "ac_cv_lib_$ac_lib_var=yes"
5023 else
5024   echo "configure: failed program was:" >&5
5025   cat conftest.$ac_ext >&5
5026   rm -rf conftest*
5027   eval "ac_cv_lib_$ac_lib_var=no"
5028 fi
5029 rm -f conftest*
5030 LIBS="$ac_save_LIBS"
5031
5032 fi
5033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5034   echo "$ac_t""yes" 1>&6
5035     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5036     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5037   cat >> confdefs.h <<EOF
5038 #define $ac_tr_lib 1
5039 EOF
5040
5041   LIBS="-lnet $LIBS"
5042
5043 else
5044   echo "$ac_t""no" 1>&6
5045 fi
5046
5047         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5048 echo "configure:5049: checking for main in -lnsl_s" >&5
5049 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5051   echo $ac_n "(cached) $ac_c" 1>&6
5052 else
5053   ac_save_LIBS="$LIBS"
5054 LIBS="-lnsl_s  $LIBS"
5055 cat > conftest.$ac_ext <<EOF
5056 #line 5057 "configure"
5057 #include "confdefs.h"
5058
5059 int main() {
5060 main()
5061 ; return 0; }
5062 EOF
5063 if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5064   rm -rf conftest*
5065   eval "ac_cv_lib_$ac_lib_var=yes"
5066 else
5067   echo "configure: failed program was:" >&5
5068   cat conftest.$ac_ext >&5
5069   rm -rf conftest*
5070   eval "ac_cv_lib_$ac_lib_var=no"
5071 fi
5072 rm -f conftest*
5073 LIBS="$ac_save_LIBS"
5074
5075 fi
5076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5077   echo "$ac_t""yes" 1>&6
5078     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5079     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5080   cat >> confdefs.h <<EOF
5081 #define $ac_tr_lib 1
5082 EOF
5083
5084   LIBS="-lnsl_s $LIBS"
5085
5086 else
5087   echo "$ac_t""no" 1>&6
5088 fi
5089
5090         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5091 echo "configure:5092: checking for main in -lnsl" >&5
5092 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5093 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5094   echo $ac_n "(cached) $ac_c" 1>&6
5095 else
5096   ac_save_LIBS="$LIBS"
5097 LIBS="-lnsl  $LIBS"
5098 cat > conftest.$ac_ext <<EOF
5099 #line 5100 "configure"
5100 #include "confdefs.h"
5101
5102 int main() {
5103 main()
5104 ; return 0; }
5105 EOF
5106 if { (eval echo configure:5107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5107   rm -rf conftest*
5108   eval "ac_cv_lib_$ac_lib_var=yes"
5109 else
5110   echo "configure: failed program was:" >&5
5111   cat conftest.$ac_ext >&5
5112   rm -rf conftest*
5113   eval "ac_cv_lib_$ac_lib_var=no"
5114 fi
5115 rm -f conftest*
5116 LIBS="$ac_save_LIBS"
5117
5118 fi
5119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5120   echo "$ac_t""yes" 1>&6
5121     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5122     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5123   cat >> confdefs.h <<EOF
5124 #define $ac_tr_lib 1
5125 EOF
5126
5127   LIBS="-lnsl $LIBS"
5128
5129 else
5130   echo "$ac_t""no" 1>&6
5131 fi
5132
5133         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5134 echo "configure:5135: checking for socket in -linet" >&5
5135 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5137   echo $ac_n "(cached) $ac_c" 1>&6
5138 else
5139   ac_save_LIBS="$LIBS"
5140 LIBS="-linet  $LIBS"
5141 cat > conftest.$ac_ext <<EOF
5142 #line 5143 "configure"
5143 #include "confdefs.h"
5144 /* Override any gcc2 internal prototype to avoid an error.  */
5145 /* We use char because int might match the return type of a gcc2
5146     builtin and then its argument prototype would still apply.  */
5147 char socket();
5148
5149 int main() {
5150 socket()
5151 ; return 0; }
5152 EOF
5153 if { (eval echo configure:5154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5154   rm -rf conftest*
5155   eval "ac_cv_lib_$ac_lib_var=yes"
5156 else
5157   echo "configure: failed program was:" >&5
5158   cat conftest.$ac_ext >&5
5159   rm -rf conftest*
5160   eval "ac_cv_lib_$ac_lib_var=no"
5161 fi
5162 rm -f conftest*
5163 LIBS="$ac_save_LIBS"
5164
5165 fi
5166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5167   echo "$ac_t""yes" 1>&6
5168     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5169     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5170   cat >> confdefs.h <<EOF
5171 #define $ac_tr_lib 1
5172 EOF
5173
5174   LIBS="-linet $LIBS"
5175
5176 else
5177   echo "$ac_t""no" 1>&6
5178 fi
5179
5180         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5181 echo "configure:5182: checking for main in -lgen" >&5
5182 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5183 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5184   echo $ac_n "(cached) $ac_c" 1>&6
5185 else
5186   ac_save_LIBS="$LIBS"
5187 LIBS="-lgen  $LIBS"
5188 cat > conftest.$ac_ext <<EOF
5189 #line 5190 "configure"
5190 #include "confdefs.h"
5191
5192 int main() {
5193 main()
5194 ; return 0; }
5195 EOF
5196 if { (eval echo configure:5197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5197   rm -rf conftest*
5198   eval "ac_cv_lib_$ac_lib_var=yes"
5199 else
5200   echo "configure: failed program was:" >&5
5201   cat conftest.$ac_ext >&5
5202   rm -rf conftest*
5203   eval "ac_cv_lib_$ac_lib_var=no"
5204 fi
5205 rm -f conftest*
5206 LIBS="$ac_save_LIBS"
5207
5208 fi
5209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5210   echo "$ac_t""yes" 1>&6
5211     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5212     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5213   cat >> confdefs.h <<EOF
5214 #define $ac_tr_lib 1
5215 EOF
5216
5217   LIBS="-lgen $LIBS"
5218
5219 else
5220   echo "$ac_t""no" 1>&6
5221 fi
5222
5223
5224 fi
5225
5226
5227 echo $ac_n "checking for select""... $ac_c" 1>&6
5228 echo "configure:5229: checking for select" >&5
5229 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5230   echo $ac_n "(cached) $ac_c" 1>&6
5231 else
5232   cat > conftest.$ac_ext <<EOF
5233 #line 5234 "configure"
5234 #include "confdefs.h"
5235 /* System header to define __stub macros and hopefully few prototypes,
5236     which can conflict with char select(); below.  */
5237 #include <assert.h>
5238 /* Override any gcc2 internal prototype to avoid an error.  */
5239 /* We use char because int might match the return type of a gcc2
5240     builtin and then its argument prototype would still apply.  */
5241 char select();
5242 char (*f)();
5243
5244 int main() {
5245
5246 /* The GNU C library defines this for functions which it implements
5247     to always fail with ENOSYS.  Some functions are actually named
5248     something starting with __ and the normal name is an alias.  */
5249 #if defined (__stub_select) || defined (__stub___select)
5250 choke me
5251 #else
5252 f = select;
5253 #endif
5254
5255 ; return 0; }
5256 EOF
5257 if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5258   rm -rf conftest*
5259   eval "ac_cv_func_select=yes"
5260 else
5261   echo "configure: failed program was:" >&5
5262   cat conftest.$ac_ext >&5
5263   rm -rf conftest*
5264   eval "ac_cv_func_select=no"
5265 fi
5266 rm -f conftest*
5267 fi
5268
5269 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5270   echo "$ac_t""yes" 1>&6
5271   :
5272 else
5273   echo "$ac_t""no" 1>&6
5274 { echo "configure: error: select() required." 1>&2; exit 1; }
5275 fi
5276
5277
5278 if test "${ac_cv_header_winsock_h}" != yes; then
5279                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5280 echo "configure:5281: checking types of arguments for select()" >&5
5281  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5282   echo $ac_n "(cached) $ac_c" 1>&6
5283 else
5284    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5285   echo $ac_n "(cached) $ac_c" 1>&6
5286 else
5287     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5291      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5292       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5293        cat > conftest.$ac_ext <<EOF
5294 #line 5295 "configure"
5295 #include "confdefs.h"
5296 #ifdef HAVE_SYS_TYPES_H
5297 #include <sys/types.h>
5298 #endif
5299 #ifdef HAVE_SYS_TIME_H
5300 #include <sys/time.h>
5301 #endif
5302 #ifdef HAVE_SYS_SELECT_H
5303 #include <sys/select.h>
5304 #endif
5305 #ifdef HAVE_SYS_SOCKET_H
5306 #include <sys/socket.h>
5307 #endif
5308 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);
5309 int main() {
5310
5311 ; return 0; }
5312 EOF
5313 if { (eval echo configure:5314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5314   rm -rf conftest*
5315           ac_not_found=no ; break 3
5316 else
5317   echo "configure: failed program was:" >&5
5318   cat conftest.$ac_ext >&5
5319   rm -rf conftest*
5320   ac_not_found=yes
5321 fi
5322 rm -f conftest*
5323       done
5324      done
5325     done
5326    
5327 fi
5328   
5329 fi
5330  
5331 fi
5332  if test "$ac_not_found" = yes; then
5333   ac_cv_func_select_arg1=int 
5334   ac_cv_func_select_arg234='int *' 
5335   ac_cv_func_select_arg5='struct timeval *'
5336  fi
5337  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5338  cat >> confdefs.h <<EOF
5339 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5340 EOF
5341
5342  cat >> confdefs.h <<EOF
5343 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5344 EOF
5345
5346  cat >> confdefs.h <<EOF
5347 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5348 EOF
5349
5350
5351 fi
5352
5353
5354 for ac_hdr in regex.h 
5355 do
5356 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5357 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5358 echo "configure:5359: checking for $ac_hdr" >&5
5359 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5360   echo $ac_n "(cached) $ac_c" 1>&6
5361 else
5362   cat > conftest.$ac_ext <<EOF
5363 #line 5364 "configure"
5364 #include "confdefs.h"
5365 #include <$ac_hdr>
5366 EOF
5367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5368 { (eval echo configure:5369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5370 if test -z "$ac_err"; then
5371   rm -rf conftest*
5372   eval "ac_cv_header_$ac_safe=yes"
5373 else
5374   echo "$ac_err" >&5
5375   echo "configure: failed program was:" >&5
5376   cat conftest.$ac_ext >&5
5377   rm -rf conftest*
5378   eval "ac_cv_header_$ac_safe=no"
5379 fi
5380 rm -f conftest*
5381 fi
5382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5383   echo "$ac_t""yes" 1>&6
5384     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5385   cat >> confdefs.h <<EOF
5386 #define $ac_tr_hdr 1
5387 EOF
5388  
5389 else
5390   echo "$ac_t""no" 1>&6
5391 fi
5392 done
5393
5394 if test "$ac_cv_header_regex_h" != yes ; then
5395         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5396 fi
5397 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5398 echo "configure:5399: checking for regfree" >&5
5399 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5400   echo $ac_n "(cached) $ac_c" 1>&6
5401 else
5402   cat > conftest.$ac_ext <<EOF
5403 #line 5404 "configure"
5404 #include "confdefs.h"
5405 /* System header to define __stub macros and hopefully few prototypes,
5406     which can conflict with char regfree(); below.  */
5407 #include <assert.h>
5408 /* Override any gcc2 internal prototype to avoid an error.  */
5409 /* We use char because int might match the return type of a gcc2
5410     builtin and then its argument prototype would still apply.  */
5411 char regfree();
5412 char (*f)();
5413
5414 int main() {
5415
5416 /* The GNU C library defines this for functions which it implements
5417     to always fail with ENOSYS.  Some functions are actually named
5418     something starting with __ and the normal name is an alias.  */
5419 #if defined (__stub_regfree) || defined (__stub___regfree)
5420 choke me
5421 #else
5422 f = regfree;
5423 #endif
5424
5425 ; return 0; }
5426 EOF
5427 if { (eval echo configure:5428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5428   rm -rf conftest*
5429   eval "ac_cv_func_regfree=yes"
5430 else
5431   echo "configure: failed program was:" >&5
5432   cat conftest.$ac_ext >&5
5433   rm -rf conftest*
5434   eval "ac_cv_func_regfree=no"
5435 fi
5436 rm -f conftest*
5437 fi
5438
5439 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5440   echo "$ac_t""yes" 1>&6
5441   :
5442 else
5443   echo "$ac_t""no" 1>&6
5444 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5445 fi
5446
5447
5448
5449 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5450 echo "configure:5451: checking for compatible POSIX regex" >&5
5451 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5452   echo $ac_n "(cached) $ac_c" 1>&6
5453 else
5454   
5455         if test "$cross_compiling" = yes; then
5456   ol_cv_c_posix_regex=cross
5457 else
5458   cat > conftest.$ac_ext <<EOF
5459 #line 5460 "configure"
5460 #include "confdefs.h"
5461
5462 #include <sys/types.h>
5463 #include <regex.h>
5464 static char *pattern, *string;
5465 main()
5466 {
5467         int rc;
5468         regex_t re;
5469
5470         pattern = "^A";
5471
5472         if(regcomp(&re, pattern, 0)) {
5473                 return -1;
5474         }
5475         
5476         string = "ALL MATCH";
5477         
5478         rc = regexec(&re, string, 0, (void*)0, 0);
5479
5480         regfree(&re);
5481
5482         return rc;
5483 }
5484 EOF
5485 if { (eval echo configure:5486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5486 then
5487   ol_cv_c_posix_regex=yes
5488 else
5489   echo "configure: failed program was:" >&5
5490   cat conftest.$ac_ext >&5
5491   rm -fr conftest*
5492   ol_cv_c_posix_regex=no
5493 fi
5494 rm -fr conftest*
5495 fi
5496
5497 fi
5498
5499 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5500
5501 if test "$ol_cv_c_posix_regex" = no ; then
5502         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5503 fi
5504
5505 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5506 echo "configure:5507: checking for res_search" >&5
5507 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5508   echo $ac_n "(cached) $ac_c" 1>&6
5509 else
5510   cat > conftest.$ac_ext <<EOF
5511 #line 5512 "configure"
5512 #include "confdefs.h"
5513 /* System header to define __stub macros and hopefully few prototypes,
5514     which can conflict with char res_search(); below.  */
5515 #include <assert.h>
5516 /* Override any gcc2 internal prototype to avoid an error.  */
5517 /* We use char because int might match the return type of a gcc2
5518     builtin and then its argument prototype would still apply.  */
5519 char res_search();
5520 char (*f)();
5521
5522 int main() {
5523
5524 /* The GNU C library defines this for functions which it implements
5525     to always fail with ENOSYS.  Some functions are actually named
5526     something starting with __ and the normal name is an alias.  */
5527 #if defined (__stub_res_search) || defined (__stub___res_search)
5528 choke me
5529 #else
5530 f = res_search;
5531 #endif
5532
5533 ; return 0; }
5534 EOF
5535 if { (eval echo configure:5536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5536   rm -rf conftest*
5537   eval "ac_cv_func_res_search=yes"
5538 else
5539   echo "configure: failed program was:" >&5
5540   cat conftest.$ac_ext >&5
5541   rm -rf conftest*
5542   eval "ac_cv_func_res_search=no"
5543 fi
5544 rm -f conftest*
5545 fi
5546
5547 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5548   echo "$ac_t""yes" 1>&6
5549   :
5550 else
5551   echo "$ac_t""no" 1>&6
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 -lbind""... $ac_c" 1>&6
5607 echo "configure:5608: checking for __res_search in -lbind" >&5
5608 ac_lib_var=`echo bind'_'__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="-lbind  $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 bind | 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="-lbind $LIBS"
5648
5649 else
5650   echo "$ac_t""no" 1>&6
5651 fi
5652
5653         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5654 fi
5655
5656 if test $ac_cv_func_res_search = no ; then 
5657         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5658 echo "configure:5659: checking for res_search in -lresolv" >&5
5659 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5660 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5661   echo $ac_n "(cached) $ac_c" 1>&6
5662 else
5663   ac_save_LIBS="$LIBS"
5664 LIBS="-lresolv  $LIBS"
5665 cat > conftest.$ac_ext <<EOF
5666 #line 5667 "configure"
5667 #include "confdefs.h"
5668 /* Override any gcc2 internal prototype to avoid an error.  */
5669 /* We use char because int might match the return type of a gcc2
5670     builtin and then its argument prototype would still apply.  */
5671 char res_search();
5672
5673 int main() {
5674 res_search()
5675 ; return 0; }
5676 EOF
5677 if { (eval echo configure:5678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5678   rm -rf conftest*
5679   eval "ac_cv_lib_$ac_lib_var=yes"
5680 else
5681   echo "configure: failed program was:" >&5
5682   cat conftest.$ac_ext >&5
5683   rm -rf conftest*
5684   eval "ac_cv_lib_$ac_lib_var=no"
5685 fi
5686 rm -f conftest*
5687 LIBS="$ac_save_LIBS"
5688
5689 fi
5690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5691   echo "$ac_t""yes" 1>&6
5692     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5693     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5694   cat >> confdefs.h <<EOF
5695 #define $ac_tr_lib 1
5696 EOF
5697
5698   LIBS="-lresolv $LIBS"
5699
5700 else
5701   echo "$ac_t""no" 1>&6
5702 fi
5703
5704         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5705 fi
5706
5707 if test "$ac_cv_func_res_search" = yes ; then
5708         cat >> confdefs.h <<\EOF
5709 #define HAVE_RES_SEARCH 1
5710 EOF
5711
5712 elif test $ol_enable_dns = yes ; then
5713         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5714 elif test $ol_enable_dns != no ; then
5715         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5716 fi
5717
5718
5719 ol_link_isode=no
5720 if test $ol_enable_ldapd != no ; then
5721         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5722
5723                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5724 echo "configure:5725: checking for main in -lxtpp" >&5
5725 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5726 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5727   echo $ac_n "(cached) $ac_c" 1>&6
5728 else
5729   ac_save_LIBS="$LIBS"
5730 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5731 cat > conftest.$ac_ext <<EOF
5732 #line 5733 "configure"
5733 #include "confdefs.h"
5734
5735 int main() {
5736 main()
5737 ; return 0; }
5738 EOF
5739 if { (eval echo configure:5740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5740   rm -rf conftest*
5741   eval "ac_cv_lib_$ac_lib_var=yes"
5742 else
5743   echo "configure: failed program was:" >&5
5744   cat conftest.$ac_ext >&5
5745   rm -rf conftest*
5746   eval "ac_cv_lib_$ac_lib_var=no"
5747 fi
5748 rm -f conftest*
5749 LIBS="$ac_save_LIBS"
5750
5751 fi
5752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5753   echo "$ac_t""yes" 1>&6
5754   
5755                 ol_link_isode=yes
5756                 cat >> confdefs.h <<\EOF
5757 #define HAVE_XTPP 1
5758 EOF
5759
5760                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5761                 
5762 else
5763   echo "$ac_t""no" 1>&6
5764 :
5765 fi
5766
5767         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5768 echo "configure:5769: checking for main in -ldsap" >&5
5769 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5770 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5771   echo $ac_n "(cached) $ac_c" 1>&6
5772 else
5773   ac_save_LIBS="$LIBS"
5774 LIBS="-ldsap -lisode $LIBS"
5775 cat > conftest.$ac_ext <<EOF
5776 #line 5777 "configure"
5777 #include "confdefs.h"
5778
5779 int main() {
5780 main()
5781 ; return 0; }
5782 EOF
5783 if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5784   rm -rf conftest*
5785   eval "ac_cv_lib_$ac_lib_var=yes"
5786 else
5787   echo "configure: failed program was:" >&5
5788   cat conftest.$ac_ext >&5
5789   rm -rf conftest*
5790   eval "ac_cv_lib_$ac_lib_var=no"
5791 fi
5792 rm -f conftest*
5793 LIBS="$ac_save_LIBS"
5794
5795 fi
5796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5797   echo "$ac_t""yes" 1>&6
5798   
5799                 ol_link_isode=yes
5800                 cat >> confdefs.h <<\EOF
5801 #define HAVE_DSAP 1
5802 EOF
5803
5804                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5805                 
5806 else
5807   echo "$ac_t""no" 1>&6
5808 :
5809 fi
5810
5811         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5812 echo "configure:5813: checking for main in -lisode" >&5
5813 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5814 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5815   echo $ac_n "(cached) $ac_c" 1>&6
5816 else
5817   ac_save_LIBS="$LIBS"
5818 LIBS="-lisode  $LIBS"
5819 cat > conftest.$ac_ext <<EOF
5820 #line 5821 "configure"
5821 #include "confdefs.h"
5822
5823 int main() {
5824 main()
5825 ; return 0; }
5826 EOF
5827 if { (eval echo configure:5828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5828   rm -rf conftest*
5829   eval "ac_cv_lib_$ac_lib_var=yes"
5830 else
5831   echo "configure: failed program was:" >&5
5832   cat conftest.$ac_ext >&5
5833   rm -rf conftest*
5834   eval "ac_cv_lib_$ac_lib_var=no"
5835 fi
5836 rm -f conftest*
5837 LIBS="$ac_save_LIBS"
5838
5839 fi
5840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5841   echo "$ac_t""yes" 1>&6
5842   
5843                 ol_link_isode=yes
5844                 cat >> confdefs.h <<\EOF
5845 #define HAVE_ISODE 1
5846 EOF
5847
5848                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5849                 
5850 else
5851   echo "$ac_t""no" 1>&6
5852 :
5853 fi
5854
5855 fi
5856
5857 if test $ol_link_isode != no; then
5858         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5859 echo "configure:5860: checking for main in -lpp" >&5
5860 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5861 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5862   echo $ac_n "(cached) $ac_c" 1>&6
5863 else
5864   ac_save_LIBS="$LIBS"
5865 LIBS="-lpp  $LIBS"
5866 cat > conftest.$ac_ext <<EOF
5867 #line 5868 "configure"
5868 #include "confdefs.h"
5869
5870 int main() {
5871 main()
5872 ; return 0; }
5873 EOF
5874 if { (eval echo configure:5875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5875   rm -rf conftest*
5876   eval "ac_cv_lib_$ac_lib_var=yes"
5877 else
5878   echo "configure: failed program was:" >&5
5879   cat conftest.$ac_ext >&5
5880   rm -rf conftest*
5881   eval "ac_cv_lib_$ac_lib_var=no"
5882 fi
5883 rm -f conftest*
5884 LIBS="$ac_save_LIBS"
5885
5886 fi
5887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5888   echo "$ac_t""yes" 1>&6
5889   
5890                 cat >> confdefs.h <<\EOF
5891 #define HAVE_PP 1
5892 EOF
5893
5894                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5895                 
5896 else
5897   echo "$ac_t""no" 1>&6
5898 :
5899 fi
5900
5901
5902         # Extract the first word of "pepsy", so it can be a program name with args.
5903 set dummy pepsy; ac_word=$2
5904 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5905 echo "configure:5906: checking for $ac_word" >&5
5906 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5907   echo $ac_n "(cached) $ac_c" 1>&6
5908 else
5909   case "$PEPSY" in
5910   /*)
5911   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5912   ;;
5913   ?:/*)
5914   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5915   ;;
5916   *)
5917   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5918   ac_dummy="$PATH"
5919   for ac_dir in $ac_dummy; do 
5920     test -z "$ac_dir" && ac_dir=.
5921     if test -f $ac_dir/$ac_word; then
5922       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5923       break
5924     fi
5925   done
5926   IFS="$ac_save_ifs"
5927   ;;
5928 esac
5929 fi
5930 PEPSY="$ac_cv_path_PEPSY"
5931 if test -n "$PEPSY"; then
5932   echo "$ac_t""$PEPSY" 1>&6
5933 else
5934   echo "$ac_t""no" 1>&6
5935 fi
5936
5937 fi
5938
5939 if test $ol_enable_quipu != no ; then
5940         for ac_hdr in quipu/commonarg.h
5941 do
5942 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5943 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5944 echo "configure:5945: checking for $ac_hdr" >&5
5945 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5946   echo $ac_n "(cached) $ac_c" 1>&6
5947 else
5948   cat > conftest.$ac_ext <<EOF
5949 #line 5950 "configure"
5950 #include "confdefs.h"
5951 #include <$ac_hdr>
5952 EOF
5953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5954 { (eval echo configure:5955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5956 if test -z "$ac_err"; then
5957   rm -rf conftest*
5958   eval "ac_cv_header_$ac_safe=yes"
5959 else
5960   echo "$ac_err" >&5
5961   echo "configure: failed program was:" >&5
5962   cat conftest.$ac_ext >&5
5963   rm -rf conftest*
5964   eval "ac_cv_header_$ac_safe=no"
5965 fi
5966 rm -f conftest*
5967 fi
5968 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5969   echo "$ac_t""yes" 1>&6
5970     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5971   cat >> confdefs.h <<EOF
5972 #define $ac_tr_hdr 1
5973 EOF
5974  
5975 else
5976   echo "$ac_t""no" 1>&6
5977 fi
5978 done
5979
5980
5981         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5982                 BUILD_QUIPU=yes
5983         elif test $ol_enable_quipu = auto ; then
5984                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5985         else
5986                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5987         fi
5988 fi
5989
5990 ol_link_kbind=no
5991 ol_link_kpasswd=no
5992 ol_link_krb5=no
5993 ol_link_krb4=no
5994
5995 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5996         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5997
5998         for ac_hdr in krb5.h
5999 do
6000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6002 echo "configure:6003: checking for $ac_hdr" >&5
6003 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6004   echo $ac_n "(cached) $ac_c" 1>&6
6005 else
6006   cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6009 #include <$ac_hdr>
6010 EOF
6011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6012 { (eval echo configure:6013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6014 if test -z "$ac_err"; then
6015   rm -rf conftest*
6016   eval "ac_cv_header_$ac_safe=yes"
6017 else
6018   echo "$ac_err" >&5
6019   echo "configure: failed program was:" >&5
6020   cat conftest.$ac_ext >&5
6021   rm -rf conftest*
6022   eval "ac_cv_header_$ac_safe=no"
6023 fi
6024 rm -f conftest*
6025 fi
6026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6027   echo "$ac_t""yes" 1>&6
6028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6029   cat >> confdefs.h <<EOF
6030 #define $ac_tr_hdr 1
6031 EOF
6032  
6033 else
6034   echo "$ac_t""no" 1>&6
6035 fi
6036 done
6037
6038
6039         if test $ac_cv_header_krb5_h = yes ; then
6040                                 for ac_hdr in heim_err.h
6041 do
6042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6043 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6044 echo "configure:6045: checking for $ac_hdr" >&5
6045 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6046   echo $ac_n "(cached) $ac_c" 1>&6
6047 else
6048   cat > conftest.$ac_ext <<EOF
6049 #line 6050 "configure"
6050 #include "confdefs.h"
6051 #include <$ac_hdr>
6052 EOF
6053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6054 { (eval echo configure:6055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6056 if test -z "$ac_err"; then
6057   rm -rf conftest*
6058   eval "ac_cv_header_$ac_safe=yes"
6059 else
6060   echo "$ac_err" >&5
6061   echo "configure: failed program was:" >&5
6062   cat conftest.$ac_ext >&5
6063   rm -rf conftest*
6064   eval "ac_cv_header_$ac_safe=no"
6065 fi
6066 rm -f conftest*
6067 fi
6068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6069   echo "$ac_t""yes" 1>&6
6070     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6071   cat >> confdefs.h <<EOF
6072 #define $ac_tr_hdr 1
6073 EOF
6074  
6075 else
6076   echo "$ac_t""no" 1>&6
6077 fi
6078 done
6079
6080                 if test $ac_cv_header_heim_err_h = yes ; then
6081                         krb5_impl=heimdal
6082                 else
6083                         krb5_impl=mit
6084                 fi
6085
6086                 if test $krb5_impl = mit; then
6087                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6088 echo "configure:6089: checking for main in -lkrb5" >&5
6089 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6090 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6091   echo $ac_n "(cached) $ac_c" 1>&6
6092 else
6093   ac_save_LIBS="$LIBS"
6094 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6095 cat > conftest.$ac_ext <<EOF
6096 #line 6097 "configure"
6097 #include "confdefs.h"
6098
6099 int main() {
6100 main()
6101 ; return 0; }
6102 EOF
6103 if { (eval echo configure:6104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6104   rm -rf conftest*
6105   eval "ac_cv_lib_$ac_lib_var=yes"
6106 else
6107   echo "configure: failed program was:" >&5
6108   cat conftest.$ac_ext >&5
6109   rm -rf conftest*
6110   eval "ac_cv_lib_$ac_lib_var=no"
6111 fi
6112 rm -f conftest*
6113 LIBS="$ac_save_LIBS"
6114
6115 fi
6116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6117   echo "$ac_t""yes" 1>&6
6118   have_krb5=yes
6119                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6120 else
6121   echo "$ac_t""no" 1>&6
6122 have_krb5=no
6123 fi
6124
6125
6126                 elif test $krb5_impl = heimdal; then
6127                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6128 echo "configure:6129: checking for main in -lkrb5" >&5
6129 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6130 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6131   echo $ac_n "(cached) $ac_c" 1>&6
6132 else
6133   ac_save_LIBS="$LIBS"
6134 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6135 cat > conftest.$ac_ext <<EOF
6136 #line 6137 "configure"
6137 #include "confdefs.h"
6138
6139 int main() {
6140 main()
6141 ; return 0; }
6142 EOF
6143 if { (eval echo configure:6144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6144   rm -rf conftest*
6145   eval "ac_cv_lib_$ac_lib_var=yes"
6146 else
6147   echo "configure: failed program was:" >&5
6148   cat conftest.$ac_ext >&5
6149   rm -rf conftest*
6150   eval "ac_cv_lib_$ac_lib_var=no"
6151 fi
6152 rm -f conftest*
6153 LIBS="$ac_save_LIBS"
6154
6155 fi
6156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6157   echo "$ac_t""yes" 1>&6
6158   have_krb5=yes
6159                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6160 else
6161   echo "$ac_t""no" 1>&6
6162 have_krb5=no
6163 fi
6164
6165
6166                         cat >> confdefs.h <<\EOF
6167 #define HAVE_HEIMDAL_KERBEROS 1
6168 EOF
6169
6170                 else
6171                         have_krb5=no
6172                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6173                 fi
6174
6175                 if test $have_krb5 = yes ; then
6176                         ol_link_krb5=yes
6177
6178                         cat >> confdefs.h <<\EOF
6179 #define HAVE_KRB5 1
6180 EOF
6181
6182
6183                         if test $ol_enable_kpasswd != no ; then
6184                                 ol_link_kpasswd=yes;
6185                         fi
6186
6187                         if test $ol_with_kerberos = k5only ; then
6188                                 ol_with_kerberos=found
6189                         fi
6190
6191                 elif test $ol_with_kerberos != auto ; then
6192                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6193                 fi
6194
6195         fi
6196 fi
6197
6198 if test $ol_link_krb5 = yes -a \
6199         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6200
6201         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6202 do
6203 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6204 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6205 echo "configure:6206: checking for $ac_hdr" >&5
6206 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6207   echo $ac_n "(cached) $ac_c" 1>&6
6208 else
6209   cat > conftest.$ac_ext <<EOF
6210 #line 6211 "configure"
6211 #include "confdefs.h"
6212 #include <$ac_hdr>
6213 EOF
6214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6215 { (eval echo configure:6216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6217 if test -z "$ac_err"; then
6218   rm -rf conftest*
6219   eval "ac_cv_header_$ac_safe=yes"
6220 else
6221   echo "$ac_err" >&5
6222   echo "configure: failed program was:" >&5
6223   cat conftest.$ac_ext >&5
6224   rm -rf conftest*
6225   eval "ac_cv_header_$ac_safe=no"
6226 fi
6227 rm -f conftest*
6228 fi
6229 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6230   echo "$ac_t""yes" 1>&6
6231     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6232   cat >> confdefs.h <<EOF
6233 #define $ac_tr_hdr 1
6234 EOF
6235  
6236 else
6237   echo "$ac_t""no" 1>&6
6238 fi
6239 done
6240
6241
6242         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6243                 if test $krb5_impl = mit; then
6244                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6245 echo "configure:6246: checking for main in -lkrb4" >&5
6246 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6247 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6248   echo $ac_n "(cached) $ac_c" 1>&6
6249 else
6250   ac_save_LIBS="$LIBS"
6251 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6252 cat > conftest.$ac_ext <<EOF
6253 #line 6254 "configure"
6254 #include "confdefs.h"
6255
6256 int main() {
6257 main()
6258 ; return 0; }
6259 EOF
6260 if { (eval echo configure:6261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6261   rm -rf conftest*
6262   eval "ac_cv_lib_$ac_lib_var=yes"
6263 else
6264   echo "configure: failed program was:" >&5
6265   cat conftest.$ac_ext >&5
6266   rm -rf conftest*
6267   eval "ac_cv_lib_$ac_lib_var=no"
6268 fi
6269 rm -f conftest*
6270 LIBS="$ac_save_LIBS"
6271
6272 fi
6273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6274   echo "$ac_t""yes" 1>&6
6275   have_k425=yes
6276                                 KRB4_LIBS="-lkrb4 -ldes425"
6277 else
6278   echo "$ac_t""no" 1>&6
6279 have_k425=no
6280 fi
6281
6282
6283                 elif test $krb5_impl = heimdal; then
6284                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6285 echo "configure:6286: checking for main in -lkrb4" >&5
6286 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6288   echo $ac_n "(cached) $ac_c" 1>&6
6289 else
6290   ac_save_LIBS="$LIBS"
6291 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6292 cat > conftest.$ac_ext <<EOF
6293 #line 6294 "configure"
6294 #include "confdefs.h"
6295
6296 int main() {
6297 main()
6298 ; return 0; }
6299 EOF
6300 if { (eval echo configure:6301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6301   rm -rf conftest*
6302   eval "ac_cv_lib_$ac_lib_var=yes"
6303 else
6304   echo "configure: failed program was:" >&5
6305   cat conftest.$ac_ext >&5
6306   rm -rf conftest*
6307   eval "ac_cv_lib_$ac_lib_var=no"
6308 fi
6309 rm -f conftest*
6310 LIBS="$ac_save_LIBS"
6311
6312 fi
6313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6314   echo "$ac_t""yes" 1>&6
6315   have_k425=yes
6316                                 KRB4_LIBS="-lkrb4"
6317 else
6318   echo "$ac_t""no" 1>&6
6319 have_k425=no
6320 fi
6321
6322
6323                 else
6324                         have_425=no
6325                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6326                 fi
6327
6328                 if test $have_k425 = yes ; then
6329                         ol_with_kerberos=found
6330                         ol_link_krb4=yes
6331
6332                         cat >> confdefs.h <<\EOF
6333 #define HAVE_KRB425 1
6334 EOF
6335
6336                         cat >> confdefs.h <<\EOF
6337 #define HAVE_KRB4 1
6338 EOF
6339
6340
6341                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6342 echo "configure:6343: checking for des_debug in Kerberos libraries" >&5
6343 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6344   echo $ac_n "(cached) $ac_c" 1>&6
6345 else
6346   
6347                                                                 save_LIBS="$LIBS"
6348                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6349                                 cat > conftest.$ac_ext <<EOF
6350 #line 6351 "configure"
6351 #include "confdefs.h"
6352
6353 #include <kerberosIV/krb.h>
6354 #include <kerberosIV/des.h>
6355 extern int des_debug;
6356
6357 int main() {
6358
6359 des_debug = 1;
6360
6361 ; return 0; }
6362 EOF
6363 if { (eval echo configure:6364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6364   rm -rf conftest*
6365   ol_cv_var_des_debug=yes
6366 else
6367   echo "configure: failed program was:" >&5
6368   cat conftest.$ac_ext >&5
6369   rm -rf conftest*
6370   ol_cv_var_des_debug=no
6371 fi
6372 rm -f conftest*
6373                                                                 LIBS="$save_LIBS"
6374                         
6375 fi
6376
6377 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6378
6379                         if test $ol_cv_var_des_debug = yes ; then
6380                                 cat >> confdefs.h <<\EOF
6381 #define HAVE_DES_DEBUG 1
6382 EOF
6383
6384                         fi
6385
6386                         LIBS="$save_LIBS"
6387                 fi
6388         fi
6389 fi
6390
6391 if test $ol_link_krb5 = yes ; then
6392         ol_with_kerberos=found
6393 fi
6394
6395 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6396         -o $ol_with_kerberos = kth ; then
6397
6398         for ac_hdr in krb.h des.h krb-archaeology.h 
6399 do
6400 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6401 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6402 echo "configure:6403: checking for $ac_hdr" >&5
6403 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6404   echo $ac_n "(cached) $ac_c" 1>&6
6405 else
6406   cat > conftest.$ac_ext <<EOF
6407 #line 6408 "configure"
6408 #include "confdefs.h"
6409 #include <$ac_hdr>
6410 EOF
6411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6412 { (eval echo configure:6413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6414 if test -z "$ac_err"; then
6415   rm -rf conftest*
6416   eval "ac_cv_header_$ac_safe=yes"
6417 else
6418   echo "$ac_err" >&5
6419   echo "configure: failed program was:" >&5
6420   cat conftest.$ac_ext >&5
6421   rm -rf conftest*
6422   eval "ac_cv_header_$ac_safe=no"
6423 fi
6424 rm -f conftest*
6425 fi
6426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6427   echo "$ac_t""yes" 1>&6
6428     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6429   cat >> confdefs.h <<EOF
6430 #define $ac_tr_hdr 1
6431 EOF
6432  
6433 else
6434   echo "$ac_t""no" 1>&6
6435 fi
6436 done
6437
6438
6439         if test $ac_cv_header_krb_h = yes ; then
6440                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6441 echo "configure:6442: checking for main in -lkrb" >&5
6442 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6443 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6444   echo $ac_n "(cached) $ac_c" 1>&6
6445 else
6446   ac_save_LIBS="$LIBS"
6447 LIBS="-lkrb -ldes $LIBS"
6448 cat > conftest.$ac_ext <<EOF
6449 #line 6450 "configure"
6450 #include "confdefs.h"
6451
6452 int main() {
6453 main()
6454 ; return 0; }
6455 EOF
6456 if { (eval echo configure:6457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6457   rm -rf conftest*
6458   eval "ac_cv_lib_$ac_lib_var=yes"
6459 else
6460   echo "configure: failed program was:" >&5
6461   cat conftest.$ac_ext >&5
6462   rm -rf conftest*
6463   eval "ac_cv_lib_$ac_lib_var=no"
6464 fi
6465 rm -f conftest*
6466 LIBS="$ac_save_LIBS"
6467
6468 fi
6469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6470   echo "$ac_t""yes" 1>&6
6471   have_k4=yes
6472 else
6473   echo "$ac_t""no" 1>&6
6474 have_k4=no
6475 fi
6476
6477
6478                 if test $have_k4 = yes ; then
6479                         ol_with_kerberos=found
6480                         ol_link_krb4=yes
6481
6482                         cat >> confdefs.h <<\EOF
6483 #define HAVE_KRB4 1
6484 EOF
6485
6486
6487                         KRB4_LIBS="-lkrb -ldes"
6488
6489                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6490                                 cat >> confdefs.h <<\EOF
6491 #define HAVE_KTH_KERBEROS 1
6492 EOF
6493
6494                         fi
6495                 fi
6496         fi
6497 fi
6498
6499 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6500         ol_link_kpasswd=yes;
6501 fi
6502
6503 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6504         cat >> confdefs.h <<\EOF
6505 #define HAVE_KERBEROS 1
6506 EOF
6507
6508
6509 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6510         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6511 fi
6512
6513 ol_link_tls=no
6514 if test $ol_with_tls != no ; then
6515         
6516         for ac_hdr in openssl/ssl.h ssl.h
6517 do
6518 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6519 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6520 echo "configure:6521: checking for $ac_hdr" >&5
6521 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6522   echo $ac_n "(cached) $ac_c" 1>&6
6523 else
6524   cat > conftest.$ac_ext <<EOF
6525 #line 6526 "configure"
6526 #include "confdefs.h"
6527 #include <$ac_hdr>
6528 EOF
6529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6530 { (eval echo configure:6531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6532 if test -z "$ac_err"; then
6533   rm -rf conftest*
6534   eval "ac_cv_header_$ac_safe=yes"
6535 else
6536   echo "$ac_err" >&5
6537   echo "configure: failed program was:" >&5
6538   cat conftest.$ac_ext >&5
6539   rm -rf conftest*
6540   eval "ac_cv_header_$ac_safe=no"
6541 fi
6542 rm -f conftest*
6543 fi
6544 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6545   echo "$ac_t""yes" 1>&6
6546     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6547   cat >> confdefs.h <<EOF
6548 #define $ac_tr_hdr 1
6549 EOF
6550  
6551 else
6552   echo "$ac_t""no" 1>&6
6553 fi
6554 done
6555
6556         
6557         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6558                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6559 echo "configure:6560: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6560 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6561 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6562   echo $ac_n "(cached) $ac_c" 1>&6
6563 else
6564   ac_save_LIBS="$LIBS"
6565 LIBS="-lssl -lcrypto $LIBS"
6566 cat > conftest.$ac_ext <<EOF
6567 #line 6568 "configure"
6568 #include "confdefs.h"
6569 /* Override any gcc2 internal prototype to avoid an error.  */
6570 /* We use char because int might match the return type of a gcc2
6571     builtin and then its argument prototype would still apply.  */
6572 char SSLeay_add_ssl_algorithms();
6573
6574 int main() {
6575 SSLeay_add_ssl_algorithms()
6576 ; return 0; }
6577 EOF
6578 if { (eval echo configure:6579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6579   rm -rf conftest*
6580   eval "ac_cv_lib_$ac_lib_var=yes"
6581 else
6582   echo "configure: failed program was:" >&5
6583   cat conftest.$ac_ext >&5
6584   rm -rf conftest*
6585   eval "ac_cv_lib_$ac_lib_var=no"
6586 fi
6587 rm -f conftest*
6588 LIBS="$ac_save_LIBS"
6589
6590 fi
6591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6592   echo "$ac_t""yes" 1>&6
6593   have_ssleay=yes
6594                         need_rsaref=no
6595 else
6596   echo "$ac_t""no" 1>&6
6597 have_ssleay=no
6598 fi
6599
6600                         
6601                 if test $have_ssleay = no ; then
6602                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6603 echo "configure:6604: checking for SSL_library_init in -lssl" >&5
6604 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6605 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6606   echo $ac_n "(cached) $ac_c" 1>&6
6607 else
6608   ac_save_LIBS="$LIBS"
6609 LIBS="-lssl -lcrypto $LIBS"
6610 cat > conftest.$ac_ext <<EOF
6611 #line 6612 "configure"
6612 #include "confdefs.h"
6613 /* Override any gcc2 internal prototype to avoid an error.  */
6614 /* We use char because int might match the return type of a gcc2
6615     builtin and then its argument prototype would still apply.  */
6616 char SSL_library_init();
6617
6618 int main() {
6619 SSL_library_init()
6620 ; return 0; }
6621 EOF
6622 if { (eval echo configure:6623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6623   rm -rf conftest*
6624   eval "ac_cv_lib_$ac_lib_var=yes"
6625 else
6626   echo "configure: failed program was:" >&5
6627   cat conftest.$ac_ext >&5
6628   rm -rf conftest*
6629   eval "ac_cv_lib_$ac_lib_var=no"
6630 fi
6631 rm -f conftest*
6632 LIBS="$ac_save_LIBS"
6633
6634 fi
6635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6636   echo "$ac_t""yes" 1>&6
6637   have_ssleay=yes
6638                                 need_rsaref=no
6639 else
6640   echo "$ac_t""no" 1>&6
6641 have_ssleay=no
6642 fi
6643
6644                 fi
6645
6646                 if test $have_ssleay = no ; then
6647                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6648 echo "configure:6649: checking for ssl3_accept in -lssl" >&5
6649 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6650 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6651   echo $ac_n "(cached) $ac_c" 1>&6
6652 else
6653   ac_save_LIBS="$LIBS"
6654 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6655 cat > conftest.$ac_ext <<EOF
6656 #line 6657 "configure"
6657 #include "confdefs.h"
6658 /* Override any gcc2 internal prototype to avoid an error.  */
6659 /* We use char because int might match the return type of a gcc2
6660     builtin and then its argument prototype would still apply.  */
6661 char ssl3_accept();
6662
6663 int main() {
6664 ssl3_accept()
6665 ; return 0; }
6666 EOF
6667 if { (eval echo configure:6668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6668   rm -rf conftest*
6669   eval "ac_cv_lib_$ac_lib_var=yes"
6670 else
6671   echo "configure: failed program was:" >&5
6672   cat conftest.$ac_ext >&5
6673   rm -rf conftest*
6674   eval "ac_cv_lib_$ac_lib_var=no"
6675 fi
6676 rm -f conftest*
6677 LIBS="$ac_save_LIBS"
6678
6679 fi
6680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6681   echo "$ac_t""yes" 1>&6
6682   have_ssleay=yes
6683                                 need_rsaref=yes
6684 else
6685   echo "$ac_t""no" 1>&6
6686 have_ssleay=no
6687 fi
6688
6689                 fi
6690
6691                 if test $have_ssleay = yes ; then
6692                         ol_with_tls=found
6693                         ol_link_tls=yes
6694
6695                         cat >> confdefs.h <<\EOF
6696 #define HAVE_SSLEAY 1
6697 EOF
6698
6699
6700                         if test $need_rsaref = yes; then
6701                                 cat >> confdefs.h <<\EOF
6702 #define HAVE_RSAREF 1
6703 EOF
6704
6705
6706                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6707                         else
6708                                 TLS_LIBS="-lssl -lcrypto"
6709                         fi
6710                 fi
6711         fi
6712 fi
6713
6714 if test $ol_link_tls = yes ; then
6715         cat >> confdefs.h <<\EOF
6716 #define HAVE_TLS 1
6717 EOF
6718
6719 fi      
6720
6721 for ac_func in \
6722         ctime_r                 \
6723         gethostbyname_r gethostbyaddr_r \
6724
6725 do
6726 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6727 echo "configure:6728: checking for $ac_func" >&5
6728 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6729   echo $ac_n "(cached) $ac_c" 1>&6
6730 else
6731   cat > conftest.$ac_ext <<EOF
6732 #line 6733 "configure"
6733 #include "confdefs.h"
6734 /* System header to define __stub macros and hopefully few prototypes,
6735     which can conflict with char $ac_func(); below.  */
6736 #include <assert.h>
6737 /* Override any gcc2 internal prototype to avoid an error.  */
6738 /* We use char because int might match the return type of a gcc2
6739     builtin and then its argument prototype would still apply.  */
6740 char $ac_func();
6741 char (*f)();
6742
6743 int main() {
6744
6745 /* The GNU C library defines this for functions which it implements
6746     to always fail with ENOSYS.  Some functions are actually named
6747     something starting with __ and the normal name is an alias.  */
6748 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6749 choke me
6750 #else
6751 f = $ac_func;
6752 #endif
6753
6754 ; return 0; }
6755 EOF
6756 if { (eval echo configure:6757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6757   rm -rf conftest*
6758   eval "ac_cv_func_$ac_func=yes"
6759 else
6760   echo "configure: failed program was:" >&5
6761   cat conftest.$ac_ext >&5
6762   rm -rf conftest*
6763   eval "ac_cv_func_$ac_func=no"
6764 fi
6765 rm -f conftest*
6766 fi
6767
6768 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6769   echo "$ac_t""yes" 1>&6
6770     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6771   cat >> confdefs.h <<EOF
6772 #define $ac_tr_func 1
6773 EOF
6774  
6775 else
6776   echo "$ac_t""no" 1>&6
6777 fi
6778 done
6779
6780
6781 if test "$ac_cv_func_ctime_r" = no ; then
6782         ol_cv_func_ctime_r_nargs=0
6783 else
6784         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6785 echo "configure:6786: checking number of arguments of ctime_r" >&5
6786 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6787   echo $ac_n "(cached) $ac_c" 1>&6
6788 else
6789   cat > conftest.$ac_ext <<EOF
6790 #line 6791 "configure"
6791 #include "confdefs.h"
6792 #include <time.h>
6793 int main() {
6794 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6795 ; return 0; }
6796 EOF
6797 if { (eval echo configure:6798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6798   rm -rf conftest*
6799   ol_cv_func_ctime_r_nargs3=yes
6800 else
6801   echo "configure: failed program was:" >&5
6802   cat conftest.$ac_ext >&5
6803   rm -rf conftest*
6804   ol_cv_func_ctime_r_nargs3=no
6805 fi
6806 rm -f conftest*
6807
6808         cat > conftest.$ac_ext <<EOF
6809 #line 6810 "configure"
6810 #include "confdefs.h"
6811 #include <time.h>
6812 int main() {
6813 time_t ti; char *buffer; ctime_r(&ti,buffer);
6814 ; return 0; }
6815 EOF
6816 if { (eval echo configure:6817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6817   rm -rf conftest*
6818   ol_cv_func_ctime_r_nargs2=yes
6819 else
6820   echo "configure: failed program was:" >&5
6821   cat conftest.$ac_ext >&5
6822   rm -rf conftest*
6823   ol_cv_func_ctime_r_nargs2=no
6824 fi
6825 rm -f conftest*
6826
6827         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6828                 $ol_cv_func_ctime_r_nargs2 = no ; then
6829
6830                 ol_cv_func_ctime_r_nargs=3
6831
6832         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6833                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6834
6835                 ol_cv_func_ctime_r_nargs=2
6836
6837         else
6838                 ol_cv_func_ctime_r_nargs=0
6839         fi
6840   
6841 fi
6842
6843 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6844
6845   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6846         cat >> confdefs.h <<EOF
6847 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6848 EOF
6849
6850   fi
6851
6852 fi
6853
6854 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6855         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6856 echo "configure:6857: checking number of arguments of gethostbyname_r" >&5
6857 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6858   echo $ac_n "(cached) $ac_c" 1>&6
6859 else
6860   cat > conftest.$ac_ext <<EOF
6861 #line 6862 "configure"
6862 #include "confdefs.h"
6863 #include <sys/types.h>
6864 #include <sys/socket.h>
6865 #include <netinet/in.h>
6866 #include <netdb.h>
6867 #define BUFSIZE (sizeof(struct hostent)+10)
6868 int main() {
6869 struct hostent hent; char buffer[BUFSIZE];
6870                 int bufsize=BUFSIZE;int h_errno;
6871                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6872                         buffer, bufsize, &h_errno);
6873 ; return 0; }
6874 EOF
6875 if { (eval echo configure:6876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6876   rm -rf conftest*
6877   ol_cv_func_gethostbyname_r_nargs5=yes
6878 else
6879   echo "configure: failed program was:" >&5
6880   cat conftest.$ac_ext >&5
6881   rm -rf conftest*
6882   ol_cv_func_gethostbyname_r_nargs5=no
6883 fi
6884 rm -f conftest*
6885
6886         cat > conftest.$ac_ext <<EOF
6887 #line 6888 "configure"
6888 #include "confdefs.h"
6889 #include <sys/types.h>
6890 #include <sys/socket.h>
6891 #include <netinet/in.h>
6892 #include <netdb.h>
6893 #define BUFSIZE (sizeof(struct hostent)+10)
6894 int main() {
6895 struct hostent hent;struct hostent *rhent;
6896                 char buffer[BUFSIZE];
6897                 int bufsize=BUFSIZE;int h_errno;
6898                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6899                         &rhent, &h_errno);
6900 ; return 0; }
6901 EOF
6902 if { (eval echo configure:6903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6903   rm -rf conftest*
6904   ol_cv_func_gethostbyname_r_nargs6=yes
6905 else
6906   echo "configure: failed program was:" >&5
6907   cat conftest.$ac_ext >&5
6908   rm -rf conftest*
6909   ol_cv_func_gethostbyname_r_nargs6=no
6910 fi
6911 rm -f conftest*
6912
6913         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6914                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6915
6916                 ol_cv_func_gethostbyname_r_nargs=5
6917
6918         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6919                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6920
6921                 ol_cv_func_gethostbyname_r_nargs=6
6922
6923         else
6924                 ol_cv_func_gethostbyname_r_nargs=0
6925         fi
6926   
6927 fi
6928
6929 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6930   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6931         cat >> confdefs.h <<EOF
6932 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6933 EOF
6934
6935   fi
6936
6937 else
6938         ol_cv_func_gethostbyname_r_nargs=0
6939 fi
6940  
6941 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6942         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6943 echo "configure:6944: checking number of arguments of gethostbyaddr_r" >&5
6944 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6945   echo $ac_n "(cached) $ac_c" 1>&6
6946 else
6947   cat > conftest.$ac_ext <<EOF
6948 #line 6949 "configure"
6949 #include "confdefs.h"
6950 #include <sys/types.h>
6951 #include <sys/socket.h>
6952 #include <netinet/in.h>
6953 #include <netdb.h>
6954 #define BUFSIZE (sizeof(struct hostent)+10)
6955 int main() {
6956 struct hostent hent; char buffer[BUFSIZE]; 
6957             struct in_addr add;
6958             size_t alen=sizeof(struct in_addr);
6959             int bufsize=BUFSIZE;int h_errno;
6960                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6961                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6962 ; return 0; }
6963 EOF
6964 if { (eval echo configure:6965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6965   rm -rf conftest*
6966   ol_cv_func_gethostbyaddr_r_nargs7=yes
6967 else
6968   echo "configure: failed program was:" >&5
6969   cat conftest.$ac_ext >&5
6970   rm -rf conftest*
6971   ol_cv_func_gethostbyaddr_r_nargs7=no
6972 fi
6973 rm -f conftest*
6974
6975         cat > conftest.$ac_ext <<EOF
6976 #line 6977 "configure"
6977 #include "confdefs.h"
6978 #include <sys/types.h>
6979 #include <sys/socket.h>
6980 #include <netinet/in.h>
6981 #include <netdb.h>
6982 #define BUFSIZE (sizeof(struct hostent)+10)
6983 int main() {
6984 struct hostent hent;
6985                 struct hostent *rhent; char buffer[BUFSIZE]; 
6986                 struct in_addr add;
6987                 size_t alen=sizeof(struct in_addr);
6988                 int bufsize=BUFSIZE;int h_errno;
6989                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6990                         alen, AF_INET, &hent, buffer, bufsize, 
6991                         &rhent, &h_errno);
6992 ; return 0; }
6993 EOF
6994 if { (eval echo configure:6995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6995   rm -rf conftest*
6996   ol_cv_func_gethostbyaddr_r_nargs8=yes
6997 else
6998   echo "configure: failed program was:" >&5
6999   cat conftest.$ac_ext >&5
7000   rm -rf conftest*
7001   ol_cv_func_gethostbyaddr_r_nargs8=no
7002 fi
7003 rm -f conftest*
7004
7005         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7006                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7007
7008                 ol_cv_func_gethostbyaddr_r_nargs=7
7009
7010         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7011                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7012
7013                 ol_cv_func_gethostbyaddr_r_nargs=8
7014
7015         else
7016                 ol_cv_func_gethostbyaddr_r_nargs=0
7017         fi
7018   
7019 fi
7020
7021 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7022   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7023     cat >> confdefs.h <<EOF
7024 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7025 EOF
7026
7027   fi
7028
7029 else
7030         ol_cv_func_gethostbyaddr_r_nargs=0
7031 fi
7032
7033 if test "$ac_cv_func_ctime_r" = yes \
7034         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7035         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7036         -a "$ac_cv_func_gethostbyname_r" = yes \
7037         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7038         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7039         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7040         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7041         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7042         ; then
7043  
7044         cat >> confdefs.h <<\EOF
7045 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7046 EOF
7047
7048 fi
7049
7050 ol_link_threads=no
7051
7052 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7053         -o $ol_with_threads = nt ; then
7054
7055         
7056         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
7057 echo "configure:7058: checking for NT Threads" >&5
7058 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
7059   echo $ac_n "(cached) $ac_c" 1>&6
7060 else
7061   
7062                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7063 echo "configure:7064: checking for _beginthread" >&5
7064 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7065   echo $ac_n "(cached) $ac_c" 1>&6
7066 else
7067   cat > conftest.$ac_ext <<EOF
7068 #line 7069 "configure"
7069 #include "confdefs.h"
7070 /* System header to define __stub macros and hopefully few prototypes,
7071     which can conflict with char _beginthread(); below.  */
7072 #include <assert.h>
7073 /* Override any gcc2 internal prototype to avoid an error.  */
7074 /* We use char because int might match the return type of a gcc2
7075     builtin and then its argument prototype would still apply.  */
7076 char _beginthread();
7077 char (*f)();
7078
7079 int main() {
7080
7081 /* The GNU C library defines this for functions which it implements
7082     to always fail with ENOSYS.  Some functions are actually named
7083     something starting with __ and the normal name is an alias.  */
7084 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7085 choke me
7086 #else
7087 f = _beginthread;
7088 #endif
7089
7090 ; return 0; }
7091 EOF
7092 if { (eval echo configure:7093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7093   rm -rf conftest*
7094   eval "ac_cv_func__beginthread=yes"
7095 else
7096   echo "configure: failed program was:" >&5
7097   cat conftest.$ac_ext >&5
7098   rm -rf conftest*
7099   eval "ac_cv_func__beginthread=no"
7100 fi
7101 rm -f conftest*
7102 fi
7103
7104 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7105   echo "$ac_t""yes" 1>&6
7106   ol_cv_nt_threads=yes
7107 else
7108   echo "$ac_t""no" 1>&6
7109 ol_cv_nt_threads=no
7110 fi
7111
7112         
7113 fi
7114
7115 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7116
7117         if test $ol_cv_nt_threads = yes ; then
7118                 cat >> confdefs.h <<\EOF
7119 #define HAVE_NT_THREADS 1
7120 EOF
7121
7122         fi
7123
7124
7125         if test "$ol_cv_nt_threads" = yes ; then
7126         ol_link_threads=nt
7127         ol_with_threads=found
7128         ol_with_yielding_select=yes
7129
7130                 cat >> confdefs.h <<\EOF
7131 #define HAVE_NT_SERVICE_MANAGER 1
7132 EOF
7133
7134                 cat >> confdefs.h <<\EOF
7135 #define HAVE_NT_EVENT_LOG 1
7136 EOF
7137
7138         fi
7139
7140         if test $ol_with_threads = nt ; then
7141                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7142         fi
7143 fi
7144
7145 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7146         -o $ol_with_threads = posix ; then
7147
7148         for ac_hdr in pthread.h
7149 do
7150 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7151 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7152 echo "configure:7153: checking for $ac_hdr" >&5
7153 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7154   echo $ac_n "(cached) $ac_c" 1>&6
7155 else
7156   cat > conftest.$ac_ext <<EOF
7157 #line 7158 "configure"
7158 #include "confdefs.h"
7159 #include <$ac_hdr>
7160 EOF
7161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7162 { (eval echo configure:7163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7164 if test -z "$ac_err"; then
7165   rm -rf conftest*
7166   eval "ac_cv_header_$ac_safe=yes"
7167 else
7168   echo "$ac_err" >&5
7169   echo "configure: failed program was:" >&5
7170   cat conftest.$ac_ext >&5
7171   rm -rf conftest*
7172   eval "ac_cv_header_$ac_safe=no"
7173 fi
7174 rm -f conftest*
7175 fi
7176 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7177   echo "$ac_t""yes" 1>&6
7178     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7179   cat >> confdefs.h <<EOF
7180 #define $ac_tr_hdr 1
7181 EOF
7182  
7183 else
7184   echo "$ac_t""no" 1>&6
7185 fi
7186 done
7187
7188
7189         if test $ac_cv_header_pthread_h = yes ; then
7190                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7191 echo "configure:7192: checking POSIX thread version" >&5
7192 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7193   echo $ac_n "(cached) $ac_c" 1>&6
7194 else
7195   
7196         cat > conftest.$ac_ext <<EOF
7197 #line 7198 "configure"
7198 #include "confdefs.h"
7199
7200 #               include <pthread.h>
7201                 /* this check could be improved */
7202 #               ifdef PTHREAD_ONCE_INIT
7203                         pthread_version_final;
7204 #               endif
7205         
7206 EOF
7207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7208   egrep "pthread_version_final" >/dev/null 2>&1; then
7209   rm -rf conftest*
7210   ol_pthread_final=yes
7211 else
7212   rm -rf conftest*
7213   ol_pthread_final=no
7214 fi
7215 rm -f conftest*
7216
7217
7218         cat > conftest.$ac_ext <<EOF
7219 #line 7220 "configure"
7220 #include "confdefs.h"
7221
7222 #               include <pthread.h>
7223                 /* this check could be improved */
7224 #               ifdef pthread_once_init
7225                         pthread_version_draft4;
7226 #               endif
7227         
7228 EOF
7229 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7230   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7231   rm -rf conftest*
7232   ol_pthread_draft4=yes
7233 else
7234   rm -rf conftest*
7235   ol_pthread_draft4=no
7236 fi
7237 rm -f conftest*
7238
7239
7240         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7241                 ol_cv_pthread_version=final
7242         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7243                 ol_cv_pthread_version=draft4
7244         else
7245                 ol_cv_pthread_version=unknown
7246         fi
7247
7248 fi
7249
7250 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7251
7252
7253                 if test $ol_cv_pthread_version = final ; then
7254                         cat >> confdefs.h <<\EOF
7255 #define HAVE_PTHREADS_FINAL 1
7256 EOF
7257
7258                 elif test $ol_cv_pthread_version = draft4 ; then
7259                         cat >> confdefs.h <<\EOF
7260 #define HAVE_PTHREADS_D4 1
7261 EOF
7262
7263                 else
7264                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7265                 fi
7266
7267                 # consider threads found
7268                 ol_with_threads=found
7269
7270                 
7271         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7272 echo "configure:7273: checking for LinuxThreads pthread.h" >&5
7273 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7274   echo $ac_n "(cached) $ac_c" 1>&6
7275 else
7276   cat > conftest.$ac_ext <<EOF
7277 #line 7278 "configure"
7278 #include "confdefs.h"
7279 #include <pthread.h>
7280 EOF
7281 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7282   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7283   rm -rf conftest*
7284   ol_cv_header_linux_threads=yes
7285 else
7286   rm -rf conftest*
7287   ol_cv_header_linux_threads=no
7288 fi
7289 rm -f conftest*
7290
7291                 
7292 fi
7293
7294 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7295         if test $ol_cv_header_linux_threads = yes; then
7296                 cat >> confdefs.h <<\EOF
7297 #define HAVE_LINUX_THREADS 1
7298 EOF
7299
7300         fi
7301
7302                 
7303         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7304 echo "configure:7305: checking for GNU Pth pthread.h" >&5
7305 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7306   echo $ac_n "(cached) $ac_c" 1>&6
7307 else
7308   cat > conftest.$ac_ext <<EOF
7309 #line 7310 "configure"
7310 #include "confdefs.h"
7311 #include <pthread.h>
7312 #ifdef _POSIX_THREAD_IS_GNU_PTH
7313         __gnu_pth__;
7314 #endif
7315
7316 EOF
7317 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7318   egrep "__gnu_pth__" >/dev/null 2>&1; then
7319   rm -rf conftest*
7320   ol_cv_header_gnu_pth_pthread_h=yes
7321 else
7322   rm -rf conftest*
7323   ol_cv_header_gnu_pth_pthread_h=no
7324 fi
7325 rm -f conftest*
7326
7327                 
7328 fi
7329
7330 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7331
7332
7333                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7334                         for ac_hdr in sched.h
7335 do
7336 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7337 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7338 echo "configure:7339: checking for $ac_hdr" >&5
7339 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7340   echo $ac_n "(cached) $ac_c" 1>&6
7341 else
7342   cat > conftest.$ac_ext <<EOF
7343 #line 7344 "configure"
7344 #include "confdefs.h"
7345 #include <$ac_hdr>
7346 EOF
7347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7348 { (eval echo configure:7349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7350 if test -z "$ac_err"; then
7351   rm -rf conftest*
7352   eval "ac_cv_header_$ac_safe=yes"
7353 else
7354   echo "$ac_err" >&5
7355   echo "configure: failed program was:" >&5
7356   cat conftest.$ac_ext >&5
7357   rm -rf conftest*
7358   eval "ac_cv_header_$ac_safe=no"
7359 fi
7360 rm -f conftest*
7361 fi
7362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7363   echo "$ac_t""yes" 1>&6
7364     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7365   cat >> confdefs.h <<EOF
7366 #define $ac_tr_hdr 1
7367 EOF
7368  
7369 else
7370   echo "$ac_t""no" 1>&6
7371 fi
7372 done
7373
7374                 fi
7375
7376                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7377                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7378 echo "configure:7379: checking for pthread_create in default libraries" >&5
7379 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7380   echo $ac_n "(cached) $ac_c" 1>&6
7381 else
7382   
7383                 if test "$cross_compiling" = yes; then
7384   cat > conftest.$ac_ext <<EOF
7385 #line 7386 "configure"
7386 #include "confdefs.h"
7387 /* pthread test headers */
7388 #include <pthread.h>
7389 #ifndef NULL
7390 #define NULL (void*)0
7391 #endif
7392
7393 static void *task(p)
7394         void *p;
7395 {
7396         return (void *) (p == NULL);
7397 }
7398
7399 int main() {
7400
7401         /* pthread test function */
7402         pthread_t t;
7403         int status;
7404
7405         /* make sure pthread_create() isn't just a stub */
7406 #if HAVE_PTHREADS_D4
7407         status = pthread_create(&t, pthread_attr_default, task, NULL);
7408 #else
7409         status = pthread_create(&t, NULL, task, NULL);
7410 #endif
7411
7412         if( status ) exit( status );
7413
7414         /* make sure pthread_detach() isn't just a stub */
7415 #if HAVE_PTHREADS_D4
7416         status = pthread_detach( &t );
7417 #else
7418         status = pthread_detach( t );
7419 #endif
7420
7421 #ifdef HAVE_LINUX_THREADS
7422         pthread_kill_other_threads_np();
7423 #endif
7424
7425         exit( status );
7426
7427 ; return 0; }
7428 EOF
7429 if { (eval echo configure:7430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7430   rm -rf conftest*
7431   ol_cv_pthread_create=yes
7432 else
7433   echo "configure: failed program was:" >&5
7434   cat conftest.$ac_ext >&5
7435   rm -rf conftest*
7436   ol_cv_pthread_create=no
7437 fi
7438 rm -f conftest*
7439 else
7440   cat > conftest.$ac_ext <<EOF
7441 #line 7442 "configure"
7442 #include "confdefs.h"
7443 /* pthread test headers */
7444 #include <pthread.h>
7445 #ifndef NULL
7446 #define NULL (void*)0
7447 #endif
7448
7449 static void *task(p)
7450         void *p;
7451 {
7452         return (void *) (p == NULL);
7453 }
7454
7455
7456 int main(argc, argv)
7457         int argc;
7458         char **argv;
7459 {
7460
7461         /* pthread test function */
7462         pthread_t t;
7463         int status;
7464
7465         /* make sure pthread_create() isn't just a stub */
7466 #if HAVE_PTHREADS_D4
7467         status = pthread_create(&t, pthread_attr_default, task, NULL);
7468 #else
7469         status = pthread_create(&t, NULL, task, NULL);
7470 #endif
7471
7472         if( status ) exit( status );
7473
7474         /* make sure pthread_detach() isn't just a stub */
7475 #if HAVE_PTHREADS_D4
7476         status = pthread_detach( &t );
7477 #else
7478         status = pthread_detach( t );
7479 #endif
7480
7481 #ifdef HAVE_LINUX_THREADS
7482         pthread_kill_other_threads_np();
7483 #endif
7484
7485         exit( status );
7486
7487 }
7488
7489 EOF
7490 if { (eval echo configure:7491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7491 then
7492   ol_cv_pthread_create=yes
7493 else
7494   echo "configure: failed program was:" >&5
7495   cat conftest.$ac_ext >&5
7496   rm -fr conftest*
7497   ol_cv_pthread_create=no
7498 fi
7499 rm -fr conftest*
7500 fi
7501
7502 fi
7503
7504 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7505
7506                 if test $ol_cv_pthread_create != no ; then
7507                         ol_link_threads=posix
7508                         ol_link_pthreads=""
7509                 fi
7510                 
7511                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7512 if test "$ol_link_threads" = no ; then
7513         # try -kthread
7514         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7515 echo "configure:7516: checking for pthread link with -kthread" >&5
7516 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7517   echo $ac_n "(cached) $ac_c" 1>&6
7518 else
7519   
7520                 # save the flags
7521                 ol_LIBS="$LIBS"
7522                 LIBS="-kthread $LIBS"
7523
7524                 if test "$cross_compiling" = yes; then
7525   cat > conftest.$ac_ext <<EOF
7526 #line 7527 "configure"
7527 #include "confdefs.h"
7528 /* pthread test headers */
7529 #include <pthread.h>
7530 #ifndef NULL
7531 #define NULL (void*)0
7532 #endif
7533
7534 static void *task(p)
7535         void *p;
7536 {
7537         return (void *) (p == NULL);
7538 }
7539
7540 int main() {
7541
7542         /* pthread test function */
7543         pthread_t t;
7544         int status;
7545
7546         /* make sure pthread_create() isn't just a stub */
7547 #if HAVE_PTHREADS_D4
7548         status = pthread_create(&t, pthread_attr_default, task, NULL);
7549 #else
7550         status = pthread_create(&t, NULL, task, NULL);
7551 #endif
7552
7553         if( status ) exit( status );
7554
7555         /* make sure pthread_detach() isn't just a stub */
7556 #if HAVE_PTHREADS_D4
7557         status = pthread_detach( &t );
7558 #else
7559         status = pthread_detach( t );
7560 #endif
7561
7562 #ifdef HAVE_LINUX_THREADS
7563         pthread_kill_other_threads_np();
7564 #endif
7565
7566         exit( status );
7567
7568 ; return 0; }
7569 EOF
7570 if { (eval echo configure:7571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7571   rm -rf conftest*
7572   ol_cv_pthread_kthread=yes
7573 else
7574   echo "configure: failed program was:" >&5
7575   cat conftest.$ac_ext >&5
7576   rm -rf conftest*
7577   ol_cv_pthread_kthread=no
7578 fi
7579 rm -f conftest*
7580 else
7581   cat > conftest.$ac_ext <<EOF
7582 #line 7583 "configure"
7583 #include "confdefs.h"
7584 /* pthread test headers */
7585 #include <pthread.h>
7586 #ifndef NULL
7587 #define NULL (void*)0
7588 #endif
7589
7590 static void *task(p)
7591         void *p;
7592 {
7593         return (void *) (p == NULL);
7594 }
7595
7596
7597 int main(argc, argv)
7598         int argc;
7599         char **argv;
7600 {
7601
7602         /* pthread test function */
7603         pthread_t t;
7604         int status;
7605
7606         /* make sure pthread_create() isn't just a stub */
7607 #if HAVE_PTHREADS_D4
7608         status = pthread_create(&t, pthread_attr_default, task, NULL);
7609 #else
7610         status = pthread_create(&t, NULL, task, NULL);
7611 #endif
7612
7613         if( status ) exit( status );
7614
7615         /* make sure pthread_detach() isn't just a stub */
7616 #if HAVE_PTHREADS_D4
7617         status = pthread_detach( &t );
7618 #else
7619         status = pthread_detach( t );
7620 #endif
7621
7622 #ifdef HAVE_LINUX_THREADS
7623         pthread_kill_other_threads_np();
7624 #endif
7625
7626         exit( status );
7627
7628 }
7629
7630 EOF
7631 if { (eval echo configure:7632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7632 then
7633   ol_cv_pthread_kthread=yes
7634 else
7635   echo "configure: failed program was:" >&5
7636   cat conftest.$ac_ext >&5
7637   rm -fr conftest*
7638   ol_cv_pthread_kthread=no
7639 fi
7640 rm -fr conftest*
7641 fi
7642
7643
7644                 # restore the LIBS
7645                 LIBS="$ol_LIBS"
7646         
7647 fi
7648
7649 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7650
7651         if test $ol_cv_pthread_kthread = yes ; then
7652                 ol_link_pthreads="-kthread"
7653                 ol_link_threads=posix
7654         fi
7655 fi
7656
7657                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7658 if test "$ol_link_threads" = no ; then
7659         # try -pthread
7660         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7661 echo "configure:7662: checking for pthread link with -pthread" >&5
7662 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7663   echo $ac_n "(cached) $ac_c" 1>&6
7664 else
7665   
7666                 # save the flags
7667                 ol_LIBS="$LIBS"
7668                 LIBS="-pthread $LIBS"
7669
7670                 if test "$cross_compiling" = yes; then
7671   cat > conftest.$ac_ext <<EOF
7672 #line 7673 "configure"
7673 #include "confdefs.h"
7674 /* pthread test headers */
7675 #include <pthread.h>
7676 #ifndef NULL
7677 #define NULL (void*)0
7678 #endif
7679
7680 static void *task(p)
7681         void *p;
7682 {
7683         return (void *) (p == NULL);
7684 }
7685
7686 int main() {
7687
7688         /* pthread test function */
7689         pthread_t t;
7690         int status;
7691
7692         /* make sure pthread_create() isn't just a stub */
7693 #if HAVE_PTHREADS_D4
7694         status = pthread_create(&t, pthread_attr_default, task, NULL);
7695 #else
7696         status = pthread_create(&t, NULL, task, NULL);
7697 #endif
7698
7699         if( status ) exit( status );
7700
7701         /* make sure pthread_detach() isn't just a stub */
7702 #if HAVE_PTHREADS_D4
7703         status = pthread_detach( &t );
7704 #else
7705         status = pthread_detach( t );
7706 #endif
7707
7708 #ifdef HAVE_LINUX_THREADS
7709         pthread_kill_other_threads_np();
7710 #endif
7711
7712         exit( status );
7713
7714 ; return 0; }
7715 EOF
7716 if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7717   rm -rf conftest*
7718   ol_cv_pthread_pthread=yes
7719 else
7720   echo "configure: failed program was:" >&5
7721   cat conftest.$ac_ext >&5
7722   rm -rf conftest*
7723   ol_cv_pthread_pthread=no
7724 fi
7725 rm -f conftest*
7726 else
7727   cat > conftest.$ac_ext <<EOF
7728 #line 7729 "configure"
7729 #include "confdefs.h"
7730 /* pthread test headers */
7731 #include <pthread.h>
7732 #ifndef NULL
7733 #define NULL (void*)0
7734 #endif
7735
7736 static void *task(p)
7737         void *p;
7738 {
7739         return (void *) (p == NULL);
7740 }
7741
7742
7743 int main(argc, argv)
7744         int argc;
7745         char **argv;
7746 {
7747
7748         /* pthread test function */
7749         pthread_t t;
7750         int status;
7751
7752         /* make sure pthread_create() isn't just a stub */
7753 #if HAVE_PTHREADS_D4
7754         status = pthread_create(&t, pthread_attr_default, task, NULL);
7755 #else
7756         status = pthread_create(&t, NULL, task, NULL);
7757 #endif
7758
7759         if( status ) exit( status );
7760
7761         /* make sure pthread_detach() isn't just a stub */
7762 #if HAVE_PTHREADS_D4
7763         status = pthread_detach( &t );
7764 #else
7765         status = pthread_detach( t );
7766 #endif
7767
7768 #ifdef HAVE_LINUX_THREADS
7769         pthread_kill_other_threads_np();
7770 #endif
7771
7772         exit( status );
7773
7774 }
7775
7776 EOF
7777 if { (eval echo configure:7778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7778 then
7779   ol_cv_pthread_pthread=yes
7780 else
7781   echo "configure: failed program was:" >&5
7782   cat conftest.$ac_ext >&5
7783   rm -fr conftest*
7784   ol_cv_pthread_pthread=no
7785 fi
7786 rm -fr conftest*
7787 fi
7788
7789
7790                 # restore the LIBS
7791                 LIBS="$ol_LIBS"
7792         
7793 fi
7794
7795 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7796
7797         if test $ol_cv_pthread_pthread = yes ; then
7798                 ol_link_pthreads="-pthread"
7799                 ol_link_threads=posix
7800         fi
7801 fi
7802
7803                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7804 if test "$ol_link_threads" = no ; then
7805         # try -pthreads
7806         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7807 echo "configure:7808: checking for pthread link with -pthreads" >&5
7808 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7809   echo $ac_n "(cached) $ac_c" 1>&6
7810 else
7811   
7812                 # save the flags
7813                 ol_LIBS="$LIBS"
7814                 LIBS="-pthreads $LIBS"
7815
7816                 if test "$cross_compiling" = yes; then
7817   cat > conftest.$ac_ext <<EOF
7818 #line 7819 "configure"
7819 #include "confdefs.h"
7820 /* pthread test headers */
7821 #include <pthread.h>
7822 #ifndef NULL
7823 #define NULL (void*)0
7824 #endif
7825
7826 static void *task(p)
7827         void *p;
7828 {
7829         return (void *) (p == NULL);
7830 }
7831
7832 int main() {
7833
7834         /* pthread test function */
7835         pthread_t t;
7836         int status;
7837
7838         /* make sure pthread_create() isn't just a stub */
7839 #if HAVE_PTHREADS_D4
7840         status = pthread_create(&t, pthread_attr_default, task, NULL);
7841 #else
7842         status = pthread_create(&t, NULL, task, NULL);
7843 #endif
7844
7845         if( status ) exit( status );
7846
7847         /* make sure pthread_detach() isn't just a stub */
7848 #if HAVE_PTHREADS_D4
7849         status = pthread_detach( &t );
7850 #else
7851         status = pthread_detach( t );
7852 #endif
7853
7854 #ifdef HAVE_LINUX_THREADS
7855         pthread_kill_other_threads_np();
7856 #endif
7857
7858         exit( status );
7859
7860 ; return 0; }
7861 EOF
7862 if { (eval echo configure:7863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7863   rm -rf conftest*
7864   ol_cv_pthread_pthreads=yes
7865 else
7866   echo "configure: failed program was:" >&5
7867   cat conftest.$ac_ext >&5
7868   rm -rf conftest*
7869   ol_cv_pthread_pthreads=no
7870 fi
7871 rm -f conftest*
7872 else
7873   cat > conftest.$ac_ext <<EOF
7874 #line 7875 "configure"
7875 #include "confdefs.h"
7876 /* pthread test headers */
7877 #include <pthread.h>
7878 #ifndef NULL
7879 #define NULL (void*)0
7880 #endif
7881
7882 static void *task(p)
7883         void *p;
7884 {
7885         return (void *) (p == NULL);
7886 }
7887
7888
7889 int main(argc, argv)
7890         int argc;
7891         char **argv;
7892 {
7893
7894         /* pthread test function */
7895         pthread_t t;
7896         int status;
7897
7898         /* make sure pthread_create() isn't just a stub */
7899 #if HAVE_PTHREADS_D4
7900         status = pthread_create(&t, pthread_attr_default, task, NULL);
7901 #else
7902         status = pthread_create(&t, NULL, task, NULL);
7903 #endif
7904
7905         if( status ) exit( status );
7906
7907         /* make sure pthread_detach() isn't just a stub */
7908 #if HAVE_PTHREADS_D4
7909         status = pthread_detach( &t );
7910 #else
7911         status = pthread_detach( t );
7912 #endif
7913
7914 #ifdef HAVE_LINUX_THREADS
7915         pthread_kill_other_threads_np();
7916 #endif
7917
7918         exit( status );
7919
7920 }
7921
7922 EOF
7923 if { (eval echo configure:7924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7924 then
7925   ol_cv_pthread_pthreads=yes
7926 else
7927   echo "configure: failed program was:" >&5
7928   cat conftest.$ac_ext >&5
7929   rm -fr conftest*
7930   ol_cv_pthread_pthreads=no
7931 fi
7932 rm -fr conftest*
7933 fi
7934
7935
7936                 # restore the LIBS
7937                 LIBS="$ol_LIBS"
7938         
7939 fi
7940
7941 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7942
7943         if test $ol_cv_pthread_pthreads = yes ; then
7944                 ol_link_pthreads="-pthreads"
7945                 ol_link_threads=posix
7946         fi
7947 fi
7948
7949                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7950 if test "$ol_link_threads" = no ; then
7951         # try -mthreads
7952         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7953 echo "configure:7954: checking for pthread link with -mthreads" >&5
7954 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7955   echo $ac_n "(cached) $ac_c" 1>&6
7956 else
7957   
7958                 # save the flags
7959                 ol_LIBS="$LIBS"
7960                 LIBS="-mthreads $LIBS"
7961
7962                 if test "$cross_compiling" = yes; then
7963   cat > conftest.$ac_ext <<EOF
7964 #line 7965 "configure"
7965 #include "confdefs.h"
7966 /* pthread test headers */
7967 #include <pthread.h>
7968 #ifndef NULL
7969 #define NULL (void*)0
7970 #endif
7971
7972 static void *task(p)
7973         void *p;
7974 {
7975         return (void *) (p == NULL);
7976 }
7977
7978 int main() {
7979
7980         /* pthread test function */
7981         pthread_t t;
7982         int status;
7983
7984         /* make sure pthread_create() isn't just a stub */
7985 #if HAVE_PTHREADS_D4
7986         status = pthread_create(&t, pthread_attr_default, task, NULL);
7987 #else
7988         status = pthread_create(&t, NULL, task, NULL);
7989 #endif
7990
7991         if( status ) exit( status );
7992
7993         /* make sure pthread_detach() isn't just a stub */
7994 #if HAVE_PTHREADS_D4
7995         status = pthread_detach( &t );
7996 #else
7997         status = pthread_detach( t );
7998 #endif
7999
8000 #ifdef HAVE_LINUX_THREADS
8001         pthread_kill_other_threads_np();
8002 #endif
8003
8004         exit( status );
8005
8006 ; return 0; }
8007 EOF
8008 if { (eval echo configure:8009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8009   rm -rf conftest*
8010   ol_cv_pthread_mthreads=yes
8011 else
8012   echo "configure: failed program was:" >&5
8013   cat conftest.$ac_ext >&5
8014   rm -rf conftest*
8015   ol_cv_pthread_mthreads=no
8016 fi
8017 rm -f conftest*
8018 else
8019   cat > conftest.$ac_ext <<EOF
8020 #line 8021 "configure"
8021 #include "confdefs.h"
8022 /* pthread test headers */
8023 #include <pthread.h>
8024 #ifndef NULL
8025 #define NULL (void*)0
8026 #endif
8027
8028 static void *task(p)
8029         void *p;
8030 {
8031         return (void *) (p == NULL);
8032 }
8033
8034
8035 int main(argc, argv)
8036         int argc;
8037         char **argv;
8038 {
8039
8040         /* pthread test function */
8041         pthread_t t;
8042         int status;
8043
8044         /* make sure pthread_create() isn't just a stub */
8045 #if HAVE_PTHREADS_D4
8046         status = pthread_create(&t, pthread_attr_default, task, NULL);
8047 #else
8048         status = pthread_create(&t, NULL, task, NULL);
8049 #endif
8050
8051         if( status ) exit( status );
8052
8053         /* make sure pthread_detach() isn't just a stub */
8054 #if HAVE_PTHREADS_D4
8055         status = pthread_detach( &t );
8056 #else
8057         status = pthread_detach( t );
8058 #endif
8059
8060 #ifdef HAVE_LINUX_THREADS
8061         pthread_kill_other_threads_np();
8062 #endif
8063
8064         exit( status );
8065
8066 }
8067
8068 EOF
8069 if { (eval echo configure:8070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8070 then
8071   ol_cv_pthread_mthreads=yes
8072 else
8073   echo "configure: failed program was:" >&5
8074   cat conftest.$ac_ext >&5
8075   rm -fr conftest*
8076   ol_cv_pthread_mthreads=no
8077 fi
8078 rm -fr conftest*
8079 fi
8080
8081
8082                 # restore the LIBS
8083                 LIBS="$ol_LIBS"
8084         
8085 fi
8086
8087 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8088
8089         if test $ol_cv_pthread_mthreads = yes ; then
8090                 ol_link_pthreads="-mthreads"
8091                 ol_link_threads=posix
8092         fi
8093 fi
8094
8095                 # Pthread try link: -thread (ol_cv_pthread_thread)
8096 if test "$ol_link_threads" = no ; then
8097         # try -thread
8098         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8099 echo "configure:8100: checking for pthread link with -thread" >&5
8100 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8101   echo $ac_n "(cached) $ac_c" 1>&6
8102 else
8103   
8104                 # save the flags
8105                 ol_LIBS="$LIBS"
8106                 LIBS="-thread $LIBS"
8107
8108                 if test "$cross_compiling" = yes; then
8109   cat > conftest.$ac_ext <<EOF
8110 #line 8111 "configure"
8111 #include "confdefs.h"
8112 /* pthread test headers */
8113 #include <pthread.h>
8114 #ifndef NULL
8115 #define NULL (void*)0
8116 #endif
8117
8118 static void *task(p)
8119         void *p;
8120 {
8121         return (void *) (p == NULL);
8122 }
8123
8124 int main() {
8125
8126         /* pthread test function */
8127         pthread_t t;
8128         int status;
8129
8130         /* make sure pthread_create() isn't just a stub */
8131 #if HAVE_PTHREADS_D4
8132         status = pthread_create(&t, pthread_attr_default, task, NULL);
8133 #else
8134         status = pthread_create(&t, NULL, task, NULL);
8135 #endif
8136
8137         if( status ) exit( status );
8138
8139         /* make sure pthread_detach() isn't just a stub */
8140 #if HAVE_PTHREADS_D4
8141         status = pthread_detach( &t );
8142 #else
8143         status = pthread_detach( t );
8144 #endif
8145
8146 #ifdef HAVE_LINUX_THREADS
8147         pthread_kill_other_threads_np();
8148 #endif
8149
8150         exit( status );
8151
8152 ; return 0; }
8153 EOF
8154 if { (eval echo configure:8155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8155   rm -rf conftest*
8156   ol_cv_pthread_thread=yes
8157 else
8158   echo "configure: failed program was:" >&5
8159   cat conftest.$ac_ext >&5
8160   rm -rf conftest*
8161   ol_cv_pthread_thread=no
8162 fi
8163 rm -f conftest*
8164 else
8165   cat > conftest.$ac_ext <<EOF
8166 #line 8167 "configure"
8167 #include "confdefs.h"
8168 /* pthread test headers */
8169 #include <pthread.h>
8170 #ifndef NULL
8171 #define NULL (void*)0
8172 #endif
8173
8174 static void *task(p)
8175         void *p;
8176 {
8177         return (void *) (p == NULL);
8178 }
8179
8180
8181 int main(argc, argv)
8182         int argc;
8183         char **argv;
8184 {
8185
8186         /* pthread test function */
8187         pthread_t t;
8188         int status;
8189
8190         /* make sure pthread_create() isn't just a stub */
8191 #if HAVE_PTHREADS_D4
8192         status = pthread_create(&t, pthread_attr_default, task, NULL);
8193 #else
8194         status = pthread_create(&t, NULL, task, NULL);
8195 #endif
8196
8197         if( status ) exit( status );
8198
8199         /* make sure pthread_detach() isn't just a stub */
8200 #if HAVE_PTHREADS_D4
8201         status = pthread_detach( &t );
8202 #else
8203         status = pthread_detach( t );
8204 #endif
8205
8206 #ifdef HAVE_LINUX_THREADS
8207         pthread_kill_other_threads_np();
8208 #endif
8209
8210         exit( status );
8211
8212 }
8213
8214 EOF
8215 if { (eval echo configure:8216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8216 then
8217   ol_cv_pthread_thread=yes
8218 else
8219   echo "configure: failed program was:" >&5
8220   cat conftest.$ac_ext >&5
8221   rm -fr conftest*
8222   ol_cv_pthread_thread=no
8223 fi
8224 rm -fr conftest*
8225 fi
8226
8227
8228                 # restore the LIBS
8229                 LIBS="$ol_LIBS"
8230         
8231 fi
8232
8233 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8234
8235         if test $ol_cv_pthread_thread = yes ; then
8236                 ol_link_pthreads="-thread"
8237                 ol_link_threads=posix
8238         fi
8239 fi
8240
8241
8242                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8243 if test "$ol_link_threads" = no ; then
8244         # try -lpthread -lmach -lexc -lc_r
8245         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8246 echo "configure:8247: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8247 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8248   echo $ac_n "(cached) $ac_c" 1>&6
8249 else
8250   
8251                 # save the flags
8252                 ol_LIBS="$LIBS"
8253                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8254
8255                 if test "$cross_compiling" = yes; then
8256   cat > conftest.$ac_ext <<EOF
8257 #line 8258 "configure"
8258 #include "confdefs.h"
8259 /* pthread test headers */
8260 #include <pthread.h>
8261 #ifndef NULL
8262 #define NULL (void*)0
8263 #endif
8264
8265 static void *task(p)
8266         void *p;
8267 {
8268         return (void *) (p == NULL);
8269 }
8270
8271 int main() {
8272
8273         /* pthread test function */
8274         pthread_t t;
8275         int status;
8276
8277         /* make sure pthread_create() isn't just a stub */
8278 #if HAVE_PTHREADS_D4
8279         status = pthread_create(&t, pthread_attr_default, task, NULL);
8280 #else
8281         status = pthread_create(&t, NULL, task, NULL);
8282 #endif
8283
8284         if( status ) exit( status );
8285
8286         /* make sure pthread_detach() isn't just a stub */
8287 #if HAVE_PTHREADS_D4
8288         status = pthread_detach( &t );
8289 #else
8290         status = pthread_detach( t );
8291 #endif
8292
8293 #ifdef HAVE_LINUX_THREADS
8294         pthread_kill_other_threads_np();
8295 #endif
8296
8297         exit( status );
8298
8299 ; return 0; }
8300 EOF
8301 if { (eval echo configure:8302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8302   rm -rf conftest*
8303   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8304 else
8305   echo "configure: failed program was:" >&5
8306   cat conftest.$ac_ext >&5
8307   rm -rf conftest*
8308   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8309 fi
8310 rm -f conftest*
8311 else
8312   cat > conftest.$ac_ext <<EOF
8313 #line 8314 "configure"
8314 #include "confdefs.h"
8315 /* pthread test headers */
8316 #include <pthread.h>
8317 #ifndef NULL
8318 #define NULL (void*)0
8319 #endif
8320
8321 static void *task(p)
8322         void *p;
8323 {
8324         return (void *) (p == NULL);
8325 }
8326
8327
8328 int main(argc, argv)
8329         int argc;
8330         char **argv;
8331 {
8332
8333         /* pthread test function */
8334         pthread_t t;
8335         int status;
8336
8337         /* make sure pthread_create() isn't just a stub */
8338 #if HAVE_PTHREADS_D4
8339         status = pthread_create(&t, pthread_attr_default, task, NULL);
8340 #else
8341         status = pthread_create(&t, NULL, task, NULL);
8342 #endif
8343
8344         if( status ) exit( status );
8345
8346         /* make sure pthread_detach() isn't just a stub */
8347 #if HAVE_PTHREADS_D4
8348         status = pthread_detach( &t );
8349 #else
8350         status = pthread_detach( t );
8351 #endif
8352
8353 #ifdef HAVE_LINUX_THREADS
8354         pthread_kill_other_threads_np();
8355 #endif
8356
8357         exit( status );
8358
8359 }
8360
8361 EOF
8362 if { (eval echo configure:8363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8363 then
8364   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8365 else
8366   echo "configure: failed program was:" >&5
8367   cat conftest.$ac_ext >&5
8368   rm -fr conftest*
8369   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8370 fi
8371 rm -fr conftest*
8372 fi
8373
8374
8375                 # restore the LIBS
8376                 LIBS="$ol_LIBS"
8377         
8378 fi
8379
8380 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8381
8382         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8383                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8384                 ol_link_threads=posix
8385         fi
8386 fi
8387
8388                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8389 if test "$ol_link_threads" = no ; then
8390         # try -lpthread -lmach -lexc
8391         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8392 echo "configure:8393: checking for pthread link with -lpthread -lmach -lexc" >&5
8393 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8394   echo $ac_n "(cached) $ac_c" 1>&6
8395 else
8396   
8397                 # save the flags
8398                 ol_LIBS="$LIBS"
8399                 LIBS="-lpthread -lmach -lexc $LIBS"
8400
8401                 if test "$cross_compiling" = yes; then
8402   cat > conftest.$ac_ext <<EOF
8403 #line 8404 "configure"
8404 #include "confdefs.h"
8405 /* pthread test headers */
8406 #include <pthread.h>
8407 #ifndef NULL
8408 #define NULL (void*)0
8409 #endif
8410
8411 static void *task(p)
8412         void *p;
8413 {
8414         return (void *) (p == NULL);
8415 }
8416
8417 int main() {
8418
8419         /* pthread test function */
8420         pthread_t t;
8421         int status;
8422
8423         /* make sure pthread_create() isn't just a stub */
8424 #if HAVE_PTHREADS_D4
8425         status = pthread_create(&t, pthread_attr_default, task, NULL);
8426 #else
8427         status = pthread_create(&t, NULL, task, NULL);
8428 #endif
8429
8430         if( status ) exit( status );
8431
8432         /* make sure pthread_detach() isn't just a stub */
8433 #if HAVE_PTHREADS_D4
8434         status = pthread_detach( &t );
8435 #else
8436         status = pthread_detach( t );
8437 #endif
8438
8439 #ifdef HAVE_LINUX_THREADS
8440         pthread_kill_other_threads_np();
8441 #endif
8442
8443         exit( status );
8444
8445 ; return 0; }
8446 EOF
8447 if { (eval echo configure:8448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8448   rm -rf conftest*
8449   ol_cv_pthread_lpthread_lmach_lexc=yes
8450 else
8451   echo "configure: failed program was:" >&5
8452   cat conftest.$ac_ext >&5
8453   rm -rf conftest*
8454   ol_cv_pthread_lpthread_lmach_lexc=no
8455 fi
8456 rm -f conftest*
8457 else
8458   cat > conftest.$ac_ext <<EOF
8459 #line 8460 "configure"
8460 #include "confdefs.h"
8461 /* pthread test headers */
8462 #include <pthread.h>
8463 #ifndef NULL
8464 #define NULL (void*)0
8465 #endif
8466
8467 static void *task(p)
8468         void *p;
8469 {
8470         return (void *) (p == NULL);
8471 }
8472
8473
8474 int main(argc, argv)
8475         int argc;
8476         char **argv;
8477 {
8478
8479         /* pthread test function */
8480         pthread_t t;
8481         int status;
8482
8483         /* make sure pthread_create() isn't just a stub */
8484 #if HAVE_PTHREADS_D4
8485         status = pthread_create(&t, pthread_attr_default, task, NULL);
8486 #else
8487         status = pthread_create(&t, NULL, task, NULL);
8488 #endif
8489
8490         if( status ) exit( status );
8491
8492         /* make sure pthread_detach() isn't just a stub */
8493 #if HAVE_PTHREADS_D4
8494         status = pthread_detach( &t );
8495 #else
8496         status = pthread_detach( t );
8497 #endif
8498
8499 #ifdef HAVE_LINUX_THREADS
8500         pthread_kill_other_threads_np();
8501 #endif
8502
8503         exit( status );
8504
8505 }
8506
8507 EOF
8508 if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8509 then
8510   ol_cv_pthread_lpthread_lmach_lexc=yes
8511 else
8512   echo "configure: failed program was:" >&5
8513   cat conftest.$ac_ext >&5
8514   rm -fr conftest*
8515   ol_cv_pthread_lpthread_lmach_lexc=no
8516 fi
8517 rm -fr conftest*
8518 fi
8519
8520
8521                 # restore the LIBS
8522                 LIBS="$ol_LIBS"
8523         
8524 fi
8525
8526 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8527
8528         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8529                 ol_link_pthreads="-lpthread -lmach -lexc"
8530                 ol_link_threads=posix
8531         fi
8532 fi
8533
8534
8535                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8536 if test "$ol_link_threads" = no ; then
8537         # try -lpthread -Wl,-woff,85
8538         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8539 echo "configure:8540: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8540 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8541   echo $ac_n "(cached) $ac_c" 1>&6
8542 else
8543   
8544                 # save the flags
8545                 ol_LIBS="$LIBS"
8546                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8547
8548                 if test "$cross_compiling" = yes; then
8549   cat > conftest.$ac_ext <<EOF
8550 #line 8551 "configure"
8551 #include "confdefs.h"
8552 /* pthread test headers */
8553 #include <pthread.h>
8554 #ifndef NULL
8555 #define NULL (void*)0
8556 #endif
8557
8558 static void *task(p)
8559         void *p;
8560 {
8561         return (void *) (p == NULL);
8562 }
8563
8564 int main() {
8565
8566         /* pthread test function */
8567         pthread_t t;
8568         int status;
8569
8570         /* make sure pthread_create() isn't just a stub */
8571 #if HAVE_PTHREADS_D4
8572         status = pthread_create(&t, pthread_attr_default, task, NULL);
8573 #else
8574         status = pthread_create(&t, NULL, task, NULL);
8575 #endif
8576
8577         if( status ) exit( status );
8578
8579         /* make sure pthread_detach() isn't just a stub */
8580 #if HAVE_PTHREADS_D4
8581         status = pthread_detach( &t );
8582 #else
8583         status = pthread_detach( t );
8584 #endif
8585
8586 #ifdef HAVE_LINUX_THREADS
8587         pthread_kill_other_threads_np();
8588 #endif
8589
8590         exit( status );
8591
8592 ; return 0; }
8593 EOF
8594 if { (eval echo configure:8595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8595   rm -rf conftest*
8596   ol_cv_pthread_lib_lpthread_woff=yes
8597 else
8598   echo "configure: failed program was:" >&5
8599   cat conftest.$ac_ext >&5
8600   rm -rf conftest*
8601   ol_cv_pthread_lib_lpthread_woff=no
8602 fi
8603 rm -f conftest*
8604 else
8605   cat > conftest.$ac_ext <<EOF
8606 #line 8607 "configure"
8607 #include "confdefs.h"
8608 /* pthread test headers */
8609 #include <pthread.h>
8610 #ifndef NULL
8611 #define NULL (void*)0
8612 #endif
8613
8614 static void *task(p)
8615         void *p;
8616 {
8617         return (void *) (p == NULL);
8618 }
8619
8620
8621 int main(argc, argv)
8622         int argc;
8623         char **argv;
8624 {
8625
8626         /* pthread test function */
8627         pthread_t t;
8628         int status;
8629
8630         /* make sure pthread_create() isn't just a stub */
8631 #if HAVE_PTHREADS_D4
8632         status = pthread_create(&t, pthread_attr_default, task, NULL);
8633 #else
8634         status = pthread_create(&t, NULL, task, NULL);
8635 #endif
8636
8637         if( status ) exit( status );
8638
8639         /* make sure pthread_detach() isn't just a stub */
8640 #if HAVE_PTHREADS_D4
8641         status = pthread_detach( &t );
8642 #else
8643         status = pthread_detach( t );
8644 #endif
8645
8646 #ifdef HAVE_LINUX_THREADS
8647         pthread_kill_other_threads_np();
8648 #endif
8649
8650         exit( status );
8651
8652 }
8653
8654 EOF
8655 if { (eval echo configure:8656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8656 then
8657   ol_cv_pthread_lib_lpthread_woff=yes
8658 else
8659   echo "configure: failed program was:" >&5
8660   cat conftest.$ac_ext >&5
8661   rm -fr conftest*
8662   ol_cv_pthread_lib_lpthread_woff=no
8663 fi
8664 rm -fr conftest*
8665 fi
8666
8667
8668                 # restore the LIBS
8669                 LIBS="$ol_LIBS"
8670         
8671 fi
8672
8673 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8674
8675         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8676                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8677                 ol_link_threads=posix
8678         fi
8679 fi
8680
8681
8682                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8683 if test "$ol_link_threads" = no ; then
8684         # try -lpthread
8685         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8686 echo "configure:8687: checking for pthread link with -lpthread" >&5
8687 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8688   echo $ac_n "(cached) $ac_c" 1>&6
8689 else
8690   
8691                 # save the flags
8692                 ol_LIBS="$LIBS"
8693                 LIBS="-lpthread $LIBS"
8694
8695                 if test "$cross_compiling" = yes; then
8696   cat > conftest.$ac_ext <<EOF
8697 #line 8698 "configure"
8698 #include "confdefs.h"
8699 /* pthread test headers */
8700 #include <pthread.h>
8701 #ifndef NULL
8702 #define NULL (void*)0
8703 #endif
8704
8705 static void *task(p)
8706         void *p;
8707 {
8708         return (void *) (p == NULL);
8709 }
8710
8711 int main() {
8712
8713         /* pthread test function */
8714         pthread_t t;
8715         int status;
8716
8717         /* make sure pthread_create() isn't just a stub */
8718 #if HAVE_PTHREADS_D4
8719         status = pthread_create(&t, pthread_attr_default, task, NULL);
8720 #else
8721         status = pthread_create(&t, NULL, task, NULL);
8722 #endif
8723
8724         if( status ) exit( status );
8725
8726         /* make sure pthread_detach() isn't just a stub */
8727 #if HAVE_PTHREADS_D4
8728         status = pthread_detach( &t );
8729 #else
8730         status = pthread_detach( t );
8731 #endif
8732
8733 #ifdef HAVE_LINUX_THREADS
8734         pthread_kill_other_threads_np();
8735 #endif
8736
8737         exit( status );
8738
8739 ; return 0; }
8740 EOF
8741 if { (eval echo configure:8742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8742   rm -rf conftest*
8743   ol_cv_pthread_lpthread=yes
8744 else
8745   echo "configure: failed program was:" >&5
8746   cat conftest.$ac_ext >&5
8747   rm -rf conftest*
8748   ol_cv_pthread_lpthread=no
8749 fi
8750 rm -f conftest*
8751 else
8752   cat > conftest.$ac_ext <<EOF
8753 #line 8754 "configure"
8754 #include "confdefs.h"
8755 /* pthread test headers */
8756 #include <pthread.h>
8757 #ifndef NULL
8758 #define NULL (void*)0
8759 #endif
8760
8761 static void *task(p)
8762         void *p;
8763 {
8764         return (void *) (p == NULL);
8765 }
8766
8767
8768 int main(argc, argv)
8769         int argc;
8770         char **argv;
8771 {
8772
8773         /* pthread test function */
8774         pthread_t t;
8775         int status;
8776
8777         /* make sure pthread_create() isn't just a stub */
8778 #if HAVE_PTHREADS_D4
8779         status = pthread_create(&t, pthread_attr_default, task, NULL);
8780 #else
8781         status = pthread_create(&t, NULL, task, NULL);
8782 #endif
8783
8784         if( status ) exit( status );
8785
8786         /* make sure pthread_detach() isn't just a stub */
8787 #if HAVE_PTHREADS_D4
8788         status = pthread_detach( &t );
8789 #else
8790         status = pthread_detach( t );
8791 #endif
8792
8793 #ifdef HAVE_LINUX_THREADS
8794         pthread_kill_other_threads_np();
8795 #endif
8796
8797         exit( status );
8798
8799 }
8800
8801 EOF
8802 if { (eval echo configure:8803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8803 then
8804   ol_cv_pthread_lpthread=yes
8805 else
8806   echo "configure: failed program was:" >&5
8807   cat conftest.$ac_ext >&5
8808   rm -fr conftest*
8809   ol_cv_pthread_lpthread=no
8810 fi
8811 rm -fr conftest*
8812 fi
8813
8814
8815                 # restore the LIBS
8816                 LIBS="$ol_LIBS"
8817         
8818 fi
8819
8820 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8821
8822         if test $ol_cv_pthread_lpthread = yes ; then
8823                 ol_link_pthreads="-lpthread"
8824                 ol_link_threads=posix
8825         fi
8826 fi
8827
8828                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8829 if test "$ol_link_threads" = no ; then
8830         # try -lc_r
8831         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8832 echo "configure:8833: checking for pthread link with -lc_r" >&5
8833 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8834   echo $ac_n "(cached) $ac_c" 1>&6
8835 else
8836   
8837                 # save the flags
8838                 ol_LIBS="$LIBS"
8839                 LIBS="-lc_r $LIBS"
8840
8841                 if test "$cross_compiling" = yes; then
8842   cat > conftest.$ac_ext <<EOF
8843 #line 8844 "configure"
8844 #include "confdefs.h"
8845 /* pthread test headers */
8846 #include <pthread.h>
8847 #ifndef NULL
8848 #define NULL (void*)0
8849 #endif
8850
8851 static void *task(p)
8852         void *p;
8853 {
8854         return (void *) (p == NULL);
8855 }
8856
8857 int main() {
8858
8859         /* pthread test function */
8860         pthread_t t;
8861         int status;
8862
8863         /* make sure pthread_create() isn't just a stub */
8864 #if HAVE_PTHREADS_D4
8865         status = pthread_create(&t, pthread_attr_default, task, NULL);
8866 #else
8867         status = pthread_create(&t, NULL, task, NULL);
8868 #endif
8869
8870         if( status ) exit( status );
8871
8872         /* make sure pthread_detach() isn't just a stub */
8873 #if HAVE_PTHREADS_D4
8874         status = pthread_detach( &t );
8875 #else
8876         status = pthread_detach( t );
8877 #endif
8878
8879 #ifdef HAVE_LINUX_THREADS
8880         pthread_kill_other_threads_np();
8881 #endif
8882
8883         exit( status );
8884
8885 ; return 0; }
8886 EOF
8887 if { (eval echo configure:8888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8888   rm -rf conftest*
8889   ol_cv_pthread_lc_r=yes
8890 else
8891   echo "configure: failed program was:" >&5
8892   cat conftest.$ac_ext >&5
8893   rm -rf conftest*
8894   ol_cv_pthread_lc_r=no
8895 fi
8896 rm -f conftest*
8897 else
8898   cat > conftest.$ac_ext <<EOF
8899 #line 8900 "configure"
8900 #include "confdefs.h"
8901 /* pthread test headers */
8902 #include <pthread.h>
8903 #ifndef NULL
8904 #define NULL (void*)0
8905 #endif
8906
8907 static void *task(p)
8908         void *p;
8909 {
8910         return (void *) (p == NULL);
8911 }
8912
8913
8914 int main(argc, argv)
8915         int argc;
8916         char **argv;
8917 {
8918
8919         /* pthread test function */
8920         pthread_t t;
8921         int status;
8922
8923         /* make sure pthread_create() isn't just a stub */
8924 #if HAVE_PTHREADS_D4
8925         status = pthread_create(&t, pthread_attr_default, task, NULL);
8926 #else
8927         status = pthread_create(&t, NULL, task, NULL);
8928 #endif
8929
8930         if( status ) exit( status );
8931
8932         /* make sure pthread_detach() isn't just a stub */
8933 #if HAVE_PTHREADS_D4
8934         status = pthread_detach( &t );
8935 #else
8936         status = pthread_detach( t );
8937 #endif
8938
8939 #ifdef HAVE_LINUX_THREADS
8940         pthread_kill_other_threads_np();
8941 #endif
8942
8943         exit( status );
8944
8945 }
8946
8947 EOF
8948 if { (eval echo configure:8949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8949 then
8950   ol_cv_pthread_lc_r=yes
8951 else
8952   echo "configure: failed program was:" >&5
8953   cat conftest.$ac_ext >&5
8954   rm -fr conftest*
8955   ol_cv_pthread_lc_r=no
8956 fi
8957 rm -fr conftest*
8958 fi
8959
8960
8961                 # restore the LIBS
8962                 LIBS="$ol_LIBS"
8963         
8964 fi
8965
8966 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8967
8968         if test $ol_cv_pthread_lc_r = yes ; then
8969                 ol_link_pthreads="-lc_r"
8970                 ol_link_threads=posix
8971         fi
8972 fi
8973
8974
8975                 # Pthread try link: -threads (ol_cv_pthread_threads)
8976 if test "$ol_link_threads" = no ; then
8977         # try -threads
8978         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8979 echo "configure:8980: checking for pthread link with -threads" >&5
8980 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8981   echo $ac_n "(cached) $ac_c" 1>&6
8982 else
8983   
8984                 # save the flags
8985                 ol_LIBS="$LIBS"
8986                 LIBS="-threads $LIBS"
8987
8988                 if test "$cross_compiling" = yes; then
8989   cat > conftest.$ac_ext <<EOF
8990 #line 8991 "configure"
8991 #include "confdefs.h"
8992 /* pthread test headers */
8993 #include <pthread.h>
8994 #ifndef NULL
8995 #define NULL (void*)0
8996 #endif
8997
8998 static void *task(p)
8999         void *p;
9000 {
9001         return (void *) (p == NULL);
9002 }
9003
9004 int main() {
9005
9006         /* pthread test function */
9007         pthread_t t;
9008         int status;
9009
9010         /* make sure pthread_create() isn't just a stub */
9011 #if HAVE_PTHREADS_D4
9012         status = pthread_create(&t, pthread_attr_default, task, NULL);
9013 #else
9014         status = pthread_create(&t, NULL, task, NULL);
9015 #endif
9016
9017         if( status ) exit( status );
9018
9019         /* make sure pthread_detach() isn't just a stub */
9020 #if HAVE_PTHREADS_D4
9021         status = pthread_detach( &t );
9022 #else
9023         status = pthread_detach( t );
9024 #endif
9025
9026 #ifdef HAVE_LINUX_THREADS
9027         pthread_kill_other_threads_np();
9028 #endif
9029
9030         exit( status );
9031
9032 ; return 0; }
9033 EOF
9034 if { (eval echo configure:9035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9035   rm -rf conftest*
9036   ol_cv_pthread_threads=yes
9037 else
9038   echo "configure: failed program was:" >&5
9039   cat conftest.$ac_ext >&5
9040   rm -rf conftest*
9041   ol_cv_pthread_threads=no
9042 fi
9043 rm -f conftest*
9044 else
9045   cat > conftest.$ac_ext <<EOF
9046 #line 9047 "configure"
9047 #include "confdefs.h"
9048 /* pthread test headers */
9049 #include <pthread.h>
9050 #ifndef NULL
9051 #define NULL (void*)0
9052 #endif
9053
9054 static void *task(p)
9055         void *p;
9056 {
9057         return (void *) (p == NULL);
9058 }
9059
9060
9061 int main(argc, argv)
9062         int argc;
9063         char **argv;
9064 {
9065
9066         /* pthread test function */
9067         pthread_t t;
9068         int status;
9069
9070         /* make sure pthread_create() isn't just a stub */
9071 #if HAVE_PTHREADS_D4
9072         status = pthread_create(&t, pthread_attr_default, task, NULL);
9073 #else
9074         status = pthread_create(&t, NULL, task, NULL);
9075 #endif
9076
9077         if( status ) exit( status );
9078
9079         /* make sure pthread_detach() isn't just a stub */
9080 #if HAVE_PTHREADS_D4
9081         status = pthread_detach( &t );
9082 #else
9083         status = pthread_detach( t );
9084 #endif
9085
9086 #ifdef HAVE_LINUX_THREADS
9087         pthread_kill_other_threads_np();
9088 #endif
9089
9090         exit( status );
9091
9092 }
9093
9094 EOF
9095 if { (eval echo configure:9096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9096 then
9097   ol_cv_pthread_threads=yes
9098 else
9099   echo "configure: failed program was:" >&5
9100   cat conftest.$ac_ext >&5
9101   rm -fr conftest*
9102   ol_cv_pthread_threads=no
9103 fi
9104 rm -fr conftest*
9105 fi
9106
9107
9108                 # restore the LIBS
9109                 LIBS="$ol_LIBS"
9110         
9111 fi
9112
9113 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9114
9115         if test $ol_cv_pthread_threads = yes ; then
9116                 ol_link_pthreads="-threads"
9117                 ol_link_threads=posix
9118         fi
9119 fi
9120
9121
9122                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9123 if test "$ol_link_threads" = no ; then
9124         # try -lpthreads -lmach -lexc -lc_r
9125         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9126 echo "configure:9127: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9127 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9128   echo $ac_n "(cached) $ac_c" 1>&6
9129 else
9130   
9131                 # save the flags
9132                 ol_LIBS="$LIBS"
9133                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9134
9135                 if test "$cross_compiling" = yes; then
9136   cat > conftest.$ac_ext <<EOF
9137 #line 9138 "configure"
9138 #include "confdefs.h"
9139 /* pthread test headers */
9140 #include <pthread.h>
9141 #ifndef NULL
9142 #define NULL (void*)0
9143 #endif
9144
9145 static void *task(p)
9146         void *p;
9147 {
9148         return (void *) (p == NULL);
9149 }
9150
9151 int main() {
9152
9153         /* pthread test function */
9154         pthread_t t;
9155         int status;
9156
9157         /* make sure pthread_create() isn't just a stub */
9158 #if HAVE_PTHREADS_D4
9159         status = pthread_create(&t, pthread_attr_default, task, NULL);
9160 #else
9161         status = pthread_create(&t, NULL, task, NULL);
9162 #endif
9163
9164         if( status ) exit( status );
9165
9166         /* make sure pthread_detach() isn't just a stub */
9167 #if HAVE_PTHREADS_D4
9168         status = pthread_detach( &t );
9169 #else
9170         status = pthread_detach( t );
9171 #endif
9172
9173 #ifdef HAVE_LINUX_THREADS
9174         pthread_kill_other_threads_np();
9175 #endif
9176
9177         exit( status );
9178
9179 ; return 0; }
9180 EOF
9181 if { (eval echo configure:9182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9182   rm -rf conftest*
9183   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9184 else
9185   echo "configure: failed program was:" >&5
9186   cat conftest.$ac_ext >&5
9187   rm -rf conftest*
9188   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9189 fi
9190 rm -f conftest*
9191 else
9192   cat > conftest.$ac_ext <<EOF
9193 #line 9194 "configure"
9194 #include "confdefs.h"
9195 /* pthread test headers */
9196 #include <pthread.h>
9197 #ifndef NULL
9198 #define NULL (void*)0
9199 #endif
9200
9201 static void *task(p)
9202         void *p;
9203 {
9204         return (void *) (p == NULL);
9205 }
9206
9207
9208 int main(argc, argv)
9209         int argc;
9210         char **argv;
9211 {
9212
9213         /* pthread test function */
9214         pthread_t t;
9215         int status;
9216
9217         /* make sure pthread_create() isn't just a stub */
9218 #if HAVE_PTHREADS_D4
9219         status = pthread_create(&t, pthread_attr_default, task, NULL);
9220 #else
9221         status = pthread_create(&t, NULL, task, NULL);
9222 #endif
9223
9224         if( status ) exit( status );
9225
9226         /* make sure pthread_detach() isn't just a stub */
9227 #if HAVE_PTHREADS_D4
9228         status = pthread_detach( &t );
9229 #else
9230         status = pthread_detach( t );
9231 #endif
9232
9233 #ifdef HAVE_LINUX_THREADS
9234         pthread_kill_other_threads_np();
9235 #endif
9236
9237         exit( status );
9238
9239 }
9240
9241 EOF
9242 if { (eval echo configure:9243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9243 then
9244   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9245 else
9246   echo "configure: failed program was:" >&5
9247   cat conftest.$ac_ext >&5
9248   rm -fr conftest*
9249   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9250 fi
9251 rm -fr conftest*
9252 fi
9253
9254
9255                 # restore the LIBS
9256                 LIBS="$ol_LIBS"
9257         
9258 fi
9259
9260 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9261
9262         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9263                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9264                 ol_link_threads=posix
9265         fi
9266 fi
9267
9268                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9269 if test "$ol_link_threads" = no ; then
9270         # try -lpthreads -lmach -lexc
9271         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9272 echo "configure:9273: checking for pthread link with -lpthreads -lmach -lexc" >&5
9273 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9274   echo $ac_n "(cached) $ac_c" 1>&6
9275 else
9276   
9277                 # save the flags
9278                 ol_LIBS="$LIBS"
9279                 LIBS="-lpthreads -lmach -lexc $LIBS"
9280
9281                 if test "$cross_compiling" = yes; then
9282   cat > conftest.$ac_ext <<EOF
9283 #line 9284 "configure"
9284 #include "confdefs.h"
9285 /* pthread test headers */
9286 #include <pthread.h>
9287 #ifndef NULL
9288 #define NULL (void*)0
9289 #endif
9290
9291 static void *task(p)
9292         void *p;
9293 {
9294         return (void *) (p == NULL);
9295 }
9296
9297 int main() {
9298
9299         /* pthread test function */
9300         pthread_t t;
9301         int status;
9302
9303         /* make sure pthread_create() isn't just a stub */
9304 #if HAVE_PTHREADS_D4
9305         status = pthread_create(&t, pthread_attr_default, task, NULL);
9306 #else
9307         status = pthread_create(&t, NULL, task, NULL);
9308 #endif
9309
9310         if( status ) exit( status );
9311
9312         /* make sure pthread_detach() isn't just a stub */
9313 #if HAVE_PTHREADS_D4
9314         status = pthread_detach( &t );
9315 #else
9316         status = pthread_detach( t );
9317 #endif
9318
9319 #ifdef HAVE_LINUX_THREADS
9320         pthread_kill_other_threads_np();
9321 #endif
9322
9323         exit( status );
9324
9325 ; return 0; }
9326 EOF
9327 if { (eval echo configure:9328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9328   rm -rf conftest*
9329   ol_cv_pthread_lpthreads_lmach_lexc=yes
9330 else
9331   echo "configure: failed program was:" >&5
9332   cat conftest.$ac_ext >&5
9333   rm -rf conftest*
9334   ol_cv_pthread_lpthreads_lmach_lexc=no
9335 fi
9336 rm -f conftest*
9337 else
9338   cat > conftest.$ac_ext <<EOF
9339 #line 9340 "configure"
9340 #include "confdefs.h"
9341 /* pthread test headers */
9342 #include <pthread.h>
9343 #ifndef NULL
9344 #define NULL (void*)0
9345 #endif
9346
9347 static void *task(p)
9348         void *p;
9349 {
9350         return (void *) (p == NULL);
9351 }
9352
9353
9354 int main(argc, argv)
9355         int argc;
9356         char **argv;
9357 {
9358
9359         /* pthread test function */
9360         pthread_t t;
9361         int status;
9362
9363         /* make sure pthread_create() isn't just a stub */
9364 #if HAVE_PTHREADS_D4
9365         status = pthread_create(&t, pthread_attr_default, task, NULL);
9366 #else
9367         status = pthread_create(&t, NULL, task, NULL);
9368 #endif
9369
9370         if( status ) exit( status );
9371
9372         /* make sure pthread_detach() isn't just a stub */
9373 #if HAVE_PTHREADS_D4
9374         status = pthread_detach( &t );
9375 #else
9376         status = pthread_detach( t );
9377 #endif
9378
9379 #ifdef HAVE_LINUX_THREADS
9380         pthread_kill_other_threads_np();
9381 #endif
9382
9383         exit( status );
9384
9385 }
9386
9387 EOF
9388 if { (eval echo configure:9389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9389 then
9390   ol_cv_pthread_lpthreads_lmach_lexc=yes
9391 else
9392   echo "configure: failed program was:" >&5
9393   cat conftest.$ac_ext >&5
9394   rm -fr conftest*
9395   ol_cv_pthread_lpthreads_lmach_lexc=no
9396 fi
9397 rm -fr conftest*
9398 fi
9399
9400
9401                 # restore the LIBS
9402                 LIBS="$ol_LIBS"
9403         
9404 fi
9405
9406 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9407
9408         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9409                 ol_link_pthreads="-lpthreads -lmach -lexc"
9410                 ol_link_threads=posix
9411         fi
9412 fi
9413
9414                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9415 if test "$ol_link_threads" = no ; then
9416         # try -lpthreads -lexc
9417         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9418 echo "configure:9419: checking for pthread link with -lpthreads -lexc" >&5
9419 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9420   echo $ac_n "(cached) $ac_c" 1>&6
9421 else
9422   
9423                 # save the flags
9424                 ol_LIBS="$LIBS"
9425                 LIBS="-lpthreads -lexc $LIBS"
9426
9427                 if test "$cross_compiling" = yes; then
9428   cat > conftest.$ac_ext <<EOF
9429 #line 9430 "configure"
9430 #include "confdefs.h"
9431 /* pthread test headers */
9432 #include <pthread.h>
9433 #ifndef NULL
9434 #define NULL (void*)0
9435 #endif
9436
9437 static void *task(p)
9438         void *p;
9439 {
9440         return (void *) (p == NULL);
9441 }
9442
9443 int main() {
9444
9445         /* pthread test function */
9446         pthread_t t;
9447         int status;
9448
9449         /* make sure pthread_create() isn't just a stub */
9450 #if HAVE_PTHREADS_D4
9451         status = pthread_create(&t, pthread_attr_default, task, NULL);
9452 #else
9453         status = pthread_create(&t, NULL, task, NULL);
9454 #endif
9455
9456         if( status ) exit( status );
9457
9458         /* make sure pthread_detach() isn't just a stub */
9459 #if HAVE_PTHREADS_D4
9460         status = pthread_detach( &t );
9461 #else
9462         status = pthread_detach( t );
9463 #endif
9464
9465 #ifdef HAVE_LINUX_THREADS
9466         pthread_kill_other_threads_np();
9467 #endif
9468
9469         exit( status );
9470
9471 ; return 0; }
9472 EOF
9473 if { (eval echo configure:9474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9474   rm -rf conftest*
9475   ol_cv_pthread_lpthreads_lexc=yes
9476 else
9477   echo "configure: failed program was:" >&5
9478   cat conftest.$ac_ext >&5
9479   rm -rf conftest*
9480   ol_cv_pthread_lpthreads_lexc=no
9481 fi
9482 rm -f conftest*
9483 else
9484   cat > conftest.$ac_ext <<EOF
9485 #line 9486 "configure"
9486 #include "confdefs.h"
9487 /* pthread test headers */
9488 #include <pthread.h>
9489 #ifndef NULL
9490 #define NULL (void*)0
9491 #endif
9492
9493 static void *task(p)
9494         void *p;
9495 {
9496         return (void *) (p == NULL);
9497 }
9498
9499
9500 int main(argc, argv)
9501         int argc;
9502         char **argv;
9503 {
9504
9505         /* pthread test function */
9506         pthread_t t;
9507         int status;
9508
9509         /* make sure pthread_create() isn't just a stub */
9510 #if HAVE_PTHREADS_D4
9511         status = pthread_create(&t, pthread_attr_default, task, NULL);
9512 #else
9513         status = pthread_create(&t, NULL, task, NULL);
9514 #endif
9515
9516         if( status ) exit( status );
9517
9518         /* make sure pthread_detach() isn't just a stub */
9519 #if HAVE_PTHREADS_D4
9520         status = pthread_detach( &t );
9521 #else
9522         status = pthread_detach( t );
9523 #endif
9524
9525 #ifdef HAVE_LINUX_THREADS
9526         pthread_kill_other_threads_np();
9527 #endif
9528
9529         exit( status );
9530
9531 }
9532
9533 EOF
9534 if { (eval echo configure:9535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9535 then
9536   ol_cv_pthread_lpthreads_lexc=yes
9537 else
9538   echo "configure: failed program was:" >&5
9539   cat conftest.$ac_ext >&5
9540   rm -fr conftest*
9541   ol_cv_pthread_lpthreads_lexc=no
9542 fi
9543 rm -fr conftest*
9544 fi
9545
9546
9547                 # restore the LIBS
9548                 LIBS="$ol_LIBS"
9549         
9550 fi
9551
9552 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9553
9554         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9555                 ol_link_pthreads="-lpthreads -lexc"
9556                 ol_link_threads=posix
9557         fi
9558 fi
9559
9560
9561                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9562 if test "$ol_link_threads" = no ; then
9563         # try -lpthreads
9564         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9565 echo "configure:9566: checking for pthread link with -lpthreads" >&5
9566 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9567   echo $ac_n "(cached) $ac_c" 1>&6
9568 else
9569   
9570                 # save the flags
9571                 ol_LIBS="$LIBS"
9572                 LIBS="-lpthreads $LIBS"
9573
9574                 if test "$cross_compiling" = yes; then
9575   cat > conftest.$ac_ext <<EOF
9576 #line 9577 "configure"
9577 #include "confdefs.h"
9578 /* pthread test headers */
9579 #include <pthread.h>
9580 #ifndef NULL
9581 #define NULL (void*)0
9582 #endif
9583
9584 static void *task(p)
9585         void *p;
9586 {
9587         return (void *) (p == NULL);
9588 }
9589
9590 int main() {
9591
9592         /* pthread test function */
9593         pthread_t t;
9594         int status;
9595
9596         /* make sure pthread_create() isn't just a stub */
9597 #if HAVE_PTHREADS_D4
9598         status = pthread_create(&t, pthread_attr_default, task, NULL);
9599 #else
9600         status = pthread_create(&t, NULL, task, NULL);
9601 #endif
9602
9603         if( status ) exit( status );
9604
9605         /* make sure pthread_detach() isn't just a stub */
9606 #if HAVE_PTHREADS_D4
9607         status = pthread_detach( &t );
9608 #else
9609         status = pthread_detach( t );
9610 #endif
9611
9612 #ifdef HAVE_LINUX_THREADS
9613         pthread_kill_other_threads_np();
9614 #endif
9615
9616         exit( status );
9617
9618 ; return 0; }
9619 EOF
9620 if { (eval echo configure:9621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9621   rm -rf conftest*
9622   ol_cv_pthread_lib_lpthreads=yes
9623 else
9624   echo "configure: failed program was:" >&5
9625   cat conftest.$ac_ext >&5
9626   rm -rf conftest*
9627   ol_cv_pthread_lib_lpthreads=no
9628 fi
9629 rm -f conftest*
9630 else
9631   cat > conftest.$ac_ext <<EOF
9632 #line 9633 "configure"
9633 #include "confdefs.h"
9634 /* pthread test headers */
9635 #include <pthread.h>
9636 #ifndef NULL
9637 #define NULL (void*)0
9638 #endif
9639
9640 static void *task(p)
9641         void *p;
9642 {
9643         return (void *) (p == NULL);
9644 }
9645
9646
9647 int main(argc, argv)
9648         int argc;
9649         char **argv;
9650 {
9651
9652         /* pthread test function */
9653         pthread_t t;
9654         int status;
9655
9656         /* make sure pthread_create() isn't just a stub */
9657 #if HAVE_PTHREADS_D4
9658         status = pthread_create(&t, pthread_attr_default, task, NULL);
9659 #else
9660         status = pthread_create(&t, NULL, task, NULL);
9661 #endif
9662
9663         if( status ) exit( status );
9664
9665         /* make sure pthread_detach() isn't just a stub */
9666 #if HAVE_PTHREADS_D4
9667         status = pthread_detach( &t );
9668 #else
9669         status = pthread_detach( t );
9670 #endif
9671
9672 #ifdef HAVE_LINUX_THREADS
9673         pthread_kill_other_threads_np();
9674 #endif
9675
9676         exit( status );
9677
9678 }
9679
9680 EOF
9681 if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9682 then
9683   ol_cv_pthread_lib_lpthreads=yes
9684 else
9685   echo "configure: failed program was:" >&5
9686   cat conftest.$ac_ext >&5
9687   rm -fr conftest*
9688   ol_cv_pthread_lib_lpthreads=no
9689 fi
9690 rm -fr conftest*
9691 fi
9692
9693
9694                 # restore the LIBS
9695                 LIBS="$ol_LIBS"
9696         
9697 fi
9698
9699 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9700
9701         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9702                 ol_link_pthreads="-lpthreads"
9703                 ol_link_threads=posix
9704         fi
9705 fi
9706
9707
9708                 if test $ol_link_threads != no ; then
9709                         cat >> confdefs.h <<\EOF
9710 #define HAVE_PTHREADS 1
9711 EOF
9712
9713
9714                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9715
9716                                                 save_CPPFLAGS="$CPPFLAGS"
9717                         save_LIBS="$LIBS"
9718                         LIBS="$LTHREAD_LIBS $LIBS"
9719
9720                                                                                                 for ac_func in sched_yield pthread_yield
9721 do
9722 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9723 echo "configure:9724: checking for $ac_func" >&5
9724 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9725   echo $ac_n "(cached) $ac_c" 1>&6
9726 else
9727   cat > conftest.$ac_ext <<EOF
9728 #line 9729 "configure"
9729 #include "confdefs.h"
9730 /* System header to define __stub macros and hopefully few prototypes,
9731     which can conflict with char $ac_func(); below.  */
9732 #include <assert.h>
9733 /* Override any gcc2 internal prototype to avoid an error.  */
9734 /* We use char because int might match the return type of a gcc2
9735     builtin and then its argument prototype would still apply.  */
9736 char $ac_func();
9737 char (*f)();
9738
9739 int main() {
9740
9741 /* The GNU C library defines this for functions which it implements
9742     to always fail with ENOSYS.  Some functions are actually named
9743     something starting with __ and the normal name is an alias.  */
9744 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9745 choke me
9746 #else
9747 f = $ac_func;
9748 #endif
9749
9750 ; return 0; }
9751 EOF
9752 if { (eval echo configure:9753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9753   rm -rf conftest*
9754   eval "ac_cv_func_$ac_func=yes"
9755 else
9756   echo "configure: failed program was:" >&5
9757   cat conftest.$ac_ext >&5
9758   rm -rf conftest*
9759   eval "ac_cv_func_$ac_func=no"
9760 fi
9761 rm -f conftest*
9762 fi
9763
9764 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9765   echo "$ac_t""yes" 1>&6
9766     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9767   cat >> confdefs.h <<EOF
9768 #define $ac_tr_func 1
9769 EOF
9770  
9771 else
9772   echo "$ac_t""no" 1>&6
9773 fi
9774 done
9775
9776
9777                         if test $ac_cv_func_sched_yield = no -a \
9778                                 $ac_cv_func_pthread_yield = no ; then
9779                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9780 echo "configure:9781: checking for sched_yield in -lrt" >&5
9781 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9782 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9783   echo $ac_n "(cached) $ac_c" 1>&6
9784 else
9785   ac_save_LIBS="$LIBS"
9786 LIBS="-lrt  $LIBS"
9787 cat > conftest.$ac_ext <<EOF
9788 #line 9789 "configure"
9789 #include "confdefs.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 sched_yield();
9794
9795 int main() {
9796 sched_yield()
9797 ; return 0; }
9798 EOF
9799 if { (eval echo configure:9800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9800   rm -rf conftest*
9801   eval "ac_cv_lib_$ac_lib_var=yes"
9802 else
9803   echo "configure: failed program was:" >&5
9804   cat conftest.$ac_ext >&5
9805   rm -rf conftest*
9806   eval "ac_cv_lib_$ac_lib_var=no"
9807 fi
9808 rm -f conftest*
9809 LIBS="$ac_save_LIBS"
9810
9811 fi
9812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9813   echo "$ac_t""yes" 1>&6
9814   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9815                                         cat >> confdefs.h <<\EOF
9816 #define HAVE_SCHED_YIELD 1
9817 EOF
9818
9819                                         ac_cv_func_sched_yield=yes
9820 else
9821   echo "$ac_t""no" 1>&6
9822 ac_cv_func_sched_yield=no
9823 fi
9824
9825                         fi
9826                         if test $ac_cv_func_sched_yield = no -a \
9827                                 $ac_cv_func_pthread_yield = no ; then
9828                                                                                                 for ac_func in thr_yield
9829 do
9830 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9831 echo "configure:9832: checking for $ac_func" >&5
9832 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9833   echo $ac_n "(cached) $ac_c" 1>&6
9834 else
9835   cat > conftest.$ac_ext <<EOF
9836 #line 9837 "configure"
9837 #include "confdefs.h"
9838 /* System header to define __stub macros and hopefully few prototypes,
9839     which can conflict with char $ac_func(); below.  */
9840 #include <assert.h>
9841 /* Override any gcc2 internal prototype to avoid an error.  */
9842 /* We use char because int might match the return type of a gcc2
9843     builtin and then its argument prototype would still apply.  */
9844 char $ac_func();
9845 char (*f)();
9846
9847 int main() {
9848
9849 /* The GNU C library defines this for functions which it implements
9850     to always fail with ENOSYS.  Some functions are actually named
9851     something starting with __ and the normal name is an alias.  */
9852 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9853 choke me
9854 #else
9855 f = $ac_func;
9856 #endif
9857
9858 ; return 0; }
9859 EOF
9860 if { (eval echo configure:9861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9861   rm -rf conftest*
9862   eval "ac_cv_func_$ac_func=yes"
9863 else
9864   echo "configure: failed program was:" >&5
9865   cat conftest.$ac_ext >&5
9866   rm -rf conftest*
9867   eval "ac_cv_func_$ac_func=no"
9868 fi
9869 rm -f conftest*
9870 fi
9871
9872 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9873   echo "$ac_t""yes" 1>&6
9874     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9875   cat >> confdefs.h <<EOF
9876 #define $ac_tr_func 1
9877 EOF
9878  
9879 else
9880   echo "$ac_t""no" 1>&6
9881 fi
9882 done
9883
9884                         fi
9885                         if test $ac_cv_func_sched_yield = no -a \
9886                                 $ac_cv_func_pthread_yield = no -a \
9887                                 "$ac_cv_func_thr_yield" = no ; then
9888                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9889                         fi
9890
9891                                                 for ac_func in pthread_kill
9892 do
9893 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9894 echo "configure:9895: checking for $ac_func" >&5
9895 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9896   echo $ac_n "(cached) $ac_c" 1>&6
9897 else
9898   cat > conftest.$ac_ext <<EOF
9899 #line 9900 "configure"
9900 #include "confdefs.h"
9901 /* System header to define __stub macros and hopefully few prototypes,
9902     which can conflict with char $ac_func(); below.  */
9903 #include <assert.h>
9904 /* Override any gcc2 internal prototype to avoid an error.  */
9905 /* We use char because int might match the return type of a gcc2
9906     builtin and then its argument prototype would still apply.  */
9907 char $ac_func();
9908 char (*f)();
9909
9910 int main() {
9911
9912 /* The GNU C library defines this for functions which it implements
9913     to always fail with ENOSYS.  Some functions are actually named
9914     something starting with __ and the normal name is an alias.  */
9915 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9916 choke me
9917 #else
9918 f = $ac_func;
9919 #endif
9920
9921 ; return 0; }
9922 EOF
9923 if { (eval echo configure:9924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9924   rm -rf conftest*
9925   eval "ac_cv_func_$ac_func=yes"
9926 else
9927   echo "configure: failed program was:" >&5
9928   cat conftest.$ac_ext >&5
9929   rm -rf conftest*
9930   eval "ac_cv_func_$ac_func=no"
9931 fi
9932 rm -f conftest*
9933 fi
9934
9935 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9936   echo "$ac_t""yes" 1>&6
9937     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9938   cat >> confdefs.h <<EOF
9939 #define $ac_tr_func 1
9940 EOF
9941  
9942 else
9943   echo "$ac_t""no" 1>&6
9944 fi
9945 done
9946
9947
9948                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9949 echo "configure:9950: checking for pthread_detach with <pthread.h>" >&5
9950 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9951   echo $ac_n "(cached) $ac_c" 1>&6
9952 else
9953   
9954                                                                 cat > conftest.$ac_ext <<EOF
9955 #line 9956 "configure"
9956 #include "confdefs.h"
9957
9958 #include <pthread.h>
9959 #ifndef NULL
9960 #define NULL (void*)0
9961 #endif
9962
9963 int main() {
9964 pthread_detach(NULL);
9965 ; return 0; }
9966 EOF
9967 if { (eval echo configure:9968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9968   rm -rf conftest*
9969   ol_cv_func_pthread_detach=yes
9970 else
9971   echo "configure: failed program was:" >&5
9972   cat conftest.$ac_ext >&5
9973   rm -rf conftest*
9974   ol_cv_func_pthread_detach=no
9975 fi
9976 rm -f conftest*
9977                         
9978 fi
9979
9980 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9981
9982                         if test $ol_cv_func_pthread_detach = no ; then
9983                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9984                         fi
9985
9986                         cat >> confdefs.h <<\EOF
9987 #define HAVE_PTHREAD_DETACH 1
9988 EOF
9989
9990
9991                                                 for ac_func in \
9992                                 pthread_setconcurrency \
9993                                 pthread_getconcurrency \
9994                                 thr_setconcurrency \
9995                                 thr_getconcurrency \
9996                         
9997 do
9998 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9999 echo "configure:10000: checking for $ac_func" >&5
10000 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10001   echo $ac_n "(cached) $ac_c" 1>&6
10002 else
10003   cat > conftest.$ac_ext <<EOF
10004 #line 10005 "configure"
10005 #include "confdefs.h"
10006 /* System header to define __stub macros and hopefully few prototypes,
10007     which can conflict with char $ac_func(); below.  */
10008 #include <assert.h>
10009 /* Override any gcc2 internal prototype to avoid an error.  */
10010 /* We use char because int might match the return type of a gcc2
10011     builtin and then its argument prototype would still apply.  */
10012 char $ac_func();
10013 char (*f)();
10014
10015 int main() {
10016
10017 /* The GNU C library defines this for functions which it implements
10018     to always fail with ENOSYS.  Some functions are actually named
10019     something starting with __ and the normal name is an alias.  */
10020 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10021 choke me
10022 #else
10023 f = $ac_func;
10024 #endif
10025
10026 ; return 0; }
10027 EOF
10028 if { (eval echo configure:10029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10029   rm -rf conftest*
10030   eval "ac_cv_func_$ac_func=yes"
10031 else
10032   echo "configure: failed program was:" >&5
10033   cat conftest.$ac_ext >&5
10034   rm -rf conftest*
10035   eval "ac_cv_func_$ac_func=no"
10036 fi
10037 rm -f conftest*
10038 fi
10039
10040 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10041   echo "$ac_t""yes" 1>&6
10042     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10043   cat >> confdefs.h <<EOF
10044 #define $ac_tr_func 1
10045 EOF
10046  
10047 else
10048   echo "$ac_t""no" 1>&6
10049 fi
10050 done
10051
10052
10053                         
10054         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10055 echo "configure:10056: checking for pthread_kill_other_threads_np" >&5
10056 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10057   echo $ac_n "(cached) $ac_c" 1>&6
10058 else
10059   cat > conftest.$ac_ext <<EOF
10060 #line 10061 "configure"
10061 #include "confdefs.h"
10062 /* System header to define __stub macros and hopefully few prototypes,
10063     which can conflict with char pthread_kill_other_threads_np(); below.  */
10064 #include <assert.h>
10065 /* Override any gcc2 internal prototype to avoid an error.  */
10066 /* We use char because int might match the return type of a gcc2
10067     builtin and then its argument prototype would still apply.  */
10068 char pthread_kill_other_threads_np();
10069 char (*f)();
10070
10071 int main() {
10072
10073 /* The GNU C library defines this for functions which it implements
10074     to always fail with ENOSYS.  Some functions are actually named
10075     something starting with __ and the normal name is an alias.  */
10076 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10077 choke me
10078 #else
10079 f = pthread_kill_other_threads_np;
10080 #endif
10081
10082 ; return 0; }
10083 EOF
10084 if { (eval echo configure:10085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10085   rm -rf conftest*
10086   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10087 else
10088   echo "configure: failed program was:" >&5
10089   cat conftest.$ac_ext >&5
10090   rm -rf conftest*
10091   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10092 fi
10093 rm -f conftest*
10094 fi
10095
10096 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10097   echo "$ac_t""yes" 1>&6
10098   :
10099 else
10100   echo "$ac_t""no" 1>&6
10101 fi
10102
10103         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10104 echo "configure:10105: checking for LinuxThreads implementation" >&5
10105 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10106   echo $ac_n "(cached) $ac_c" 1>&6
10107 else
10108   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10109 fi
10110
10111 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10112
10113                         
10114         
10115         
10116         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10117 echo "configure:10118: checking for LinuxThreads consistency" >&5
10118 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10119   echo $ac_n "(cached) $ac_c" 1>&6
10120 else
10121   
10122                 if test $ol_cv_header_linux_threads = yes -a \
10123                         $ol_cv_sys_linux_threads = yes; then
10124                         ol_cv_linux_threads=yes
10125                 elif test $ol_cv_header_linux_threads = no -a \
10126                         $ol_cv_sys_linux_threads = no; then
10127                         ol_cv_linux_threads=no
10128                 else
10129                         ol_cv_linux_threads=error
10130                 fi
10131         
10132 fi
10133
10134 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10135
10136
10137                         if test $ol_cv_linux_threads = error; then
10138                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10139                         fi
10140
10141                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10142 echo "configure:10143: checking if pthread_create() works" >&5
10143 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10144   echo $ac_n "(cached) $ac_c" 1>&6
10145 else
10146   
10147                         if test "$cross_compiling" = yes; then
10148                                 ol_cv_pthread_create_works=yes
10149 else
10150   cat > conftest.$ac_ext <<EOF
10151 #line 10152 "configure"
10152 #include "confdefs.h"
10153 /* pthread test headers */
10154 #include <pthread.h>
10155 #ifndef NULL
10156 #define NULL (void*)0
10157 #endif
10158
10159 static void *task(p)
10160         void *p;
10161 {
10162         return (void *) (p == NULL);
10163 }
10164
10165
10166 int main(argc, argv)
10167         int argc;
10168         char **argv;
10169 {
10170
10171         /* pthread test function */
10172         pthread_t t;
10173         int status;
10174
10175         /* make sure pthread_create() isn't just a stub */
10176 #if HAVE_PTHREADS_D4
10177         status = pthread_create(&t, pthread_attr_default, task, NULL);
10178 #else
10179         status = pthread_create(&t, NULL, task, NULL);
10180 #endif
10181
10182         if( status ) exit( status );
10183
10184         /* make sure pthread_detach() isn't just a stub */
10185 #if HAVE_PTHREADS_D4
10186         status = pthread_detach( &t );
10187 #else
10188         status = pthread_detach( t );
10189 #endif
10190
10191 #ifdef HAVE_LINUX_THREADS
10192         pthread_kill_other_threads_np();
10193 #endif
10194
10195         exit( status );
10196
10197 }
10198
10199 EOF
10200 if { (eval echo configure:10201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10201 then
10202   ol_cv_pthread_create_works=yes
10203 else
10204   echo "configure: failed program was:" >&5
10205   cat conftest.$ac_ext >&5
10206   rm -fr conftest*
10207   ol_cv_pthread_create_works=no
10208 fi
10209 rm -fr conftest*
10210 fi
10211
10212 fi
10213
10214 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10215
10216                         if test $ol_cv_pthread_create_works = no ; then
10217                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10218                         fi
10219
10220                                                 if test $ol_with_yielding_select = auto ; then
10221                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10222 echo "configure:10223: checking if select yields when using pthreads" >&5
10223 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10224   echo $ac_n "(cached) $ac_c" 1>&6
10225 else
10226   
10227                                 if test "$cross_compiling" = yes; then
10228   ol_cv_pthread_select_yields=cross
10229 else
10230   cat > conftest.$ac_ext <<EOF
10231 #line 10232 "configure"
10232 #include "confdefs.h"
10233
10234 #include <sys/types.h>
10235 #include <sys/time.h>
10236 #include <unistd.h>
10237 #include <pthread.h>
10238 #ifndef NULL
10239 #define NULL (void*) 0
10240 #endif
10241
10242 static int fildes[2];
10243
10244 static void *task(p)
10245         void *p;
10246 {
10247         int i;
10248         struct timeval tv;
10249
10250         fd_set rfds;
10251
10252         tv.tv_sec=10;
10253         tv.tv_usec=0;
10254
10255         FD_ZERO(&rfds);
10256         FD_SET(fildes[0], &rfds);
10257
10258         /* we're not interested in any fds */
10259         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10260
10261         if(i < 0) {
10262                 perror("select");
10263                 exit(10);
10264         }
10265
10266         exit(0); /* if we exit here, the select blocked the whole process */
10267 }
10268
10269 int main(argc, argv)
10270         int argc;
10271         char **argv;
10272 {
10273         pthread_t t;
10274
10275         /* create a pipe to select */
10276         if(pipe(&fildes[0])) {
10277                 perror("select");
10278                 exit(1);
10279         }
10280
10281 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10282         (void) pthread_setconcurrency(2);
10283 #else
10284 #ifdef HAVE_THR_SETCONCURRENCY
10285         /* Set Solaris LWP concurrency to 2 */
10286         thr_setconcurrency(2);
10287 #endif
10288 #endif
10289
10290 #if HAVE_PTHREADS_D4
10291         pthread_create(&t, pthread_attr_default, task, NULL);
10292 #else
10293         pthread_create(&t, NULL, task, NULL);
10294 #endif
10295
10296 #if HAVE_SCHED_YIELD
10297         sched_yield();  /* make sure task runs first */
10298 #else
10299 #ifdef HAVE_PTHREAD_YIELD
10300         pthread_yield();        /* make sure task runs first */
10301 #endif
10302 #endif
10303
10304         exit(2);
10305 }
10306 EOF
10307 if { (eval echo configure:10308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10308 then
10309   ol_cv_pthread_select_yields=no
10310 else
10311   echo "configure: failed program was:" >&5
10312   cat conftest.$ac_ext >&5
10313   rm -fr conftest*
10314   ol_cv_pthread_select_yields=yes
10315 fi
10316 rm -fr conftest*
10317 fi
10318
10319 fi
10320
10321 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10322
10323                                 if test $ol_cv_pthread_select_yields = cross ; then
10324                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10325                                 fi
10326
10327                                 if test $ol_cv_pthread_select_yields = yes ; then
10328                                         ol_with_yielding_select=yes
10329                                 fi
10330                         fi
10331
10332                                                 CPPFLAGS="$save_CPPFLAGS"
10333                         LIBS="$save_LIBS"
10334                 else
10335                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10336                 fi
10337         fi
10338
10339         if test $ol_with_threads = posix ; then
10340                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10341         fi
10342 fi
10343
10344 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10345         -o $ol_with_threads = mach ; then
10346
10347                 for ac_hdr in mach/cthreads.h
10348 do
10349 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10350 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10351 echo "configure:10352: checking for $ac_hdr" >&5
10352 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10353   echo $ac_n "(cached) $ac_c" 1>&6
10354 else
10355   cat > conftest.$ac_ext <<EOF
10356 #line 10357 "configure"
10357 #include "confdefs.h"
10358 #include <$ac_hdr>
10359 EOF
10360 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10361 { (eval echo configure:10362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10362 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10363 if test -z "$ac_err"; then
10364   rm -rf conftest*
10365   eval "ac_cv_header_$ac_safe=yes"
10366 else
10367   echo "$ac_err" >&5
10368   echo "configure: failed program was:" >&5
10369   cat conftest.$ac_ext >&5
10370   rm -rf conftest*
10371   eval "ac_cv_header_$ac_safe=no"
10372 fi
10373 rm -f conftest*
10374 fi
10375 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10376   echo "$ac_t""yes" 1>&6
10377     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10378   cat >> confdefs.h <<EOF
10379 #define $ac_tr_hdr 1
10380 EOF
10381  
10382 else
10383   echo "$ac_t""no" 1>&6
10384 fi
10385 done
10386
10387         if test $ac_cv_header_mach_cthreads_h = yes ; then
10388                 ol_with_threads=found
10389
10390                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10391 echo "configure:10392: checking for cthread_fork" >&5
10392 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10393   echo $ac_n "(cached) $ac_c" 1>&6
10394 else
10395   cat > conftest.$ac_ext <<EOF
10396 #line 10397 "configure"
10397 #include "confdefs.h"
10398 /* System header to define __stub macros and hopefully few prototypes,
10399     which can conflict with char cthread_fork(); below.  */
10400 #include <assert.h>
10401 /* Override any gcc2 internal prototype to avoid an error.  */
10402 /* We use char because int might match the return type of a gcc2
10403     builtin and then its argument prototype would still apply.  */
10404 char cthread_fork();
10405 char (*f)();
10406
10407 int main() {
10408
10409 /* The GNU C library defines this for functions which it implements
10410     to always fail with ENOSYS.  Some functions are actually named
10411     something starting with __ and the normal name is an alias.  */
10412 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10413 choke me
10414 #else
10415 f = cthread_fork;
10416 #endif
10417
10418 ; return 0; }
10419 EOF
10420 if { (eval echo configure:10421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10421   rm -rf conftest*
10422   eval "ac_cv_func_cthread_fork=yes"
10423 else
10424   echo "configure: failed program was:" >&5
10425   cat conftest.$ac_ext >&5
10426   rm -rf conftest*
10427   eval "ac_cv_func_cthread_fork=no"
10428 fi
10429 rm -f conftest*
10430 fi
10431
10432 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10433   echo "$ac_t""yes" 1>&6
10434   ol_link_threads=yes
10435 else
10436   echo "$ac_t""no" 1>&6
10437 fi
10438
10439
10440                 if test $ol_link_threads = no ; then
10441                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10442 echo "configure:10443: checking for cthread_fork with -all_load" >&5
10443 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10444   echo $ac_n "(cached) $ac_c" 1>&6
10445 else
10446   
10447                                                                 save_LIBS="$LIBS"
10448                                 LIBS="-all_load $LIBS"
10449                                 cat > conftest.$ac_ext <<EOF
10450 #line 10451 "configure"
10451 #include "confdefs.h"
10452 #include <mach/cthreads.h>
10453 int main() {
10454
10455                                         cthread_fork((void *)0, (void *)0);
10456                                         
10457 ; return 0; }
10458 EOF
10459 if { (eval echo configure:10460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10460   rm -rf conftest*
10461   ol_cv_cthread_all_load=yes
10462 else
10463   echo "configure: failed program was:" >&5
10464   cat conftest.$ac_ext >&5
10465   rm -rf conftest*
10466   ol_cv_cthread_all_load=no
10467 fi
10468 rm -f conftest*
10469                                                                 LIBS="$save_LIBS"
10470                         
10471 fi
10472
10473 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10474
10475                         if test $ol_cv_cthread_all_load = yes ; then
10476                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10477                                 ol_link_threads=mach
10478                         fi
10479                 fi
10480
10481                 if test $ol_link_threads != no ; then
10482                         : check for cthread specific functionality here
10483                         cat >> confdefs.h <<\EOF
10484 #define HAVE_MACH_CTHREADS 1
10485 EOF
10486
10487                 else
10488                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10489                 fi
10490         fi
10491
10492         if test $ol_with_threads = mach ; then
10493                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10494         fi
10495 fi
10496
10497 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10498         -o $ol_with_threads = pth ; then
10499
10500         for ac_hdr in pth.h
10501 do
10502 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10503 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10504 echo "configure:10505: checking for $ac_hdr" >&5
10505 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10506   echo $ac_n "(cached) $ac_c" 1>&6
10507 else
10508   cat > conftest.$ac_ext <<EOF
10509 #line 10510 "configure"
10510 #include "confdefs.h"
10511 #include <$ac_hdr>
10512 EOF
10513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10514 { (eval echo configure:10515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10516 if test -z "$ac_err"; then
10517   rm -rf conftest*
10518   eval "ac_cv_header_$ac_safe=yes"
10519 else
10520   echo "$ac_err" >&5
10521   echo "configure: failed program was:" >&5
10522   cat conftest.$ac_ext >&5
10523   rm -rf conftest*
10524   eval "ac_cv_header_$ac_safe=no"
10525 fi
10526 rm -f conftest*
10527 fi
10528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10529   echo "$ac_t""yes" 1>&6
10530     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10531   cat >> confdefs.h <<EOF
10532 #define $ac_tr_hdr 1
10533 EOF
10534  
10535 else
10536   echo "$ac_t""no" 1>&6
10537 fi
10538 done
10539
10540
10541         if test $ac_cv_header_pth_h = yes ; then
10542                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10543 echo "configure:10544: checking for pth_version in -lpth" >&5
10544 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10545 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10546   echo $ac_n "(cached) $ac_c" 1>&6
10547 else
10548   ac_save_LIBS="$LIBS"
10549 LIBS="-lpth  $LIBS"
10550 cat > conftest.$ac_ext <<EOF
10551 #line 10552 "configure"
10552 #include "confdefs.h"
10553 /* Override any gcc2 internal prototype to avoid an error.  */
10554 /* We use char because int might match the return type of a gcc2
10555     builtin and then its argument prototype would still apply.  */
10556 char pth_version();
10557
10558 int main() {
10559 pth_version()
10560 ; return 0; }
10561 EOF
10562 if { (eval echo configure:10563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10563   rm -rf conftest*
10564   eval "ac_cv_lib_$ac_lib_var=yes"
10565 else
10566   echo "configure: failed program was:" >&5
10567   cat conftest.$ac_ext >&5
10568   rm -rf conftest*
10569   eval "ac_cv_lib_$ac_lib_var=no"
10570 fi
10571 rm -f conftest*
10572 LIBS="$ac_save_LIBS"
10573
10574 fi
10575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10576   echo "$ac_t""yes" 1>&6
10577   have_pth=yes
10578 else
10579   echo "$ac_t""no" 1>&6
10580 have_pth=no
10581 fi
10582
10583
10584                 if test $have_pth = yes ; then
10585                         cat >> confdefs.h <<\EOF
10586 #define HAVE_GNU_PTH 1
10587 EOF
10588
10589                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10590                         ol_link_threads=pth
10591
10592                         if test $ol_with_yielding_select = auto ; then
10593                                 ol_with_yielding_select=yes
10594                         fi
10595                 fi
10596         fi
10597 fi
10598
10599 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10600         -o $ol_with_threads = lwp ; then
10601
10602                 for ac_hdr in thread.h synch.h
10603 do
10604 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10605 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10606 echo "configure:10607: checking for $ac_hdr" >&5
10607 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10608   echo $ac_n "(cached) $ac_c" 1>&6
10609 else
10610   cat > conftest.$ac_ext <<EOF
10611 #line 10612 "configure"
10612 #include "confdefs.h"
10613 #include <$ac_hdr>
10614 EOF
10615 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10616 { (eval echo configure:10617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10617 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10618 if test -z "$ac_err"; then
10619   rm -rf conftest*
10620   eval "ac_cv_header_$ac_safe=yes"
10621 else
10622   echo "$ac_err" >&5
10623   echo "configure: failed program was:" >&5
10624   cat conftest.$ac_ext >&5
10625   rm -rf conftest*
10626   eval "ac_cv_header_$ac_safe=no"
10627 fi
10628 rm -f conftest*
10629 fi
10630 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10631   echo "$ac_t""yes" 1>&6
10632     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10633   cat >> confdefs.h <<EOF
10634 #define $ac_tr_hdr 1
10635 EOF
10636  
10637 else
10638   echo "$ac_t""no" 1>&6
10639 fi
10640 done
10641
10642         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10643                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10644 echo "configure:10645: checking for thr_create in -lthread" >&5
10645 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10646 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10647   echo $ac_n "(cached) $ac_c" 1>&6
10648 else
10649   ac_save_LIBS="$LIBS"
10650 LIBS="-lthread  $LIBS"
10651 cat > conftest.$ac_ext <<EOF
10652 #line 10653 "configure"
10653 #include "confdefs.h"
10654 /* Override any gcc2 internal prototype to avoid an error.  */
10655 /* We use char because int might match the return type of a gcc2
10656     builtin and then its argument prototype would still apply.  */
10657 char thr_create();
10658
10659 int main() {
10660 thr_create()
10661 ; return 0; }
10662 EOF
10663 if { (eval echo configure:10664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10664   rm -rf conftest*
10665   eval "ac_cv_lib_$ac_lib_var=yes"
10666 else
10667   echo "configure: failed program was:" >&5
10668   cat conftest.$ac_ext >&5
10669   rm -rf conftest*
10670   eval "ac_cv_lib_$ac_lib_var=no"
10671 fi
10672 rm -f conftest*
10673 LIBS="$ac_save_LIBS"
10674
10675 fi
10676 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10677   echo "$ac_t""yes" 1>&6
10678   have_thr=yes
10679 else
10680   echo "$ac_t""no" 1>&6
10681 have_thr=no
10682 fi
10683
10684
10685                 if test $have_thr = yes ; then
10686                         cat >> confdefs.h <<\EOF
10687 #define HAVE_THR 1
10688 EOF
10689
10690                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10691                         ol_link_threads=thr
10692
10693                         if test $ol_with_yielding_select = auto ; then
10694                                 ol_with_yielding_select=yes
10695                         fi
10696
10697                                                 for ac_func in \
10698                                 thr_setconcurrency \
10699                                 thr_getconcurrency \
10700                         
10701 do
10702 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10703 echo "configure:10704: checking for $ac_func" >&5
10704 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10705   echo $ac_n "(cached) $ac_c" 1>&6
10706 else
10707   cat > conftest.$ac_ext <<EOF
10708 #line 10709 "configure"
10709 #include "confdefs.h"
10710 /* System header to define __stub macros and hopefully few prototypes,
10711     which can conflict with char $ac_func(); below.  */
10712 #include <assert.h>
10713 /* Override any gcc2 internal prototype to avoid an error.  */
10714 /* We use char because int might match the return type of a gcc2
10715     builtin and then its argument prototype would still apply.  */
10716 char $ac_func();
10717 char (*f)();
10718
10719 int main() {
10720
10721 /* The GNU C library defines this for functions which it implements
10722     to always fail with ENOSYS.  Some functions are actually named
10723     something starting with __ and the normal name is an alias.  */
10724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10725 choke me
10726 #else
10727 f = $ac_func;
10728 #endif
10729
10730 ; return 0; }
10731 EOF
10732 if { (eval echo configure:10733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10733   rm -rf conftest*
10734   eval "ac_cv_func_$ac_func=yes"
10735 else
10736   echo "configure: failed program was:" >&5
10737   cat conftest.$ac_ext >&5
10738   rm -rf conftest*
10739   eval "ac_cv_func_$ac_func=no"
10740 fi
10741 rm -f conftest*
10742 fi
10743
10744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10745   echo "$ac_t""yes" 1>&6
10746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10747   cat >> confdefs.h <<EOF
10748 #define $ac_tr_func 1
10749 EOF
10750  
10751 else
10752   echo "$ac_t""no" 1>&6
10753 fi
10754 done
10755
10756                 fi
10757         fi
10758
10759                 for ac_hdr in lwp/lwp.h
10760 do
10761 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10762 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10763 echo "configure:10764: checking for $ac_hdr" >&5
10764 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10765   echo $ac_n "(cached) $ac_c" 1>&6
10766 else
10767   cat > conftest.$ac_ext <<EOF
10768 #line 10769 "configure"
10769 #include "confdefs.h"
10770 #include <$ac_hdr>
10771 EOF
10772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10773 { (eval echo configure:10774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10775 if test -z "$ac_err"; then
10776   rm -rf conftest*
10777   eval "ac_cv_header_$ac_safe=yes"
10778 else
10779   echo "$ac_err" >&5
10780   echo "configure: failed program was:" >&5
10781   cat conftest.$ac_ext >&5
10782   rm -rf conftest*
10783   eval "ac_cv_header_$ac_safe=no"
10784 fi
10785 rm -f conftest*
10786 fi
10787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10788   echo "$ac_t""yes" 1>&6
10789     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10790   cat >> confdefs.h <<EOF
10791 #define $ac_tr_hdr 1
10792 EOF
10793  
10794 else
10795   echo "$ac_t""no" 1>&6
10796 fi
10797 done
10798
10799         if test $ac_cv_header_lwp_lwp_h = yes ; then
10800                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10801 echo "configure:10802: checking for lwp_create in -llwp" >&5
10802 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10803 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10804   echo $ac_n "(cached) $ac_c" 1>&6
10805 else
10806   ac_save_LIBS="$LIBS"
10807 LIBS="-llwp  $LIBS"
10808 cat > conftest.$ac_ext <<EOF
10809 #line 10810 "configure"
10810 #include "confdefs.h"
10811 /* Override any gcc2 internal prototype to avoid an error.  */
10812 /* We use char because int might match the return type of a gcc2
10813     builtin and then its argument prototype would still apply.  */
10814 char lwp_create();
10815
10816 int main() {
10817 lwp_create()
10818 ; return 0; }
10819 EOF
10820 if { (eval echo configure:10821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10821   rm -rf conftest*
10822   eval "ac_cv_lib_$ac_lib_var=yes"
10823 else
10824   echo "configure: failed program was:" >&5
10825   cat conftest.$ac_ext >&5
10826   rm -rf conftest*
10827   eval "ac_cv_lib_$ac_lib_var=no"
10828 fi
10829 rm -f conftest*
10830 LIBS="$ac_save_LIBS"
10831
10832 fi
10833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10834   echo "$ac_t""yes" 1>&6
10835   have_lwp=yes
10836 else
10837   echo "$ac_t""no" 1>&6
10838 have_lwp=no
10839 fi
10840
10841
10842                 if test $have_lwp = yes ; then
10843                         cat >> confdefs.h <<\EOF
10844 #define HAVE_LWP 1
10845 EOF
10846
10847                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10848                         ol_link_threads=lwp
10849
10850                         if test $ol_with_yielding_select = auto ; then
10851                                 ol_with_yielding_select=no
10852                         fi
10853                 fi
10854         fi
10855 fi
10856
10857 if test $ol_with_yielding_select = yes ; then
10858         cat >> confdefs.h <<\EOF
10859 #define HAVE_YIELDING_SELECT 1
10860 EOF
10861
10862 fi
10863
10864 if test $ol_with_threads = manual ; then
10865                 ol_link_threads=yes
10866
10867         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10868
10869         for ac_hdr in pthread.h sched.h
10870 do
10871 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10872 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10873 echo "configure:10874: checking for $ac_hdr" >&5
10874 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10875   echo $ac_n "(cached) $ac_c" 1>&6
10876 else
10877   cat > conftest.$ac_ext <<EOF
10878 #line 10879 "configure"
10879 #include "confdefs.h"
10880 #include <$ac_hdr>
10881 EOF
10882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10883 { (eval echo configure:10884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10885 if test -z "$ac_err"; then
10886   rm -rf conftest*
10887   eval "ac_cv_header_$ac_safe=yes"
10888 else
10889   echo "$ac_err" >&5
10890   echo "configure: failed program was:" >&5
10891   cat conftest.$ac_ext >&5
10892   rm -rf conftest*
10893   eval "ac_cv_header_$ac_safe=no"
10894 fi
10895 rm -f conftest*
10896 fi
10897 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10898   echo "$ac_t""yes" 1>&6
10899     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10900   cat >> confdefs.h <<EOF
10901 #define $ac_tr_hdr 1
10902 EOF
10903  
10904 else
10905   echo "$ac_t""no" 1>&6
10906 fi
10907 done
10908
10909         for ac_func in sched_yield pthread_yield
10910 do
10911 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10912 echo "configure:10913: checking for $ac_func" >&5
10913 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10914   echo $ac_n "(cached) $ac_c" 1>&6
10915 else
10916   cat > conftest.$ac_ext <<EOF
10917 #line 10918 "configure"
10918 #include "confdefs.h"
10919 /* System header to define __stub macros and hopefully few prototypes,
10920     which can conflict with char $ac_func(); below.  */
10921 #include <assert.h>
10922 /* Override any gcc2 internal prototype to avoid an error.  */
10923 /* We use char because int might match the return type of a gcc2
10924     builtin and then its argument prototype would still apply.  */
10925 char $ac_func();
10926 char (*f)();
10927
10928 int main() {
10929
10930 /* The GNU C library defines this for functions which it implements
10931     to always fail with ENOSYS.  Some functions are actually named
10932     something starting with __ and the normal name is an alias.  */
10933 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10934 choke me
10935 #else
10936 f = $ac_func;
10937 #endif
10938
10939 ; return 0; }
10940 EOF
10941 if { (eval echo configure:10942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10942   rm -rf conftest*
10943   eval "ac_cv_func_$ac_func=yes"
10944 else
10945   echo "configure: failed program was:" >&5
10946   cat conftest.$ac_ext >&5
10947   rm -rf conftest*
10948   eval "ac_cv_func_$ac_func=no"
10949 fi
10950 rm -f conftest*
10951 fi
10952
10953 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10954   echo "$ac_t""yes" 1>&6
10955     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10956   cat >> confdefs.h <<EOF
10957 #define $ac_tr_func 1
10958 EOF
10959  
10960 else
10961   echo "$ac_t""no" 1>&6
10962 fi
10963 done
10964
10965         
10966         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10967 echo "configure:10968: checking for LinuxThreads pthread.h" >&5
10968 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10969   echo $ac_n "(cached) $ac_c" 1>&6
10970 else
10971   cat > conftest.$ac_ext <<EOF
10972 #line 10973 "configure"
10973 #include "confdefs.h"
10974 #include <pthread.h>
10975 EOF
10976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10977   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10978   rm -rf conftest*
10979   ol_cv_header_linux_threads=yes
10980 else
10981   rm -rf conftest*
10982   ol_cv_header_linux_threads=no
10983 fi
10984 rm -f conftest*
10985
10986                 
10987 fi
10988
10989 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10990         if test $ol_cv_header_linux_threads = yes; then
10991                 cat >> confdefs.h <<\EOF
10992 #define HAVE_LINUX_THREADS 1
10993 EOF
10994
10995         fi
10996
10997
10998         for ac_hdr in mach/cthreads.h
10999 do
11000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11002 echo "configure:11003: checking for $ac_hdr" >&5
11003 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11004   echo $ac_n "(cached) $ac_c" 1>&6
11005 else
11006   cat > conftest.$ac_ext <<EOF
11007 #line 11008 "configure"
11008 #include "confdefs.h"
11009 #include <$ac_hdr>
11010 EOF
11011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11012 { (eval echo configure:11013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11014 if test -z "$ac_err"; then
11015   rm -rf conftest*
11016   eval "ac_cv_header_$ac_safe=yes"
11017 else
11018   echo "$ac_err" >&5
11019   echo "configure: failed program was:" >&5
11020   cat conftest.$ac_ext >&5
11021   rm -rf conftest*
11022   eval "ac_cv_header_$ac_safe=no"
11023 fi
11024 rm -f conftest*
11025 fi
11026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11027   echo "$ac_t""yes" 1>&6
11028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11029   cat >> confdefs.h <<EOF
11030 #define $ac_tr_hdr 1
11031 EOF
11032  
11033 else
11034   echo "$ac_t""no" 1>&6
11035 fi
11036 done
11037
11038         for ac_hdr in lwp/lwp.h
11039 do
11040 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11041 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11042 echo "configure:11043: checking for $ac_hdr" >&5
11043 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11044   echo $ac_n "(cached) $ac_c" 1>&6
11045 else
11046   cat > conftest.$ac_ext <<EOF
11047 #line 11048 "configure"
11048 #include "confdefs.h"
11049 #include <$ac_hdr>
11050 EOF
11051 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11052 { (eval echo configure:11053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11053 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11054 if test -z "$ac_err"; then
11055   rm -rf conftest*
11056   eval "ac_cv_header_$ac_safe=yes"
11057 else
11058   echo "$ac_err" >&5
11059   echo "configure: failed program was:" >&5
11060   cat conftest.$ac_ext >&5
11061   rm -rf conftest*
11062   eval "ac_cv_header_$ac_safe=no"
11063 fi
11064 rm -f conftest*
11065 fi
11066 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11067   echo "$ac_t""yes" 1>&6
11068     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11069   cat >> confdefs.h <<EOF
11070 #define $ac_tr_hdr 1
11071 EOF
11072  
11073 else
11074   echo "$ac_t""no" 1>&6
11075 fi
11076 done
11077
11078         for ac_hdr in thread.h synch.h
11079 do
11080 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11081 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11082 echo "configure:11083: checking for $ac_hdr" >&5
11083 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11084   echo $ac_n "(cached) $ac_c" 1>&6
11085 else
11086   cat > conftest.$ac_ext <<EOF
11087 #line 11088 "configure"
11088 #include "confdefs.h"
11089 #include <$ac_hdr>
11090 EOF
11091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11092 { (eval echo configure:11093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11094 if test -z "$ac_err"; then
11095   rm -rf conftest*
11096   eval "ac_cv_header_$ac_safe=yes"
11097 else
11098   echo "$ac_err" >&5
11099   echo "configure: failed program was:" >&5
11100   cat conftest.$ac_ext >&5
11101   rm -rf conftest*
11102   eval "ac_cv_header_$ac_safe=no"
11103 fi
11104 rm -f conftest*
11105 fi
11106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11107   echo "$ac_t""yes" 1>&6
11108     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11109   cat >> confdefs.h <<EOF
11110 #define $ac_tr_hdr 1
11111 EOF
11112  
11113 else
11114   echo "$ac_t""no" 1>&6
11115 fi
11116 done
11117
11118 fi
11119
11120 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11121                         cat >> confdefs.h <<\EOF
11122 #define REENTRANT 1
11123 EOF
11124
11125         cat >> confdefs.h <<\EOF
11126 #define _REENTRANT 1
11127 EOF
11128
11129         cat >> confdefs.h <<\EOF
11130 #define THREAD_SAFE 1
11131 EOF
11132
11133         cat >> confdefs.h <<\EOF
11134 #define _THREAD_SAFE 1
11135 EOF
11136
11137         cat >> confdefs.h <<\EOF
11138 #define THREADSAFE 1
11139 EOF
11140
11141         cat >> confdefs.h <<\EOF
11142 #define _THREADSAFE 1
11143 EOF
11144
11145         cat >> confdefs.h <<\EOF
11146 #define _SGI_MP_SOURCE 1
11147 EOF
11148
11149
11150                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11151 echo "configure:11152: checking for thread specific errno" >&5
11152 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11153   echo $ac_n "(cached) $ac_c" 1>&6
11154 else
11155   
11156                 cat > conftest.$ac_ext <<EOF
11157 #line 11158 "configure"
11158 #include "confdefs.h"
11159 #include <errno.h>
11160 int main() {
11161 errno = 0;
11162 ; return 0; }
11163 EOF
11164 if { (eval echo configure:11165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11165   rm -rf conftest*
11166   ol_cv_errno_thread_specific=yes
11167 else
11168   echo "configure: failed program was:" >&5
11169   cat conftest.$ac_ext >&5
11170   rm -rf conftest*
11171   ol_cv_errno_thread_specific=no
11172 fi
11173 rm -f conftest*
11174         
11175 fi
11176
11177 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11178
11179                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11180 echo "configure:11181: checking for thread specific h_errno" >&5
11181 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11182   echo $ac_n "(cached) $ac_c" 1>&6
11183 else
11184   
11185                 cat > conftest.$ac_ext <<EOF
11186 #line 11187 "configure"
11187 #include "confdefs.h"
11188 #include <netdb.h>
11189 int main() {
11190 h_errno = 0;
11191 ; return 0; }
11192 EOF
11193 if { (eval echo configure:11194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11194   rm -rf conftest*
11195   ol_cv_h_errno_thread_specific=yes
11196 else
11197   echo "configure: failed program was:" >&5
11198   cat conftest.$ac_ext >&5
11199   rm -rf conftest*
11200   ol_cv_h_errno_thread_specific=no
11201 fi
11202 rm -f conftest*
11203         
11204 fi
11205
11206 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11207
11208         if test $ol_cv_errno_thread_specific != yes \
11209                 -o $ol_cv_h_errno_thread_specific != yes ; then
11210                 LIBS="$LTHREAD_LIBS $LIBS"
11211                 LTHREAD_LIBS=""
11212         fi
11213
11214 fi  
11215
11216 if test $ol_link_threads = no ; then
11217         if test $ol_with_threads = yes ; then
11218                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11219         fi
11220
11221         if test $ol_with_threads = auto ; then
11222                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11223                 ol_with_threads=no
11224         fi
11225
11226         cat >> confdefs.h <<\EOF
11227 #define NO_THREADS 1
11228 EOF
11229
11230         LTHREAD_LIBS=""
11231 fi
11232
11233 if test $ol_link_threads != no ; then
11234         cat >> confdefs.h <<\EOF
11235 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11236 EOF
11237
11238 fi
11239
11240
11241 ol_link_ldbm=no 
11242 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
11243         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
11244 echo "configure:11245: checking for DB2 library" >&5
11245 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
11246   echo $ac_n "(cached) $ac_c" 1>&6
11247 else
11248         ol_LIBS="$LIBS"
11249         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
11250 echo "configure:11251: checking for db_appexit in -ldb" >&5
11251 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
11252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11253   echo $ac_n "(cached) $ac_c" 1>&6
11254 else
11255   ac_save_LIBS="$LIBS"
11256 LIBS="-ldb  $LIBS"
11257 cat > conftest.$ac_ext <<EOF
11258 #line 11259 "configure"
11259 #include "confdefs.h"
11260 /* Override any gcc2 internal prototype to avoid an error.  */
11261 /* We use char because int might match the return type of a gcc2
11262     builtin and then its argument prototype would still apply.  */
11263 char db_appexit();
11264
11265 int main() {
11266 db_appexit()
11267 ; return 0; }
11268 EOF
11269 if { (eval echo configure:11270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11270   rm -rf conftest*
11271   eval "ac_cv_lib_$ac_lib_var=yes"
11272 else
11273   echo "configure: failed program was:" >&5
11274   cat conftest.$ac_ext >&5
11275   rm -rf conftest*
11276   eval "ac_cv_lib_$ac_lib_var=no"
11277 fi
11278 rm -f conftest*
11279 LIBS="$ac_save_LIBS"
11280
11281 fi
11282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11283   echo "$ac_t""yes" 1>&6
11284   ol_cv_lib_db2=-ldb
11285 else
11286   echo "$ac_t""no" 1>&6
11287 ol_cv_lib_db2=no
11288 fi
11289
11290         LIBS="$ol_LIBS"
11291
11292 fi
11293
11294 echo "$ac_t""$ol_cv_lib_db2" 1>&6
11295
11296 for ac_hdr in db.h
11297 do
11298 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11299 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11300 echo "configure:11301: checking for $ac_hdr" >&5
11301 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11302   echo $ac_n "(cached) $ac_c" 1>&6
11303 else
11304   cat > conftest.$ac_ext <<EOF
11305 #line 11306 "configure"
11306 #include "confdefs.h"
11307 #include <$ac_hdr>
11308 EOF
11309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11310 { (eval echo configure:11311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11312 if test -z "$ac_err"; then
11313   rm -rf conftest*
11314   eval "ac_cv_header_$ac_safe=yes"
11315 else
11316   echo "$ac_err" >&5
11317   echo "configure: failed program was:" >&5
11318   cat conftest.$ac_ext >&5
11319   rm -rf conftest*
11320   eval "ac_cv_header_$ac_safe=no"
11321 fi
11322 rm -f conftest*
11323 fi
11324 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11325   echo "$ac_t""yes" 1>&6
11326     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11327   cat >> confdefs.h <<EOF
11328 #define $ac_tr_hdr 1
11329 EOF
11330  
11331 else
11332   echo "$ac_t""no" 1>&6
11333 fi
11334 done
11335
11336 if test $ac_cv_header_db_h = yes ; then
11337         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
11338 echo "configure:11339: checking if db.h is DB2" >&5
11339 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
11340   echo $ac_n "(cached) $ac_c" 1>&6
11341 else
11342   
11343                 cat > conftest.$ac_ext <<EOF
11344 #line 11345 "configure"
11345 #include "confdefs.h"
11346
11347 #                       include <db.h>
11348                         /* this check could be improved */
11349 #                       ifdef DB_VERSION_MAJOR
11350 #                               if DB_VERSION_MAJOR == 2
11351                                         __db_version_2;
11352 #                               endif
11353 #                       endif
11354                 
11355 EOF
11356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11357   egrep "__db_version_2" >/dev/null 2>&1; then
11358   rm -rf conftest*
11359   ol_cv_header_db2=yes
11360 else
11361   rm -rf conftest*
11362   ol_cv_header_db2=no
11363 fi
11364 rm -f conftest*
11365
11366 fi
11367
11368 echo "$ac_t""$ol_cv_header_db2" 1>&6
11369 else
11370         ol_cv_header_db2=no
11371 fi
11372
11373
11374  
11375  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
11376 echo "configure:11377: checking for Berkeley DB2" >&5
11377 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
11378   echo $ac_n "(cached) $ac_c" 1>&6
11379 else
11380   
11381         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
11382                 ol_cv_berkeley_db2=no
11383         else
11384                 ol_cv_berkeley_db2=yes
11385         fi
11386
11387 fi
11388
11389 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
11390  if test $ol_cv_berkeley_db2 = yes ; then
11391         cat >> confdefs.h <<\EOF
11392 #define HAVE_BERKELEY_DB2 1
11393 EOF
11394
11395  fi
11396
11397
11398         if test $ol_cv_berkeley_db2 = yes ; then
11399                 ol_link_ldbm=db2
11400                 ol_with_ldbm_api=db2
11401
11402                 if test $ol_with_ldbm_type = hash ; then
11403                         cat >> confdefs.h <<\EOF
11404 #define LDBM_USE_DBHASH 1
11405 EOF
11406
11407                 else
11408                         cat >> confdefs.h <<\EOF
11409 #define LDBM_USE_DBBTREE 1
11410 EOF
11411
11412                 fi
11413
11414                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11415 echo "configure:11416: checking for DB_THREAD support" >&5
11416 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
11417   echo $ac_n "(cached) $ac_c" 1>&6
11418 else
11419   
11420         ol_LIBS="$LIBS"
11421         if test $ol_cv_lib_db2 != yes ; then
11422                 LIBS="$ol_cv_lib_db2"
11423         fi
11424
11425         if test "$cross_compiling" = yes; then
11426   ol_cv_berkeley_db2_db_thread=cross
11427 else
11428   cat > conftest.$ac_ext <<EOF
11429 #line 11430 "configure"
11430 #include "confdefs.h"
11431
11432 #include <db.h>
11433 #ifndef NULL
11434 #define NULL ((void *)0)
11435 #endif
11436 main()
11437 {
11438         int rc;
11439         DB_ENV env;
11440         u_int32_t flags = DB_CREATE | DB_THREAD;
11441
11442         memset( &env, '\0', sizeof(env) );
11443
11444         rc = db_appinit( NULL, NULL, &env, flags );
11445
11446         if( rc == 0 ) {
11447                 db_appexit( &env );
11448         }
11449
11450         return rc;
11451 }
11452 EOF
11453 if { (eval echo configure:11454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11454 then
11455   ol_cv_berkeley_db2_db_thread=yes
11456 else
11457   echo "configure: failed program was:" >&5
11458   cat conftest.$ac_ext >&5
11459   rm -fr conftest*
11460   ol_cv_berkeley_db2_db_thread=no
11461 fi
11462 rm -fr conftest*
11463 fi
11464
11465
11466         LIBS="$ol_LIBS"
11467
11468         if test $ol_cv_berkeley_db2_db_thread != no ; then
11469                 cat >> confdefs.h <<\EOF
11470 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11471 EOF
11472
11473         fi
11474
11475 fi
11476
11477 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11478
11479                                                 if test $ol_cv_lib_db2 != yes ; then
11480                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11481                 fi
11482         fi
11483 fi
11484
11485 ol_link_bdb2=no
11486 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11487         if test $ol_cv_berkeley_db2_db_thread != no ; then
11488                 ol_link_bdb2=yes
11489         else
11490                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11491         fi
11492 fi
11493
11494 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11495         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11496 echo "configure:11497: checking for Berkeley DB library" >&5
11497 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11498   echo $ac_n "(cached) $ac_c" 1>&6
11499 else
11500   
11501         for ac_hdr in db1/db.h
11502 do
11503 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11504 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11505 echo "configure:11506: checking for $ac_hdr" >&5
11506 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11507   echo $ac_n "(cached) $ac_c" 1>&6
11508 else
11509   cat > conftest.$ac_ext <<EOF
11510 #line 11511 "configure"
11511 #include "confdefs.h"
11512 #include <$ac_hdr>
11513 EOF
11514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11515 { (eval echo configure:11516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11517 if test -z "$ac_err"; then
11518   rm -rf conftest*
11519   eval "ac_cv_header_$ac_safe=yes"
11520 else
11521   echo "$ac_err" >&5
11522   echo "configure: failed program was:" >&5
11523   cat conftest.$ac_ext >&5
11524   rm -rf conftest*
11525   eval "ac_cv_header_$ac_safe=no"
11526 fi
11527 rm -f conftest*
11528 fi
11529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11530   echo "$ac_t""yes" 1>&6
11531     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11532   cat >> confdefs.h <<EOF
11533 #define $ac_tr_hdr 1
11534 EOF
11535  
11536 else
11537   echo "$ac_t""no" 1>&6
11538 fi
11539 done
11540
11541         ol_LIBS="$LIBS"
11542         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11543 echo "configure:11544: checking for dbopen" >&5
11544 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11545   echo $ac_n "(cached) $ac_c" 1>&6
11546 else
11547   cat > conftest.$ac_ext <<EOF
11548 #line 11549 "configure"
11549 #include "confdefs.h"
11550 /* System header to define __stub macros and hopefully few prototypes,
11551     which can conflict with char dbopen(); below.  */
11552 #include <assert.h>
11553 /* Override any gcc2 internal prototype to avoid an error.  */
11554 /* We use char because int might match the return type of a gcc2
11555     builtin and then its argument prototype would still apply.  */
11556 char dbopen();
11557 char (*f)();
11558
11559 int main() {
11560
11561 /* The GNU C library defines this for functions which it implements
11562     to always fail with ENOSYS.  Some functions are actually named
11563     something starting with __ and the normal name is an alias.  */
11564 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11565 choke me
11566 #else
11567 f = dbopen;
11568 #endif
11569
11570 ; return 0; }
11571 EOF
11572 if { (eval echo configure:11573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11573   rm -rf conftest*
11574   eval "ac_cv_func_dbopen=yes"
11575 else
11576   echo "configure: failed program was:" >&5
11577   cat conftest.$ac_ext >&5
11578   rm -rf conftest*
11579   eval "ac_cv_func_dbopen=no"
11580 fi
11581 rm -f conftest*
11582 fi
11583
11584 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11585   echo "$ac_t""yes" 1>&6
11586   ol_cv_lib_db=yes
11587 else
11588   echo "$ac_t""no" 1>&6
11589
11590                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11591 echo "configure:11592: checking for dbopen in -ldb1" >&5
11592 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11594   echo $ac_n "(cached) $ac_c" 1>&6
11595 else
11596   ac_save_LIBS="$LIBS"
11597 LIBS="-ldb1  $LIBS"
11598 cat > conftest.$ac_ext <<EOF
11599 #line 11600 "configure"
11600 #include "confdefs.h"
11601 /* Override any gcc2 internal prototype to avoid an error.  */
11602 /* We use char because int might match the return type of a gcc2
11603     builtin and then its argument prototype would still apply.  */
11604 char dbopen();
11605
11606 int main() {
11607 dbopen()
11608 ; return 0; }
11609 EOF
11610 if { (eval echo configure:11611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11611   rm -rf conftest*
11612   eval "ac_cv_lib_$ac_lib_var=yes"
11613 else
11614   echo "configure: failed program was:" >&5
11615   cat conftest.$ac_ext >&5
11616   rm -rf conftest*
11617   eval "ac_cv_lib_$ac_lib_var=no"
11618 fi
11619 rm -f conftest*
11620 LIBS="$ac_save_LIBS"
11621
11622 fi
11623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11624   echo "$ac_t""yes" 1>&6
11625   ol_cv_lib_db=-ldb1
11626 else
11627   echo "$ac_t""no" 1>&6
11628
11629                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11630 echo "configure:11631: checking for dbopen in -ldb" >&5
11631 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11632 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11633   echo $ac_n "(cached) $ac_c" 1>&6
11634 else
11635   ac_save_LIBS="$LIBS"
11636 LIBS="-ldb  $LIBS"
11637 cat > conftest.$ac_ext <<EOF
11638 #line 11639 "configure"
11639 #include "confdefs.h"
11640 /* Override any gcc2 internal prototype to avoid an error.  */
11641 /* We use char because int might match the return type of a gcc2
11642     builtin and then its argument prototype would still apply.  */
11643 char dbopen();
11644
11645 int main() {
11646 dbopen()
11647 ; return 0; }
11648 EOF
11649 if { (eval echo configure:11650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11650   rm -rf conftest*
11651   eval "ac_cv_lib_$ac_lib_var=yes"
11652 else
11653   echo "configure: failed program was:" >&5
11654   cat conftest.$ac_ext >&5
11655   rm -rf conftest*
11656   eval "ac_cv_lib_$ac_lib_var=no"
11657 fi
11658 rm -f conftest*
11659 LIBS="$ac_save_LIBS"
11660
11661 fi
11662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11663   echo "$ac_t""yes" 1>&6
11664   ol_cv_lib_db=-ldb
11665 else
11666   echo "$ac_t""no" 1>&6
11667 ol_cv_lib_db=no
11668 fi
11669
11670                 
11671 fi
11672
11673         
11674 fi
11675
11676         LIBS="$ol_LIBS"
11677
11678 fi
11679
11680 echo "$ac_t""$ol_cv_lib_db" 1>&6
11681
11682
11683 for ac_hdr in db_185.h
11684 do
11685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11686 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11687 echo "configure:11688: checking for $ac_hdr" >&5
11688 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11689   echo $ac_n "(cached) $ac_c" 1>&6
11690 else
11691   cat > conftest.$ac_ext <<EOF
11692 #line 11693 "configure"
11693 #include "confdefs.h"
11694 #include <$ac_hdr>
11695 EOF
11696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11697 { (eval echo configure:11698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11699 if test -z "$ac_err"; then
11700   rm -rf conftest*
11701   eval "ac_cv_header_$ac_safe=yes"
11702 else
11703   echo "$ac_err" >&5
11704   echo "configure: failed program was:" >&5
11705   cat conftest.$ac_ext >&5
11706   rm -rf conftest*
11707   eval "ac_cv_header_$ac_safe=no"
11708 fi
11709 rm -f conftest*
11710 fi
11711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11712   echo "$ac_t""yes" 1>&6
11713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11714   cat >> confdefs.h <<EOF
11715 #define $ac_tr_hdr 1
11716 EOF
11717  
11718 else
11719   echo "$ac_t""no" 1>&6
11720 fi
11721 done
11722
11723 if test "$ol_cv_header_db2" = yes ; then
11724         
11725         ol_cv_header_db=$ac_cv_header_db_185_h
11726 else
11727         ol_cv_header_db=$ac_cv_header_db_h
11728 fi
11729
11730
11731  
11732  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11733 echo "configure:11734: checking for Berkeley DB" >&5
11734 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11735   echo $ac_n "(cached) $ac_c" 1>&6
11736 else
11737   
11738         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11739                 ol_cv_berkeley_db=no
11740         else
11741                 ol_cv_berkeley_db=yes
11742         fi
11743
11744 fi
11745
11746 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11747  if test $ol_cv_berkeley_db = yes ; then
11748         cat >> confdefs.h <<\EOF
11749 #define HAVE_BERKELEY_DB 1
11750 EOF
11751
11752  fi
11753
11754
11755         if test $ol_cv_berkeley_db = yes ; then
11756                 ol_link_ldbm=db
11757                 ol_with_ldbm_api=db
11758
11759                 if test $ol_with_ldbm_type = hash ; then
11760                         cat >> confdefs.h <<\EOF
11761 #define LDBM_USE_DBHASH 1
11762 EOF
11763
11764                 else
11765                         cat >> confdefs.h <<\EOF
11766 #define LDBM_USE_DBBTREE 1
11767 EOF
11768
11769                 fi
11770
11771                                                 if test $ol_cv_lib_db != yes ; then
11772                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11773                 fi
11774         fi
11775 fi
11776
11777 if test $ol_with_ldbm_api = manual ; then
11778                 ol_link_ldbm=yes
11779
11780         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11781
11782         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11783 do
11784 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11785 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11786 echo "configure:11787: checking for $ac_hdr" >&5
11787 if eval "test \"\${ac_cv_header_$ac_safe+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 #include <$ac_hdr>
11794 EOF
11795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11796 { (eval echo configure:11797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11798 if test -z "$ac_err"; then
11799   rm -rf conftest*
11800   eval "ac_cv_header_$ac_safe=yes"
11801 else
11802   echo "$ac_err" >&5
11803   echo "configure: failed program was:" >&5
11804   cat conftest.$ac_ext >&5
11805   rm -rf conftest*
11806   eval "ac_cv_header_$ac_safe=no"
11807 fi
11808 rm -f conftest*
11809 fi
11810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11811   echo "$ac_t""yes" 1>&6
11812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11813   cat >> confdefs.h <<EOF
11814 #define $ac_tr_hdr 1
11815 EOF
11816  
11817 else
11818   echo "$ac_t""no" 1>&6
11819 fi
11820 done
11821
11822 fi
11823
11824 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11825         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11826         ol_with_ldbm_api=none
11827 fi
11828
11829 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11830         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11831 echo "configure:11832: checking for MDBM library" >&5
11832 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11833   echo $ac_n "(cached) $ac_c" 1>&6
11834 else
11835         ol_LIBS="$LIBS"
11836         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11837 echo "configure:11838: checking for mdbm_set_chain" >&5
11838 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11839   echo $ac_n "(cached) $ac_c" 1>&6
11840 else
11841   cat > conftest.$ac_ext <<EOF
11842 #line 11843 "configure"
11843 #include "confdefs.h"
11844 /* System header to define __stub macros and hopefully few prototypes,
11845     which can conflict with char mdbm_set_chain(); below.  */
11846 #include <assert.h>
11847 /* Override any gcc2 internal prototype to avoid an error.  */
11848 /* We use char because int might match the return type of a gcc2
11849     builtin and then its argument prototype would still apply.  */
11850 char mdbm_set_chain();
11851 char (*f)();
11852
11853 int main() {
11854
11855 /* The GNU C library defines this for functions which it implements
11856     to always fail with ENOSYS.  Some functions are actually named
11857     something starting with __ and the normal name is an alias.  */
11858 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11859 choke me
11860 #else
11861 f = mdbm_set_chain;
11862 #endif
11863
11864 ; return 0; }
11865 EOF
11866 if { (eval echo configure:11867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11867   rm -rf conftest*
11868   eval "ac_cv_func_mdbm_set_chain=yes"
11869 else
11870   echo "configure: failed program was:" >&5
11871   cat conftest.$ac_ext >&5
11872   rm -rf conftest*
11873   eval "ac_cv_func_mdbm_set_chain=no"
11874 fi
11875 rm -f conftest*
11876 fi
11877
11878 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11879   echo "$ac_t""yes" 1>&6
11880   ol_cv_lib_mdbm=yes
11881 else
11882   echo "$ac_t""no" 1>&6
11883
11884                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11885 echo "configure:11886: checking for mdbm_set_chain in -lmdbm" >&5
11886 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11888   echo $ac_n "(cached) $ac_c" 1>&6
11889 else
11890   ac_save_LIBS="$LIBS"
11891 LIBS="-lmdbm  $LIBS"
11892 cat > conftest.$ac_ext <<EOF
11893 #line 11894 "configure"
11894 #include "confdefs.h"
11895 /* Override any gcc2 internal prototype to avoid an error.  */
11896 /* We use char because int might match the return type of a gcc2
11897     builtin and then its argument prototype would still apply.  */
11898 char mdbm_set_chain();
11899
11900 int main() {
11901 mdbm_set_chain()
11902 ; return 0; }
11903 EOF
11904 if { (eval echo configure:11905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11905   rm -rf conftest*
11906   eval "ac_cv_lib_$ac_lib_var=yes"
11907 else
11908   echo "configure: failed program was:" >&5
11909   cat conftest.$ac_ext >&5
11910   rm -rf conftest*
11911   eval "ac_cv_lib_$ac_lib_var=no"
11912 fi
11913 rm -f conftest*
11914 LIBS="$ac_save_LIBS"
11915
11916 fi
11917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11918   echo "$ac_t""yes" 1>&6
11919   ol_cv_lib_mdbm=-lmdbm
11920 else
11921   echo "$ac_t""no" 1>&6
11922 ol_cv_lib_mdbm=no
11923 fi
11924
11925         
11926 fi
11927
11928         LIBS="$ol_LIBS"
11929
11930 fi
11931
11932 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11933
11934
11935  for ac_hdr in mdbm.h
11936 do
11937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11939 echo "configure:11940: checking for $ac_hdr" >&5
11940 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11941   echo $ac_n "(cached) $ac_c" 1>&6
11942 else
11943   cat > conftest.$ac_ext <<EOF
11944 #line 11945 "configure"
11945 #include "confdefs.h"
11946 #include <$ac_hdr>
11947 EOF
11948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11949 { (eval echo configure:11950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11951 if test -z "$ac_err"; then
11952   rm -rf conftest*
11953   eval "ac_cv_header_$ac_safe=yes"
11954 else
11955   echo "$ac_err" >&5
11956   echo "configure: failed program was:" >&5
11957   cat conftest.$ac_ext >&5
11958   rm -rf conftest*
11959   eval "ac_cv_header_$ac_safe=no"
11960 fi
11961 rm -f conftest*
11962 fi
11963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11964   echo "$ac_t""yes" 1>&6
11965     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11966   cat >> confdefs.h <<EOF
11967 #define $ac_tr_hdr 1
11968 EOF
11969  
11970 else
11971   echo "$ac_t""no" 1>&6
11972 fi
11973 done
11974
11975  echo $ac_n "checking for db""... $ac_c" 1>&6
11976 echo "configure:11977: checking for db" >&5
11977 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11978   echo $ac_n "(cached) $ac_c" 1>&6
11979 else
11980   
11981         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11982                 ol_cv_mdbm=no
11983         else
11984                 ol_cv_mdbm=yes
11985         fi
11986
11987 fi
11988
11989 echo "$ac_t""$ol_cv_mdbm" 1>&6
11990  if test $ol_cv_mdbm = yes ; then
11991         cat >> confdefs.h <<\EOF
11992 #define HAVE_MDBM 1
11993 EOF
11994
11995  fi
11996
11997
11998         if test $ol_cv_mdbm = yes ; then
11999                 ol_link_ldbm=mdbm
12000                 ol_with_ldbm_api=mdbm
12001                 if test $ol_cv_lib_mdbm != yes ; then
12002                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12003                 fi
12004         fi
12005 fi
12006
12007 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12008         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12009 echo "configure:12010: checking for GDBM library" >&5
12010 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12011   echo $ac_n "(cached) $ac_c" 1>&6
12012 else
12013         ol_LIBS="$LIBS"
12014         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12015 echo "configure:12016: checking for gdbm_open" >&5
12016 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12017   echo $ac_n "(cached) $ac_c" 1>&6
12018 else
12019   cat > conftest.$ac_ext <<EOF
12020 #line 12021 "configure"
12021 #include "confdefs.h"
12022 /* System header to define __stub macros and hopefully few prototypes,
12023     which can conflict with char gdbm_open(); below.  */
12024 #include <assert.h>
12025 /* Override any gcc2 internal prototype to avoid an error.  */
12026 /* We use char because int might match the return type of a gcc2
12027     builtin and then its argument prototype would still apply.  */
12028 char gdbm_open();
12029 char (*f)();
12030
12031 int main() {
12032
12033 /* The GNU C library defines this for functions which it implements
12034     to always fail with ENOSYS.  Some functions are actually named
12035     something starting with __ and the normal name is an alias.  */
12036 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12037 choke me
12038 #else
12039 f = gdbm_open;
12040 #endif
12041
12042 ; return 0; }
12043 EOF
12044 if { (eval echo configure:12045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12045   rm -rf conftest*
12046   eval "ac_cv_func_gdbm_open=yes"
12047 else
12048   echo "configure: failed program was:" >&5
12049   cat conftest.$ac_ext >&5
12050   rm -rf conftest*
12051   eval "ac_cv_func_gdbm_open=no"
12052 fi
12053 rm -f conftest*
12054 fi
12055
12056 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12057   echo "$ac_t""yes" 1>&6
12058   ol_cv_lib_gdbm=yes
12059 else
12060   echo "$ac_t""no" 1>&6
12061
12062                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12063 echo "configure:12064: checking for gdbm_open in -lgdbm" >&5
12064 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12066   echo $ac_n "(cached) $ac_c" 1>&6
12067 else
12068   ac_save_LIBS="$LIBS"
12069 LIBS="-lgdbm  $LIBS"
12070 cat > conftest.$ac_ext <<EOF
12071 #line 12072 "configure"
12072 #include "confdefs.h"
12073 /* Override any gcc2 internal prototype to avoid an error.  */
12074 /* We use char because int might match the return type of a gcc2
12075     builtin and then its argument prototype would still apply.  */
12076 char gdbm_open();
12077
12078 int main() {
12079 gdbm_open()
12080 ; return 0; }
12081 EOF
12082 if { (eval echo configure:12083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12083   rm -rf conftest*
12084   eval "ac_cv_lib_$ac_lib_var=yes"
12085 else
12086   echo "configure: failed program was:" >&5
12087   cat conftest.$ac_ext >&5
12088   rm -rf conftest*
12089   eval "ac_cv_lib_$ac_lib_var=no"
12090 fi
12091 rm -f conftest*
12092 LIBS="$ac_save_LIBS"
12093
12094 fi
12095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12096   echo "$ac_t""yes" 1>&6
12097   ol_cv_lib_gdbm=-lgdbm
12098 else
12099   echo "$ac_t""no" 1>&6
12100 ol_cv_lib_gdbm=no
12101 fi
12102
12103         
12104 fi
12105
12106         LIBS="$ol_LIBS"
12107
12108 fi
12109
12110 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12111
12112
12113  for ac_hdr in gdbm.h
12114 do
12115 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12116 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12117 echo "configure:12118: checking for $ac_hdr" >&5
12118 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12119   echo $ac_n "(cached) $ac_c" 1>&6
12120 else
12121   cat > conftest.$ac_ext <<EOF
12122 #line 12123 "configure"
12123 #include "confdefs.h"
12124 #include <$ac_hdr>
12125 EOF
12126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12127 { (eval echo configure:12128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12129 if test -z "$ac_err"; then
12130   rm -rf conftest*
12131   eval "ac_cv_header_$ac_safe=yes"
12132 else
12133   echo "$ac_err" >&5
12134   echo "configure: failed program was:" >&5
12135   cat conftest.$ac_ext >&5
12136   rm -rf conftest*
12137   eval "ac_cv_header_$ac_safe=no"
12138 fi
12139 rm -f conftest*
12140 fi
12141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12142   echo "$ac_t""yes" 1>&6
12143     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12144   cat >> confdefs.h <<EOF
12145 #define $ac_tr_hdr 1
12146 EOF
12147  
12148 else
12149   echo "$ac_t""no" 1>&6
12150 fi
12151 done
12152
12153  echo $ac_n "checking for db""... $ac_c" 1>&6
12154 echo "configure:12155: checking for db" >&5
12155 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12156   echo $ac_n "(cached) $ac_c" 1>&6
12157 else
12158   
12159         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12160                 ol_cv_gdbm=no
12161         else
12162                 ol_cv_gdbm=yes
12163         fi
12164
12165 fi
12166
12167 echo "$ac_t""$ol_cv_gdbm" 1>&6
12168  if test $ol_cv_gdbm = yes ; then
12169         cat >> confdefs.h <<\EOF
12170 #define HAVE_GDBM 1
12171 EOF
12172
12173  fi
12174
12175
12176         if test $ol_cv_gdbm = yes ; then
12177                 ol_link_ldbm=gdbm
12178                 ol_with_ldbm_api=gdbm
12179
12180                 if test $ol_cv_lib_gdbm != yes ; then
12181                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12182                 fi
12183         fi
12184 fi
12185
12186 if test $ol_with_ldbm_api = ndbm ; then
12187         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12188 echo "configure:12189: checking for NDBM library" >&5
12189 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12190   echo $ac_n "(cached) $ac_c" 1>&6
12191 else
12192         ol_LIBS="$LIBS"
12193         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12194 echo "configure:12195: checking for dbm_open" >&5
12195 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12196   echo $ac_n "(cached) $ac_c" 1>&6
12197 else
12198   cat > conftest.$ac_ext <<EOF
12199 #line 12200 "configure"
12200 #include "confdefs.h"
12201 /* System header to define __stub macros and hopefully few prototypes,
12202     which can conflict with char dbm_open(); below.  */
12203 #include <assert.h>
12204 /* Override any gcc2 internal prototype to avoid an error.  */
12205 /* We use char because int might match the return type of a gcc2
12206     builtin and then its argument prototype would still apply.  */
12207 char dbm_open();
12208 char (*f)();
12209
12210 int main() {
12211
12212 /* The GNU C library defines this for functions which it implements
12213     to always fail with ENOSYS.  Some functions are actually named
12214     something starting with __ and the normal name is an alias.  */
12215 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12216 choke me
12217 #else
12218 f = dbm_open;
12219 #endif
12220
12221 ; return 0; }
12222 EOF
12223 if { (eval echo configure:12224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12224   rm -rf conftest*
12225   eval "ac_cv_func_dbm_open=yes"
12226 else
12227   echo "configure: failed program was:" >&5
12228   cat conftest.$ac_ext >&5
12229   rm -rf conftest*
12230   eval "ac_cv_func_dbm_open=no"
12231 fi
12232 rm -f conftest*
12233 fi
12234
12235 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12236   echo "$ac_t""yes" 1>&6
12237   ol_cv_lib_ndbm=yes
12238 else
12239   echo "$ac_t""no" 1>&6
12240
12241                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12242 echo "configure:12243: checking for dbm_open in -lndbm" >&5
12243 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12245   echo $ac_n "(cached) $ac_c" 1>&6
12246 else
12247   ac_save_LIBS="$LIBS"
12248 LIBS="-lndbm  $LIBS"
12249 cat > conftest.$ac_ext <<EOF
12250 #line 12251 "configure"
12251 #include "confdefs.h"
12252 /* Override any gcc2 internal prototype to avoid an error.  */
12253 /* We use char because int might match the return type of a gcc2
12254     builtin and then its argument prototype would still apply.  */
12255 char dbm_open();
12256
12257 int main() {
12258 dbm_open()
12259 ; return 0; }
12260 EOF
12261 if { (eval echo configure:12262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12262   rm -rf conftest*
12263   eval "ac_cv_lib_$ac_lib_var=yes"
12264 else
12265   echo "configure: failed program was:" >&5
12266   cat conftest.$ac_ext >&5
12267   rm -rf conftest*
12268   eval "ac_cv_lib_$ac_lib_var=no"
12269 fi
12270 rm -f conftest*
12271 LIBS="$ac_save_LIBS"
12272
12273 fi
12274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12275   echo "$ac_t""yes" 1>&6
12276   ol_cv_lib_ndbm=-lndbm
12277 else
12278   echo "$ac_t""no" 1>&6
12279
12280                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12281 echo "configure:12282: checking for dbm_open in -ldbm" >&5
12282 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12283 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12284   echo $ac_n "(cached) $ac_c" 1>&6
12285 else
12286   ac_save_LIBS="$LIBS"
12287 LIBS="-ldbm  $LIBS"
12288 cat > conftest.$ac_ext <<EOF
12289 #line 12290 "configure"
12290 #include "confdefs.h"
12291 /* Override any gcc2 internal prototype to avoid an error.  */
12292 /* We use char because int might match the return type of a gcc2
12293     builtin and then its argument prototype would still apply.  */
12294 char dbm_open();
12295
12296 int main() {
12297 dbm_open()
12298 ; return 0; }
12299 EOF
12300 if { (eval echo configure:12301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12301   rm -rf conftest*
12302   eval "ac_cv_lib_$ac_lib_var=yes"
12303 else
12304   echo "configure: failed program was:" >&5
12305   cat conftest.$ac_ext >&5
12306   rm -rf conftest*
12307   eval "ac_cv_lib_$ac_lib_var=no"
12308 fi
12309 rm -f conftest*
12310 LIBS="$ac_save_LIBS"
12311
12312 fi
12313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12314   echo "$ac_t""yes" 1>&6
12315   ol_cv_lib_ndbm=-ldbm
12316 else
12317   echo "$ac_t""no" 1>&6
12318 ol_cv_lib_ndbm=no
12319 fi
12320                 
12321 fi
12322
12323         
12324 fi
12325
12326         LIBS="$ol_LIBS"
12327
12328 fi
12329
12330 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12331
12332
12333  for ac_hdr in ndbm.h
12334 do
12335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12337 echo "configure:12338: checking for $ac_hdr" >&5
12338 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12339   echo $ac_n "(cached) $ac_c" 1>&6
12340 else
12341   cat > conftest.$ac_ext <<EOF
12342 #line 12343 "configure"
12343 #include "confdefs.h"
12344 #include <$ac_hdr>
12345 EOF
12346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12347 { (eval echo configure:12348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12349 if test -z "$ac_err"; then
12350   rm -rf conftest*
12351   eval "ac_cv_header_$ac_safe=yes"
12352 else
12353   echo "$ac_err" >&5
12354   echo "configure: failed program was:" >&5
12355   cat conftest.$ac_ext >&5
12356   rm -rf conftest*
12357   eval "ac_cv_header_$ac_safe=no"
12358 fi
12359 rm -f conftest*
12360 fi
12361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12362   echo "$ac_t""yes" 1>&6
12363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12364   cat >> confdefs.h <<EOF
12365 #define $ac_tr_hdr 1
12366 EOF
12367  
12368 else
12369   echo "$ac_t""no" 1>&6
12370 fi
12371 done
12372
12373  echo $ac_n "checking for db""... $ac_c" 1>&6
12374 echo "configure:12375: checking for db" >&5
12375 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12376   echo $ac_n "(cached) $ac_c" 1>&6
12377 else
12378   
12379         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12380                 ol_cv_ndbm=no
12381         else
12382                 ol_cv_ndbm=yes
12383         fi
12384
12385 fi
12386
12387 echo "$ac_t""$ol_cv_ndbm" 1>&6
12388  if test $ol_cv_ndbm = yes ; then
12389         cat >> confdefs.h <<\EOF
12390 #define HAVE_NDBM 1
12391 EOF
12392
12393  fi
12394
12395
12396         if test $ol_cv_ndbm = yes ; then
12397                 ol_link_ldbm=ndbm
12398                 ol_with_ldbm_api=ndbm
12399
12400                 if test $ol_cv_lib_ndbm != yes ; then
12401                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12402                 fi
12403         fi
12404 fi
12405
12406 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12407         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12408         if test $ol_enable_ldbm = yes ; then
12409                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12410         fi
12411
12412         echo "configure: warning: disabling LDBM" 1>&2
12413         ol_enable_ldbm=no
12414 fi
12415
12416 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12417         LINK_BINS_DYNAMIC="yes"
12418 else
12419         LINK_BINS_DYNAMIC="no"
12420 fi
12421
12422 if test $ol_enable_wrappers != no ; then
12423         for ac_hdr in tcpd.h
12424 do
12425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12427 echo "configure:12428: checking for $ac_hdr" >&5
12428 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12429   echo $ac_n "(cached) $ac_c" 1>&6
12430 else
12431   cat > conftest.$ac_ext <<EOF
12432 #line 12433 "configure"
12433 #include "confdefs.h"
12434 #include <$ac_hdr>
12435 EOF
12436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12437 { (eval echo configure:12438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12439 if test -z "$ac_err"; then
12440   rm -rf conftest*
12441   eval "ac_cv_header_$ac_safe=yes"
12442 else
12443   echo "$ac_err" >&5
12444   echo "configure: failed program was:" >&5
12445   cat conftest.$ac_ext >&5
12446   rm -rf conftest*
12447   eval "ac_cv_header_$ac_safe=no"
12448 fi
12449 rm -f conftest*
12450 fi
12451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12452   echo "$ac_t""yes" 1>&6
12453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12454   cat >> confdefs.h <<EOF
12455 #define $ac_tr_hdr 1
12456 EOF
12457  
12458 else
12459   echo "$ac_t""no" 1>&6
12460 fi
12461 done
12462
12463
12464         if test $ac_cv_header_tcpd_h != yes ; then
12465                 have_wrappers=no
12466         else
12467                 cat > conftest.$ac_ext <<EOF
12468 #line 12469 "configure"
12469 #include "confdefs.h"
12470
12471 int allow_severity = 0;
12472 int deny_severity  = 0;
12473                 
12474 int main() {
12475 hosts_access()
12476 ; return 0; }
12477 EOF
12478 if { (eval echo configure:12479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12479   rm -rf conftest*
12480   have_wrappers=yes
12481 else
12482   echo "configure: failed program was:" >&5
12483   cat conftest.$ac_ext >&5
12484   rm -rf conftest*
12485   have_wrappers=no
12486 fi
12487 rm -f conftest*
12488         fi
12489
12490         if test $have_wrappers = yes ; then
12491                 cat >> confdefs.h <<\EOF
12492 #define HAVE_TCPD 1
12493 EOF
12494
12495                 WRAP_LIBS="-lwrap"
12496
12497                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12498 echo "configure:12499: checking for main in -lnsl" >&5
12499 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12500 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12501   echo $ac_n "(cached) $ac_c" 1>&6
12502 else
12503   ac_save_LIBS="$LIBS"
12504 LIBS="-lnsl  $LIBS"
12505 cat > conftest.$ac_ext <<EOF
12506 #line 12507 "configure"
12507 #include "confdefs.h"
12508
12509 int main() {
12510 main()
12511 ; return 0; }
12512 EOF
12513 if { (eval echo configure:12514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12514   rm -rf conftest*
12515   eval "ac_cv_lib_$ac_lib_var=yes"
12516 else
12517   echo "configure: failed program was:" >&5
12518   cat conftest.$ac_ext >&5
12519   rm -rf conftest*
12520   eval "ac_cv_lib_$ac_lib_var=no"
12521 fi
12522 rm -f conftest*
12523 LIBS="$ac_save_LIBS"
12524
12525 fi
12526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12527   echo "$ac_t""yes" 1>&6
12528     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12529     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12530   cat >> confdefs.h <<EOF
12531 #define $ac_tr_lib 1
12532 EOF
12533
12534   LIBS="-lnsl $LIBS"
12535
12536 else
12537   echo "$ac_t""no" 1>&6
12538 fi
12539
12540         else
12541                 echo "configure: warning: could not find -lwrap" 1>&2
12542                 if test $ol_enable_wrappers = yes ; then
12543                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12544                 fi
12545
12546                 echo "configure: warning: disabling wrappers support" 1>&2
12547                 ol_enable_wrappers=no
12548                 WRAP_LIBS=""
12549         fi
12550 fi
12551
12552 if test $ol_enable_syslog != no ; then
12553         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12554 echo "configure:12555: checking for openlog" >&5
12555 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12556   echo $ac_n "(cached) $ac_c" 1>&6
12557 else
12558   cat > conftest.$ac_ext <<EOF
12559 #line 12560 "configure"
12560 #include "confdefs.h"
12561 /* System header to define __stub macros and hopefully few prototypes,
12562     which can conflict with char openlog(); below.  */
12563 #include <assert.h>
12564 /* Override any gcc2 internal prototype to avoid an error.  */
12565 /* We use char because int might match the return type of a gcc2
12566     builtin and then its argument prototype would still apply.  */
12567 char openlog();
12568 char (*f)();
12569
12570 int main() {
12571
12572 /* The GNU C library defines this for functions which it implements
12573     to always fail with ENOSYS.  Some functions are actually named
12574     something starting with __ and the normal name is an alias.  */
12575 #if defined (__stub_openlog) || defined (__stub___openlog)
12576 choke me
12577 #else
12578 f = openlog;
12579 #endif
12580
12581 ; return 0; }
12582 EOF
12583 if { (eval echo configure:12584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12584   rm -rf conftest*
12585   eval "ac_cv_func_openlog=yes"
12586 else
12587   echo "configure: failed program was:" >&5
12588   cat conftest.$ac_ext >&5
12589   rm -rf conftest*
12590   eval "ac_cv_func_openlog=no"
12591 fi
12592 rm -f conftest*
12593 fi
12594
12595 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12596   echo "$ac_t""yes" 1>&6
12597   :
12598 else
12599   echo "$ac_t""no" 1>&6
12600 fi
12601
12602         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12603                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12604         fi
12605         ol_enable_syslog=$ac_cv_func_openlog
12606 fi
12607
12608 if test $ol_enable_dmalloc != no ; then
12609         for ac_hdr in dmalloc.h
12610 do
12611 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12612 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12613 echo "configure:12614: checking for $ac_hdr" >&5
12614 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12615   echo $ac_n "(cached) $ac_c" 1>&6
12616 else
12617   cat > conftest.$ac_ext <<EOF
12618 #line 12619 "configure"
12619 #include "confdefs.h"
12620 #include <$ac_hdr>
12621 EOF
12622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12623 { (eval echo configure:12624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12625 if test -z "$ac_err"; then
12626   rm -rf conftest*
12627   eval "ac_cv_header_$ac_safe=yes"
12628 else
12629   echo "$ac_err" >&5
12630   echo "configure: failed program was:" >&5
12631   cat conftest.$ac_ext >&5
12632   rm -rf conftest*
12633   eval "ac_cv_header_$ac_safe=no"
12634 fi
12635 rm -f conftest*
12636 fi
12637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12638   echo "$ac_t""yes" 1>&6
12639     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12640   cat >> confdefs.h <<EOF
12641 #define $ac_tr_hdr 1
12642 EOF
12643  
12644 else
12645   echo "$ac_t""no" 1>&6
12646 fi
12647 done
12648
12649         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12650 echo "configure:12651: checking for dmalloc_shutdown in -ldmalloc" >&5
12651 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12652 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12653   echo $ac_n "(cached) $ac_c" 1>&6
12654 else
12655   ac_save_LIBS="$LIBS"
12656 LIBS="-ldmalloc  $LIBS"
12657 cat > conftest.$ac_ext <<EOF
12658 #line 12659 "configure"
12659 #include "confdefs.h"
12660 /* Override any gcc2 internal prototype to avoid an error.  */
12661 /* We use char because int might match the return type of a gcc2
12662     builtin and then its argument prototype would still apply.  */
12663 char dmalloc_shutdown();
12664
12665 int main() {
12666 dmalloc_shutdown()
12667 ; return 0; }
12668 EOF
12669 if { (eval echo configure:12670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12670   rm -rf conftest*
12671   eval "ac_cv_lib_$ac_lib_var=yes"
12672 else
12673   echo "configure: failed program was:" >&5
12674   cat conftest.$ac_ext >&5
12675   rm -rf conftest*
12676   eval "ac_cv_lib_$ac_lib_var=no"
12677 fi
12678 rm -f conftest*
12679 LIBS="$ac_save_LIBS"
12680
12681 fi
12682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12683   echo "$ac_t""yes" 1>&6
12684     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12685     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12686   cat >> confdefs.h <<EOF
12687 #define $ac_tr_lib 1
12688 EOF
12689
12690   LIBS="-ldmalloc $LIBS"
12691
12692 else
12693   echo "$ac_t""no" 1>&6
12694 fi
12695
12696 fi
12697
12698 if test $ol_enable_tcl != no ; then
12699         for ac_hdr in tcl.h
12700 do
12701 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12702 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12703 echo "configure:12704: checking for $ac_hdr" >&5
12704 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12705   echo $ac_n "(cached) $ac_c" 1>&6
12706 else
12707   cat > conftest.$ac_ext <<EOF
12708 #line 12709 "configure"
12709 #include "confdefs.h"
12710 #include <$ac_hdr>
12711 EOF
12712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12713 { (eval echo configure:12714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12715 if test -z "$ac_err"; then
12716   rm -rf conftest*
12717   eval "ac_cv_header_$ac_safe=yes"
12718 else
12719   echo "$ac_err" >&5
12720   echo "configure: failed program was:" >&5
12721   cat conftest.$ac_ext >&5
12722   rm -rf conftest*
12723   eval "ac_cv_header_$ac_safe=no"
12724 fi
12725 rm -f conftest*
12726 fi
12727 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12728   echo "$ac_t""yes" 1>&6
12729     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12730   cat >> confdefs.h <<EOF
12731 #define $ac_tr_hdr 1
12732 EOF
12733  
12734 else
12735   echo "$ac_t""no" 1>&6
12736 fi
12737 done
12738
12739
12740         if test $ac_cv_header_tcl_h != yes ; then
12741                 have_tcl=no
12742         else
12743                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12744                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12745 echo "configure:12746: checking for main in -l$lib" >&5
12746 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12747 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12748   echo $ac_n "(cached) $ac_c" 1>&6
12749 else
12750   ac_save_LIBS="$LIBS"
12751 LIBS="-l$lib  $LIBS"
12752 cat > conftest.$ac_ext <<EOF
12753 #line 12754 "configure"
12754 #include "confdefs.h"
12755
12756 int main() {
12757 main()
12758 ; return 0; }
12759 EOF
12760 if { (eval echo configure:12761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12761   rm -rf conftest*
12762   eval "ac_cv_lib_$ac_lib_var=yes"
12763 else
12764   echo "configure: failed program was:" >&5
12765   cat conftest.$ac_ext >&5
12766   rm -rf conftest*
12767   eval "ac_cv_lib_$ac_lib_var=no"
12768 fi
12769 rm -f conftest*
12770 LIBS="$ac_save_LIBS"
12771
12772 fi
12773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12774   echo "$ac_t""yes" 1>&6
12775   have_tcl=yes
12776                            if test x"$ol_with_tcl_module" = "xstatic" ; then
12777                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12778                            else
12779                                MOD_TCL_LIB="-l${lib}"
12780                            fi;break
12781 else
12782   echo "$ac_t""no" 1>&6
12783 have_tcl=no
12784 fi
12785
12786                 done
12787         fi
12788
12789         if test $have_tcl != yes ; then
12790                 echo "configure: warning: could not find -ltcl" 1>&2
12791                 if test $ol_enable_tcl = yes ; then
12792                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12793                 fi
12794
12795                 ol_enable_tcl=no
12796         fi
12797 fi
12798
12799 ol_link_termcap=no
12800 for ac_hdr in termcap.h ncurses.h
12801 do
12802 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12803 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12804 echo "configure:12805: checking for $ac_hdr" >&5
12805 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12806   echo $ac_n "(cached) $ac_c" 1>&6
12807 else
12808   cat > conftest.$ac_ext <<EOF
12809 #line 12810 "configure"
12810 #include "confdefs.h"
12811 #include <$ac_hdr>
12812 EOF
12813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12814 { (eval echo configure:12815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12816 if test -z "$ac_err"; then
12817   rm -rf conftest*
12818   eval "ac_cv_header_$ac_safe=yes"
12819 else
12820   echo "$ac_err" >&5
12821   echo "configure: failed program was:" >&5
12822   cat conftest.$ac_ext >&5
12823   rm -rf conftest*
12824   eval "ac_cv_header_$ac_safe=no"
12825 fi
12826 rm -f conftest*
12827 fi
12828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12829   echo "$ac_t""yes" 1>&6
12830     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12831   cat >> confdefs.h <<EOF
12832 #define $ac_tr_hdr 1
12833 EOF
12834  
12835 else
12836   echo "$ac_t""no" 1>&6
12837 fi
12838 done
12839
12840
12841 if test $ol_link_termcap = no ; then
12842         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12843 echo "configure:12844: checking for tputs in -ltermcap" >&5
12844 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12845 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12846   echo $ac_n "(cached) $ac_c" 1>&6
12847 else
12848   ac_save_LIBS="$LIBS"
12849 LIBS="-ltermcap  $LIBS"
12850 cat > conftest.$ac_ext <<EOF
12851 #line 12852 "configure"
12852 #include "confdefs.h"
12853 /* Override any gcc2 internal prototype to avoid an error.  */
12854 /* We use char because int might match the return type of a gcc2
12855     builtin and then its argument prototype would still apply.  */
12856 char tputs();
12857
12858 int main() {
12859 tputs()
12860 ; return 0; }
12861 EOF
12862 if { (eval echo configure:12863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12863   rm -rf conftest*
12864   eval "ac_cv_lib_$ac_lib_var=yes"
12865 else
12866   echo "configure: failed program was:" >&5
12867   cat conftest.$ac_ext >&5
12868   rm -rf conftest*
12869   eval "ac_cv_lib_$ac_lib_var=no"
12870 fi
12871 rm -f conftest*
12872 LIBS="$ac_save_LIBS"
12873
12874 fi
12875 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12876   echo "$ac_t""yes" 1>&6
12877   have_termcap=yes
12878 else
12879   echo "$ac_t""no" 1>&6
12880 have_termcap=no
12881 fi
12882
12883         if test $have_termcap = yes ; then
12884                 cat >> confdefs.h <<\EOF
12885 #define HAVE_TERMCAP 1
12886 EOF
12887
12888                 ol_link_termcap=yes
12889                 TERMCAP_LIBS=-ltermcap
12890         fi
12891 fi
12892
12893 if test $ol_link_termcap = no ; then
12894         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12895 echo "configure:12896: checking for initscr in -lncurses" >&5
12896 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12897 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12898   echo $ac_n "(cached) $ac_c" 1>&6
12899 else
12900   ac_save_LIBS="$LIBS"
12901 LIBS="-lncurses  $LIBS"
12902 cat > conftest.$ac_ext <<EOF
12903 #line 12904 "configure"
12904 #include "confdefs.h"
12905 /* Override any gcc2 internal prototype to avoid an error.  */
12906 /* We use char because int might match the return type of a gcc2
12907     builtin and then its argument prototype would still apply.  */
12908 char initscr();
12909
12910 int main() {
12911 initscr()
12912 ; return 0; }
12913 EOF
12914 if { (eval echo configure:12915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12915   rm -rf conftest*
12916   eval "ac_cv_lib_$ac_lib_var=yes"
12917 else
12918   echo "configure: failed program was:" >&5
12919   cat conftest.$ac_ext >&5
12920   rm -rf conftest*
12921   eval "ac_cv_lib_$ac_lib_var=no"
12922 fi
12923 rm -f conftest*
12924 LIBS="$ac_save_LIBS"
12925
12926 fi
12927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12928   echo "$ac_t""yes" 1>&6
12929   have_ncurses=yes
12930 else
12931   echo "$ac_t""no" 1>&6
12932 have_ncurses=no
12933 fi
12934
12935         if test $have_ncurses = yes ; then
12936                 cat >> confdefs.h <<\EOF
12937 #define HAVE_NCURSES 1
12938 EOF
12939
12940                 ol_link_termcap=yes
12941                 TERMCAP_LIBS=-lncurses
12942         fi
12943 fi
12944
12945 if test $ol_link_termcap = no ; then
12946         cat >> confdefs.h <<\EOF
12947 #define NO_TERMCAP 1
12948 EOF
12949
12950         TERMCAP_LIBS=
12951 fi
12952
12953 ol_link_sasl=no
12954 if test $ol_with_cyrus_sasl != no ; then
12955         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12956 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12957 echo "configure:12958: checking for sasl.h" >&5
12958 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12959   echo $ac_n "(cached) $ac_c" 1>&6
12960 else
12961   cat > conftest.$ac_ext <<EOF
12962 #line 12963 "configure"
12963 #include "confdefs.h"
12964 #include <sasl.h>
12965 EOF
12966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12967 { (eval echo configure:12968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12969 if test -z "$ac_err"; then
12970   rm -rf conftest*
12971   eval "ac_cv_header_$ac_safe=yes"
12972 else
12973   echo "$ac_err" >&5
12974   echo "configure: failed program was:" >&5
12975   cat conftest.$ac_ext >&5
12976   rm -rf conftest*
12977   eval "ac_cv_header_$ac_safe=no"
12978 fi
12979 rm -f conftest*
12980 fi
12981 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12982   echo "$ac_t""yes" 1>&6
12983   :
12984 else
12985   echo "$ac_t""no" 1>&6
12986 fi
12987
12988
12989         if test $ac_cv_header_sasl_h = yes ; then
12990                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12991 echo "configure:12992: checking for sasl_client_init in -lsasl" >&5
12992 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12993 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12994   echo $ac_n "(cached) $ac_c" 1>&6
12995 else
12996   ac_save_LIBS="$LIBS"
12997 LIBS="-lsasl  $LIBS"
12998 cat > conftest.$ac_ext <<EOF
12999 #line 13000 "configure"
13000 #include "confdefs.h"
13001 /* Override any gcc2 internal prototype to avoid an error.  */
13002 /* We use char because int might match the return type of a gcc2
13003     builtin and then its argument prototype would still apply.  */
13004 char sasl_client_init();
13005
13006 int main() {
13007 sasl_client_init()
13008 ; return 0; }
13009 EOF
13010 if { (eval echo configure:13011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13011   rm -rf conftest*
13012   eval "ac_cv_lib_$ac_lib_var=yes"
13013 else
13014   echo "configure: failed program was:" >&5
13015   cat conftest.$ac_ext >&5
13016   rm -rf conftest*
13017   eval "ac_cv_lib_$ac_lib_var=no"
13018 fi
13019 rm -f conftest*
13020 LIBS="$ac_save_LIBS"
13021
13022 fi
13023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13024   echo "$ac_t""yes" 1>&6
13025   have_cyrus_sasl=yes
13026 else
13027   echo "$ac_t""no" 1>&6
13028 have_cyrus_sasl=no
13029 fi
13030
13031
13032                 if test $have_cyrus_sasl != no ; then
13033                         SASL_LIBS="-lsasl"
13034                         cat >> confdefs.h <<\EOF
13035 #define HAVE_CYRUS_SASL 1
13036 EOF
13037
13038                         ol_link_sasl=yes
13039                 fi
13040         fi
13041
13042         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13043                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13044         fi
13045 fi
13046
13047 if test $cross_compiling != yes ; then
13048         dev=no
13049         if test -r /dev/urandom ; then
13050                 dev="/dev/urandom";
13051         elif test -r /idev/urandom ; then
13052                 dev="/idev/urandom";
13053         elif test -r /dev/srandom ; then
13054                 dev="/dev/srandom";
13055         elif test -r /dev/random ; then
13056                 dev="/dev/random";
13057         elif test -r /idev/random ; then
13058                 dev="/idev/random";
13059         fi
13060
13061         if test $dev != no ; then
13062                 cat >> confdefs.h <<EOF
13063 #define URANDOM_DEVICE "$dev"
13064 EOF
13065
13066         fi
13067 fi
13068
13069 ol_link_fetch=no
13070 if test $ol_with_fetch != no ; then
13071         ol=$LIBS
13072 LIBS="-lfetch -lcom_err $LIBS"
13073 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13074 echo "configure:13075: checking fetch(3) library" >&5
13075 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13076   echo $ac_n "(cached) $ac_c" 1>&6
13077 else
13078   
13079         cat > conftest.$ac_ext <<EOF
13080 #line 13081 "configure"
13081 #include "confdefs.h"
13082
13083 #include <sys/param.h>
13084 #include <stdio.h>
13085 #include <fetch.h>
13086 int main() {
13087 struct url *u = fetchParseURL("file:///"); 
13088 ; return 0; }
13089 EOF
13090 if { (eval echo configure:13091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13091   rm -rf conftest*
13092   ol_cv_lib_fetch=yes
13093 else
13094   echo "configure: failed program was:" >&5
13095   cat conftest.$ac_ext >&5
13096   rm -rf conftest*
13097   ol_cv_lib_fetch=no
13098 fi
13099 rm -f conftest*
13100 fi
13101
13102 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13103 LIBS=$ol_LIBS
13104 if test $ol_cv_lib_fetch != no ; then
13105         ol_link_fetch="-lfetch -lcom_err"
13106         cat >> confdefs.h <<\EOF
13107 #define HAVE_FETCH 1
13108 EOF
13109
13110 fi
13111
13112
13113         if test $ol_cv_lib_fetch != no ; then
13114                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13115                 ol_link_fetch=freebsd
13116
13117         elif test $ol_with_fetch != auto ; then
13118                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13119         fi 
13120 fi
13121
13122 ol_link_readline=no
13123 if test $ol_with_readline != no ; then
13124         for ac_hdr in readline/readline.h readline/history.h
13125 do
13126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13128 echo "configure:13129: checking for $ac_hdr" >&5
13129 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13130   echo $ac_n "(cached) $ac_c" 1>&6
13131 else
13132   cat > conftest.$ac_ext <<EOF
13133 #line 13134 "configure"
13134 #include "confdefs.h"
13135 #include <$ac_hdr>
13136 EOF
13137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13138 { (eval echo configure:13139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13140 if test -z "$ac_err"; then
13141   rm -rf conftest*
13142   eval "ac_cv_header_$ac_safe=yes"
13143 else
13144   echo "$ac_err" >&5
13145   echo "configure: failed program was:" >&5
13146   cat conftest.$ac_ext >&5
13147   rm -rf conftest*
13148   eval "ac_cv_header_$ac_safe=no"
13149 fi
13150 rm -f conftest*
13151 fi
13152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13153   echo "$ac_t""yes" 1>&6
13154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13155   cat >> confdefs.h <<EOF
13156 #define $ac_tr_hdr 1
13157 EOF
13158  
13159 else
13160   echo "$ac_t""no" 1>&6
13161 fi
13162 done
13163
13164
13165         if test $ac_cv_header_readline_readline_h = yes ; then
13166                 save_LIBS="$LIBS"
13167                 LIBS="$TERMCAP_LIBS $LIBS"
13168                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13169 echo "configure:13170: checking for readline in -lreadline" >&5
13170 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13171 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13172   echo $ac_n "(cached) $ac_c" 1>&6
13173 else
13174   ac_save_LIBS="$LIBS"
13175 LIBS="-lreadline  $LIBS"
13176 cat > conftest.$ac_ext <<EOF
13177 #line 13178 "configure"
13178 #include "confdefs.h"
13179 /* Override any gcc2 internal prototype to avoid an error.  */
13180 /* We use char because int might match the return type of a gcc2
13181     builtin and then its argument prototype would still apply.  */
13182 char readline();
13183
13184 int main() {
13185 readline()
13186 ; return 0; }
13187 EOF
13188 if { (eval echo configure:13189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13189   rm -rf conftest*
13190   eval "ac_cv_lib_$ac_lib_var=yes"
13191 else
13192   echo "configure: failed program was:" >&5
13193   cat conftest.$ac_ext >&5
13194   rm -rf conftest*
13195   eval "ac_cv_lib_$ac_lib_var=no"
13196 fi
13197 rm -f conftest*
13198 LIBS="$ac_save_LIBS"
13199
13200 fi
13201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13202   echo "$ac_t""yes" 1>&6
13203   have_readline=yes
13204 else
13205   echo "$ac_t""no" 1>&6
13206 have_readline=no
13207 fi
13208
13209                 LIBS="$save_LIBS"
13210                         
13211                 if test $have_readline = yes ; then
13212                         ol_with_readline=found
13213                         ol_link_readline=yes
13214
13215                         READLINE_LIBS="-lreadline"
13216                 fi
13217         fi
13218 fi
13219
13220 if test $ol_link_readline = yes ; then
13221         cat >> confdefs.h <<\EOF
13222 #define HAVE_READLINE 1
13223 EOF
13224
13225 fi
13226
13227
13228 if test $ol_enable_crypt != no ; then
13229         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13230 echo "configure:13231: checking for crypt" >&5
13231 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13232   echo $ac_n "(cached) $ac_c" 1>&6
13233 else
13234   cat > conftest.$ac_ext <<EOF
13235 #line 13236 "configure"
13236 #include "confdefs.h"
13237 /* System header to define __stub macros and hopefully few prototypes,
13238     which can conflict with char crypt(); below.  */
13239 #include <assert.h>
13240 /* Override any gcc2 internal prototype to avoid an error.  */
13241 /* We use char because int might match the return type of a gcc2
13242     builtin and then its argument prototype would still apply.  */
13243 char crypt();
13244 char (*f)();
13245
13246 int main() {
13247
13248 /* The GNU C library defines this for functions which it implements
13249     to always fail with ENOSYS.  Some functions are actually named
13250     something starting with __ and the normal name is an alias.  */
13251 #if defined (__stub_crypt) || defined (__stub___crypt)
13252 choke me
13253 #else
13254 f = crypt;
13255 #endif
13256
13257 ; return 0; }
13258 EOF
13259 if { (eval echo configure:13260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13260   rm -rf conftest*
13261   eval "ac_cv_func_crypt=yes"
13262 else
13263   echo "configure: failed program was:" >&5
13264   cat conftest.$ac_ext >&5
13265   rm -rf conftest*
13266   eval "ac_cv_func_crypt=no"
13267 fi
13268 rm -f conftest*
13269 fi
13270
13271 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13272   echo "$ac_t""yes" 1>&6
13273   have_crypt=yes
13274 else
13275   echo "$ac_t""no" 1>&6
13276
13277                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13278 echo "configure:13279: checking for crypt in -lcrypt" >&5
13279 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13280 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13281   echo $ac_n "(cached) $ac_c" 1>&6
13282 else
13283   ac_save_LIBS="$LIBS"
13284 LIBS="-lcrypt  $LIBS"
13285 cat > conftest.$ac_ext <<EOF
13286 #line 13287 "configure"
13287 #include "confdefs.h"
13288 /* Override any gcc2 internal prototype to avoid an error.  */
13289 /* We use char because int might match the return type of a gcc2
13290     builtin and then its argument prototype would still apply.  */
13291 char crypt();
13292
13293 int main() {
13294 crypt()
13295 ; return 0; }
13296 EOF
13297 if { (eval echo configure:13298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13298   rm -rf conftest*
13299   eval "ac_cv_lib_$ac_lib_var=yes"
13300 else
13301   echo "configure: failed program was:" >&5
13302   cat conftest.$ac_ext >&5
13303   rm -rf conftest*
13304   eval "ac_cv_lib_$ac_lib_var=no"
13305 fi
13306 rm -f conftest*
13307 LIBS="$ac_save_LIBS"
13308
13309 fi
13310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13311   echo "$ac_t""yes" 1>&6
13312   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13313                         have_crypt=yes
13314 else
13315   echo "$ac_t""no" 1>&6
13316 have_crypt=no
13317 fi
13318
13319 fi
13320
13321
13322         if test $have_crypt = yes ; then
13323                 cat >> confdefs.h <<\EOF
13324 #define HAVE_CRYPT 1
13325 EOF
13326
13327         else
13328                 echo "configure: warning: could not find crypt" 1>&2
13329                 if test $ol_enable_crypt = yes ; then
13330                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13331                 fi
13332
13333                 echo "configure: warning: disabling crypt support" 1>&2
13334                 ol_enable_crypt=no
13335         fi
13336 fi
13337
13338 if test $ol_enable_proctitle != no ; then
13339         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13340 echo "configure:13341: checking for setproctitle" >&5
13341 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13342   echo $ac_n "(cached) $ac_c" 1>&6
13343 else
13344   cat > conftest.$ac_ext <<EOF
13345 #line 13346 "configure"
13346 #include "confdefs.h"
13347 /* System header to define __stub macros and hopefully few prototypes,
13348     which can conflict with char setproctitle(); below.  */
13349 #include <assert.h>
13350 /* Override any gcc2 internal prototype to avoid an error.  */
13351 /* We use char because int might match the return type of a gcc2
13352     builtin and then its argument prototype would still apply.  */
13353 char setproctitle();
13354 char (*f)();
13355
13356 int main() {
13357
13358 /* The GNU C library defines this for functions which it implements
13359     to always fail with ENOSYS.  Some functions are actually named
13360     something starting with __ and the normal name is an alias.  */
13361 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13362 choke me
13363 #else
13364 f = setproctitle;
13365 #endif
13366
13367 ; return 0; }
13368 EOF
13369 if { (eval echo configure:13370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13370   rm -rf conftest*
13371   eval "ac_cv_func_setproctitle=yes"
13372 else
13373   echo "configure: failed program was:" >&5
13374   cat conftest.$ac_ext >&5
13375   rm -rf conftest*
13376   eval "ac_cv_func_setproctitle=no"
13377 fi
13378 rm -f conftest*
13379 fi
13380
13381 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13382   echo "$ac_t""yes" 1>&6
13383   have_setproctitle=yes
13384 else
13385   echo "$ac_t""no" 1>&6
13386
13387                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13388 echo "configure:13389: checking for setproctitle in -lutil" >&5
13389 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13391   echo $ac_n "(cached) $ac_c" 1>&6
13392 else
13393   ac_save_LIBS="$LIBS"
13394 LIBS="-lutil  $LIBS"
13395 cat > conftest.$ac_ext <<EOF
13396 #line 13397 "configure"
13397 #include "confdefs.h"
13398 /* Override any gcc2 internal prototype to avoid an error.  */
13399 /* We use char because int might match the return type of a gcc2
13400     builtin and then its argument prototype would still apply.  */
13401 char setproctitle();
13402
13403 int main() {
13404 setproctitle()
13405 ; return 0; }
13406 EOF
13407 if { (eval echo configure:13408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13408   rm -rf conftest*
13409   eval "ac_cv_lib_$ac_lib_var=yes"
13410 else
13411   echo "configure: failed program was:" >&5
13412   cat conftest.$ac_ext >&5
13413   rm -rf conftest*
13414   eval "ac_cv_lib_$ac_lib_var=no"
13415 fi
13416 rm -f conftest*
13417 LIBS="$ac_save_LIBS"
13418
13419 fi
13420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13421   echo "$ac_t""yes" 1>&6
13422   have_setproctitle=yes
13423                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13424 else
13425   echo "$ac_t""no" 1>&6
13426 have_setproctitle=no
13427                         LIBOBJS="$LIBOBJS setproctitle.o"
13428                         LIBSRCS="$LIBSRCS setproctitle.c"
13429 fi
13430
13431 fi
13432
13433
13434         if test $have_setproctitle = yes ; then
13435                 cat >> confdefs.h <<\EOF
13436 #define HAVE_SETPROCTITLE 1
13437 EOF
13438
13439         fi
13440 fi
13441
13442 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13443 echo "configure:13444: checking for ANSI C header files" >&5
13444 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13445   echo $ac_n "(cached) $ac_c" 1>&6
13446 else
13447   cat > conftest.$ac_ext <<EOF
13448 #line 13449 "configure"
13449 #include "confdefs.h"
13450 #include <stdlib.h>
13451 #include <stdarg.h>
13452 #include <string.h>
13453 #include <float.h>
13454 EOF
13455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13456 { (eval echo configure:13457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13458 if test -z "$ac_err"; then
13459   rm -rf conftest*
13460   ac_cv_header_stdc=yes
13461 else
13462   echo "$ac_err" >&5
13463   echo "configure: failed program was:" >&5
13464   cat conftest.$ac_ext >&5
13465   rm -rf conftest*
13466   ac_cv_header_stdc=no
13467 fi
13468 rm -f conftest*
13469
13470 if test $ac_cv_header_stdc = yes; then
13471   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13472 cat > conftest.$ac_ext <<EOF
13473 #line 13474 "configure"
13474 #include "confdefs.h"
13475 #include <string.h>
13476 EOF
13477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13478   egrep "memchr" >/dev/null 2>&1; then
13479   :
13480 else
13481   rm -rf conftest*
13482   ac_cv_header_stdc=no
13483 fi
13484 rm -f conftest*
13485
13486 fi
13487
13488 if test $ac_cv_header_stdc = yes; then
13489   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13490 cat > conftest.$ac_ext <<EOF
13491 #line 13492 "configure"
13492 #include "confdefs.h"
13493 #include <stdlib.h>
13494 EOF
13495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13496   egrep "free" >/dev/null 2>&1; then
13497   :
13498 else
13499   rm -rf conftest*
13500   ac_cv_header_stdc=no
13501 fi
13502 rm -f conftest*
13503
13504 fi
13505
13506 if test $ac_cv_header_stdc = yes; then
13507   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13508 if test "$cross_compiling" = yes; then
13509   :
13510 else
13511   cat > conftest.$ac_ext <<EOF
13512 #line 13513 "configure"
13513 #include "confdefs.h"
13514 #include <ctype.h>
13515 #if ((' ' & 0x0FF) == 0x020)
13516 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13517 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13518 #else
13519 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13520  || ('j' <= (c) && (c) <= 'r') \
13521  || ('s' <= (c) && (c) <= 'z'))
13522 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13523 #endif
13524 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13525 int main () { int i; for (i = 0; i < 256; i++)
13526 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13527 exit (0); }
13528
13529 EOF
13530 if { (eval echo configure:13531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13531 then
13532   :
13533 else
13534   echo "configure: failed program was:" >&5
13535   cat conftest.$ac_ext >&5
13536   rm -fr conftest*
13537   ac_cv_header_stdc=no
13538 fi
13539 rm -fr conftest*
13540 fi
13541
13542 fi
13543 fi
13544
13545 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13546 if test $ac_cv_header_stdc = yes; then
13547   cat >> confdefs.h <<\EOF
13548 #define STDC_HEADERS 1
13549 EOF
13550
13551 fi
13552
13553 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13554 echo "configure:13555: checking for mode_t" >&5
13555 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13556   echo $ac_n "(cached) $ac_c" 1>&6
13557 else
13558   cat > conftest.$ac_ext <<EOF
13559 #line 13560 "configure"
13560 #include "confdefs.h"
13561 #include <sys/types.h>
13562 #if STDC_HEADERS
13563 #include <stdlib.h>
13564 #include <stddef.h>
13565 #endif
13566
13567 EOF
13568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13569   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13570   rm -rf conftest*
13571   eval "ac_cv_type_mode_t=yes"
13572 else
13573   rm -rf conftest*
13574   eval "ac_cv_type_mode_t=no"
13575 fi
13576 rm -f conftest*
13577
13578 fi
13579 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13580   echo "$ac_t""yes" 1>&6
13581 else
13582   echo "$ac_t""no" 1>&6
13583   cat >> confdefs.h <<EOF
13584 #define mode_t int
13585 EOF
13586
13587 fi
13588
13589 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13590 echo "configure:13591: checking for off_t" >&5
13591 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13592   echo $ac_n "(cached) $ac_c" 1>&6
13593 else
13594   cat > conftest.$ac_ext <<EOF
13595 #line 13596 "configure"
13596 #include "confdefs.h"
13597 #include <sys/types.h>
13598 #if STDC_HEADERS
13599 #include <stdlib.h>
13600 #include <stddef.h>
13601 #endif
13602
13603 EOF
13604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13605   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13606   rm -rf conftest*
13607   eval "ac_cv_type_off_t=yes"
13608 else
13609   rm -rf conftest*
13610   eval "ac_cv_type_off_t=no"
13611 fi
13612 rm -f conftest*
13613
13614 fi
13615 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13616   echo "$ac_t""yes" 1>&6
13617 else
13618   echo "$ac_t""no" 1>&6
13619   cat >> confdefs.h <<EOF
13620 #define off_t long
13621 EOF
13622
13623 fi
13624
13625 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13626 echo "configure:13627: checking for pid_t" >&5
13627 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13628   echo $ac_n "(cached) $ac_c" 1>&6
13629 else
13630   cat > conftest.$ac_ext <<EOF
13631 #line 13632 "configure"
13632 #include "confdefs.h"
13633 #include <sys/types.h>
13634 #if STDC_HEADERS
13635 #include <stdlib.h>
13636 #include <stddef.h>
13637 #endif
13638
13639 EOF
13640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13641   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13642   rm -rf conftest*
13643   eval "ac_cv_type_pid_t=yes"
13644 else
13645   rm -rf conftest*
13646   eval "ac_cv_type_pid_t=no"
13647 fi
13648 rm -f conftest*
13649
13650 fi
13651 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13652   echo "$ac_t""yes" 1>&6
13653 else
13654   echo "$ac_t""no" 1>&6
13655   cat >> confdefs.h <<EOF
13656 #define pid_t int
13657 EOF
13658
13659 fi
13660
13661 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13662 echo "configure:13663: checking for ptrdiff_t" >&5
13663 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13664   echo $ac_n "(cached) $ac_c" 1>&6
13665 else
13666   cat > conftest.$ac_ext <<EOF
13667 #line 13668 "configure"
13668 #include "confdefs.h"
13669 #include <stddef.h>
13670 int main() {
13671 ptrdiff_t p
13672 ; return 0; }
13673 EOF
13674 if { (eval echo configure:13675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13675   rm -rf conftest*
13676   am_cv_type_ptrdiff_t=yes
13677 else
13678   echo "configure: failed program was:" >&5
13679   cat conftest.$ac_ext >&5
13680   rm -rf conftest*
13681   am_cv_type_ptrdiff_t=no
13682 fi
13683 rm -f conftest*
13684 fi
13685
13686 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13687    if test $am_cv_type_ptrdiff_t = yes; then
13688      cat >> confdefs.h <<\EOF
13689 #define HAVE_PTRDIFF_T 1
13690 EOF
13691
13692    fi
13693
13694 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13695 echo "configure:13696: checking return type of signal handlers" >&5
13696 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13697   echo $ac_n "(cached) $ac_c" 1>&6
13698 else
13699   cat > conftest.$ac_ext <<EOF
13700 #line 13701 "configure"
13701 #include "confdefs.h"
13702 #include <sys/types.h>
13703 #include <signal.h>
13704 #ifdef signal
13705 #undef signal
13706 #endif
13707 #ifdef __cplusplus
13708 extern "C" void (*signal (int, void (*)(int)))(int);
13709 #else
13710 void (*signal ()) ();
13711 #endif
13712
13713 int main() {
13714 int i;
13715 ; return 0; }
13716 EOF
13717 if { (eval echo configure:13718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13718   rm -rf conftest*
13719   ac_cv_type_signal=void
13720 else
13721   echo "configure: failed program was:" >&5
13722   cat conftest.$ac_ext >&5
13723   rm -rf conftest*
13724   ac_cv_type_signal=int
13725 fi
13726 rm -f conftest*
13727 fi
13728
13729 echo "$ac_t""$ac_cv_type_signal" 1>&6
13730 cat >> confdefs.h <<EOF
13731 #define RETSIGTYPE $ac_cv_type_signal
13732 EOF
13733
13734
13735 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13736 echo "configure:13737: checking for size_t" >&5
13737 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13738   echo $ac_n "(cached) $ac_c" 1>&6
13739 else
13740   cat > conftest.$ac_ext <<EOF
13741 #line 13742 "configure"
13742 #include "confdefs.h"
13743 #include <sys/types.h>
13744 #if STDC_HEADERS
13745 #include <stdlib.h>
13746 #include <stddef.h>
13747 #endif
13748
13749 EOF
13750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13751   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13752   rm -rf conftest*
13753   eval "ac_cv_type_size_t=yes"
13754 else
13755   rm -rf conftest*
13756   eval "ac_cv_type_size_t=no"
13757 fi
13758 rm -f conftest*
13759
13760 fi
13761 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13762   echo "$ac_t""yes" 1>&6
13763 else
13764   echo "$ac_t""no" 1>&6
13765   cat >> confdefs.h <<EOF
13766 #define size_t unsigned
13767 EOF
13768
13769 fi
13770
13771
13772 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13773 echo "configure:13774: checking for ssize_t" >&5
13774 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13775   echo $ac_n "(cached) $ac_c" 1>&6
13776 else
13777   cat > conftest.$ac_ext <<EOF
13778 #line 13779 "configure"
13779 #include "confdefs.h"
13780 #include <sys/types.h>
13781 #if STDC_HEADERS
13782 #include <stdlib.h>
13783 #include <stddef.h>
13784 #endif
13785
13786 EOF
13787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13788   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13789   rm -rf conftest*
13790   eval "ac_cv_type_ssize_t=yes"
13791 else
13792   rm -rf conftest*
13793   eval "ac_cv_type_ssize_t=no"
13794 fi
13795 rm -f conftest*
13796
13797 fi
13798 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13799   echo "$ac_t""yes" 1>&6
13800 else
13801   echo "$ac_t""no" 1>&6
13802   cat >> confdefs.h <<EOF
13803 #define ssize_t signed int
13804 EOF
13805
13806 fi
13807
13808 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13809 echo "configure:13810: checking for caddr_t" >&5
13810 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13811   echo $ac_n "(cached) $ac_c" 1>&6
13812 else
13813   cat > conftest.$ac_ext <<EOF
13814 #line 13815 "configure"
13815 #include "confdefs.h"
13816 #include <sys/types.h>
13817 #if STDC_HEADERS
13818 #include <stdlib.h>
13819 #include <stddef.h>
13820 #endif
13821
13822 EOF
13823 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13824   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13825   rm -rf conftest*
13826   eval "ac_cv_type_caddr_t=yes"
13827 else
13828   rm -rf conftest*
13829   eval "ac_cv_type_caddr_t=no"
13830 fi
13831 rm -f conftest*
13832
13833 fi
13834 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13835   echo "$ac_t""yes" 1>&6
13836 else
13837   echo "$ac_t""no" 1>&6
13838   cat >> confdefs.h <<EOF
13839 #define caddr_t char *
13840 EOF
13841
13842 fi
13843
13844
13845 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13846 echo "configure:13847: checking for socklen_t" >&5
13847 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13848   echo $ac_n "(cached) $ac_c" 1>&6
13849 else
13850   cat > conftest.$ac_ext <<EOF
13851 #line 13852 "configure"
13852 #include "confdefs.h"
13853
13854 #ifdef HAVE_SYS_TYPES_H
13855 #include <sys/types.h>
13856 #endif
13857 #ifdef HAVE_SYS_SOCKET_H
13858 #include <sys/socket.h>
13859 #endif
13860
13861 int main() {
13862 socklen_t len;
13863 ; return 0; }
13864 EOF
13865 if { (eval echo configure:13866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13866   rm -rf conftest*
13867   ol_cv_type_socklen_t=yes
13868 else
13869   echo "configure: failed program was:" >&5
13870   cat conftest.$ac_ext >&5
13871   rm -rf conftest*
13872   ol_cv_type_socklen_t=no
13873 fi
13874 rm -f conftest*
13875 fi
13876
13877 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13878   if test $ol_cv_type_socklen_t = no; then
13879     cat >> confdefs.h <<\EOF
13880 #define socklen_t int
13881 EOF
13882
13883   fi
13884  
13885 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13886 echo "configure:13887: checking for member st_blksize in aggregate type struct stat" >&5
13887 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13888   echo $ac_n "(cached) $ac_c" 1>&6
13889 else
13890   cat > conftest.$ac_ext <<EOF
13891 #line 13892 "configure"
13892 #include "confdefs.h"
13893 #include <sys/types.h>
13894 #include <sys/stat.h>
13895 int main() {
13896 struct stat foo; foo.st_blksize;
13897 ; return 0; }
13898 EOF
13899 if { (eval echo configure:13900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13900   rm -rf conftest*
13901   ac_cv_c_struct_member_st_blksize=yes
13902 else
13903   echo "configure: failed program was:" >&5
13904   cat conftest.$ac_ext >&5
13905   rm -rf conftest*
13906   ac_cv_c_struct_member_st_blksize=no
13907 fi
13908 rm -f conftest*
13909 fi
13910
13911 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13912 st_blksize="$ac_cv_c_struct_member_st_blksize"
13913 if test $ac_cv_c_struct_member_st_blksize = yes; then
13914   cat >> confdefs.h <<\EOF
13915 #define HAVE_ST_BLKSIZE 1
13916 EOF
13917
13918 fi
13919
13920 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13921 echo "configure:13922: checking whether time.h and sys/time.h may both be included" >&5
13922 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13923   echo $ac_n "(cached) $ac_c" 1>&6
13924 else
13925   cat > conftest.$ac_ext <<EOF
13926 #line 13927 "configure"
13927 #include "confdefs.h"
13928 #include <sys/types.h>
13929 #include <sys/time.h>
13930 #include <time.h>
13931 int main() {
13932 struct tm *tp;
13933 ; return 0; }
13934 EOF
13935 if { (eval echo configure:13936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13936   rm -rf conftest*
13937   ac_cv_header_time=yes
13938 else
13939   echo "configure: failed program was:" >&5
13940   cat conftest.$ac_ext >&5
13941   rm -rf conftest*
13942   ac_cv_header_time=no
13943 fi
13944 rm -f conftest*
13945 fi
13946
13947 echo "$ac_t""$ac_cv_header_time" 1>&6
13948 if test $ac_cv_header_time = yes; then
13949   cat >> confdefs.h <<\EOF
13950 #define TIME_WITH_SYS_TIME 1
13951 EOF
13952
13953 fi
13954
13955 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13956 echo "configure:13957: checking whether struct tm is in sys/time.h or time.h" >&5
13957 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13958   echo $ac_n "(cached) $ac_c" 1>&6
13959 else
13960   cat > conftest.$ac_ext <<EOF
13961 #line 13962 "configure"
13962 #include "confdefs.h"
13963 #include <sys/types.h>
13964 #include <time.h>
13965 int main() {
13966 struct tm *tp; tp->tm_sec;
13967 ; return 0; }
13968 EOF
13969 if { (eval echo configure:13970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13970   rm -rf conftest*
13971   ac_cv_struct_tm=time.h
13972 else
13973   echo "configure: failed program was:" >&5
13974   cat conftest.$ac_ext >&5
13975   rm -rf conftest*
13976   ac_cv_struct_tm=sys/time.h
13977 fi
13978 rm -f conftest*
13979 fi
13980
13981 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13982 if test $ac_cv_struct_tm = sys/time.h; then
13983   cat >> confdefs.h <<\EOF
13984 #define TM_IN_SYS_TIME 1
13985 EOF
13986
13987 fi
13988
13989 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13990 echo "configure:13991: checking for uid_t in sys/types.h" >&5
13991 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13992   echo $ac_n "(cached) $ac_c" 1>&6
13993 else
13994   cat > conftest.$ac_ext <<EOF
13995 #line 13996 "configure"
13996 #include "confdefs.h"
13997 #include <sys/types.h>
13998 EOF
13999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14000   egrep "uid_t" >/dev/null 2>&1; then
14001   rm -rf conftest*
14002   ac_cv_type_uid_t=yes
14003 else
14004   rm -rf conftest*
14005   ac_cv_type_uid_t=no
14006 fi
14007 rm -f conftest*
14008
14009 fi
14010
14011 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14012 if test $ac_cv_type_uid_t = no; then
14013   cat >> confdefs.h <<\EOF
14014 #define uid_t int
14015 EOF
14016
14017   cat >> confdefs.h <<\EOF
14018 #define gid_t int
14019 EOF
14020
14021 fi
14022
14023 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14024 echo "configure:14025: checking for sig_atomic_t" >&5
14025 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14026   echo $ac_n "(cached) $ac_c" 1>&6
14027 else
14028   cat > conftest.$ac_ext <<EOF
14029 #line 14030 "configure"
14030 #include "confdefs.h"
14031 #include <signal.h>
14032 int main() {
14033 sig_atomic_t atomic;
14034 ; return 0; }
14035 EOF
14036 if { (eval echo configure:14037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14037   rm -rf conftest*
14038   ol_cv_type_sig_atomic_t=yes
14039 else
14040   echo "configure: failed program was:" >&5
14041   cat conftest.$ac_ext >&5
14042   rm -rf conftest*
14043   ol_cv_type_sig_atomic_t=no
14044 fi
14045 rm -f conftest*
14046 fi
14047
14048 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14049   if test $ol_cv_type_sig_atomic_t = no; then
14050     cat >> confdefs.h <<\EOF
14051 #define sig_atomic_t int
14052 EOF
14053
14054   fi
14055  
14056
14057
14058 # test for pw_gecos in struct passwd
14059 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14060 echo "configure:14061: checking struct passwd for pw_gecos" >&5
14061 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14062   echo $ac_n "(cached) $ac_c" 1>&6
14063 else
14064   
14065         cat > conftest.$ac_ext <<EOF
14066 #line 14067 "configure"
14067 #include "confdefs.h"
14068 #include <pwd.h>
14069 int main() {
14070
14071         struct passwd pwd;
14072         pwd.pw_gecos = pwd.pw_name;
14073
14074 ; return 0; }
14075 EOF
14076 if { (eval echo configure:14077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14077   rm -rf conftest*
14078   ol_cv_struct_passwd_pw_gecos=yes
14079 else
14080   echo "configure: failed program was:" >&5
14081   cat conftest.$ac_ext >&5
14082   rm -rf conftest*
14083   ol_cv_struct_passwd_pw_gecos=no
14084 fi
14085 rm -f conftest*
14086 fi
14087
14088 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14089 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14090         cat >> confdefs.h <<\EOF
14091 #define HAVE_PW_GECOS 1
14092 EOF
14093
14094 fi
14095
14096 # test for pw_passwd in struct passwd
14097 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14098 echo "configure:14099: checking struct passwd for pw_passwd" >&5
14099 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14100   echo $ac_n "(cached) $ac_c" 1>&6
14101 else
14102   
14103         cat > conftest.$ac_ext <<EOF
14104 #line 14105 "configure"
14105 #include "confdefs.h"
14106 #include <pwd.h>
14107 int main() {
14108
14109         struct passwd pwd;
14110         pwd.pw_passwd = pwd.pw_name;
14111
14112 ; return 0; }
14113 EOF
14114 if { (eval echo configure:14115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14115   rm -rf conftest*
14116   ol_cv_struct_passwd_pw_passwd=yes
14117 else
14118   echo "configure: failed program was:" >&5
14119   cat conftest.$ac_ext >&5
14120   rm -rf conftest*
14121   ol_cv_struct_passwd_pw_passwd=no
14122 fi
14123 rm -f conftest*
14124 fi
14125
14126 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14127 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14128         cat >> confdefs.h <<\EOF
14129 #define HAVE_PW_PASSWD 1
14130 EOF
14131
14132 fi
14133
14134
14135 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14136 echo "configure:14137: checking if toupper() requires islower()" >&5
14137 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14138   echo $ac_n "(cached) $ac_c" 1>&6
14139 else
14140   
14141         if test "$cross_compiling" = yes; then
14142   ol_cv_c_upper_lower=safe
14143 else
14144   cat > conftest.$ac_ext <<EOF
14145 #line 14146 "configure"
14146 #include "confdefs.h"
14147
14148 #include <ctype.h>
14149 main()
14150 {
14151         if ('C' == toupper('C'))
14152                 exit(0);
14153         else
14154                 exit(1);
14155 }
14156 EOF
14157 if { (eval echo configure:14158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14158 then
14159   ol_cv_c_upper_lower=no
14160 else
14161   echo "configure: failed program was:" >&5
14162   cat conftest.$ac_ext >&5
14163   rm -fr conftest*
14164   ol_cv_c_upper_lower=yes
14165 fi
14166 rm -fr conftest*
14167 fi
14168
14169 fi
14170
14171 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14172 if test $ol_cv_c_upper_lower != no ; then
14173         cat >> confdefs.h <<\EOF
14174 #define C_UPPER_LOWER 1
14175 EOF
14176
14177 fi
14178
14179 echo $ac_n "checking for working const""... $ac_c" 1>&6
14180 echo "configure:14181: checking for working const" >&5
14181 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14182   echo $ac_n "(cached) $ac_c" 1>&6
14183 else
14184   cat > conftest.$ac_ext <<EOF
14185 #line 14186 "configure"
14186 #include "confdefs.h"
14187
14188 int main() {
14189
14190 /* Ultrix mips cc rejects this.  */
14191 typedef int charset[2]; const charset x;
14192 /* SunOS 4.1.1 cc rejects this.  */
14193 char const *const *ccp;
14194 char **p;
14195 /* NEC SVR4.0.2 mips cc rejects this.  */
14196 struct point {int x, y;};
14197 static struct point const zero = {0,0};
14198 /* AIX XL C 1.02.0.0 rejects this.
14199    It does not let you subtract one const X* pointer from another in an arm
14200    of an if-expression whose if-part is not a constant expression */
14201 const char *g = "string";
14202 ccp = &g + (g ? g-g : 0);
14203 /* HPUX 7.0 cc rejects these. */
14204 ++ccp;
14205 p = (char**) ccp;
14206 ccp = (char const *const *) p;
14207 { /* SCO 3.2v4 cc rejects this.  */
14208   char *t;
14209   char const *s = 0 ? (char *) 0 : (char const *) 0;
14210
14211   *t++ = 0;
14212 }
14213 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14214   int x[] = {25, 17};
14215   const int *foo = &x[0];
14216   ++foo;
14217 }
14218 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14219   typedef const int *iptr;
14220   iptr p = 0;
14221   ++p;
14222 }
14223 { /* AIX XL C 1.02.0.0 rejects this saying
14224      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14225   struct s { int j; const int *ap[3]; };
14226   struct s *b; b->j = 5;
14227 }
14228 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14229   const int foo = 10;
14230 }
14231
14232 ; return 0; }
14233 EOF
14234 if { (eval echo configure:14235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14235   rm -rf conftest*
14236   ac_cv_c_const=yes
14237 else
14238   echo "configure: failed program was:" >&5
14239   cat conftest.$ac_ext >&5
14240   rm -rf conftest*
14241   ac_cv_c_const=no
14242 fi
14243 rm -f conftest*
14244 fi
14245
14246 echo "$ac_t""$ac_cv_c_const" 1>&6
14247 if test $ac_cv_c_const = no; then
14248   cat >> confdefs.h <<\EOF
14249 #define const 
14250 EOF
14251
14252 fi
14253
14254 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14255 echo "configure:14256: checking if compiler understands volatile" >&5
14256 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14257   echo $ac_n "(cached) $ac_c" 1>&6
14258 else
14259   cat > conftest.$ac_ext <<EOF
14260 #line 14261 "configure"
14261 #include "confdefs.h"
14262 int x, y, z;
14263 int main() {
14264 volatile int a; int * volatile b = x ? &y : &z;
14265       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14266       *b = 0;
14267 ; return 0; }
14268 EOF
14269 if { (eval echo configure:14270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14270   rm -rf conftest*
14271   ol_cv_c_volatile=yes
14272 else
14273   echo "configure: failed program was:" >&5
14274   cat conftest.$ac_ext >&5
14275   rm -rf conftest*
14276   ol_cv_c_volatile=no
14277 fi
14278 rm -f conftest*
14279 fi
14280
14281 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14282   if test $ol_cv_c_volatile = yes; then
14283     : 
14284   else
14285     cat >> confdefs.h <<\EOF
14286 #define volatile 
14287 EOF
14288
14289   fi
14290  
14291
14292 if test $cross_compiling = yes ; then
14293         cat >> confdefs.h <<\EOF
14294 #define CROSS_COMPILING 1
14295 EOF
14296
14297 else
14298         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14299 echo "configure:14300: checking whether byte ordering is bigendian" >&5
14300 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14301   echo $ac_n "(cached) $ac_c" 1>&6
14302 else
14303   ac_cv_c_bigendian=unknown
14304 # See if sys/param.h defines the BYTE_ORDER macro.
14305 cat > conftest.$ac_ext <<EOF
14306 #line 14307 "configure"
14307 #include "confdefs.h"
14308 #include <sys/types.h>
14309 #include <sys/param.h>
14310 int main() {
14311
14312 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14313  bogus endian macros
14314 #endif
14315 ; return 0; }
14316 EOF
14317 if { (eval echo configure:14318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14318   rm -rf conftest*
14319   # It does; now see whether it defined to BIG_ENDIAN or not.
14320 cat > conftest.$ac_ext <<EOF
14321 #line 14322 "configure"
14322 #include "confdefs.h"
14323 #include <sys/types.h>
14324 #include <sys/param.h>
14325 int main() {
14326
14327 #if BYTE_ORDER != BIG_ENDIAN
14328  not big endian
14329 #endif
14330 ; return 0; }
14331 EOF
14332 if { (eval echo configure:14333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14333   rm -rf conftest*
14334   ac_cv_c_bigendian=yes
14335 else
14336   echo "configure: failed program was:" >&5
14337   cat conftest.$ac_ext >&5
14338   rm -rf conftest*
14339   ac_cv_c_bigendian=no
14340 fi
14341 rm -f conftest*
14342 else
14343   echo "configure: failed program was:" >&5
14344   cat conftest.$ac_ext >&5
14345 fi
14346 rm -f conftest*
14347 if test $ac_cv_c_bigendian = unknown; then
14348 if test "$cross_compiling" = yes; then
14349     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14350 else
14351   cat > conftest.$ac_ext <<EOF
14352 #line 14353 "configure"
14353 #include "confdefs.h"
14354 main () {
14355   /* Are we little or big endian?  From Harbison&Steele.  */
14356   union
14357   {
14358     long l;
14359     char c[sizeof (long)];
14360   } u;
14361   u.l = 1;
14362   exit (u.c[sizeof (long) - 1] == 1);
14363 }
14364 EOF
14365 if { (eval echo configure:14366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14366 then
14367   ac_cv_c_bigendian=no
14368 else
14369   echo "configure: failed program was:" >&5
14370   cat conftest.$ac_ext >&5
14371   rm -fr conftest*
14372   ac_cv_c_bigendian=yes
14373 fi
14374 rm -fr conftest*
14375 fi
14376
14377 fi
14378 fi
14379
14380 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14381 if test $ac_cv_c_bigendian = yes; then
14382   cat >> confdefs.h <<\EOF
14383 #define WORDS_BIGENDIAN 1
14384 EOF
14385
14386 fi
14387
14388 fi
14389
14390 echo $ac_n "checking size of short""... $ac_c" 1>&6
14391 echo "configure:14392: checking size of short" >&5 
14392 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14393   echo $ac_n "(cached) $ac_c" 1>&6
14394 else
14395   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14396   cat > conftest.$ac_ext <<EOF
14397 #line 14398 "configure"
14398 #include "confdefs.h"
14399 #include "confdefs.h" 
14400 #include <sys/types.h> 
14401  
14402
14403 int main() {
14404 switch (0) case 0: case (sizeof (short) == $ac_size):;
14405 ; return 0; }
14406 EOF
14407 if { (eval echo configure:14408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14408   rm -rf conftest*
14409   ac_cv_sizeof_short=$ac_size
14410 else
14411   echo "configure: failed program was:" >&5
14412   cat conftest.$ac_ext >&5
14413 fi
14414 rm -f conftest* 
14415   if test x$ac_cv_sizeof_short != x ; then break; fi 
14416 done 
14417
14418 fi
14419  
14420 if test x$ac_cv_sizeof_short = x ; then 
14421   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14422 fi 
14423 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14424 cat >> confdefs.h <<EOF
14425 #define SIZEOF_SHORT $ac_cv_sizeof_short
14426 EOF
14427  
14428  
14429 echo $ac_n "checking size of int""... $ac_c" 1>&6
14430 echo "configure:14431: checking size of int" >&5 
14431 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14432   echo $ac_n "(cached) $ac_c" 1>&6
14433 else
14434   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14435   cat > conftest.$ac_ext <<EOF
14436 #line 14437 "configure"
14437 #include "confdefs.h"
14438 #include "confdefs.h" 
14439 #include <sys/types.h> 
14440  
14441
14442 int main() {
14443 switch (0) case 0: case (sizeof (int) == $ac_size):;
14444 ; return 0; }
14445 EOF
14446 if { (eval echo configure:14447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14447   rm -rf conftest*
14448   ac_cv_sizeof_int=$ac_size
14449 else
14450   echo "configure: failed program was:" >&5
14451   cat conftest.$ac_ext >&5
14452 fi
14453 rm -f conftest* 
14454   if test x$ac_cv_sizeof_int != x ; then break; fi 
14455 done 
14456
14457 fi
14458  
14459 if test x$ac_cv_sizeof_int = x ; then 
14460   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14461 fi 
14462 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14463 cat >> confdefs.h <<EOF
14464 #define SIZEOF_INT $ac_cv_sizeof_int
14465 EOF
14466  
14467  
14468 echo $ac_n "checking size of long""... $ac_c" 1>&6
14469 echo "configure:14470: checking size of long" >&5 
14470 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14471   echo $ac_n "(cached) $ac_c" 1>&6
14472 else
14473   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14474   cat > conftest.$ac_ext <<EOF
14475 #line 14476 "configure"
14476 #include "confdefs.h"
14477 #include "confdefs.h" 
14478 #include <sys/types.h> 
14479  
14480
14481 int main() {
14482 switch (0) case 0: case (sizeof (long) == $ac_size):;
14483 ; return 0; }
14484 EOF
14485 if { (eval echo configure:14486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14486   rm -rf conftest*
14487   ac_cv_sizeof_long=$ac_size
14488 else
14489   echo "configure: failed program was:" >&5
14490   cat conftest.$ac_ext >&5
14491 fi
14492 rm -f conftest* 
14493   if test x$ac_cv_sizeof_long != x ; then break; fi 
14494 done 
14495
14496 fi
14497  
14498 if test x$ac_cv_sizeof_long = x ; then 
14499   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14500 fi 
14501 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14502 cat >> confdefs.h <<EOF
14503 #define SIZEOF_LONG $ac_cv_sizeof_long
14504 EOF
14505  
14506
14507
14508 if test "$ac_cv_sizeof_int" -lt 4 ; then
14509         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14510
14511         cat >> confdefs.h <<\EOF
14512 #define LBER_INT_T long
14513 EOF
14514
14515 else
14516         cat >> confdefs.h <<\EOF
14517 #define LBER_INT_T int
14518 EOF
14519
14520 fi
14521
14522 cat >> confdefs.h <<\EOF
14523 #define LBER_LEN_T long
14524 EOF
14525
14526 cat >> confdefs.h <<\EOF
14527 #define LBER_SOCKET_T int
14528 EOF
14529
14530 cat >> confdefs.h <<\EOF
14531 #define LBER_TAG_T long
14532 EOF
14533
14534
14535 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14536 echo "configure:14537: checking for 8-bit clean memcmp" >&5
14537 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14538   echo $ac_n "(cached) $ac_c" 1>&6
14539 else
14540   if test "$cross_compiling" = yes; then
14541   ac_cv_func_memcmp_clean=no
14542 else
14543   cat > conftest.$ac_ext <<EOF
14544 #line 14545 "configure"
14545 #include "confdefs.h"
14546
14547 main()
14548 {
14549   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14550   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14551 }
14552
14553 EOF
14554 if { (eval echo configure:14555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14555 then
14556   ac_cv_func_memcmp_clean=yes
14557 else
14558   echo "configure: failed program was:" >&5
14559   cat conftest.$ac_ext >&5
14560   rm -fr conftest*
14561   ac_cv_func_memcmp_clean=no
14562 fi
14563 rm -fr conftest*
14564 fi
14565
14566 fi
14567
14568 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14569 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14570
14571 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14572 echo "configure:14573: checking for strftime" >&5
14573 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14574   echo $ac_n "(cached) $ac_c" 1>&6
14575 else
14576   cat > conftest.$ac_ext <<EOF
14577 #line 14578 "configure"
14578 #include "confdefs.h"
14579 /* System header to define __stub macros and hopefully few prototypes,
14580     which can conflict with char strftime(); below.  */
14581 #include <assert.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 char (*f)();
14587
14588 int main() {
14589
14590 /* The GNU C library defines this for functions which it implements
14591     to always fail with ENOSYS.  Some functions are actually named
14592     something starting with __ and the normal name is an alias.  */
14593 #if defined (__stub_strftime) || defined (__stub___strftime)
14594 choke me
14595 #else
14596 f = strftime;
14597 #endif
14598
14599 ; return 0; }
14600 EOF
14601 if { (eval echo configure:14602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14602   rm -rf conftest*
14603   eval "ac_cv_func_strftime=yes"
14604 else
14605   echo "configure: failed program was:" >&5
14606   cat conftest.$ac_ext >&5
14607   rm -rf conftest*
14608   eval "ac_cv_func_strftime=no"
14609 fi
14610 rm -f conftest*
14611 fi
14612
14613 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14614   echo "$ac_t""yes" 1>&6
14615   cat >> confdefs.h <<\EOF
14616 #define HAVE_STRFTIME 1
14617 EOF
14618
14619 else
14620   echo "$ac_t""no" 1>&6
14621 # strftime is in -lintl on SCO UNIX.
14622 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14623 echo "configure:14624: checking for strftime in -lintl" >&5
14624 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14625 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14626   echo $ac_n "(cached) $ac_c" 1>&6
14627 else
14628   ac_save_LIBS="$LIBS"
14629 LIBS="-lintl  $LIBS"
14630 cat > conftest.$ac_ext <<EOF
14631 #line 14632 "configure"
14632 #include "confdefs.h"
14633 /* Override any gcc2 internal prototype to avoid an error.  */
14634 /* We use char because int might match the return type of a gcc2
14635     builtin and then its argument prototype would still apply.  */
14636 char strftime();
14637
14638 int main() {
14639 strftime()
14640 ; return 0; }
14641 EOF
14642 if { (eval echo configure:14643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14643   rm -rf conftest*
14644   eval "ac_cv_lib_$ac_lib_var=yes"
14645 else
14646   echo "configure: failed program was:" >&5
14647   cat conftest.$ac_ext >&5
14648   rm -rf conftest*
14649   eval "ac_cv_lib_$ac_lib_var=no"
14650 fi
14651 rm -f conftest*
14652 LIBS="$ac_save_LIBS"
14653
14654 fi
14655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14656   echo "$ac_t""yes" 1>&6
14657   cat >> confdefs.h <<\EOF
14658 #define HAVE_STRFTIME 1
14659 EOF
14660
14661 LIBS="-lintl $LIBS"
14662 else
14663   echo "$ac_t""no" 1>&6
14664 fi
14665
14666 fi
14667
14668
14669 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14670 echo "configure:14671: checking for inet_aton()" >&5
14671 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14672   echo $ac_n "(cached) $ac_c" 1>&6
14673 else
14674   cat > conftest.$ac_ext <<EOF
14675 #line 14676 "configure"
14676 #include "confdefs.h"
14677
14678 #ifdef HAVE_SYS_TYPES_H
14679 #       include <sys/types.h>
14680 #endif
14681 #ifdef HAVE_SYS_SOCKET_H
14682 #       include <sys/socket.h>
14683 #       ifdef HAVE_SYS_SELECT_H
14684 #               include <sys/select.h>
14685 #       endif
14686 #       include <netinet/in.h>
14687 #       ifdef HAVE_ARPA_INET_H
14688 #               include <arpa/inet.h>
14689 #       endif
14690 #endif
14691
14692 int main() {
14693 struct in_addr in;
14694 int rc = inet_aton( "255.255.255.255", &in );
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   ol_cv_func_inet_aton=yes
14700 else
14701   echo "configure: failed program was:" >&5
14702   cat conftest.$ac_ext >&5
14703   rm -rf conftest*
14704   ol_cv_func_inet_aton=no
14705 fi
14706 rm -f conftest*
14707 fi
14708
14709 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14710   if test $ol_cv_func_inet_aton != no; then
14711     cat >> confdefs.h <<\EOF
14712 #define HAVE_INET_ATON 1
14713 EOF
14714
14715   fi
14716  
14717
14718 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14719 echo "configure:14720: checking for _spawnlp" >&5
14720 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14721   echo $ac_n "(cached) $ac_c" 1>&6
14722 else
14723   cat > conftest.$ac_ext <<EOF
14724 #line 14725 "configure"
14725 #include "confdefs.h"
14726 /* System header to define __stub macros and hopefully few prototypes,
14727     which can conflict with char _spawnlp(); below.  */
14728 #include <assert.h>
14729 /* Override any gcc2 internal prototype to avoid an error.  */
14730 /* We use char because int might match the return type of a gcc2
14731     builtin and then its argument prototype would still apply.  */
14732 char _spawnlp();
14733 char (*f)();
14734
14735 int main() {
14736
14737 /* The GNU C library defines this for functions which it implements
14738     to always fail with ENOSYS.  Some functions are actually named
14739     something starting with __ and the normal name is an alias.  */
14740 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14741 choke me
14742 #else
14743 f = _spawnlp;
14744 #endif
14745
14746 ; return 0; }
14747 EOF
14748 if { (eval echo configure:14749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14749   rm -rf conftest*
14750   eval "ac_cv_func__spawnlp=yes"
14751 else
14752   echo "configure: failed program was:" >&5
14753   cat conftest.$ac_ext >&5
14754   rm -rf conftest*
14755   eval "ac_cv_func__spawnlp=no"
14756 fi
14757 rm -f conftest*
14758 fi
14759
14760 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14761   echo "$ac_t""yes" 1>&6
14762   cat >> confdefs.h <<\EOF
14763 #define HAVE_SPAWNLP 1
14764 EOF
14765
14766 else
14767   echo "$ac_t""no" 1>&6
14768 fi
14769
14770
14771 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14772 echo "configure:14773: checking for _snprintf" >&5
14773 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14774   echo $ac_n "(cached) $ac_c" 1>&6
14775 else
14776   cat > conftest.$ac_ext <<EOF
14777 #line 14778 "configure"
14778 #include "confdefs.h"
14779 /* System header to define __stub macros and hopefully few prototypes,
14780     which can conflict with char _snprintf(); below.  */
14781 #include <assert.h>
14782 /* Override any gcc2 internal prototype to avoid an error.  */
14783 /* We use char because int might match the return type of a gcc2
14784     builtin and then its argument prototype would still apply.  */
14785 char _snprintf();
14786 char (*f)();
14787
14788 int main() {
14789
14790 /* The GNU C library defines this for functions which it implements
14791     to always fail with ENOSYS.  Some functions are actually named
14792     something starting with __ and the normal name is an alias.  */
14793 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14794 choke me
14795 #else
14796 f = _snprintf;
14797 #endif
14798
14799 ; return 0; }
14800 EOF
14801 if { (eval echo configure:14802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14802   rm -rf conftest*
14803   eval "ac_cv_func__snprintf=yes"
14804 else
14805   echo "configure: failed program was:" >&5
14806   cat conftest.$ac_ext >&5
14807   rm -rf conftest*
14808   eval "ac_cv_func__snprintf=no"
14809 fi
14810 rm -f conftest*
14811 fi
14812
14813 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14814   echo "$ac_t""yes" 1>&6
14815   ac_cv_func_snprintf=yes
14816         cat >> confdefs.h <<\EOF
14817 #define snprintf _snprintf
14818 EOF
14819
14820
14821 else
14822   echo "$ac_t""no" 1>&6
14823 fi
14824
14825
14826 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14827 echo "configure:14828: checking for _vsnprintf" >&5
14828 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14829   echo $ac_n "(cached) $ac_c" 1>&6
14830 else
14831   cat > conftest.$ac_ext <<EOF
14832 #line 14833 "configure"
14833 #include "confdefs.h"
14834 /* System header to define __stub macros and hopefully few prototypes,
14835     which can conflict with char _vsnprintf(); below.  */
14836 #include <assert.h>
14837 /* Override any gcc2 internal prototype to avoid an error.  */
14838 /* We use char because int might match the return type of a gcc2
14839     builtin and then its argument prototype would still apply.  */
14840 char _vsnprintf();
14841 char (*f)();
14842
14843 int main() {
14844
14845 /* The GNU C library defines this for functions which it implements
14846     to always fail with ENOSYS.  Some functions are actually named
14847     something starting with __ and the normal name is an alias.  */
14848 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14849 choke me
14850 #else
14851 f = _vsnprintf;
14852 #endif
14853
14854 ; return 0; }
14855 EOF
14856 if { (eval echo configure:14857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14857   rm -rf conftest*
14858   eval "ac_cv_func__vsnprintf=yes"
14859 else
14860   echo "configure: failed program was:" >&5
14861   cat conftest.$ac_ext >&5
14862   rm -rf conftest*
14863   eval "ac_cv_func__vsnprintf=no"
14864 fi
14865 rm -f conftest*
14866 fi
14867
14868 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14869   echo "$ac_t""yes" 1>&6
14870   ac_cv_func_vsnprintf=yes
14871         cat >> confdefs.h <<\EOF
14872 #define vsnprintf _vsnprintf
14873 EOF
14874
14875
14876 else
14877   echo "$ac_t""no" 1>&6
14878 fi
14879
14880
14881 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14882 echo "configure:14883: checking for vprintf" >&5
14883 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14884   echo $ac_n "(cached) $ac_c" 1>&6
14885 else
14886   cat > conftest.$ac_ext <<EOF
14887 #line 14888 "configure"
14888 #include "confdefs.h"
14889 /* System header to define __stub macros and hopefully few prototypes,
14890     which can conflict with char vprintf(); below.  */
14891 #include <assert.h>
14892 /* Override any gcc2 internal prototype to avoid an error.  */
14893 /* We use char because int might match the return type of a gcc2
14894     builtin and then its argument prototype would still apply.  */
14895 char vprintf();
14896 char (*f)();
14897
14898 int main() {
14899
14900 /* The GNU C library defines this for functions which it implements
14901     to always fail with ENOSYS.  Some functions are actually named
14902     something starting with __ and the normal name is an alias.  */
14903 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14904 choke me
14905 #else
14906 f = vprintf;
14907 #endif
14908
14909 ; return 0; }
14910 EOF
14911 if { (eval echo configure:14912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14912   rm -rf conftest*
14913   eval "ac_cv_func_vprintf=yes"
14914 else
14915   echo "configure: failed program was:" >&5
14916   cat conftest.$ac_ext >&5
14917   rm -rf conftest*
14918   eval "ac_cv_func_vprintf=no"
14919 fi
14920 rm -f conftest*
14921 fi
14922
14923 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14924   echo "$ac_t""yes" 1>&6
14925   cat >> confdefs.h <<\EOF
14926 #define HAVE_VPRINTF 1
14927 EOF
14928
14929 else
14930   echo "$ac_t""no" 1>&6
14931 fi
14932
14933 if test "$ac_cv_func_vprintf" != yes; then
14934 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14935 echo "configure:14936: checking for _doprnt" >&5
14936 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14937   echo $ac_n "(cached) $ac_c" 1>&6
14938 else
14939   cat > conftest.$ac_ext <<EOF
14940 #line 14941 "configure"
14941 #include "confdefs.h"
14942 /* System header to define __stub macros and hopefully few prototypes,
14943     which can conflict with char _doprnt(); below.  */
14944 #include <assert.h>
14945 /* Override any gcc2 internal prototype to avoid an error.  */
14946 /* We use char because int might match the return type of a gcc2
14947     builtin and then its argument prototype would still apply.  */
14948 char _doprnt();
14949 char (*f)();
14950
14951 int main() {
14952
14953 /* The GNU C library defines this for functions which it implements
14954     to always fail with ENOSYS.  Some functions are actually named
14955     something starting with __ and the normal name is an alias.  */
14956 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14957 choke me
14958 #else
14959 f = _doprnt;
14960 #endif
14961
14962 ; return 0; }
14963 EOF
14964 if { (eval echo configure:14965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14965   rm -rf conftest*
14966   eval "ac_cv_func__doprnt=yes"
14967 else
14968   echo "configure: failed program was:" >&5
14969   cat conftest.$ac_ext >&5
14970   rm -rf conftest*
14971   eval "ac_cv_func__doprnt=no"
14972 fi
14973 rm -f conftest*
14974 fi
14975
14976 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14977   echo "$ac_t""yes" 1>&6
14978   cat >> confdefs.h <<\EOF
14979 #define HAVE_DOPRNT 1
14980 EOF
14981
14982 else
14983   echo "$ac_t""no" 1>&6
14984 fi
14985
14986 fi
14987
14988
14989 if test $ac_cv_func_vprintf = yes ; then
14990                 for ac_func in vsnprintf vsprintf
14991 do
14992 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14993 echo "configure:14994: checking for $ac_func" >&5
14994 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14995   echo $ac_n "(cached) $ac_c" 1>&6
14996 else
14997   cat > conftest.$ac_ext <<EOF
14998 #line 14999 "configure"
14999 #include "confdefs.h"
15000 /* System header to define __stub macros and hopefully few prototypes,
15001     which can conflict with char $ac_func(); below.  */
15002 #include <assert.h>
15003 /* Override any gcc2 internal prototype to avoid an error.  */
15004 /* We use char because int might match the return type of a gcc2
15005     builtin and then its argument prototype would still apply.  */
15006 char $ac_func();
15007 char (*f)();
15008
15009 int main() {
15010
15011 /* The GNU C library defines this for functions which it implements
15012     to always fail with ENOSYS.  Some functions are actually named
15013     something starting with __ and the normal name is an alias.  */
15014 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15015 choke me
15016 #else
15017 f = $ac_func;
15018 #endif
15019
15020 ; return 0; }
15021 EOF
15022 if { (eval echo configure:15023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15023   rm -rf conftest*
15024   eval "ac_cv_func_$ac_func=yes"
15025 else
15026   echo "configure: failed program was:" >&5
15027   cat conftest.$ac_ext >&5
15028   rm -rf conftest*
15029   eval "ac_cv_func_$ac_func=no"
15030 fi
15031 rm -f conftest*
15032 fi
15033
15034 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15035   echo "$ac_t""yes" 1>&6
15036     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15037   cat >> confdefs.h <<EOF
15038 #define $ac_tr_func 1
15039 EOF
15040  
15041 else
15042   echo "$ac_t""no" 1>&6
15043 fi
15044 done
15045
15046 fi
15047
15048 for ac_func in \
15049         bcopy                   \
15050         closesocket             \
15051         endgrent                \
15052         endpwent                \
15053         flock                   \
15054         getdtablesize   \
15055         getgrgid                \
15056         gethostname             \
15057         getpass                 \
15058         getpwuid                \
15059         getpwnam                \
15060         getspnam                \
15061         gettimeofday    \
15062         initgroups              \
15063         lockf                   \
15064         memcpy                  \
15065         memmove                 \
15066         mkstemp                 \
15067         pipe                    \
15068         read                    \
15069         recv                    \
15070         recvfrom                \
15071         setpwfile               \
15072         setgid                  \
15073         setegid                 \
15074         setsid                  \
15075         setuid                  \
15076         seteuid                 \
15077         sigaction               \
15078         signal                  \
15079         sigset                  \
15080         snprintf                \
15081         strdup                  \
15082         strerror                \
15083         strpbrk                 \
15084         strrchr                 \
15085         strsep                  \
15086         strstr                  \
15087         strtol                  \
15088         strtoul                 \
15089         strspn                  \
15090         sysconf                 \
15091         waitpid                 \
15092         wait4                   \
15093         write                   \
15094         send                    \
15095         sendto                  \
15096
15097 do
15098 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15099 echo "configure:15100: checking for $ac_func" >&5
15100 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15101   echo $ac_n "(cached) $ac_c" 1>&6
15102 else
15103   cat > conftest.$ac_ext <<EOF
15104 #line 15105 "configure"
15105 #include "confdefs.h"
15106 /* System header to define __stub macros and hopefully few prototypes,
15107     which can conflict with char $ac_func(); below.  */
15108 #include <assert.h>
15109 /* Override any gcc2 internal prototype to avoid an error.  */
15110 /* We use char because int might match the return type of a gcc2
15111     builtin and then its argument prototype would still apply.  */
15112 char $ac_func();
15113 char (*f)();
15114
15115 int main() {
15116
15117 /* The GNU C library defines this for functions which it implements
15118     to always fail with ENOSYS.  Some functions are actually named
15119     something starting with __ and the normal name is an alias.  */
15120 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15121 choke me
15122 #else
15123 f = $ac_func;
15124 #endif
15125
15126 ; return 0; }
15127 EOF
15128 if { (eval echo configure:15129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15129   rm -rf conftest*
15130   eval "ac_cv_func_$ac_func=yes"
15131 else
15132   echo "configure: failed program was:" >&5
15133   cat conftest.$ac_ext >&5
15134   rm -rf conftest*
15135   eval "ac_cv_func_$ac_func=no"
15136 fi
15137 rm -f conftest*
15138 fi
15139
15140 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15141   echo "$ac_t""yes" 1>&6
15142     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15143   cat >> confdefs.h <<EOF
15144 #define $ac_tr_func 1
15145 EOF
15146  
15147 else
15148   echo "$ac_t""no" 1>&6
15149 fi
15150 done
15151
15152
15153 for ac_func in getopt tempnam
15154 do
15155 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15156 echo "configure:15157: checking for $ac_func" >&5
15157 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15158   echo $ac_n "(cached) $ac_c" 1>&6
15159 else
15160   cat > conftest.$ac_ext <<EOF
15161 #line 15162 "configure"
15162 #include "confdefs.h"
15163 /* System header to define __stub macros and hopefully few prototypes,
15164     which can conflict with char $ac_func(); below.  */
15165 #include <assert.h>
15166 /* Override any gcc2 internal prototype to avoid an error.  */
15167 /* We use char because int might match the return type of a gcc2
15168     builtin and then its argument prototype would still apply.  */
15169 char $ac_func();
15170 char (*f)();
15171
15172 int main() {
15173
15174 /* The GNU C library defines this for functions which it implements
15175     to always fail with ENOSYS.  Some functions are actually named
15176     something starting with __ and the normal name is an alias.  */
15177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15178 choke me
15179 #else
15180 f = $ac_func;
15181 #endif
15182
15183 ; return 0; }
15184 EOF
15185 if { (eval echo configure:15186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15186   rm -rf conftest*
15187   eval "ac_cv_func_$ac_func=yes"
15188 else
15189   echo "configure: failed program was:" >&5
15190   cat conftest.$ac_ext >&5
15191   rm -rf conftest*
15192   eval "ac_cv_func_$ac_func=no"
15193 fi
15194 rm -f conftest*
15195 fi
15196
15197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15198   echo "$ac_t""yes" 1>&6
15199     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15200   cat >> confdefs.h <<EOF
15201 #define $ac_tr_func 1
15202 EOF
15203  
15204 else
15205   echo "$ac_t""no" 1>&6
15206 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15207 fi
15208 done
15209
15210
15211
15212 if test "$ac_cv_func_getopt" != yes; then
15213     LIBSRCS="$LIBSRCS getopt.c"
15214 fi
15215
15216 if test "$ac_cv_func_tempnam" != yes; then
15217     LIBSRCS="$LIBSRCS tempnam.c"
15218 fi
15219
15220 # Check Configuration
15221 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15222 echo "configure:15223: checking declaration of sys_errlist" >&5
15223 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15224   echo $ac_n "(cached) $ac_c" 1>&6
15225 else
15226   
15227         cat > conftest.$ac_ext <<EOF
15228 #line 15229 "configure"
15229 #include "confdefs.h"
15230
15231 #include <stdio.h>
15232 #include <sys/types.h>
15233 #include <errno.h>
15234 #ifdef WINNT
15235 #include <stdlib.h>
15236 #endif 
15237 int main() {
15238 char *c = (char *) *sys_errlist
15239 ; return 0; }
15240 EOF
15241 if { (eval echo configure:15242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15242   rm -rf conftest*
15243   ol_cv_dcl_sys_errlist=yes
15244         ol_cv_have_sys_errlist=yes
15245 else
15246   echo "configure: failed program was:" >&5
15247   cat conftest.$ac_ext >&5
15248   rm -rf conftest*
15249   ol_cv_dcl_sys_errlist=no
15250 fi
15251 rm -f conftest*
15252 fi
15253
15254 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15255 #
15256 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15257 if test $ol_cv_dcl_sys_errlist = no ; then
15258         cat >> confdefs.h <<\EOF
15259 #define DECL_SYS_ERRLIST 1
15260 EOF
15261
15262
15263         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15264 echo "configure:15265: checking existence of sys_errlist" >&5
15265 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15266   echo $ac_n "(cached) $ac_c" 1>&6
15267 else
15268   
15269                 cat > conftest.$ac_ext <<EOF
15270 #line 15271 "configure"
15271 #include "confdefs.h"
15272 #include <errno.h>
15273 int main() {
15274 char *c = (char *) *sys_errlist
15275 ; return 0; }
15276 EOF
15277 if { (eval echo configure:15278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15278   rm -rf conftest*
15279   ol_cv_have_sys_errlist=yes
15280 else
15281   echo "configure: failed program was:" >&5
15282   cat conftest.$ac_ext >&5
15283   rm -rf conftest*
15284   ol_cv_have_sys_errlist=no
15285 fi
15286 rm -f conftest*
15287 fi
15288
15289 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15290 fi
15291 if test $ol_cv_have_sys_errlist = yes ; then
15292         cat >> confdefs.h <<\EOF
15293 #define HAVE_SYS_ERRLIST 1
15294 EOF
15295
15296 fi
15297
15298
15299
15300 if test "$ol_enable_debug" != no ; then
15301         cat >> confdefs.h <<\EOF
15302 #define LDAP_DEBUG 1
15303 EOF
15304
15305 fi
15306 if test "$ol_enable_syslog" = yes ; then
15307         cat >> confdefs.h <<\EOF
15308 #define LDAP_SYSLOG 1
15309 EOF
15310
15311 fi
15312 if test "$ol_enable_libui" = yes ; then
15313         cat >> confdefs.h <<\EOF
15314 #define LDAP_LIBUI 1
15315 EOF
15316
15317 fi
15318 if test "$ol_enable_cache" = no ; then
15319         cat >> confdefs.h <<\EOF
15320 #define LDAP_NOCACHE 1
15321 EOF
15322
15323 fi
15324 if test "$ol_link_kbind" != no ; then
15325         cat >> confdefs.h <<\EOF
15326 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15327 EOF
15328
15329 fi
15330 if test "$ol_enable_dns" != no ; then
15331         cat >> confdefs.h <<\EOF
15332 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
15333 EOF
15334
15335 fi
15336 if test "$ol_enable_proctitle" != no ; then
15337         cat >> confdefs.h <<\EOF
15338 #define LDAP_PROCTITLE 1
15339 EOF
15340
15341 fi
15342 if test "$ol_enable_referrals" != no ; then
15343         cat >> confdefs.h <<\EOF
15344 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15345 EOF
15346
15347 fi
15348 if test "$ol_enable_cldap" != no ; then
15349         cat >> confdefs.h <<\EOF
15350 #define LDAP_CONNECTIONLESS 1
15351 EOF
15352
15353 fi
15354 if test "$ol_enable_ldapi" != no; then
15355         cat >> confdefs.h <<\EOF
15356 #define USE_PF_LOCAL 1
15357 EOF
15358
15359 fi
15360
15361 if test "$ol_enable_cleartext" != no ; then
15362         cat >> confdefs.h <<\EOF
15363 #define SLAPD_CLEARTEXT 1
15364 EOF
15365
15366 fi
15367 if test "$ol_enable_crypt" != no ; then
15368         cat >> confdefs.h <<\EOF
15369 #define SLAPD_CRYPT 1
15370 EOF
15371
15372 fi
15373 if test "$ol_link_kpasswd" != no ; then
15374         cat >> confdefs.h <<\EOF
15375 #define SLAPD_KPASSWD 1
15376 EOF
15377
15378 fi
15379 if test "$ol_link_spasswd" != no ; then
15380         cat >> confdefs.h <<\EOF
15381 #define SLAPD_SPASSWD 1
15382 EOF
15383
15384 fi
15385 if test "$ol_enable_multimaster" != no ; then
15386         cat >> confdefs.h <<\EOF
15387 #define SLAPD_MULTIMASTER 1
15388 EOF
15389
15390 fi
15391 if test "$ol_enable_phonetic" != no ; then
15392         cat >> confdefs.h <<\EOF
15393 #define SLAPD_PHONETIC 1
15394 EOF
15395
15396 fi
15397 if test "$ol_enable_rlookups" != no ; then
15398         cat >> confdefs.h <<\EOF
15399 #define SLAPD_RLOOKUPS 1
15400 EOF
15401
15402 fi
15403 if test "$ol_enable_aci" != no ; then
15404         cat >> confdefs.h <<\EOF
15405 #define SLAPD_ACI_ENABLED 1
15406 EOF
15407
15408 fi
15409
15410 if test "$ol_link_modules" != no ; then
15411         cat >> confdefs.h <<\EOF
15412 #define SLAPD_MODULES 1
15413 EOF
15414
15415         BUILD_SLAPD=yes
15416         SLAPD_MODULES_LDFLAGS="-dlopen self"
15417 fi
15418
15419 if test "$ol_link_bdb2" != no ; then
15420         cat >> confdefs.h <<\EOF
15421 #define SLAPD_BDB2 1
15422 EOF
15423
15424         BUILD_SLAPD=yes
15425         BUILD_BDB2=yes
15426         if test "$ol_with_bdb2_module" != static ; then
15427                 cat >> confdefs.h <<\EOF
15428 #define SLAPD_BDB2_DYNAMIC 1
15429 EOF
15430
15431                 BUILD_BDB2=mod
15432                 BUILD_BDB2_DYNAMIC=shared
15433                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15434         fi
15435 fi
15436
15437 if test "$ol_enable_ldap" != no ; then
15438         cat >> confdefs.h <<\EOF
15439 #define SLAPD_LDAP 1
15440 EOF
15441
15442         BUILD_SLAPD=yes
15443         BUILD_LDAP=yes
15444         if test "$ol_with_ldap_module" != static ; then
15445                 cat >> confdefs.h <<\EOF
15446 #define SLAPD_LDAP_DYNAMIC 1
15447 EOF
15448
15449                 BUILD_LDAP=mod
15450                 BUILD_LDAP_DYNAMIC=shared
15451                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15452         fi
15453 fi
15454
15455 if test "$ol_link_ldbm" != no ; then
15456         cat >> confdefs.h <<\EOF
15457 #define SLAPD_LDBM 1
15458 EOF
15459
15460         BUILD_SLAPD=yes
15461         BUILD_LDBM=yes
15462         if test "$ol_with_ldbm_module" != static ; then
15463                 cat >> confdefs.h <<\EOF
15464 #define SLAPD_LDBM_DYNAMIC 1
15465 EOF
15466
15467                 BUILD_LDBM=mod
15468                 BUILD_LDBM_DYNAMIC=shared
15469                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15470         fi
15471 fi
15472
15473 if test "$ol_enable_passwd" != no ; then
15474         cat >> confdefs.h <<\EOF
15475 #define SLAPD_PASSWD 1
15476 EOF
15477
15478         BUILD_SLAPD=yes
15479         BUILD_PASSWD=yes
15480         if test "$ol_with_passwd_module" != static ; then
15481                 cat >> confdefs.h <<\EOF
15482 #define SLAPD_PASSWD_DYNAMIC 1
15483 EOF
15484
15485                 BUILD_PASSWD=mod
15486                 BUILD_PASSWD_DYNAMIC=shared
15487                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15488         fi
15489 fi
15490
15491 if test "$ol_link_perl" != no ; then
15492         cat >> confdefs.h <<\EOF
15493 #define SLAPD_PERL 1
15494 EOF
15495
15496         BUILD_SLAPD=yes
15497         BUILD_PERL=yes
15498         if test "$ol_with_perl_module" != static ; then
15499                 cat >> confdefs.h <<\EOF
15500 #define SLAPD_PERL_DYNAMIC 1
15501 EOF
15502
15503                 BUILD_PERL=mod
15504                 BUILD_PERL_DYNAMIC=shared
15505                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15506         fi
15507 fi
15508
15509 if test "$ol_enable_shell" != no ; then
15510         cat >> confdefs.h <<\EOF
15511 #define SLAPD_SHELL 1
15512 EOF
15513
15514         BUILD_SLAPD=yes
15515         BUILD_SHELL=yes
15516         if test "$ol_with_shell_module" != static ; then
15517                 cat >> confdefs.h <<\EOF
15518 #define SLAPD_SHELL_DYNAMIC 1
15519 EOF
15520
15521                 BUILD_SHELL=mod
15522                 BUILD_SHELL_DYNAMIC=shared
15523                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15524         fi
15525 fi
15526
15527 if test "$ol_enable_tcl" != no ; then
15528         cat >> confdefs.h <<\EOF
15529 #define SLAPD_TCL 1
15530 EOF
15531
15532         BUILD_SLAPD=yes
15533         BUILD_TCL=yes
15534         if test "$ol_with_tcl_module" != static; then
15535                 cat >> confdefs.h <<\EOF
15536 #define SLAPD_TCL_DYNAMIC 1
15537 EOF
15538
15539                 BUILD_TCL=mod
15540                 BUILD_TCL_DYNAMIC=shared
15541                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15542         fi
15543 fi
15544
15545 if test "$ol_enable_sql" != no ; then
15546         cat >> confdefs.h <<\EOF
15547 #define SLAPD_SQL 1
15548 EOF
15549
15550         BUILD_SLAPD=yes
15551         BUILD_SQL=yes
15552         SLAPD_SQL_LIBS=-liodbc
15553         if test "$ol_with_sql_module" != static; then
15554                 cat >> confdefs.h <<\EOF
15555 #define SLAPD_SQL_DYNAMIC 1
15556 EOF
15557
15558                 BUILD_SQL=mod
15559                 BUILD_SQL_DYNAMIC=shared
15560                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15561         fi
15562 fi
15563
15564 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15565         $BUILD_SLAPD = yes ; then
15566         BUILD_SLURPD=yes
15567 fi
15568
15569 if test "$ol_link_isode" != no ; then
15570         BUILD_LDAPD=yes
15571 fi
15572
15573
15574 if test "$LINK_BINS_DYNAMIC" = yes; then
15575     LIB_LINKAGE=DYN
15576     LT_LIB_LINKAGE=shared
15577 else
15578     LIB_LINKAGE=STAT
15579     LT_LIB_LINKAGE=static
15580 fi
15581
15582 if test "$ac_cv_mingw32" = yes ; then
15583     PLAT=NT
15584     DYN_EXT=dll
15585 else
15586     PLAT=UNIX
15587     DYN_EXT=so
15588 fi
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599   
15600   
15601   
15602   
15603   
15604   
15605   
15606   
15607   
15608   
15609   
15610   
15611   
15612   
15613   
15614   
15615   
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651 trap '' 1 2 15
15652
15653 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15654
15655 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15656 # Let make expand exec_prefix.
15657 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15658
15659 # Any assignment to VPATH causes Sun make to only execute
15660 # the first set of double-colon rules, so remove it if not needed.
15661 # If there is a colon in the path, we need to keep it.
15662 if test "x$srcdir" = x.; then
15663   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15664 fi
15665
15666 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15667
15668 DEFS=-DHAVE_CONFIG_H
15669
15670 # Without the "./", some shells look in PATH for config.status.
15671 : ${CONFIG_STATUS=./config.status}
15672
15673 echo creating $CONFIG_STATUS
15674 rm -f $CONFIG_STATUS
15675 cat > $CONFIG_STATUS <<EOF
15676 #! /bin/sh
15677 # Generated automatically by configure.
15678 # Run this file to recreate the current configuration.
15679 # This directory was configured as follows,
15680 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15681 #
15682 # $0 $ac_configure_args
15683 #
15684 # Compiler output produced by configure, useful for debugging
15685 # configure, is in ./config.log if it exists.
15686
15687 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15688 for ac_option
15689 do
15690   case "\$ac_option" in
15691   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15692     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15693     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15694   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15695     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15696     exit 0 ;;
15697   -help | --help | --hel | --he | --h)
15698     echo "\$ac_cs_usage"; exit 0 ;;
15699   *) echo "\$ac_cs_usage"; exit 1 ;;
15700   esac
15701 done
15702
15703 ac_given_srcdir=$srcdir
15704 ac_given_INSTALL="$INSTALL"
15705
15706 trap 'rm -fr `echo "\
15707 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15708 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15709 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15710 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15711 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15712 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15713 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15714 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15715 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15716 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15717 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15718 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15719 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15720 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15721 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15722 include/Makefile:build/top.mk:include/Makefile.in \
15723 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15724 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15725 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15726 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15727 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15728 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15729 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15730 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15731 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15732 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15733 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15734 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15735 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15736 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15737 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15738 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15739 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15740 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15741 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15742 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15743 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15744 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15745 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15746 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15747 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15748 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15749 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15750 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15751  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15752 EOF
15753 cat >> $CONFIG_STATUS <<EOF
15754
15755 # Protect against being on the right side of a sed subst in config.status.
15756 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15757  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15758 $ac_vpsub
15759 $extrasub
15760 s%@SHELL@%$SHELL%g
15761 s%@CFLAGS@%$CFLAGS%g
15762 s%@CPPFLAGS@%$CPPFLAGS%g
15763 s%@CXXFLAGS@%$CXXFLAGS%g
15764 s%@FFLAGS@%$FFLAGS%g
15765 s%@DEFS@%$DEFS%g
15766 s%@LDFLAGS@%$LDFLAGS%g
15767 s%@LIBS@%$LIBS%g
15768 s%@exec_prefix@%$exec_prefix%g
15769 s%@prefix@%$prefix%g
15770 s%@program_transform_name@%$program_transform_name%g
15771 s%@bindir@%$bindir%g
15772 s%@sbindir@%$sbindir%g
15773 s%@libexecdir@%$libexecdir%g
15774 s%@datadir@%$datadir%g
15775 s%@sysconfdir@%$sysconfdir%g
15776 s%@sharedstatedir@%$sharedstatedir%g
15777 s%@localstatedir@%$localstatedir%g
15778 s%@libdir@%$libdir%g
15779 s%@includedir@%$includedir%g
15780 s%@oldincludedir@%$oldincludedir%g
15781 s%@infodir@%$infodir%g
15782 s%@mandir@%$mandir%g
15783 s%@host@%$host%g
15784 s%@host_alias@%$host_alias%g
15785 s%@host_cpu@%$host_cpu%g
15786 s%@host_vendor@%$host_vendor%g
15787 s%@host_os@%$host_os%g
15788 s%@target@%$target%g
15789 s%@target_alias@%$target_alias%g
15790 s%@target_cpu@%$target_cpu%g
15791 s%@target_vendor@%$target_vendor%g
15792 s%@target_os@%$target_os%g
15793 s%@build@%$build%g
15794 s%@build_alias@%$build_alias%g
15795 s%@build_cpu@%$build_cpu%g
15796 s%@build_vendor@%$build_vendor%g
15797 s%@build_os@%$build_os%g
15798 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15799 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15800 s%@INSTALL_DATA@%$INSTALL_DATA%g
15801 s%@PACKAGE@%$PACKAGE%g
15802 s%@VERSION@%$VERSION%g
15803 s%@ACLOCAL@%$ACLOCAL%g
15804 s%@AUTOCONF@%$AUTOCONF%g
15805 s%@AUTOMAKE@%$AUTOMAKE%g
15806 s%@AUTOHEADER@%$AUTOHEADER%g
15807 s%@MAKEINFO@%$MAKEINFO%g
15808 s%@install_sh@%$install_sh%g
15809 s%@AMTAR@%$AMTAR%g
15810 s%@AWK@%$AWK%g
15811 s%@AMTARFLAGS@%$AMTARFLAGS%g
15812 s%@SET_MAKE@%$SET_MAKE%g
15813 s%@top_builddir@%$top_builddir%g
15814 s%@ldap_subdir@%$ldap_subdir%g
15815 s%@CC@%$CC%g
15816 s%@RANLIB@%$RANLIB%g
15817 s%@LD@%$LD%g
15818 s%@NM@%$NM%g
15819 s%@LN_S@%$LN_S%g
15820 s%@DLLTOOL@%$DLLTOOL%g
15821 s%@AS@%$AS%g
15822 s%@OBJDUMP@%$OBJDUMP%g
15823 s%@LIBTOOL@%$LIBTOOL%g
15824 s%@LN_H@%$LN_H%g
15825 s%@SENDMAIL@%$SENDMAIL%g
15826 s%@EDITOR@%$EDITOR%g
15827 s%@FINGER@%$FINGER%g
15828 s%@PERLBIN@%$PERLBIN%g
15829 s%@CPP@%$CPP%g
15830 s%@EXEEXT@%$EXEEXT%g
15831 s%@OBJEXT@%$OBJEXT%g
15832 s%@OL_MKDEP@%$OL_MKDEP%g
15833 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15834 s%@PEPSY@%$PEPSY%g
15835 s%@LIBOBJS@%$LIBOBJS%g
15836 s%@LIBSRCS@%$LIBSRCS%g
15837 s%@PLAT@%$PLAT%g
15838 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15839 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15840 s%@DYN_EXT@%$DYN_EXT%g
15841 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15842 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15843 s%@BUILD_BDB2@%$BUILD_BDB2%g
15844 s%@BUILD_LDAP@%$BUILD_LDAP%g
15845 s%@BUILD_LDBM@%$BUILD_LDBM%g
15846 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15847 s%@BUILD_PERL@%$BUILD_PERL%g
15848 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15849 s%@BUILD_SHELL@%$BUILD_SHELL%g
15850 s%@BUILD_TCL@%$BUILD_TCL%g
15851 s%@BUILD_SQL@%$BUILD_SQL%g
15852 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15853 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15854 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15855 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15856 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15857 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15858 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15859 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
15860 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15861 s%@LDAP_LIBS@%$LDAP_LIBS%g
15862 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15863 s%@LDIF_LIBS@%$LDIF_LIBS%g
15864 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15865 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15866 s%@LDBM_LIBS@%$LDBM_LIBS%g
15867 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15868 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15869 s%@WRAP_LIBS@%$WRAP_LIBS%g
15870 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15871 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15872 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15873 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15874 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15875 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15876 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15877 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15878 s%@KRB4_LIBS@%$KRB4_LIBS%g
15879 s%@KRB5_LIBS@%$KRB5_LIBS%g
15880 s%@READLINE_LIBS@%$READLINE_LIBS%g
15881 s%@SASL_LIBS@%$SASL_LIBS%g
15882 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15883 s%@TLS_LIBS@%$TLS_LIBS%g
15884 s%@MODULES_LIBS@%$MODULES_LIBS%g
15885 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
15886 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
15887 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
15888
15889 CEOF
15890 EOF
15891
15892 cat >> $CONFIG_STATUS <<\EOF
15893
15894 # Split the substitutions into bite-sized pieces for seds with
15895 # small command number limits, like on Digital OSF/1 and HP-UX.
15896 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15897 ac_file=1 # Number of current file.
15898 ac_beg=1 # First line for current file.
15899 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15900 ac_more_lines=:
15901 ac_sed_cmds=""
15902 while $ac_more_lines; do
15903   if test $ac_beg -gt 1; then
15904     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15905   else
15906     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15907   fi
15908   if test ! -s conftest.s$ac_file; then
15909     ac_more_lines=false
15910     rm -f conftest.s$ac_file
15911   else
15912     if test -z "$ac_sed_cmds"; then
15913       ac_sed_cmds="sed -f conftest.s$ac_file"
15914     else
15915       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15916     fi
15917     ac_file=`expr $ac_file + 1`
15918     ac_beg=$ac_end
15919     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15920   fi
15921 done
15922 if test -z "$ac_sed_cmds"; then
15923   ac_sed_cmds=cat
15924 fi
15925 EOF
15926
15927 cat >> $CONFIG_STATUS <<EOF
15928
15929 CONFIG_FILES=\${CONFIG_FILES-"\
15930 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15931 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15932 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15933 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15934 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15935 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15936 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15937 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15938 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15939 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15940 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15941 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15942 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15943 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15944 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15945 include/Makefile:build/top.mk:include/Makefile.in \
15946 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15947 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15948 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15949 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15950 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15951 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15952 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15953 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15954 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15955 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15956 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15957 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15958 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15959 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15960 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15961 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15962 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15963 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15964 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15965 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15966 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15967 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15968 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15969 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15970 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15971 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15972 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15973 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15974 "}
15975 EOF
15976 cat >> $CONFIG_STATUS <<\EOF
15977 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15978   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15979   case "$ac_file" in
15980   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15981        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15982   *) ac_file_in="${ac_file}.in" ;;
15983   esac
15984
15985   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15986
15987   # Remove last slash and all that follows it.  Not all systems have dirname.
15988   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15989   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15990     # The file is in a subdirectory.
15991     test ! -d "$ac_dir" && mkdir "$ac_dir"
15992     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15993     # A "../" for each directory in $ac_dir_suffix.
15994     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15995   else
15996     ac_dir_suffix= ac_dots=
15997   fi
15998
15999   case "$ac_given_srcdir" in
16000   .)  srcdir=.
16001       if test -z "$ac_dots"; then top_srcdir=.
16002       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16003   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16004   *) # Relative path.
16005     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16006     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16007   esac
16008
16009   case "$ac_given_INSTALL" in
16010   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16011   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16012   esac
16013
16014   echo creating "$ac_file"
16015   rm -f "$ac_file"
16016   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16017   case "$ac_file" in
16018   *[Mm]akefile*) ac_comsub="1i\\
16019 # $configure_input" ;;
16020   *) ac_comsub= ;;
16021   esac
16022
16023   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16024   sed -e "$ac_comsub
16025 s%@configure_input@%$configure_input%g
16026 s%@srcdir@%$srcdir%g
16027 s%@top_srcdir@%$top_srcdir%g
16028 s%@INSTALL@%$INSTALL%g
16029 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16030 fi; done
16031 rm -f conftest.s*
16032
16033 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16034 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16035 #
16036 # ac_d sets the value in "#define NAME VALUE" lines.
16037 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16038 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16039 ac_dC='\3'
16040 ac_dD='%g'
16041 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16042 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16043 ac_uB='\([      ]\)%\1#\2define\3'
16044 ac_uC=' '
16045 ac_uD='\4%g'
16046 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16047 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16048 ac_eB='$%\1#\2define\3'
16049 ac_eC=' '
16050 ac_eD='%g'
16051
16052 if test "${CONFIG_HEADERS+set}" != set; then
16053 EOF
16054 cat >> $CONFIG_STATUS <<EOF
16055   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16056 EOF
16057 cat >> $CONFIG_STATUS <<\EOF
16058 fi
16059 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16060   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16061   case "$ac_file" in
16062   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16063        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16064   *) ac_file_in="${ac_file}.in" ;;
16065   esac
16066
16067   echo creating $ac_file
16068
16069   rm -f conftest.frag conftest.in conftest.out
16070   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16071   cat $ac_file_inputs > conftest.in
16072
16073 EOF
16074
16075 # Transform confdefs.h into a sed script conftest.vals that substitutes
16076 # the proper values into config.h.in to produce config.h.  And first:
16077 # Protect against being on the right side of a sed subst in config.status.
16078 # Protect against being in an unquoted here document in config.status.
16079 rm -f conftest.vals
16080 cat > conftest.hdr <<\EOF
16081 s/[\\&%]/\\&/g
16082 s%[\\$`]%\\&%g
16083 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16084 s%ac_d%ac_u%gp
16085 s%ac_u%ac_e%gp
16086 EOF
16087 sed -n -f conftest.hdr confdefs.h > conftest.vals
16088 rm -f conftest.hdr
16089
16090 # This sed command replaces #undef with comments.  This is necessary, for
16091 # example, in the case of _POSIX_SOURCE, which is predefined and required
16092 # on some systems where configure will not decide to define it.
16093 cat >> conftest.vals <<\EOF
16094 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16095 EOF
16096
16097 # Break up conftest.vals because some shells have a limit on
16098 # the size of here documents, and old seds have small limits too.
16099
16100 rm -f conftest.tail
16101 while :
16102 do
16103   ac_lines=`grep -c . conftest.vals`
16104   # grep -c gives empty output for an empty file on some AIX systems.
16105   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16106   # Write a limited-size here document to conftest.frag.
16107   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16108   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16109   echo 'CEOF
16110   sed -f conftest.frag conftest.in > conftest.out
16111   rm -f conftest.in
16112   mv conftest.out conftest.in
16113 ' >> $CONFIG_STATUS
16114   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16115   rm -f conftest.vals
16116   mv conftest.tail conftest.vals
16117 done
16118 rm -f conftest.vals
16119
16120 cat >> $CONFIG_STATUS <<\EOF
16121   rm -f conftest.frag conftest.h
16122   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16123   cat conftest.in >> conftest.h
16124   rm -f conftest.in
16125   if cmp -s $ac_file conftest.h 2>/dev/null; then
16126     echo "$ac_file is unchanged"
16127     rm -f conftest.h
16128   else
16129     # Remove last slash and all that follows it.  Not all systems have dirname.
16130       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16131       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16132       # The file is in a subdirectory.
16133       test ! -d "$ac_dir" && mkdir "$ac_dir"
16134     fi
16135     rm -f $ac_file
16136     mv conftest.h $ac_file
16137   fi
16138 fi; done
16139
16140 EOF
16141 cat >> $CONFIG_STATUS <<EOF
16142
16143 EOF
16144 cat >> $CONFIG_STATUS <<\EOF
16145
16146 date > stamp-h
16147 echo Please \"make depend\" to build dependencies
16148
16149 exit 0
16150 EOF
16151 chmod +x $CONFIG_STATUS
16152 rm -fr confdefs* $ac_clean_files
16153 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16154