]> git.sur5r.net Git - openldap/blob - configure
dd321178b5dc8eb7c9532787303dad021d3ab3a4
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.298 2000/05/10 20:48:23 hyc 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-multimaster        enable multimaster replication (no)"
85 ac_help="$ac_help
86     --enable-phonetic   enable phonetic/soundex (no)"
87 ac_help="$ac_help
88     --enable-quipu      build quipu migration tools (no)"
89 ac_help="$ac_help
90     --enable-rlookups   enable reverse lookups (auto)"
91 ac_help="$ac_help
92     --enable-aci        enable per-object ACIs (no)"
93 ac_help="$ac_help
94     --enable-wrappers   enable tcp wrapper support (no)"
95 ac_help="$ac_help
96     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
97 ac_help="$ac_help
98     --enable-bdb2       enable bdb2 backend (no)"
99 ac_help="$ac_help
100       --with-bdb2-module        module type (static)"
101 ac_help="$ac_help
102     --enable-dnssrv     enable bdb2 backend (no)"
103 ac_help="$ac_help
104       --with-dnssrv-module      module type (static)"
105 ac_help="$ac_help
106     --enable-ldap       enable ldap backend (no)"
107 ac_help="$ac_help
108       --with-ldap-module        module type (static)"
109 ac_help="$ac_help
110     --enable-ldbm       enable ldbm backend (yes)"
111 ac_help="$ac_help
112       --with-ldbm-api   use LDBM API (auto)"
113 ac_help="$ac_help
114       --with-ldbm-module        module type (static)"
115 ac_help="$ac_help
116       --with-ldbm-type  use LDBM type (auto)"
117 ac_help="$ac_help
118     --enable-passwd     enable passwd backend (no)"
119 ac_help="$ac_help
120       --with-passwd-module      module type (static)"
121 ac_help="$ac_help
122     --enable-perl       enable perl backend (no)"
123 ac_help="$ac_help
124       --with-perl-module        module type (static)"
125 ac_help="$ac_help
126     --enable-shell      enable shell backend (no)"
127 ac_help="$ac_help
128       --with-shell-module       module type (static)"
129 ac_help="$ac_help
130     --enable-sql        enable sql backend (no)"
131 ac_help="$ac_help
132       --with-sql-module module type (static)"
133 ac_help="$ac_help
134     --enable-tcl        enable tcl backend (no)"
135 ac_help="$ac_help
136       --with-tcl-module module type (static)"
137 ac_help="$ac_help
138 SLURPD (Replication Daemon) Options:"
139 ac_help="$ac_help
140   --enable-slurpd       enable building slurpd (auto)"
141 ac_help="$ac_help
142 Library Generation & Linking Options"
143 ac_help="$ac_help
144   --enable-static[=PKGS]  build static libraries [default=yes]"
145 ac_help="$ac_help
146   --enable-shared[=PKGS]  build shared libraries [default=yes]"
147 ac_help="$ac_help
148   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
149 ac_help="$ac_help
150   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
151 ac_help="$ac_help
152   --disable-libtool-lock  avoid locking (might break parallel builds)"
153
154 # Initialize some variables set by options.
155 # The variables have the same names as the options, with
156 # dashes changed to underlines.
157 build=NONE
158 cache_file=./config.cache
159 exec_prefix=NONE
160 host=NONE
161 no_create=
162 nonopt=NONE
163 no_recursion=
164 prefix=NONE
165 program_prefix=NONE
166 program_suffix=NONE
167 program_transform_name=s,x,x,
168 silent=
169 site=
170 srcdir=
171 target=NONE
172 verbose=
173 x_includes=NONE
174 x_libraries=NONE
175 bindir='${exec_prefix}/bin'
176 sbindir='${exec_prefix}/sbin'
177 libexecdir='${exec_prefix}/libexec'
178 datadir='${prefix}/share'
179 sysconfdir='${prefix}/etc'
180 sharedstatedir='${prefix}/com'
181 localstatedir='${prefix}/var'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${prefix}/info'
186 mandir='${prefix}/man'
187
188 # Initialize some other variables.
189 subdirs=
190 MFLAGS= MAKEFLAGS=
191 SHELL=${CONFIG_SHELL-/bin/sh}
192 # Maximum number of lines to put in a shell here document.
193 ac_max_here_lines=12
194
195 ac_prev=
196 for ac_option
197 do
198
199   # If the previous option needs an argument, assign it.
200   if test -n "$ac_prev"; then
201     eval "$ac_prev=\$ac_option"
202     ac_prev=
203     continue
204   fi
205
206   case "$ac_option" in
207   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
208   *) ac_optarg= ;;
209   esac
210
211   # Accept the important Cygnus configure options, so we can diagnose typos.
212
213   case "$ac_option" in
214
215   -bindir | --bindir | --bindi | --bind | --bin | --bi)
216     ac_prev=bindir ;;
217   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
218     bindir="$ac_optarg" ;;
219
220   -build | --build | --buil | --bui | --bu)
221     ac_prev=build ;;
222   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
223     build="$ac_optarg" ;;
224
225   -cache-file | --cache-file | --cache-fil | --cache-fi \
226   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
227     ac_prev=cache_file ;;
228   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
229   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
230     cache_file="$ac_optarg" ;;
231
232   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233     ac_prev=datadir ;;
234   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235   | --da=*)
236     datadir="$ac_optarg" ;;
237
238   -disable-* | --disable-*)
239     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
240     # Reject names that are not valid shell variable names.
241     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
242       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
243     fi
244     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
245     eval "enable_${ac_feature}=no" ;;
246
247   -enable-* | --enable-*)
248     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
249     # Reject names that are not valid shell variable names.
250     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
251       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
252     fi
253     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
254     case "$ac_option" in
255       *=*) ;;
256       *) ac_optarg=yes ;;
257     esac
258     eval "enable_${ac_feature}='$ac_optarg'" ;;
259
260   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
261   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
262   | --exec | --exe | --ex)
263     ac_prev=exec_prefix ;;
264   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
265   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
266   | --exec=* | --exe=* | --ex=*)
267     exec_prefix="$ac_optarg" ;;
268
269   -gas | --gas | --ga | --g)
270     # Obsolete; use --with-gas.
271     with_gas=yes ;;
272
273   -help | --help | --hel | --he)
274     # Omit some internal or obsolete options to make the list less imposing.
275     # This message is too long to be a string in the A/UX 3.1 sh.
276     cat << EOF
277 Usage: configure [options] [host]
278 Options: [defaults in brackets after descriptions]
279 Configuration:
280   --cache-file=FILE       cache test results in FILE
281   --help                  print this message
282   --no-create             do not create output files
283   --quiet, --silent       do not print \`checking...' messages
284   --version               print the version of autoconf that created configure
285 Directory and file names:
286   --prefix=PREFIX         install architecture-independent files in PREFIX
287                           [$ac_default_prefix]
288   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
289                           [same as prefix]
290   --bindir=DIR            user executables in DIR [EPREFIX/bin]
291   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
292   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
293   --datadir=DIR           read-only architecture-independent data in DIR
294                           [PREFIX/share]
295   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
296   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
297                           [PREFIX/com]
298   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
299   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
300   --includedir=DIR        C header files in DIR [PREFIX/include]
301   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
302   --infodir=DIR           info documentation in DIR [PREFIX/info]
303   --mandir=DIR            man documentation in DIR [PREFIX/man]
304   --srcdir=DIR            find the sources in DIR [configure dir or ..]
305   --program-prefix=PREFIX prepend PREFIX to installed program names
306   --program-suffix=SUFFIX append SUFFIX to installed program names
307   --program-transform-name=PROGRAM
308                           run sed PROGRAM on installed program names
309 EOF
310     cat << EOF
311 Host type:
312   --build=BUILD           configure for building on BUILD [BUILD=HOST]
313   --host=HOST             configure for HOST [guessed]
314   --target=TARGET         configure for TARGET [TARGET=HOST]
315 Features and packages:
316   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
317   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
318   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
319   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
320   --x-includes=DIR        X include files are in DIR
321   --x-libraries=DIR       X library files are in DIR
322 EOF
323     if test -n "$ac_help"; then
324       echo "--enable and --with options recognized:$ac_help"
325     fi
326     exit 0 ;;
327
328   -host | --host | --hos | --ho)
329     ac_prev=host ;;
330   -host=* | --host=* | --hos=* | --ho=*)
331     host="$ac_optarg" ;;
332
333   -includedir | --includedir | --includedi | --included | --include \
334   | --includ | --inclu | --incl | --inc)
335     ac_prev=includedir ;;
336   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
337   | --includ=* | --inclu=* | --incl=* | --inc=*)
338     includedir="$ac_optarg" ;;
339
340   -infodir | --infodir | --infodi | --infod | --info | --inf)
341     ac_prev=infodir ;;
342   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
343     infodir="$ac_optarg" ;;
344
345   -libdir | --libdir | --libdi | --libd)
346     ac_prev=libdir ;;
347   -libdir=* | --libdir=* | --libdi=* | --libd=*)
348     libdir="$ac_optarg" ;;
349
350   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
351   | --libexe | --libex | --libe)
352     ac_prev=libexecdir ;;
353   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
354   | --libexe=* | --libex=* | --libe=*)
355     libexecdir="$ac_optarg" ;;
356
357   -localstatedir | --localstatedir | --localstatedi | --localstated \
358   | --localstate | --localstat | --localsta | --localst \
359   | --locals | --local | --loca | --loc | --lo)
360     ac_prev=localstatedir ;;
361   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
362   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
363   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
364     localstatedir="$ac_optarg" ;;
365
366   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
367     ac_prev=mandir ;;
368   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
369     mandir="$ac_optarg" ;;
370
371   -nfp | --nfp | --nf)
372     # Obsolete; use --without-fp.
373     with_fp=no ;;
374
375   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
376   | --no-cr | --no-c)
377     no_create=yes ;;
378
379   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
380   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
381     no_recursion=yes ;;
382
383   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
384   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
385   | --oldin | --oldi | --old | --ol | --o)
386     ac_prev=oldincludedir ;;
387   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
388   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
389   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
390     oldincludedir="$ac_optarg" ;;
391
392   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
393     ac_prev=prefix ;;
394   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
395     prefix="$ac_optarg" ;;
396
397   -program-prefix | --program-prefix | --program-prefi | --program-pref \
398   | --program-pre | --program-pr | --program-p)
399     ac_prev=program_prefix ;;
400   -program-prefix=* | --program-prefix=* | --program-prefi=* \
401   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
402     program_prefix="$ac_optarg" ;;
403
404   -program-suffix | --program-suffix | --program-suffi | --program-suff \
405   | --program-suf | --program-su | --program-s)
406     ac_prev=program_suffix ;;
407   -program-suffix=* | --program-suffix=* | --program-suffi=* \
408   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
409     program_suffix="$ac_optarg" ;;
410
411   -program-transform-name | --program-transform-name \
412   | --program-transform-nam | --program-transform-na \
413   | --program-transform-n | --program-transform- \
414   | --program-transform | --program-transfor \
415   | --program-transfo | --program-transf \
416   | --program-trans | --program-tran \
417   | --progr-tra | --program-tr | --program-t)
418     ac_prev=program_transform_name ;;
419   -program-transform-name=* | --program-transform-name=* \
420   | --program-transform-nam=* | --program-transform-na=* \
421   | --program-transform-n=* | --program-transform-=* \
422   | --program-transform=* | --program-transfor=* \
423   | --program-transfo=* | --program-transf=* \
424   | --program-trans=* | --program-tran=* \
425   | --progr-tra=* | --program-tr=* | --program-t=*)
426     program_transform_name="$ac_optarg" ;;
427
428   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
429   | -silent | --silent | --silen | --sile | --sil)
430     silent=yes ;;
431
432   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
433     ac_prev=sbindir ;;
434   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
435   | --sbi=* | --sb=*)
436     sbindir="$ac_optarg" ;;
437
438   -sharedstatedir | --sharedstatedir | --sharedstatedi \
439   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
440   | --sharedst | --shareds | --shared | --share | --shar \
441   | --sha | --sh)
442     ac_prev=sharedstatedir ;;
443   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
444   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
445   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
446   | --sha=* | --sh=*)
447     sharedstatedir="$ac_optarg" ;;
448
449   -site | --site | --sit)
450     ac_prev=site ;;
451   -site=* | --site=* | --sit=*)
452     site="$ac_optarg" ;;
453
454   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
455     ac_prev=srcdir ;;
456   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
457     srcdir="$ac_optarg" ;;
458
459   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
460   | --syscon | --sysco | --sysc | --sys | --sy)
461     ac_prev=sysconfdir ;;
462   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
463   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
464     sysconfdir="$ac_optarg" ;;
465
466   -target | --target | --targe | --targ | --tar | --ta | --t)
467     ac_prev=target ;;
468   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
469     target="$ac_optarg" ;;
470
471   -v | -verbose | --verbose | --verbos | --verbo | --verb)
472     verbose=yes ;;
473
474   -version | --version | --versio | --versi | --vers)
475     echo "configure generated by autoconf version 2.13.1"
476     exit 0 ;;
477
478   -with-* | --with-*)
479     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
480     # Reject names that are not valid shell variable names.
481     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
482       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
483     fi
484     ac_package=`echo $ac_package| sed 's/-/_/g'`
485     case "$ac_option" in
486       *=*) ;;
487       *) ac_optarg=yes ;;
488     esac
489     eval "with_${ac_package}='$ac_optarg'" ;;
490
491   -without-* | --without-*)
492     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
493     # Reject names that are not valid shell variable names.
494     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
495       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
496     fi
497     ac_package=`echo $ac_package| sed 's/-/_/g'`
498     eval "with_${ac_package}=no" ;;
499
500   --x)
501     # Obsolete; use --with-x.
502     with_x=yes ;;
503
504   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
505   | --x-incl | --x-inc | --x-in | --x-i)
506     ac_prev=x_includes ;;
507   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
508   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
509     x_includes="$ac_optarg" ;;
510
511   -x-libraries | --x-libraries | --x-librarie | --x-librari \
512   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
513     ac_prev=x_libraries ;;
514   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
515   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
516     x_libraries="$ac_optarg" ;;
517
518   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
519     ;;
520
521   *)
522     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
523       echo "configure: warning: $ac_option: invalid host type" 1>&2
524     fi
525     if test "x$nonopt" != xNONE; then
526       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
527     fi
528     nonopt="$ac_option"
529     ;;
530
531   esac
532 done
533
534 if test -n "$ac_prev"; then
535   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
536 fi
537
538 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
539
540 # File descriptor usage:
541 # 0 standard input
542 # 1 file creation
543 # 2 errors and warnings
544 # 3 some systems may open it to /dev/tty
545 # 4 used on the Kubota Titan
546 # 6 checking for... messages and results
547 # 5 compiler messages saved in config.log
548 if test "$silent" = yes; then
549   exec 6>/dev/null
550 else
551   exec 6>&1
552 fi
553 exec 5>./config.log
554
555 echo "\
556 This file contains any messages produced by compilers while
557 running configure, to aid debugging if configure makes a mistake.
558 " 1>&5
559
560 # Strip out --no-create and --no-recursion so they do not pile up.
561 # Also quote any args containing shell metacharacters.
562 ac_configure_args=
563 for ac_arg
564 do
565   case "$ac_arg" in
566   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
567   | --no-cr | --no-c) ;;
568   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
569   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
570   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
571   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
572   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
573   esac
574 done
575
576 # NLS nuisances.
577 # Only set these to C if already set.  These must not be set unconditionally
578 # because not all systems understand e.g. LANG=C (notably SCO).
579 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
580 # Non-C LC_CTYPE values break the ctype check.
581 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
582 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
583 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
584 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
585
586 # confdefs.h avoids OS command line length limits that DEFS can exceed.
587 rm -rf conftest* confdefs.h
588 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
589 echo > confdefs.h
590
591 # A filename unique to this package, relative to the directory that
592 # configure is in, which we can look for to find out if srcdir is correct.
593 ac_unique_file=build/version
594
595 # Find the source files, if location was not specified.
596 if test -z "$srcdir"; then
597   ac_srcdir_defaulted=yes
598   # Try the directory containing this script, then its parent.
599   ac_prog=$0
600   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
601   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
602   srcdir=$ac_confdir
603   if test ! -r $srcdir/$ac_unique_file; then
604     srcdir=..
605   fi
606 else
607   ac_srcdir_defaulted=no
608 fi
609 if test ! -r $srcdir/$ac_unique_file; then
610   if test "$ac_srcdir_defaulted" = yes; then
611     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
612   else
613     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
614   fi
615 fi
616 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
617
618 # Prefer explicitly selected file to automatically selected ones.
619 if test -z "$CONFIG_SITE"; then
620   if test "x$prefix" != xNONE; then
621     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
622   else
623     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
624   fi
625 fi
626 for ac_site_file in $CONFIG_SITE; do
627   if test -r "$ac_site_file"; then
628     echo "loading site script $ac_site_file"
629     . "$ac_site_file"
630   fi
631 done
632
633
634 ac_ext=c
635 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
636 ac_cpp='$CPP $CPPFLAGS'
637 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
638 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
639 cross_compiling=$ac_cv_prog_cc_cross
640
641 ac_exeext=
642 ac_objext=o
643 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
644   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
645   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
646     ac_n= ac_c='
647 ' ac_t='        '
648   else
649     ac_n=-n ac_c= ac_t=
650   fi
651 else
652   ac_n= ac_c='\c' ac_t=
653 fi
654
655 ac_aux_dir=
656 for ac_dir in build $srcdir/build; do
657   if test -f $ac_dir/install-sh; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/install-sh -c"
660     break
661   elif test -f $ac_dir/install.sh; then
662     ac_aux_dir=$ac_dir
663     ac_install_sh="$ac_aux_dir/install.sh -c"
664     break
665   elif test -f $ac_dir/shtool; then
666     ac_aux_dir=$ac_dir
667     ac_install_sh="$ac_aux_dir/shtool install -c"
668     break
669   fi
670 done
671 if test -z "$ac_aux_dir"; then
672   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
673 fi
674 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
675 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
676 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
677
678 OL_VERSION=`cat $ac_aux_dir/version`
679 if test -z "$OL_VERSION"; then
680         { echo "configure: error: could not determine version" 1>&2; exit 1; }
681 fi
682
683 echo "Configuring OpenLDAP $OL_VERSION ..."
684
685
686 echo $ac_n "checking host system type""... $ac_c" 1>&6
687 echo "configure:688: checking host system type" >&5
688 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
689
690 # Make sure we can run config.sub.
691   if $ac_config_sub sun4 >/dev/null 2>&1; then :
692     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
693   fi
694
695   ac_cv_host_alias=$host
696   case "$ac_cv_host_alias" in
697   NONE)
698     case $nonopt in
699     NONE)
700       if ac_cv_host_alias=`$ac_config_guess`; then :
701       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
702       fi ;;
703     *) ac_cv_host_alias=$nonopt ;;
704     esac ;;
705   esac
706
707   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
708   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 else
712   echo $ac_n "(cached) $ac_c" 1>&6
713 fi
714
715 echo "$ac_t""$ac_cv_host" 1>&6
716
717 host=$ac_cv_host
718 host_alias=$ac_cv_host_alias
719 host_cpu=$ac_cv_host_cpu
720 host_vendor=$ac_cv_host_vendor
721 host_os=$ac_cv_host_os
722
723
724
725
726
727 echo $ac_n "checking target system type""... $ac_c" 1>&6
728 echo "configure:729: checking target system type" >&5
729 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
730
731 # Make sure we can run config.sub.
732   if $ac_config_sub sun4 >/dev/null 2>&1; then :
733     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
734   fi
735
736   ac_cv_target_alias=$target
737   case "$ac_cv_target_alias" in
738   NONE)
739     case $nonopt in
740     NONE)
741       ac_cv_target_alias=$host_alias ;;
742
743     *) ac_cv_target_alias=$nonopt ;;
744     esac ;;
745   esac
746
747   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
748   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
749   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
750   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
751 else
752   echo $ac_n "(cached) $ac_c" 1>&6
753 fi
754
755 echo "$ac_t""$ac_cv_target" 1>&6
756
757 target=$ac_cv_target
758 target_alias=$ac_cv_target_alias
759 target_cpu=$ac_cv_target_cpu
760 target_vendor=$ac_cv_target_vendor
761 target_os=$ac_cv_target_os
762
763
764
765
766
767 echo $ac_n "checking build system type""... $ac_c" 1>&6
768 echo "configure:769: checking build system type" >&5
769 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
770
771 # Make sure we can run config.sub.
772   if $ac_config_sub sun4 >/dev/null 2>&1; then :
773     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
774   fi
775
776   ac_cv_build_alias=$build
777   case "$ac_cv_build_alias" in
778   NONE)
779     case $nonopt in
780     NONE)
781       ac_cv_build_alias=$host_alias ;;
782
783     *) ac_cv_build_alias=$nonopt ;;
784     esac ;;
785   esac
786
787   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
788   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
789   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
790   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
791 else
792   echo $ac_n "(cached) $ac_c" 1>&6
793 fi
794
795 echo "$ac_t""$ac_cv_build" 1>&6
796
797 build=$ac_cv_build
798 build_alias=$ac_cv_build_alias
799 build_cpu=$ac_cv_build_cpu
800 build_vendor=$ac_cv_build_vendor
801 build_os=$ac_cv_build_os
802
803
804
805
806
807 # Do some error checking and defaulting for the host and target type.
808 # The inputs are:
809 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
810 #
811 # The rules are:
812 # 1. You are not allowed to specify --host, --target, and nonopt at the
813 #    same time.
814 # 2. Host defaults to nonopt.
815 # 3. If nonopt is not specified, then host defaults to the current host,
816 #    as determined by config.guess.
817 # 4. Target and build default to nonopt.
818 # 5. If nonopt is not specified, then target and build default to host.
819
820 # The aliases save the names the user supplied, while $host etc.
821 # will get canonicalized.
822 case $host---$target---$nonopt in
823 NONE---*---* | *---NONE---* | *---*---NONE) ;;
824 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
825 esac
826
827 test "$host_alias" != "$target_alias" &&
828   test "$program_prefix$program_suffix$program_transform_name" = \
829     NONENONEs,x,x, &&
830   program_prefix=${target_alias}-
831
832
833 # Find a good install program.  We prefer a C program (faster),
834 # so one script is as good as another.  But avoid the broken or
835 # incompatible versions:
836 # SysV /etc/install, /usr/sbin/install
837 # SunOS /usr/etc/install
838 # IRIX /sbin/install
839 # AIX /bin/install
840 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
841 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
842 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
843 # ./install, which can be erroneously created by make from ./install.sh.
844 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
845 echo "configure:846: checking for a BSD compatible install" >&5
846 if test -z "$INSTALL"; then
847 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
848   echo $ac_n "(cached) $ac_c" 1>&6
849 else
850     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
851   for ac_dir in $PATH; do
852     # Account for people who put trailing slashes in PATH elements.
853     case "$ac_dir/" in
854     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
855     *)
856       # OSF1 and SCO ODT 3.0 have their own names for install.
857       # Don't use installbsd from OSF since it installs stuff as root
858       # by default.
859       for ac_prog in ginstall scoinst install; do
860         if test -f $ac_dir/$ac_prog; then
861           if test $ac_prog = install &&
862             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
863             # AIX install.  It has an incompatible calling convention.
864             :
865           elif test $ac_prog = install &&
866             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
867             # program-specific install script used by HP pwplus--don't use.
868             :
869           else
870             ac_cv_path_install="$ac_dir/$ac_prog -c"
871             break 2
872           fi
873         fi
874       done
875       ;;
876     esac
877   done
878   IFS="$ac_save_IFS"
879
880 fi
881   if test "${ac_cv_path_install+set}" = set; then
882     INSTALL="$ac_cv_path_install"
883   else
884     # As a last resort, use the slow shell script.  We don't cache a
885     # path for INSTALL within a source directory, because that will
886     # break other packages using the cache if that directory is
887     # removed, or if the path is relative.
888     INSTALL="$ac_install_sh"
889   fi
890 fi
891 echo "$ac_t""$INSTALL" 1>&6
892
893 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
894 # It thinks the first close brace ends the variable substitution.
895 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
896
897 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
898
899 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
900
901 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
902 echo "configure:903: checking whether build environment is sane" >&5
903 # Just in case
904 sleep 1
905 echo timestamp > conftestfile
906 # Do `set' in a subshell so we don't clobber the current shell's
907 # arguments.  Must try -L first in case configure is actually a
908 # symlink; some systems play weird games with the mod time of symlinks
909 # (eg FreeBSD returns the mod time of the symlink's containing
910 # directory).
911 if (
912    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
913    if test "$*" = "X"; then
914       # -L didn't work.
915       set X `ls -t $srcdir/configure conftestfile`
916    fi
917    if test "$*" != "X $srcdir/configure conftestfile" \
918       && test "$*" != "X conftestfile $srcdir/configure"; then
919
920       # If neither matched, then we have a broken ls.  This can happen
921       # if, for instance, CONFIG_SHELL is bash and it inherits a
922       # broken ls alias from the environment.  This has actually
923       # happened.  Such a system could not be considered "sane".
924       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
925 alias in your environment" 1>&2; exit 1; }
926    fi
927
928    test "$2" = conftestfile
929    )
930 then
931    # Ok.
932    :
933 else
934    { echo "configure: error: newly created file is older than distributed files!
935 Check your system clock" 1>&2; exit 1; }
936 fi
937 rm -f conftest*
938 echo "$ac_t""yes" 1>&6
939 if test "$program_transform_name" = s,x,x,; then
940   program_transform_name=
941 else
942   # Double any \ or $.  echo might interpret backslashes.
943   cat <<\EOF_SED > conftestsed
944 s,\\,\\\\,g; s,\$,$$,g
945 EOF_SED
946   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
947   rm -f conftestsed
948 fi
949 test "$program_prefix" != NONE &&
950   program_transform_name="s,^,${program_prefix},;$program_transform_name"
951 # Use a double $ so make ignores it.
952 test "$program_suffix" != NONE &&
953   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
954
955 # sed with no file args requires a program.
956 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
957
958 for ac_prog in mawk gawk nawk awk
959 do
960 # Extract the first word of "$ac_prog", so it can be a program name with args.
961 set dummy $ac_prog; ac_word=$2
962 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
963 echo "configure:964: checking for $ac_word" >&5
964 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
965   echo $ac_n "(cached) $ac_c" 1>&6
966 else
967   if test -n "$AWK"; then
968   ac_cv_prog_AWK="$AWK" # Let the user override the test.
969 else
970   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
971   ac_dummy="$PATH"
972   for ac_dir in $ac_dummy; do
973     test -z "$ac_dir" && ac_dir=.
974     if test -f $ac_dir/$ac_word; then
975       ac_cv_prog_AWK="$ac_prog"
976       break
977     fi
978   done
979   IFS="$ac_save_ifs"
980 fi
981 fi
982 AWK="$ac_cv_prog_AWK"
983 if test -n "$AWK"; then
984   echo "$ac_t""$AWK" 1>&6
985 else
986   echo "$ac_t""no" 1>&6
987 fi
988
989 test -n "$AWK" && break
990 done
991
992 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
993 echo "configure:994: checking whether ${MAKE-make} sets \${MAKE}" >&5
994 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
995 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
996   echo $ac_n "(cached) $ac_c" 1>&6
997 else
998   cat > conftestmake <<\EOF
999 all:
1000         @echo 'ac_maketemp="${MAKE}"'
1001 EOF
1002 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1003 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1004 if test -n "$ac_maketemp"; then
1005   eval ac_cv_prog_make_${ac_make}_set=yes
1006 else
1007   eval ac_cv_prog_make_${ac_make}_set=no
1008 fi
1009 rm -f conftestmake
1010 fi
1011 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1012   echo "$ac_t""yes" 1>&6
1013   SET_MAKE=
1014 else
1015   echo "$ac_t""no" 1>&6
1016   SET_MAKE="MAKE=${MAKE-make}"
1017 fi
1018
1019
1020
1021 PACKAGE=OpenLDAP
1022
1023 VERSION=$OL_VERSION
1024
1025 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1026   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1027 fi
1028
1029
1030
1031 missing_dir=`cd $ac_aux_dir && pwd`
1032 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1033 echo "configure:1034: checking for working aclocal" >&5
1034 # Run test in a subshell; some versions of sh will print an error if
1035 # an executable is not found, even if stderr is redirected.
1036 # Redirect stdin to placate older versions of autoconf.  Sigh.
1037 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1038    ACLOCAL=aclocal
1039    echo "$ac_t""found" 1>&6
1040 else
1041    ACLOCAL="$missing_dir/missing aclocal"
1042    echo "$ac_t""missing" 1>&6
1043 fi
1044
1045 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1046 echo "configure:1047: checking for working autoconf" >&5
1047 # Run test in a subshell; some versions of sh will print an error if
1048 # an executable is not found, even if stderr is redirected.
1049 # Redirect stdin to placate older versions of autoconf.  Sigh.
1050 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1051    AUTOCONF=autoconf
1052    echo "$ac_t""found" 1>&6
1053 else
1054    AUTOCONF="$missing_dir/missing autoconf"
1055    echo "$ac_t""missing" 1>&6
1056 fi
1057
1058 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1059 echo "configure:1060: checking for working automake" >&5
1060 # Run test in a subshell; some versions of sh will print an error if
1061 # an executable is not found, even if stderr is redirected.
1062 # Redirect stdin to placate older versions of autoconf.  Sigh.
1063 if (automake --version) < /dev/null > /dev/null 2>&1; then
1064    AUTOMAKE=automake
1065    echo "$ac_t""found" 1>&6
1066 else
1067    AUTOMAKE="$missing_dir/missing automake"
1068    echo "$ac_t""missing" 1>&6
1069 fi
1070
1071 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1072 echo "configure:1073: checking for working autoheader" >&5
1073 # Run test in a subshell; some versions of sh will print an error if
1074 # an executable is not found, even if stderr is redirected.
1075 # Redirect stdin to placate older versions of autoconf.  Sigh.
1076 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1077    AUTOHEADER=autoheader
1078    echo "$ac_t""found" 1>&6
1079 else
1080    AUTOHEADER="$missing_dir/missing autoheader"
1081    echo "$ac_t""missing" 1>&6
1082 fi
1083
1084 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1085 echo "configure:1086: checking for working makeinfo" >&5
1086 # Run test in a subshell; some versions of sh will print an error if
1087 # an executable is not found, even if stderr is redirected.
1088 # Redirect stdin to placate older versions of autoconf.  Sigh.
1089 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1090    MAKEINFO=makeinfo
1091    echo "$ac_t""found" 1>&6
1092 else
1093    MAKEINFO="$missing_dir/missing makeinfo"
1094    echo "$ac_t""missing" 1>&6
1095 fi
1096
1097 install_sh="$missing_dir/install-sh"
1098 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1099
1100 for ac_prog in gnutar gtar tar
1101 do
1102 # Extract the first word of "$ac_prog", so it can be a program name with args.
1103 set dummy $ac_prog; ac_word=$2
1104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1105 echo "configure:1106: checking for $ac_word" >&5
1106 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1107   echo $ac_n "(cached) $ac_c" 1>&6
1108 else
1109   if test -n "$AMTAR"; then
1110   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1111 else
1112   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1113   ac_dummy="$PATH"
1114   for ac_dir in $ac_dummy; do
1115     test -z "$ac_dir" && ac_dir=.
1116     if test -f $ac_dir/$ac_word; then
1117       ac_cv_prog_AMTAR="$ac_prog"
1118       break
1119     fi
1120   done
1121   IFS="$ac_save_ifs"
1122 fi
1123 fi
1124 AMTAR="$ac_cv_prog_AMTAR"
1125 if test -n "$AMTAR"; then
1126   echo "$ac_t""$AMTAR" 1>&6
1127 else
1128   echo "$ac_t""no" 1>&6
1129 fi
1130
1131 test -n "$AMTAR" && break
1132 done
1133
1134
1135 AMTARFLAGS=
1136 if test -n "$AMTAR"; then
1137   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1138         AMTARFLAGS=o
1139   fi
1140 fi
1141
1142
1143
1144 cat >> confdefs.h <<EOF
1145 #define OPENLDAP_PACKAGE "$PACKAGE"
1146 EOF
1147
1148 cat >> confdefs.h <<EOF
1149 #define OPENLDAP_VERSION "$VERSION"
1150 EOF
1151
1152
1153
1154
1155 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1156 echo "configure:1157: checking configure arguments" >&5
1157
1158
1159 top_builddir=`pwd`
1160
1161 ldap_subdir="/openldap"
1162
1163 # Check whether --with-subdir or --without-subdir was given.
1164 if test "${with_subdir+set}" = set; then
1165   withval="$with_subdir"
1166   case "$withval" in
1167         no) ldap_subdir=""
1168                 ;;
1169         yes)
1170                 ;;
1171         /*|\\*)
1172                 ldap_subdir="$withval"
1173                 ;;
1174         *)
1175                 ldap_subdir="/$withval"
1176                 ;;
1177 esac
1178
1179 fi
1180
1181
1182 # OpenLDAP --enable-debug
1183         # Check whether --enable-debug or --disable-debug was given.
1184 if test "${enable_debug+set}" = set; then
1185   enableval="$enable_debug"
1186   
1187         ol_arg=invalid
1188         for ol_val in auto yes no ; do
1189                 if test "$enableval" = "$ol_val" ; then
1190                         ol_arg="$ol_val"
1191                 fi
1192         done
1193         if test "$ol_arg" = "invalid" ; then
1194                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1195         fi
1196         ol_enable_debug="$ol_arg"
1197
1198 else
1199         ol_enable_debug="yes"
1200 fi
1201 # end --enable-debug
1202 # OpenLDAP --enable-syslog
1203         # Check whether --enable-syslog or --disable-syslog was given.
1204 if test "${enable_syslog+set}" = set; then
1205   enableval="$enable_syslog"
1206   
1207         ol_arg=invalid
1208         for ol_val in auto yes no ; do
1209                 if test "$enableval" = "$ol_val" ; then
1210                         ol_arg="$ol_val"
1211                 fi
1212         done
1213         if test "$ol_arg" = "invalid" ; then
1214                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1215         fi
1216         ol_enable_syslog="$ol_arg"
1217
1218 else
1219         ol_enable_syslog="auto"
1220 fi
1221 # end --enable-syslog
1222 # OpenLDAP --enable-proctitle
1223         # Check whether --enable-proctitle or --disable-proctitle was given.
1224 if test "${enable_proctitle+set}" = set; then
1225   enableval="$enable_proctitle"
1226   
1227         ol_arg=invalid
1228         for ol_val in auto yes no ; do
1229                 if test "$enableval" = "$ol_val" ; then
1230                         ol_arg="$ol_val"
1231                 fi
1232         done
1233         if test "$ol_arg" = "invalid" ; then
1234                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1235         fi
1236         ol_enable_proctitle="$ol_arg"
1237
1238 else
1239         ol_enable_proctitle="yes"
1240 fi
1241 # end --enable-proctitle
1242 # OpenLDAP --enable-cache
1243         # Check whether --enable-cache or --disable-cache was given.
1244 if test "${enable_cache+set}" = set; then
1245   enableval="$enable_cache"
1246   
1247         ol_arg=invalid
1248         for ol_val in auto yes no ; do
1249                 if test "$enableval" = "$ol_val" ; then
1250                         ol_arg="$ol_val"
1251                 fi
1252         done
1253         if test "$ol_arg" = "invalid" ; then
1254                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1255         fi
1256         ol_enable_cache="$ol_arg"
1257
1258 else
1259         ol_enable_cache="yes"
1260 fi
1261 # end --enable-cache
1262 # OpenLDAP --enable-dns
1263         # Check whether --enable-dns or --disable-dns was given.
1264 if test "${enable_dns+set}" = set; then
1265   enableval="$enable_dns"
1266   
1267         ol_arg=invalid
1268         for ol_val in auto yes no ; do
1269                 if test "$enableval" = "$ol_val" ; then
1270                         ol_arg="$ol_val"
1271                 fi
1272         done
1273         if test "$ol_arg" = "invalid" ; then
1274                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1275         fi
1276         ol_enable_dns="$ol_arg"
1277
1278 else
1279         ol_enable_dns="no"
1280 fi
1281 # end --enable-dns
1282 # OpenLDAP --enable-referrals
1283         # Check whether --enable-referrals or --disable-referrals was given.
1284 if test "${enable_referrals+set}" = set; then
1285   enableval="$enable_referrals"
1286   
1287         ol_arg=invalid
1288         for ol_val in auto yes no ; do
1289                 if test "$enableval" = "$ol_val" ; then
1290                         ol_arg="$ol_val"
1291                 fi
1292         done
1293         if test "$ol_arg" = "invalid" ; then
1294                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1295         fi
1296         ol_enable_referrals="$ol_arg"
1297
1298 else
1299         ol_enable_referrals="yes"
1300 fi
1301 # end --enable-referrals
1302 # OpenLDAP --enable-kbind
1303         # Check whether --enable-kbind or --disable-kbind was given.
1304 if test "${enable_kbind+set}" = set; then
1305   enableval="$enable_kbind"
1306   
1307         ol_arg=invalid
1308         for ol_val in auto yes no ; do
1309                 if test "$enableval" = "$ol_val" ; then
1310                         ol_arg="$ol_val"
1311                 fi
1312         done
1313         if test "$ol_arg" = "invalid" ; then
1314                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1315         fi
1316         ol_enable_kbind="$ol_arg"
1317
1318 else
1319         ol_enable_kbind="auto"
1320 fi
1321 # end --enable-kbind
1322 # OpenLDAP --enable-cldap
1323         # Check whether --enable-cldap or --disable-cldap was given.
1324 if test "${enable_cldap+set}" = set; then
1325   enableval="$enable_cldap"
1326   
1327         ol_arg=invalid
1328         for ol_val in auto yes no ; do
1329                 if test "$enableval" = "$ol_val" ; then
1330                         ol_arg="$ol_val"
1331                 fi
1332         done
1333         if test "$ol_arg" = "invalid" ; then
1334                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1335         fi
1336         ol_enable_cldap="$ol_arg"
1337
1338 else
1339         ol_enable_cldap="no"
1340 fi
1341 # end --enable-cldap
1342 # OpenLDAP --enable-ldapi
1343         # Check whether --enable-ldapi or --disable-ldapi was given.
1344 if test "${enable_ldapi+set}" = set; then
1345   enableval="$enable_ldapi"
1346   
1347         ol_arg=invalid
1348         for ol_val in auto yes no ; do
1349                 if test "$enableval" = "$ol_val" ; then
1350                         ol_arg="$ol_val"
1351                 fi
1352         done
1353         if test "$ol_arg" = "invalid" ; then
1354                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1355         fi
1356         ol_enable_ldapi="$ol_arg"
1357
1358 else
1359         ol_enable_ldapi="no"
1360 fi
1361 # end --enable-ldapi
1362 # OpenLDAP --enable-x_compile
1363         # Check whether --enable-x_compile or --disable-x_compile was given.
1364 if test "${enable_x_compile+set}" = set; then
1365   enableval="$enable_x_compile"
1366   
1367         ol_arg=invalid
1368         for ol_val in yes no ; do
1369                 if test "$enableval" = "$ol_val" ; then
1370                         ol_arg="$ol_val"
1371                 fi
1372         done
1373         if test "$ol_arg" = "invalid" ; then
1374                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1375         fi
1376         ol_enable_x_compile="$ol_arg"
1377
1378 else
1379         ol_enable_x_compile="no"
1380 fi
1381 # end --enable-x_compile
1382
1383 # OpenLDAP --enable-dmalloc
1384         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1385 if test "${enable_dmalloc+set}" = set; then
1386   enableval="$enable_dmalloc"
1387   
1388         ol_arg=invalid
1389         for ol_val in auto yes no ; do
1390                 if test "$enableval" = "$ol_val" ; then
1391                         ol_arg="$ol_val"
1392                 fi
1393         done
1394         if test "$ol_arg" = "invalid" ; then
1395                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1396         fi
1397         ol_enable_dmalloc="$ol_arg"
1398
1399 else
1400         ol_enable_dmalloc="no"
1401 fi
1402 # end --enable-dmalloc
1403
1404 # OpenLDAP --with-cyrus_sasl
1405         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1406 if test "${with_cyrus_sasl+set}" = set; then
1407   withval="$with_cyrus_sasl"
1408   
1409         ol_arg=invalid
1410         for ol_val in auto yes no  ; do
1411                 if test "$withval" = "$ol_val" ; then
1412                         ol_arg="$ol_val"
1413                 fi
1414         done
1415         if test "$ol_arg" = "invalid" ; then
1416                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1417         fi
1418         ol_with_cyrus_sasl="$ol_arg"
1419
1420 else
1421         ol_with_cyrus_sasl="auto"
1422 fi
1423 # end --with-cyrus_sasl
1424
1425 # OpenLDAP --with-fetch
1426         # Check whether --with-fetch or --without-fetch was given.
1427 if test "${with_fetch+set}" = set; then
1428   withval="$with_fetch"
1429   
1430         ol_arg=invalid
1431         for ol_val in auto yes no  ; do
1432                 if test "$withval" = "$ol_val" ; then
1433                         ol_arg="$ol_val"
1434                 fi
1435         done
1436         if test "$ol_arg" = "invalid" ; then
1437                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1438         fi
1439         ol_with_fetch="$ol_arg"
1440
1441 else
1442         ol_with_fetch="auto"
1443 fi
1444 # end --with-fetch
1445
1446 # OpenLDAP --with-kerberos
1447         # Check whether --with-kerberos or --without-kerberos was given.
1448 if test "${with_kerberos+set}" = set; then
1449   withval="$with_kerberos"
1450   
1451         ol_arg=invalid
1452         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1453                 if test "$withval" = "$ol_val" ; then
1454                         ol_arg="$ol_val"
1455                 fi
1456         done
1457         if test "$ol_arg" = "invalid" ; then
1458                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1459         fi
1460         ol_with_kerberos="$ol_arg"
1461
1462 else
1463         ol_with_kerberos="auto"
1464 fi
1465 # end --with-kerberos
1466
1467 # OpenLDAP --with-readline
1468         # Check whether --with-readline or --without-readline was given.
1469 if test "${with_readline+set}" = set; then
1470   withval="$with_readline"
1471   
1472         ol_arg=invalid
1473         for ol_val in auto yes no  ; do
1474                 if test "$withval" = "$ol_val" ; then
1475                         ol_arg="$ol_val"
1476                 fi
1477         done
1478         if test "$ol_arg" = "invalid" ; then
1479                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1480         fi
1481         ol_with_readline="$ol_arg"
1482
1483 else
1484         ol_with_readline="auto"
1485 fi
1486 # end --with-readline
1487
1488 # OpenLDAP --with-threads
1489         # Check whether --with-threads or --without-threads was given.
1490 if test "${with_threads+set}" = set; then
1491   withval="$with_threads"
1492   
1493         ol_arg=invalid
1494         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1495                 if test "$withval" = "$ol_val" ; then
1496                         ol_arg="$ol_val"
1497                 fi
1498         done
1499         if test "$ol_arg" = "invalid" ; then
1500                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1501         fi
1502         ol_with_threads="$ol_arg"
1503
1504 else
1505         ol_with_threads="auto"
1506 fi
1507 # end --with-threads
1508
1509 # OpenLDAP --with-tls
1510         # Check whether --with-tls or --without-tls was given.
1511 if test "${with_tls+set}" = set; then
1512   withval="$with_tls"
1513   
1514         ol_arg=invalid
1515         for ol_val in auto ssleay openssl yes no  ; do
1516                 if test "$withval" = "$ol_val" ; then
1517                         ol_arg="$ol_val"
1518                 fi
1519         done
1520         if test "$ol_arg" = "invalid" ; then
1521                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1522         fi
1523         ol_with_tls="$ol_arg"
1524
1525 else
1526         ol_with_tls="auto"
1527 fi
1528 # end --with-tls
1529
1530 # OpenLDAP --with-yielding_select
1531         # Check whether --with-yielding_select or --without-yielding_select was given.
1532 if test "${with_yielding_select+set}" = set; then
1533   withval="$with_yielding_select"
1534   
1535         ol_arg=invalid
1536         for ol_val in auto yes no manual  ; do
1537                 if test "$withval" = "$ol_val" ; then
1538                         ol_arg="$ol_val"
1539                 fi
1540         done
1541         if test "$ol_arg" = "invalid" ; then
1542                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1543         fi
1544         ol_with_yielding_select="$ol_arg"
1545
1546 else
1547         ol_with_yielding_select="auto"
1548 fi
1549 # end --with-yielding_select
1550
1551
1552 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1553 if test "${with_xxldapdoptions+set}" = set; then
1554   withval="$with_xxldapdoptions"
1555   :
1556 fi
1557
1558 # OpenLDAP --enable-ldapd
1559         # Check whether --enable-ldapd or --disable-ldapd was given.
1560 if test "${enable_ldapd+set}" = set; then
1561   enableval="$enable_ldapd"
1562   
1563         ol_arg=invalid
1564         for ol_val in auto yes no ; do
1565                 if test "$enableval" = "$ol_val" ; then
1566                         ol_arg="$ol_val"
1567                 fi
1568         done
1569         if test "$ol_arg" = "invalid" ; then
1570                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1571         fi
1572         ol_enable_ldapd="$ol_arg"
1573
1574 else
1575         ol_enable_ldapd="no"
1576 fi
1577 # end --enable-ldapd
1578
1579 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1580 if test "${with_xxslapdoptions+set}" = set; then
1581   withval="$with_xxslapdoptions"
1582   :
1583 fi
1584
1585 # OpenLDAP --enable-slapd
1586         # Check whether --enable-slapd or --disable-slapd was given.
1587 if test "${enable_slapd+set}" = set; then
1588   enableval="$enable_slapd"
1589   
1590         ol_arg=invalid
1591         for ol_val in auto yes no ; do
1592                 if test "$enableval" = "$ol_val" ; then
1593                         ol_arg="$ol_val"
1594                 fi
1595         done
1596         if test "$ol_arg" = "invalid" ; then
1597                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1598         fi
1599         ol_enable_slapd="$ol_arg"
1600
1601 else
1602         ol_enable_slapd="yes"
1603 fi
1604 # end --enable-slapd
1605 # OpenLDAP --enable-cleartext
1606         # Check whether --enable-cleartext or --disable-cleartext was given.
1607 if test "${enable_cleartext+set}" = set; then
1608   enableval="$enable_cleartext"
1609   
1610         ol_arg=invalid
1611         for ol_val in auto yes no ; do
1612                 if test "$enableval" = "$ol_val" ; then
1613                         ol_arg="$ol_val"
1614                 fi
1615         done
1616         if test "$ol_arg" = "invalid" ; then
1617                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1618         fi
1619         ol_enable_cleartext="$ol_arg"
1620
1621 else
1622         ol_enable_cleartext="yes"
1623 fi
1624 # end --enable-cleartext
1625 # OpenLDAP --enable-crypt
1626         # Check whether --enable-crypt or --disable-crypt was given.
1627 if test "${enable_crypt+set}" = set; then
1628   enableval="$enable_crypt"
1629   
1630         ol_arg=invalid
1631         for ol_val in auto yes no ; do
1632                 if test "$enableval" = "$ol_val" ; then
1633                         ol_arg="$ol_val"
1634                 fi
1635         done
1636         if test "$ol_arg" = "invalid" ; then
1637                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1638         fi
1639         ol_enable_crypt="$ol_arg"
1640
1641 else
1642         ol_enable_crypt="auto"
1643 fi
1644 # end --enable-crypt
1645 # OpenLDAP --enable-kpasswd
1646         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1647 if test "${enable_kpasswd+set}" = set; then
1648   enableval="$enable_kpasswd"
1649   
1650         ol_arg=invalid
1651         for ol_val in auto yes no ; do
1652                 if test "$enableval" = "$ol_val" ; then
1653                         ol_arg="$ol_val"
1654                 fi
1655         done
1656         if test "$ol_arg" = "invalid" ; then
1657                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1658         fi
1659         ol_enable_kpasswd="$ol_arg"
1660
1661 else
1662         ol_enable_kpasswd="no"
1663 fi
1664 # end --enable-kpasswd
1665 # OpenLDAP --enable-spasswd
1666         # Check whether --enable-spasswd or --disable-spasswd was given.
1667 if test "${enable_spasswd+set}" = set; then
1668   enableval="$enable_spasswd"
1669   
1670         ol_arg=invalid
1671         for ol_val in auto yes no ; do
1672                 if test "$enableval" = "$ol_val" ; then
1673                         ol_arg="$ol_val"
1674                 fi
1675         done
1676         if test "$ol_arg" = "invalid" ; then
1677                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1678         fi
1679         ol_enable_spasswd="$ol_arg"
1680
1681 else
1682         ol_enable_spasswd="no"
1683 fi
1684 # end --enable-spasswd
1685 # OpenLDAP --enable-modules
1686         # Check whether --enable-modules or --disable-modules was given.
1687 if test "${enable_modules+set}" = set; then
1688   enableval="$enable_modules"
1689   
1690         ol_arg=invalid
1691         for ol_val in auto yes no ; do
1692                 if test "$enableval" = "$ol_val" ; then
1693                         ol_arg="$ol_val"
1694                 fi
1695         done
1696         if test "$ol_arg" = "invalid" ; then
1697                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1698         fi
1699         ol_enable_modules="$ol_arg"
1700
1701 else
1702         ol_enable_modules="no"
1703 fi
1704 # end --enable-modules
1705 # OpenLDAP --enable-multimaster
1706         # Check whether --enable-multimaster or --disable-multimaster was given.
1707 if test "${enable_multimaster+set}" = set; then
1708   enableval="$enable_multimaster"
1709   
1710         ol_arg=invalid
1711         for ol_val in auto yes no ; do
1712                 if test "$enableval" = "$ol_val" ; then
1713                         ol_arg="$ol_val"
1714                 fi
1715         done
1716         if test "$ol_arg" = "invalid" ; then
1717                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1718         fi
1719         ol_enable_multimaster="$ol_arg"
1720
1721 else
1722         ol_enable_multimaster="no"
1723 fi
1724 # end --enable-multimaster
1725 # OpenLDAP --enable-phonetic
1726         # Check whether --enable-phonetic or --disable-phonetic was given.
1727 if test "${enable_phonetic+set}" = set; then
1728   enableval="$enable_phonetic"
1729   
1730         ol_arg=invalid
1731         for ol_val in auto yes no ; do
1732                 if test "$enableval" = "$ol_val" ; then
1733                         ol_arg="$ol_val"
1734                 fi
1735         done
1736         if test "$ol_arg" = "invalid" ; then
1737                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1738         fi
1739         ol_enable_phonetic="$ol_arg"
1740
1741 else
1742         ol_enable_phonetic="no"
1743 fi
1744 # end --enable-phonetic
1745 # OpenLDAP --enable-quipu
1746         # Check whether --enable-quipu or --disable-quipu was given.
1747 if test "${enable_quipu+set}" = set; then
1748   enableval="$enable_quipu"
1749   
1750         ol_arg=invalid
1751         for ol_val in auto yes no ; do
1752                 if test "$enableval" = "$ol_val" ; then
1753                         ol_arg="$ol_val"
1754                 fi
1755         done
1756         if test "$ol_arg" = "invalid" ; then
1757                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1758         fi
1759         ol_enable_quipu="$ol_arg"
1760
1761 else
1762         ol_enable_quipu="no"
1763 fi
1764 # end --enable-quipu
1765 # OpenLDAP --enable-rlookups
1766         # Check whether --enable-rlookups or --disable-rlookups was given.
1767 if test "${enable_rlookups+set}" = set; then
1768   enableval="$enable_rlookups"
1769   
1770         ol_arg=invalid
1771         for ol_val in auto yes no ; do
1772                 if test "$enableval" = "$ol_val" ; then
1773                         ol_arg="$ol_val"
1774                 fi
1775         done
1776         if test "$ol_arg" = "invalid" ; then
1777                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1778         fi
1779         ol_enable_rlookups="$ol_arg"
1780
1781 else
1782         ol_enable_rlookups="auto"
1783 fi
1784 # end --enable-rlookups
1785 # OpenLDAP --enable-aci
1786         # Check whether --enable-aci or --disable-aci was given.
1787 if test "${enable_aci+set}" = set; then
1788   enableval="$enable_aci"
1789   
1790         ol_arg=invalid
1791         for ol_val in auto yes no ; do
1792                 if test "$enableval" = "$ol_val" ; then
1793                         ol_arg="$ol_val"
1794                 fi
1795         done
1796         if test "$ol_arg" = "invalid" ; then
1797                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1798         fi
1799         ol_enable_aci="$ol_arg"
1800
1801 else
1802         ol_enable_aci="no"
1803 fi
1804 # end --enable-aci
1805 # OpenLDAP --enable-wrappers
1806         # Check whether --enable-wrappers or --disable-wrappers was given.
1807 if test "${enable_wrappers+set}" = set; then
1808   enableval="$enable_wrappers"
1809   
1810         ol_arg=invalid
1811         for ol_val in auto yes no ; do
1812                 if test "$enableval" = "$ol_val" ; then
1813                         ol_arg="$ol_val"
1814                 fi
1815         done
1816         if test "$ol_arg" = "invalid" ; then
1817                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1818         fi
1819         ol_enable_wrappers="$ol_arg"
1820
1821 else
1822         ol_enable_wrappers="no"
1823 fi
1824 # end --enable-wrappers
1825 # OpenLDAP --enable-dynamic
1826         # Check whether --enable-dynamic or --disable-dynamic was given.
1827 if test "${enable_dynamic+set}" = set; then
1828   enableval="$enable_dynamic"
1829   
1830         ol_arg=invalid
1831         for ol_val in auto yes no ; do
1832                 if test "$enableval" = "$ol_val" ; then
1833                         ol_arg="$ol_val"
1834                 fi
1835         done
1836         if test "$ol_arg" = "invalid" ; then
1837                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1838         fi
1839         ol_enable_dynamic="$ol_arg"
1840
1841 else
1842         ol_enable_dynamic="no"
1843 fi
1844 # end --enable-dynamic
1845
1846 # OpenLDAP --enable-bdb2
1847         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1848 if test "${enable_bdb2+set}" = set; then
1849   enableval="$enable_bdb2"
1850   
1851         ol_arg=invalid
1852         for ol_val in auto yes no ; do
1853                 if test "$enableval" = "$ol_val" ; then
1854                         ol_arg="$ol_val"
1855                 fi
1856         done
1857         if test "$ol_arg" = "invalid" ; then
1858                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1859         fi
1860         ol_enable_bdb2="$ol_arg"
1861
1862 else
1863         ol_enable_bdb2="no"
1864 fi
1865 # end --enable-bdb2
1866 # OpenLDAP --with-bdb2_module
1867         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1868 if test "${with_bdb2_module+set}" = set; then
1869   withval="$with_bdb2_module"
1870   
1871         ol_arg=invalid
1872         for ol_val in static dynamic ; do
1873                 if test "$withval" = "$ol_val" ; then
1874                         ol_arg="$ol_val"
1875                 fi
1876         done
1877         if test "$ol_arg" = "invalid" ; then
1878                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1879         fi
1880         ol_with_bdb2_module="$ol_arg"
1881
1882 else
1883         ol_with_bdb2_module="static"
1884 fi
1885 # end --with-bdb2_module
1886
1887 # OpenLDAP --enable-dnssrv
1888         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1889 if test "${enable_dnssrv+set}" = set; then
1890   enableval="$enable_dnssrv"
1891   
1892         ol_arg=invalid
1893         for ol_val in auto yes no ; do
1894                 if test "$enableval" = "$ol_val" ; then
1895                         ol_arg="$ol_val"
1896                 fi
1897         done
1898         if test "$ol_arg" = "invalid" ; then
1899                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1900         fi
1901         ol_enable_dnssrv="$ol_arg"
1902
1903 else
1904         ol_enable_dnssrv="no"
1905 fi
1906 # end --enable-dnssrv
1907 # OpenLDAP --with-dnssrv_module
1908         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1909 if test "${with_dnssrv_module+set}" = set; then
1910   withval="$with_dnssrv_module"
1911   
1912         ol_arg=invalid
1913         for ol_val in static dynamic ; do
1914                 if test "$withval" = "$ol_val" ; then
1915                         ol_arg="$ol_val"
1916                 fi
1917         done
1918         if test "$ol_arg" = "invalid" ; then
1919                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1920         fi
1921         ol_with_dnssrv_module="$ol_arg"
1922
1923 else
1924         ol_with_dnssrv_module="static"
1925 fi
1926 # end --with-dnssrv_module
1927
1928 # OpenLDAP --enable-ldap
1929         # Check whether --enable-ldap or --disable-ldap was given.
1930 if test "${enable_ldap+set}" = set; then
1931   enableval="$enable_ldap"
1932   
1933         ol_arg=invalid
1934         for ol_val in auto yes no ; do
1935                 if test "$enableval" = "$ol_val" ; then
1936                         ol_arg="$ol_val"
1937                 fi
1938         done
1939         if test "$ol_arg" = "invalid" ; then
1940                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1941         fi
1942         ol_enable_ldap="$ol_arg"
1943
1944 else
1945         ol_enable_ldap="no"
1946 fi
1947 # end --enable-ldap
1948 # OpenLDAP --with-ldap_module
1949         # Check whether --with-ldap_module or --without-ldap_module was given.
1950 if test "${with_ldap_module+set}" = set; then
1951   withval="$with_ldap_module"
1952   
1953         ol_arg=invalid
1954         for ol_val in static dynamic ; do
1955                 if test "$withval" = "$ol_val" ; then
1956                         ol_arg="$ol_val"
1957                 fi
1958         done
1959         if test "$ol_arg" = "invalid" ; then
1960                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1961         fi
1962         ol_with_ldap_module="$ol_arg"
1963
1964 else
1965         ol_with_ldap_module="static"
1966 fi
1967 # end --with-ldap_module
1968
1969 # OpenLDAP --enable-ldbm
1970         # Check whether --enable-ldbm or --disable-ldbm was given.
1971 if test "${enable_ldbm+set}" = set; then
1972   enableval="$enable_ldbm"
1973   
1974         ol_arg=invalid
1975         for ol_val in auto yes no ; do
1976                 if test "$enableval" = "$ol_val" ; then
1977                         ol_arg="$ol_val"
1978                 fi
1979         done
1980         if test "$ol_arg" = "invalid" ; then
1981                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1982         fi
1983         ol_enable_ldbm="$ol_arg"
1984
1985 else
1986         ol_enable_ldbm="yes"
1987 fi
1988 # end --enable-ldbm
1989 # OpenLDAP --with-ldbm_api
1990         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1991 if test "${with_ldbm_api+set}" = set; then
1992   withval="$with_ldbm_api"
1993   
1994         ol_arg=invalid
1995         for ol_val in auto db2 db mdbm gdbm manual ; do
1996                 if test "$withval" = "$ol_val" ; then
1997                         ol_arg="$ol_val"
1998                 fi
1999         done
2000         if test "$ol_arg" = "invalid" ; then
2001                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2002         fi
2003         ol_with_ldbm_api="$ol_arg"
2004
2005 else
2006         ol_with_ldbm_api="auto"
2007 fi
2008 # end --with-ldbm_api
2009
2010 # OpenLDAP --with-ldbm_module
2011         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2012 if test "${with_ldbm_module+set}" = set; then
2013   withval="$with_ldbm_module"
2014   
2015         ol_arg=invalid
2016         for ol_val in static dynamic ; do
2017                 if test "$withval" = "$ol_val" ; then
2018                         ol_arg="$ol_val"
2019                 fi
2020         done
2021         if test "$ol_arg" = "invalid" ; then
2022                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2023         fi
2024         ol_with_ldbm_module="$ol_arg"
2025
2026 else
2027         ol_with_ldbm_module="static"
2028 fi
2029 # end --with-ldbm_module
2030
2031 # OpenLDAP --with-ldbm_type
2032         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2033 if test "${with_ldbm_type+set}" = set; then
2034   withval="$with_ldbm_type"
2035   
2036         ol_arg=invalid
2037         for ol_val in auto btree hash ; do
2038                 if test "$withval" = "$ol_val" ; then
2039                         ol_arg="$ol_val"
2040                 fi
2041         done
2042         if test "$ol_arg" = "invalid" ; then
2043                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2044         fi
2045         ol_with_ldbm_type="$ol_arg"
2046
2047 else
2048         ol_with_ldbm_type="auto"
2049 fi
2050 # end --with-ldbm_type
2051
2052 # OpenLDAP --enable-passwd
2053         # Check whether --enable-passwd or --disable-passwd was given.
2054 if test "${enable_passwd+set}" = set; then
2055   enableval="$enable_passwd"
2056   
2057         ol_arg=invalid
2058         for ol_val in auto yes no ; do
2059                 if test "$enableval" = "$ol_val" ; then
2060                         ol_arg="$ol_val"
2061                 fi
2062         done
2063         if test "$ol_arg" = "invalid" ; then
2064                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2065         fi
2066         ol_enable_passwd="$ol_arg"
2067
2068 else
2069         ol_enable_passwd="no"
2070 fi
2071 # end --enable-passwd
2072 # OpenLDAP --with-passwd_module
2073         # Check whether --with-passwd_module or --without-passwd_module was given.
2074 if test "${with_passwd_module+set}" = set; then
2075   withval="$with_passwd_module"
2076   
2077         ol_arg=invalid
2078         for ol_val in static dynamic ; do
2079                 if test "$withval" = "$ol_val" ; then
2080                         ol_arg="$ol_val"
2081                 fi
2082         done
2083         if test "$ol_arg" = "invalid" ; then
2084                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2085         fi
2086         ol_with_passwd_module="$ol_arg"
2087
2088 else
2089         ol_with_passwd_module="static"
2090 fi
2091 # end --with-passwd_module
2092
2093 # OpenLDAP --enable-perl
2094         # Check whether --enable-perl or --disable-perl was given.
2095 if test "${enable_perl+set}" = set; then
2096   enableval="$enable_perl"
2097   
2098         ol_arg=invalid
2099         for ol_val in auto yes no ; do
2100                 if test "$enableval" = "$ol_val" ; then
2101                         ol_arg="$ol_val"
2102                 fi
2103         done
2104         if test "$ol_arg" = "invalid" ; then
2105                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2106         fi
2107         ol_enable_perl="$ol_arg"
2108
2109 else
2110         ol_enable_perl="no"
2111 fi
2112 # end --enable-perl
2113 # OpenLDAP --with-perl_module
2114         # Check whether --with-perl_module or --without-perl_module was given.
2115 if test "${with_perl_module+set}" = set; then
2116   withval="$with_perl_module"
2117   
2118         ol_arg=invalid
2119         for ol_val in static dynamic ; do
2120                 if test "$withval" = "$ol_val" ; then
2121                         ol_arg="$ol_val"
2122                 fi
2123         done
2124         if test "$ol_arg" = "invalid" ; then
2125                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2126         fi
2127         ol_with_perl_module="$ol_arg"
2128
2129 else
2130         ol_with_perl_module="static"
2131 fi
2132 # end --with-perl_module
2133
2134 # OpenLDAP --enable-shell
2135         # Check whether --enable-shell or --disable-shell was given.
2136 if test "${enable_shell+set}" = set; then
2137   enableval="$enable_shell"
2138   
2139         ol_arg=invalid
2140         for ol_val in auto yes no ; do
2141                 if test "$enableval" = "$ol_val" ; then
2142                         ol_arg="$ol_val"
2143                 fi
2144         done
2145         if test "$ol_arg" = "invalid" ; then
2146                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2147         fi
2148         ol_enable_shell="$ol_arg"
2149
2150 else
2151         ol_enable_shell="no"
2152 fi
2153 # end --enable-shell
2154 # OpenLDAP --with-shell_module
2155         # Check whether --with-shell_module or --without-shell_module was given.
2156 if test "${with_shell_module+set}" = set; then
2157   withval="$with_shell_module"
2158   
2159         ol_arg=invalid
2160         for ol_val in static dynamic ; do
2161                 if test "$withval" = "$ol_val" ; then
2162                         ol_arg="$ol_val"
2163                 fi
2164         done
2165         if test "$ol_arg" = "invalid" ; then
2166                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2167         fi
2168         ol_with_shell_module="$ol_arg"
2169
2170 else
2171         ol_with_shell_module="static"
2172 fi
2173 # end --with-shell_module
2174
2175 # OpenLDAP --enable-sql
2176         # Check whether --enable-sql or --disable-sql was given.
2177 if test "${enable_sql+set}" = set; then
2178   enableval="$enable_sql"
2179   
2180         ol_arg=invalid
2181         for ol_val in auto yes no ; do
2182                 if test "$enableval" = "$ol_val" ; then
2183                         ol_arg="$ol_val"
2184                 fi
2185         done
2186         if test "$ol_arg" = "invalid" ; then
2187                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2188         fi
2189         ol_enable_sql="$ol_arg"
2190
2191 else
2192         ol_enable_sql="no"
2193 fi
2194 # end --enable-sql
2195 # OpenLDAP --with-sql_module
2196         # Check whether --with-sql_module or --without-sql_module was given.
2197 if test "${with_sql_module+set}" = set; then
2198   withval="$with_sql_module"
2199   
2200         ol_arg=invalid
2201         for ol_val in static dynamic ; do
2202                 if test "$withval" = "$ol_val" ; then
2203                         ol_arg="$ol_val"
2204                 fi
2205         done
2206         if test "$ol_arg" = "invalid" ; then
2207                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2208         fi
2209         ol_with_sql_module="$ol_arg"
2210
2211 else
2212         ol_with_sql_module="static"
2213 fi
2214 # end --with-sql_module
2215
2216 # OpenLDAP --enable-tcl
2217         # Check whether --enable-tcl or --disable-tcl was given.
2218 if test "${enable_tcl+set}" = set; then
2219   enableval="$enable_tcl"
2220   
2221         ol_arg=invalid
2222         for ol_val in auto yes no ; do
2223                 if test "$enableval" = "$ol_val" ; then
2224                         ol_arg="$ol_val"
2225                 fi
2226         done
2227         if test "$ol_arg" = "invalid" ; then
2228                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2229         fi
2230         ol_enable_tcl="$ol_arg"
2231
2232 else
2233         ol_enable_tcl="no"
2234 fi
2235 # end --enable-tcl
2236 # OpenLDAP --with-tcl_module
2237         # Check whether --with-tcl_module or --without-tcl_module was given.
2238 if test "${with_tcl_module+set}" = set; then
2239   withval="$with_tcl_module"
2240   
2241         ol_arg=invalid
2242         for ol_val in static dynamic ; do
2243                 if test "$withval" = "$ol_val" ; then
2244                         ol_arg="$ol_val"
2245                 fi
2246         done
2247         if test "$ol_arg" = "invalid" ; then
2248                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2249         fi
2250         ol_with_tcl_module="$ol_arg"
2251
2252 else
2253         ol_with_tcl_module="static"
2254 fi
2255 # end --with-tcl_module
2256
2257
2258 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2259 if test "${with_xxslurpdoptions+set}" = set; then
2260   withval="$with_xxslurpdoptions"
2261   :
2262 fi
2263
2264 # OpenLDAP --enable-slurpd
2265         # Check whether --enable-slurpd or --disable-slurpd was given.
2266 if test "${enable_slurpd+set}" = set; then
2267   enableval="$enable_slurpd"
2268   
2269         ol_arg=invalid
2270         for ol_val in auto yes no ; do
2271                 if test "$enableval" = "$ol_val" ; then
2272                         ol_arg="$ol_val"
2273                 fi
2274         done
2275         if test "$ol_arg" = "invalid" ; then
2276                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2277         fi
2278         ol_enable_slurpd="$ol_arg"
2279
2280 else
2281         ol_enable_slurpd="auto"
2282 fi
2283 # end --enable-slurpd
2284
2285 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2286 if test "${with_xxliboptions+set}" = set; then
2287   withval="$with_xxliboptions"
2288   :
2289 fi
2290
2291 # Check whether --enable-static or --disable-static was given.
2292 if test "${enable_static+set}" = set; then
2293   enableval="$enable_static"
2294   p=${PACKAGE-default}
2295 case "$enableval" in
2296 yes) enable_static=yes ;;
2297 no) enable_static=no ;;
2298 *)
2299   enable_static=no
2300   # Look at the argument we got.  We use all the common list separators.
2301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2302   for pkg in $enableval; do
2303     if test "X$pkg" = "X$p"; then
2304       enable_static=yes
2305     fi
2306   done
2307   IFS="$ac_save_ifs"
2308   ;;
2309 esac
2310 else
2311   enable_static=yes
2312 fi
2313
2314 # Check whether --enable-shared or --disable-shared was given.
2315 if test "${enable_shared+set}" = set; then
2316   enableval="$enable_shared"
2317   p=${PACKAGE-default}
2318 case "$enableval" in
2319 yes) enable_shared=yes ;;
2320 no) enable_shared=no ;;
2321 *)
2322   enable_shared=no
2323   # Look at the argument we got.  We use all the common list separators.
2324   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2325   for pkg in $enableval; do
2326     if test "X$pkg" = "X$p"; then
2327       enable_shared=yes
2328     fi
2329   done
2330   IFS="$ac_save_ifs"
2331   ;;
2332 esac
2333 else
2334   enable_shared=yes
2335 fi
2336
2337
2338
2339 # validate options
2340 if test $ol_enable_dns = yes ; then
2341         if test $ol_enable_referrals = no ; then
2342                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2343         fi
2344         if test $ol_enable_referrals = auto ; then
2345                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2346                 ol_enable_referrals=yes
2347         fi
2348 fi
2349
2350 if test $ol_enable_slapd = no ; then
2351                 if test $ol_enable_bdb2 = yes ; then
2352                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2353         fi
2354         if test $ol_enable_dnssrv = yes ; then
2355                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2356         fi
2357         if test $ol_enable_ldap = yes ; then
2358                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2359         fi
2360         if test $ol_enable_ldbm = yes ; then
2361                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2362         fi
2363         if test $ol_enable_passwd = yes ; then
2364                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2365         fi
2366         if test $ol_enable_perl = yes ; then
2367                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2368         fi
2369         if test $ol_enable_shell = yes ; then
2370                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2371         fi
2372         if test $ol_enable_tcl = yes ; then
2373                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2374         fi
2375         if test $ol_enable_sql = yes ; then
2376                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2377         fi
2378         if test $ol_enable_modules = yes ; then
2379                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2380         fi
2381         if test $ol_enable_multimaster = yes ; then
2382                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2383         fi
2384         if test $ol_enable_wrappers = yes ; then
2385                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2386         fi
2387         if test $ol_enable_phonetic = yes ; then
2388                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2389         fi
2390         if test $ol_enable_quipu = yes ; then
2391                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2392         fi
2393         if test $ol_enable_rlookups = yes ; then
2394                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2395         fi
2396         if test $ol_enable_aci = yes ; then
2397                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2398         fi
2399         if test $ol_with_ldbm_api != auto ; then
2400                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2401         fi
2402         if test $ol_with_ldbm_type != auto ; then
2403                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2404         fi
2405         if test $ol_with_bdb2_module != static ; then
2406                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2407         fi
2408         if test $ol_with_dnssrv_module != static ; then
2409                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2410         fi
2411         if test $ol_with_ldap_module != static ; then
2412                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2413         fi
2414         if test $ol_with_ldbm_module != static ; then
2415                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2416         fi
2417         if test $ol_with_passwd_module != static ; then
2418                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2419         fi
2420         if test $ol_with_perl_module != static ; then
2421                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2422         fi
2423         if test $ol_with_shell_module != static ; then
2424                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2425         fi
2426         if test $ol_with_tcl_module != static ; then
2427                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2428         fi
2429         if test $ol_with_sql_module != static ; then
2430                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2431         fi
2432         if test $ol_enable_slurpd = yes ; then
2433                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2434         fi
2435
2436         # force settings to no
2437         ol_enable_bdb2=no
2438         ol_enable_dnssrv=no
2439         ol_enable_ldap=no
2440         ol_enable_ldbm=no
2441         ol_enable_passwd=no
2442         ol_enable_perl=no
2443         ol_enable_shell=no
2444         ol_enable_tcl=no
2445         ol_enable_sql=no
2446
2447         ol_enable_modules=no
2448         ol_enable_multimaster=no
2449         ol_enable_phonetic=no
2450         ol_enable_quipu=no
2451         ol_enable_rlookups=no
2452         ol_enable_aci=no
2453         ol_enable_wrappers=no
2454         ol_enable_dynamic=no
2455
2456         ol_with_ldbm_api=no
2457         ol_with_ldbm_type=no
2458
2459         ol_with_bdb2_module=static
2460         ol_with_dnssrv_module=static
2461         ol_with_ldap_module=static
2462         ol_with_ldbm_module=static
2463         ol_with_passwd_module=static
2464         ol_with_perl_module=static
2465         ol_with_shell_module=static
2466         ol_with_tcl_module=static
2467         ol_with_sql_module=static
2468
2469         ol_enable_slurpd=no
2470
2471 elif test $ol_enable_ldbm = no ; then
2472         
2473         if test $ol_with_ldbm_api != auto ; then
2474                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2475         fi
2476
2477         if test $ol_with_ldbm_type != auto ; then
2478                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2479         fi
2480
2481         if test $ol_with_ldbm_module != static ; then
2482                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2483         fi
2484
2485         if test $ol_enable_bdb2 = yes ; then
2486                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2487         fi
2488
2489         if test $ol_enable_modules != yes -a \
2490                 $ol_enable_dnssrv = no -a \
2491                 $ol_enable_ldap = no -a \
2492                 $ol_enable_passwd = no -a \
2493                 $ol_enable_perl = no -a \
2494                 $ol_enable_shell = no -a \
2495                 $ol_enable_sql = no -a \
2496                 $ol_enable_tcl = no ; then
2497                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2498         fi
2499
2500         ol_with_ldbm_api=no
2501         ol_with_ldbm_type=no
2502         ol_with_ldbm_module=static
2503
2504 elif test $ol_enable_bdb2 = yes ; then
2505         
2506         if test $ol_with_ldbm_api != auto -a \
2507                 $ol_with_ldbm_api != db2 ; then
2508                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2509         fi
2510
2511         ol_with_ldbm_api=db2
2512
2513 else
2514         
2515         if test $ol_enable_bdb2 != no ; then
2516                 if test $ol_with_ldbm_api != auto -a \
2517                         $ol_with_ldbm_api != db2 ; then
2518                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2519                         ol_enable_bdb2=no
2520                 fi
2521         fi
2522
2523         if test $ol_with_ldbm_api = gdbm -a \
2524                 $ol_with_ldbm_type = btree ; then
2525                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2526         fi
2527         if test $ol_with_ldbm_api = mdbm -a \
2528                 $ol_with_ldbm_type = btree ; then
2529                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2530         fi
2531         if test $ol_with_ldbm_api = ndbm -a \
2532                 $ol_with_ldbm_type = btree ; then
2533                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2534         fi
2535 fi
2536
2537 if test $ol_enable_slurpd = yes ; then
2538                 if test $ol_with_threads = no ; then
2539                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2540         fi
2541 fi
2542
2543 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2544         if test $ol_with_kerberos = no ; then
2545                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2546         fi
2547 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2548         if test $ol_with_kerberos != auto ; then
2549                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2550         else
2551                 ol_with_kerberos=no
2552         fi
2553 fi
2554
2555 if test $ol_enable_spasswd = yes ; then
2556         if test $ol_with_cyrus_sasl = no ; then
2557                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2558         fi
2559         ol_link_spasswd=yes
2560 fi
2561
2562 echo "$ac_t""done" 1>&6
2563
2564 LDAP_LIBS=
2565 LDIF_LIBS=
2566 LDBM_LIBS=
2567 LTHREAD_LIBS=
2568 LUTIL_LIBS=
2569
2570 LDAPD_LIBS=
2571 SLAPD_LIBS=
2572 SLURPD_LIBS=
2573
2574 BUILD_LDAPD=no
2575 BUILD_SLAPD=no
2576 BUILD_SLURPD=no
2577
2578 BUILD_QUIPU=no
2579 BUILD_THREAD=no
2580
2581 BUILD_BDB2=no
2582 BUILD_DNSSRV=no
2583 BUILD_LDAP=no
2584 BUILD_LDBM=no
2585 BUILD_PASSWD=no
2586 BUILD_PERL=no
2587 BUILD_SHELL=no
2588 BUILD_SQL=no
2589 BUILD_TCL=no
2590
2591 BUILD_BDB2_DYNAMIC=static
2592 BUILD_DNSSRV_DYNAMIC=static
2593 BUILD_LDAP_DYNAMIC=static
2594 BUILD_LDBM_DYNAMIC=static
2595 BUILD_PASSWD_DYNAMIC=static
2596 BUILD_PERL_DYNAMIC=static
2597 BUILD_SHELL_DYNAMIC=static
2598 BUILD_TCL_DYNAMIC=static
2599 BUILD_SQL_DYNAMIC=static
2600
2601 SLAPD_MODULES_LDFLAGS=
2602 SLAPD_MODULES_CPPFLAGS=
2603 SLAPD_MODULES_LIST=
2604
2605 SLAPD_PERL_LDFLAGS=
2606 MOD_PERL_LDFLAGS=
2607 PERL_CPPFLAGS=
2608
2609 SLAPD_SQL_LDFLAGS=
2610 SLAPD_SQL_LIBS=
2611 SLAPD_SQL_INCLUDES=
2612
2613 MOD_TCL_LIB=
2614 KRB4_LIBS=
2615 KRB5_LIBS=
2616 READLINE_LIBS=
2617 SASL_LIBS=
2618 TERMCAP_LIBS=
2619 TLS_LIBS=
2620 MODULES_LIBS=
2621
2622
2623
2624 cat >> confdefs.h <<\EOF
2625 #define HAVE_MKVERSION 1
2626 EOF
2627
2628
2629
2630
2631 ol_aix_threads=no
2632 case "$target" in
2633 *-*-aix*)       if test -z "$CC" ; then
2634                 case "$ol_with_threads" in
2635                 auto | yes |  posix) ol_aix_threads=yes ;;
2636                 esac
2637         fi
2638 ;;
2639 esac
2640
2641 if test $ol_aix_threads = yes ; then
2642         if test -z "${CC}" ; then
2643                 for ac_prog in cc_r xlc_r cc
2644 do
2645 # Extract the first word of "$ac_prog", so it can be a program name with args.
2646 set dummy $ac_prog; ac_word=$2
2647 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2648 echo "configure:2649: checking for $ac_word" >&5
2649 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2650   echo $ac_n "(cached) $ac_c" 1>&6
2651 else
2652   if test -n "$CC"; then
2653   ac_cv_prog_CC="$CC" # Let the user override the test.
2654 else
2655   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2656   ac_dummy="$PATH"
2657   for ac_dir in $ac_dummy; do
2658     test -z "$ac_dir" && ac_dir=.
2659     if test -f $ac_dir/$ac_word; then
2660       ac_cv_prog_CC="$ac_prog"
2661       break
2662     fi
2663   done
2664   IFS="$ac_save_ifs"
2665 fi
2666 fi
2667 CC="$ac_cv_prog_CC"
2668 if test -n "$CC"; then
2669   echo "$ac_t""$CC" 1>&6
2670 else
2671   echo "$ac_t""no" 1>&6
2672 fi
2673
2674 test -n "$CC" && break
2675 done
2676
2677
2678                 if test "$CC" = cc ; then
2679                                                 if test $ol_with_threads != auto ; then
2680                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2681                         else
2682                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2683                         fi
2684                         ol_with_threads=no
2685                 fi
2686         fi
2687
2688         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2689                 ol_with_threads=posix
2690                 ol_cv_pthread_create=yes
2691         fi
2692 fi
2693
2694 if test -z "${CC}"; then
2695         for ac_prog in cc
2696 do
2697 # Extract the first word of "$ac_prog", so it can be a program name with args.
2698 set dummy $ac_prog; ac_word=$2
2699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2700 echo "configure:2701: checking for $ac_word" >&5
2701 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2702   echo $ac_n "(cached) $ac_c" 1>&6
2703 else
2704   if test -n "$CC"; then
2705   ac_cv_prog_CC="$CC" # Let the user override the test.
2706 else
2707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2708   ac_dummy="$PATH"
2709   for ac_dir in $ac_dummy; do
2710     test -z "$ac_dir" && ac_dir=.
2711     if test -f $ac_dir/$ac_word; then
2712       ac_cv_prog_CC="$ac_prog"
2713       break
2714     fi
2715   done
2716   IFS="$ac_save_ifs"
2717 fi
2718 fi
2719 CC="$ac_cv_prog_CC"
2720 if test -n "$CC"; then
2721   echo "$ac_t""$CC" 1>&6
2722 else
2723   echo "$ac_t""no" 1>&6
2724 fi
2725
2726 test -n "$CC" && break
2727 done
2728
2729 fi
2730
2731
2732
2733
2734 # Check whether --enable-fast-install or --disable-fast-install was given.
2735 if test "${enable_fast_install+set}" = set; then
2736   enableval="$enable_fast_install"
2737   p=${PACKAGE-default}
2738 case "$enableval" in
2739 yes) enable_fast_install=yes ;;
2740 no) enable_fast_install=no ;;
2741 *)
2742   enable_fast_install=no
2743   # Look at the argument we got.  We use all the common list separators.
2744   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2745   for pkg in $enableval; do
2746     if test "X$pkg" = "X$p"; then
2747       enable_fast_install=yes
2748     fi
2749   done
2750   IFS="$ac_save_ifs"
2751   ;;
2752 esac
2753 else
2754   enable_fast_install=yes
2755 fi
2756
2757 # Extract the first word of "ranlib", so it can be a program name with args.
2758 set dummy ranlib; ac_word=$2
2759 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2760 echo "configure:2761: checking for $ac_word" >&5
2761 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2762   echo $ac_n "(cached) $ac_c" 1>&6
2763 else
2764   if test -n "$RANLIB"; then
2765   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2766 else
2767   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2768   ac_dummy="$PATH"
2769   for ac_dir in $ac_dummy; do
2770     test -z "$ac_dir" && ac_dir=.
2771     if test -f $ac_dir/$ac_word; then
2772       ac_cv_prog_RANLIB="ranlib"
2773       break
2774     fi
2775   done
2776   IFS="$ac_save_ifs"
2777   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2778 fi
2779 fi
2780 RANLIB="$ac_cv_prog_RANLIB"
2781 if test -n "$RANLIB"; then
2782   echo "$ac_t""$RANLIB" 1>&6
2783 else
2784   echo "$ac_t""no" 1>&6
2785 fi
2786
2787 # Extract the first word of "gcc", so it can be a program name with args.
2788 set dummy gcc; ac_word=$2
2789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2790 echo "configure:2791: checking for $ac_word" >&5
2791 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2792   echo $ac_n "(cached) $ac_c" 1>&6
2793 else
2794   if test -n "$CC"; then
2795   ac_cv_prog_CC="$CC" # Let the user override the test.
2796 else
2797   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2798   ac_dummy="$PATH"
2799   for ac_dir in $ac_dummy; do
2800     test -z "$ac_dir" && ac_dir=.
2801     if test -f $ac_dir/$ac_word; then
2802       ac_cv_prog_CC="gcc"
2803       break
2804     fi
2805   done
2806   IFS="$ac_save_ifs"
2807 fi
2808 fi
2809 CC="$ac_cv_prog_CC"
2810 if test -n "$CC"; then
2811   echo "$ac_t""$CC" 1>&6
2812 else
2813   echo "$ac_t""no" 1>&6
2814 fi
2815
2816 if test -z "$CC"; then
2817   # Extract the first word of "cc", so it can be a program name with args.
2818 set dummy cc; ac_word=$2
2819 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2820 echo "configure:2821: checking for $ac_word" >&5
2821 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2822   echo $ac_n "(cached) $ac_c" 1>&6
2823 else
2824   if test -n "$CC"; then
2825   ac_cv_prog_CC="$CC" # Let the user override the test.
2826 else
2827   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2828   ac_prog_rejected=no
2829   ac_dummy="$PATH"
2830   for ac_dir in $ac_dummy; do
2831     test -z "$ac_dir" && ac_dir=.
2832     if test -f $ac_dir/$ac_word; then
2833       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2834         ac_prog_rejected=yes
2835         continue
2836       fi
2837       ac_cv_prog_CC="cc"
2838       break
2839     fi
2840   done
2841   IFS="$ac_save_ifs"
2842 if test $ac_prog_rejected = yes; then
2843   # We found a bogon in the path, so make sure we never use it.
2844   set dummy $ac_cv_prog_CC
2845   shift
2846   if test $# -gt 0; then
2847     # We chose a different compiler from the bogus one.
2848     # However, it has the same basename, so the bogon will be chosen
2849     # first if we set CC to just the basename; use the full file name.
2850     shift
2851     set dummy "$ac_dir/$ac_word" "$@"
2852     shift
2853     ac_cv_prog_CC="$@"
2854   fi
2855 fi
2856 fi
2857 fi
2858 CC="$ac_cv_prog_CC"
2859 if test -n "$CC"; then
2860   echo "$ac_t""$CC" 1>&6
2861 else
2862   echo "$ac_t""no" 1>&6
2863 fi
2864
2865   if test -z "$CC"; then
2866     case "`uname -s`" in
2867     *win32* | *WIN32* | *CYGWIN*)
2868       # Extract the first word of "cl", so it can be a program name with args.
2869 set dummy cl; ac_word=$2
2870 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2871 echo "configure:2872: checking for $ac_word" >&5
2872 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2873   echo $ac_n "(cached) $ac_c" 1>&6
2874 else
2875   if test -n "$CC"; then
2876   ac_cv_prog_CC="$CC" # Let the user override the test.
2877 else
2878   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2879   ac_dummy="$PATH"
2880   for ac_dir in $ac_dummy; do
2881     test -z "$ac_dir" && ac_dir=.
2882     if test -f $ac_dir/$ac_word; then
2883       ac_cv_prog_CC="cl"
2884       break
2885     fi
2886   done
2887   IFS="$ac_save_ifs"
2888 fi
2889 fi
2890 CC="$ac_cv_prog_CC"
2891 if test -n "$CC"; then
2892   echo "$ac_t""$CC" 1>&6
2893 else
2894   echo "$ac_t""no" 1>&6
2895 fi
2896  ;;
2897     esac
2898   fi
2899   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2900 fi
2901
2902 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2903 echo "configure:2904: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2904
2905 ac_ext=c
2906 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2907 ac_cpp='$CPP $CPPFLAGS'
2908 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2909 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2910 cross_compiling=$ac_cv_prog_cc_cross
2911
2912 cat > conftest.$ac_ext << EOF
2913
2914 #line 2915 "configure"
2915 #include "confdefs.h"
2916
2917 main(){return(0);}
2918 EOF
2919 if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2920   ac_cv_prog_cc_works=yes
2921   # If we can't run a trivial program, we are probably using a cross compiler.
2922   if (./conftest; exit) 2>/dev/null; then
2923     ac_cv_prog_cc_cross=no
2924   else
2925     ac_cv_prog_cc_cross=yes
2926   fi
2927 else
2928   echo "configure: failed program was:" >&5
2929   cat conftest.$ac_ext >&5
2930   ac_cv_prog_cc_works=no
2931 fi
2932 rm -fr conftest*
2933 ac_ext=c
2934 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2935 ac_cpp='$CPP $CPPFLAGS'
2936 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2937 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2938 cross_compiling=$ac_cv_prog_cc_cross
2939
2940 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2941 if test $ac_cv_prog_cc_works = no; then
2942   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2943 fi
2944 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2945 echo "configure:2946: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2946 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2947 cross_compiling=$ac_cv_prog_cc_cross
2948
2949 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2950 echo "configure:2951: checking whether we are using GNU C" >&5
2951 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2952   echo $ac_n "(cached) $ac_c" 1>&6
2953 else
2954   cat > conftest.c <<EOF
2955 #ifdef __GNUC__
2956   yes;
2957 #endif
2958 EOF
2959 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2960   ac_cv_prog_gcc=yes
2961 else
2962   ac_cv_prog_gcc=no
2963 fi
2964 fi
2965
2966 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2967
2968 if test $ac_cv_prog_gcc = yes; then
2969   GCC=yes
2970 else
2971   GCC=
2972 fi
2973
2974 ac_test_CFLAGS="${CFLAGS+set}"
2975 ac_save_CFLAGS="$CFLAGS"
2976 CFLAGS=
2977 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2978 echo "configure:2979: checking whether ${CC-cc} accepts -g" >&5
2979 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2980   echo $ac_n "(cached) $ac_c" 1>&6
2981 else
2982   echo 'void f(){}' > conftest.c
2983 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2984   ac_cv_prog_cc_g=yes
2985 else
2986   ac_cv_prog_cc_g=no
2987 fi
2988 rm -f conftest*
2989
2990 fi
2991
2992 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2993 if test "$ac_test_CFLAGS" = set; then
2994   CFLAGS="$ac_save_CFLAGS"
2995 elif test $ac_cv_prog_cc_g = yes; then
2996   if test "$GCC" = yes; then
2997     CFLAGS="-g -O2"
2998   else
2999     CFLAGS="-g"
3000   fi
3001 else
3002   if test "$GCC" = yes; then
3003     CFLAGS="-O2"
3004   else
3005     CFLAGS=
3006   fi
3007 fi
3008
3009 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3010 if test "${with_gnu_ld+set}" = set; then
3011   withval="$with_gnu_ld"
3012   test "$withval" = no || with_gnu_ld=yes
3013 else
3014   with_gnu_ld=no
3015 fi
3016
3017 ac_prog=ld
3018 if test "$ac_cv_prog_gcc" = yes; then
3019   # Check if gcc -print-prog-name=ld gives a path.
3020   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3021 echo "configure:3022: checking for ld used by GCC" >&5
3022   ac_prog=`($CC -print-prog-name=ld) 2>&5`
3023   case "$ac_prog" in
3024     # Accept absolute paths.
3025     [\\/]* | [A-Za-z]:[\\/]*)
3026       re_direlt='/[^/][^/]*/\.\./'
3027       # Canonicalize the path of ld
3028       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3029       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3030         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3031       done
3032       test -z "$LD" && LD="$ac_prog"
3033       ;;
3034   "")
3035     # If it fails, then pretend we aren't using GCC.
3036     ac_prog=ld
3037     ;;
3038   *)
3039     # If it is relative, then search for the first ld in PATH.
3040     with_gnu_ld=unknown
3041     ;;
3042   esac
3043 elif test "$with_gnu_ld" = yes; then
3044   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3045 echo "configure:3046: checking for GNU ld" >&5
3046 else
3047   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3048 echo "configure:3049: checking for non-GNU ld" >&5
3049 fi
3050 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
3051   echo $ac_n "(cached) $ac_c" 1>&6
3052 else
3053   if test -z "$LD"; then
3054   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3055   for ac_dir in $PATH; do
3056     test -z "$ac_dir" && ac_dir=.
3057     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3058       ac_cv_path_LD="$ac_dir/$ac_prog"
3059       # Check to see if the program is GNU ld.  I'd rather use --version,
3060       # but apparently some GNU ld's only accept -v.
3061       # Break only if it was the GNU/non-GNU ld that we prefer.
3062       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3063         test "$with_gnu_ld" != no && break
3064       else
3065         test "$with_gnu_ld" != yes && break
3066       fi
3067     fi
3068   done
3069   IFS="$ac_save_ifs"
3070 else
3071   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3072 fi
3073 fi
3074
3075 LD="$ac_cv_path_LD"
3076 if test -n "$LD"; then
3077   echo "$ac_t""$LD" 1>&6
3078 else
3079   echo "$ac_t""no" 1>&6
3080 fi
3081 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3082
3083 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3084 echo "configure:3085: checking if the linker ($LD) is GNU ld" >&5
3085 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3086   echo $ac_n "(cached) $ac_c" 1>&6
3087 else
3088   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3089 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3090   ac_cv_prog_gnu_ld=yes
3091 else
3092   ac_cv_prog_gnu_ld=no
3093 fi
3094 fi
3095
3096 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3097
3098
3099 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3100 echo "configure:3101: checking for BSD-compatible nm" >&5
3101 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3102   echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104   if test -n "$NM"; then
3105   # Let the user override the test.
3106   ac_cv_path_NM="$NM"
3107 else
3108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3109   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3110     test -z "$ac_dir" && ac_dir=.
3111     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3112       # Check to see if the nm accepts a BSD-compat flag.
3113       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3114       #   nm: unknown option "B" ignored
3115       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3116         ac_cv_path_NM="$ac_dir/nm -B"
3117         break
3118       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3119         ac_cv_path_NM="$ac_dir/nm -p"
3120         break
3121       else
3122         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3123         continue # so that we can try to find one that supports BSD flags
3124       fi
3125     fi
3126   done
3127   IFS="$ac_save_ifs"
3128   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3129 fi
3130 fi
3131
3132 NM="$ac_cv_path_NM"
3133 echo "$ac_t""$NM" 1>&6
3134
3135
3136 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3137 echo "configure:3138: checking whether ln -s works" >&5
3138 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3139   echo $ac_n "(cached) $ac_c" 1>&6
3140 else
3141   rm -f conftestdata
3142 if ln -s X conftestdata 2>/dev/null
3143 then
3144   rm -f conftestdata
3145   ac_cv_prog_LN_S="ln -s"
3146 else
3147   ac_cv_prog_LN_S=ln
3148 fi
3149 fi
3150 LN_S="$ac_cv_prog_LN_S"
3151 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3152   echo "$ac_t""yes" 1>&6
3153 else
3154   echo "$ac_t""no" 1>&6
3155 fi
3156
3157 if test $host != $build; then
3158   ac_tool_prefix=${host_alias}-
3159 else
3160   ac_tool_prefix=
3161 fi
3162
3163
3164 # Check for any special flags to pass to ltconfig.
3165 libtool_flags="--cache-file=$cache_file"
3166 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3167 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3168 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3169 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3170 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3171 libtool_flags="$libtool_flags --enable-dlopen"
3172 libtool_flags="$libtool_flags --enable-win32-dll"
3173 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3174 if test "${enable_libtool_lock+set}" = set; then
3175   enableval="$enable_libtool_lock"
3176   :
3177 fi
3178
3179 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3180 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3181
3182 # Some flags need to be propagated to the compiler or linker for good
3183 # libtool support.
3184 case "$host" in
3185 *-*-irix6*)
3186   # Find out which ABI we are using.
3187   echo '#line 3188 "configure"' > conftest.$ac_ext
3188   if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189     case "`/usr/bin/file conftest.o`" in
3190     *32-bit*)
3191       LD="${LD-ld} -32"
3192       ;;
3193     *N32*)
3194       LD="${LD-ld} -n32"
3195       ;;
3196     *64-bit*)
3197       LD="${LD-ld} -64"
3198       ;;
3199     esac
3200   fi
3201   rm -rf conftest*
3202   ;;
3203
3204 *-*-sco3.2v5*)
3205   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3206   SAVE_CFLAGS="$CFLAGS"
3207   CFLAGS="$CFLAGS -belf"
3208   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3209 echo "configure:3210: checking whether the C compiler needs -belf" >&5
3210 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3211   echo $ac_n "(cached) $ac_c" 1>&6
3212 else
3213   cat > conftest.$ac_ext <<EOF
3214 #line 3215 "configure"
3215 #include "confdefs.h"
3216
3217 int main() {
3218
3219 ; return 0; }
3220 EOF
3221 if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3222   rm -rf conftest*
3223   lt_cv_cc_needs_belf=yes
3224 else
3225   echo "configure: failed program was:" >&5
3226   cat conftest.$ac_ext >&5
3227   rm -rf conftest*
3228   lt_cv_cc_needs_belf=no
3229 fi
3230 rm -f conftest*
3231 fi
3232
3233 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3234   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3235     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3236     CFLAGS="$SAVE_CFLAGS"
3237   fi
3238   ;;
3239
3240 *-*-cygwin* | *-*-mingw*)
3241   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3242 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3243 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3244 echo "configure:3245: checking for $ac_word" >&5
3245 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3246   echo $ac_n "(cached) $ac_c" 1>&6
3247 else
3248   if test -n "$DLLTOOL"; then
3249   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3250 else
3251   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3252   ac_dummy="$PATH"
3253   for ac_dir in $ac_dummy; do
3254     test -z "$ac_dir" && ac_dir=.
3255     if test -f $ac_dir/$ac_word; then
3256       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3257       break
3258     fi
3259   done
3260   IFS="$ac_save_ifs"
3261 fi
3262 fi
3263 DLLTOOL="$ac_cv_prog_DLLTOOL"
3264 if test -n "$DLLTOOL"; then
3265   echo "$ac_t""$DLLTOOL" 1>&6
3266 else
3267   echo "$ac_t""no" 1>&6
3268 fi
3269
3270
3271 if test -z "$ac_cv_prog_DLLTOOL"; then
3272 if test -n "$ac_tool_prefix"; then
3273   # Extract the first word of "dlltool", so it can be a program name with args.
3274 set dummy dlltool; ac_word=$2
3275 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3276 echo "configure:3277: checking for $ac_word" >&5
3277 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3278   echo $ac_n "(cached) $ac_c" 1>&6
3279 else
3280   if test -n "$DLLTOOL"; then
3281   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3282 else
3283   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3284   ac_dummy="$PATH"
3285   for ac_dir in $ac_dummy; do
3286     test -z "$ac_dir" && ac_dir=.
3287     if test -f $ac_dir/$ac_word; then
3288       ac_cv_prog_DLLTOOL="dlltool"
3289       break
3290     fi
3291   done
3292   IFS="$ac_save_ifs"
3293   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3294 fi
3295 fi
3296 DLLTOOL="$ac_cv_prog_DLLTOOL"
3297 if test -n "$DLLTOOL"; then
3298   echo "$ac_t""$DLLTOOL" 1>&6
3299 else
3300   echo "$ac_t""no" 1>&6
3301 fi
3302
3303 else
3304   DLLTOOL="false"
3305 fi
3306 fi
3307
3308   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3309 set dummy ${ac_tool_prefix}as; ac_word=$2
3310 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3311 echo "configure:3312: checking for $ac_word" >&5
3312 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3313   echo $ac_n "(cached) $ac_c" 1>&6
3314 else
3315   if test -n "$AS"; then
3316   ac_cv_prog_AS="$AS" # Let the user override the test.
3317 else
3318   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3319   ac_dummy="$PATH"
3320   for ac_dir in $ac_dummy; do
3321     test -z "$ac_dir" && ac_dir=.
3322     if test -f $ac_dir/$ac_word; then
3323       ac_cv_prog_AS="${ac_tool_prefix}as"
3324       break
3325     fi
3326   done
3327   IFS="$ac_save_ifs"
3328 fi
3329 fi
3330 AS="$ac_cv_prog_AS"
3331 if test -n "$AS"; then
3332   echo "$ac_t""$AS" 1>&6
3333 else
3334   echo "$ac_t""no" 1>&6
3335 fi
3336
3337
3338 if test -z "$ac_cv_prog_AS"; then
3339 if test -n "$ac_tool_prefix"; then
3340   # Extract the first word of "as", so it can be a program name with args.
3341 set dummy as; ac_word=$2
3342 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3343 echo "configure:3344: checking for $ac_word" >&5
3344 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3345   echo $ac_n "(cached) $ac_c" 1>&6
3346 else
3347   if test -n "$AS"; then
3348   ac_cv_prog_AS="$AS" # Let the user override the test.
3349 else
3350   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3351   ac_dummy="$PATH"
3352   for ac_dir in $ac_dummy; do
3353     test -z "$ac_dir" && ac_dir=.
3354     if test -f $ac_dir/$ac_word; then
3355       ac_cv_prog_AS="as"
3356       break
3357     fi
3358   done
3359   IFS="$ac_save_ifs"
3360   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3361 fi
3362 fi
3363 AS="$ac_cv_prog_AS"
3364 if test -n "$AS"; then
3365   echo "$ac_t""$AS" 1>&6
3366 else
3367   echo "$ac_t""no" 1>&6
3368 fi
3369
3370 else
3371   AS="false"
3372 fi
3373 fi
3374
3375   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3376 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3377 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3378 echo "configure:3379: checking for $ac_word" >&5
3379 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3380   echo $ac_n "(cached) $ac_c" 1>&6
3381 else
3382   if test -n "$OBJDUMP"; then
3383   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3384 else
3385   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3386   ac_dummy="$PATH"
3387   for ac_dir in $ac_dummy; do
3388     test -z "$ac_dir" && ac_dir=.
3389     if test -f $ac_dir/$ac_word; then
3390       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3391       break
3392     fi
3393   done
3394   IFS="$ac_save_ifs"
3395 fi
3396 fi
3397 OBJDUMP="$ac_cv_prog_OBJDUMP"
3398 if test -n "$OBJDUMP"; then
3399   echo "$ac_t""$OBJDUMP" 1>&6
3400 else
3401   echo "$ac_t""no" 1>&6
3402 fi
3403
3404
3405 if test -z "$ac_cv_prog_OBJDUMP"; then
3406 if test -n "$ac_tool_prefix"; then
3407   # Extract the first word of "objdump", so it can be a program name with args.
3408 set dummy objdump; ac_word=$2
3409 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3410 echo "configure:3411: checking for $ac_word" >&5
3411 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3412   echo $ac_n "(cached) $ac_c" 1>&6
3413 else
3414   if test -n "$OBJDUMP"; then
3415   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3416 else
3417   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3418   ac_dummy="$PATH"
3419   for ac_dir in $ac_dummy; do
3420     test -z "$ac_dir" && ac_dir=.
3421     if test -f $ac_dir/$ac_word; then
3422       ac_cv_prog_OBJDUMP="objdump"
3423       break
3424     fi
3425   done
3426   IFS="$ac_save_ifs"
3427   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3428 fi
3429 fi
3430 OBJDUMP="$ac_cv_prog_OBJDUMP"
3431 if test -n "$OBJDUMP"; then
3432   echo "$ac_t""$OBJDUMP" 1>&6
3433 else
3434   echo "$ac_t""no" 1>&6
3435 fi
3436
3437 else
3438   OBJDUMP="false"
3439 fi
3440 fi
3441
3442   ;;
3443
3444 esac
3445
3446
3447 # Save cache, so that ltconfig can load it
3448
3449
3450 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3451 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3452 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3453 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3454 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3455 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3456 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3457 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3458
3459 # Reload cache, that may have been modified by ltconfig
3460
3461
3462 # This can be used to rebuild libtool when needed
3463 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3464
3465 # Always use our own libtool.
3466 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3467
3468 # Redirect the config.log output again, so that the ltconfig log is not
3469 # clobbered by the next message.
3470 exec 5>>./config.log
3471
3472
3473 for ac_prog in mawk gawk nawk awk
3474 do
3475 # Extract the first word of "$ac_prog", so it can be a program name with args.
3476 set dummy $ac_prog; ac_word=$2
3477 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3478 echo "configure:3479: checking for $ac_word" >&5
3479 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3480   echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482   if test -n "$AWK"; then
3483   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3484 else
3485   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3486   ac_dummy="$PATH"
3487   for ac_dir in $ac_dummy; do
3488     test -z "$ac_dir" && ac_dir=.
3489     if test -f $ac_dir/$ac_word; then
3490       ac_cv_prog_AWK="$ac_prog"
3491       break
3492     fi
3493   done
3494   IFS="$ac_save_ifs"
3495 fi
3496 fi
3497 AWK="$ac_cv_prog_AWK"
3498 if test -n "$AWK"; then
3499   echo "$ac_t""$AWK" 1>&6
3500 else
3501   echo "$ac_t""no" 1>&6
3502 fi
3503
3504 test -n "$AWK" && break
3505 done
3506
3507 # test for ln hardlink support
3508 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3509 echo "configure:3510: checking whether ln works" >&5
3510 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3511   echo $ac_n "(cached) $ac_c" 1>&6
3512 else
3513   rm -f conftest.src conftest.dst
3514 echo "conftest" > conftest.src
3515 if ln conftest.src conftest.dst 2>/dev/null
3516 then
3517   ol_cv_prog_LN_H="ln"
3518 else
3519   ol_cv_prog_LN_H="cp"
3520 fi
3521 rm -f conftest.src conftest.dst
3522
3523 fi
3524 LN_H="$ol_cv_prog_LN_H"
3525 if test "$ol_cv_prog_LN_H" = "ln"; then
3526         echo "$ac_t""yes" 1>&6
3527 else
3528         echo "$ac_t""no" 1>&6
3529 fi
3530
3531 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3532 echo "configure:3533: checking whether ln -s works" >&5
3533 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3534   echo $ac_n "(cached) $ac_c" 1>&6
3535 else
3536   rm -f conftestdata
3537 if ln -s X conftestdata 2>/dev/null
3538 then
3539   rm -f conftestdata
3540   ac_cv_prog_LN_S="ln -s"
3541 else
3542   ac_cv_prog_LN_S=ln
3543 fi
3544 fi
3545 LN_S="$ac_cv_prog_LN_S"
3546 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3547   echo "$ac_t""yes" 1>&6
3548 else
3549   echo "$ac_t""no" 1>&6
3550 fi
3551
3552
3553 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3554         LN_S="$LN_H"
3555 fi
3556
3557 # Extract the first word of "sendmail", so it can be a program name with args.
3558 set dummy sendmail; ac_word=$2
3559 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3560 echo "configure:3561: checking for $ac_word" >&5
3561 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3562   echo $ac_n "(cached) $ac_c" 1>&6
3563 else
3564   case "$SENDMAIL" in
3565   /*)
3566   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3567   ;;
3568   ?:/*)
3569   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3570   ;;
3571   *)
3572   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3573   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3574   for ac_dir in $ac_dummy; do 
3575     test -z "$ac_dir" && ac_dir=.
3576     if test -f $ac_dir/$ac_word; then
3577       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3578       break
3579     fi
3580   done
3581   IFS="$ac_save_ifs"
3582   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3583   ;;
3584 esac
3585 fi
3586 SENDMAIL="$ac_cv_path_SENDMAIL"
3587 if test -n "$SENDMAIL"; then
3588   echo "$ac_t""$SENDMAIL" 1>&6
3589 else
3590   echo "$ac_t""no" 1>&6
3591 fi
3592
3593 # Extract the first word of "vi", so it can be a program name with args.
3594 set dummy vi; ac_word=$2
3595 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3596 echo "configure:3597: checking for $ac_word" >&5
3597 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3598   echo $ac_n "(cached) $ac_c" 1>&6
3599 else
3600   case "$EDITOR" in
3601   /*)
3602   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3603   ;;
3604   ?:/*)
3605   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3606   ;;
3607   *)
3608   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3609   ac_dummy="$PATH:/usr/ucb"
3610   for ac_dir in $ac_dummy; do 
3611     test -z "$ac_dir" && ac_dir=.
3612     if test -f $ac_dir/$ac_word; then
3613       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3614       break
3615     fi
3616   done
3617   IFS="$ac_save_ifs"
3618   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3619   ;;
3620 esac
3621 fi
3622 EDITOR="$ac_cv_path_EDITOR"
3623 if test -n "$EDITOR"; then
3624   echo "$ac_t""$EDITOR" 1>&6
3625 else
3626   echo "$ac_t""no" 1>&6
3627 fi
3628
3629 # Extract the first word of "finger", so it can be a program name with args.
3630 set dummy finger; ac_word=$2
3631 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3632 echo "configure:3633: checking for $ac_word" >&5
3633 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3634   echo $ac_n "(cached) $ac_c" 1>&6
3635 else
3636   case "$FINGER" in
3637   /*)
3638   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3639   ;;
3640   ?:/*)
3641   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3642   ;;
3643   *)
3644   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3645   ac_dummy="$PATH:/usr/ucb"
3646   for ac_dir in $ac_dummy; do 
3647     test -z "$ac_dir" && ac_dir=.
3648     if test -f $ac_dir/$ac_word; then
3649       ac_cv_path_FINGER="$ac_dir/$ac_word"
3650       break
3651     fi
3652   done
3653   IFS="$ac_save_ifs"
3654   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3655   ;;
3656 esac
3657 fi
3658 FINGER="$ac_cv_path_FINGER"
3659 if test -n "$FINGER"; then
3660   echo "$ac_t""$FINGER" 1>&6
3661 else
3662   echo "$ac_t""no" 1>&6
3663 fi
3664
3665
3666 ol_link_perl=no
3667 if test $ol_enable_perl != no ; then
3668         # Extract the first word of "perl", so it can be a program name with args.
3669 set dummy perl; ac_word=$2
3670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3671 echo "configure:3672: checking for $ac_word" >&5
3672 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3673   echo $ac_n "(cached) $ac_c" 1>&6
3674 else
3675   case "$PERLBIN" in
3676   /*)
3677   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3678   ;;
3679   ?:/*)
3680   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3681   ;;
3682   *)
3683   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3684   ac_dummy="$PATH"
3685   for ac_dir in $ac_dummy; do 
3686     test -z "$ac_dir" && ac_dir=.
3687     if test -f $ac_dir/$ac_word; then
3688       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3689       break
3690     fi
3691   done
3692   IFS="$ac_save_ifs"
3693   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3694   ;;
3695 esac
3696 fi
3697 PERLBIN="$ac_cv_path_PERLBIN"
3698 if test -n "$PERLBIN"; then
3699   echo "$ac_t""$PERLBIN" 1>&6
3700 else
3701   echo "$ac_t""no" 1>&6
3702 fi
3703
3704
3705         if test "no$PERLBIN" = "no" ; then
3706                 if test $ol_enable_perl = yes ; then
3707                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3708                 fi
3709
3710         else
3711                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3712                 if test x"$ol_with_perl_module" = "xstatic" ; then
3713                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3714                 else
3715                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3716                 fi
3717                                 ol_link_perl=yes
3718         fi
3719 fi
3720
3721 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3722 echo "configure:3723: checking how to run the C preprocessor" >&5
3723 # On Suns, sometimes $CPP names a directory.
3724 if test -n "$CPP" && test -d "$CPP"; then
3725   CPP=
3726 fi
3727 if test -z "$CPP"; then
3728 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3729   echo $ac_n "(cached) $ac_c" 1>&6
3730 else
3731     # This must be in double quotes, not single quotes, because CPP may get
3732   # substituted into the Makefile and "${CC-cc}" will confuse make.
3733   CPP="${CC-cc} -E"
3734   # On the NeXT, cc -E runs the code through the compiler's parser,
3735   # not just through cpp.
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="${CC-cc} -E -traditional-cpp"
3753   cat > conftest.$ac_ext <<EOF
3754 #line 3755 "configure"
3755 #include "confdefs.h"
3756 #include <assert.h>
3757 Syntax Error
3758 EOF
3759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3760 { (eval echo configure:3761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3762 if test -z "$ac_err"; then
3763   :
3764 else
3765   echo "$ac_err" >&5
3766   echo "configure: failed program was:" >&5
3767   cat conftest.$ac_ext >&5
3768   rm -rf conftest*
3769   CPP="${CC-cc} -nologo -E"
3770   cat > conftest.$ac_ext <<EOF
3771 #line 3772 "configure"
3772 #include "confdefs.h"
3773 #include <assert.h>
3774 Syntax Error
3775 EOF
3776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3777 { (eval echo configure:3778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3779 if test -z "$ac_err"; then
3780   :
3781 else
3782   echo "$ac_err" >&5
3783   echo "configure: failed program was:" >&5
3784   cat conftest.$ac_ext >&5
3785   rm -rf conftest*
3786   CPP=/lib/cpp
3787 fi
3788 rm -f conftest*
3789 fi
3790 rm -f conftest*
3791 fi
3792 rm -f conftest*
3793   ac_cv_prog_CPP="$CPP"
3794 fi
3795   CPP="$ac_cv_prog_CPP"
3796 else
3797   ac_cv_prog_CPP="$CPP"
3798 fi
3799 echo "$ac_t""$CPP" 1>&6
3800
3801
3802 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3803         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3804
3805 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3806         echo "configure: warning: programs compiled here do run here..." 1>&2
3807         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3808
3809 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3810         echo "configure: warning: programs compiled here do not run here..." 1>&2
3811         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3812 fi
3813
3814 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3815 echo "configure:3816: checking for AIX" >&5
3816 cat > conftest.$ac_ext <<EOF
3817 #line 3818 "configure"
3818 #include "confdefs.h"
3819 #ifdef _AIX
3820   yes
3821 #endif
3822
3823 EOF
3824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3825   egrep "yes" >/dev/null 2>&1; then
3826   rm -rf conftest*
3827   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3828 #define _ALL_SOURCE 1
3829 EOF
3830
3831 else
3832   rm -rf conftest*
3833   echo "$ac_t""no" 1>&6
3834 fi
3835 rm -f conftest*
3836
3837
3838 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3839 echo "configure:3840: checking for POSIXized ISC" >&5
3840 if test -d /etc/conf/kconfig.d &&
3841   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3842 then
3843   echo "$ac_t""yes" 1>&6
3844   ISC=yes # If later tests want to check for ISC.
3845   cat >> confdefs.h <<\EOF
3846 #define _POSIX_SOURCE 1
3847 EOF
3848
3849   if test "$GCC" = yes; then
3850     CC="$CC -posix"
3851   else
3852     CC="$CC -Xp"
3853   fi
3854 else
3855   echo "$ac_t""no" 1>&6
3856   ISC=
3857 fi
3858
3859 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3860 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3861 echo "configure:3862: checking for minix/config.h" >&5
3862 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3863   echo $ac_n "(cached) $ac_c" 1>&6
3864 else
3865   cat > conftest.$ac_ext <<EOF
3866 #line 3867 "configure"
3867 #include "confdefs.h"
3868 #include <minix/config.h>
3869 EOF
3870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3871 { (eval echo configure:3872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3873 if test -z "$ac_err"; then
3874   rm -rf conftest*
3875   eval "ac_cv_header_$ac_safe=yes"
3876 else
3877   echo "$ac_err" >&5
3878   echo "configure: failed program was:" >&5
3879   cat conftest.$ac_ext >&5
3880   rm -rf conftest*
3881   eval "ac_cv_header_$ac_safe=no"
3882 fi
3883 rm -f conftest*
3884 fi
3885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3886   echo "$ac_t""yes" 1>&6
3887   MINIX=yes
3888 else
3889   echo "$ac_t""no" 1>&6
3890 MINIX=
3891 fi
3892
3893 if test "$MINIX" = yes; then
3894   cat >> confdefs.h <<\EOF
3895 #define _POSIX_SOURCE 1
3896 EOF
3897
3898   cat >> confdefs.h <<\EOF
3899 #define _POSIX_1_SOURCE 2
3900 EOF
3901
3902   cat >> confdefs.h <<\EOF
3903 #define _MINIX 1
3904 EOF
3905
3906 fi
3907
3908
3909 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3910 echo "configure:3911: checking for Cygwin environment" >&5
3911 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   cat > conftest.$ac_ext <<EOF
3915 #line 3916 "configure"
3916 #include "confdefs.h"
3917
3918 int main() {
3919
3920 #ifndef __CYGWIN__
3921 #define __CYGWIN__ __CYGWIN32__
3922 #endif
3923 return __CYGWIN__;
3924 ; return 0; }
3925 EOF
3926 if { (eval echo configure:3927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3927   rm -rf conftest*
3928   ac_cv_cygwin=yes
3929 else
3930   echo "configure: failed program was:" >&5
3931   cat conftest.$ac_ext >&5
3932   rm -rf conftest*
3933   ac_cv_cygwin=no
3934 fi
3935 rm -f conftest*
3936 fi
3937
3938 echo "$ac_t""$ac_cv_cygwin" 1>&6
3939 CYGWIN=
3940 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3941 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3942 echo "configure:3943: checking for mingw32 environment" >&5
3943 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3944   echo $ac_n "(cached) $ac_c" 1>&6
3945 else
3946   cat > conftest.$ac_ext <<EOF
3947 #line 3948 "configure"
3948 #include "confdefs.h"
3949
3950 int main() {
3951 return __MINGW32__;
3952 ; return 0; }
3953 EOF
3954 if { (eval echo configure:3955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3955   rm -rf conftest*
3956   ac_cv_mingw32=yes
3957 else
3958   echo "configure: failed program was:" >&5
3959   cat conftest.$ac_ext >&5
3960   rm -rf conftest*
3961   ac_cv_mingw32=no
3962 fi
3963 rm -f conftest*
3964 fi
3965
3966 echo "$ac_t""$ac_cv_mingw32" 1>&6
3967 MINGW32=
3968 test "$ac_cv_mingw32" = yes && MINGW32=yes
3969 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3970 echo "configure:3971: checking for EMX OS/2 environment" >&5
3971 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3972   echo $ac_n "(cached) $ac_c" 1>&6
3973 else
3974   cat > conftest.$ac_ext <<EOF
3975 #line 3976 "configure"
3976 #include "confdefs.h"
3977
3978 int main() {
3979 return __EMX__;
3980 ; return 0; }
3981 EOF
3982 if { (eval echo configure:3983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3983   rm -rf conftest*
3984   ac_cv_emxos2=yes
3985 else
3986   echo "configure: failed program was:" >&5
3987   cat conftest.$ac_ext >&5
3988   rm -rf conftest*
3989   ac_cv_emxos2=no
3990 fi
3991 rm -f conftest*
3992 fi
3993
3994 echo "$ac_t""$ac_cv_emxos2" 1>&6
3995 EMXOS2=
3996 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3997
3998
3999
4000 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4001 echo "configure:4002: checking for executable suffix" >&5
4002 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4003   echo $ac_n "(cached) $ac_c" 1>&6
4004 else
4005   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4006   ac_cv_exeext=.exe
4007 else
4008   rm -f conftest*
4009   echo 'int main () { return 0; }' > conftest.$ac_ext
4010   ac_cv_exeext=
4011   if { (eval echo configure:4012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4012     for file in conftest.*; do
4013       case $file in
4014       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4015       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4016       esac
4017     done
4018   else
4019     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4020   fi
4021   rm -f conftest*
4022   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4023 fi
4024 fi
4025
4026 EXEEXT=""
4027 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4028 echo "$ac_t""${ac_cv_exeext}" 1>&6
4029 ac_exeext=$EXEEXT
4030
4031 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4032 echo "configure:4033: checking for object suffix" >&5
4033 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4034   echo $ac_n "(cached) $ac_c" 1>&6
4035 else
4036   rm -f conftest*
4037 echo 'int i = 1;' > conftest.$ac_ext
4038 if { (eval echo configure:4039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4039   for ac_file in conftest.*; do
4040     case $ac_file in
4041     *.c) ;;
4042     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4043     esac
4044   done
4045 else
4046   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4047 fi
4048 rm -f conftest*
4049 fi
4050
4051 echo "$ac_t""$ac_cv_objext" 1>&6
4052 OBJEXT=$ac_cv_objext
4053 ac_objext=$ac_cv_objext
4054
4055
4056 cat >> confdefs.h <<EOF
4057 #define EXEEXT "${EXEEXT}"
4058 EOF
4059
4060
4061 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4062 echo "configure:4063: checking for be_app in -lbe" >&5
4063 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4065   echo $ac_n "(cached) $ac_c" 1>&6
4066 else
4067   ac_save_LIBS="$LIBS"
4068 LIBS="-lbe -lroot -lnet $LIBS"
4069 cat > conftest.$ac_ext <<EOF
4070 #line 4071 "configure"
4071 #include "confdefs.h"
4072 /* Override any gcc2 internal prototype to avoid an error.  */
4073 /* We use char because int might match the return type of a gcc2
4074     builtin and then its argument prototype would still apply.  */
4075 char be_app();
4076
4077 int main() {
4078 be_app()
4079 ; return 0; }
4080 EOF
4081 if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4082   rm -rf conftest*
4083   eval "ac_cv_lib_$ac_lib_var=yes"
4084 else
4085   echo "configure: failed program was:" >&5
4086   cat conftest.$ac_ext >&5
4087   rm -rf conftest*
4088   eval "ac_cv_lib_$ac_lib_var=no"
4089 fi
4090 rm -f conftest*
4091 LIBS="$ac_save_LIBS"
4092
4093 fi
4094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4095   echo "$ac_t""yes" 1>&6
4096   LIBS="$LIBS -lbe -lroot -lnet"
4097 else
4098   echo "$ac_t""no" 1>&6
4099 :
4100 fi
4101
4102
4103
4104
4105
4106 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4107 echo "configure:4108: checking for ${CC-cc} option to accept ANSI C" >&5
4108 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4109   echo $ac_n "(cached) $ac_c" 1>&6
4110 else
4111   am_cv_prog_cc_stdc=no
4112 ac_save_CC="$CC"
4113 # Don't try gcc -ansi; that turns off useful extensions and
4114 # breaks some systems' header files.
4115 # AIX                   -qlanglvl=ansi
4116 # Ultrix and OSF/1      -std1
4117 # HP-UX 10.20 and later -Ae
4118 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4119 # SVR4                  -Xc -D__EXTENSIONS__
4120 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4121 do
4122   CC="$ac_save_CC $ac_arg"
4123   cat > conftest.$ac_ext <<EOF
4124 #line 4125 "configure"
4125 #include "confdefs.h"
4126 #include <stdarg.h>
4127 #include <stdio.h>
4128 #include <sys/types.h>
4129 #include <sys/stat.h>
4130 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4131 struct buf { int x; };
4132 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4133 static char *e (p, i)
4134      char **p;
4135      int i;
4136 {
4137   return p[i];
4138 }
4139 static char *f (char * (*g) (char **, int), char **p, ...)
4140 {
4141   char *s;
4142   va_list v;
4143   va_start (v,p);
4144   s = g (p, va_arg (v,int));
4145   va_end (v);
4146   return s;
4147 }
4148 int test (int i, double x);
4149 struct s1 {int (*f) (int a);};
4150 struct s2 {int (*f) (double a);};
4151 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4152 int argc;
4153 char **argv;
4154
4155 int main() {
4156
4157 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4158
4159 ; return 0; }
4160 EOF
4161 if { (eval echo configure:4162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4162   rm -rf conftest*
4163   am_cv_prog_cc_stdc="$ac_arg"; break
4164 else
4165   echo "configure: failed program was:" >&5
4166   cat conftest.$ac_ext >&5
4167 fi
4168 rm -f conftest*
4169 done
4170 CC="$ac_save_CC"
4171
4172 fi
4173
4174 if test -z "$am_cv_prog_cc_stdc"; then
4175   echo "$ac_t""none needed" 1>&6
4176 else
4177   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4178 fi
4179 case "x$am_cv_prog_cc_stdc" in
4180   x|xno) ;;
4181   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4182 esac
4183
4184 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4185         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4186 fi
4187
4188 # test for make depend flag
4189 OL_MKDEP=
4190 OL_MKDEP_FLAGS=
4191 if test -z "${MKDEP}"; then
4192         OL_MKDEP="${CC-cc}"
4193         if test -z "${MKDEP_FLAGS}"; then
4194                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4195 echo "configure:4196: checking for ${OL_MKDEP} depend flag" >&5
4196 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4197   echo $ac_n "(cached) $ac_c" 1>&6
4198 else
4199   
4200                         ol_cv_mkdep=no
4201                         for flag in "-M" "-xM"; do
4202                                 cat > conftest.c <<EOF
4203  noCode;
4204 EOF
4205                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4206                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4207                                 then
4208                                         if test ! -f conftest."${ac_object}" ; then
4209                                                 ol_cv_mkdep=$flag
4210                                                 OL_MKDEP_FLAGS="$flag"
4211                                                 break
4212                                         fi
4213                                 fi
4214                         done
4215                         rm -f conftest*
4216                 
4217 fi
4218
4219 echo "$ac_t""$ol_cv_mkdep" 1>&6
4220         else
4221                 cc_cv_mkdep=yes
4222                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4223         fi
4224 else
4225         cc_cv_mkdep=yes
4226         OL_MKDEP="${MKDEP}"
4227         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4228 fi
4229
4230
4231
4232 if test "${ol_cv_mkdep}" = no ; then
4233         # this will soon become an error
4234         echo "configure: warning: do not know how to generate dependencies" 1>&2
4235 fi
4236
4237 ol_link_modules=no
4238 if test $ol_enable_modules != no ; then
4239         for ac_hdr in ltdl.h
4240 do
4241 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4242 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4243 echo "configure:4244: checking for $ac_hdr" >&5
4244 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4245   echo $ac_n "(cached) $ac_c" 1>&6
4246 else
4247   cat > conftest.$ac_ext <<EOF
4248 #line 4249 "configure"
4249 #include "confdefs.h"
4250 #include <$ac_hdr>
4251 EOF
4252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4253 { (eval echo configure:4254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4255 if test -z "$ac_err"; then
4256   rm -rf conftest*
4257   eval "ac_cv_header_$ac_safe=yes"
4258 else
4259   echo "$ac_err" >&5
4260   echo "configure: failed program was:" >&5
4261   cat conftest.$ac_ext >&5
4262   rm -rf conftest*
4263   eval "ac_cv_header_$ac_safe=no"
4264 fi
4265 rm -f conftest*
4266 fi
4267 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4268   echo "$ac_t""yes" 1>&6
4269     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4270   cat >> confdefs.h <<EOF
4271 #define $ac_tr_hdr 1
4272 EOF
4273  
4274 else
4275   echo "$ac_t""no" 1>&6
4276 fi
4277 done
4278
4279
4280         if test $ac_cv_header_ltdl_h = no ; then
4281                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4282         fi
4283
4284         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4285 echo "configure:4286: checking for lt_dlinit in -lltdl" >&5
4286 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4288   echo $ac_n "(cached) $ac_c" 1>&6
4289 else
4290   ac_save_LIBS="$LIBS"
4291 LIBS="-lltdl  $LIBS"
4292 cat > conftest.$ac_ext <<EOF
4293 #line 4294 "configure"
4294 #include "confdefs.h"
4295 /* Override any gcc2 internal prototype to avoid an error.  */
4296 /* We use char because int might match the return type of a gcc2
4297     builtin and then its argument prototype would still apply.  */
4298 char lt_dlinit();
4299
4300 int main() {
4301 lt_dlinit()
4302 ; return 0; }
4303 EOF
4304 if { (eval echo configure:4305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4305   rm -rf conftest*
4306   eval "ac_cv_lib_$ac_lib_var=yes"
4307 else
4308   echo "configure: failed program was:" >&5
4309   cat conftest.$ac_ext >&5
4310   rm -rf conftest*
4311   eval "ac_cv_lib_$ac_lib_var=no"
4312 fi
4313 rm -f conftest*
4314 LIBS="$ac_save_LIBS"
4315
4316 fi
4317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4318   echo "$ac_t""yes" 1>&6
4319   
4320             MODULES_LIBS=-lltdl
4321             cat >> confdefs.h <<\EOF
4322 #define HAVE_LIBLTDL 1
4323 EOF
4324
4325         
4326 else
4327   echo "$ac_t""no" 1>&6
4328 fi
4329
4330
4331         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4332                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4333         fi
4334         ol_link_modules=yes
4335 else
4336         ol_with_bdb2_module=static
4337         ol_with_dnssrv_module=static
4338         ol_with_ldap_module=static
4339         ol_with_ldbm_module=static
4340         ol_with_passwd_module=static
4341         ol_with_perl_module=static
4342         ol_with_shell_module=static
4343         ol_with_tcl_module=static
4344         ol_with_sql_module=static
4345 fi
4346
4347 # test for EBCDIC
4348 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4349 echo "configure:4350: checking for EBCDIC" >&5
4350 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4351   echo $ac_n "(cached) $ac_c" 1>&6
4352 else
4353   
4354         cat > conftest.$ac_ext <<EOF
4355 #line 4356 "configure"
4356 #include "confdefs.h"
4357
4358 #if !('M' == 0xd4)
4359 #include <__ASCII__/generate_error.h>
4360 #endif
4361
4362 EOF
4363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4364 { (eval echo configure:4365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4366 if test -z "$ac_err"; then
4367   rm -rf conftest*
4368   ol_cv_cpp_ebcdic=yes
4369 else
4370   echo "$ac_err" >&5
4371   echo "configure: failed program was:" >&5
4372   cat conftest.$ac_ext >&5
4373   rm -rf conftest*
4374   ol_cv_cpp_ebcdic=no
4375 fi
4376 rm -f conftest*
4377 fi
4378
4379 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4380 if test $ol_cv_cpp_ebcdic = yes ; then
4381         cat >> confdefs.h <<\EOF
4382 #define HAVE_EBCDIC 1
4383 EOF
4384
4385 fi
4386
4387 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4388 echo "configure:4389: checking for ANSI C header files" >&5
4389 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4390   echo $ac_n "(cached) $ac_c" 1>&6
4391 else
4392   cat > conftest.$ac_ext <<EOF
4393 #line 4394 "configure"
4394 #include "confdefs.h"
4395 #include <stdlib.h>
4396 #include <stdarg.h>
4397 #include <string.h>
4398 #include <float.h>
4399 EOF
4400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4401 { (eval echo configure:4402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4403 if test -z "$ac_err"; then
4404   rm -rf conftest*
4405   ol_cv_header_stdc=yes
4406 else
4407   echo "$ac_err" >&5
4408   echo "configure: failed program was:" >&5
4409   cat conftest.$ac_ext >&5
4410   rm -rf conftest*
4411   ol_cv_header_stdc=no
4412 fi
4413 rm -f conftest*
4414
4415 if test $ol_cv_header_stdc = yes; then
4416   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4417 cat > conftest.$ac_ext <<EOF
4418 #line 4419 "configure"
4419 #include "confdefs.h"
4420 #include <string.h>
4421 EOF
4422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4423   egrep "memchr" >/dev/null 2>&1; then
4424   :
4425 else
4426   rm -rf conftest*
4427   ol_cv_header_stdc=no
4428 fi
4429 rm -f conftest*
4430
4431 fi
4432
4433 if test $ol_cv_header_stdc = yes; then
4434   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4435 cat > conftest.$ac_ext <<EOF
4436 #line 4437 "configure"
4437 #include "confdefs.h"
4438 #include <stdlib.h>
4439 EOF
4440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4441   egrep "free" >/dev/null 2>&1; then
4442   :
4443 else
4444   rm -rf conftest*
4445   ol_cv_header_stdc=no
4446 fi
4447 rm -f conftest*
4448
4449 fi
4450
4451 if test $ol_cv_header_stdc = yes; then
4452   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4453 if test "$cross_compiling" = yes; then
4454   :
4455 else
4456   cat > conftest.$ac_ext <<EOF
4457 #line 4458 "configure"
4458 #include "confdefs.h"
4459 #include <ctype.h>
4460 #ifndef HAVE_EBCDIC
4461 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4462 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4463 #else
4464 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4465                 || ('j' <= (c) && (c) <= 'r') \
4466                 || ('s' <= (c) && (c) <= 'z'))
4467 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4468 #endif
4469 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4470 int main () { int i; for (i = 0; i < 256; i++)
4471 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4472 exit (0); }
4473
4474 EOF
4475 if { (eval echo configure:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4476 then
4477   :
4478 else
4479   echo "configure: failed program was:" >&5
4480   cat conftest.$ac_ext >&5
4481   rm -fr conftest*
4482   ol_cv_header_stdc=no
4483 fi
4484 rm -fr conftest*
4485 fi
4486
4487 fi
4488 fi
4489
4490 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4491 if test $ol_cv_header_stdc = yes; then
4492   cat >> confdefs.h <<\EOF
4493 #define STDC_HEADERS 1
4494 EOF
4495
4496 fi
4497 ac_cv_header_stdc=disable
4498
4499
4500 if test $ol_cv_header_stdc != yes; then
4501         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4502 fi
4503
4504 ac_header_dirent=no
4505 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4506 do
4507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4508 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4509 echo "configure:4510: checking for $ac_hdr that defines DIR" >&5
4510 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4511   echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4513   cat > conftest.$ac_ext <<EOF
4514 #line 4515 "configure"
4515 #include "confdefs.h"
4516 #include <sys/types.h>
4517 #include <$ac_hdr>
4518 int main() {
4519 DIR *dirp = 0;
4520 ; return 0; }
4521 EOF
4522 if { (eval echo configure:4523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4523   rm -rf conftest*
4524   eval "ac_cv_header_dirent_$ac_safe=yes"
4525 else
4526   echo "configure: failed program was:" >&5
4527   cat conftest.$ac_ext >&5
4528   rm -rf conftest*
4529   eval "ac_cv_header_dirent_$ac_safe=no"
4530 fi
4531 rm -f conftest*
4532 fi
4533 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4534   echo "$ac_t""yes" 1>&6
4535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4536   cat >> confdefs.h <<EOF
4537 #define $ac_tr_hdr 1
4538 EOF
4539  ac_header_dirent=$ac_hdr; break
4540 else
4541   echo "$ac_t""no" 1>&6
4542 fi
4543 done
4544 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4545 if test $ac_header_dirent = dirent.h; then
4546 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4547 echo "configure:4548: checking for opendir in -ldir" >&5
4548 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4549 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4550   echo $ac_n "(cached) $ac_c" 1>&6
4551 else
4552   ac_save_LIBS="$LIBS"
4553 LIBS="-ldir  $LIBS"
4554 cat > conftest.$ac_ext <<EOF
4555 #line 4556 "configure"
4556 #include "confdefs.h"
4557 /* Override any gcc2 internal prototype to avoid an error.  */
4558 /* We use char because int might match the return type of a gcc2
4559     builtin and then its argument prototype would still apply.  */
4560 char opendir();
4561
4562 int main() {
4563 opendir()
4564 ; return 0; }
4565 EOF
4566 if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4567   rm -rf conftest*
4568   eval "ac_cv_lib_$ac_lib_var=yes"
4569 else
4570   echo "configure: failed program was:" >&5
4571   cat conftest.$ac_ext >&5
4572   rm -rf conftest*
4573   eval "ac_cv_lib_$ac_lib_var=no"
4574 fi
4575 rm -f conftest*
4576 LIBS="$ac_save_LIBS"
4577
4578 fi
4579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4580   echo "$ac_t""yes" 1>&6
4581   LIBS="$LIBS -ldir"
4582 else
4583   echo "$ac_t""no" 1>&6
4584 fi
4585
4586 else
4587 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4588 echo "configure:4589: checking for opendir in -lx" >&5
4589 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4590 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4591   echo $ac_n "(cached) $ac_c" 1>&6
4592 else
4593   ac_save_LIBS="$LIBS"
4594 LIBS="-lx  $LIBS"
4595 cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598 /* Override any gcc2 internal prototype to avoid an error.  */
4599 /* We use char because int might match the return type of a gcc2
4600     builtin and then its argument prototype would still apply.  */
4601 char opendir();
4602
4603 int main() {
4604 opendir()
4605 ; return 0; }
4606 EOF
4607 if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4608   rm -rf conftest*
4609   eval "ac_cv_lib_$ac_lib_var=yes"
4610 else
4611   echo "configure: failed program was:" >&5
4612   cat conftest.$ac_ext >&5
4613   rm -rf conftest*
4614   eval "ac_cv_lib_$ac_lib_var=no"
4615 fi
4616 rm -f conftest*
4617 LIBS="$ac_save_LIBS"
4618
4619 fi
4620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4621   echo "$ac_t""yes" 1>&6
4622   LIBS="$LIBS -lx"
4623 else
4624   echo "$ac_t""no" 1>&6
4625 fi
4626
4627 fi
4628
4629 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4630 echo "configure:4631: checking for sys/wait.h that is POSIX.1 compatible" >&5
4631 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4632   echo $ac_n "(cached) $ac_c" 1>&6
4633 else
4634   cat > conftest.$ac_ext <<EOF
4635 #line 4636 "configure"
4636 #include "confdefs.h"
4637 #include <sys/types.h>
4638 #include <sys/wait.h>
4639 #ifndef WEXITSTATUS
4640 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4641 #endif
4642 #ifndef WIFEXITED
4643 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4644 #endif
4645 int main() {
4646 int s;
4647 wait (&s);
4648 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4649 ; return 0; }
4650 EOF
4651 if { (eval echo configure:4652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4652   rm -rf conftest*
4653   ac_cv_header_sys_wait_h=yes
4654 else
4655   echo "configure: failed program was:" >&5
4656   cat conftest.$ac_ext >&5
4657   rm -rf conftest*
4658   ac_cv_header_sys_wait_h=no
4659 fi
4660 rm -f conftest*
4661 fi
4662
4663 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4664 if test $ac_cv_header_sys_wait_h = yes; then
4665   cat >> confdefs.h <<\EOF
4666 #define HAVE_SYS_WAIT_H 1
4667 EOF
4668
4669 fi
4670
4671 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4672 echo "configure:4673: checking POSIX termios" >&5
4673 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4674   echo $ac_n "(cached) $ac_c" 1>&6
4675 else
4676   cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 #include <sys/types.h>
4680 #include <unistd.h>
4681 #include <termios.h>
4682 int main() {
4683 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4684    tcgetattr(0, 0);
4685 ; return 0; }
4686 EOF
4687 if { (eval echo configure:4688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4688   rm -rf conftest*
4689   am_cv_sys_posix_termios=yes
4690 else
4691   echo "configure: failed program was:" >&5
4692   cat conftest.$ac_ext >&5
4693   rm -rf conftest*
4694   am_cv_sys_posix_termios=no
4695 fi
4696 rm -f conftest*
4697 fi
4698
4699 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4700
4701
4702  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4703 echo "configure:4704: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4704 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4705   echo $ac_n "(cached) $ac_c" 1>&6
4706 else
4707   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4708
4709   gwinsz_in_termios_h=no
4710   if test $am_cv_sys_posix_termios = yes; then
4711     cat > conftest.$ac_ext <<EOF
4712 #line 4713 "configure"
4713 #include "confdefs.h"
4714 #include <sys/types.h>
4715 #     include <termios.h>
4716 #     ifdef TIOCGWINSZ
4717         yes
4718 #     endif
4719     
4720 EOF
4721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4722   egrep "yes" >/dev/null 2>&1; then
4723   rm -rf conftest*
4724   gwinsz_in_termios_h=yes
4725 fi
4726 rm -f conftest*
4727
4728   fi
4729
4730   if test $gwinsz_in_termios_h = no; then
4731     cat > conftest.$ac_ext <<EOF
4732 #line 4733 "configure"
4733 #include "confdefs.h"
4734 #include <sys/types.h>
4735 #     include <sys/ioctl.h>
4736 #     ifdef TIOCGWINSZ
4737         yes
4738 #     endif
4739     
4740 EOF
4741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4742   egrep "yes" >/dev/null 2>&1; then
4743   rm -rf conftest*
4744   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4745 fi
4746 rm -f conftest*
4747
4748   fi
4749   
4750 fi
4751
4752 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4753   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4754     cat >> confdefs.h <<\EOF
4755 #define GWINSZ_IN_SYS_IOCTL 1
4756 EOF
4757
4758   fi
4759
4760 if test $am_cv_sys_posix_termios = yes ; then
4761         cat >> confdefs.h <<\EOF
4762 #define HAVE_POSIX_TERMIOS 1
4763 EOF
4764
4765 fi
4766
4767 for ac_hdr in \
4768         arpa/inet.h             \
4769         arpa/nameser.h  \
4770         assert.h                \
4771         conio.h                 \
4772         crypt.h                 \
4773         direct.h                \
4774         errno.h                 \
4775         fcntl.h                 \
4776         filio.h                 \
4777         getopt.h                \
4778         grp.h                   \
4779         io.h                    \
4780         libutil.h               \
4781         limits.h                \
4782         locale.h                \
4783         netinet/tcp.h   \
4784         malloc.h                \
4785         memory.h                \
4786         psap.h                  \
4787         pwd.h                   \
4788         process.h               \
4789         resolv.h                \
4790         sgtty.h                 \
4791         shadow.h                \
4792         stddef.h                \
4793         string.h                \
4794         strings.h               \
4795         sysexits.h              \
4796         sys/file.h              \
4797         sys/filio.h             \
4798         sys/errno.h             \
4799         sys/ioctl.h             \
4800         sys/param.h             \
4801         sys/resource.h  \
4802         sys/select.h    \
4803         sys/socket.h    \
4804         sys/syslog.h    \
4805         sys/time.h              \
4806         sys/types.h             \
4807         syslog.h                \
4808         termios.h               \
4809         unistd.h                \
4810         winsock.h               \
4811
4812 do
4813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4815 echo "configure:4816: checking for $ac_hdr" >&5
4816 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4817   echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819   cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822 #include <$ac_hdr>
4823 EOF
4824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4825 { (eval echo configure:4826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4827 if test -z "$ac_err"; then
4828   rm -rf conftest*
4829   eval "ac_cv_header_$ac_safe=yes"
4830 else
4831   echo "$ac_err" >&5
4832   echo "configure: failed program was:" >&5
4833   cat conftest.$ac_ext >&5
4834   rm -rf conftest*
4835   eval "ac_cv_header_$ac_safe=no"
4836 fi
4837 rm -f conftest*
4838 fi
4839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4840   echo "$ac_t""yes" 1>&6
4841     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4842   cat >> confdefs.h <<EOF
4843 #define $ac_tr_hdr 1
4844 EOF
4845  
4846 else
4847   echo "$ac_t""no" 1>&6
4848 fi
4849 done
4850
4851
4852
4853
4854 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4855 echo "configure:4856: checking for sigset in -lV3" >&5
4856 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4857 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4858   echo $ac_n "(cached) $ac_c" 1>&6
4859 else
4860   ac_save_LIBS="$LIBS"
4861 LIBS="-lV3  $LIBS"
4862 cat > conftest.$ac_ext <<EOF
4863 #line 4864 "configure"
4864 #include "confdefs.h"
4865 /* Override any gcc2 internal prototype to avoid an error.  */
4866 /* We use char because int might match the return type of a gcc2
4867     builtin and then its argument prototype would still apply.  */
4868 char sigset();
4869
4870 int main() {
4871 sigset()
4872 ; return 0; }
4873 EOF
4874 if { (eval echo configure:4875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4875   rm -rf conftest*
4876   eval "ac_cv_lib_$ac_lib_var=yes"
4877 else
4878   echo "configure: failed program was:" >&5
4879   cat conftest.$ac_ext >&5
4880   rm -rf conftest*
4881   eval "ac_cv_lib_$ac_lib_var=no"
4882 fi
4883 rm -f conftest*
4884 LIBS="$ac_save_LIBS"
4885
4886 fi
4887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4888   echo "$ac_t""yes" 1>&6
4889     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4890     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4891   cat >> confdefs.h <<EOF
4892 #define $ac_tr_lib 1
4893 EOF
4894
4895   LIBS="-lV3 $LIBS"
4896
4897 else
4898   echo "$ac_t""no" 1>&6
4899 fi
4900
4901
4902 if test $ac_cv_header_winsock_h = yes; then
4903         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4904 echo "configure:4905: checking for winsock" >&5
4905 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4906   echo $ac_n "(cached) $ac_c" 1>&6
4907 else
4908   cat > conftest.$ac_ext <<EOF
4909 #line 4910 "configure"
4910 #include "confdefs.h"
4911 #include <winsock.h>
4912 int main() {
4913
4914                         socket(0,0,0);
4915                         select(0,NULL,NULL,NULL,NULL);
4916                         closesocket(0);
4917                         gethostname(NULL,0);
4918         
4919 ; return 0; }
4920 EOF
4921 if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4922   rm -rf conftest*
4923   ol_cv_winsock=yes
4924 else
4925   echo "configure: failed program was:" >&5
4926   cat conftest.$ac_ext >&5
4927   rm -rf conftest*
4928   ol_cv_winsock=no
4929 fi
4930 rm -f conftest*]
4931 fi
4932
4933 echo "$ac_t""$ol_cv_winsock" 1>&6
4934
4935         if test $ol_cv_winsock = yes ; then
4936                 cat >> confdefs.h <<\EOF
4937 #define HAVE_WINSOCK 1
4938 EOF
4939
4940                 ac_cv_func_socket=yes
4941                 ac_cv_func_select=yes
4942                 ac_cv_func_closesocket=yes
4943                 ac_cv_func_gethostname=yes
4944         fi
4945 fi
4946
4947
4948 echo $ac_n "checking for socket""... $ac_c" 1>&6
4949 echo "configure:4950: checking for socket" >&5
4950 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4951   echo $ac_n "(cached) $ac_c" 1>&6
4952 else
4953   cat > conftest.$ac_ext <<EOF
4954 #line 4955 "configure"
4955 #include "confdefs.h"
4956 /* System header to define __stub macros and hopefully few prototypes,
4957     which can conflict with char socket(); below.  */
4958 #include <assert.h>
4959 /* Override any gcc2 internal prototype to avoid an error.  */
4960 /* We use char because int might match the return type of a gcc2
4961     builtin and then its argument prototype would still apply.  */
4962 char socket();
4963 char (*f)();
4964
4965 int main() {
4966
4967 /* The GNU C library defines this for functions which it implements
4968     to always fail with ENOSYS.  Some functions are actually named
4969     something starting with __ and the normal name is an alias.  */
4970 #if defined (__stub_socket) || defined (__stub___socket)
4971 choke me
4972 #else
4973 f = socket;
4974 #endif
4975
4976 ; return 0; }
4977 EOF
4978 if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4979   rm -rf conftest*
4980   eval "ac_cv_func_socket=yes"
4981 else
4982   echo "configure: failed program was:" >&5
4983   cat conftest.$ac_ext >&5
4984   rm -rf conftest*
4985   eval "ac_cv_func_socket=no"
4986 fi
4987 rm -f conftest*
4988 fi
4989
4990 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4991   echo "$ac_t""yes" 1>&6
4992   :
4993 else
4994   echo "$ac_t""no" 1>&6
4995         
4996         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4997 echo "configure:4998: checking for main in -lsocket" >&5
4998 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4999 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5000   echo $ac_n "(cached) $ac_c" 1>&6
5001 else
5002   ac_save_LIBS="$LIBS"
5003 LIBS="-lsocket  $LIBS"
5004 cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007
5008 int main() {
5009 main()
5010 ; return 0; }
5011 EOF
5012 if { (eval echo configure:5013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5013   rm -rf conftest*
5014   eval "ac_cv_lib_$ac_lib_var=yes"
5015 else
5016   echo "configure: failed program was:" >&5
5017   cat conftest.$ac_ext >&5
5018   rm -rf conftest*
5019   eval "ac_cv_lib_$ac_lib_var=no"
5020 fi
5021 rm -f conftest*
5022 LIBS="$ac_save_LIBS"
5023
5024 fi
5025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5026   echo "$ac_t""yes" 1>&6
5027     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5028     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5029   cat >> confdefs.h <<EOF
5030 #define $ac_tr_lib 1
5031 EOF
5032
5033   LIBS="-lsocket $LIBS"
5034
5035 else
5036   echo "$ac_t""no" 1>&6
5037 fi
5038
5039         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5040 echo "configure:5041: checking for main in -lnet" >&5
5041 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5042 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5043   echo $ac_n "(cached) $ac_c" 1>&6
5044 else
5045   ac_save_LIBS="$LIBS"
5046 LIBS="-lnet  $LIBS"
5047 cat > conftest.$ac_ext <<EOF
5048 #line 5049 "configure"
5049 #include "confdefs.h"
5050
5051 int main() {
5052 main()
5053 ; return 0; }
5054 EOF
5055 if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5056   rm -rf conftest*
5057   eval "ac_cv_lib_$ac_lib_var=yes"
5058 else
5059   echo "configure: failed program was:" >&5
5060   cat conftest.$ac_ext >&5
5061   rm -rf conftest*
5062   eval "ac_cv_lib_$ac_lib_var=no"
5063 fi
5064 rm -f conftest*
5065 LIBS="$ac_save_LIBS"
5066
5067 fi
5068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5069   echo "$ac_t""yes" 1>&6
5070     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5071     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5072   cat >> confdefs.h <<EOF
5073 #define $ac_tr_lib 1
5074 EOF
5075
5076   LIBS="-lnet $LIBS"
5077
5078 else
5079   echo "$ac_t""no" 1>&6
5080 fi
5081
5082         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5083 echo "configure:5084: checking for main in -lnsl_s" >&5
5084 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5085 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5086   echo $ac_n "(cached) $ac_c" 1>&6
5087 else
5088   ac_save_LIBS="$LIBS"
5089 LIBS="-lnsl_s  $LIBS"
5090 cat > conftest.$ac_ext <<EOF
5091 #line 5092 "configure"
5092 #include "confdefs.h"
5093
5094 int main() {
5095 main()
5096 ; return 0; }
5097 EOF
5098 if { (eval echo configure:5099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5099   rm -rf conftest*
5100   eval "ac_cv_lib_$ac_lib_var=yes"
5101 else
5102   echo "configure: failed program was:" >&5
5103   cat conftest.$ac_ext >&5
5104   rm -rf conftest*
5105   eval "ac_cv_lib_$ac_lib_var=no"
5106 fi
5107 rm -f conftest*
5108 LIBS="$ac_save_LIBS"
5109
5110 fi
5111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5112   echo "$ac_t""yes" 1>&6
5113     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5114     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5115   cat >> confdefs.h <<EOF
5116 #define $ac_tr_lib 1
5117 EOF
5118
5119   LIBS="-lnsl_s $LIBS"
5120
5121 else
5122   echo "$ac_t""no" 1>&6
5123 fi
5124
5125         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5126 echo "configure:5127: checking for main in -lnsl" >&5
5127 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5128 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5129   echo $ac_n "(cached) $ac_c" 1>&6
5130 else
5131   ac_save_LIBS="$LIBS"
5132 LIBS="-lnsl  $LIBS"
5133 cat > conftest.$ac_ext <<EOF
5134 #line 5135 "configure"
5135 #include "confdefs.h"
5136
5137 int main() {
5138 main()
5139 ; return 0; }
5140 EOF
5141 if { (eval echo configure:5142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5142   rm -rf conftest*
5143   eval "ac_cv_lib_$ac_lib_var=yes"
5144 else
5145   echo "configure: failed program was:" >&5
5146   cat conftest.$ac_ext >&5
5147   rm -rf conftest*
5148   eval "ac_cv_lib_$ac_lib_var=no"
5149 fi
5150 rm -f conftest*
5151 LIBS="$ac_save_LIBS"
5152
5153 fi
5154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5155   echo "$ac_t""yes" 1>&6
5156     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5157     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5158   cat >> confdefs.h <<EOF
5159 #define $ac_tr_lib 1
5160 EOF
5161
5162   LIBS="-lnsl $LIBS"
5163
5164 else
5165   echo "$ac_t""no" 1>&6
5166 fi
5167
5168         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5169 echo "configure:5170: checking for socket in -linet" >&5
5170 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5171 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5172   echo $ac_n "(cached) $ac_c" 1>&6
5173 else
5174   ac_save_LIBS="$LIBS"
5175 LIBS="-linet  $LIBS"
5176 cat > conftest.$ac_ext <<EOF
5177 #line 5178 "configure"
5178 #include "confdefs.h"
5179 /* Override any gcc2 internal prototype to avoid an error.  */
5180 /* We use char because int might match the return type of a gcc2
5181     builtin and then its argument prototype would still apply.  */
5182 char socket();
5183
5184 int main() {
5185 socket()
5186 ; return 0; }
5187 EOF
5188 if { (eval echo configure:5189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5189   rm -rf conftest*
5190   eval "ac_cv_lib_$ac_lib_var=yes"
5191 else
5192   echo "configure: failed program was:" >&5
5193   cat conftest.$ac_ext >&5
5194   rm -rf conftest*
5195   eval "ac_cv_lib_$ac_lib_var=no"
5196 fi
5197 rm -f conftest*
5198 LIBS="$ac_save_LIBS"
5199
5200 fi
5201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5202   echo "$ac_t""yes" 1>&6
5203     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5204     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5205   cat >> confdefs.h <<EOF
5206 #define $ac_tr_lib 1
5207 EOF
5208
5209   LIBS="-linet $LIBS"
5210
5211 else
5212   echo "$ac_t""no" 1>&6
5213 fi
5214
5215         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5216 echo "configure:5217: checking for main in -lgen" >&5
5217 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5218 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5219   echo $ac_n "(cached) $ac_c" 1>&6
5220 else
5221   ac_save_LIBS="$LIBS"
5222 LIBS="-lgen  $LIBS"
5223 cat > conftest.$ac_ext <<EOF
5224 #line 5225 "configure"
5225 #include "confdefs.h"
5226
5227 int main() {
5228 main()
5229 ; return 0; }
5230 EOF
5231 if { (eval echo configure:5232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5232   rm -rf conftest*
5233   eval "ac_cv_lib_$ac_lib_var=yes"
5234 else
5235   echo "configure: failed program was:" >&5
5236   cat conftest.$ac_ext >&5
5237   rm -rf conftest*
5238   eval "ac_cv_lib_$ac_lib_var=no"
5239 fi
5240 rm -f conftest*
5241 LIBS="$ac_save_LIBS"
5242
5243 fi
5244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5245   echo "$ac_t""yes" 1>&6
5246     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5247     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5248   cat >> confdefs.h <<EOF
5249 #define $ac_tr_lib 1
5250 EOF
5251
5252   LIBS="-lgen $LIBS"
5253
5254 else
5255   echo "$ac_t""no" 1>&6
5256 fi
5257
5258
5259 fi
5260
5261
5262 echo $ac_n "checking for select""... $ac_c" 1>&6
5263 echo "configure:5264: checking for select" >&5
5264 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5265   echo $ac_n "(cached) $ac_c" 1>&6
5266 else
5267   cat > conftest.$ac_ext <<EOF
5268 #line 5269 "configure"
5269 #include "confdefs.h"
5270 /* System header to define __stub macros and hopefully few prototypes,
5271     which can conflict with char select(); below.  */
5272 #include <assert.h>
5273 /* Override any gcc2 internal prototype to avoid an error.  */
5274 /* We use char because int might match the return type of a gcc2
5275     builtin and then its argument prototype would still apply.  */
5276 char select();
5277 char (*f)();
5278
5279 int main() {
5280
5281 /* The GNU C library defines this for functions which it implements
5282     to always fail with ENOSYS.  Some functions are actually named
5283     something starting with __ and the normal name is an alias.  */
5284 #if defined (__stub_select) || defined (__stub___select)
5285 choke me
5286 #else
5287 f = select;
5288 #endif
5289
5290 ; return 0; }
5291 EOF
5292 if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5293   rm -rf conftest*
5294   eval "ac_cv_func_select=yes"
5295 else
5296   echo "configure: failed program was:" >&5
5297   cat conftest.$ac_ext >&5
5298   rm -rf conftest*
5299   eval "ac_cv_func_select=no"
5300 fi
5301 rm -f conftest*
5302 fi
5303
5304 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5305   echo "$ac_t""yes" 1>&6
5306   :
5307 else
5308   echo "$ac_t""no" 1>&6
5309 { echo "configure: error: select() required." 1>&2; exit 1; }
5310 fi
5311
5312
5313 if test "${ac_cv_header_winsock_h}" != yes; then
5314                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5315 echo "configure:5316: checking types of arguments for select()" >&5
5316  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5317   echo $ac_n "(cached) $ac_c" 1>&6
5318 else
5319    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5320   echo $ac_n "(cached) $ac_c" 1>&6
5321 else
5322     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5323   echo $ac_n "(cached) $ac_c" 1>&6
5324 else
5325      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5326      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5327       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5328        cat > conftest.$ac_ext <<EOF
5329 #line 5330 "configure"
5330 #include "confdefs.h"
5331 #ifdef HAVE_SYS_TYPES_H
5332 #include <sys/types.h>
5333 #endif
5334 #ifdef HAVE_SYS_TIME_H
5335 #include <sys/time.h>
5336 #endif
5337 #ifdef HAVE_SYS_SELECT_H
5338 #include <sys/select.h>
5339 #endif
5340 #ifdef HAVE_SYS_SOCKET_H
5341 #include <sys/socket.h>
5342 #endif
5343 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);
5344 int main() {
5345
5346 ; return 0; }
5347 EOF
5348 if { (eval echo configure:5349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5349   rm -rf conftest*
5350           ac_not_found=no ; break 3
5351 else
5352   echo "configure: failed program was:" >&5
5353   cat conftest.$ac_ext >&5
5354   rm -rf conftest*
5355   ac_not_found=yes
5356 fi
5357 rm -f conftest*
5358       done
5359      done
5360     done
5361    
5362 fi
5363   
5364 fi
5365  
5366 fi
5367  if test "$ac_not_found" = yes; then
5368   ac_cv_func_select_arg1=int 
5369   ac_cv_func_select_arg234='int *' 
5370   ac_cv_func_select_arg5='struct timeval *'
5371  fi
5372  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5373  cat >> confdefs.h <<EOF
5374 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5375 EOF
5376
5377  cat >> confdefs.h <<EOF
5378 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5379 EOF
5380
5381  cat >> confdefs.h <<EOF
5382 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5383 EOF
5384
5385
5386 fi
5387
5388
5389 for ac_hdr in regex.h 
5390 do
5391 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5392 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5393 echo "configure:5394: checking for $ac_hdr" >&5
5394 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5395   echo $ac_n "(cached) $ac_c" 1>&6
5396 else
5397   cat > conftest.$ac_ext <<EOF
5398 #line 5399 "configure"
5399 #include "confdefs.h"
5400 #include <$ac_hdr>
5401 EOF
5402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5403 { (eval echo configure:5404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5405 if test -z "$ac_err"; then
5406   rm -rf conftest*
5407   eval "ac_cv_header_$ac_safe=yes"
5408 else
5409   echo "$ac_err" >&5
5410   echo "configure: failed program was:" >&5
5411   cat conftest.$ac_ext >&5
5412   rm -rf conftest*
5413   eval "ac_cv_header_$ac_safe=no"
5414 fi
5415 rm -f conftest*
5416 fi
5417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5418   echo "$ac_t""yes" 1>&6
5419     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5420   cat >> confdefs.h <<EOF
5421 #define $ac_tr_hdr 1
5422 EOF
5423  
5424 else
5425   echo "$ac_t""no" 1>&6
5426 fi
5427 done
5428
5429 if test "$ac_cv_header_regex_h" != yes ; then
5430         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5431 fi
5432 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5433 echo "configure:5434: checking for regfree" >&5
5434 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5435   echo $ac_n "(cached) $ac_c" 1>&6
5436 else
5437   cat > conftest.$ac_ext <<EOF
5438 #line 5439 "configure"
5439 #include "confdefs.h"
5440 /* System header to define __stub macros and hopefully few prototypes,
5441     which can conflict with char regfree(); below.  */
5442 #include <assert.h>
5443 /* Override any gcc2 internal prototype to avoid an error.  */
5444 /* We use char because int might match the return type of a gcc2
5445     builtin and then its argument prototype would still apply.  */
5446 char regfree();
5447 char (*f)();
5448
5449 int main() {
5450
5451 /* The GNU C library defines this for functions which it implements
5452     to always fail with ENOSYS.  Some functions are actually named
5453     something starting with __ and the normal name is an alias.  */
5454 #if defined (__stub_regfree) || defined (__stub___regfree)
5455 choke me
5456 #else
5457 f = regfree;
5458 #endif
5459
5460 ; return 0; }
5461 EOF
5462 if { (eval echo configure:5463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5463   rm -rf conftest*
5464   eval "ac_cv_func_regfree=yes"
5465 else
5466   echo "configure: failed program was:" >&5
5467   cat conftest.$ac_ext >&5
5468   rm -rf conftest*
5469   eval "ac_cv_func_regfree=no"
5470 fi
5471 rm -f conftest*
5472 fi
5473
5474 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5475   echo "$ac_t""yes" 1>&6
5476   :
5477 else
5478   echo "$ac_t""no" 1>&6
5479 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5480 fi
5481
5482
5483
5484 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5485 echo "configure:5486: checking for compatible POSIX regex" >&5
5486 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5487   echo $ac_n "(cached) $ac_c" 1>&6
5488 else
5489   
5490         if test "$cross_compiling" = yes; then
5491   ol_cv_c_posix_regex=cross
5492 else
5493   cat > conftest.$ac_ext <<EOF
5494 #line 5495 "configure"
5495 #include "confdefs.h"
5496
5497 #include <sys/types.h>
5498 #include <regex.h>
5499 static char *pattern, *string;
5500 main()
5501 {
5502         int rc;
5503         regex_t re;
5504
5505         pattern = "^A";
5506
5507         if(regcomp(&re, pattern, 0)) {
5508                 return -1;
5509         }
5510         
5511         string = "ALL MATCH";
5512         
5513         rc = regexec(&re, string, 0, (void*)0, 0);
5514
5515         regfree(&re);
5516
5517         return rc;
5518 }
5519 EOF
5520 if { (eval echo configure:5521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5521 then
5522   ol_cv_c_posix_regex=yes
5523 else
5524   echo "configure: failed program was:" >&5
5525   cat conftest.$ac_ext >&5
5526   rm -fr conftest*
5527   ol_cv_c_posix_regex=no
5528 fi
5529 rm -fr conftest*
5530 fi
5531
5532 fi
5533
5534 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5535
5536 if test "$ol_cv_c_posix_regex" = no ; then
5537         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5538 fi
5539
5540 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5541 echo "configure:5542: checking for res_search" >&5
5542 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5543   echo $ac_n "(cached) $ac_c" 1>&6
5544 else
5545   cat > conftest.$ac_ext <<EOF
5546 #line 5547 "configure"
5547 #include "confdefs.h"
5548 /* System header to define __stub macros and hopefully few prototypes,
5549     which can conflict with char res_search(); below.  */
5550 #include <assert.h>
5551 /* Override any gcc2 internal prototype to avoid an error.  */
5552 /* We use char because int might match the return type of a gcc2
5553     builtin and then its argument prototype would still apply.  */
5554 char res_search();
5555 char (*f)();
5556
5557 int main() {
5558
5559 /* The GNU C library defines this for functions which it implements
5560     to always fail with ENOSYS.  Some functions are actually named
5561     something starting with __ and the normal name is an alias.  */
5562 #if defined (__stub_res_search) || defined (__stub___res_search)
5563 choke me
5564 #else
5565 f = res_search;
5566 #endif
5567
5568 ; return 0; }
5569 EOF
5570 if { (eval echo configure:5571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5571   rm -rf conftest*
5572   eval "ac_cv_func_res_search=yes"
5573 else
5574   echo "configure: failed program was:" >&5
5575   cat conftest.$ac_ext >&5
5576   rm -rf conftest*
5577   eval "ac_cv_func_res_search=no"
5578 fi
5579 rm -f conftest*
5580 fi
5581
5582 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5583   echo "$ac_t""yes" 1>&6
5584   :
5585 else
5586   echo "$ac_t""no" 1>&6
5587 fi
5588
5589 if test $ac_cv_func_res_search = no ; then 
5590         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5591 echo "configure:5592: checking for res_search in -lbind" >&5
5592 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5594   echo $ac_n "(cached) $ac_c" 1>&6
5595 else
5596   ac_save_LIBS="$LIBS"
5597 LIBS="-lbind  $LIBS"
5598 cat > conftest.$ac_ext <<EOF
5599 #line 5600 "configure"
5600 #include "confdefs.h"
5601 /* Override any gcc2 internal prototype to avoid an error.  */
5602 /* We use char because int might match the return type of a gcc2
5603     builtin and then its argument prototype would still apply.  */
5604 char res_search();
5605
5606 int main() {
5607 res_search()
5608 ; return 0; }
5609 EOF
5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5611   rm -rf conftest*
5612   eval "ac_cv_lib_$ac_lib_var=yes"
5613 else
5614   echo "configure: failed program was:" >&5
5615   cat conftest.$ac_ext >&5
5616   rm -rf conftest*
5617   eval "ac_cv_lib_$ac_lib_var=no"
5618 fi
5619 rm -f conftest*
5620 LIBS="$ac_save_LIBS"
5621
5622 fi
5623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5624   echo "$ac_t""yes" 1>&6
5625     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5626     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5627   cat >> confdefs.h <<EOF
5628 #define $ac_tr_lib 1
5629 EOF
5630
5631   LIBS="-lbind $LIBS"
5632
5633 else
5634   echo "$ac_t""no" 1>&6
5635 fi
5636
5637         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5638 fi
5639
5640 if test $ac_cv_func_res_search = no ; then 
5641         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5642 echo "configure:5643: checking for __res_search in -lbind" >&5
5643 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5645   echo $ac_n "(cached) $ac_c" 1>&6
5646 else
5647   ac_save_LIBS="$LIBS"
5648 LIBS="-lbind  $LIBS"
5649 cat > conftest.$ac_ext <<EOF
5650 #line 5651 "configure"
5651 #include "confdefs.h"
5652 /* Override any gcc2 internal prototype to avoid an error.  */
5653 /* We use char because int might match the return type of a gcc2
5654     builtin and then its argument prototype would still apply.  */
5655 char __res_search();
5656
5657 int main() {
5658 __res_search()
5659 ; return 0; }
5660 EOF
5661 if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5662   rm -rf conftest*
5663   eval "ac_cv_lib_$ac_lib_var=yes"
5664 else
5665   echo "configure: failed program was:" >&5
5666   cat conftest.$ac_ext >&5
5667   rm -rf conftest*
5668   eval "ac_cv_lib_$ac_lib_var=no"
5669 fi
5670 rm -f conftest*
5671 LIBS="$ac_save_LIBS"
5672
5673 fi
5674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5675   echo "$ac_t""yes" 1>&6
5676     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5677     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5678   cat >> confdefs.h <<EOF
5679 #define $ac_tr_lib 1
5680 EOF
5681
5682   LIBS="-lbind $LIBS"
5683
5684 else
5685   echo "$ac_t""no" 1>&6
5686 fi
5687
5688         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5689 fi
5690
5691 if test $ac_cv_func_res_search = no ; then 
5692         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5693 echo "configure:5694: checking for res_search in -lresolv" >&5
5694 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5695 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5696   echo $ac_n "(cached) $ac_c" 1>&6
5697 else
5698   ac_save_LIBS="$LIBS"
5699 LIBS="-lresolv  $LIBS"
5700 cat > conftest.$ac_ext <<EOF
5701 #line 5702 "configure"
5702 #include "confdefs.h"
5703 /* Override any gcc2 internal prototype to avoid an error.  */
5704 /* We use char because int might match the return type of a gcc2
5705     builtin and then its argument prototype would still apply.  */
5706 char res_search();
5707
5708 int main() {
5709 res_search()
5710 ; return 0; }
5711 EOF
5712 if { (eval echo configure:5713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5713   rm -rf conftest*
5714   eval "ac_cv_lib_$ac_lib_var=yes"
5715 else
5716   echo "configure: failed program was:" >&5
5717   cat conftest.$ac_ext >&5
5718   rm -rf conftest*
5719   eval "ac_cv_lib_$ac_lib_var=no"
5720 fi
5721 rm -f conftest*
5722 LIBS="$ac_save_LIBS"
5723
5724 fi
5725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5726   echo "$ac_t""yes" 1>&6
5727     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5728     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5729   cat >> confdefs.h <<EOF
5730 #define $ac_tr_lib 1
5731 EOF
5732
5733   LIBS="-lresolv $LIBS"
5734
5735 else
5736   echo "$ac_t""no" 1>&6
5737 fi
5738
5739         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5740 fi
5741
5742 if test "$ac_cv_func_res_search" = yes ; then
5743         cat >> confdefs.h <<\EOF
5744 #define HAVE_RES_SEARCH 1
5745 EOF
5746
5747 elif test $ol_enable_dns = yes ; then
5748         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5749 elif test $ol_enable_dns != no ; then
5750         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5751 fi
5752
5753
5754 ol_link_isode=no
5755 if test $ol_enable_ldapd != no ; then
5756         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5757
5758                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5759 echo "configure:5760: checking for main in -lxtpp" >&5
5760 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5761 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5762   echo $ac_n "(cached) $ac_c" 1>&6
5763 else
5764   ac_save_LIBS="$LIBS"
5765 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5766 cat > conftest.$ac_ext <<EOF
5767 #line 5768 "configure"
5768 #include "confdefs.h"
5769
5770 int main() {
5771 main()
5772 ; return 0; }
5773 EOF
5774 if { (eval echo configure:5775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5775   rm -rf conftest*
5776   eval "ac_cv_lib_$ac_lib_var=yes"
5777 else
5778   echo "configure: failed program was:" >&5
5779   cat conftest.$ac_ext >&5
5780   rm -rf conftest*
5781   eval "ac_cv_lib_$ac_lib_var=no"
5782 fi
5783 rm -f conftest*
5784 LIBS="$ac_save_LIBS"
5785
5786 fi
5787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5788   echo "$ac_t""yes" 1>&6
5789   
5790                 ol_link_isode=yes
5791                 cat >> confdefs.h <<\EOF
5792 #define HAVE_XTPP 1
5793 EOF
5794
5795                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5796                 
5797 else
5798   echo "$ac_t""no" 1>&6
5799 :
5800 fi
5801
5802         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5803 echo "configure:5804: checking for main in -ldsap" >&5
5804 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5806   echo $ac_n "(cached) $ac_c" 1>&6
5807 else
5808   ac_save_LIBS="$LIBS"
5809 LIBS="-ldsap -lisode $LIBS"
5810 cat > conftest.$ac_ext <<EOF
5811 #line 5812 "configure"
5812 #include "confdefs.h"
5813
5814 int main() {
5815 main()
5816 ; return 0; }
5817 EOF
5818 if { (eval echo configure:5819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5819   rm -rf conftest*
5820   eval "ac_cv_lib_$ac_lib_var=yes"
5821 else
5822   echo "configure: failed program was:" >&5
5823   cat conftest.$ac_ext >&5
5824   rm -rf conftest*
5825   eval "ac_cv_lib_$ac_lib_var=no"
5826 fi
5827 rm -f conftest*
5828 LIBS="$ac_save_LIBS"
5829
5830 fi
5831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5832   echo "$ac_t""yes" 1>&6
5833   
5834                 ol_link_isode=yes
5835                 cat >> confdefs.h <<\EOF
5836 #define HAVE_DSAP 1
5837 EOF
5838
5839                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5840                 
5841 else
5842   echo "$ac_t""no" 1>&6
5843 :
5844 fi
5845
5846         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5847 echo "configure:5848: checking for main in -lisode" >&5
5848 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5849 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5850   echo $ac_n "(cached) $ac_c" 1>&6
5851 else
5852   ac_save_LIBS="$LIBS"
5853 LIBS="-lisode  $LIBS"
5854 cat > conftest.$ac_ext <<EOF
5855 #line 5856 "configure"
5856 #include "confdefs.h"
5857
5858 int main() {
5859 main()
5860 ; return 0; }
5861 EOF
5862 if { (eval echo configure:5863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5863   rm -rf conftest*
5864   eval "ac_cv_lib_$ac_lib_var=yes"
5865 else
5866   echo "configure: failed program was:" >&5
5867   cat conftest.$ac_ext >&5
5868   rm -rf conftest*
5869   eval "ac_cv_lib_$ac_lib_var=no"
5870 fi
5871 rm -f conftest*
5872 LIBS="$ac_save_LIBS"
5873
5874 fi
5875 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5876   echo "$ac_t""yes" 1>&6
5877   
5878                 ol_link_isode=yes
5879                 cat >> confdefs.h <<\EOF
5880 #define HAVE_ISODE 1
5881 EOF
5882
5883                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5884                 
5885 else
5886   echo "$ac_t""no" 1>&6
5887 :
5888 fi
5889
5890 fi
5891
5892 if test $ol_link_isode != no; then
5893         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5894 echo "configure:5895: checking for main in -lpp" >&5
5895 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5896 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5897   echo $ac_n "(cached) $ac_c" 1>&6
5898 else
5899   ac_save_LIBS="$LIBS"
5900 LIBS="-lpp  $LIBS"
5901 cat > conftest.$ac_ext <<EOF
5902 #line 5903 "configure"
5903 #include "confdefs.h"
5904
5905 int main() {
5906 main()
5907 ; return 0; }
5908 EOF
5909 if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5910   rm -rf conftest*
5911   eval "ac_cv_lib_$ac_lib_var=yes"
5912 else
5913   echo "configure: failed program was:" >&5
5914   cat conftest.$ac_ext >&5
5915   rm -rf conftest*
5916   eval "ac_cv_lib_$ac_lib_var=no"
5917 fi
5918 rm -f conftest*
5919 LIBS="$ac_save_LIBS"
5920
5921 fi
5922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5923   echo "$ac_t""yes" 1>&6
5924   
5925                 cat >> confdefs.h <<\EOF
5926 #define HAVE_PP 1
5927 EOF
5928
5929                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5930                 
5931 else
5932   echo "$ac_t""no" 1>&6
5933 :
5934 fi
5935
5936
5937         # Extract the first word of "pepsy", so it can be a program name with args.
5938 set dummy pepsy; ac_word=$2
5939 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5940 echo "configure:5941: checking for $ac_word" >&5
5941 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5942   echo $ac_n "(cached) $ac_c" 1>&6
5943 else
5944   case "$PEPSY" in
5945   /*)
5946   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5947   ;;
5948   ?:/*)
5949   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5950   ;;
5951   *)
5952   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5953   ac_dummy="$PATH"
5954   for ac_dir in $ac_dummy; do 
5955     test -z "$ac_dir" && ac_dir=.
5956     if test -f $ac_dir/$ac_word; then
5957       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5958       break
5959     fi
5960   done
5961   IFS="$ac_save_ifs"
5962   ;;
5963 esac
5964 fi
5965 PEPSY="$ac_cv_path_PEPSY"
5966 if test -n "$PEPSY"; then
5967   echo "$ac_t""$PEPSY" 1>&6
5968 else
5969   echo "$ac_t""no" 1>&6
5970 fi
5971
5972 fi
5973
5974 if test $ol_enable_quipu != no ; then
5975         for ac_hdr in quipu/commonarg.h
5976 do
5977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5979 echo "configure:5980: checking for $ac_hdr" >&5
5980 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5981   echo $ac_n "(cached) $ac_c" 1>&6
5982 else
5983   cat > conftest.$ac_ext <<EOF
5984 #line 5985 "configure"
5985 #include "confdefs.h"
5986 #include <$ac_hdr>
5987 EOF
5988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5989 { (eval echo configure:5990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5991 if test -z "$ac_err"; then
5992   rm -rf conftest*
5993   eval "ac_cv_header_$ac_safe=yes"
5994 else
5995   echo "$ac_err" >&5
5996   echo "configure: failed program was:" >&5
5997   cat conftest.$ac_ext >&5
5998   rm -rf conftest*
5999   eval "ac_cv_header_$ac_safe=no"
6000 fi
6001 rm -f conftest*
6002 fi
6003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6004   echo "$ac_t""yes" 1>&6
6005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6006   cat >> confdefs.h <<EOF
6007 #define $ac_tr_hdr 1
6008 EOF
6009  
6010 else
6011   echo "$ac_t""no" 1>&6
6012 fi
6013 done
6014
6015
6016         if test $ac_cv_header_quipu_commonarg_h = yes ; then
6017                 BUILD_QUIPU=yes
6018         elif test $ol_enable_quipu = auto ; then
6019                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
6020         else
6021                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
6022         fi
6023 fi
6024
6025 ol_link_kbind=no
6026 ol_link_kpasswd=no
6027 ol_link_krb5=no
6028 ol_link_krb4=no
6029
6030 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
6031         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
6032
6033         for ac_hdr in krb5.h
6034 do
6035 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6036 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6037 echo "configure:6038: checking for $ac_hdr" >&5
6038 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6039   echo $ac_n "(cached) $ac_c" 1>&6
6040 else
6041   cat > conftest.$ac_ext <<EOF
6042 #line 6043 "configure"
6043 #include "confdefs.h"
6044 #include <$ac_hdr>
6045 EOF
6046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6047 { (eval echo configure:6048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6049 if test -z "$ac_err"; then
6050   rm -rf conftest*
6051   eval "ac_cv_header_$ac_safe=yes"
6052 else
6053   echo "$ac_err" >&5
6054   echo "configure: failed program was:" >&5
6055   cat conftest.$ac_ext >&5
6056   rm -rf conftest*
6057   eval "ac_cv_header_$ac_safe=no"
6058 fi
6059 rm -f conftest*
6060 fi
6061 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6062   echo "$ac_t""yes" 1>&6
6063     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6064   cat >> confdefs.h <<EOF
6065 #define $ac_tr_hdr 1
6066 EOF
6067  
6068 else
6069   echo "$ac_t""no" 1>&6
6070 fi
6071 done
6072
6073
6074         if test $ac_cv_header_krb5_h = yes ; then
6075                                 for ac_hdr in heim_err.h
6076 do
6077 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6078 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6079 echo "configure:6080: checking for $ac_hdr" >&5
6080 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6081   echo $ac_n "(cached) $ac_c" 1>&6
6082 else
6083   cat > conftest.$ac_ext <<EOF
6084 #line 6085 "configure"
6085 #include "confdefs.h"
6086 #include <$ac_hdr>
6087 EOF
6088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6089 { (eval echo configure:6090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6091 if test -z "$ac_err"; then
6092   rm -rf conftest*
6093   eval "ac_cv_header_$ac_safe=yes"
6094 else
6095   echo "$ac_err" >&5
6096   echo "configure: failed program was:" >&5
6097   cat conftest.$ac_ext >&5
6098   rm -rf conftest*
6099   eval "ac_cv_header_$ac_safe=no"
6100 fi
6101 rm -f conftest*
6102 fi
6103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6104   echo "$ac_t""yes" 1>&6
6105     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6106   cat >> confdefs.h <<EOF
6107 #define $ac_tr_hdr 1
6108 EOF
6109  
6110 else
6111   echo "$ac_t""no" 1>&6
6112 fi
6113 done
6114
6115                 if test $ac_cv_header_heim_err_h = yes ; then
6116                         krb5_impl=heimdal
6117                 else
6118                         krb5_impl=mit
6119                 fi
6120
6121                 if test $krb5_impl = mit; then
6122                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6123 echo "configure:6124: checking for main in -lkrb5" >&5
6124 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6125 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6126   echo $ac_n "(cached) $ac_c" 1>&6
6127 else
6128   ac_save_LIBS="$LIBS"
6129 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6130 cat > conftest.$ac_ext <<EOF
6131 #line 6132 "configure"
6132 #include "confdefs.h"
6133
6134 int main() {
6135 main()
6136 ; return 0; }
6137 EOF
6138 if { (eval echo configure:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6139   rm -rf conftest*
6140   eval "ac_cv_lib_$ac_lib_var=yes"
6141 else
6142   echo "configure: failed program was:" >&5
6143   cat conftest.$ac_ext >&5
6144   rm -rf conftest*
6145   eval "ac_cv_lib_$ac_lib_var=no"
6146 fi
6147 rm -f conftest*
6148 LIBS="$ac_save_LIBS"
6149
6150 fi
6151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6152   echo "$ac_t""yes" 1>&6
6153   have_krb5=yes
6154                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6155 else
6156   echo "$ac_t""no" 1>&6
6157 have_krb5=no
6158 fi
6159
6160
6161                 elif test $krb5_impl = heimdal; then
6162                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6163 echo "configure:6164: checking for main in -lkrb5" >&5
6164 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6165 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6166   echo $ac_n "(cached) $ac_c" 1>&6
6167 else
6168   ac_save_LIBS="$LIBS"
6169 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6170 cat > conftest.$ac_ext <<EOF
6171 #line 6172 "configure"
6172 #include "confdefs.h"
6173
6174 int main() {
6175 main()
6176 ; return 0; }
6177 EOF
6178 if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6179   rm -rf conftest*
6180   eval "ac_cv_lib_$ac_lib_var=yes"
6181 else
6182   echo "configure: failed program was:" >&5
6183   cat conftest.$ac_ext >&5
6184   rm -rf conftest*
6185   eval "ac_cv_lib_$ac_lib_var=no"
6186 fi
6187 rm -f conftest*
6188 LIBS="$ac_save_LIBS"
6189
6190 fi
6191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6192   echo "$ac_t""yes" 1>&6
6193   have_krb5=yes
6194                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6195 else
6196   echo "$ac_t""no" 1>&6
6197 have_krb5=no
6198 fi
6199
6200
6201                         cat >> confdefs.h <<\EOF
6202 #define HAVE_HEIMDAL_KERBEROS 1
6203 EOF
6204
6205                 else
6206                         have_krb5=no
6207                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6208                 fi
6209
6210                 if test $have_krb5 = yes ; then
6211                         ol_link_krb5=yes
6212
6213                         cat >> confdefs.h <<\EOF
6214 #define HAVE_KRB5 1
6215 EOF
6216
6217
6218                         if test $ol_enable_kpasswd != no ; then
6219                                 ol_link_kpasswd=yes;
6220                         fi
6221
6222                         if test $ol_with_kerberos = k5only ; then
6223                                 ol_with_kerberos=found
6224                         fi
6225
6226                 elif test $ol_with_kerberos != auto ; then
6227                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6228                 fi
6229
6230         fi
6231 fi
6232
6233 if test $ol_link_krb5 = yes -a \
6234         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6235
6236         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6237 do
6238 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6239 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6240 echo "configure:6241: checking for $ac_hdr" >&5
6241 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6242   echo $ac_n "(cached) $ac_c" 1>&6
6243 else
6244   cat > conftest.$ac_ext <<EOF
6245 #line 6246 "configure"
6246 #include "confdefs.h"
6247 #include <$ac_hdr>
6248 EOF
6249 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6250 { (eval echo configure:6251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6251 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6252 if test -z "$ac_err"; then
6253   rm -rf conftest*
6254   eval "ac_cv_header_$ac_safe=yes"
6255 else
6256   echo "$ac_err" >&5
6257   echo "configure: failed program was:" >&5
6258   cat conftest.$ac_ext >&5
6259   rm -rf conftest*
6260   eval "ac_cv_header_$ac_safe=no"
6261 fi
6262 rm -f conftest*
6263 fi
6264 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6265   echo "$ac_t""yes" 1>&6
6266     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6267   cat >> confdefs.h <<EOF
6268 #define $ac_tr_hdr 1
6269 EOF
6270  
6271 else
6272   echo "$ac_t""no" 1>&6
6273 fi
6274 done
6275
6276
6277         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6278                 if test $krb5_impl = mit; then
6279                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6280 echo "configure:6281: checking for main in -lkrb4" >&5
6281 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6282 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6283   echo $ac_n "(cached) $ac_c" 1>&6
6284 else
6285   ac_save_LIBS="$LIBS"
6286 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6287 cat > conftest.$ac_ext <<EOF
6288 #line 6289 "configure"
6289 #include "confdefs.h"
6290
6291 int main() {
6292 main()
6293 ; return 0; }
6294 EOF
6295 if { (eval echo configure:6296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6296   rm -rf conftest*
6297   eval "ac_cv_lib_$ac_lib_var=yes"
6298 else
6299   echo "configure: failed program was:" >&5
6300   cat conftest.$ac_ext >&5
6301   rm -rf conftest*
6302   eval "ac_cv_lib_$ac_lib_var=no"
6303 fi
6304 rm -f conftest*
6305 LIBS="$ac_save_LIBS"
6306
6307 fi
6308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6309   echo "$ac_t""yes" 1>&6
6310   have_k425=yes
6311                                 KRB4_LIBS="-lkrb4 -ldes425"
6312 else
6313   echo "$ac_t""no" 1>&6
6314 have_k425=no
6315 fi
6316
6317
6318                 elif test $krb5_impl = heimdal; then
6319                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6320 echo "configure:6321: checking for main in -lkrb4" >&5
6321 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6322 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6323   echo $ac_n "(cached) $ac_c" 1>&6
6324 else
6325   ac_save_LIBS="$LIBS"
6326 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6327 cat > conftest.$ac_ext <<EOF
6328 #line 6329 "configure"
6329 #include "confdefs.h"
6330
6331 int main() {
6332 main()
6333 ; return 0; }
6334 EOF
6335 if { (eval echo configure:6336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6336   rm -rf conftest*
6337   eval "ac_cv_lib_$ac_lib_var=yes"
6338 else
6339   echo "configure: failed program was:" >&5
6340   cat conftest.$ac_ext >&5
6341   rm -rf conftest*
6342   eval "ac_cv_lib_$ac_lib_var=no"
6343 fi
6344 rm -f conftest*
6345 LIBS="$ac_save_LIBS"
6346
6347 fi
6348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6349   echo "$ac_t""yes" 1>&6
6350   have_k425=yes
6351                                 KRB4_LIBS="-lkrb4"
6352 else
6353   echo "$ac_t""no" 1>&6
6354 have_k425=no
6355 fi
6356
6357
6358                 else
6359                         have_425=no
6360                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6361                 fi
6362
6363                 if test $have_k425 = yes ; then
6364                         ol_with_kerberos=found
6365                         ol_link_krb4=yes
6366
6367                         cat >> confdefs.h <<\EOF
6368 #define HAVE_KRB425 1
6369 EOF
6370
6371                         cat >> confdefs.h <<\EOF
6372 #define HAVE_KRB4 1
6373 EOF
6374
6375
6376                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6377 echo "configure:6378: checking for des_debug in Kerberos libraries" >&5
6378 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6379   echo $ac_n "(cached) $ac_c" 1>&6
6380 else
6381   
6382                                                                 save_LIBS="$LIBS"
6383                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6384                                 cat > conftest.$ac_ext <<EOF
6385 #line 6386 "configure"
6386 #include "confdefs.h"
6387
6388 #include <kerberosIV/krb.h>
6389 #include <kerberosIV/des.h>
6390 extern int des_debug;
6391
6392 int main() {
6393
6394 des_debug = 1;
6395
6396 ; return 0; }
6397 EOF
6398 if { (eval echo configure:6399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6399   rm -rf conftest*
6400   ol_cv_var_des_debug=yes
6401 else
6402   echo "configure: failed program was:" >&5
6403   cat conftest.$ac_ext >&5
6404   rm -rf conftest*
6405   ol_cv_var_des_debug=no
6406 fi
6407 rm -f conftest*
6408                                                                 LIBS="$save_LIBS"
6409                         
6410 fi
6411
6412 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6413
6414                         if test $ol_cv_var_des_debug = yes ; then
6415                                 cat >> confdefs.h <<\EOF
6416 #define HAVE_DES_DEBUG 1
6417 EOF
6418
6419                         fi
6420
6421                         LIBS="$save_LIBS"
6422                 fi
6423         fi
6424 fi
6425
6426 if test $ol_link_krb5 = yes ; then
6427         ol_with_kerberos=found
6428 fi
6429
6430 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6431         -o $ol_with_kerberos = kth ; then
6432
6433         for ac_hdr in krb.h des.h krb-archaeology.h 
6434 do
6435 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6436 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6437 echo "configure:6438: checking for $ac_hdr" >&5
6438 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6439   echo $ac_n "(cached) $ac_c" 1>&6
6440 else
6441   cat > conftest.$ac_ext <<EOF
6442 #line 6443 "configure"
6443 #include "confdefs.h"
6444 #include <$ac_hdr>
6445 EOF
6446 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6447 { (eval echo configure:6448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6448 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6449 if test -z "$ac_err"; then
6450   rm -rf conftest*
6451   eval "ac_cv_header_$ac_safe=yes"
6452 else
6453   echo "$ac_err" >&5
6454   echo "configure: failed program was:" >&5
6455   cat conftest.$ac_ext >&5
6456   rm -rf conftest*
6457   eval "ac_cv_header_$ac_safe=no"
6458 fi
6459 rm -f conftest*
6460 fi
6461 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6462   echo "$ac_t""yes" 1>&6
6463     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6464   cat >> confdefs.h <<EOF
6465 #define $ac_tr_hdr 1
6466 EOF
6467  
6468 else
6469   echo "$ac_t""no" 1>&6
6470 fi
6471 done
6472
6473
6474         if test $ac_cv_header_krb_h = yes ; then
6475                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6476 echo "configure:6477: checking for main in -lkrb" >&5
6477 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6478 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6479   echo $ac_n "(cached) $ac_c" 1>&6
6480 else
6481   ac_save_LIBS="$LIBS"
6482 LIBS="-lkrb -ldes $LIBS"
6483 cat > conftest.$ac_ext <<EOF
6484 #line 6485 "configure"
6485 #include "confdefs.h"
6486
6487 int main() {
6488 main()
6489 ; return 0; }
6490 EOF
6491 if { (eval echo configure:6492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6492   rm -rf conftest*
6493   eval "ac_cv_lib_$ac_lib_var=yes"
6494 else
6495   echo "configure: failed program was:" >&5
6496   cat conftest.$ac_ext >&5
6497   rm -rf conftest*
6498   eval "ac_cv_lib_$ac_lib_var=no"
6499 fi
6500 rm -f conftest*
6501 LIBS="$ac_save_LIBS"
6502
6503 fi
6504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6505   echo "$ac_t""yes" 1>&6
6506   have_k4=yes
6507 else
6508   echo "$ac_t""no" 1>&6
6509 have_k4=no
6510 fi
6511
6512
6513                 if test $have_k4 = yes ; then
6514                         ol_with_kerberos=found
6515                         ol_link_krb4=yes
6516
6517                         cat >> confdefs.h <<\EOF
6518 #define HAVE_KRB4 1
6519 EOF
6520
6521
6522                         KRB4_LIBS="-lkrb -ldes"
6523
6524                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6525                                 cat >> confdefs.h <<\EOF
6526 #define HAVE_KTH_KERBEROS 1
6527 EOF
6528
6529                         fi
6530                 fi
6531         fi
6532 fi
6533
6534 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6535         ol_link_kpasswd=yes;
6536 fi
6537
6538 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6539         cat >> confdefs.h <<\EOF
6540 #define HAVE_KERBEROS 1
6541 EOF
6542
6543
6544 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6545         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6546 fi
6547
6548 ol_link_tls=no
6549 if test $ol_with_tls != no ; then
6550         
6551         for ac_hdr in openssl/ssl.h ssl.h
6552 do
6553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6555 echo "configure:6556: checking for $ac_hdr" >&5
6556 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6557   echo $ac_n "(cached) $ac_c" 1>&6
6558 else
6559   cat > conftest.$ac_ext <<EOF
6560 #line 6561 "configure"
6561 #include "confdefs.h"
6562 #include <$ac_hdr>
6563 EOF
6564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6565 { (eval echo configure:6566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6567 if test -z "$ac_err"; then
6568   rm -rf conftest*
6569   eval "ac_cv_header_$ac_safe=yes"
6570 else
6571   echo "$ac_err" >&5
6572   echo "configure: failed program was:" >&5
6573   cat conftest.$ac_ext >&5
6574   rm -rf conftest*
6575   eval "ac_cv_header_$ac_safe=no"
6576 fi
6577 rm -f conftest*
6578 fi
6579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6580   echo "$ac_t""yes" 1>&6
6581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6582   cat >> confdefs.h <<EOF
6583 #define $ac_tr_hdr 1
6584 EOF
6585  
6586 else
6587   echo "$ac_t""no" 1>&6
6588 fi
6589 done
6590
6591         
6592         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6593                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6594 echo "configure:6595: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6595 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6596 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6597   echo $ac_n "(cached) $ac_c" 1>&6
6598 else
6599   ac_save_LIBS="$LIBS"
6600 LIBS="-lssl -lcrypto $LIBS"
6601 cat > conftest.$ac_ext <<EOF
6602 #line 6603 "configure"
6603 #include "confdefs.h"
6604 /* Override any gcc2 internal prototype to avoid an error.  */
6605 /* We use char because int might match the return type of a gcc2
6606     builtin and then its argument prototype would still apply.  */
6607 char SSLeay_add_ssl_algorithms();
6608
6609 int main() {
6610 SSLeay_add_ssl_algorithms()
6611 ; return 0; }
6612 EOF
6613 if { (eval echo configure:6614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6614   rm -rf conftest*
6615   eval "ac_cv_lib_$ac_lib_var=yes"
6616 else
6617   echo "configure: failed program was:" >&5
6618   cat conftest.$ac_ext >&5
6619   rm -rf conftest*
6620   eval "ac_cv_lib_$ac_lib_var=no"
6621 fi
6622 rm -f conftest*
6623 LIBS="$ac_save_LIBS"
6624
6625 fi
6626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6627   echo "$ac_t""yes" 1>&6
6628   have_ssleay=yes
6629                         need_rsaref=no
6630 else
6631   echo "$ac_t""no" 1>&6
6632 have_ssleay=no
6633 fi
6634
6635                         
6636                 if test $have_ssleay = no ; then
6637                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6638 echo "configure:6639: checking for SSL_library_init in -lssl" >&5
6639 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6640 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6641   echo $ac_n "(cached) $ac_c" 1>&6
6642 else
6643   ac_save_LIBS="$LIBS"
6644 LIBS="-lssl -lcrypto $LIBS"
6645 cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648 /* Override any gcc2 internal prototype to avoid an error.  */
6649 /* We use char because int might match the return type of a gcc2
6650     builtin and then its argument prototype would still apply.  */
6651 char SSL_library_init();
6652
6653 int main() {
6654 SSL_library_init()
6655 ; return 0; }
6656 EOF
6657 if { (eval echo configure:6658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6658   rm -rf conftest*
6659   eval "ac_cv_lib_$ac_lib_var=yes"
6660 else
6661   echo "configure: failed program was:" >&5
6662   cat conftest.$ac_ext >&5
6663   rm -rf conftest*
6664   eval "ac_cv_lib_$ac_lib_var=no"
6665 fi
6666 rm -f conftest*
6667 LIBS="$ac_save_LIBS"
6668
6669 fi
6670 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6671   echo "$ac_t""yes" 1>&6
6672   have_ssleay=yes
6673                                 need_rsaref=no
6674 else
6675   echo "$ac_t""no" 1>&6
6676 have_ssleay=no
6677 fi
6678
6679                 fi
6680
6681                 if test $have_ssleay = no ; then
6682                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6683 echo "configure:6684: checking for ssl3_accept in -lssl" >&5
6684 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6685 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6686   echo $ac_n "(cached) $ac_c" 1>&6
6687 else
6688   ac_save_LIBS="$LIBS"
6689 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6690 cat > conftest.$ac_ext <<EOF
6691 #line 6692 "configure"
6692 #include "confdefs.h"
6693 /* Override any gcc2 internal prototype to avoid an error.  */
6694 /* We use char because int might match the return type of a gcc2
6695     builtin and then its argument prototype would still apply.  */
6696 char ssl3_accept();
6697
6698 int main() {
6699 ssl3_accept()
6700 ; return 0; }
6701 EOF
6702 if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6703   rm -rf conftest*
6704   eval "ac_cv_lib_$ac_lib_var=yes"
6705 else
6706   echo "configure: failed program was:" >&5
6707   cat conftest.$ac_ext >&5
6708   rm -rf conftest*
6709   eval "ac_cv_lib_$ac_lib_var=no"
6710 fi
6711 rm -f conftest*
6712 LIBS="$ac_save_LIBS"
6713
6714 fi
6715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6716   echo "$ac_t""yes" 1>&6
6717   have_ssleay=yes
6718                                 need_rsaref=yes
6719 else
6720   echo "$ac_t""no" 1>&6
6721 have_ssleay=no
6722 fi
6723
6724                 fi
6725
6726                 if test $have_ssleay = yes ; then
6727                         ol_with_tls=found
6728                         ol_link_tls=yes
6729
6730                         cat >> confdefs.h <<\EOF
6731 #define HAVE_SSLEAY 1
6732 EOF
6733
6734
6735                         if test $need_rsaref = yes; then
6736                                 cat >> confdefs.h <<\EOF
6737 #define HAVE_RSAREF 1
6738 EOF
6739
6740
6741                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6742                         else
6743                                 TLS_LIBS="-lssl -lcrypto"
6744                         fi
6745                 fi
6746         fi
6747 fi
6748
6749 if test $ol_link_tls = yes ; then
6750         cat >> confdefs.h <<\EOF
6751 #define HAVE_TLS 1
6752 EOF
6753
6754 fi      
6755
6756 for ac_func in \
6757         ctime_r                 \
6758         gethostbyname_r gethostbyaddr_r \
6759
6760 do
6761 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6762 echo "configure:6763: checking for $ac_func" >&5
6763 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6764   echo $ac_n "(cached) $ac_c" 1>&6
6765 else
6766   cat > conftest.$ac_ext <<EOF
6767 #line 6768 "configure"
6768 #include "confdefs.h"
6769 /* System header to define __stub macros and hopefully few prototypes,
6770     which can conflict with char $ac_func(); below.  */
6771 #include <assert.h>
6772 /* Override any gcc2 internal prototype to avoid an error.  */
6773 /* We use char because int might match the return type of a gcc2
6774     builtin and then its argument prototype would still apply.  */
6775 char $ac_func();
6776 char (*f)();
6777
6778 int main() {
6779
6780 /* The GNU C library defines this for functions which it implements
6781     to always fail with ENOSYS.  Some functions are actually named
6782     something starting with __ and the normal name is an alias.  */
6783 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6784 choke me
6785 #else
6786 f = $ac_func;
6787 #endif
6788
6789 ; return 0; }
6790 EOF
6791 if { (eval echo configure:6792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6792   rm -rf conftest*
6793   eval "ac_cv_func_$ac_func=yes"
6794 else
6795   echo "configure: failed program was:" >&5
6796   cat conftest.$ac_ext >&5
6797   rm -rf conftest*
6798   eval "ac_cv_func_$ac_func=no"
6799 fi
6800 rm -f conftest*
6801 fi
6802
6803 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6804   echo "$ac_t""yes" 1>&6
6805     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6806   cat >> confdefs.h <<EOF
6807 #define $ac_tr_func 1
6808 EOF
6809  
6810 else
6811   echo "$ac_t""no" 1>&6
6812 fi
6813 done
6814
6815
6816 if test "$ac_cv_func_ctime_r" = no ; then
6817         ol_cv_func_ctime_r_nargs=0
6818 else
6819         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6820 echo "configure:6821: checking number of arguments of ctime_r" >&5
6821 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6822   echo $ac_n "(cached) $ac_c" 1>&6
6823 else
6824   cat > conftest.$ac_ext <<EOF
6825 #line 6826 "configure"
6826 #include "confdefs.h"
6827 #include <time.h>
6828 int main() {
6829 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6830 ; return 0; }
6831 EOF
6832 if { (eval echo configure:6833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6833   rm -rf conftest*
6834   ol_cv_func_ctime_r_nargs3=yes
6835 else
6836   echo "configure: failed program was:" >&5
6837   cat conftest.$ac_ext >&5
6838   rm -rf conftest*
6839   ol_cv_func_ctime_r_nargs3=no
6840 fi
6841 rm -f conftest*
6842
6843         cat > conftest.$ac_ext <<EOF
6844 #line 6845 "configure"
6845 #include "confdefs.h"
6846 #include <time.h>
6847 int main() {
6848 time_t ti; char *buffer; ctime_r(&ti,buffer);
6849 ; return 0; }
6850 EOF
6851 if { (eval echo configure:6852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6852   rm -rf conftest*
6853   ol_cv_func_ctime_r_nargs2=yes
6854 else
6855   echo "configure: failed program was:" >&5
6856   cat conftest.$ac_ext >&5
6857   rm -rf conftest*
6858   ol_cv_func_ctime_r_nargs2=no
6859 fi
6860 rm -f conftest*
6861
6862         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6863                 $ol_cv_func_ctime_r_nargs2 = no ; then
6864
6865                 ol_cv_func_ctime_r_nargs=3
6866
6867         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6868                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6869
6870                 ol_cv_func_ctime_r_nargs=2
6871
6872         else
6873                 ol_cv_func_ctime_r_nargs=0
6874         fi
6875   
6876 fi
6877
6878 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6879
6880   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6881         cat >> confdefs.h <<EOF
6882 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6883 EOF
6884
6885   fi
6886
6887 fi
6888
6889 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6890         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6891 echo "configure:6892: checking number of arguments of gethostbyname_r" >&5
6892 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6893   echo $ac_n "(cached) $ac_c" 1>&6
6894 else
6895   cat > conftest.$ac_ext <<EOF
6896 #line 6897 "configure"
6897 #include "confdefs.h"
6898 #include <sys/types.h>
6899 #include <sys/socket.h>
6900 #include <netinet/in.h>
6901 #include <netdb.h>
6902 #define BUFSIZE (sizeof(struct hostent)+10)
6903 int main() {
6904 struct hostent hent; char buffer[BUFSIZE];
6905                 int bufsize=BUFSIZE;int h_errno;
6906                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6907                         buffer, bufsize, &h_errno);
6908 ; return 0; }
6909 EOF
6910 if { (eval echo configure:6911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6911   rm -rf conftest*
6912   ol_cv_func_gethostbyname_r_nargs5=yes
6913 else
6914   echo "configure: failed program was:" >&5
6915   cat conftest.$ac_ext >&5
6916   rm -rf conftest*
6917   ol_cv_func_gethostbyname_r_nargs5=no
6918 fi
6919 rm -f conftest*
6920
6921         cat > conftest.$ac_ext <<EOF
6922 #line 6923 "configure"
6923 #include "confdefs.h"
6924 #include <sys/types.h>
6925 #include <sys/socket.h>
6926 #include <netinet/in.h>
6927 #include <netdb.h>
6928 #define BUFSIZE (sizeof(struct hostent)+10)
6929 int main() {
6930 struct hostent hent;struct hostent *rhent;
6931                 char buffer[BUFSIZE];
6932                 int bufsize=BUFSIZE;int h_errno;
6933                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6934                         &rhent, &h_errno);
6935 ; return 0; }
6936 EOF
6937 if { (eval echo configure:6938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6938   rm -rf conftest*
6939   ol_cv_func_gethostbyname_r_nargs6=yes
6940 else
6941   echo "configure: failed program was:" >&5
6942   cat conftest.$ac_ext >&5
6943   rm -rf conftest*
6944   ol_cv_func_gethostbyname_r_nargs6=no
6945 fi
6946 rm -f conftest*
6947
6948         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6949                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6950
6951                 ol_cv_func_gethostbyname_r_nargs=5
6952
6953         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6954                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6955
6956                 ol_cv_func_gethostbyname_r_nargs=6
6957
6958         else
6959                 ol_cv_func_gethostbyname_r_nargs=0
6960         fi
6961   
6962 fi
6963
6964 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6965   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6966         cat >> confdefs.h <<EOF
6967 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6968 EOF
6969
6970   fi
6971
6972 else
6973         ol_cv_func_gethostbyname_r_nargs=0
6974 fi
6975  
6976 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6977         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6978 echo "configure:6979: checking number of arguments of gethostbyaddr_r" >&5
6979 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6980   echo $ac_n "(cached) $ac_c" 1>&6
6981 else
6982   cat > conftest.$ac_ext <<EOF
6983 #line 6984 "configure"
6984 #include "confdefs.h"
6985 #include <sys/types.h>
6986 #include <sys/socket.h>
6987 #include <netinet/in.h>
6988 #include <netdb.h>
6989 #define BUFSIZE (sizeof(struct hostent)+10)
6990 int main() {
6991 struct hostent hent; char buffer[BUFSIZE]; 
6992             struct in_addr add;
6993             size_t alen=sizeof(struct in_addr);
6994             int bufsize=BUFSIZE;int h_errno;
6995                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6996                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6997 ; return 0; }
6998 EOF
6999 if { (eval echo configure:7000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7000   rm -rf conftest*
7001   ol_cv_func_gethostbyaddr_r_nargs7=yes
7002 else
7003   echo "configure: failed program was:" >&5
7004   cat conftest.$ac_ext >&5
7005   rm -rf conftest*
7006   ol_cv_func_gethostbyaddr_r_nargs7=no
7007 fi
7008 rm -f conftest*
7009
7010         cat > conftest.$ac_ext <<EOF
7011 #line 7012 "configure"
7012 #include "confdefs.h"
7013 #include <sys/types.h>
7014 #include <sys/socket.h>
7015 #include <netinet/in.h>
7016 #include <netdb.h>
7017 #define BUFSIZE (sizeof(struct hostent)+10)
7018 int main() {
7019 struct hostent hent;
7020                 struct hostent *rhent; char buffer[BUFSIZE]; 
7021                 struct in_addr add;
7022                 size_t alen=sizeof(struct in_addr);
7023                 int bufsize=BUFSIZE;int h_errno;
7024                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7025                         alen, AF_INET, &hent, buffer, bufsize, 
7026                         &rhent, &h_errno);
7027 ; return 0; }
7028 EOF
7029 if { (eval echo configure:7030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7030   rm -rf conftest*
7031   ol_cv_func_gethostbyaddr_r_nargs8=yes
7032 else
7033   echo "configure: failed program was:" >&5
7034   cat conftest.$ac_ext >&5
7035   rm -rf conftest*
7036   ol_cv_func_gethostbyaddr_r_nargs8=no
7037 fi
7038 rm -f conftest*
7039
7040         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7041                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7042
7043                 ol_cv_func_gethostbyaddr_r_nargs=7
7044
7045         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7046                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7047
7048                 ol_cv_func_gethostbyaddr_r_nargs=8
7049
7050         else
7051                 ol_cv_func_gethostbyaddr_r_nargs=0
7052         fi
7053   
7054 fi
7055
7056 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7057   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7058     cat >> confdefs.h <<EOF
7059 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7060 EOF
7061
7062   fi
7063
7064 else
7065         ol_cv_func_gethostbyaddr_r_nargs=0
7066 fi
7067
7068 if test "$ac_cv_func_ctime_r" = yes \
7069         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7070         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7071         -a "$ac_cv_func_gethostbyname_r" = yes \
7072         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7073         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7074         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7075         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7076         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7077         ; then
7078  
7079         cat >> confdefs.h <<\EOF
7080 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7081 EOF
7082
7083 fi
7084
7085 ol_link_threads=no
7086
7087 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7088         -o $ol_with_threads = nt ; then
7089
7090         
7091         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
7092 echo "configure:7093: checking for NT Threads" >&5
7093 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
7094   echo $ac_n "(cached) $ac_c" 1>&6
7095 else
7096   
7097                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7098 echo "configure:7099: checking for _beginthread" >&5
7099 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7100   echo $ac_n "(cached) $ac_c" 1>&6
7101 else
7102   cat > conftest.$ac_ext <<EOF
7103 #line 7104 "configure"
7104 #include "confdefs.h"
7105 /* System header to define __stub macros and hopefully few prototypes,
7106     which can conflict with char _beginthread(); below.  */
7107 #include <assert.h>
7108 /* Override any gcc2 internal prototype to avoid an error.  */
7109 /* We use char because int might match the return type of a gcc2
7110     builtin and then its argument prototype would still apply.  */
7111 char _beginthread();
7112 char (*f)();
7113
7114 int main() {
7115
7116 /* The GNU C library defines this for functions which it implements
7117     to always fail with ENOSYS.  Some functions are actually named
7118     something starting with __ and the normal name is an alias.  */
7119 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7120 choke me
7121 #else
7122 f = _beginthread;
7123 #endif
7124
7125 ; return 0; }
7126 EOF
7127 if { (eval echo configure:7128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7128   rm -rf conftest*
7129   eval "ac_cv_func__beginthread=yes"
7130 else
7131   echo "configure: failed program was:" >&5
7132   cat conftest.$ac_ext >&5
7133   rm -rf conftest*
7134   eval "ac_cv_func__beginthread=no"
7135 fi
7136 rm -f conftest*
7137 fi
7138
7139 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7140   echo "$ac_t""yes" 1>&6
7141   ol_cv_nt_threads=yes
7142 else
7143   echo "$ac_t""no" 1>&6
7144 ol_cv_nt_threads=no
7145 fi
7146
7147         
7148 fi
7149
7150 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7151
7152         if test $ol_cv_nt_threads = yes ; then
7153                 cat >> confdefs.h <<\EOF
7154 #define HAVE_NT_THREADS 1
7155 EOF
7156
7157         fi
7158
7159
7160         if test "$ol_cv_nt_threads" = yes ; then
7161         ol_link_threads=nt
7162         ol_with_threads=found
7163         ol_with_yielding_select=yes
7164
7165                 cat >> confdefs.h <<\EOF
7166 #define HAVE_NT_SERVICE_MANAGER 1
7167 EOF
7168
7169                 cat >> confdefs.h <<\EOF
7170 #define HAVE_NT_EVENT_LOG 1
7171 EOF
7172
7173         fi
7174
7175         if test $ol_with_threads = nt ; then
7176                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7177         fi
7178 fi
7179
7180 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7181         -o $ol_with_threads = posix ; then
7182
7183         for ac_hdr in pthread.h
7184 do
7185 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7186 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7187 echo "configure:7188: checking for $ac_hdr" >&5
7188 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7189   echo $ac_n "(cached) $ac_c" 1>&6
7190 else
7191   cat > conftest.$ac_ext <<EOF
7192 #line 7193 "configure"
7193 #include "confdefs.h"
7194 #include <$ac_hdr>
7195 EOF
7196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7197 { (eval echo configure:7198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7199 if test -z "$ac_err"; then
7200   rm -rf conftest*
7201   eval "ac_cv_header_$ac_safe=yes"
7202 else
7203   echo "$ac_err" >&5
7204   echo "configure: failed program was:" >&5
7205   cat conftest.$ac_ext >&5
7206   rm -rf conftest*
7207   eval "ac_cv_header_$ac_safe=no"
7208 fi
7209 rm -f conftest*
7210 fi
7211 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7212   echo "$ac_t""yes" 1>&6
7213     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7214   cat >> confdefs.h <<EOF
7215 #define $ac_tr_hdr 1
7216 EOF
7217  
7218 else
7219   echo "$ac_t""no" 1>&6
7220 fi
7221 done
7222
7223
7224         if test $ac_cv_header_pthread_h = yes ; then
7225                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7226 echo "configure:7227: checking POSIX thread version" >&5
7227 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7228   echo $ac_n "(cached) $ac_c" 1>&6
7229 else
7230   
7231         cat > conftest.$ac_ext <<EOF
7232 #line 7233 "configure"
7233 #include "confdefs.h"
7234
7235 #               include <pthread.h>
7236                 /* this check could be improved */
7237 #               ifdef PTHREAD_ONCE_INIT
7238                         pthread_version_final;
7239 #               endif
7240         
7241 EOF
7242 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7243   egrep "pthread_version_final" >/dev/null 2>&1; then
7244   rm -rf conftest*
7245   ol_pthread_final=yes
7246 else
7247   rm -rf conftest*
7248   ol_pthread_final=no
7249 fi
7250 rm -f conftest*
7251
7252
7253         cat > conftest.$ac_ext <<EOF
7254 #line 7255 "configure"
7255 #include "confdefs.h"
7256
7257 #               include <pthread.h>
7258                 /* this check could be improved */
7259 #               ifdef pthread_once_init
7260                         pthread_version_draft4;
7261 #               endif
7262         
7263 EOF
7264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7265   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7266   rm -rf conftest*
7267   ol_pthread_draft4=yes
7268 else
7269   rm -rf conftest*
7270   ol_pthread_draft4=no
7271 fi
7272 rm -f conftest*
7273
7274
7275         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7276                 ol_cv_pthread_version=final
7277         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7278                 ol_cv_pthread_version=draft4
7279         else
7280                 ol_cv_pthread_version=unknown
7281         fi
7282
7283 fi
7284
7285 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7286
7287
7288                 if test $ol_cv_pthread_version = final ; then
7289                         cat >> confdefs.h <<\EOF
7290 #define HAVE_PTHREADS_FINAL 1
7291 EOF
7292
7293                 elif test $ol_cv_pthread_version = draft4 ; then
7294                         cat >> confdefs.h <<\EOF
7295 #define HAVE_PTHREADS_D4 1
7296 EOF
7297
7298                 else
7299                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7300                 fi
7301
7302                 # consider threads found
7303                 ol_with_threads=found
7304
7305                 
7306         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7307 echo "configure:7308: checking for LinuxThreads pthread.h" >&5
7308 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7309   echo $ac_n "(cached) $ac_c" 1>&6
7310 else
7311   cat > conftest.$ac_ext <<EOF
7312 #line 7313 "configure"
7313 #include "confdefs.h"
7314 #include <pthread.h>
7315 EOF
7316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7317   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7318   rm -rf conftest*
7319   ol_cv_header_linux_threads=yes
7320 else
7321   rm -rf conftest*
7322   ol_cv_header_linux_threads=no
7323 fi
7324 rm -f conftest*
7325
7326                 
7327 fi
7328
7329 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7330         if test $ol_cv_header_linux_threads = yes; then
7331                 cat >> confdefs.h <<\EOF
7332 #define HAVE_LINUX_THREADS 1
7333 EOF
7334
7335         fi
7336
7337                 
7338         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7339 echo "configure:7340: checking for GNU Pth pthread.h" >&5
7340 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7341   echo $ac_n "(cached) $ac_c" 1>&6
7342 else
7343   cat > conftest.$ac_ext <<EOF
7344 #line 7345 "configure"
7345 #include "confdefs.h"
7346 #include <pthread.h>
7347 #ifdef _POSIX_THREAD_IS_GNU_PTH
7348         __gnu_pth__;
7349 #endif
7350
7351 EOF
7352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7353   egrep "__gnu_pth__" >/dev/null 2>&1; then
7354   rm -rf conftest*
7355   ol_cv_header_gnu_pth_pthread_h=yes
7356 else
7357   rm -rf conftest*
7358   ol_cv_header_gnu_pth_pthread_h=no
7359 fi
7360 rm -f conftest*
7361
7362                 
7363 fi
7364
7365 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7366
7367
7368                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7369                         for ac_hdr in sched.h
7370 do
7371 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7372 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7373 echo "configure:7374: checking for $ac_hdr" >&5
7374 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7375   echo $ac_n "(cached) $ac_c" 1>&6
7376 else
7377   cat > conftest.$ac_ext <<EOF
7378 #line 7379 "configure"
7379 #include "confdefs.h"
7380 #include <$ac_hdr>
7381 EOF
7382 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7383 { (eval echo configure:7384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7384 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7385 if test -z "$ac_err"; then
7386   rm -rf conftest*
7387   eval "ac_cv_header_$ac_safe=yes"
7388 else
7389   echo "$ac_err" >&5
7390   echo "configure: failed program was:" >&5
7391   cat conftest.$ac_ext >&5
7392   rm -rf conftest*
7393   eval "ac_cv_header_$ac_safe=no"
7394 fi
7395 rm -f conftest*
7396 fi
7397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7398   echo "$ac_t""yes" 1>&6
7399     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7400   cat >> confdefs.h <<EOF
7401 #define $ac_tr_hdr 1
7402 EOF
7403  
7404 else
7405   echo "$ac_t""no" 1>&6
7406 fi
7407 done
7408
7409                 fi
7410
7411                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7412                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7413 echo "configure:7414: checking for pthread_create in default libraries" >&5
7414 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7415   echo $ac_n "(cached) $ac_c" 1>&6
7416 else
7417   
7418                 if test "$cross_compiling" = yes; then
7419   cat > conftest.$ac_ext <<EOF
7420 #line 7421 "configure"
7421 #include "confdefs.h"
7422 /* pthread test headers */
7423 #include <pthread.h>
7424 #ifndef NULL
7425 #define NULL (void*)0
7426 #endif
7427
7428 static void *task(p)
7429         void *p;
7430 {
7431         return (void *) (p == NULL);
7432 }
7433
7434 int main() {
7435
7436         /* pthread test function */
7437         pthread_t t;
7438         int status;
7439 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7440         /* This system (e.g. AIX) defaults detached; must override */
7441         pthread_attr_t attr;
7442
7443         status = pthread_attr_init(&attr);
7444         if( status ) exit( status );
7445
7446         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7447         if( status ) exit( status );
7448
7449 #define ATTR    &attr
7450 #else
7451 #if HAVE_PTHREADS_D4
7452 #define ATTR    pthread_attr_default
7453 #else
7454 #define ATTR    NULL
7455 #endif
7456 #endif
7457         /* make sure pthread_create() isn't just a stub */
7458         status = pthread_create(&t, ATTR, task, NULL);
7459         if( status ) exit( status );
7460
7461         /* make sure pthread_detach() isn't just a stub */
7462 #if HAVE_PTHREADS_D4
7463         status = pthread_detach( &t );
7464 #else
7465         status = pthread_detach( t );
7466 #endif
7467
7468 #ifdef HAVE_LINUX_THREADS
7469         pthread_kill_other_threads_np();
7470 #endif
7471
7472         exit( status );
7473
7474 ; return 0; }
7475 EOF
7476 if { (eval echo configure:7477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7477   rm -rf conftest*
7478   ol_cv_pthread_create=yes
7479 else
7480   echo "configure: failed program was:" >&5
7481   cat conftest.$ac_ext >&5
7482   rm -rf conftest*
7483   ol_cv_pthread_create=no
7484 fi
7485 rm -f conftest*
7486 else
7487   cat > conftest.$ac_ext <<EOF
7488 #line 7489 "configure"
7489 #include "confdefs.h"
7490 /* pthread test headers */
7491 #include <pthread.h>
7492 #ifndef NULL
7493 #define NULL (void*)0
7494 #endif
7495
7496 static void *task(p)
7497         void *p;
7498 {
7499         return (void *) (p == NULL);
7500 }
7501
7502
7503 int main(argc, argv)
7504         int argc;
7505         char **argv;
7506 {
7507
7508         /* pthread test function */
7509         pthread_t t;
7510         int status;
7511 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7512         /* This system (e.g. AIX) defaults detached; must override */
7513         pthread_attr_t attr;
7514
7515         status = pthread_attr_init(&attr);
7516         if( status ) exit( status );
7517
7518         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7519         if( status ) exit( status );
7520
7521 #define ATTR    &attr
7522 #else
7523 #if HAVE_PTHREADS_D4
7524 #define ATTR    pthread_attr_default
7525 #else
7526 #define ATTR    NULL
7527 #endif
7528 #endif
7529         /* make sure pthread_create() isn't just a stub */
7530         status = pthread_create(&t, ATTR, task, NULL);
7531         if( status ) exit( status );
7532
7533         /* make sure pthread_detach() isn't just a stub */
7534 #if HAVE_PTHREADS_D4
7535         status = pthread_detach( &t );
7536 #else
7537         status = pthread_detach( t );
7538 #endif
7539
7540 #ifdef HAVE_LINUX_THREADS
7541         pthread_kill_other_threads_np();
7542 #endif
7543
7544         exit( status );
7545
7546 }
7547
7548 EOF
7549 if { (eval echo configure:7550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7550 then
7551   ol_cv_pthread_create=yes
7552 else
7553   echo "configure: failed program was:" >&5
7554   cat conftest.$ac_ext >&5
7555   rm -fr conftest*
7556   ol_cv_pthread_create=no
7557 fi
7558 rm -fr conftest*
7559 fi
7560
7561 fi
7562
7563 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7564
7565                 if test $ol_cv_pthread_create != no ; then
7566                         ol_link_threads=posix
7567                         ol_link_pthreads=""
7568                 fi
7569                 
7570                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7571 if test "$ol_link_threads" = no ; then
7572         # try -kthread
7573         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7574 echo "configure:7575: checking for pthread link with -kthread" >&5
7575 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7576   echo $ac_n "(cached) $ac_c" 1>&6
7577 else
7578   
7579                 # save the flags
7580                 ol_LIBS="$LIBS"
7581                 LIBS="-kthread $LIBS"
7582
7583                 if test "$cross_compiling" = yes; then
7584   cat > conftest.$ac_ext <<EOF
7585 #line 7586 "configure"
7586 #include "confdefs.h"
7587 /* pthread test headers */
7588 #include <pthread.h>
7589 #ifndef NULL
7590 #define NULL (void*)0
7591 #endif
7592
7593 static void *task(p)
7594         void *p;
7595 {
7596         return (void *) (p == NULL);
7597 }
7598
7599 int main() {
7600
7601         /* pthread test function */
7602         pthread_t t;
7603         int status;
7604 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7605         /* This system (e.g. AIX) defaults detached; must override */
7606         pthread_attr_t attr;
7607
7608         status = pthread_attr_init(&attr);
7609         if( status ) exit( status );
7610
7611         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7612         if( status ) exit( status );
7613
7614 #define ATTR    &attr
7615 #else
7616 #if HAVE_PTHREADS_D4
7617 #define ATTR    pthread_attr_default
7618 #else
7619 #define ATTR    NULL
7620 #endif
7621 #endif
7622         /* make sure pthread_create() isn't just a stub */
7623         status = pthread_create(&t, ATTR, task, NULL);
7624         if( status ) exit( status );
7625
7626         /* make sure pthread_detach() isn't just a stub */
7627 #if HAVE_PTHREADS_D4
7628         status = pthread_detach( &t );
7629 #else
7630         status = pthread_detach( t );
7631 #endif
7632
7633 #ifdef HAVE_LINUX_THREADS
7634         pthread_kill_other_threads_np();
7635 #endif
7636
7637         exit( status );
7638
7639 ; return 0; }
7640 EOF
7641 if { (eval echo configure:7642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7642   rm -rf conftest*
7643   ol_cv_pthread_kthread=yes
7644 else
7645   echo "configure: failed program was:" >&5
7646   cat conftest.$ac_ext >&5
7647   rm -rf conftest*
7648   ol_cv_pthread_kthread=no
7649 fi
7650 rm -f conftest*
7651 else
7652   cat > conftest.$ac_ext <<EOF
7653 #line 7654 "configure"
7654 #include "confdefs.h"
7655 /* pthread test headers */
7656 #include <pthread.h>
7657 #ifndef NULL
7658 #define NULL (void*)0
7659 #endif
7660
7661 static void *task(p)
7662         void *p;
7663 {
7664         return (void *) (p == NULL);
7665 }
7666
7667
7668 int main(argc, argv)
7669         int argc;
7670         char **argv;
7671 {
7672
7673         /* pthread test function */
7674         pthread_t t;
7675         int status;
7676 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7677         /* This system (e.g. AIX) defaults detached; must override */
7678         pthread_attr_t attr;
7679
7680         status = pthread_attr_init(&attr);
7681         if( status ) exit( status );
7682
7683         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7684         if( status ) exit( status );
7685
7686 #define ATTR    &attr
7687 #else
7688 #if HAVE_PTHREADS_D4
7689 #define ATTR    pthread_attr_default
7690 #else
7691 #define ATTR    NULL
7692 #endif
7693 #endif
7694         /* make sure pthread_create() isn't just a stub */
7695         status = pthread_create(&t, ATTR, task, NULL);
7696         if( status ) exit( status );
7697
7698         /* make sure pthread_detach() isn't just a stub */
7699 #if HAVE_PTHREADS_D4
7700         status = pthread_detach( &t );
7701 #else
7702         status = pthread_detach( t );
7703 #endif
7704
7705 #ifdef HAVE_LINUX_THREADS
7706         pthread_kill_other_threads_np();
7707 #endif
7708
7709         exit( status );
7710
7711 }
7712
7713 EOF
7714 if { (eval echo configure:7715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7715 then
7716   ol_cv_pthread_kthread=yes
7717 else
7718   echo "configure: failed program was:" >&5
7719   cat conftest.$ac_ext >&5
7720   rm -fr conftest*
7721   ol_cv_pthread_kthread=no
7722 fi
7723 rm -fr conftest*
7724 fi
7725
7726
7727                 # restore the LIBS
7728                 LIBS="$ol_LIBS"
7729         
7730 fi
7731
7732 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7733
7734         if test $ol_cv_pthread_kthread = yes ; then
7735                 ol_link_pthreads="-kthread"
7736                 ol_link_threads=posix
7737         fi
7738 fi
7739
7740                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7741 if test "$ol_link_threads" = no ; then
7742         # try -pthread
7743         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7744 echo "configure:7745: checking for pthread link with -pthread" >&5
7745 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7746   echo $ac_n "(cached) $ac_c" 1>&6
7747 else
7748   
7749                 # save the flags
7750                 ol_LIBS="$LIBS"
7751                 LIBS="-pthread $LIBS"
7752
7753                 if test "$cross_compiling" = yes; then
7754   cat > conftest.$ac_ext <<EOF
7755 #line 7756 "configure"
7756 #include "confdefs.h"
7757 /* pthread test headers */
7758 #include <pthread.h>
7759 #ifndef NULL
7760 #define NULL (void*)0
7761 #endif
7762
7763 static void *task(p)
7764         void *p;
7765 {
7766         return (void *) (p == NULL);
7767 }
7768
7769 int main() {
7770
7771         /* pthread test function */
7772         pthread_t t;
7773         int status;
7774 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7775         /* This system (e.g. AIX) defaults detached; must override */
7776         pthread_attr_t attr;
7777
7778         status = pthread_attr_init(&attr);
7779         if( status ) exit( status );
7780
7781         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7782         if( status ) exit( status );
7783
7784 #define ATTR    &attr
7785 #else
7786 #if HAVE_PTHREADS_D4
7787 #define ATTR    pthread_attr_default
7788 #else
7789 #define ATTR    NULL
7790 #endif
7791 #endif
7792         /* make sure pthread_create() isn't just a stub */
7793         status = pthread_create(&t, ATTR, task, NULL);
7794         if( status ) exit( status );
7795
7796         /* make sure pthread_detach() isn't just a stub */
7797 #if HAVE_PTHREADS_D4
7798         status = pthread_detach( &t );
7799 #else
7800         status = pthread_detach( t );
7801 #endif
7802
7803 #ifdef HAVE_LINUX_THREADS
7804         pthread_kill_other_threads_np();
7805 #endif
7806
7807         exit( status );
7808
7809 ; return 0; }
7810 EOF
7811 if { (eval echo configure:7812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7812   rm -rf conftest*
7813   ol_cv_pthread_pthread=yes
7814 else
7815   echo "configure: failed program was:" >&5
7816   cat conftest.$ac_ext >&5
7817   rm -rf conftest*
7818   ol_cv_pthread_pthread=no
7819 fi
7820 rm -f conftest*
7821 else
7822   cat > conftest.$ac_ext <<EOF
7823 #line 7824 "configure"
7824 #include "confdefs.h"
7825 /* pthread test headers */
7826 #include <pthread.h>
7827 #ifndef NULL
7828 #define NULL (void*)0
7829 #endif
7830
7831 static void *task(p)
7832         void *p;
7833 {
7834         return (void *) (p == NULL);
7835 }
7836
7837
7838 int main(argc, argv)
7839         int argc;
7840         char **argv;
7841 {
7842
7843         /* pthread test function */
7844         pthread_t t;
7845         int status;
7846 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7847         /* This system (e.g. AIX) defaults detached; must override */
7848         pthread_attr_t attr;
7849
7850         status = pthread_attr_init(&attr);
7851         if( status ) exit( status );
7852
7853         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7854         if( status ) exit( status );
7855
7856 #define ATTR    &attr
7857 #else
7858 #if HAVE_PTHREADS_D4
7859 #define ATTR    pthread_attr_default
7860 #else
7861 #define ATTR    NULL
7862 #endif
7863 #endif
7864         /* make sure pthread_create() isn't just a stub */
7865         status = pthread_create(&t, ATTR, task, NULL);
7866         if( status ) exit( status );
7867
7868         /* make sure pthread_detach() isn't just a stub */
7869 #if HAVE_PTHREADS_D4
7870         status = pthread_detach( &t );
7871 #else
7872         status = pthread_detach( t );
7873 #endif
7874
7875 #ifdef HAVE_LINUX_THREADS
7876         pthread_kill_other_threads_np();
7877 #endif
7878
7879         exit( status );
7880
7881 }
7882
7883 EOF
7884 if { (eval echo configure:7885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7885 then
7886   ol_cv_pthread_pthread=yes
7887 else
7888   echo "configure: failed program was:" >&5
7889   cat conftest.$ac_ext >&5
7890   rm -fr conftest*
7891   ol_cv_pthread_pthread=no
7892 fi
7893 rm -fr conftest*
7894 fi
7895
7896
7897                 # restore the LIBS
7898                 LIBS="$ol_LIBS"
7899         
7900 fi
7901
7902 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7903
7904         if test $ol_cv_pthread_pthread = yes ; then
7905                 ol_link_pthreads="-pthread"
7906                 ol_link_threads=posix
7907         fi
7908 fi
7909
7910                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7911 if test "$ol_link_threads" = no ; then
7912         # try -pthreads
7913         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7914 echo "configure:7915: checking for pthread link with -pthreads" >&5
7915 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7916   echo $ac_n "(cached) $ac_c" 1>&6
7917 else
7918   
7919                 # save the flags
7920                 ol_LIBS="$LIBS"
7921                 LIBS="-pthreads $LIBS"
7922
7923                 if test "$cross_compiling" = yes; then
7924   cat > conftest.$ac_ext <<EOF
7925 #line 7926 "configure"
7926 #include "confdefs.h"
7927 /* pthread test headers */
7928 #include <pthread.h>
7929 #ifndef NULL
7930 #define NULL (void*)0
7931 #endif
7932
7933 static void *task(p)
7934         void *p;
7935 {
7936         return (void *) (p == NULL);
7937 }
7938
7939 int main() {
7940
7941         /* pthread test function */
7942         pthread_t t;
7943         int status;
7944 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7945         /* This system (e.g. AIX) defaults detached; must override */
7946         pthread_attr_t attr;
7947
7948         status = pthread_attr_init(&attr);
7949         if( status ) exit( status );
7950
7951         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7952         if( status ) exit( status );
7953
7954 #define ATTR    &attr
7955 #else
7956 #if HAVE_PTHREADS_D4
7957 #define ATTR    pthread_attr_default
7958 #else
7959 #define ATTR    NULL
7960 #endif
7961 #endif
7962         /* make sure pthread_create() isn't just a stub */
7963         status = pthread_create(&t, ATTR, task, NULL);
7964         if( status ) exit( status );
7965
7966         /* make sure pthread_detach() isn't just a stub */
7967 #if HAVE_PTHREADS_D4
7968         status = pthread_detach( &t );
7969 #else
7970         status = pthread_detach( t );
7971 #endif
7972
7973 #ifdef HAVE_LINUX_THREADS
7974         pthread_kill_other_threads_np();
7975 #endif
7976
7977         exit( status );
7978
7979 ; return 0; }
7980 EOF
7981 if { (eval echo configure:7982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7982   rm -rf conftest*
7983   ol_cv_pthread_pthreads=yes
7984 else
7985   echo "configure: failed program was:" >&5
7986   cat conftest.$ac_ext >&5
7987   rm -rf conftest*
7988   ol_cv_pthread_pthreads=no
7989 fi
7990 rm -f conftest*
7991 else
7992   cat > conftest.$ac_ext <<EOF
7993 #line 7994 "configure"
7994 #include "confdefs.h"
7995 /* pthread test headers */
7996 #include <pthread.h>
7997 #ifndef NULL
7998 #define NULL (void*)0
7999 #endif
8000
8001 static void *task(p)
8002         void *p;
8003 {
8004         return (void *) (p == NULL);
8005 }
8006
8007
8008 int main(argc, argv)
8009         int argc;
8010         char **argv;
8011 {
8012
8013         /* pthread test function */
8014         pthread_t t;
8015         int status;
8016 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8017         /* This system (e.g. AIX) defaults detached; must override */
8018         pthread_attr_t attr;
8019
8020         status = pthread_attr_init(&attr);
8021         if( status ) exit( status );
8022
8023         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8024         if( status ) exit( status );
8025
8026 #define ATTR    &attr
8027 #else
8028 #if HAVE_PTHREADS_D4
8029 #define ATTR    pthread_attr_default
8030 #else
8031 #define ATTR    NULL
8032 #endif
8033 #endif
8034         /* make sure pthread_create() isn't just a stub */
8035         status = pthread_create(&t, ATTR, task, NULL);
8036         if( status ) exit( status );
8037
8038         /* make sure pthread_detach() isn't just a stub */
8039 #if HAVE_PTHREADS_D4
8040         status = pthread_detach( &t );
8041 #else
8042         status = pthread_detach( t );
8043 #endif
8044
8045 #ifdef HAVE_LINUX_THREADS
8046         pthread_kill_other_threads_np();
8047 #endif
8048
8049         exit( status );
8050
8051 }
8052
8053 EOF
8054 if { (eval echo configure:8055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8055 then
8056   ol_cv_pthread_pthreads=yes
8057 else
8058   echo "configure: failed program was:" >&5
8059   cat conftest.$ac_ext >&5
8060   rm -fr conftest*
8061   ol_cv_pthread_pthreads=no
8062 fi
8063 rm -fr conftest*
8064 fi
8065
8066
8067                 # restore the LIBS
8068                 LIBS="$ol_LIBS"
8069         
8070 fi
8071
8072 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8073
8074         if test $ol_cv_pthread_pthreads = yes ; then
8075                 ol_link_pthreads="-pthreads"
8076                 ol_link_threads=posix
8077         fi
8078 fi
8079
8080                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8081 if test "$ol_link_threads" = no ; then
8082         # try -mthreads
8083         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8084 echo "configure:8085: checking for pthread link with -mthreads" >&5
8085 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8086   echo $ac_n "(cached) $ac_c" 1>&6
8087 else
8088   
8089                 # save the flags
8090                 ol_LIBS="$LIBS"
8091                 LIBS="-mthreads $LIBS"
8092
8093                 if test "$cross_compiling" = yes; then
8094   cat > conftest.$ac_ext <<EOF
8095 #line 8096 "configure"
8096 #include "confdefs.h"
8097 /* pthread test headers */
8098 #include <pthread.h>
8099 #ifndef NULL
8100 #define NULL (void*)0
8101 #endif
8102
8103 static void *task(p)
8104         void *p;
8105 {
8106         return (void *) (p == NULL);
8107 }
8108
8109 int main() {
8110
8111         /* pthread test function */
8112         pthread_t t;
8113         int status;
8114 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8115         /* This system (e.g. AIX) defaults detached; must override */
8116         pthread_attr_t attr;
8117
8118         status = pthread_attr_init(&attr);
8119         if( status ) exit( status );
8120
8121         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8122         if( status ) exit( status );
8123
8124 #define ATTR    &attr
8125 #else
8126 #if HAVE_PTHREADS_D4
8127 #define ATTR    pthread_attr_default
8128 #else
8129 #define ATTR    NULL
8130 #endif
8131 #endif
8132         /* make sure pthread_create() isn't just a stub */
8133         status = pthread_create(&t, ATTR, task, NULL);
8134         if( status ) exit( status );
8135
8136         /* make sure pthread_detach() isn't just a stub */
8137 #if HAVE_PTHREADS_D4
8138         status = pthread_detach( &t );
8139 #else
8140         status = pthread_detach( t );
8141 #endif
8142
8143 #ifdef HAVE_LINUX_THREADS
8144         pthread_kill_other_threads_np();
8145 #endif
8146
8147         exit( status );
8148
8149 ; return 0; }
8150 EOF
8151 if { (eval echo configure:8152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8152   rm -rf conftest*
8153   ol_cv_pthread_mthreads=yes
8154 else
8155   echo "configure: failed program was:" >&5
8156   cat conftest.$ac_ext >&5
8157   rm -rf conftest*
8158   ol_cv_pthread_mthreads=no
8159 fi
8160 rm -f conftest*
8161 else
8162   cat > conftest.$ac_ext <<EOF
8163 #line 8164 "configure"
8164 #include "confdefs.h"
8165 /* pthread test headers */
8166 #include <pthread.h>
8167 #ifndef NULL
8168 #define NULL (void*)0
8169 #endif
8170
8171 static void *task(p)
8172         void *p;
8173 {
8174         return (void *) (p == NULL);
8175 }
8176
8177
8178 int main(argc, argv)
8179         int argc;
8180         char **argv;
8181 {
8182
8183         /* pthread test function */
8184         pthread_t t;
8185         int status;
8186 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8187         /* This system (e.g. AIX) defaults detached; must override */
8188         pthread_attr_t attr;
8189
8190         status = pthread_attr_init(&attr);
8191         if( status ) exit( status );
8192
8193         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8194         if( status ) exit( status );
8195
8196 #define ATTR    &attr
8197 #else
8198 #if HAVE_PTHREADS_D4
8199 #define ATTR    pthread_attr_default
8200 #else
8201 #define ATTR    NULL
8202 #endif
8203 #endif
8204         /* make sure pthread_create() isn't just a stub */
8205         status = pthread_create(&t, ATTR, task, NULL);
8206         if( status ) exit( status );
8207
8208         /* make sure pthread_detach() isn't just a stub */
8209 #if HAVE_PTHREADS_D4
8210         status = pthread_detach( &t );
8211 #else
8212         status = pthread_detach( t );
8213 #endif
8214
8215 #ifdef HAVE_LINUX_THREADS
8216         pthread_kill_other_threads_np();
8217 #endif
8218
8219         exit( status );
8220
8221 }
8222
8223 EOF
8224 if { (eval echo configure:8225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8225 then
8226   ol_cv_pthread_mthreads=yes
8227 else
8228   echo "configure: failed program was:" >&5
8229   cat conftest.$ac_ext >&5
8230   rm -fr conftest*
8231   ol_cv_pthread_mthreads=no
8232 fi
8233 rm -fr conftest*
8234 fi
8235
8236
8237                 # restore the LIBS
8238                 LIBS="$ol_LIBS"
8239         
8240 fi
8241
8242 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8243
8244         if test $ol_cv_pthread_mthreads = yes ; then
8245                 ol_link_pthreads="-mthreads"
8246                 ol_link_threads=posix
8247         fi
8248 fi
8249
8250                 # Pthread try link: -thread (ol_cv_pthread_thread)
8251 if test "$ol_link_threads" = no ; then
8252         # try -thread
8253         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8254 echo "configure:8255: checking for pthread link with -thread" >&5
8255 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8256   echo $ac_n "(cached) $ac_c" 1>&6
8257 else
8258   
8259                 # save the flags
8260                 ol_LIBS="$LIBS"
8261                 LIBS="-thread $LIBS"
8262
8263                 if test "$cross_compiling" = yes; then
8264   cat > conftest.$ac_ext <<EOF
8265 #line 8266 "configure"
8266 #include "confdefs.h"
8267 /* pthread test headers */
8268 #include <pthread.h>
8269 #ifndef NULL
8270 #define NULL (void*)0
8271 #endif
8272
8273 static void *task(p)
8274         void *p;
8275 {
8276         return (void *) (p == NULL);
8277 }
8278
8279 int main() {
8280
8281         /* pthread test function */
8282         pthread_t t;
8283         int status;
8284 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8285         /* This system (e.g. AIX) defaults detached; must override */
8286         pthread_attr_t attr;
8287
8288         status = pthread_attr_init(&attr);
8289         if( status ) exit( status );
8290
8291         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8292         if( status ) exit( status );
8293
8294 #define ATTR    &attr
8295 #else
8296 #if HAVE_PTHREADS_D4
8297 #define ATTR    pthread_attr_default
8298 #else
8299 #define ATTR    NULL
8300 #endif
8301 #endif
8302         /* make sure pthread_create() isn't just a stub */
8303         status = pthread_create(&t, ATTR, task, NULL);
8304         if( status ) exit( status );
8305
8306         /* make sure pthread_detach() isn't just a stub */
8307 #if HAVE_PTHREADS_D4
8308         status = pthread_detach( &t );
8309 #else
8310         status = pthread_detach( t );
8311 #endif
8312
8313 #ifdef HAVE_LINUX_THREADS
8314         pthread_kill_other_threads_np();
8315 #endif
8316
8317         exit( status );
8318
8319 ; return 0; }
8320 EOF
8321 if { (eval echo configure:8322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8322   rm -rf conftest*
8323   ol_cv_pthread_thread=yes
8324 else
8325   echo "configure: failed program was:" >&5
8326   cat conftest.$ac_ext >&5
8327   rm -rf conftest*
8328   ol_cv_pthread_thread=no
8329 fi
8330 rm -f conftest*
8331 else
8332   cat > conftest.$ac_ext <<EOF
8333 #line 8334 "configure"
8334 #include "confdefs.h"
8335 /* pthread test headers */
8336 #include <pthread.h>
8337 #ifndef NULL
8338 #define NULL (void*)0
8339 #endif
8340
8341 static void *task(p)
8342         void *p;
8343 {
8344         return (void *) (p == NULL);
8345 }
8346
8347
8348 int main(argc, argv)
8349         int argc;
8350         char **argv;
8351 {
8352
8353         /* pthread test function */
8354         pthread_t t;
8355         int status;
8356 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8357         /* This system (e.g. AIX) defaults detached; must override */
8358         pthread_attr_t attr;
8359
8360         status = pthread_attr_init(&attr);
8361         if( status ) exit( status );
8362
8363         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8364         if( status ) exit( status );
8365
8366 #define ATTR    &attr
8367 #else
8368 #if HAVE_PTHREADS_D4
8369 #define ATTR    pthread_attr_default
8370 #else
8371 #define ATTR    NULL
8372 #endif
8373 #endif
8374         /* make sure pthread_create() isn't just a stub */
8375         status = pthread_create(&t, ATTR, task, NULL);
8376         if( status ) exit( status );
8377
8378         /* make sure pthread_detach() isn't just a stub */
8379 #if HAVE_PTHREADS_D4
8380         status = pthread_detach( &t );
8381 #else
8382         status = pthread_detach( t );
8383 #endif
8384
8385 #ifdef HAVE_LINUX_THREADS
8386         pthread_kill_other_threads_np();
8387 #endif
8388
8389         exit( status );
8390
8391 }
8392
8393 EOF
8394 if { (eval echo configure:8395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8395 then
8396   ol_cv_pthread_thread=yes
8397 else
8398   echo "configure: failed program was:" >&5
8399   cat conftest.$ac_ext >&5
8400   rm -fr conftest*
8401   ol_cv_pthread_thread=no
8402 fi
8403 rm -fr conftest*
8404 fi
8405
8406
8407                 # restore the LIBS
8408                 LIBS="$ol_LIBS"
8409         
8410 fi
8411
8412 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8413
8414         if test $ol_cv_pthread_thread = yes ; then
8415                 ol_link_pthreads="-thread"
8416                 ol_link_threads=posix
8417         fi
8418 fi
8419
8420
8421                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8422 if test "$ol_link_threads" = no ; then
8423         # try -lpthread -lmach -lexc -lc_r
8424         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8425 echo "configure:8426: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8426 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8427   echo $ac_n "(cached) $ac_c" 1>&6
8428 else
8429   
8430                 # save the flags
8431                 ol_LIBS="$LIBS"
8432                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8433
8434                 if test "$cross_compiling" = yes; then
8435   cat > conftest.$ac_ext <<EOF
8436 #line 8437 "configure"
8437 #include "confdefs.h"
8438 /* pthread test headers */
8439 #include <pthread.h>
8440 #ifndef NULL
8441 #define NULL (void*)0
8442 #endif
8443
8444 static void *task(p)
8445         void *p;
8446 {
8447         return (void *) (p == NULL);
8448 }
8449
8450 int main() {
8451
8452         /* pthread test function */
8453         pthread_t t;
8454         int status;
8455 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8456         /* This system (e.g. AIX) defaults detached; must override */
8457         pthread_attr_t attr;
8458
8459         status = pthread_attr_init(&attr);
8460         if( status ) exit( status );
8461
8462         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8463         if( status ) exit( status );
8464
8465 #define ATTR    &attr
8466 #else
8467 #if HAVE_PTHREADS_D4
8468 #define ATTR    pthread_attr_default
8469 #else
8470 #define ATTR    NULL
8471 #endif
8472 #endif
8473         /* make sure pthread_create() isn't just a stub */
8474         status = pthread_create(&t, ATTR, task, NULL);
8475         if( status ) exit( status );
8476
8477         /* make sure pthread_detach() isn't just a stub */
8478 #if HAVE_PTHREADS_D4
8479         status = pthread_detach( &t );
8480 #else
8481         status = pthread_detach( t );
8482 #endif
8483
8484 #ifdef HAVE_LINUX_THREADS
8485         pthread_kill_other_threads_np();
8486 #endif
8487
8488         exit( status );
8489
8490 ; return 0; }
8491 EOF
8492 if { (eval echo configure:8493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8493   rm -rf conftest*
8494   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8495 else
8496   echo "configure: failed program was:" >&5
8497   cat conftest.$ac_ext >&5
8498   rm -rf conftest*
8499   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8500 fi
8501 rm -f conftest*
8502 else
8503   cat > conftest.$ac_ext <<EOF
8504 #line 8505 "configure"
8505 #include "confdefs.h"
8506 /* pthread test headers */
8507 #include <pthread.h>
8508 #ifndef NULL
8509 #define NULL (void*)0
8510 #endif
8511
8512 static void *task(p)
8513         void *p;
8514 {
8515         return (void *) (p == NULL);
8516 }
8517
8518
8519 int main(argc, argv)
8520         int argc;
8521         char **argv;
8522 {
8523
8524         /* pthread test function */
8525         pthread_t t;
8526         int status;
8527 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8528         /* This system (e.g. AIX) defaults detached; must override */
8529         pthread_attr_t attr;
8530
8531         status = pthread_attr_init(&attr);
8532         if( status ) exit( status );
8533
8534         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8535         if( status ) exit( status );
8536
8537 #define ATTR    &attr
8538 #else
8539 #if HAVE_PTHREADS_D4
8540 #define ATTR    pthread_attr_default
8541 #else
8542 #define ATTR    NULL
8543 #endif
8544 #endif
8545         /* make sure pthread_create() isn't just a stub */
8546         status = pthread_create(&t, ATTR, task, NULL);
8547         if( status ) exit( status );
8548
8549         /* make sure pthread_detach() isn't just a stub */
8550 #if HAVE_PTHREADS_D4
8551         status = pthread_detach( &t );
8552 #else
8553         status = pthread_detach( t );
8554 #endif
8555
8556 #ifdef HAVE_LINUX_THREADS
8557         pthread_kill_other_threads_np();
8558 #endif
8559
8560         exit( status );
8561
8562 }
8563
8564 EOF
8565 if { (eval echo configure:8566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8566 then
8567   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8568 else
8569   echo "configure: failed program was:" >&5
8570   cat conftest.$ac_ext >&5
8571   rm -fr conftest*
8572   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8573 fi
8574 rm -fr conftest*
8575 fi
8576
8577
8578                 # restore the LIBS
8579                 LIBS="$ol_LIBS"
8580         
8581 fi
8582
8583 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8584
8585         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8586                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8587                 ol_link_threads=posix
8588         fi
8589 fi
8590
8591                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8592 if test "$ol_link_threads" = no ; then
8593         # try -lpthread -lmach -lexc
8594         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8595 echo "configure:8596: checking for pthread link with -lpthread -lmach -lexc" >&5
8596 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8597   echo $ac_n "(cached) $ac_c" 1>&6
8598 else
8599   
8600                 # save the flags
8601                 ol_LIBS="$LIBS"
8602                 LIBS="-lpthread -lmach -lexc $LIBS"
8603
8604                 if test "$cross_compiling" = yes; then
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 int main() {
8621
8622         /* pthread test function */
8623         pthread_t t;
8624         int status;
8625 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8626         /* This system (e.g. AIX) defaults detached; must override */
8627         pthread_attr_t attr;
8628
8629         status = pthread_attr_init(&attr);
8630         if( status ) exit( status );
8631
8632         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8633         if( status ) exit( status );
8634
8635 #define ATTR    &attr
8636 #else
8637 #if HAVE_PTHREADS_D4
8638 #define ATTR    pthread_attr_default
8639 #else
8640 #define ATTR    NULL
8641 #endif
8642 #endif
8643         /* make sure pthread_create() isn't just a stub */
8644         status = pthread_create(&t, ATTR, task, NULL);
8645         if( status ) exit( status );
8646
8647         /* make sure pthread_detach() isn't just a stub */
8648 #if HAVE_PTHREADS_D4
8649         status = pthread_detach( &t );
8650 #else
8651         status = pthread_detach( t );
8652 #endif
8653
8654 #ifdef HAVE_LINUX_THREADS
8655         pthread_kill_other_threads_np();
8656 #endif
8657
8658         exit( status );
8659
8660 ; return 0; }
8661 EOF
8662 if { (eval echo configure:8663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8663   rm -rf conftest*
8664   ol_cv_pthread_lpthread_lmach_lexc=yes
8665 else
8666   echo "configure: failed program was:" >&5
8667   cat conftest.$ac_ext >&5
8668   rm -rf conftest*
8669   ol_cv_pthread_lpthread_lmach_lexc=no
8670 fi
8671 rm -f conftest*
8672 else
8673   cat > conftest.$ac_ext <<EOF
8674 #line 8675 "configure"
8675 #include "confdefs.h"
8676 /* pthread test headers */
8677 #include <pthread.h>
8678 #ifndef NULL
8679 #define NULL (void*)0
8680 #endif
8681
8682 static void *task(p)
8683         void *p;
8684 {
8685         return (void *) (p == NULL);
8686 }
8687
8688
8689 int main(argc, argv)
8690         int argc;
8691         char **argv;
8692 {
8693
8694         /* pthread test function */
8695         pthread_t t;
8696         int status;
8697 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8698         /* This system (e.g. AIX) defaults detached; must override */
8699         pthread_attr_t attr;
8700
8701         status = pthread_attr_init(&attr);
8702         if( status ) exit( status );
8703
8704         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8705         if( status ) exit( status );
8706
8707 #define ATTR    &attr
8708 #else
8709 #if HAVE_PTHREADS_D4
8710 #define ATTR    pthread_attr_default
8711 #else
8712 #define ATTR    NULL
8713 #endif
8714 #endif
8715         /* make sure pthread_create() isn't just a stub */
8716         status = pthread_create(&t, ATTR, task, NULL);
8717         if( status ) exit( status );
8718
8719         /* make sure pthread_detach() isn't just a stub */
8720 #if HAVE_PTHREADS_D4
8721         status = pthread_detach( &t );
8722 #else
8723         status = pthread_detach( t );
8724 #endif
8725
8726 #ifdef HAVE_LINUX_THREADS
8727         pthread_kill_other_threads_np();
8728 #endif
8729
8730         exit( status );
8731
8732 }
8733
8734 EOF
8735 if { (eval echo configure:8736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8736 then
8737   ol_cv_pthread_lpthread_lmach_lexc=yes
8738 else
8739   echo "configure: failed program was:" >&5
8740   cat conftest.$ac_ext >&5
8741   rm -fr conftest*
8742   ol_cv_pthread_lpthread_lmach_lexc=no
8743 fi
8744 rm -fr conftest*
8745 fi
8746
8747
8748                 # restore the LIBS
8749                 LIBS="$ol_LIBS"
8750         
8751 fi
8752
8753 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8754
8755         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8756                 ol_link_pthreads="-lpthread -lmach -lexc"
8757                 ol_link_threads=posix
8758         fi
8759 fi
8760
8761
8762                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8763 if test "$ol_link_threads" = no ; then
8764         # try -lpthread -Wl,-woff,85
8765         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8766 echo "configure:8767: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8767 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8768   echo $ac_n "(cached) $ac_c" 1>&6
8769 else
8770   
8771                 # save the flags
8772                 ol_LIBS="$LIBS"
8773                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8774
8775                 if test "$cross_compiling" = yes; then
8776   cat > conftest.$ac_ext <<EOF
8777 #line 8778 "configure"
8778 #include "confdefs.h"
8779 /* pthread test headers */
8780 #include <pthread.h>
8781 #ifndef NULL
8782 #define NULL (void*)0
8783 #endif
8784
8785 static void *task(p)
8786         void *p;
8787 {
8788         return (void *) (p == NULL);
8789 }
8790
8791 int main() {
8792
8793         /* pthread test function */
8794         pthread_t t;
8795         int status;
8796 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8797         /* This system (e.g. AIX) defaults detached; must override */
8798         pthread_attr_t attr;
8799
8800         status = pthread_attr_init(&attr);
8801         if( status ) exit( status );
8802
8803         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8804         if( status ) exit( status );
8805
8806 #define ATTR    &attr
8807 #else
8808 #if HAVE_PTHREADS_D4
8809 #define ATTR    pthread_attr_default
8810 #else
8811 #define ATTR    NULL
8812 #endif
8813 #endif
8814         /* make sure pthread_create() isn't just a stub */
8815         status = pthread_create(&t, ATTR, task, NULL);
8816         if( status ) exit( status );
8817
8818         /* make sure pthread_detach() isn't just a stub */
8819 #if HAVE_PTHREADS_D4
8820         status = pthread_detach( &t );
8821 #else
8822         status = pthread_detach( t );
8823 #endif
8824
8825 #ifdef HAVE_LINUX_THREADS
8826         pthread_kill_other_threads_np();
8827 #endif
8828
8829         exit( status );
8830
8831 ; return 0; }
8832 EOF
8833 if { (eval echo configure:8834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8834   rm -rf conftest*
8835   ol_cv_pthread_lib_lpthread_woff=yes
8836 else
8837   echo "configure: failed program was:" >&5
8838   cat conftest.$ac_ext >&5
8839   rm -rf conftest*
8840   ol_cv_pthread_lib_lpthread_woff=no
8841 fi
8842 rm -f conftest*
8843 else
8844   cat > conftest.$ac_ext <<EOF
8845 #line 8846 "configure"
8846 #include "confdefs.h"
8847 /* pthread test headers */
8848 #include <pthread.h>
8849 #ifndef NULL
8850 #define NULL (void*)0
8851 #endif
8852
8853 static void *task(p)
8854         void *p;
8855 {
8856         return (void *) (p == NULL);
8857 }
8858
8859
8860 int main(argc, argv)
8861         int argc;
8862         char **argv;
8863 {
8864
8865         /* pthread test function */
8866         pthread_t t;
8867         int status;
8868 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8869         /* This system (e.g. AIX) defaults detached; must override */
8870         pthread_attr_t attr;
8871
8872         status = pthread_attr_init(&attr);
8873         if( status ) exit( status );
8874
8875         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8876         if( status ) exit( status );
8877
8878 #define ATTR    &attr
8879 #else
8880 #if HAVE_PTHREADS_D4
8881 #define ATTR    pthread_attr_default
8882 #else
8883 #define ATTR    NULL
8884 #endif
8885 #endif
8886         /* make sure pthread_create() isn't just a stub */
8887         status = pthread_create(&t, ATTR, task, NULL);
8888         if( status ) exit( status );
8889
8890         /* make sure pthread_detach() isn't just a stub */
8891 #if HAVE_PTHREADS_D4
8892         status = pthread_detach( &t );
8893 #else
8894         status = pthread_detach( t );
8895 #endif
8896
8897 #ifdef HAVE_LINUX_THREADS
8898         pthread_kill_other_threads_np();
8899 #endif
8900
8901         exit( status );
8902
8903 }
8904
8905 EOF
8906 if { (eval echo configure:8907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8907 then
8908   ol_cv_pthread_lib_lpthread_woff=yes
8909 else
8910   echo "configure: failed program was:" >&5
8911   cat conftest.$ac_ext >&5
8912   rm -fr conftest*
8913   ol_cv_pthread_lib_lpthread_woff=no
8914 fi
8915 rm -fr conftest*
8916 fi
8917
8918
8919                 # restore the LIBS
8920                 LIBS="$ol_LIBS"
8921         
8922 fi
8923
8924 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8925
8926         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8927                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8928                 ol_link_threads=posix
8929         fi
8930 fi
8931
8932
8933                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8934 if test "$ol_link_threads" = no ; then
8935         # try -lpthread
8936         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8937 echo "configure:8938: checking for pthread link with -lpthread" >&5
8938 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8939   echo $ac_n "(cached) $ac_c" 1>&6
8940 else
8941   
8942                 # save the flags
8943                 ol_LIBS="$LIBS"
8944                 LIBS="-lpthread $LIBS"
8945
8946                 if test "$cross_compiling" = yes; then
8947   cat > conftest.$ac_ext <<EOF
8948 #line 8949 "configure"
8949 #include "confdefs.h"
8950 /* pthread test headers */
8951 #include <pthread.h>
8952 #ifndef NULL
8953 #define NULL (void*)0
8954 #endif
8955
8956 static void *task(p)
8957         void *p;
8958 {
8959         return (void *) (p == NULL);
8960 }
8961
8962 int main() {
8963
8964         /* pthread test function */
8965         pthread_t t;
8966         int status;
8967 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8968         /* This system (e.g. AIX) defaults detached; must override */
8969         pthread_attr_t attr;
8970
8971         status = pthread_attr_init(&attr);
8972         if( status ) exit( status );
8973
8974         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8975         if( status ) exit( status );
8976
8977 #define ATTR    &attr
8978 #else
8979 #if HAVE_PTHREADS_D4
8980 #define ATTR    pthread_attr_default
8981 #else
8982 #define ATTR    NULL
8983 #endif
8984 #endif
8985         /* make sure pthread_create() isn't just a stub */
8986         status = pthread_create(&t, ATTR, task, NULL);
8987         if( status ) exit( status );
8988
8989         /* make sure pthread_detach() isn't just a stub */
8990 #if HAVE_PTHREADS_D4
8991         status = pthread_detach( &t );
8992 #else
8993         status = pthread_detach( t );
8994 #endif
8995
8996 #ifdef HAVE_LINUX_THREADS
8997         pthread_kill_other_threads_np();
8998 #endif
8999
9000         exit( status );
9001
9002 ; return 0; }
9003 EOF
9004 if { (eval echo configure:9005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9005   rm -rf conftest*
9006   ol_cv_pthread_lpthread=yes
9007 else
9008   echo "configure: failed program was:" >&5
9009   cat conftest.$ac_ext >&5
9010   rm -rf conftest*
9011   ol_cv_pthread_lpthread=no
9012 fi
9013 rm -f conftest*
9014 else
9015   cat > conftest.$ac_ext <<EOF
9016 #line 9017 "configure"
9017 #include "confdefs.h"
9018 /* pthread test headers */
9019 #include <pthread.h>
9020 #ifndef NULL
9021 #define NULL (void*)0
9022 #endif
9023
9024 static void *task(p)
9025         void *p;
9026 {
9027         return (void *) (p == NULL);
9028 }
9029
9030
9031 int main(argc, argv)
9032         int argc;
9033         char **argv;
9034 {
9035
9036         /* pthread test function */
9037         pthread_t t;
9038         int status;
9039 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9040         /* This system (e.g. AIX) defaults detached; must override */
9041         pthread_attr_t attr;
9042
9043         status = pthread_attr_init(&attr);
9044         if( status ) exit( status );
9045
9046         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9047         if( status ) exit( status );
9048
9049 #define ATTR    &attr
9050 #else
9051 #if HAVE_PTHREADS_D4
9052 #define ATTR    pthread_attr_default
9053 #else
9054 #define ATTR    NULL
9055 #endif
9056 #endif
9057         /* make sure pthread_create() isn't just a stub */
9058         status = pthread_create(&t, ATTR, task, NULL);
9059         if( status ) exit( status );
9060
9061         /* make sure pthread_detach() isn't just a stub */
9062 #if HAVE_PTHREADS_D4
9063         status = pthread_detach( &t );
9064 #else
9065         status = pthread_detach( t );
9066 #endif
9067
9068 #ifdef HAVE_LINUX_THREADS
9069         pthread_kill_other_threads_np();
9070 #endif
9071
9072         exit( status );
9073
9074 }
9075
9076 EOF
9077 if { (eval echo configure:9078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9078 then
9079   ol_cv_pthread_lpthread=yes
9080 else
9081   echo "configure: failed program was:" >&5
9082   cat conftest.$ac_ext >&5
9083   rm -fr conftest*
9084   ol_cv_pthread_lpthread=no
9085 fi
9086 rm -fr conftest*
9087 fi
9088
9089
9090                 # restore the LIBS
9091                 LIBS="$ol_LIBS"
9092         
9093 fi
9094
9095 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9096
9097         if test $ol_cv_pthread_lpthread = yes ; then
9098                 ol_link_pthreads="-lpthread"
9099                 ol_link_threads=posix
9100         fi
9101 fi
9102
9103                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9104 if test "$ol_link_threads" = no ; then
9105         # try -lc_r
9106         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9107 echo "configure:9108: checking for pthread link with -lc_r" >&5
9108 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9109   echo $ac_n "(cached) $ac_c" 1>&6
9110 else
9111   
9112                 # save the flags
9113                 ol_LIBS="$LIBS"
9114                 LIBS="-lc_r $LIBS"
9115
9116                 if test "$cross_compiling" = yes; then
9117   cat > conftest.$ac_ext <<EOF
9118 #line 9119 "configure"
9119 #include "confdefs.h"
9120 /* pthread test headers */
9121 #include <pthread.h>
9122 #ifndef NULL
9123 #define NULL (void*)0
9124 #endif
9125
9126 static void *task(p)
9127         void *p;
9128 {
9129         return (void *) (p == NULL);
9130 }
9131
9132 int main() {
9133
9134         /* pthread test function */
9135         pthread_t t;
9136         int status;
9137 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9138         /* This system (e.g. AIX) defaults detached; must override */
9139         pthread_attr_t attr;
9140
9141         status = pthread_attr_init(&attr);
9142         if( status ) exit( status );
9143
9144         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9145         if( status ) exit( status );
9146
9147 #define ATTR    &attr
9148 #else
9149 #if HAVE_PTHREADS_D4
9150 #define ATTR    pthread_attr_default
9151 #else
9152 #define ATTR    NULL
9153 #endif
9154 #endif
9155         /* make sure pthread_create() isn't just a stub */
9156         status = pthread_create(&t, ATTR, task, NULL);
9157         if( status ) exit( status );
9158
9159         /* make sure pthread_detach() isn't just a stub */
9160 #if HAVE_PTHREADS_D4
9161         status = pthread_detach( &t );
9162 #else
9163         status = pthread_detach( t );
9164 #endif
9165
9166 #ifdef HAVE_LINUX_THREADS
9167         pthread_kill_other_threads_np();
9168 #endif
9169
9170         exit( status );
9171
9172 ; return 0; }
9173 EOF
9174 if { (eval echo configure:9175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9175   rm -rf conftest*
9176   ol_cv_pthread_lc_r=yes
9177 else
9178   echo "configure: failed program was:" >&5
9179   cat conftest.$ac_ext >&5
9180   rm -rf conftest*
9181   ol_cv_pthread_lc_r=no
9182 fi
9183 rm -f conftest*
9184 else
9185   cat > conftest.$ac_ext <<EOF
9186 #line 9187 "configure"
9187 #include "confdefs.h"
9188 /* pthread test headers */
9189 #include <pthread.h>
9190 #ifndef NULL
9191 #define NULL (void*)0
9192 #endif
9193
9194 static void *task(p)
9195         void *p;
9196 {
9197         return (void *) (p == NULL);
9198 }
9199
9200
9201 int main(argc, argv)
9202         int argc;
9203         char **argv;
9204 {
9205
9206         /* pthread test function */
9207         pthread_t t;
9208         int status;
9209 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9210         /* This system (e.g. AIX) defaults detached; must override */
9211         pthread_attr_t attr;
9212
9213         status = pthread_attr_init(&attr);
9214         if( status ) exit( status );
9215
9216         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9217         if( status ) exit( status );
9218
9219 #define ATTR    &attr
9220 #else
9221 #if HAVE_PTHREADS_D4
9222 #define ATTR    pthread_attr_default
9223 #else
9224 #define ATTR    NULL
9225 #endif
9226 #endif
9227         /* make sure pthread_create() isn't just a stub */
9228         status = pthread_create(&t, ATTR, task, NULL);
9229         if( status ) exit( status );
9230
9231         /* make sure pthread_detach() isn't just a stub */
9232 #if HAVE_PTHREADS_D4
9233         status = pthread_detach( &t );
9234 #else
9235         status = pthread_detach( t );
9236 #endif
9237
9238 #ifdef HAVE_LINUX_THREADS
9239         pthread_kill_other_threads_np();
9240 #endif
9241
9242         exit( status );
9243
9244 }
9245
9246 EOF
9247 if { (eval echo configure:9248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9248 then
9249   ol_cv_pthread_lc_r=yes
9250 else
9251   echo "configure: failed program was:" >&5
9252   cat conftest.$ac_ext >&5
9253   rm -fr conftest*
9254   ol_cv_pthread_lc_r=no
9255 fi
9256 rm -fr conftest*
9257 fi
9258
9259
9260                 # restore the LIBS
9261                 LIBS="$ol_LIBS"
9262         
9263 fi
9264
9265 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9266
9267         if test $ol_cv_pthread_lc_r = yes ; then
9268                 ol_link_pthreads="-lc_r"
9269                 ol_link_threads=posix
9270         fi
9271 fi
9272
9273
9274                 # Pthread try link: -threads (ol_cv_pthread_threads)
9275 if test "$ol_link_threads" = no ; then
9276         # try -threads
9277         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9278 echo "configure:9279: checking for pthread link with -threads" >&5
9279 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9280   echo $ac_n "(cached) $ac_c" 1>&6
9281 else
9282   
9283                 # save the flags
9284                 ol_LIBS="$LIBS"
9285                 LIBS="-threads $LIBS"
9286
9287                 if test "$cross_compiling" = yes; then
9288   cat > conftest.$ac_ext <<EOF
9289 #line 9290 "configure"
9290 #include "confdefs.h"
9291 /* pthread test headers */
9292 #include <pthread.h>
9293 #ifndef NULL
9294 #define NULL (void*)0
9295 #endif
9296
9297 static void *task(p)
9298         void *p;
9299 {
9300         return (void *) (p == NULL);
9301 }
9302
9303 int main() {
9304
9305         /* pthread test function */
9306         pthread_t t;
9307         int status;
9308 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9309         /* This system (e.g. AIX) defaults detached; must override */
9310         pthread_attr_t attr;
9311
9312         status = pthread_attr_init(&attr);
9313         if( status ) exit( status );
9314
9315         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9316         if( status ) exit( status );
9317
9318 #define ATTR    &attr
9319 #else
9320 #if HAVE_PTHREADS_D4
9321 #define ATTR    pthread_attr_default
9322 #else
9323 #define ATTR    NULL
9324 #endif
9325 #endif
9326         /* make sure pthread_create() isn't just a stub */
9327         status = pthread_create(&t, ATTR, task, NULL);
9328         if( status ) exit( status );
9329
9330         /* make sure pthread_detach() isn't just a stub */
9331 #if HAVE_PTHREADS_D4
9332         status = pthread_detach( &t );
9333 #else
9334         status = pthread_detach( t );
9335 #endif
9336
9337 #ifdef HAVE_LINUX_THREADS
9338         pthread_kill_other_threads_np();
9339 #endif
9340
9341         exit( status );
9342
9343 ; return 0; }
9344 EOF
9345 if { (eval echo configure:9346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9346   rm -rf conftest*
9347   ol_cv_pthread_threads=yes
9348 else
9349   echo "configure: failed program was:" >&5
9350   cat conftest.$ac_ext >&5
9351   rm -rf conftest*
9352   ol_cv_pthread_threads=no
9353 fi
9354 rm -f conftest*
9355 else
9356   cat > conftest.$ac_ext <<EOF
9357 #line 9358 "configure"
9358 #include "confdefs.h"
9359 /* pthread test headers */
9360 #include <pthread.h>
9361 #ifndef NULL
9362 #define NULL (void*)0
9363 #endif
9364
9365 static void *task(p)
9366         void *p;
9367 {
9368         return (void *) (p == NULL);
9369 }
9370
9371
9372 int main(argc, argv)
9373         int argc;
9374         char **argv;
9375 {
9376
9377         /* pthread test function */
9378         pthread_t t;
9379         int status;
9380 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9381         /* This system (e.g. AIX) defaults detached; must override */
9382         pthread_attr_t attr;
9383
9384         status = pthread_attr_init(&attr);
9385         if( status ) exit( status );
9386
9387         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9388         if( status ) exit( status );
9389
9390 #define ATTR    &attr
9391 #else
9392 #if HAVE_PTHREADS_D4
9393 #define ATTR    pthread_attr_default
9394 #else
9395 #define ATTR    NULL
9396 #endif
9397 #endif
9398         /* make sure pthread_create() isn't just a stub */
9399         status = pthread_create(&t, ATTR, task, NULL);
9400         if( status ) exit( status );
9401
9402         /* make sure pthread_detach() isn't just a stub */
9403 #if HAVE_PTHREADS_D4
9404         status = pthread_detach( &t );
9405 #else
9406         status = pthread_detach( t );
9407 #endif
9408
9409 #ifdef HAVE_LINUX_THREADS
9410         pthread_kill_other_threads_np();
9411 #endif
9412
9413         exit( status );
9414
9415 }
9416
9417 EOF
9418 if { (eval echo configure:9419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9419 then
9420   ol_cv_pthread_threads=yes
9421 else
9422   echo "configure: failed program was:" >&5
9423   cat conftest.$ac_ext >&5
9424   rm -fr conftest*
9425   ol_cv_pthread_threads=no
9426 fi
9427 rm -fr conftest*
9428 fi
9429
9430
9431                 # restore the LIBS
9432                 LIBS="$ol_LIBS"
9433         
9434 fi
9435
9436 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9437
9438         if test $ol_cv_pthread_threads = yes ; then
9439                 ol_link_pthreads="-threads"
9440                 ol_link_threads=posix
9441         fi
9442 fi
9443
9444
9445                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9446 if test "$ol_link_threads" = no ; then
9447         # try -lpthreads -lmach -lexc -lc_r
9448         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9449 echo "configure:9450: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9450 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9451   echo $ac_n "(cached) $ac_c" 1>&6
9452 else
9453   
9454                 # save the flags
9455                 ol_LIBS="$LIBS"
9456                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9457
9458                 if test "$cross_compiling" = yes; then
9459   cat > conftest.$ac_ext <<EOF
9460 #line 9461 "configure"
9461 #include "confdefs.h"
9462 /* pthread test headers */
9463 #include <pthread.h>
9464 #ifndef NULL
9465 #define NULL (void*)0
9466 #endif
9467
9468 static void *task(p)
9469         void *p;
9470 {
9471         return (void *) (p == NULL);
9472 }
9473
9474 int main() {
9475
9476         /* pthread test function */
9477         pthread_t t;
9478         int status;
9479 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9480         /* This system (e.g. AIX) defaults detached; must override */
9481         pthread_attr_t attr;
9482
9483         status = pthread_attr_init(&attr);
9484         if( status ) exit( status );
9485
9486         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9487         if( status ) exit( status );
9488
9489 #define ATTR    &attr
9490 #else
9491 #if HAVE_PTHREADS_D4
9492 #define ATTR    pthread_attr_default
9493 #else
9494 #define ATTR    NULL
9495 #endif
9496 #endif
9497         /* make sure pthread_create() isn't just a stub */
9498         status = pthread_create(&t, ATTR, task, NULL);
9499         if( status ) exit( status );
9500
9501         /* make sure pthread_detach() isn't just a stub */
9502 #if HAVE_PTHREADS_D4
9503         status = pthread_detach( &t );
9504 #else
9505         status = pthread_detach( t );
9506 #endif
9507
9508 #ifdef HAVE_LINUX_THREADS
9509         pthread_kill_other_threads_np();
9510 #endif
9511
9512         exit( status );
9513
9514 ; return 0; }
9515 EOF
9516 if { (eval echo configure:9517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9517   rm -rf conftest*
9518   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9519 else
9520   echo "configure: failed program was:" >&5
9521   cat conftest.$ac_ext >&5
9522   rm -rf conftest*
9523   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9524 fi
9525 rm -f conftest*
9526 else
9527   cat > conftest.$ac_ext <<EOF
9528 #line 9529 "configure"
9529 #include "confdefs.h"
9530 /* pthread test headers */
9531 #include <pthread.h>
9532 #ifndef NULL
9533 #define NULL (void*)0
9534 #endif
9535
9536 static void *task(p)
9537         void *p;
9538 {
9539         return (void *) (p == NULL);
9540 }
9541
9542
9543 int main(argc, argv)
9544         int argc;
9545         char **argv;
9546 {
9547
9548         /* pthread test function */
9549         pthread_t t;
9550         int status;
9551 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9552         /* This system (e.g. AIX) defaults detached; must override */
9553         pthread_attr_t attr;
9554
9555         status = pthread_attr_init(&attr);
9556         if( status ) exit( status );
9557
9558         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9559         if( status ) exit( status );
9560
9561 #define ATTR    &attr
9562 #else
9563 #if HAVE_PTHREADS_D4
9564 #define ATTR    pthread_attr_default
9565 #else
9566 #define ATTR    NULL
9567 #endif
9568 #endif
9569         /* make sure pthread_create() isn't just a stub */
9570         status = pthread_create(&t, ATTR, task, NULL);
9571         if( status ) exit( status );
9572
9573         /* make sure pthread_detach() isn't just a stub */
9574 #if HAVE_PTHREADS_D4
9575         status = pthread_detach( &t );
9576 #else
9577         status = pthread_detach( t );
9578 #endif
9579
9580 #ifdef HAVE_LINUX_THREADS
9581         pthread_kill_other_threads_np();
9582 #endif
9583
9584         exit( status );
9585
9586 }
9587
9588 EOF
9589 if { (eval echo configure:9590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9590 then
9591   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9592 else
9593   echo "configure: failed program was:" >&5
9594   cat conftest.$ac_ext >&5
9595   rm -fr conftest*
9596   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9597 fi
9598 rm -fr conftest*
9599 fi
9600
9601
9602                 # restore the LIBS
9603                 LIBS="$ol_LIBS"
9604         
9605 fi
9606
9607 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9608
9609         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9610                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9611                 ol_link_threads=posix
9612         fi
9613 fi
9614
9615                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9616 if test "$ol_link_threads" = no ; then
9617         # try -lpthreads -lmach -lexc
9618         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9619 echo "configure:9620: checking for pthread link with -lpthreads -lmach -lexc" >&5
9620 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9621   echo $ac_n "(cached) $ac_c" 1>&6
9622 else
9623   
9624                 # save the flags
9625                 ol_LIBS="$LIBS"
9626                 LIBS="-lpthreads -lmach -lexc $LIBS"
9627
9628                 if test "$cross_compiling" = yes; then
9629   cat > conftest.$ac_ext <<EOF
9630 #line 9631 "configure"
9631 #include "confdefs.h"
9632 /* pthread test headers */
9633 #include <pthread.h>
9634 #ifndef NULL
9635 #define NULL (void*)0
9636 #endif
9637
9638 static void *task(p)
9639         void *p;
9640 {
9641         return (void *) (p == NULL);
9642 }
9643
9644 int main() {
9645
9646         /* pthread test function */
9647         pthread_t t;
9648         int status;
9649 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9650         /* This system (e.g. AIX) defaults detached; must override */
9651         pthread_attr_t attr;
9652
9653         status = pthread_attr_init(&attr);
9654         if( status ) exit( status );
9655
9656         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9657         if( status ) exit( status );
9658
9659 #define ATTR    &attr
9660 #else
9661 #if HAVE_PTHREADS_D4
9662 #define ATTR    pthread_attr_default
9663 #else
9664 #define ATTR    NULL
9665 #endif
9666 #endif
9667         /* make sure pthread_create() isn't just a stub */
9668         status = pthread_create(&t, ATTR, task, NULL);
9669         if( status ) exit( status );
9670
9671         /* make sure pthread_detach() isn't just a stub */
9672 #if HAVE_PTHREADS_D4
9673         status = pthread_detach( &t );
9674 #else
9675         status = pthread_detach( t );
9676 #endif
9677
9678 #ifdef HAVE_LINUX_THREADS
9679         pthread_kill_other_threads_np();
9680 #endif
9681
9682         exit( status );
9683
9684 ; return 0; }
9685 EOF
9686 if { (eval echo configure:9687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9687   rm -rf conftest*
9688   ol_cv_pthread_lpthreads_lmach_lexc=yes
9689 else
9690   echo "configure: failed program was:" >&5
9691   cat conftest.$ac_ext >&5
9692   rm -rf conftest*
9693   ol_cv_pthread_lpthreads_lmach_lexc=no
9694 fi
9695 rm -f conftest*
9696 else
9697   cat > conftest.$ac_ext <<EOF
9698 #line 9699 "configure"
9699 #include "confdefs.h"
9700 /* pthread test headers */
9701 #include <pthread.h>
9702 #ifndef NULL
9703 #define NULL (void*)0
9704 #endif
9705
9706 static void *task(p)
9707         void *p;
9708 {
9709         return (void *) (p == NULL);
9710 }
9711
9712
9713 int main(argc, argv)
9714         int argc;
9715         char **argv;
9716 {
9717
9718         /* pthread test function */
9719         pthread_t t;
9720         int status;
9721 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9722         /* This system (e.g. AIX) defaults detached; must override */
9723         pthread_attr_t attr;
9724
9725         status = pthread_attr_init(&attr);
9726         if( status ) exit( status );
9727
9728         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9729         if( status ) exit( status );
9730
9731 #define ATTR    &attr
9732 #else
9733 #if HAVE_PTHREADS_D4
9734 #define ATTR    pthread_attr_default
9735 #else
9736 #define ATTR    NULL
9737 #endif
9738 #endif
9739         /* make sure pthread_create() isn't just a stub */
9740         status = pthread_create(&t, ATTR, task, NULL);
9741         if( status ) exit( status );
9742
9743         /* make sure pthread_detach() isn't just a stub */
9744 #if HAVE_PTHREADS_D4
9745         status = pthread_detach( &t );
9746 #else
9747         status = pthread_detach( t );
9748 #endif
9749
9750 #ifdef HAVE_LINUX_THREADS
9751         pthread_kill_other_threads_np();
9752 #endif
9753
9754         exit( status );
9755
9756 }
9757
9758 EOF
9759 if { (eval echo configure:9760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9760 then
9761   ol_cv_pthread_lpthreads_lmach_lexc=yes
9762 else
9763   echo "configure: failed program was:" >&5
9764   cat conftest.$ac_ext >&5
9765   rm -fr conftest*
9766   ol_cv_pthread_lpthreads_lmach_lexc=no
9767 fi
9768 rm -fr conftest*
9769 fi
9770
9771
9772                 # restore the LIBS
9773                 LIBS="$ol_LIBS"
9774         
9775 fi
9776
9777 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9778
9779         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9780                 ol_link_pthreads="-lpthreads -lmach -lexc"
9781                 ol_link_threads=posix
9782         fi
9783 fi
9784
9785                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9786 if test "$ol_link_threads" = no ; then
9787         # try -lpthreads -lexc
9788         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9789 echo "configure:9790: checking for pthread link with -lpthreads -lexc" >&5
9790 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9791   echo $ac_n "(cached) $ac_c" 1>&6
9792 else
9793   
9794                 # save the flags
9795                 ol_LIBS="$LIBS"
9796                 LIBS="-lpthreads -lexc $LIBS"
9797
9798                 if test "$cross_compiling" = yes; then
9799   cat > conftest.$ac_ext <<EOF
9800 #line 9801 "configure"
9801 #include "confdefs.h"
9802 /* pthread test headers */
9803 #include <pthread.h>
9804 #ifndef NULL
9805 #define NULL (void*)0
9806 #endif
9807
9808 static void *task(p)
9809         void *p;
9810 {
9811         return (void *) (p == NULL);
9812 }
9813
9814 int main() {
9815
9816         /* pthread test function */
9817         pthread_t t;
9818         int status;
9819 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9820         /* This system (e.g. AIX) defaults detached; must override */
9821         pthread_attr_t attr;
9822
9823         status = pthread_attr_init(&attr);
9824         if( status ) exit( status );
9825
9826         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9827         if( status ) exit( status );
9828
9829 #define ATTR    &attr
9830 #else
9831 #if HAVE_PTHREADS_D4
9832 #define ATTR    pthread_attr_default
9833 #else
9834 #define ATTR    NULL
9835 #endif
9836 #endif
9837         /* make sure pthread_create() isn't just a stub */
9838         status = pthread_create(&t, ATTR, task, NULL);
9839         if( status ) exit( status );
9840
9841         /* make sure pthread_detach() isn't just a stub */
9842 #if HAVE_PTHREADS_D4
9843         status = pthread_detach( &t );
9844 #else
9845         status = pthread_detach( t );
9846 #endif
9847
9848 #ifdef HAVE_LINUX_THREADS
9849         pthread_kill_other_threads_np();
9850 #endif
9851
9852         exit( status );
9853
9854 ; return 0; }
9855 EOF
9856 if { (eval echo configure:9857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9857   rm -rf conftest*
9858   ol_cv_pthread_lpthreads_lexc=yes
9859 else
9860   echo "configure: failed program was:" >&5
9861   cat conftest.$ac_ext >&5
9862   rm -rf conftest*
9863   ol_cv_pthread_lpthreads_lexc=no
9864 fi
9865 rm -f conftest*
9866 else
9867   cat > conftest.$ac_ext <<EOF
9868 #line 9869 "configure"
9869 #include "confdefs.h"
9870 /* pthread test headers */
9871 #include <pthread.h>
9872 #ifndef NULL
9873 #define NULL (void*)0
9874 #endif
9875
9876 static void *task(p)
9877         void *p;
9878 {
9879         return (void *) (p == NULL);
9880 }
9881
9882
9883 int main(argc, argv)
9884         int argc;
9885         char **argv;
9886 {
9887
9888         /* pthread test function */
9889         pthread_t t;
9890         int status;
9891 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9892         /* This system (e.g. AIX) defaults detached; must override */
9893         pthread_attr_t attr;
9894
9895         status = pthread_attr_init(&attr);
9896         if( status ) exit( status );
9897
9898         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9899         if( status ) exit( status );
9900
9901 #define ATTR    &attr
9902 #else
9903 #if HAVE_PTHREADS_D4
9904 #define ATTR    pthread_attr_default
9905 #else
9906 #define ATTR    NULL
9907 #endif
9908 #endif
9909         /* make sure pthread_create() isn't just a stub */
9910         status = pthread_create(&t, ATTR, task, NULL);
9911         if( status ) exit( status );
9912
9913         /* make sure pthread_detach() isn't just a stub */
9914 #if HAVE_PTHREADS_D4
9915         status = pthread_detach( &t );
9916 #else
9917         status = pthread_detach( t );
9918 #endif
9919
9920 #ifdef HAVE_LINUX_THREADS
9921         pthread_kill_other_threads_np();
9922 #endif
9923
9924         exit( status );
9925
9926 }
9927
9928 EOF
9929 if { (eval echo configure:9930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9930 then
9931   ol_cv_pthread_lpthreads_lexc=yes
9932 else
9933   echo "configure: failed program was:" >&5
9934   cat conftest.$ac_ext >&5
9935   rm -fr conftest*
9936   ol_cv_pthread_lpthreads_lexc=no
9937 fi
9938 rm -fr conftest*
9939 fi
9940
9941
9942                 # restore the LIBS
9943                 LIBS="$ol_LIBS"
9944         
9945 fi
9946
9947 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9948
9949         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9950                 ol_link_pthreads="-lpthreads -lexc"
9951                 ol_link_threads=posix
9952         fi
9953 fi
9954
9955
9956                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9957 if test "$ol_link_threads" = no ; then
9958         # try -lpthreads
9959         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9960 echo "configure:9961: checking for pthread link with -lpthreads" >&5
9961 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9962   echo $ac_n "(cached) $ac_c" 1>&6
9963 else
9964   
9965                 # save the flags
9966                 ol_LIBS="$LIBS"
9967                 LIBS="-lpthreads $LIBS"
9968
9969                 if test "$cross_compiling" = yes; then
9970   cat > conftest.$ac_ext <<EOF
9971 #line 9972 "configure"
9972 #include "confdefs.h"
9973 /* pthread test headers */
9974 #include <pthread.h>
9975 #ifndef NULL
9976 #define NULL (void*)0
9977 #endif
9978
9979 static void *task(p)
9980         void *p;
9981 {
9982         return (void *) (p == NULL);
9983 }
9984
9985 int main() {
9986
9987         /* pthread test function */
9988         pthread_t t;
9989         int status;
9990 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9991         /* This system (e.g. AIX) defaults detached; must override */
9992         pthread_attr_t attr;
9993
9994         status = pthread_attr_init(&attr);
9995         if( status ) exit( status );
9996
9997         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9998         if( status ) exit( status );
9999
10000 #define ATTR    &attr
10001 #else
10002 #if HAVE_PTHREADS_D4
10003 #define ATTR    pthread_attr_default
10004 #else
10005 #define ATTR    NULL
10006 #endif
10007 #endif
10008         /* make sure pthread_create() isn't just a stub */
10009         status = pthread_create(&t, ATTR, task, NULL);
10010         if( status ) exit( status );
10011
10012         /* make sure pthread_detach() isn't just a stub */
10013 #if HAVE_PTHREADS_D4
10014         status = pthread_detach( &t );
10015 #else
10016         status = pthread_detach( t );
10017 #endif
10018
10019 #ifdef HAVE_LINUX_THREADS
10020         pthread_kill_other_threads_np();
10021 #endif
10022
10023         exit( status );
10024
10025 ; return 0; }
10026 EOF
10027 if { (eval echo configure:10028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10028   rm -rf conftest*
10029   ol_cv_pthread_lib_lpthreads=yes
10030 else
10031   echo "configure: failed program was:" >&5
10032   cat conftest.$ac_ext >&5
10033   rm -rf conftest*
10034   ol_cv_pthread_lib_lpthreads=no
10035 fi
10036 rm -f conftest*
10037 else
10038   cat > conftest.$ac_ext <<EOF
10039 #line 10040 "configure"
10040 #include "confdefs.h"
10041 /* pthread test headers */
10042 #include <pthread.h>
10043 #ifndef NULL
10044 #define NULL (void*)0
10045 #endif
10046
10047 static void *task(p)
10048         void *p;
10049 {
10050         return (void *) (p == NULL);
10051 }
10052
10053
10054 int main(argc, argv)
10055         int argc;
10056         char **argv;
10057 {
10058
10059         /* pthread test function */
10060         pthread_t t;
10061         int status;
10062 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10063         /* This system (e.g. AIX) defaults detached; must override */
10064         pthread_attr_t attr;
10065
10066         status = pthread_attr_init(&attr);
10067         if( status ) exit( status );
10068
10069         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10070         if( status ) exit( status );
10071
10072 #define ATTR    &attr
10073 #else
10074 #if HAVE_PTHREADS_D4
10075 #define ATTR    pthread_attr_default
10076 #else
10077 #define ATTR    NULL
10078 #endif
10079 #endif
10080         /* make sure pthread_create() isn't just a stub */
10081         status = pthread_create(&t, ATTR, task, NULL);
10082         if( status ) exit( status );
10083
10084         /* make sure pthread_detach() isn't just a stub */
10085 #if HAVE_PTHREADS_D4
10086         status = pthread_detach( &t );
10087 #else
10088         status = pthread_detach( t );
10089 #endif
10090
10091 #ifdef HAVE_LINUX_THREADS
10092         pthread_kill_other_threads_np();
10093 #endif
10094
10095         exit( status );
10096
10097 }
10098
10099 EOF
10100 if { (eval echo configure:10101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10101 then
10102   ol_cv_pthread_lib_lpthreads=yes
10103 else
10104   echo "configure: failed program was:" >&5
10105   cat conftest.$ac_ext >&5
10106   rm -fr conftest*
10107   ol_cv_pthread_lib_lpthreads=no
10108 fi
10109 rm -fr conftest*
10110 fi
10111
10112
10113                 # restore the LIBS
10114                 LIBS="$ol_LIBS"
10115         
10116 fi
10117
10118 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10119
10120         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10121                 ol_link_pthreads="-lpthreads"
10122                 ol_link_threads=posix
10123         fi
10124 fi
10125
10126
10127                 if test $ol_link_threads != no ; then
10128                         cat >> confdefs.h <<\EOF
10129 #define HAVE_PTHREADS 1
10130 EOF
10131
10132
10133                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10134
10135                                                 save_CPPFLAGS="$CPPFLAGS"
10136                         save_LIBS="$LIBS"
10137                         LIBS="$LTHREAD_LIBS $LIBS"
10138
10139                                                                                                 for ac_func in sched_yield pthread_yield
10140 do
10141 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10142 echo "configure:10143: checking for $ac_func" >&5
10143 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10144   echo $ac_n "(cached) $ac_c" 1>&6
10145 else
10146   cat > conftest.$ac_ext <<EOF
10147 #line 10148 "configure"
10148 #include "confdefs.h"
10149 /* System header to define __stub macros and hopefully few prototypes,
10150     which can conflict with char $ac_func(); below.  */
10151 #include <assert.h>
10152 /* Override any gcc2 internal prototype to avoid an error.  */
10153 /* We use char because int might match the return type of a gcc2
10154     builtin and then its argument prototype would still apply.  */
10155 char $ac_func();
10156 char (*f)();
10157
10158 int main() {
10159
10160 /* The GNU C library defines this for functions which it implements
10161     to always fail with ENOSYS.  Some functions are actually named
10162     something starting with __ and the normal name is an alias.  */
10163 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10164 choke me
10165 #else
10166 f = $ac_func;
10167 #endif
10168
10169 ; return 0; }
10170 EOF
10171 if { (eval echo configure:10172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10172   rm -rf conftest*
10173   eval "ac_cv_func_$ac_func=yes"
10174 else
10175   echo "configure: failed program was:" >&5
10176   cat conftest.$ac_ext >&5
10177   rm -rf conftest*
10178   eval "ac_cv_func_$ac_func=no"
10179 fi
10180 rm -f conftest*
10181 fi
10182
10183 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10184   echo "$ac_t""yes" 1>&6
10185     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10186   cat >> confdefs.h <<EOF
10187 #define $ac_tr_func 1
10188 EOF
10189  
10190 else
10191   echo "$ac_t""no" 1>&6
10192 fi
10193 done
10194
10195
10196                         if test $ac_cv_func_sched_yield = no -a \
10197                                 $ac_cv_func_pthread_yield = no ; then
10198                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10199 echo "configure:10200: checking for sched_yield in -lrt" >&5
10200 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10201 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10202   echo $ac_n "(cached) $ac_c" 1>&6
10203 else
10204   ac_save_LIBS="$LIBS"
10205 LIBS="-lrt  $LIBS"
10206 cat > conftest.$ac_ext <<EOF
10207 #line 10208 "configure"
10208 #include "confdefs.h"
10209 /* Override any gcc2 internal prototype to avoid an error.  */
10210 /* We use char because int might match the return type of a gcc2
10211     builtin and then its argument prototype would still apply.  */
10212 char sched_yield();
10213
10214 int main() {
10215 sched_yield()
10216 ; return 0; }
10217 EOF
10218 if { (eval echo configure:10219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10219   rm -rf conftest*
10220   eval "ac_cv_lib_$ac_lib_var=yes"
10221 else
10222   echo "configure: failed program was:" >&5
10223   cat conftest.$ac_ext >&5
10224   rm -rf conftest*
10225   eval "ac_cv_lib_$ac_lib_var=no"
10226 fi
10227 rm -f conftest*
10228 LIBS="$ac_save_LIBS"
10229
10230 fi
10231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10232   echo "$ac_t""yes" 1>&6
10233   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10234                                         cat >> confdefs.h <<\EOF
10235 #define HAVE_SCHED_YIELD 1
10236 EOF
10237
10238                                         ac_cv_func_sched_yield=yes
10239 else
10240   echo "$ac_t""no" 1>&6
10241 ac_cv_func_sched_yield=no
10242 fi
10243
10244                         fi
10245                         if test $ac_cv_func_sched_yield = no -a \
10246                                 $ac_cv_func_pthread_yield = no ; then
10247                                                                                                 for ac_func in thr_yield
10248 do
10249 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10250 echo "configure:10251: checking for $ac_func" >&5
10251 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10252   echo $ac_n "(cached) $ac_c" 1>&6
10253 else
10254   cat > conftest.$ac_ext <<EOF
10255 #line 10256 "configure"
10256 #include "confdefs.h"
10257 /* System header to define __stub macros and hopefully few prototypes,
10258     which can conflict with char $ac_func(); below.  */
10259 #include <assert.h>
10260 /* Override any gcc2 internal prototype to avoid an error.  */
10261 /* We use char because int might match the return type of a gcc2
10262     builtin and then its argument prototype would still apply.  */
10263 char $ac_func();
10264 char (*f)();
10265
10266 int main() {
10267
10268 /* The GNU C library defines this for functions which it implements
10269     to always fail with ENOSYS.  Some functions are actually named
10270     something starting with __ and the normal name is an alias.  */
10271 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10272 choke me
10273 #else
10274 f = $ac_func;
10275 #endif
10276
10277 ; return 0; }
10278 EOF
10279 if { (eval echo configure:10280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10280   rm -rf conftest*
10281   eval "ac_cv_func_$ac_func=yes"
10282 else
10283   echo "configure: failed program was:" >&5
10284   cat conftest.$ac_ext >&5
10285   rm -rf conftest*
10286   eval "ac_cv_func_$ac_func=no"
10287 fi
10288 rm -f conftest*
10289 fi
10290
10291 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10292   echo "$ac_t""yes" 1>&6
10293     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10294   cat >> confdefs.h <<EOF
10295 #define $ac_tr_func 1
10296 EOF
10297  
10298 else
10299   echo "$ac_t""no" 1>&6
10300 fi
10301 done
10302
10303                         fi
10304                         if test $ac_cv_func_sched_yield = no -a \
10305                                 $ac_cv_func_pthread_yield = no -a \
10306                                 "$ac_cv_func_thr_yield" = no ; then
10307                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10308                         fi
10309
10310                                                 for ac_func in pthread_kill
10311 do
10312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10313 echo "configure:10314: checking for $ac_func" >&5
10314 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10315   echo $ac_n "(cached) $ac_c" 1>&6
10316 else
10317   cat > conftest.$ac_ext <<EOF
10318 #line 10319 "configure"
10319 #include "confdefs.h"
10320 /* System header to define __stub macros and hopefully few prototypes,
10321     which can conflict with char $ac_func(); below.  */
10322 #include <assert.h>
10323 /* Override any gcc2 internal prototype to avoid an error.  */
10324 /* We use char because int might match the return type of a gcc2
10325     builtin and then its argument prototype would still apply.  */
10326 char $ac_func();
10327 char (*f)();
10328
10329 int main() {
10330
10331 /* The GNU C library defines this for functions which it implements
10332     to always fail with ENOSYS.  Some functions are actually named
10333     something starting with __ and the normal name is an alias.  */
10334 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10335 choke me
10336 #else
10337 f = $ac_func;
10338 #endif
10339
10340 ; return 0; }
10341 EOF
10342 if { (eval echo configure:10343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10343   rm -rf conftest*
10344   eval "ac_cv_func_$ac_func=yes"
10345 else
10346   echo "configure: failed program was:" >&5
10347   cat conftest.$ac_ext >&5
10348   rm -rf conftest*
10349   eval "ac_cv_func_$ac_func=no"
10350 fi
10351 rm -f conftest*
10352 fi
10353
10354 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10355   echo "$ac_t""yes" 1>&6
10356     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10357   cat >> confdefs.h <<EOF
10358 #define $ac_tr_func 1
10359 EOF
10360  
10361 else
10362   echo "$ac_t""no" 1>&6
10363 fi
10364 done
10365
10366
10367                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10368 echo "configure:10369: checking for pthread_detach with <pthread.h>" >&5
10369 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10370   echo $ac_n "(cached) $ac_c" 1>&6
10371 else
10372   
10373                                                                 cat > conftest.$ac_ext <<EOF
10374 #line 10375 "configure"
10375 #include "confdefs.h"
10376
10377 #include <pthread.h>
10378 #ifndef NULL
10379 #define NULL (void*)0
10380 #endif
10381
10382 int main() {
10383 pthread_detach(NULL);
10384 ; return 0; }
10385 EOF
10386 if { (eval echo configure:10387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10387   rm -rf conftest*
10388   ol_cv_func_pthread_detach=yes
10389 else
10390   echo "configure: failed program was:" >&5
10391   cat conftest.$ac_ext >&5
10392   rm -rf conftest*
10393   ol_cv_func_pthread_detach=no
10394 fi
10395 rm -f conftest*
10396                         
10397 fi
10398
10399 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10400
10401                         if test $ol_cv_func_pthread_detach = no ; then
10402                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10403                         fi
10404
10405                         cat >> confdefs.h <<\EOF
10406 #define HAVE_PTHREAD_DETACH 1
10407 EOF
10408
10409
10410                                                 for ac_func in \
10411                                 pthread_setconcurrency \
10412                                 pthread_getconcurrency \
10413                                 thr_setconcurrency \
10414                                 thr_getconcurrency \
10415                         
10416 do
10417 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10418 echo "configure:10419: checking for $ac_func" >&5
10419 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10420   echo $ac_n "(cached) $ac_c" 1>&6
10421 else
10422   cat > conftest.$ac_ext <<EOF
10423 #line 10424 "configure"
10424 #include "confdefs.h"
10425 /* System header to define __stub macros and hopefully few prototypes,
10426     which can conflict with char $ac_func(); below.  */
10427 #include <assert.h>
10428 /* Override any gcc2 internal prototype to avoid an error.  */
10429 /* We use char because int might match the return type of a gcc2
10430     builtin and then its argument prototype would still apply.  */
10431 char $ac_func();
10432 char (*f)();
10433
10434 int main() {
10435
10436 /* The GNU C library defines this for functions which it implements
10437     to always fail with ENOSYS.  Some functions are actually named
10438     something starting with __ and the normal name is an alias.  */
10439 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10440 choke me
10441 #else
10442 f = $ac_func;
10443 #endif
10444
10445 ; return 0; }
10446 EOF
10447 if { (eval echo configure:10448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10448   rm -rf conftest*
10449   eval "ac_cv_func_$ac_func=yes"
10450 else
10451   echo "configure: failed program was:" >&5
10452   cat conftest.$ac_ext >&5
10453   rm -rf conftest*
10454   eval "ac_cv_func_$ac_func=no"
10455 fi
10456 rm -f conftest*
10457 fi
10458
10459 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10460   echo "$ac_t""yes" 1>&6
10461     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10462   cat >> confdefs.h <<EOF
10463 #define $ac_tr_func 1
10464 EOF
10465  
10466 else
10467   echo "$ac_t""no" 1>&6
10468 fi
10469 done
10470
10471
10472                         
10473         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10474 echo "configure:10475: checking for pthread_kill_other_threads_np" >&5
10475 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10476   echo $ac_n "(cached) $ac_c" 1>&6
10477 else
10478   cat > conftest.$ac_ext <<EOF
10479 #line 10480 "configure"
10480 #include "confdefs.h"
10481 /* System header to define __stub macros and hopefully few prototypes,
10482     which can conflict with char pthread_kill_other_threads_np(); below.  */
10483 #include <assert.h>
10484 /* Override any gcc2 internal prototype to avoid an error.  */
10485 /* We use char because int might match the return type of a gcc2
10486     builtin and then its argument prototype would still apply.  */
10487 char pthread_kill_other_threads_np();
10488 char (*f)();
10489
10490 int main() {
10491
10492 /* The GNU C library defines this for functions which it implements
10493     to always fail with ENOSYS.  Some functions are actually named
10494     something starting with __ and the normal name is an alias.  */
10495 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10496 choke me
10497 #else
10498 f = pthread_kill_other_threads_np;
10499 #endif
10500
10501 ; return 0; }
10502 EOF
10503 if { (eval echo configure:10504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10504   rm -rf conftest*
10505   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10506 else
10507   echo "configure: failed program was:" >&5
10508   cat conftest.$ac_ext >&5
10509   rm -rf conftest*
10510   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10511 fi
10512 rm -f conftest*
10513 fi
10514
10515 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10516   echo "$ac_t""yes" 1>&6
10517   :
10518 else
10519   echo "$ac_t""no" 1>&6
10520 fi
10521
10522         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10523 echo "configure:10524: checking for LinuxThreads implementation" >&5
10524 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10525   echo $ac_n "(cached) $ac_c" 1>&6
10526 else
10527   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10528 fi
10529
10530 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10531
10532                         
10533         
10534         
10535         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10536 echo "configure:10537: checking for LinuxThreads consistency" >&5
10537 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10538   echo $ac_n "(cached) $ac_c" 1>&6
10539 else
10540   
10541                 if test $ol_cv_header_linux_threads = yes -a \
10542                         $ol_cv_sys_linux_threads = yes; then
10543                         ol_cv_linux_threads=yes
10544                 elif test $ol_cv_header_linux_threads = no -a \
10545                         $ol_cv_sys_linux_threads = no; then
10546                         ol_cv_linux_threads=no
10547                 else
10548                         ol_cv_linux_threads=error
10549                 fi
10550         
10551 fi
10552
10553 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10554
10555
10556                         if test $ol_cv_linux_threads = error; then
10557                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10558                         fi
10559
10560                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10561 echo "configure:10562: checking if pthread_create() works" >&5
10562 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10563   echo $ac_n "(cached) $ac_c" 1>&6
10564 else
10565   
10566                         if test "$cross_compiling" = yes; then
10567                                 ol_cv_pthread_create_works=yes
10568 else
10569   cat > conftest.$ac_ext <<EOF
10570 #line 10571 "configure"
10571 #include "confdefs.h"
10572 /* pthread test headers */
10573 #include <pthread.h>
10574 #ifndef NULL
10575 #define NULL (void*)0
10576 #endif
10577
10578 static void *task(p)
10579         void *p;
10580 {
10581         return (void *) (p == NULL);
10582 }
10583
10584
10585 int main(argc, argv)
10586         int argc;
10587         char **argv;
10588 {
10589
10590         /* pthread test function */
10591         pthread_t t;
10592         int status;
10593 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10594         /* This system (e.g. AIX) defaults detached; must override */
10595         pthread_attr_t attr;
10596
10597         status = pthread_attr_init(&attr);
10598         if( status ) exit( status );
10599
10600         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10601         if( status ) exit( status );
10602
10603 #define ATTR    &attr
10604 #else
10605 #if HAVE_PTHREADS_D4
10606 #define ATTR    pthread_attr_default
10607 #else
10608 #define ATTR    NULL
10609 #endif
10610 #endif
10611         /* make sure pthread_create() isn't just a stub */
10612         status = pthread_create(&t, ATTR, task, NULL);
10613         if( status ) exit( status );
10614
10615         /* make sure pthread_detach() isn't just a stub */
10616 #if HAVE_PTHREADS_D4
10617         status = pthread_detach( &t );
10618 #else
10619         status = pthread_detach( t );
10620 #endif
10621
10622 #ifdef HAVE_LINUX_THREADS
10623         pthread_kill_other_threads_np();
10624 #endif
10625
10626         exit( status );
10627
10628 }
10629
10630 EOF
10631 if { (eval echo configure:10632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10632 then
10633   ol_cv_pthread_create_works=yes
10634 else
10635   echo "configure: failed program was:" >&5
10636   cat conftest.$ac_ext >&5
10637   rm -fr conftest*
10638   ol_cv_pthread_create_works=no
10639 fi
10640 rm -fr conftest*
10641 fi
10642
10643 fi
10644
10645 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10646
10647                         if test $ol_cv_pthread_create_works = no ; then
10648                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10649                         fi
10650
10651                                                 if test $ol_with_yielding_select = auto ; then
10652                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10653 echo "configure:10654: checking if select yields when using pthreads" >&5
10654 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10655   echo $ac_n "(cached) $ac_c" 1>&6
10656 else
10657   
10658                                 if test "$cross_compiling" = yes; then
10659   ol_cv_pthread_select_yields=cross
10660 else
10661   cat > conftest.$ac_ext <<EOF
10662 #line 10663 "configure"
10663 #include "confdefs.h"
10664
10665 #include <sys/types.h>
10666 #include <sys/time.h>
10667 #include <unistd.h>
10668 #include <pthread.h>
10669 #ifndef NULL
10670 #define NULL (void*) 0
10671 #endif
10672
10673 static int fildes[2];
10674
10675 static void *task(p)
10676         void *p;
10677 {
10678         int i;
10679         struct timeval tv;
10680
10681         fd_set rfds;
10682
10683         tv.tv_sec=10;
10684         tv.tv_usec=0;
10685
10686         FD_ZERO(&rfds);
10687         FD_SET(fildes[0], &rfds);
10688
10689         /* we're not interested in any fds */
10690         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10691
10692         if(i < 0) {
10693                 perror("select");
10694                 exit(10);
10695         }
10696
10697         exit(0); /* if we exit here, the select blocked the whole process */
10698 }
10699
10700 int main(argc, argv)
10701         int argc;
10702         char **argv;
10703 {
10704         pthread_t t;
10705
10706         /* create a pipe to select */
10707         if(pipe(&fildes[0])) {
10708                 perror("select");
10709                 exit(1);
10710         }
10711
10712 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10713         (void) pthread_setconcurrency(2);
10714 #else
10715 #ifdef HAVE_THR_SETCONCURRENCY
10716         /* Set Solaris LWP concurrency to 2 */
10717         thr_setconcurrency(2);
10718 #endif
10719 #endif
10720
10721 #if HAVE_PTHREADS_D4
10722         pthread_create(&t, pthread_attr_default, task, NULL);
10723 #else
10724         pthread_create(&t, NULL, task, NULL);
10725 #endif
10726
10727 #if HAVE_SCHED_YIELD
10728         sched_yield();  /* make sure task runs first */
10729 #else
10730 #ifdef HAVE_PTHREAD_YIELD
10731         pthread_yield();        /* make sure task runs first */
10732 #endif
10733 #endif
10734
10735         exit(2);
10736 }
10737 EOF
10738 if { (eval echo configure:10739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10739 then
10740   ol_cv_pthread_select_yields=no
10741 else
10742   echo "configure: failed program was:" >&5
10743   cat conftest.$ac_ext >&5
10744   rm -fr conftest*
10745   ol_cv_pthread_select_yields=yes
10746 fi
10747 rm -fr conftest*
10748 fi
10749
10750 fi
10751
10752 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10753
10754                                 if test $ol_cv_pthread_select_yields = cross ; then
10755                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10756                                 fi
10757
10758                                 if test $ol_cv_pthread_select_yields = yes ; then
10759                                         ol_with_yielding_select=yes
10760                                 fi
10761                         fi
10762
10763                                                 CPPFLAGS="$save_CPPFLAGS"
10764                         LIBS="$save_LIBS"
10765                 else
10766                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10767                 fi
10768         fi
10769
10770         if test $ol_with_threads = posix ; then
10771                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10772         fi
10773 fi
10774
10775 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10776         -o $ol_with_threads = mach ; then
10777
10778                 for ac_hdr in mach/cthreads.h
10779 do
10780 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10781 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10782 echo "configure:10783: checking for $ac_hdr" >&5
10783 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10784   echo $ac_n "(cached) $ac_c" 1>&6
10785 else
10786   cat > conftest.$ac_ext <<EOF
10787 #line 10788 "configure"
10788 #include "confdefs.h"
10789 #include <$ac_hdr>
10790 EOF
10791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10792 { (eval echo configure:10793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10794 if test -z "$ac_err"; then
10795   rm -rf conftest*
10796   eval "ac_cv_header_$ac_safe=yes"
10797 else
10798   echo "$ac_err" >&5
10799   echo "configure: failed program was:" >&5
10800   cat conftest.$ac_ext >&5
10801   rm -rf conftest*
10802   eval "ac_cv_header_$ac_safe=no"
10803 fi
10804 rm -f conftest*
10805 fi
10806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10807   echo "$ac_t""yes" 1>&6
10808     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10809   cat >> confdefs.h <<EOF
10810 #define $ac_tr_hdr 1
10811 EOF
10812  
10813 else
10814   echo "$ac_t""no" 1>&6
10815 fi
10816 done
10817
10818         if test $ac_cv_header_mach_cthreads_h = yes ; then
10819                 ol_with_threads=found
10820
10821                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10822 echo "configure:10823: checking for cthread_fork" >&5
10823 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10824   echo $ac_n "(cached) $ac_c" 1>&6
10825 else
10826   cat > conftest.$ac_ext <<EOF
10827 #line 10828 "configure"
10828 #include "confdefs.h"
10829 /* System header to define __stub macros and hopefully few prototypes,
10830     which can conflict with char cthread_fork(); below.  */
10831 #include <assert.h>
10832 /* Override any gcc2 internal prototype to avoid an error.  */
10833 /* We use char because int might match the return type of a gcc2
10834     builtin and then its argument prototype would still apply.  */
10835 char cthread_fork();
10836 char (*f)();
10837
10838 int main() {
10839
10840 /* The GNU C library defines this for functions which it implements
10841     to always fail with ENOSYS.  Some functions are actually named
10842     something starting with __ and the normal name is an alias.  */
10843 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10844 choke me
10845 #else
10846 f = cthread_fork;
10847 #endif
10848
10849 ; return 0; }
10850 EOF
10851 if { (eval echo configure:10852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10852   rm -rf conftest*
10853   eval "ac_cv_func_cthread_fork=yes"
10854 else
10855   echo "configure: failed program was:" >&5
10856   cat conftest.$ac_ext >&5
10857   rm -rf conftest*
10858   eval "ac_cv_func_cthread_fork=no"
10859 fi
10860 rm -f conftest*
10861 fi
10862
10863 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10864   echo "$ac_t""yes" 1>&6
10865   ol_link_threads=yes
10866 else
10867   echo "$ac_t""no" 1>&6
10868 fi
10869
10870
10871                 if test $ol_link_threads = no ; then
10872                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10873 echo "configure:10874: checking for cthread_fork with -all_load" >&5
10874 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10875   echo $ac_n "(cached) $ac_c" 1>&6
10876 else
10877   
10878                                                                 save_LIBS="$LIBS"
10879                                 LIBS="-all_load $LIBS"
10880                                 cat > conftest.$ac_ext <<EOF
10881 #line 10882 "configure"
10882 #include "confdefs.h"
10883 #include <mach/cthreads.h>
10884 int main() {
10885
10886                                         cthread_fork((void *)0, (void *)0);
10887                                         
10888 ; return 0; }
10889 EOF
10890 if { (eval echo configure:10891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10891   rm -rf conftest*
10892   ol_cv_cthread_all_load=yes
10893 else
10894   echo "configure: failed program was:" >&5
10895   cat conftest.$ac_ext >&5
10896   rm -rf conftest*
10897   ol_cv_cthread_all_load=no
10898 fi
10899 rm -f conftest*
10900                                                                 LIBS="$save_LIBS"
10901                         
10902 fi
10903
10904 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10905
10906                         if test $ol_cv_cthread_all_load = yes ; then
10907                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10908                                 ol_link_threads=mach
10909                         fi
10910                 fi
10911
10912                 if test $ol_link_threads != no ; then
10913                         : check for cthread specific functionality here
10914                         cat >> confdefs.h <<\EOF
10915 #define HAVE_MACH_CTHREADS 1
10916 EOF
10917
10918                 else
10919                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10920                 fi
10921         fi
10922
10923         if test $ol_with_threads = mach ; then
10924                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10925         fi
10926 fi
10927
10928 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10929         -o $ol_with_threads = pth ; then
10930
10931         for ac_hdr in pth.h
10932 do
10933 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10934 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10935 echo "configure:10936: checking for $ac_hdr" >&5
10936 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10937   echo $ac_n "(cached) $ac_c" 1>&6
10938 else
10939   cat > conftest.$ac_ext <<EOF
10940 #line 10941 "configure"
10941 #include "confdefs.h"
10942 #include <$ac_hdr>
10943 EOF
10944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10945 { (eval echo configure:10946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10947 if test -z "$ac_err"; then
10948   rm -rf conftest*
10949   eval "ac_cv_header_$ac_safe=yes"
10950 else
10951   echo "$ac_err" >&5
10952   echo "configure: failed program was:" >&5
10953   cat conftest.$ac_ext >&5
10954   rm -rf conftest*
10955   eval "ac_cv_header_$ac_safe=no"
10956 fi
10957 rm -f conftest*
10958 fi
10959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10960   echo "$ac_t""yes" 1>&6
10961     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10962   cat >> confdefs.h <<EOF
10963 #define $ac_tr_hdr 1
10964 EOF
10965  
10966 else
10967   echo "$ac_t""no" 1>&6
10968 fi
10969 done
10970
10971
10972         if test $ac_cv_header_pth_h = yes ; then
10973                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10974 echo "configure:10975: checking for pth_version in -lpth" >&5
10975 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10976 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10977   echo $ac_n "(cached) $ac_c" 1>&6
10978 else
10979   ac_save_LIBS="$LIBS"
10980 LIBS="-lpth  $LIBS"
10981 cat > conftest.$ac_ext <<EOF
10982 #line 10983 "configure"
10983 #include "confdefs.h"
10984 /* Override any gcc2 internal prototype to avoid an error.  */
10985 /* We use char because int might match the return type of a gcc2
10986     builtin and then its argument prototype would still apply.  */
10987 char pth_version();
10988
10989 int main() {
10990 pth_version()
10991 ; return 0; }
10992 EOF
10993 if { (eval echo configure:10994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10994   rm -rf conftest*
10995   eval "ac_cv_lib_$ac_lib_var=yes"
10996 else
10997   echo "configure: failed program was:" >&5
10998   cat conftest.$ac_ext >&5
10999   rm -rf conftest*
11000   eval "ac_cv_lib_$ac_lib_var=no"
11001 fi
11002 rm -f conftest*
11003 LIBS="$ac_save_LIBS"
11004
11005 fi
11006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11007   echo "$ac_t""yes" 1>&6
11008   have_pth=yes
11009 else
11010   echo "$ac_t""no" 1>&6
11011 have_pth=no
11012 fi
11013
11014
11015                 if test $have_pth = yes ; then
11016                         cat >> confdefs.h <<\EOF
11017 #define HAVE_GNU_PTH 1
11018 EOF
11019
11020                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
11021                         ol_link_threads=pth
11022
11023                         if test $ol_with_yielding_select = auto ; then
11024                                 ol_with_yielding_select=yes
11025                         fi
11026                 fi
11027         fi
11028 fi
11029
11030 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11031         -o $ol_with_threads = lwp ; then
11032
11033                 for ac_hdr in thread.h synch.h
11034 do
11035 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11036 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11037 echo "configure:11038: checking for $ac_hdr" >&5
11038 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11039   echo $ac_n "(cached) $ac_c" 1>&6
11040 else
11041   cat > conftest.$ac_ext <<EOF
11042 #line 11043 "configure"
11043 #include "confdefs.h"
11044 #include <$ac_hdr>
11045 EOF
11046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11047 { (eval echo configure:11048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11049 if test -z "$ac_err"; then
11050   rm -rf conftest*
11051   eval "ac_cv_header_$ac_safe=yes"
11052 else
11053   echo "$ac_err" >&5
11054   echo "configure: failed program was:" >&5
11055   cat conftest.$ac_ext >&5
11056   rm -rf conftest*
11057   eval "ac_cv_header_$ac_safe=no"
11058 fi
11059 rm -f conftest*
11060 fi
11061 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11062   echo "$ac_t""yes" 1>&6
11063     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11064   cat >> confdefs.h <<EOF
11065 #define $ac_tr_hdr 1
11066 EOF
11067  
11068 else
11069   echo "$ac_t""no" 1>&6
11070 fi
11071 done
11072
11073         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
11074                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
11075 echo "configure:11076: checking for thr_create in -lthread" >&5
11076 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
11077 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11078   echo $ac_n "(cached) $ac_c" 1>&6
11079 else
11080   ac_save_LIBS="$LIBS"
11081 LIBS="-lthread  $LIBS"
11082 cat > conftest.$ac_ext <<EOF
11083 #line 11084 "configure"
11084 #include "confdefs.h"
11085 /* Override any gcc2 internal prototype to avoid an error.  */
11086 /* We use char because int might match the return type of a gcc2
11087     builtin and then its argument prototype would still apply.  */
11088 char thr_create();
11089
11090 int main() {
11091 thr_create()
11092 ; return 0; }
11093 EOF
11094 if { (eval echo configure:11095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11095   rm -rf conftest*
11096   eval "ac_cv_lib_$ac_lib_var=yes"
11097 else
11098   echo "configure: failed program was:" >&5
11099   cat conftest.$ac_ext >&5
11100   rm -rf conftest*
11101   eval "ac_cv_lib_$ac_lib_var=no"
11102 fi
11103 rm -f conftest*
11104 LIBS="$ac_save_LIBS"
11105
11106 fi
11107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11108   echo "$ac_t""yes" 1>&6
11109   have_thr=yes
11110 else
11111   echo "$ac_t""no" 1>&6
11112 have_thr=no
11113 fi
11114
11115
11116                 if test $have_thr = yes ; then
11117                         cat >> confdefs.h <<\EOF
11118 #define HAVE_THR 1
11119 EOF
11120
11121                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11122                         ol_link_threads=thr
11123
11124                         if test $ol_with_yielding_select = auto ; then
11125                                 ol_with_yielding_select=yes
11126                         fi
11127
11128                                                 for ac_func in \
11129                                 thr_setconcurrency \
11130                                 thr_getconcurrency \
11131                         
11132 do
11133 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11134 echo "configure:11135: checking for $ac_func" >&5
11135 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11136   echo $ac_n "(cached) $ac_c" 1>&6
11137 else
11138   cat > conftest.$ac_ext <<EOF
11139 #line 11140 "configure"
11140 #include "confdefs.h"
11141 /* System header to define __stub macros and hopefully few prototypes,
11142     which can conflict with char $ac_func(); below.  */
11143 #include <assert.h>
11144 /* Override any gcc2 internal prototype to avoid an error.  */
11145 /* We use char because int might match the return type of a gcc2
11146     builtin and then its argument prototype would still apply.  */
11147 char $ac_func();
11148 char (*f)();
11149
11150 int main() {
11151
11152 /* The GNU C library defines this for functions which it implements
11153     to always fail with ENOSYS.  Some functions are actually named
11154     something starting with __ and the normal name is an alias.  */
11155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11156 choke me
11157 #else
11158 f = $ac_func;
11159 #endif
11160
11161 ; return 0; }
11162 EOF
11163 if { (eval echo configure:11164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11164   rm -rf conftest*
11165   eval "ac_cv_func_$ac_func=yes"
11166 else
11167   echo "configure: failed program was:" >&5
11168   cat conftest.$ac_ext >&5
11169   rm -rf conftest*
11170   eval "ac_cv_func_$ac_func=no"
11171 fi
11172 rm -f conftest*
11173 fi
11174
11175 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11176   echo "$ac_t""yes" 1>&6
11177     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11178   cat >> confdefs.h <<EOF
11179 #define $ac_tr_func 1
11180 EOF
11181  
11182 else
11183   echo "$ac_t""no" 1>&6
11184 fi
11185 done
11186
11187                 fi
11188         fi
11189
11190                 for ac_hdr in lwp/lwp.h
11191 do
11192 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11193 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11194 echo "configure:11195: checking for $ac_hdr" >&5
11195 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11196   echo $ac_n "(cached) $ac_c" 1>&6
11197 else
11198   cat > conftest.$ac_ext <<EOF
11199 #line 11200 "configure"
11200 #include "confdefs.h"
11201 #include <$ac_hdr>
11202 EOF
11203 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11204 { (eval echo configure:11205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11205 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11206 if test -z "$ac_err"; then
11207   rm -rf conftest*
11208   eval "ac_cv_header_$ac_safe=yes"
11209 else
11210   echo "$ac_err" >&5
11211   echo "configure: failed program was:" >&5
11212   cat conftest.$ac_ext >&5
11213   rm -rf conftest*
11214   eval "ac_cv_header_$ac_safe=no"
11215 fi
11216 rm -f conftest*
11217 fi
11218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11219   echo "$ac_t""yes" 1>&6
11220     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11221   cat >> confdefs.h <<EOF
11222 #define $ac_tr_hdr 1
11223 EOF
11224  
11225 else
11226   echo "$ac_t""no" 1>&6
11227 fi
11228 done
11229
11230         if test $ac_cv_header_lwp_lwp_h = yes ; then
11231                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11232 echo "configure:11233: checking for lwp_create in -llwp" >&5
11233 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11234 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11235   echo $ac_n "(cached) $ac_c" 1>&6
11236 else
11237   ac_save_LIBS="$LIBS"
11238 LIBS="-llwp  $LIBS"
11239 cat > conftest.$ac_ext <<EOF
11240 #line 11241 "configure"
11241 #include "confdefs.h"
11242 /* Override any gcc2 internal prototype to avoid an error.  */
11243 /* We use char because int might match the return type of a gcc2
11244     builtin and then its argument prototype would still apply.  */
11245 char lwp_create();
11246
11247 int main() {
11248 lwp_create()
11249 ; return 0; }
11250 EOF
11251 if { (eval echo configure:11252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11252   rm -rf conftest*
11253   eval "ac_cv_lib_$ac_lib_var=yes"
11254 else
11255   echo "configure: failed program was:" >&5
11256   cat conftest.$ac_ext >&5
11257   rm -rf conftest*
11258   eval "ac_cv_lib_$ac_lib_var=no"
11259 fi
11260 rm -f conftest*
11261 LIBS="$ac_save_LIBS"
11262
11263 fi
11264 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11265   echo "$ac_t""yes" 1>&6
11266   have_lwp=yes
11267 else
11268   echo "$ac_t""no" 1>&6
11269 have_lwp=no
11270 fi
11271
11272
11273                 if test $have_lwp = yes ; then
11274                         cat >> confdefs.h <<\EOF
11275 #define HAVE_LWP 1
11276 EOF
11277
11278                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11279                         ol_link_threads=lwp
11280
11281                         if test $ol_with_yielding_select = auto ; then
11282                                 ol_with_yielding_select=no
11283                         fi
11284                 fi
11285         fi
11286 fi
11287
11288 if test $ol_with_yielding_select = yes ; then
11289         cat >> confdefs.h <<\EOF
11290 #define HAVE_YIELDING_SELECT 1
11291 EOF
11292
11293 fi
11294
11295 if test $ol_with_threads = manual ; then
11296                 ol_link_threads=yes
11297
11298         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11299
11300         for ac_hdr in pthread.h sched.h
11301 do
11302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11304 echo "configure:11305: checking for $ac_hdr" >&5
11305 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11306   echo $ac_n "(cached) $ac_c" 1>&6
11307 else
11308   cat > conftest.$ac_ext <<EOF
11309 #line 11310 "configure"
11310 #include "confdefs.h"
11311 #include <$ac_hdr>
11312 EOF
11313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11314 { (eval echo configure:11315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11316 if test -z "$ac_err"; then
11317   rm -rf conftest*
11318   eval "ac_cv_header_$ac_safe=yes"
11319 else
11320   echo "$ac_err" >&5
11321   echo "configure: failed program was:" >&5
11322   cat conftest.$ac_ext >&5
11323   rm -rf conftest*
11324   eval "ac_cv_header_$ac_safe=no"
11325 fi
11326 rm -f conftest*
11327 fi
11328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11329   echo "$ac_t""yes" 1>&6
11330     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11331   cat >> confdefs.h <<EOF
11332 #define $ac_tr_hdr 1
11333 EOF
11334  
11335 else
11336   echo "$ac_t""no" 1>&6
11337 fi
11338 done
11339
11340         for ac_func in sched_yield pthread_yield
11341 do
11342 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11343 echo "configure:11344: checking for $ac_func" >&5
11344 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11345   echo $ac_n "(cached) $ac_c" 1>&6
11346 else
11347   cat > conftest.$ac_ext <<EOF
11348 #line 11349 "configure"
11349 #include "confdefs.h"
11350 /* System header to define __stub macros and hopefully few prototypes,
11351     which can conflict with char $ac_func(); below.  */
11352 #include <assert.h>
11353 /* Override any gcc2 internal prototype to avoid an error.  */
11354 /* We use char because int might match the return type of a gcc2
11355     builtin and then its argument prototype would still apply.  */
11356 char $ac_func();
11357 char (*f)();
11358
11359 int main() {
11360
11361 /* The GNU C library defines this for functions which it implements
11362     to always fail with ENOSYS.  Some functions are actually named
11363     something starting with __ and the normal name is an alias.  */
11364 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11365 choke me
11366 #else
11367 f = $ac_func;
11368 #endif
11369
11370 ; return 0; }
11371 EOF
11372 if { (eval echo configure:11373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11373   rm -rf conftest*
11374   eval "ac_cv_func_$ac_func=yes"
11375 else
11376   echo "configure: failed program was:" >&5
11377   cat conftest.$ac_ext >&5
11378   rm -rf conftest*
11379   eval "ac_cv_func_$ac_func=no"
11380 fi
11381 rm -f conftest*
11382 fi
11383
11384 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11385   echo "$ac_t""yes" 1>&6
11386     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11387   cat >> confdefs.h <<EOF
11388 #define $ac_tr_func 1
11389 EOF
11390  
11391 else
11392   echo "$ac_t""no" 1>&6
11393 fi
11394 done
11395
11396         
11397         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11398 echo "configure:11399: checking for LinuxThreads pthread.h" >&5
11399 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11400   echo $ac_n "(cached) $ac_c" 1>&6
11401 else
11402   cat > conftest.$ac_ext <<EOF
11403 #line 11404 "configure"
11404 #include "confdefs.h"
11405 #include <pthread.h>
11406 EOF
11407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11408   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11409   rm -rf conftest*
11410   ol_cv_header_linux_threads=yes
11411 else
11412   rm -rf conftest*
11413   ol_cv_header_linux_threads=no
11414 fi
11415 rm -f conftest*
11416
11417                 
11418 fi
11419
11420 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11421         if test $ol_cv_header_linux_threads = yes; then
11422                 cat >> confdefs.h <<\EOF
11423 #define HAVE_LINUX_THREADS 1
11424 EOF
11425
11426         fi
11427
11428
11429         for ac_hdr in mach/cthreads.h
11430 do
11431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11433 echo "configure:11434: checking for $ac_hdr" >&5
11434 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11435   echo $ac_n "(cached) $ac_c" 1>&6
11436 else
11437   cat > conftest.$ac_ext <<EOF
11438 #line 11439 "configure"
11439 #include "confdefs.h"
11440 #include <$ac_hdr>
11441 EOF
11442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11443 { (eval echo configure:11444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11445 if test -z "$ac_err"; then
11446   rm -rf conftest*
11447   eval "ac_cv_header_$ac_safe=yes"
11448 else
11449   echo "$ac_err" >&5
11450   echo "configure: failed program was:" >&5
11451   cat conftest.$ac_ext >&5
11452   rm -rf conftest*
11453   eval "ac_cv_header_$ac_safe=no"
11454 fi
11455 rm -f conftest*
11456 fi
11457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11458   echo "$ac_t""yes" 1>&6
11459     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11460   cat >> confdefs.h <<EOF
11461 #define $ac_tr_hdr 1
11462 EOF
11463  
11464 else
11465   echo "$ac_t""no" 1>&6
11466 fi
11467 done
11468
11469         for ac_hdr in lwp/lwp.h
11470 do
11471 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11472 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11473 echo "configure:11474: checking for $ac_hdr" >&5
11474 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11475   echo $ac_n "(cached) $ac_c" 1>&6
11476 else
11477   cat > conftest.$ac_ext <<EOF
11478 #line 11479 "configure"
11479 #include "confdefs.h"
11480 #include <$ac_hdr>
11481 EOF
11482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11483 { (eval echo configure:11484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11485 if test -z "$ac_err"; then
11486   rm -rf conftest*
11487   eval "ac_cv_header_$ac_safe=yes"
11488 else
11489   echo "$ac_err" >&5
11490   echo "configure: failed program was:" >&5
11491   cat conftest.$ac_ext >&5
11492   rm -rf conftest*
11493   eval "ac_cv_header_$ac_safe=no"
11494 fi
11495 rm -f conftest*
11496 fi
11497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11498   echo "$ac_t""yes" 1>&6
11499     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11500   cat >> confdefs.h <<EOF
11501 #define $ac_tr_hdr 1
11502 EOF
11503  
11504 else
11505   echo "$ac_t""no" 1>&6
11506 fi
11507 done
11508
11509         for ac_hdr in thread.h synch.h
11510 do
11511 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11512 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11513 echo "configure:11514: checking for $ac_hdr" >&5
11514 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11515   echo $ac_n "(cached) $ac_c" 1>&6
11516 else
11517   cat > conftest.$ac_ext <<EOF
11518 #line 11519 "configure"
11519 #include "confdefs.h"
11520 #include <$ac_hdr>
11521 EOF
11522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11523 { (eval echo configure:11524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11525 if test -z "$ac_err"; then
11526   rm -rf conftest*
11527   eval "ac_cv_header_$ac_safe=yes"
11528 else
11529   echo "$ac_err" >&5
11530   echo "configure: failed program was:" >&5
11531   cat conftest.$ac_ext >&5
11532   rm -rf conftest*
11533   eval "ac_cv_header_$ac_safe=no"
11534 fi
11535 rm -f conftest*
11536 fi
11537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11538   echo "$ac_t""yes" 1>&6
11539     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11540   cat >> confdefs.h <<EOF
11541 #define $ac_tr_hdr 1
11542 EOF
11543  
11544 else
11545   echo "$ac_t""no" 1>&6
11546 fi
11547 done
11548
11549 fi
11550
11551 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11552                         cat >> confdefs.h <<\EOF
11553 #define REENTRANT 1
11554 EOF
11555
11556         cat >> confdefs.h <<\EOF
11557 #define _REENTRANT 1
11558 EOF
11559
11560         cat >> confdefs.h <<\EOF
11561 #define THREAD_SAFE 1
11562 EOF
11563
11564         cat >> confdefs.h <<\EOF
11565 #define _THREAD_SAFE 1
11566 EOF
11567
11568         cat >> confdefs.h <<\EOF
11569 #define THREADSAFE 1
11570 EOF
11571
11572         cat >> confdefs.h <<\EOF
11573 #define _THREADSAFE 1
11574 EOF
11575
11576         cat >> confdefs.h <<\EOF
11577 #define _SGI_MP_SOURCE 1
11578 EOF
11579
11580
11581                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11582 echo "configure:11583: checking for thread specific errno" >&5
11583 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11584   echo $ac_n "(cached) $ac_c" 1>&6
11585 else
11586   
11587                 cat > conftest.$ac_ext <<EOF
11588 #line 11589 "configure"
11589 #include "confdefs.h"
11590 #include <errno.h>
11591 int main() {
11592 errno = 0;
11593 ; return 0; }
11594 EOF
11595 if { (eval echo configure:11596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11596   rm -rf conftest*
11597   ol_cv_errno_thread_specific=yes
11598 else
11599   echo "configure: failed program was:" >&5
11600   cat conftest.$ac_ext >&5
11601   rm -rf conftest*
11602   ol_cv_errno_thread_specific=no
11603 fi
11604 rm -f conftest*
11605         
11606 fi
11607
11608 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11609
11610                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11611 echo "configure:11612: checking for thread specific h_errno" >&5
11612 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11613   echo $ac_n "(cached) $ac_c" 1>&6
11614 else
11615   
11616                 cat > conftest.$ac_ext <<EOF
11617 #line 11618 "configure"
11618 #include "confdefs.h"
11619 #include <netdb.h>
11620 int main() {
11621 h_errno = 0;
11622 ; return 0; }
11623 EOF
11624 if { (eval echo configure:11625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11625   rm -rf conftest*
11626   ol_cv_h_errno_thread_specific=yes
11627 else
11628   echo "configure: failed program was:" >&5
11629   cat conftest.$ac_ext >&5
11630   rm -rf conftest*
11631   ol_cv_h_errno_thread_specific=no
11632 fi
11633 rm -f conftest*
11634         
11635 fi
11636
11637 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11638
11639         if test $ol_cv_errno_thread_specific != yes \
11640                 -o $ol_cv_h_errno_thread_specific != yes ; then
11641                 LIBS="$LTHREAD_LIBS $LIBS"
11642                 LTHREAD_LIBS=""
11643         fi
11644
11645 fi  
11646
11647 if test $ol_link_threads = no ; then
11648         if test $ol_with_threads = yes ; then
11649                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11650         fi
11651
11652         if test $ol_with_threads = auto ; then
11653                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11654                 ol_with_threads=no
11655         fi
11656
11657         cat >> confdefs.h <<\EOF
11658 #define NO_THREADS 1
11659 EOF
11660
11661         LTHREAD_LIBS=""
11662 fi
11663
11664 if test $ol_link_threads != no ; then
11665         cat >> confdefs.h <<\EOF
11666 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11667 EOF
11668
11669 fi
11670
11671
11672 ol_link_ldbm=no 
11673 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
11674         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
11675 echo "configure:11676: checking for DB2 library" >&5
11676 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
11677   echo $ac_n "(cached) $ac_c" 1>&6
11678 else
11679         ol_LIBS="$LIBS"
11680         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
11681 echo "configure:11682: checking for db_appexit in -ldb" >&5
11682 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
11683 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11684   echo $ac_n "(cached) $ac_c" 1>&6
11685 else
11686   ac_save_LIBS="$LIBS"
11687 LIBS="-ldb  $LIBS"
11688 cat > conftest.$ac_ext <<EOF
11689 #line 11690 "configure"
11690 #include "confdefs.h"
11691 /* Override any gcc2 internal prototype to avoid an error.  */
11692 /* We use char because int might match the return type of a gcc2
11693     builtin and then its argument prototype would still apply.  */
11694 char db_appexit();
11695
11696 int main() {
11697 db_appexit()
11698 ; return 0; }
11699 EOF
11700 if { (eval echo configure:11701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11701   rm -rf conftest*
11702   eval "ac_cv_lib_$ac_lib_var=yes"
11703 else
11704   echo "configure: failed program was:" >&5
11705   cat conftest.$ac_ext >&5
11706   rm -rf conftest*
11707   eval "ac_cv_lib_$ac_lib_var=no"
11708 fi
11709 rm -f conftest*
11710 LIBS="$ac_save_LIBS"
11711
11712 fi
11713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11714   echo "$ac_t""yes" 1>&6
11715   ol_cv_lib_db2=-ldb
11716 else
11717   echo "$ac_t""no" 1>&6
11718 ol_cv_lib_db2=no
11719 fi
11720
11721         LIBS="$ol_LIBS"
11722
11723 fi
11724
11725 echo "$ac_t""$ol_cv_lib_db2" 1>&6
11726
11727 for ac_hdr in db.h
11728 do
11729 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11730 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11731 echo "configure:11732: checking for $ac_hdr" >&5
11732 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11733   echo $ac_n "(cached) $ac_c" 1>&6
11734 else
11735   cat > conftest.$ac_ext <<EOF
11736 #line 11737 "configure"
11737 #include "confdefs.h"
11738 #include <$ac_hdr>
11739 EOF
11740 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11741 { (eval echo configure:11742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11742 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11743 if test -z "$ac_err"; then
11744   rm -rf conftest*
11745   eval "ac_cv_header_$ac_safe=yes"
11746 else
11747   echo "$ac_err" >&5
11748   echo "configure: failed program was:" >&5
11749   cat conftest.$ac_ext >&5
11750   rm -rf conftest*
11751   eval "ac_cv_header_$ac_safe=no"
11752 fi
11753 rm -f conftest*
11754 fi
11755 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11756   echo "$ac_t""yes" 1>&6
11757     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11758   cat >> confdefs.h <<EOF
11759 #define $ac_tr_hdr 1
11760 EOF
11761  
11762 else
11763   echo "$ac_t""no" 1>&6
11764 fi
11765 done
11766
11767 if test $ac_cv_header_db_h = yes ; then
11768         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
11769 echo "configure:11770: checking if db.h is DB2" >&5
11770 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
11771   echo $ac_n "(cached) $ac_c" 1>&6
11772 else
11773   
11774                 cat > conftest.$ac_ext <<EOF
11775 #line 11776 "configure"
11776 #include "confdefs.h"
11777
11778 #                       include <db.h>
11779                         /* this check could be improved */
11780 #                       ifdef DB_VERSION_MAJOR
11781 #                               if DB_VERSION_MAJOR == 2
11782                                         __db_version_2;
11783 #                               endif
11784 #                       endif
11785                 
11786 EOF
11787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11788   egrep "__db_version_2" >/dev/null 2>&1; then
11789   rm -rf conftest*
11790   ol_cv_header_db2=yes
11791 else
11792   rm -rf conftest*
11793   ol_cv_header_db2=no
11794 fi
11795 rm -f conftest*
11796
11797 fi
11798
11799 echo "$ac_t""$ol_cv_header_db2" 1>&6
11800 else
11801         ol_cv_header_db2=no
11802 fi
11803
11804
11805  
11806  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
11807 echo "configure:11808: checking for Berkeley DB2" >&5
11808 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
11809   echo $ac_n "(cached) $ac_c" 1>&6
11810 else
11811   
11812         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
11813                 ol_cv_berkeley_db2=no
11814         else
11815                 ol_cv_berkeley_db2=yes
11816         fi
11817
11818 fi
11819
11820 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
11821  if test $ol_cv_berkeley_db2 = yes ; then
11822         cat >> confdefs.h <<\EOF
11823 #define HAVE_BERKELEY_DB2 1
11824 EOF
11825
11826  fi
11827
11828
11829         if test $ol_cv_berkeley_db2 = yes ; then
11830                 ol_link_ldbm=db2
11831                 ol_with_ldbm_api=db2
11832
11833                 if test $ol_with_ldbm_type = hash ; then
11834                         cat >> confdefs.h <<\EOF
11835 #define LDBM_USE_DBHASH 1
11836 EOF
11837
11838                 else
11839                         cat >> confdefs.h <<\EOF
11840 #define LDBM_USE_DBBTREE 1
11841 EOF
11842
11843                 fi
11844
11845                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11846 echo "configure:11847: checking for DB_THREAD support" >&5
11847 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
11848   echo $ac_n "(cached) $ac_c" 1>&6
11849 else
11850   
11851         ol_LIBS="$LIBS"
11852         if test $ol_cv_lib_db2 != yes ; then
11853                 LIBS="$ol_cv_lib_db2"
11854         fi
11855
11856         if test "$cross_compiling" = yes; then
11857   ol_cv_berkeley_db2_db_thread=cross
11858 else
11859   cat > conftest.$ac_ext <<EOF
11860 #line 11861 "configure"
11861 #include "confdefs.h"
11862
11863 #include <db.h>
11864 #ifndef NULL
11865 #define NULL ((void *)0)
11866 #endif
11867 main()
11868 {
11869         int rc;
11870         DB_ENV env;
11871         u_int32_t flags = DB_CREATE | DB_THREAD;
11872
11873         memset( &env, '\0', sizeof(env) );
11874
11875         rc = db_appinit( NULL, NULL, &env, flags );
11876
11877         if( rc == 0 ) {
11878                 db_appexit( &env );
11879         }
11880
11881         return rc;
11882 }
11883 EOF
11884 if { (eval echo configure:11885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11885 then
11886   ol_cv_berkeley_db2_db_thread=yes
11887 else
11888   echo "configure: failed program was:" >&5
11889   cat conftest.$ac_ext >&5
11890   rm -fr conftest*
11891   ol_cv_berkeley_db2_db_thread=no
11892 fi
11893 rm -fr conftest*
11894 fi
11895
11896
11897         LIBS="$ol_LIBS"
11898
11899         if test $ol_cv_berkeley_db2_db_thread != no ; then
11900                 cat >> confdefs.h <<\EOF
11901 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11902 EOF
11903
11904         fi
11905
11906 fi
11907
11908 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11909
11910                                                 if test $ol_cv_lib_db2 != yes ; then
11911                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11912                 fi
11913         fi
11914 fi
11915
11916 ol_link_bdb2=no
11917 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11918         if test $ol_cv_berkeley_db2_db_thread != no ; then
11919                 ol_link_bdb2=yes
11920         else
11921                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11922         fi
11923 fi
11924
11925 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11926         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11927 echo "configure:11928: checking for Berkeley DB library" >&5
11928 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11929   echo $ac_n "(cached) $ac_c" 1>&6
11930 else
11931   
11932         for ac_hdr in db1/db.h
11933 do
11934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11936 echo "configure:11937: checking for $ac_hdr" >&5
11937 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11938   echo $ac_n "(cached) $ac_c" 1>&6
11939 else
11940   cat > conftest.$ac_ext <<EOF
11941 #line 11942 "configure"
11942 #include "confdefs.h"
11943 #include <$ac_hdr>
11944 EOF
11945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11946 { (eval echo configure:11947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11948 if test -z "$ac_err"; then
11949   rm -rf conftest*
11950   eval "ac_cv_header_$ac_safe=yes"
11951 else
11952   echo "$ac_err" >&5
11953   echo "configure: failed program was:" >&5
11954   cat conftest.$ac_ext >&5
11955   rm -rf conftest*
11956   eval "ac_cv_header_$ac_safe=no"
11957 fi
11958 rm -f conftest*
11959 fi
11960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11961   echo "$ac_t""yes" 1>&6
11962     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11963   cat >> confdefs.h <<EOF
11964 #define $ac_tr_hdr 1
11965 EOF
11966  
11967 else
11968   echo "$ac_t""no" 1>&6
11969 fi
11970 done
11971
11972         ol_LIBS="$LIBS"
11973         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11974 echo "configure:11975: checking for dbopen" >&5
11975 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11976   echo $ac_n "(cached) $ac_c" 1>&6
11977 else
11978   cat > conftest.$ac_ext <<EOF
11979 #line 11980 "configure"
11980 #include "confdefs.h"
11981 /* System header to define __stub macros and hopefully few prototypes,
11982     which can conflict with char dbopen(); below.  */
11983 #include <assert.h>
11984 /* Override any gcc2 internal prototype to avoid an error.  */
11985 /* We use char because int might match the return type of a gcc2
11986     builtin and then its argument prototype would still apply.  */
11987 char dbopen();
11988 char (*f)();
11989
11990 int main() {
11991
11992 /* The GNU C library defines this for functions which it implements
11993     to always fail with ENOSYS.  Some functions are actually named
11994     something starting with __ and the normal name is an alias.  */
11995 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11996 choke me
11997 #else
11998 f = dbopen;
11999 #endif
12000
12001 ; return 0; }
12002 EOF
12003 if { (eval echo configure:12004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12004   rm -rf conftest*
12005   eval "ac_cv_func_dbopen=yes"
12006 else
12007   echo "configure: failed program was:" >&5
12008   cat conftest.$ac_ext >&5
12009   rm -rf conftest*
12010   eval "ac_cv_func_dbopen=no"
12011 fi
12012 rm -f conftest*
12013 fi
12014
12015 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
12016   echo "$ac_t""yes" 1>&6
12017   ol_cv_lib_db=yes
12018 else
12019   echo "$ac_t""no" 1>&6
12020
12021                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
12022 echo "configure:12023: checking for dbopen in -ldb1" >&5
12023 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
12024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12025   echo $ac_n "(cached) $ac_c" 1>&6
12026 else
12027   ac_save_LIBS="$LIBS"
12028 LIBS="-ldb1  $LIBS"
12029 cat > conftest.$ac_ext <<EOF
12030 #line 12031 "configure"
12031 #include "confdefs.h"
12032 /* Override any gcc2 internal prototype to avoid an error.  */
12033 /* We use char because int might match the return type of a gcc2
12034     builtin and then its argument prototype would still apply.  */
12035 char dbopen();
12036
12037 int main() {
12038 dbopen()
12039 ; return 0; }
12040 EOF
12041 if { (eval echo configure:12042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12042   rm -rf conftest*
12043   eval "ac_cv_lib_$ac_lib_var=yes"
12044 else
12045   echo "configure: failed program was:" >&5
12046   cat conftest.$ac_ext >&5
12047   rm -rf conftest*
12048   eval "ac_cv_lib_$ac_lib_var=no"
12049 fi
12050 rm -f conftest*
12051 LIBS="$ac_save_LIBS"
12052
12053 fi
12054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12055   echo "$ac_t""yes" 1>&6
12056   ol_cv_lib_db=-ldb1
12057 else
12058   echo "$ac_t""no" 1>&6
12059
12060                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
12061 echo "configure:12062: checking for dbopen in -ldb" >&5
12062 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
12063 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12064   echo $ac_n "(cached) $ac_c" 1>&6
12065 else
12066   ac_save_LIBS="$LIBS"
12067 LIBS="-ldb  $LIBS"
12068 cat > conftest.$ac_ext <<EOF
12069 #line 12070 "configure"
12070 #include "confdefs.h"
12071 /* Override any gcc2 internal prototype to avoid an error.  */
12072 /* We use char because int might match the return type of a gcc2
12073     builtin and then its argument prototype would still apply.  */
12074 char dbopen();
12075
12076 int main() {
12077 dbopen()
12078 ; return 0; }
12079 EOF
12080 if { (eval echo configure:12081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12081   rm -rf conftest*
12082   eval "ac_cv_lib_$ac_lib_var=yes"
12083 else
12084   echo "configure: failed program was:" >&5
12085   cat conftest.$ac_ext >&5
12086   rm -rf conftest*
12087   eval "ac_cv_lib_$ac_lib_var=no"
12088 fi
12089 rm -f conftest*
12090 LIBS="$ac_save_LIBS"
12091
12092 fi
12093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12094   echo "$ac_t""yes" 1>&6
12095   ol_cv_lib_db=-ldb
12096 else
12097   echo "$ac_t""no" 1>&6
12098 ol_cv_lib_db=no
12099 fi
12100
12101                 
12102 fi
12103
12104         
12105 fi
12106
12107         LIBS="$ol_LIBS"
12108
12109 fi
12110
12111 echo "$ac_t""$ol_cv_lib_db" 1>&6
12112
12113
12114 for ac_hdr in db_185.h
12115 do
12116 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12117 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12118 echo "configure:12119: checking for $ac_hdr" >&5
12119 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12120   echo $ac_n "(cached) $ac_c" 1>&6
12121 else
12122   cat > conftest.$ac_ext <<EOF
12123 #line 12124 "configure"
12124 #include "confdefs.h"
12125 #include <$ac_hdr>
12126 EOF
12127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12128 { (eval echo configure:12129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12130 if test -z "$ac_err"; then
12131   rm -rf conftest*
12132   eval "ac_cv_header_$ac_safe=yes"
12133 else
12134   echo "$ac_err" >&5
12135   echo "configure: failed program was:" >&5
12136   cat conftest.$ac_ext >&5
12137   rm -rf conftest*
12138   eval "ac_cv_header_$ac_safe=no"
12139 fi
12140 rm -f conftest*
12141 fi
12142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12143   echo "$ac_t""yes" 1>&6
12144     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12145   cat >> confdefs.h <<EOF
12146 #define $ac_tr_hdr 1
12147 EOF
12148  
12149 else
12150   echo "$ac_t""no" 1>&6
12151 fi
12152 done
12153
12154 if test "$ol_cv_header_db2" = yes ; then
12155         
12156         ol_cv_header_db=$ac_cv_header_db_185_h
12157 else
12158         ol_cv_header_db=$ac_cv_header_db_h
12159 fi
12160
12161
12162  
12163  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
12164 echo "configure:12165: checking for Berkeley DB" >&5
12165 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
12166   echo $ac_n "(cached) $ac_c" 1>&6
12167 else
12168   
12169         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
12170                 ol_cv_berkeley_db=no
12171         else
12172                 ol_cv_berkeley_db=yes
12173         fi
12174
12175 fi
12176
12177 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
12178  if test $ol_cv_berkeley_db = yes ; then
12179         cat >> confdefs.h <<\EOF
12180 #define HAVE_BERKELEY_DB 1
12181 EOF
12182
12183  fi
12184
12185
12186         if test $ol_cv_berkeley_db = yes ; then
12187                 ol_link_ldbm=db
12188                 ol_with_ldbm_api=db
12189
12190                 if test $ol_with_ldbm_type = hash ; then
12191                         cat >> confdefs.h <<\EOF
12192 #define LDBM_USE_DBHASH 1
12193 EOF
12194
12195                 else
12196                         cat >> confdefs.h <<\EOF
12197 #define LDBM_USE_DBBTREE 1
12198 EOF
12199
12200                 fi
12201
12202                                                 if test $ol_cv_lib_db != yes ; then
12203                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12204                 fi
12205         fi
12206 fi
12207
12208 if test $ol_with_ldbm_api = manual ; then
12209                 ol_link_ldbm=yes
12210
12211         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
12212
12213         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
12214 do
12215 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12216 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12217 echo "configure:12218: checking for $ac_hdr" >&5
12218 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12219   echo $ac_n "(cached) $ac_c" 1>&6
12220 else
12221   cat > conftest.$ac_ext <<EOF
12222 #line 12223 "configure"
12223 #include "confdefs.h"
12224 #include <$ac_hdr>
12225 EOF
12226 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12227 { (eval echo configure:12228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12228 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12229 if test -z "$ac_err"; then
12230   rm -rf conftest*
12231   eval "ac_cv_header_$ac_safe=yes"
12232 else
12233   echo "$ac_err" >&5
12234   echo "configure: failed program was:" >&5
12235   cat conftest.$ac_ext >&5
12236   rm -rf conftest*
12237   eval "ac_cv_header_$ac_safe=no"
12238 fi
12239 rm -f conftest*
12240 fi
12241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12242   echo "$ac_t""yes" 1>&6
12243     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12244   cat >> confdefs.h <<EOF
12245 #define $ac_tr_hdr 1
12246 EOF
12247  
12248 else
12249   echo "$ac_t""no" 1>&6
12250 fi
12251 done
12252
12253 fi
12254
12255 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12256         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12257         ol_with_ldbm_api=none
12258 fi
12259
12260 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12261         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12262 echo "configure:12263: checking for MDBM library" >&5
12263 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12264   echo $ac_n "(cached) $ac_c" 1>&6
12265 else
12266         ol_LIBS="$LIBS"
12267         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12268 echo "configure:12269: checking for mdbm_set_chain" >&5
12269 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12270   echo $ac_n "(cached) $ac_c" 1>&6
12271 else
12272   cat > conftest.$ac_ext <<EOF
12273 #line 12274 "configure"
12274 #include "confdefs.h"
12275 /* System header to define __stub macros and hopefully few prototypes,
12276     which can conflict with char mdbm_set_chain(); below.  */
12277 #include <assert.h>
12278 /* Override any gcc2 internal prototype to avoid an error.  */
12279 /* We use char because int might match the return type of a gcc2
12280     builtin and then its argument prototype would still apply.  */
12281 char mdbm_set_chain();
12282 char (*f)();
12283
12284 int main() {
12285
12286 /* The GNU C library defines this for functions which it implements
12287     to always fail with ENOSYS.  Some functions are actually named
12288     something starting with __ and the normal name is an alias.  */
12289 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12290 choke me
12291 #else
12292 f = mdbm_set_chain;
12293 #endif
12294
12295 ; return 0; }
12296 EOF
12297 if { (eval echo configure:12298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12298   rm -rf conftest*
12299   eval "ac_cv_func_mdbm_set_chain=yes"
12300 else
12301   echo "configure: failed program was:" >&5
12302   cat conftest.$ac_ext >&5
12303   rm -rf conftest*
12304   eval "ac_cv_func_mdbm_set_chain=no"
12305 fi
12306 rm -f conftest*
12307 fi
12308
12309 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12310   echo "$ac_t""yes" 1>&6
12311   ol_cv_lib_mdbm=yes
12312 else
12313   echo "$ac_t""no" 1>&6
12314
12315                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12316 echo "configure:12317: checking for mdbm_set_chain in -lmdbm" >&5
12317 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12318 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12319   echo $ac_n "(cached) $ac_c" 1>&6
12320 else
12321   ac_save_LIBS="$LIBS"
12322 LIBS="-lmdbm  $LIBS"
12323 cat > conftest.$ac_ext <<EOF
12324 #line 12325 "configure"
12325 #include "confdefs.h"
12326 /* Override any gcc2 internal prototype to avoid an error.  */
12327 /* We use char because int might match the return type of a gcc2
12328     builtin and then its argument prototype would still apply.  */
12329 char mdbm_set_chain();
12330
12331 int main() {
12332 mdbm_set_chain()
12333 ; return 0; }
12334 EOF
12335 if { (eval echo configure:12336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12336   rm -rf conftest*
12337   eval "ac_cv_lib_$ac_lib_var=yes"
12338 else
12339   echo "configure: failed program was:" >&5
12340   cat conftest.$ac_ext >&5
12341   rm -rf conftest*
12342   eval "ac_cv_lib_$ac_lib_var=no"
12343 fi
12344 rm -f conftest*
12345 LIBS="$ac_save_LIBS"
12346
12347 fi
12348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12349   echo "$ac_t""yes" 1>&6
12350   ol_cv_lib_mdbm=-lmdbm
12351 else
12352   echo "$ac_t""no" 1>&6
12353 ol_cv_lib_mdbm=no
12354 fi
12355
12356         
12357 fi
12358
12359         LIBS="$ol_LIBS"
12360
12361 fi
12362
12363 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12364
12365
12366  for ac_hdr in mdbm.h
12367 do
12368 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12369 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12370 echo "configure:12371: checking for $ac_hdr" >&5
12371 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12372   echo $ac_n "(cached) $ac_c" 1>&6
12373 else
12374   cat > conftest.$ac_ext <<EOF
12375 #line 12376 "configure"
12376 #include "confdefs.h"
12377 #include <$ac_hdr>
12378 EOF
12379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12380 { (eval echo configure:12381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12382 if test -z "$ac_err"; then
12383   rm -rf conftest*
12384   eval "ac_cv_header_$ac_safe=yes"
12385 else
12386   echo "$ac_err" >&5
12387   echo "configure: failed program was:" >&5
12388   cat conftest.$ac_ext >&5
12389   rm -rf conftest*
12390   eval "ac_cv_header_$ac_safe=no"
12391 fi
12392 rm -f conftest*
12393 fi
12394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12395   echo "$ac_t""yes" 1>&6
12396     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12397   cat >> confdefs.h <<EOF
12398 #define $ac_tr_hdr 1
12399 EOF
12400  
12401 else
12402   echo "$ac_t""no" 1>&6
12403 fi
12404 done
12405
12406  echo $ac_n "checking for db""... $ac_c" 1>&6
12407 echo "configure:12408: checking for db" >&5
12408 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12409   echo $ac_n "(cached) $ac_c" 1>&6
12410 else
12411   
12412         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12413                 ol_cv_mdbm=no
12414         else
12415                 ol_cv_mdbm=yes
12416         fi
12417
12418 fi
12419
12420 echo "$ac_t""$ol_cv_mdbm" 1>&6
12421  if test $ol_cv_mdbm = yes ; then
12422         cat >> confdefs.h <<\EOF
12423 #define HAVE_MDBM 1
12424 EOF
12425
12426  fi
12427
12428
12429         if test $ol_cv_mdbm = yes ; then
12430                 ol_link_ldbm=mdbm
12431                 ol_with_ldbm_api=mdbm
12432                 if test $ol_cv_lib_mdbm != yes ; then
12433                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12434                 fi
12435         fi
12436 fi
12437
12438 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12439         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12440 echo "configure:12441: checking for GDBM library" >&5
12441 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12442   echo $ac_n "(cached) $ac_c" 1>&6
12443 else
12444         ol_LIBS="$LIBS"
12445         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12446 echo "configure:12447: checking for gdbm_open" >&5
12447 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12448   echo $ac_n "(cached) $ac_c" 1>&6
12449 else
12450   cat > conftest.$ac_ext <<EOF
12451 #line 12452 "configure"
12452 #include "confdefs.h"
12453 /* System header to define __stub macros and hopefully few prototypes,
12454     which can conflict with char gdbm_open(); below.  */
12455 #include <assert.h>
12456 /* Override any gcc2 internal prototype to avoid an error.  */
12457 /* We use char because int might match the return type of a gcc2
12458     builtin and then its argument prototype would still apply.  */
12459 char gdbm_open();
12460 char (*f)();
12461
12462 int main() {
12463
12464 /* The GNU C library defines this for functions which it implements
12465     to always fail with ENOSYS.  Some functions are actually named
12466     something starting with __ and the normal name is an alias.  */
12467 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12468 choke me
12469 #else
12470 f = gdbm_open;
12471 #endif
12472
12473 ; return 0; }
12474 EOF
12475 if { (eval echo configure:12476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12476   rm -rf conftest*
12477   eval "ac_cv_func_gdbm_open=yes"
12478 else
12479   echo "configure: failed program was:" >&5
12480   cat conftest.$ac_ext >&5
12481   rm -rf conftest*
12482   eval "ac_cv_func_gdbm_open=no"
12483 fi
12484 rm -f conftest*
12485 fi
12486
12487 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12488   echo "$ac_t""yes" 1>&6
12489   ol_cv_lib_gdbm=yes
12490 else
12491   echo "$ac_t""no" 1>&6
12492
12493                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12494 echo "configure:12495: checking for gdbm_open in -lgdbm" >&5
12495 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12496 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12497   echo $ac_n "(cached) $ac_c" 1>&6
12498 else
12499   ac_save_LIBS="$LIBS"
12500 LIBS="-lgdbm  $LIBS"
12501 cat > conftest.$ac_ext <<EOF
12502 #line 12503 "configure"
12503 #include "confdefs.h"
12504 /* Override any gcc2 internal prototype to avoid an error.  */
12505 /* We use char because int might match the return type of a gcc2
12506     builtin and then its argument prototype would still apply.  */
12507 char gdbm_open();
12508
12509 int main() {
12510 gdbm_open()
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   ol_cv_lib_gdbm=-lgdbm
12529 else
12530   echo "$ac_t""no" 1>&6
12531 ol_cv_lib_gdbm=no
12532 fi
12533
12534         
12535 fi
12536
12537         LIBS="$ol_LIBS"
12538
12539 fi
12540
12541 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12542
12543
12544  for ac_hdr in gdbm.h
12545 do
12546 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12547 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12548 echo "configure:12549: checking for $ac_hdr" >&5
12549 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12550   echo $ac_n "(cached) $ac_c" 1>&6
12551 else
12552   cat > conftest.$ac_ext <<EOF
12553 #line 12554 "configure"
12554 #include "confdefs.h"
12555 #include <$ac_hdr>
12556 EOF
12557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12558 { (eval echo configure:12559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12560 if test -z "$ac_err"; then
12561   rm -rf conftest*
12562   eval "ac_cv_header_$ac_safe=yes"
12563 else
12564   echo "$ac_err" >&5
12565   echo "configure: failed program was:" >&5
12566   cat conftest.$ac_ext >&5
12567   rm -rf conftest*
12568   eval "ac_cv_header_$ac_safe=no"
12569 fi
12570 rm -f conftest*
12571 fi
12572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12573   echo "$ac_t""yes" 1>&6
12574     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12575   cat >> confdefs.h <<EOF
12576 #define $ac_tr_hdr 1
12577 EOF
12578  
12579 else
12580   echo "$ac_t""no" 1>&6
12581 fi
12582 done
12583
12584  echo $ac_n "checking for db""... $ac_c" 1>&6
12585 echo "configure:12586: checking for db" >&5
12586 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12587   echo $ac_n "(cached) $ac_c" 1>&6
12588 else
12589   
12590         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12591                 ol_cv_gdbm=no
12592         else
12593                 ol_cv_gdbm=yes
12594         fi
12595
12596 fi
12597
12598 echo "$ac_t""$ol_cv_gdbm" 1>&6
12599  if test $ol_cv_gdbm = yes ; then
12600         cat >> confdefs.h <<\EOF
12601 #define HAVE_GDBM 1
12602 EOF
12603
12604  fi
12605
12606
12607         if test $ol_cv_gdbm = yes ; then
12608                 ol_link_ldbm=gdbm
12609                 ol_with_ldbm_api=gdbm
12610
12611                 if test $ol_cv_lib_gdbm != yes ; then
12612                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12613                 fi
12614         fi
12615 fi
12616
12617 if test $ol_with_ldbm_api = ndbm ; then
12618         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12619 echo "configure:12620: checking for NDBM library" >&5
12620 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12621   echo $ac_n "(cached) $ac_c" 1>&6
12622 else
12623         ol_LIBS="$LIBS"
12624         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12625 echo "configure:12626: checking for dbm_open" >&5
12626 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12627   echo $ac_n "(cached) $ac_c" 1>&6
12628 else
12629   cat > conftest.$ac_ext <<EOF
12630 #line 12631 "configure"
12631 #include "confdefs.h"
12632 /* System header to define __stub macros and hopefully few prototypes,
12633     which can conflict with char dbm_open(); below.  */
12634 #include <assert.h>
12635 /* Override any gcc2 internal prototype to avoid an error.  */
12636 /* We use char because int might match the return type of a gcc2
12637     builtin and then its argument prototype would still apply.  */
12638 char dbm_open();
12639 char (*f)();
12640
12641 int main() {
12642
12643 /* The GNU C library defines this for functions which it implements
12644     to always fail with ENOSYS.  Some functions are actually named
12645     something starting with __ and the normal name is an alias.  */
12646 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12647 choke me
12648 #else
12649 f = dbm_open;
12650 #endif
12651
12652 ; return 0; }
12653 EOF
12654 if { (eval echo configure:12655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12655   rm -rf conftest*
12656   eval "ac_cv_func_dbm_open=yes"
12657 else
12658   echo "configure: failed program was:" >&5
12659   cat conftest.$ac_ext >&5
12660   rm -rf conftest*
12661   eval "ac_cv_func_dbm_open=no"
12662 fi
12663 rm -f conftest*
12664 fi
12665
12666 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12667   echo "$ac_t""yes" 1>&6
12668   ol_cv_lib_ndbm=yes
12669 else
12670   echo "$ac_t""no" 1>&6
12671
12672                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12673 echo "configure:12674: checking for dbm_open in -lndbm" >&5
12674 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12675 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12676   echo $ac_n "(cached) $ac_c" 1>&6
12677 else
12678   ac_save_LIBS="$LIBS"
12679 LIBS="-lndbm  $LIBS"
12680 cat > conftest.$ac_ext <<EOF
12681 #line 12682 "configure"
12682 #include "confdefs.h"
12683 /* Override any gcc2 internal prototype to avoid an error.  */
12684 /* We use char because int might match the return type of a gcc2
12685     builtin and then its argument prototype would still apply.  */
12686 char dbm_open();
12687
12688 int main() {
12689 dbm_open()
12690 ; return 0; }
12691 EOF
12692 if { (eval echo configure:12693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12693   rm -rf conftest*
12694   eval "ac_cv_lib_$ac_lib_var=yes"
12695 else
12696   echo "configure: failed program was:" >&5
12697   cat conftest.$ac_ext >&5
12698   rm -rf conftest*
12699   eval "ac_cv_lib_$ac_lib_var=no"
12700 fi
12701 rm -f conftest*
12702 LIBS="$ac_save_LIBS"
12703
12704 fi
12705 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12706   echo "$ac_t""yes" 1>&6
12707   ol_cv_lib_ndbm=-lndbm
12708 else
12709   echo "$ac_t""no" 1>&6
12710
12711                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12712 echo "configure:12713: checking for dbm_open in -ldbm" >&5
12713 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12714 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12715   echo $ac_n "(cached) $ac_c" 1>&6
12716 else
12717   ac_save_LIBS="$LIBS"
12718 LIBS="-ldbm  $LIBS"
12719 cat > conftest.$ac_ext <<EOF
12720 #line 12721 "configure"
12721 #include "confdefs.h"
12722 /* Override any gcc2 internal prototype to avoid an error.  */
12723 /* We use char because int might match the return type of a gcc2
12724     builtin and then its argument prototype would still apply.  */
12725 char dbm_open();
12726
12727 int main() {
12728 dbm_open()
12729 ; return 0; }
12730 EOF
12731 if { (eval echo configure:12732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12732   rm -rf conftest*
12733   eval "ac_cv_lib_$ac_lib_var=yes"
12734 else
12735   echo "configure: failed program was:" >&5
12736   cat conftest.$ac_ext >&5
12737   rm -rf conftest*
12738   eval "ac_cv_lib_$ac_lib_var=no"
12739 fi
12740 rm -f conftest*
12741 LIBS="$ac_save_LIBS"
12742
12743 fi
12744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12745   echo "$ac_t""yes" 1>&6
12746   ol_cv_lib_ndbm=-ldbm
12747 else
12748   echo "$ac_t""no" 1>&6
12749 ol_cv_lib_ndbm=no
12750 fi
12751                 
12752 fi
12753
12754         
12755 fi
12756
12757         LIBS="$ol_LIBS"
12758
12759 fi
12760
12761 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12762
12763
12764  for ac_hdr in ndbm.h
12765 do
12766 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12767 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12768 echo "configure:12769: checking for $ac_hdr" >&5
12769 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12770   echo $ac_n "(cached) $ac_c" 1>&6
12771 else
12772   cat > conftest.$ac_ext <<EOF
12773 #line 12774 "configure"
12774 #include "confdefs.h"
12775 #include <$ac_hdr>
12776 EOF
12777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12778 { (eval echo configure:12779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12780 if test -z "$ac_err"; then
12781   rm -rf conftest*
12782   eval "ac_cv_header_$ac_safe=yes"
12783 else
12784   echo "$ac_err" >&5
12785   echo "configure: failed program was:" >&5
12786   cat conftest.$ac_ext >&5
12787   rm -rf conftest*
12788   eval "ac_cv_header_$ac_safe=no"
12789 fi
12790 rm -f conftest*
12791 fi
12792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12793   echo "$ac_t""yes" 1>&6
12794     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12795   cat >> confdefs.h <<EOF
12796 #define $ac_tr_hdr 1
12797 EOF
12798  
12799 else
12800   echo "$ac_t""no" 1>&6
12801 fi
12802 done
12803
12804  echo $ac_n "checking for db""... $ac_c" 1>&6
12805 echo "configure:12806: checking for db" >&5
12806 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12807   echo $ac_n "(cached) $ac_c" 1>&6
12808 else
12809   
12810         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12811                 ol_cv_ndbm=no
12812         else
12813                 ol_cv_ndbm=yes
12814         fi
12815
12816 fi
12817
12818 echo "$ac_t""$ol_cv_ndbm" 1>&6
12819  if test $ol_cv_ndbm = yes ; then
12820         cat >> confdefs.h <<\EOF
12821 #define HAVE_NDBM 1
12822 EOF
12823
12824  fi
12825
12826
12827         if test $ol_cv_ndbm = yes ; then
12828                 ol_link_ldbm=ndbm
12829                 ol_with_ldbm_api=ndbm
12830
12831                 if test $ol_cv_lib_ndbm != yes ; then
12832                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12833                 fi
12834         fi
12835 fi
12836
12837 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12838         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12839         if test $ol_enable_ldbm = yes ; then
12840                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12841         fi
12842
12843         echo "configure: warning: disabling LDBM" 1>&2
12844         ol_enable_ldbm=no
12845 fi
12846
12847 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12848         LINK_BINS_DYNAMIC="yes"
12849 else
12850         LINK_BINS_DYNAMIC="no"
12851 fi
12852
12853 if test $ol_enable_wrappers != no ; then
12854         for ac_hdr in tcpd.h
12855 do
12856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12858 echo "configure:12859: checking for $ac_hdr" >&5
12859 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12860   echo $ac_n "(cached) $ac_c" 1>&6
12861 else
12862   cat > conftest.$ac_ext <<EOF
12863 #line 12864 "configure"
12864 #include "confdefs.h"
12865 #include <$ac_hdr>
12866 EOF
12867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12868 { (eval echo configure:12869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12870 if test -z "$ac_err"; then
12871   rm -rf conftest*
12872   eval "ac_cv_header_$ac_safe=yes"
12873 else
12874   echo "$ac_err" >&5
12875   echo "configure: failed program was:" >&5
12876   cat conftest.$ac_ext >&5
12877   rm -rf conftest*
12878   eval "ac_cv_header_$ac_safe=no"
12879 fi
12880 rm -f conftest*
12881 fi
12882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12883   echo "$ac_t""yes" 1>&6
12884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12885   cat >> confdefs.h <<EOF
12886 #define $ac_tr_hdr 1
12887 EOF
12888  
12889 else
12890   echo "$ac_t""no" 1>&6
12891 fi
12892 done
12893
12894
12895         if test $ac_cv_header_tcpd_h != yes ; then
12896                 have_wrappers=no
12897         else
12898                 cat > conftest.$ac_ext <<EOF
12899 #line 12900 "configure"
12900 #include "confdefs.h"
12901
12902 int allow_severity = 0;
12903 int deny_severity  = 0;
12904                 
12905 int main() {
12906 hosts_access()
12907 ; return 0; }
12908 EOF
12909 if { (eval echo configure:12910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12910   rm -rf conftest*
12911   have_wrappers=yes
12912 else
12913   echo "configure: failed program was:" >&5
12914   cat conftest.$ac_ext >&5
12915   rm -rf conftest*
12916   have_wrappers=no
12917 fi
12918 rm -f conftest*
12919         fi
12920
12921         if test $have_wrappers = yes ; then
12922                 cat >> confdefs.h <<\EOF
12923 #define HAVE_TCPD 1
12924 EOF
12925
12926                 WRAP_LIBS="-lwrap"
12927
12928                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12929 echo "configure:12930: checking for main in -lnsl" >&5
12930 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12931 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12932   echo $ac_n "(cached) $ac_c" 1>&6
12933 else
12934   ac_save_LIBS="$LIBS"
12935 LIBS="-lnsl  $LIBS"
12936 cat > conftest.$ac_ext <<EOF
12937 #line 12938 "configure"
12938 #include "confdefs.h"
12939
12940 int main() {
12941 main()
12942 ; return 0; }
12943 EOF
12944 if { (eval echo configure:12945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12945   rm -rf conftest*
12946   eval "ac_cv_lib_$ac_lib_var=yes"
12947 else
12948   echo "configure: failed program was:" >&5
12949   cat conftest.$ac_ext >&5
12950   rm -rf conftest*
12951   eval "ac_cv_lib_$ac_lib_var=no"
12952 fi
12953 rm -f conftest*
12954 LIBS="$ac_save_LIBS"
12955
12956 fi
12957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12958   echo "$ac_t""yes" 1>&6
12959     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12960     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12961   cat >> confdefs.h <<EOF
12962 #define $ac_tr_lib 1
12963 EOF
12964
12965   LIBS="-lnsl $LIBS"
12966
12967 else
12968   echo "$ac_t""no" 1>&6
12969 fi
12970
12971         else
12972                 echo "configure: warning: could not find -lwrap" 1>&2
12973                 if test $ol_enable_wrappers = yes ; then
12974                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12975                 fi
12976
12977                 echo "configure: warning: disabling wrappers support" 1>&2
12978                 ol_enable_wrappers=no
12979                 WRAP_LIBS=""
12980         fi
12981 fi
12982
12983 if test $ol_enable_syslog != no ; then
12984         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12985 echo "configure:12986: checking for openlog" >&5
12986 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12987   echo $ac_n "(cached) $ac_c" 1>&6
12988 else
12989   cat > conftest.$ac_ext <<EOF
12990 #line 12991 "configure"
12991 #include "confdefs.h"
12992 /* System header to define __stub macros and hopefully few prototypes,
12993     which can conflict with char openlog(); below.  */
12994 #include <assert.h>
12995 /* Override any gcc2 internal prototype to avoid an error.  */
12996 /* We use char because int might match the return type of a gcc2
12997     builtin and then its argument prototype would still apply.  */
12998 char openlog();
12999 char (*f)();
13000
13001 int main() {
13002
13003 /* The GNU C library defines this for functions which it implements
13004     to always fail with ENOSYS.  Some functions are actually named
13005     something starting with __ and the normal name is an alias.  */
13006 #if defined (__stub_openlog) || defined (__stub___openlog)
13007 choke me
13008 #else
13009 f = openlog;
13010 #endif
13011
13012 ; return 0; }
13013 EOF
13014 if { (eval echo configure:13015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13015   rm -rf conftest*
13016   eval "ac_cv_func_openlog=yes"
13017 else
13018   echo "configure: failed program was:" >&5
13019   cat conftest.$ac_ext >&5
13020   rm -rf conftest*
13021   eval "ac_cv_func_openlog=no"
13022 fi
13023 rm -f conftest*
13024 fi
13025
13026 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13027   echo "$ac_t""yes" 1>&6
13028   :
13029 else
13030   echo "$ac_t""no" 1>&6
13031 fi
13032
13033         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13034                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13035         fi
13036         ol_enable_syslog=$ac_cv_func_openlog
13037 fi
13038
13039 if test $ol_enable_dmalloc != no ; then
13040         for ac_hdr in dmalloc.h
13041 do
13042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13043 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13044 echo "configure:13045: checking for $ac_hdr" >&5
13045 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13046   echo $ac_n "(cached) $ac_c" 1>&6
13047 else
13048   cat > conftest.$ac_ext <<EOF
13049 #line 13050 "configure"
13050 #include "confdefs.h"
13051 #include <$ac_hdr>
13052 EOF
13053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13054 { (eval echo configure:13055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13056 if test -z "$ac_err"; then
13057   rm -rf conftest*
13058   eval "ac_cv_header_$ac_safe=yes"
13059 else
13060   echo "$ac_err" >&5
13061   echo "configure: failed program was:" >&5
13062   cat conftest.$ac_ext >&5
13063   rm -rf conftest*
13064   eval "ac_cv_header_$ac_safe=no"
13065 fi
13066 rm -f conftest*
13067 fi
13068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13069   echo "$ac_t""yes" 1>&6
13070     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13071   cat >> confdefs.h <<EOF
13072 #define $ac_tr_hdr 1
13073 EOF
13074  
13075 else
13076   echo "$ac_t""no" 1>&6
13077 fi
13078 done
13079
13080         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
13081 echo "configure:13082: checking for dmalloc_shutdown in -ldmalloc" >&5
13082 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
13083 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13084   echo $ac_n "(cached) $ac_c" 1>&6
13085 else
13086   ac_save_LIBS="$LIBS"
13087 LIBS="-ldmalloc  $LIBS"
13088 cat > conftest.$ac_ext <<EOF
13089 #line 13090 "configure"
13090 #include "confdefs.h"
13091 /* Override any gcc2 internal prototype to avoid an error.  */
13092 /* We use char because int might match the return type of a gcc2
13093     builtin and then its argument prototype would still apply.  */
13094 char dmalloc_shutdown();
13095
13096 int main() {
13097 dmalloc_shutdown()
13098 ; return 0; }
13099 EOF
13100 if { (eval echo configure:13101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13101   rm -rf conftest*
13102   eval "ac_cv_lib_$ac_lib_var=yes"
13103 else
13104   echo "configure: failed program was:" >&5
13105   cat conftest.$ac_ext >&5
13106   rm -rf conftest*
13107   eval "ac_cv_lib_$ac_lib_var=no"
13108 fi
13109 rm -f conftest*
13110 LIBS="$ac_save_LIBS"
13111
13112 fi
13113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13114   echo "$ac_t""yes" 1>&6
13115     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13116     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13117   cat >> confdefs.h <<EOF
13118 #define $ac_tr_lib 1
13119 EOF
13120
13121   LIBS="-ldmalloc $LIBS"
13122
13123 else
13124   echo "$ac_t""no" 1>&6
13125 fi
13126
13127 fi
13128
13129 if test $ol_enable_tcl != no ; then
13130         for ac_hdr in tcl.h
13131 do
13132 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13133 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13134 echo "configure:13135: checking for $ac_hdr" >&5
13135 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13136   echo $ac_n "(cached) $ac_c" 1>&6
13137 else
13138   cat > conftest.$ac_ext <<EOF
13139 #line 13140 "configure"
13140 #include "confdefs.h"
13141 #include <$ac_hdr>
13142 EOF
13143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13144 { (eval echo configure:13145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13146 if test -z "$ac_err"; then
13147   rm -rf conftest*
13148   eval "ac_cv_header_$ac_safe=yes"
13149 else
13150   echo "$ac_err" >&5
13151   echo "configure: failed program was:" >&5
13152   cat conftest.$ac_ext >&5
13153   rm -rf conftest*
13154   eval "ac_cv_header_$ac_safe=no"
13155 fi
13156 rm -f conftest*
13157 fi
13158 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13159   echo "$ac_t""yes" 1>&6
13160     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13161   cat >> confdefs.h <<EOF
13162 #define $ac_tr_hdr 1
13163 EOF
13164  
13165 else
13166   echo "$ac_t""no" 1>&6
13167 fi
13168 done
13169
13170
13171         if test $ac_cv_header_tcl_h != yes ; then
13172                 have_tcl=no
13173         else
13174                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13175                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13176 echo "configure:13177: checking for main in -l$lib" >&5
13177 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13178 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13179   echo $ac_n "(cached) $ac_c" 1>&6
13180 else
13181   ac_save_LIBS="$LIBS"
13182 LIBS="-l$lib  $LIBS"
13183 cat > conftest.$ac_ext <<EOF
13184 #line 13185 "configure"
13185 #include "confdefs.h"
13186
13187 int main() {
13188 main()
13189 ; return 0; }
13190 EOF
13191 if { (eval echo configure:13192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13192   rm -rf conftest*
13193   eval "ac_cv_lib_$ac_lib_var=yes"
13194 else
13195   echo "configure: failed program was:" >&5
13196   cat conftest.$ac_ext >&5
13197   rm -rf conftest*
13198   eval "ac_cv_lib_$ac_lib_var=no"
13199 fi
13200 rm -f conftest*
13201 LIBS="$ac_save_LIBS"
13202
13203 fi
13204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13205   echo "$ac_t""yes" 1>&6
13206   have_tcl=yes
13207                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13208                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13209                            else
13210                                MOD_TCL_LIB="-l${lib}"
13211                            fi;break
13212 else
13213   echo "$ac_t""no" 1>&6
13214 have_tcl=no
13215 fi
13216
13217                 done
13218         fi
13219
13220         if test $have_tcl != yes ; then
13221                 echo "configure: warning: could not find -ltcl" 1>&2
13222                 if test $ol_enable_tcl = yes ; then
13223                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13224                 fi
13225
13226                 ol_enable_tcl=no
13227         fi
13228 fi
13229
13230 ol_link_termcap=no
13231 for ac_hdr in termcap.h ncurses.h
13232 do
13233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13235 echo "configure:13236: checking for $ac_hdr" >&5
13236 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13237   echo $ac_n "(cached) $ac_c" 1>&6
13238 else
13239   cat > conftest.$ac_ext <<EOF
13240 #line 13241 "configure"
13241 #include "confdefs.h"
13242 #include <$ac_hdr>
13243 EOF
13244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13245 { (eval echo configure:13246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13247 if test -z "$ac_err"; then
13248   rm -rf conftest*
13249   eval "ac_cv_header_$ac_safe=yes"
13250 else
13251   echo "$ac_err" >&5
13252   echo "configure: failed program was:" >&5
13253   cat conftest.$ac_ext >&5
13254   rm -rf conftest*
13255   eval "ac_cv_header_$ac_safe=no"
13256 fi
13257 rm -f conftest*
13258 fi
13259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13260   echo "$ac_t""yes" 1>&6
13261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13262   cat >> confdefs.h <<EOF
13263 #define $ac_tr_hdr 1
13264 EOF
13265  
13266 else
13267   echo "$ac_t""no" 1>&6
13268 fi
13269 done
13270
13271
13272 if test $ol_link_termcap = no ; then
13273         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13274 echo "configure:13275: checking for tputs in -ltermcap" >&5
13275 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13277   echo $ac_n "(cached) $ac_c" 1>&6
13278 else
13279   ac_save_LIBS="$LIBS"
13280 LIBS="-ltermcap  $LIBS"
13281 cat > conftest.$ac_ext <<EOF
13282 #line 13283 "configure"
13283 #include "confdefs.h"
13284 /* Override any gcc2 internal prototype to avoid an error.  */
13285 /* We use char because int might match the return type of a gcc2
13286     builtin and then its argument prototype would still apply.  */
13287 char tputs();
13288
13289 int main() {
13290 tputs()
13291 ; return 0; }
13292 EOF
13293 if { (eval echo configure:13294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13294   rm -rf conftest*
13295   eval "ac_cv_lib_$ac_lib_var=yes"
13296 else
13297   echo "configure: failed program was:" >&5
13298   cat conftest.$ac_ext >&5
13299   rm -rf conftest*
13300   eval "ac_cv_lib_$ac_lib_var=no"
13301 fi
13302 rm -f conftest*
13303 LIBS="$ac_save_LIBS"
13304
13305 fi
13306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13307   echo "$ac_t""yes" 1>&6
13308   have_termcap=yes
13309 else
13310   echo "$ac_t""no" 1>&6
13311 have_termcap=no
13312 fi
13313
13314         if test $have_termcap = yes ; then
13315                 cat >> confdefs.h <<\EOF
13316 #define HAVE_TERMCAP 1
13317 EOF
13318
13319                 ol_link_termcap=yes
13320                 TERMCAP_LIBS=-ltermcap
13321         fi
13322 fi
13323
13324 if test $ol_link_termcap = no ; then
13325         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13326 echo "configure:13327: checking for initscr in -lncurses" >&5
13327 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13328 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13329   echo $ac_n "(cached) $ac_c" 1>&6
13330 else
13331   ac_save_LIBS="$LIBS"
13332 LIBS="-lncurses  $LIBS"
13333 cat > conftest.$ac_ext <<EOF
13334 #line 13335 "configure"
13335 #include "confdefs.h"
13336 /* Override any gcc2 internal prototype to avoid an error.  */
13337 /* We use char because int might match the return type of a gcc2
13338     builtin and then its argument prototype would still apply.  */
13339 char initscr();
13340
13341 int main() {
13342 initscr()
13343 ; return 0; }
13344 EOF
13345 if { (eval echo configure:13346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13346   rm -rf conftest*
13347   eval "ac_cv_lib_$ac_lib_var=yes"
13348 else
13349   echo "configure: failed program was:" >&5
13350   cat conftest.$ac_ext >&5
13351   rm -rf conftest*
13352   eval "ac_cv_lib_$ac_lib_var=no"
13353 fi
13354 rm -f conftest*
13355 LIBS="$ac_save_LIBS"
13356
13357 fi
13358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13359   echo "$ac_t""yes" 1>&6
13360   have_ncurses=yes
13361 else
13362   echo "$ac_t""no" 1>&6
13363 have_ncurses=no
13364 fi
13365
13366         if test $have_ncurses = yes ; then
13367                 cat >> confdefs.h <<\EOF
13368 #define HAVE_NCURSES 1
13369 EOF
13370
13371                 ol_link_termcap=yes
13372                 TERMCAP_LIBS=-lncurses
13373         fi
13374 fi
13375
13376 if test $ol_link_termcap = no ; then
13377         cat >> confdefs.h <<\EOF
13378 #define NO_TERMCAP 1
13379 EOF
13380
13381         TERMCAP_LIBS=
13382 fi
13383
13384 ol_link_sasl=no
13385 ol_link_spasswd=no
13386 if test $ol_with_cyrus_sasl != no ; then
13387         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13388 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13389 echo "configure:13390: checking for sasl.h" >&5
13390 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13391   echo $ac_n "(cached) $ac_c" 1>&6
13392 else
13393   cat > conftest.$ac_ext <<EOF
13394 #line 13395 "configure"
13395 #include "confdefs.h"
13396 #include <sasl.h>
13397 EOF
13398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13399 { (eval echo configure:13400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13401 if test -z "$ac_err"; then
13402   rm -rf conftest*
13403   eval "ac_cv_header_$ac_safe=yes"
13404 else
13405   echo "$ac_err" >&5
13406   echo "configure: failed program was:" >&5
13407   cat conftest.$ac_ext >&5
13408   rm -rf conftest*
13409   eval "ac_cv_header_$ac_safe=no"
13410 fi
13411 rm -f conftest*
13412 fi
13413 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13414   echo "$ac_t""yes" 1>&6
13415   :
13416 else
13417   echo "$ac_t""no" 1>&6
13418 fi
13419
13420
13421         if test $ac_cv_header_sasl_h = yes ; then
13422                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13423 echo "configure:13424: checking for sasl_client_init in -lsasl" >&5
13424 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13425 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13426   echo $ac_n "(cached) $ac_c" 1>&6
13427 else
13428   ac_save_LIBS="$LIBS"
13429 LIBS="-lsasl  $LIBS"
13430 cat > conftest.$ac_ext <<EOF
13431 #line 13432 "configure"
13432 #include "confdefs.h"
13433 /* Override any gcc2 internal prototype to avoid an error.  */
13434 /* We use char because int might match the return type of a gcc2
13435     builtin and then its argument prototype would still apply.  */
13436 char sasl_client_init();
13437
13438 int main() {
13439 sasl_client_init()
13440 ; return 0; }
13441 EOF
13442 if { (eval echo configure:13443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13443   rm -rf conftest*
13444   eval "ac_cv_lib_$ac_lib_var=yes"
13445 else
13446   echo "configure: failed program was:" >&5
13447   cat conftest.$ac_ext >&5
13448   rm -rf conftest*
13449   eval "ac_cv_lib_$ac_lib_var=no"
13450 fi
13451 rm -f conftest*
13452 LIBS="$ac_save_LIBS"
13453
13454 fi
13455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13456   echo "$ac_t""yes" 1>&6
13457   have_cyrus_sasl=yes
13458 else
13459   echo "$ac_t""no" 1>&6
13460 have_cyrus_sasl=no
13461 fi
13462
13463
13464                 if test $have_cyrus_sasl != no ; then
13465                         SASL_LIBS="-lsasl"
13466                         cat >> confdefs.h <<\EOF
13467 #define HAVE_CYRUS_SASL 1
13468 EOF
13469
13470                         ol_link_sasl=yes
13471                 fi
13472         fi
13473
13474         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13475                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13476         fi
13477 fi
13478
13479 if test $cross_compiling != yes ; then
13480         dev=no
13481         if test -r /dev/urandom ; then
13482                 dev="/dev/urandom";
13483         elif test -r /idev/urandom ; then
13484                 dev="/idev/urandom";
13485         elif test -r /dev/srandom ; then
13486                 dev="/dev/srandom";
13487         elif test -r /dev/random ; then
13488                 dev="/dev/random";
13489         elif test -r /idev/random ; then
13490                 dev="/idev/random";
13491         fi
13492
13493         if test $dev != no ; then
13494                 cat >> confdefs.h <<EOF
13495 #define URANDOM_DEVICE "$dev"
13496 EOF
13497
13498         fi
13499 fi
13500
13501 ol_link_fetch=no
13502 if test $ol_with_fetch != no ; then
13503         ol=$LIBS
13504 LIBS="-lfetch -lcom_err $LIBS"
13505 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13506 echo "configure:13507: checking fetch(3) library" >&5
13507 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13508   echo $ac_n "(cached) $ac_c" 1>&6
13509 else
13510   
13511         cat > conftest.$ac_ext <<EOF
13512 #line 13513 "configure"
13513 #include "confdefs.h"
13514
13515 #include <sys/param.h>
13516 #include <stdio.h>
13517 #include <fetch.h>
13518 int main() {
13519 struct url *u = fetchParseURL("file:///"); 
13520 ; return 0; }
13521 EOF
13522 if { (eval echo configure:13523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13523   rm -rf conftest*
13524   ol_cv_lib_fetch=yes
13525 else
13526   echo "configure: failed program was:" >&5
13527   cat conftest.$ac_ext >&5
13528   rm -rf conftest*
13529   ol_cv_lib_fetch=no
13530 fi
13531 rm -f conftest*
13532 fi
13533
13534 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13535 LIBS=$ol_LIBS
13536 if test $ol_cv_lib_fetch != no ; then
13537         ol_link_fetch="-lfetch -lcom_err"
13538         cat >> confdefs.h <<\EOF
13539 #define HAVE_FETCH 1
13540 EOF
13541
13542 fi
13543
13544
13545         if test $ol_cv_lib_fetch != no ; then
13546                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13547                 ol_link_fetch=freebsd
13548
13549         elif test $ol_with_fetch != auto ; then
13550                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13551         fi 
13552 fi
13553
13554 ol_link_readline=no
13555 if test $ol_with_readline != no ; then
13556         for ac_hdr in readline/readline.h readline/history.h
13557 do
13558 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13559 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13560 echo "configure:13561: checking for $ac_hdr" >&5
13561 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13562   echo $ac_n "(cached) $ac_c" 1>&6
13563 else
13564   cat > conftest.$ac_ext <<EOF
13565 #line 13566 "configure"
13566 #include "confdefs.h"
13567 #include <$ac_hdr>
13568 EOF
13569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13570 { (eval echo configure:13571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13572 if test -z "$ac_err"; then
13573   rm -rf conftest*
13574   eval "ac_cv_header_$ac_safe=yes"
13575 else
13576   echo "$ac_err" >&5
13577   echo "configure: failed program was:" >&5
13578   cat conftest.$ac_ext >&5
13579   rm -rf conftest*
13580   eval "ac_cv_header_$ac_safe=no"
13581 fi
13582 rm -f conftest*
13583 fi
13584 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13585   echo "$ac_t""yes" 1>&6
13586     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13587   cat >> confdefs.h <<EOF
13588 #define $ac_tr_hdr 1
13589 EOF
13590  
13591 else
13592   echo "$ac_t""no" 1>&6
13593 fi
13594 done
13595
13596
13597         if test $ac_cv_header_readline_readline_h = yes ; then
13598                 save_LIBS="$LIBS"
13599                 LIBS="$TERMCAP_LIBS $LIBS"
13600                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13601 echo "configure:13602: checking for readline in -lreadline" >&5
13602 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13603 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13604   echo $ac_n "(cached) $ac_c" 1>&6
13605 else
13606   ac_save_LIBS="$LIBS"
13607 LIBS="-lreadline  $LIBS"
13608 cat > conftest.$ac_ext <<EOF
13609 #line 13610 "configure"
13610 #include "confdefs.h"
13611 /* Override any gcc2 internal prototype to avoid an error.  */
13612 /* We use char because int might match the return type of a gcc2
13613     builtin and then its argument prototype would still apply.  */
13614 char readline();
13615
13616 int main() {
13617 readline()
13618 ; return 0; }
13619 EOF
13620 if { (eval echo configure:13621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13621   rm -rf conftest*
13622   eval "ac_cv_lib_$ac_lib_var=yes"
13623 else
13624   echo "configure: failed program was:" >&5
13625   cat conftest.$ac_ext >&5
13626   rm -rf conftest*
13627   eval "ac_cv_lib_$ac_lib_var=no"
13628 fi
13629 rm -f conftest*
13630 LIBS="$ac_save_LIBS"
13631
13632 fi
13633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13634   echo "$ac_t""yes" 1>&6
13635   have_readline=yes
13636 else
13637   echo "$ac_t""no" 1>&6
13638 have_readline=no
13639 fi
13640
13641                 LIBS="$save_LIBS"
13642                         
13643                 if test $have_readline = yes ; then
13644                         ol_with_readline=found
13645                         ol_link_readline=yes
13646
13647                         READLINE_LIBS="-lreadline"
13648                 fi
13649         fi
13650 fi
13651
13652 if test $ol_link_readline = yes ; then
13653         cat >> confdefs.h <<\EOF
13654 #define HAVE_READLINE 1
13655 EOF
13656
13657 fi
13658
13659
13660 if test $ol_enable_crypt != no ; then
13661         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13662 echo "configure:13663: checking for crypt" >&5
13663 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13664   echo $ac_n "(cached) $ac_c" 1>&6
13665 else
13666   cat > conftest.$ac_ext <<EOF
13667 #line 13668 "configure"
13668 #include "confdefs.h"
13669 /* System header to define __stub macros and hopefully few prototypes,
13670     which can conflict with char crypt(); below.  */
13671 #include <assert.h>
13672 /* Override any gcc2 internal prototype to avoid an error.  */
13673 /* We use char because int might match the return type of a gcc2
13674     builtin and then its argument prototype would still apply.  */
13675 char crypt();
13676 char (*f)();
13677
13678 int main() {
13679
13680 /* The GNU C library defines this for functions which it implements
13681     to always fail with ENOSYS.  Some functions are actually named
13682     something starting with __ and the normal name is an alias.  */
13683 #if defined (__stub_crypt) || defined (__stub___crypt)
13684 choke me
13685 #else
13686 f = crypt;
13687 #endif
13688
13689 ; return 0; }
13690 EOF
13691 if { (eval echo configure:13692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13692   rm -rf conftest*
13693   eval "ac_cv_func_crypt=yes"
13694 else
13695   echo "configure: failed program was:" >&5
13696   cat conftest.$ac_ext >&5
13697   rm -rf conftest*
13698   eval "ac_cv_func_crypt=no"
13699 fi
13700 rm -f conftest*
13701 fi
13702
13703 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13704   echo "$ac_t""yes" 1>&6
13705   have_crypt=yes
13706 else
13707   echo "$ac_t""no" 1>&6
13708
13709                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13710 echo "configure:13711: checking for crypt in -lcrypt" >&5
13711 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13712 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13713   echo $ac_n "(cached) $ac_c" 1>&6
13714 else
13715   ac_save_LIBS="$LIBS"
13716 LIBS="-lcrypt  $LIBS"
13717 cat > conftest.$ac_ext <<EOF
13718 #line 13719 "configure"
13719 #include "confdefs.h"
13720 /* Override any gcc2 internal prototype to avoid an error.  */
13721 /* We use char because int might match the return type of a gcc2
13722     builtin and then its argument prototype would still apply.  */
13723 char crypt();
13724
13725 int main() {
13726 crypt()
13727 ; return 0; }
13728 EOF
13729 if { (eval echo configure:13730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13730   rm -rf conftest*
13731   eval "ac_cv_lib_$ac_lib_var=yes"
13732 else
13733   echo "configure: failed program was:" >&5
13734   cat conftest.$ac_ext >&5
13735   rm -rf conftest*
13736   eval "ac_cv_lib_$ac_lib_var=no"
13737 fi
13738 rm -f conftest*
13739 LIBS="$ac_save_LIBS"
13740
13741 fi
13742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13743   echo "$ac_t""yes" 1>&6
13744   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13745                         have_crypt=yes
13746 else
13747   echo "$ac_t""no" 1>&6
13748 have_crypt=no
13749 fi
13750
13751 fi
13752
13753
13754         if test $have_crypt = yes ; then
13755                 cat >> confdefs.h <<\EOF
13756 #define HAVE_CRYPT 1
13757 EOF
13758
13759         else
13760                 echo "configure: warning: could not find crypt" 1>&2
13761                 if test $ol_enable_crypt = yes ; then
13762                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13763                 fi
13764
13765                 echo "configure: warning: disabling crypt support" 1>&2
13766                 ol_enable_crypt=no
13767         fi
13768 fi
13769
13770 if test $ol_enable_proctitle != no ; then
13771         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13772 echo "configure:13773: checking for setproctitle" >&5
13773 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13774   echo $ac_n "(cached) $ac_c" 1>&6
13775 else
13776   cat > conftest.$ac_ext <<EOF
13777 #line 13778 "configure"
13778 #include "confdefs.h"
13779 /* System header to define __stub macros and hopefully few prototypes,
13780     which can conflict with char setproctitle(); below.  */
13781 #include <assert.h>
13782 /* Override any gcc2 internal prototype to avoid an error.  */
13783 /* We use char because int might match the return type of a gcc2
13784     builtin and then its argument prototype would still apply.  */
13785 char setproctitle();
13786 char (*f)();
13787
13788 int main() {
13789
13790 /* The GNU C library defines this for functions which it implements
13791     to always fail with ENOSYS.  Some functions are actually named
13792     something starting with __ and the normal name is an alias.  */
13793 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13794 choke me
13795 #else
13796 f = setproctitle;
13797 #endif
13798
13799 ; return 0; }
13800 EOF
13801 if { (eval echo configure:13802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13802   rm -rf conftest*
13803   eval "ac_cv_func_setproctitle=yes"
13804 else
13805   echo "configure: failed program was:" >&5
13806   cat conftest.$ac_ext >&5
13807   rm -rf conftest*
13808   eval "ac_cv_func_setproctitle=no"
13809 fi
13810 rm -f conftest*
13811 fi
13812
13813 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13814   echo "$ac_t""yes" 1>&6
13815   have_setproctitle=yes
13816 else
13817   echo "$ac_t""no" 1>&6
13818
13819                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13820 echo "configure:13821: checking for setproctitle in -lutil" >&5
13821 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13822 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13823   echo $ac_n "(cached) $ac_c" 1>&6
13824 else
13825   ac_save_LIBS="$LIBS"
13826 LIBS="-lutil  $LIBS"
13827 cat > conftest.$ac_ext <<EOF
13828 #line 13829 "configure"
13829 #include "confdefs.h"
13830 /* Override any gcc2 internal prototype to avoid an error.  */
13831 /* We use char because int might match the return type of a gcc2
13832     builtin and then its argument prototype would still apply.  */
13833 char setproctitle();
13834
13835 int main() {
13836 setproctitle()
13837 ; return 0; }
13838 EOF
13839 if { (eval echo configure:13840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13840   rm -rf conftest*
13841   eval "ac_cv_lib_$ac_lib_var=yes"
13842 else
13843   echo "configure: failed program was:" >&5
13844   cat conftest.$ac_ext >&5
13845   rm -rf conftest*
13846   eval "ac_cv_lib_$ac_lib_var=no"
13847 fi
13848 rm -f conftest*
13849 LIBS="$ac_save_LIBS"
13850
13851 fi
13852 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13853   echo "$ac_t""yes" 1>&6
13854   have_setproctitle=yes
13855                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13856 else
13857   echo "$ac_t""no" 1>&6
13858 have_setproctitle=no
13859                         LIBOBJS="$LIBOBJS setproctitle.o"
13860                         LIBSRCS="$LIBSRCS setproctitle.c"
13861 fi
13862
13863 fi
13864
13865
13866         if test $have_setproctitle = yes ; then
13867                 cat >> confdefs.h <<\EOF
13868 #define HAVE_SETPROCTITLE 1
13869 EOF
13870
13871         fi
13872 fi
13873
13874 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13875 echo "configure:13876: checking for ANSI C header files" >&5
13876 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13877   echo $ac_n "(cached) $ac_c" 1>&6
13878 else
13879   cat > conftest.$ac_ext <<EOF
13880 #line 13881 "configure"
13881 #include "confdefs.h"
13882 #include <stdlib.h>
13883 #include <stdarg.h>
13884 #include <string.h>
13885 #include <float.h>
13886 EOF
13887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13888 { (eval echo configure:13889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13890 if test -z "$ac_err"; then
13891   rm -rf conftest*
13892   ac_cv_header_stdc=yes
13893 else
13894   echo "$ac_err" >&5
13895   echo "configure: failed program was:" >&5
13896   cat conftest.$ac_ext >&5
13897   rm -rf conftest*
13898   ac_cv_header_stdc=no
13899 fi
13900 rm -f conftest*
13901
13902 if test $ac_cv_header_stdc = yes; then
13903   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13904 cat > conftest.$ac_ext <<EOF
13905 #line 13906 "configure"
13906 #include "confdefs.h"
13907 #include <string.h>
13908 EOF
13909 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13910   egrep "memchr" >/dev/null 2>&1; then
13911   :
13912 else
13913   rm -rf conftest*
13914   ac_cv_header_stdc=no
13915 fi
13916 rm -f conftest*
13917
13918 fi
13919
13920 if test $ac_cv_header_stdc = yes; then
13921   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13922 cat > conftest.$ac_ext <<EOF
13923 #line 13924 "configure"
13924 #include "confdefs.h"
13925 #include <stdlib.h>
13926 EOF
13927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13928   egrep "free" >/dev/null 2>&1; then
13929   :
13930 else
13931   rm -rf conftest*
13932   ac_cv_header_stdc=no
13933 fi
13934 rm -f conftest*
13935
13936 fi
13937
13938 if test $ac_cv_header_stdc = yes; then
13939   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13940 if test "$cross_compiling" = yes; then
13941   :
13942 else
13943   cat > conftest.$ac_ext <<EOF
13944 #line 13945 "configure"
13945 #include "confdefs.h"
13946 #include <ctype.h>
13947 #if ((' ' & 0x0FF) == 0x020)
13948 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13949 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13950 #else
13951 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13952  || ('j' <= (c) && (c) <= 'r') \
13953  || ('s' <= (c) && (c) <= 'z'))
13954 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13955 #endif
13956 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13957 int main () { int i; for (i = 0; i < 256; i++)
13958 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13959 exit (0); }
13960
13961 EOF
13962 if { (eval echo configure:13963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13963 then
13964   :
13965 else
13966   echo "configure: failed program was:" >&5
13967   cat conftest.$ac_ext >&5
13968   rm -fr conftest*
13969   ac_cv_header_stdc=no
13970 fi
13971 rm -fr conftest*
13972 fi
13973
13974 fi
13975 fi
13976
13977 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13978 if test $ac_cv_header_stdc = yes; then
13979   cat >> confdefs.h <<\EOF
13980 #define STDC_HEADERS 1
13981 EOF
13982
13983 fi
13984
13985 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13986 echo "configure:13987: checking for mode_t" >&5
13987 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13988   echo $ac_n "(cached) $ac_c" 1>&6
13989 else
13990   cat > conftest.$ac_ext <<EOF
13991 #line 13992 "configure"
13992 #include "confdefs.h"
13993 #include <sys/types.h>
13994 #if STDC_HEADERS
13995 #include <stdlib.h>
13996 #include <stddef.h>
13997 #endif
13998
13999 EOF
14000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14001   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14002   rm -rf conftest*
14003   eval "ac_cv_type_mode_t=yes"
14004 else
14005   rm -rf conftest*
14006   eval "ac_cv_type_mode_t=no"
14007 fi
14008 rm -f conftest*
14009
14010 fi
14011 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14012   echo "$ac_t""yes" 1>&6
14013 else
14014   echo "$ac_t""no" 1>&6
14015   cat >> confdefs.h <<EOF
14016 #define mode_t int
14017 EOF
14018
14019 fi
14020
14021 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14022 echo "configure:14023: checking for off_t" >&5
14023 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14024   echo $ac_n "(cached) $ac_c" 1>&6
14025 else
14026   cat > conftest.$ac_ext <<EOF
14027 #line 14028 "configure"
14028 #include "confdefs.h"
14029 #include <sys/types.h>
14030 #if STDC_HEADERS
14031 #include <stdlib.h>
14032 #include <stddef.h>
14033 #endif
14034
14035 EOF
14036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14037   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14038   rm -rf conftest*
14039   eval "ac_cv_type_off_t=yes"
14040 else
14041   rm -rf conftest*
14042   eval "ac_cv_type_off_t=no"
14043 fi
14044 rm -f conftest*
14045
14046 fi
14047 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14048   echo "$ac_t""yes" 1>&6
14049 else
14050   echo "$ac_t""no" 1>&6
14051   cat >> confdefs.h <<EOF
14052 #define off_t long
14053 EOF
14054
14055 fi
14056
14057 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14058 echo "configure:14059: checking for pid_t" >&5
14059 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14060   echo $ac_n "(cached) $ac_c" 1>&6
14061 else
14062   cat > conftest.$ac_ext <<EOF
14063 #line 14064 "configure"
14064 #include "confdefs.h"
14065 #include <sys/types.h>
14066 #if STDC_HEADERS
14067 #include <stdlib.h>
14068 #include <stddef.h>
14069 #endif
14070
14071 EOF
14072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14073   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14074   rm -rf conftest*
14075   eval "ac_cv_type_pid_t=yes"
14076 else
14077   rm -rf conftest*
14078   eval "ac_cv_type_pid_t=no"
14079 fi
14080 rm -f conftest*
14081
14082 fi
14083 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14084   echo "$ac_t""yes" 1>&6
14085 else
14086   echo "$ac_t""no" 1>&6
14087   cat >> confdefs.h <<EOF
14088 #define pid_t int
14089 EOF
14090
14091 fi
14092
14093 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14094 echo "configure:14095: checking for ptrdiff_t" >&5
14095 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14096   echo $ac_n "(cached) $ac_c" 1>&6
14097 else
14098   cat > conftest.$ac_ext <<EOF
14099 #line 14100 "configure"
14100 #include "confdefs.h"
14101 #include <stddef.h>
14102 int main() {
14103 ptrdiff_t p
14104 ; return 0; }
14105 EOF
14106 if { (eval echo configure:14107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14107   rm -rf conftest*
14108   am_cv_type_ptrdiff_t=yes
14109 else
14110   echo "configure: failed program was:" >&5
14111   cat conftest.$ac_ext >&5
14112   rm -rf conftest*
14113   am_cv_type_ptrdiff_t=no
14114 fi
14115 rm -f conftest*
14116 fi
14117
14118 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14119    if test $am_cv_type_ptrdiff_t = yes; then
14120      cat >> confdefs.h <<\EOF
14121 #define HAVE_PTRDIFF_T 1
14122 EOF
14123
14124    fi
14125
14126 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14127 echo "configure:14128: checking return type of signal handlers" >&5
14128 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14129   echo $ac_n "(cached) $ac_c" 1>&6
14130 else
14131   cat > conftest.$ac_ext <<EOF
14132 #line 14133 "configure"
14133 #include "confdefs.h"
14134 #include <sys/types.h>
14135 #include <signal.h>
14136 #ifdef signal
14137 #undef signal
14138 #endif
14139 #ifdef __cplusplus
14140 extern "C" void (*signal (int, void (*)(int)))(int);
14141 #else
14142 void (*signal ()) ();
14143 #endif
14144
14145 int main() {
14146 int i;
14147 ; return 0; }
14148 EOF
14149 if { (eval echo configure:14150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14150   rm -rf conftest*
14151   ac_cv_type_signal=void
14152 else
14153   echo "configure: failed program was:" >&5
14154   cat conftest.$ac_ext >&5
14155   rm -rf conftest*
14156   ac_cv_type_signal=int
14157 fi
14158 rm -f conftest*
14159 fi
14160
14161 echo "$ac_t""$ac_cv_type_signal" 1>&6
14162 cat >> confdefs.h <<EOF
14163 #define RETSIGTYPE $ac_cv_type_signal
14164 EOF
14165
14166
14167 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14168 echo "configure:14169: checking for size_t" >&5
14169 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14170   echo $ac_n "(cached) $ac_c" 1>&6
14171 else
14172   cat > conftest.$ac_ext <<EOF
14173 #line 14174 "configure"
14174 #include "confdefs.h"
14175 #include <sys/types.h>
14176 #if STDC_HEADERS
14177 #include <stdlib.h>
14178 #include <stddef.h>
14179 #endif
14180
14181 EOF
14182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14183   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14184   rm -rf conftest*
14185   eval "ac_cv_type_size_t=yes"
14186 else
14187   rm -rf conftest*
14188   eval "ac_cv_type_size_t=no"
14189 fi
14190 rm -f conftest*
14191
14192 fi
14193 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14194   echo "$ac_t""yes" 1>&6
14195 else
14196   echo "$ac_t""no" 1>&6
14197   cat >> confdefs.h <<EOF
14198 #define size_t unsigned
14199 EOF
14200
14201 fi
14202
14203
14204 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14205 echo "configure:14206: checking for ssize_t" >&5
14206 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14207   echo $ac_n "(cached) $ac_c" 1>&6
14208 else
14209   cat > conftest.$ac_ext <<EOF
14210 #line 14211 "configure"
14211 #include "confdefs.h"
14212 #include <sys/types.h>
14213 #if STDC_HEADERS
14214 #include <stdlib.h>
14215 #include <stddef.h>
14216 #endif
14217
14218 EOF
14219 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14220   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14221   rm -rf conftest*
14222   eval "ac_cv_type_ssize_t=yes"
14223 else
14224   rm -rf conftest*
14225   eval "ac_cv_type_ssize_t=no"
14226 fi
14227 rm -f conftest*
14228
14229 fi
14230 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14231   echo "$ac_t""yes" 1>&6
14232 else
14233   echo "$ac_t""no" 1>&6
14234   cat >> confdefs.h <<EOF
14235 #define ssize_t signed int
14236 EOF
14237
14238 fi
14239
14240 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14241 echo "configure:14242: checking for caddr_t" >&5
14242 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14243   echo $ac_n "(cached) $ac_c" 1>&6
14244 else
14245   cat > conftest.$ac_ext <<EOF
14246 #line 14247 "configure"
14247 #include "confdefs.h"
14248 #include <sys/types.h>
14249 #if STDC_HEADERS
14250 #include <stdlib.h>
14251 #include <stddef.h>
14252 #endif
14253
14254 EOF
14255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14256   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14257   rm -rf conftest*
14258   eval "ac_cv_type_caddr_t=yes"
14259 else
14260   rm -rf conftest*
14261   eval "ac_cv_type_caddr_t=no"
14262 fi
14263 rm -f conftest*
14264
14265 fi
14266 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14267   echo "$ac_t""yes" 1>&6
14268 else
14269   echo "$ac_t""no" 1>&6
14270   cat >> confdefs.h <<EOF
14271 #define caddr_t char *
14272 EOF
14273
14274 fi
14275
14276
14277 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14278 echo "configure:14279: checking for socklen_t" >&5
14279 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14280   echo $ac_n "(cached) $ac_c" 1>&6
14281 else
14282   cat > conftest.$ac_ext <<EOF
14283 #line 14284 "configure"
14284 #include "confdefs.h"
14285
14286 #ifdef HAVE_SYS_TYPES_H
14287 #include <sys/types.h>
14288 #endif
14289 #ifdef HAVE_SYS_SOCKET_H
14290 #include <sys/socket.h>
14291 #endif
14292
14293 int main() {
14294 socklen_t len;
14295 ; return 0; }
14296 EOF
14297 if { (eval echo configure:14298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14298   rm -rf conftest*
14299   ol_cv_type_socklen_t=yes
14300 else
14301   echo "configure: failed program was:" >&5
14302   cat conftest.$ac_ext >&5
14303   rm -rf conftest*
14304   ol_cv_type_socklen_t=no
14305 fi
14306 rm -f conftest*
14307 fi
14308
14309 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14310   if test $ol_cv_type_socklen_t = no; then
14311     cat >> confdefs.h <<\EOF
14312 #define socklen_t int
14313 EOF
14314
14315   fi
14316  
14317 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14318 echo "configure:14319: checking for member st_blksize in aggregate type struct stat" >&5
14319 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14320   echo $ac_n "(cached) $ac_c" 1>&6
14321 else
14322   cat > conftest.$ac_ext <<EOF
14323 #line 14324 "configure"
14324 #include "confdefs.h"
14325 #include <sys/types.h>
14326 #include <sys/stat.h>
14327 int main() {
14328 struct stat foo; foo.st_blksize;
14329 ; return 0; }
14330 EOF
14331 if { (eval echo configure:14332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14332   rm -rf conftest*
14333   ac_cv_c_struct_member_st_blksize=yes
14334 else
14335   echo "configure: failed program was:" >&5
14336   cat conftest.$ac_ext >&5
14337   rm -rf conftest*
14338   ac_cv_c_struct_member_st_blksize=no
14339 fi
14340 rm -f conftest*
14341 fi
14342
14343 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14344 st_blksize="$ac_cv_c_struct_member_st_blksize"
14345 if test $ac_cv_c_struct_member_st_blksize = yes; then
14346   cat >> confdefs.h <<\EOF
14347 #define HAVE_ST_BLKSIZE 1
14348 EOF
14349
14350 fi
14351
14352 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14353 echo "configure:14354: checking whether time.h and sys/time.h may both be included" >&5
14354 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14355   echo $ac_n "(cached) $ac_c" 1>&6
14356 else
14357   cat > conftest.$ac_ext <<EOF
14358 #line 14359 "configure"
14359 #include "confdefs.h"
14360 #include <sys/types.h>
14361 #include <sys/time.h>
14362 #include <time.h>
14363 int main() {
14364 struct tm *tp;
14365 ; return 0; }
14366 EOF
14367 if { (eval echo configure:14368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14368   rm -rf conftest*
14369   ac_cv_header_time=yes
14370 else
14371   echo "configure: failed program was:" >&5
14372   cat conftest.$ac_ext >&5
14373   rm -rf conftest*
14374   ac_cv_header_time=no
14375 fi
14376 rm -f conftest*
14377 fi
14378
14379 echo "$ac_t""$ac_cv_header_time" 1>&6
14380 if test $ac_cv_header_time = yes; then
14381   cat >> confdefs.h <<\EOF
14382 #define TIME_WITH_SYS_TIME 1
14383 EOF
14384
14385 fi
14386
14387 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14388 echo "configure:14389: checking whether struct tm is in sys/time.h or time.h" >&5
14389 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14390   echo $ac_n "(cached) $ac_c" 1>&6
14391 else
14392   cat > conftest.$ac_ext <<EOF
14393 #line 14394 "configure"
14394 #include "confdefs.h"
14395 #include <sys/types.h>
14396 #include <time.h>
14397 int main() {
14398 struct tm *tp; tp->tm_sec;
14399 ; return 0; }
14400 EOF
14401 if { (eval echo configure:14402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14402   rm -rf conftest*
14403   ac_cv_struct_tm=time.h
14404 else
14405   echo "configure: failed program was:" >&5
14406   cat conftest.$ac_ext >&5
14407   rm -rf conftest*
14408   ac_cv_struct_tm=sys/time.h
14409 fi
14410 rm -f conftest*
14411 fi
14412
14413 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14414 if test $ac_cv_struct_tm = sys/time.h; then
14415   cat >> confdefs.h <<\EOF
14416 #define TM_IN_SYS_TIME 1
14417 EOF
14418
14419 fi
14420
14421 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14422 echo "configure:14423: checking for uid_t in sys/types.h" >&5
14423 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14424   echo $ac_n "(cached) $ac_c" 1>&6
14425 else
14426   cat > conftest.$ac_ext <<EOF
14427 #line 14428 "configure"
14428 #include "confdefs.h"
14429 #include <sys/types.h>
14430 EOF
14431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14432   egrep "uid_t" >/dev/null 2>&1; then
14433   rm -rf conftest*
14434   ac_cv_type_uid_t=yes
14435 else
14436   rm -rf conftest*
14437   ac_cv_type_uid_t=no
14438 fi
14439 rm -f conftest*
14440
14441 fi
14442
14443 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14444 if test $ac_cv_type_uid_t = no; then
14445   cat >> confdefs.h <<\EOF
14446 #define uid_t int
14447 EOF
14448
14449   cat >> confdefs.h <<\EOF
14450 #define gid_t int
14451 EOF
14452
14453 fi
14454
14455 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14456 echo "configure:14457: checking for sig_atomic_t" >&5
14457 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14458   echo $ac_n "(cached) $ac_c" 1>&6
14459 else
14460   cat > conftest.$ac_ext <<EOF
14461 #line 14462 "configure"
14462 #include "confdefs.h"
14463 #include <signal.h>
14464 int main() {
14465 sig_atomic_t atomic;
14466 ; return 0; }
14467 EOF
14468 if { (eval echo configure:14469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14469   rm -rf conftest*
14470   ol_cv_type_sig_atomic_t=yes
14471 else
14472   echo "configure: failed program was:" >&5
14473   cat conftest.$ac_ext >&5
14474   rm -rf conftest*
14475   ol_cv_type_sig_atomic_t=no
14476 fi
14477 rm -f conftest*
14478 fi
14479
14480 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14481   if test $ol_cv_type_sig_atomic_t = no; then
14482     cat >> confdefs.h <<\EOF
14483 #define sig_atomic_t int
14484 EOF
14485
14486   fi
14487  
14488
14489
14490 # test for pw_gecos in struct passwd
14491 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14492 echo "configure:14493: checking struct passwd for pw_gecos" >&5
14493 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14494   echo $ac_n "(cached) $ac_c" 1>&6
14495 else
14496   
14497         cat > conftest.$ac_ext <<EOF
14498 #line 14499 "configure"
14499 #include "confdefs.h"
14500 #include <pwd.h>
14501 int main() {
14502
14503         struct passwd pwd;
14504         pwd.pw_gecos = pwd.pw_name;
14505
14506 ; return 0; }
14507 EOF
14508 if { (eval echo configure:14509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14509   rm -rf conftest*
14510   ol_cv_struct_passwd_pw_gecos=yes
14511 else
14512   echo "configure: failed program was:" >&5
14513   cat conftest.$ac_ext >&5
14514   rm -rf conftest*
14515   ol_cv_struct_passwd_pw_gecos=no
14516 fi
14517 rm -f conftest*
14518 fi
14519
14520 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14521 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14522         cat >> confdefs.h <<\EOF
14523 #define HAVE_PW_GECOS 1
14524 EOF
14525
14526 fi
14527
14528 # test for pw_passwd in struct passwd
14529 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14530 echo "configure:14531: checking struct passwd for pw_passwd" >&5
14531 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14532   echo $ac_n "(cached) $ac_c" 1>&6
14533 else
14534   
14535         cat > conftest.$ac_ext <<EOF
14536 #line 14537 "configure"
14537 #include "confdefs.h"
14538 #include <pwd.h>
14539 int main() {
14540
14541         struct passwd pwd;
14542         pwd.pw_passwd = pwd.pw_name;
14543
14544 ; return 0; }
14545 EOF
14546 if { (eval echo configure:14547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14547   rm -rf conftest*
14548   ol_cv_struct_passwd_pw_passwd=yes
14549 else
14550   echo "configure: failed program was:" >&5
14551   cat conftest.$ac_ext >&5
14552   rm -rf conftest*
14553   ol_cv_struct_passwd_pw_passwd=no
14554 fi
14555 rm -f conftest*
14556 fi
14557
14558 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14559 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14560         cat >> confdefs.h <<\EOF
14561 #define HAVE_PW_PASSWD 1
14562 EOF
14563
14564 fi
14565
14566
14567 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14568 echo "configure:14569: checking if toupper() requires islower()" >&5
14569 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14570   echo $ac_n "(cached) $ac_c" 1>&6
14571 else
14572   
14573         if test "$cross_compiling" = yes; then
14574   ol_cv_c_upper_lower=safe
14575 else
14576   cat > conftest.$ac_ext <<EOF
14577 #line 14578 "configure"
14578 #include "confdefs.h"
14579
14580 #include <ctype.h>
14581 main()
14582 {
14583         if ('C' == toupper('C'))
14584                 exit(0);
14585         else
14586                 exit(1);
14587 }
14588 EOF
14589 if { (eval echo configure:14590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14590 then
14591   ol_cv_c_upper_lower=no
14592 else
14593   echo "configure: failed program was:" >&5
14594   cat conftest.$ac_ext >&5
14595   rm -fr conftest*
14596   ol_cv_c_upper_lower=yes
14597 fi
14598 rm -fr conftest*
14599 fi
14600
14601 fi
14602
14603 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14604 if test $ol_cv_c_upper_lower != no ; then
14605         cat >> confdefs.h <<\EOF
14606 #define C_UPPER_LOWER 1
14607 EOF
14608
14609 fi
14610
14611 echo $ac_n "checking for working const""... $ac_c" 1>&6
14612 echo "configure:14613: checking for working const" >&5
14613 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14614   echo $ac_n "(cached) $ac_c" 1>&6
14615 else
14616   cat > conftest.$ac_ext <<EOF
14617 #line 14618 "configure"
14618 #include "confdefs.h"
14619
14620 int main() {
14621
14622 /* Ultrix mips cc rejects this.  */
14623 typedef int charset[2]; const charset x;
14624 /* SunOS 4.1.1 cc rejects this.  */
14625 char const *const *ccp;
14626 char **p;
14627 /* NEC SVR4.0.2 mips cc rejects this.  */
14628 struct point {int x, y;};
14629 static struct point const zero = {0,0};
14630 /* AIX XL C 1.02.0.0 rejects this.
14631    It does not let you subtract one const X* pointer from another in an arm
14632    of an if-expression whose if-part is not a constant expression */
14633 const char *g = "string";
14634 ccp = &g + (g ? g-g : 0);
14635 /* HPUX 7.0 cc rejects these. */
14636 ++ccp;
14637 p = (char**) ccp;
14638 ccp = (char const *const *) p;
14639 { /* SCO 3.2v4 cc rejects this.  */
14640   char *t;
14641   char const *s = 0 ? (char *) 0 : (char const *) 0;
14642
14643   *t++ = 0;
14644 }
14645 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14646   int x[] = {25, 17};
14647   const int *foo = &x[0];
14648   ++foo;
14649 }
14650 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14651   typedef const int *iptr;
14652   iptr p = 0;
14653   ++p;
14654 }
14655 { /* AIX XL C 1.02.0.0 rejects this saying
14656      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14657   struct s { int j; const int *ap[3]; };
14658   struct s *b; b->j = 5;
14659 }
14660 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14661   const int foo = 10;
14662 }
14663
14664 ; return 0; }
14665 EOF
14666 if { (eval echo configure:14667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14667   rm -rf conftest*
14668   ac_cv_c_const=yes
14669 else
14670   echo "configure: failed program was:" >&5
14671   cat conftest.$ac_ext >&5
14672   rm -rf conftest*
14673   ac_cv_c_const=no
14674 fi
14675 rm -f conftest*
14676 fi
14677
14678 echo "$ac_t""$ac_cv_c_const" 1>&6
14679 if test $ac_cv_c_const = no; then
14680   cat >> confdefs.h <<\EOF
14681 #define const 
14682 EOF
14683
14684 fi
14685
14686 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14687 echo "configure:14688: checking if compiler understands volatile" >&5
14688 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14689   echo $ac_n "(cached) $ac_c" 1>&6
14690 else
14691   cat > conftest.$ac_ext <<EOF
14692 #line 14693 "configure"
14693 #include "confdefs.h"
14694 int x, y, z;
14695 int main() {
14696 volatile int a; int * volatile b = x ? &y : &z;
14697       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14698       *b = 0;
14699 ; return 0; }
14700 EOF
14701 if { (eval echo configure:14702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14702   rm -rf conftest*
14703   ol_cv_c_volatile=yes
14704 else
14705   echo "configure: failed program was:" >&5
14706   cat conftest.$ac_ext >&5
14707   rm -rf conftest*
14708   ol_cv_c_volatile=no
14709 fi
14710 rm -f conftest*
14711 fi
14712
14713 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14714   if test $ol_cv_c_volatile = yes; then
14715     : 
14716   else
14717     cat >> confdefs.h <<\EOF
14718 #define volatile 
14719 EOF
14720
14721   fi
14722  
14723
14724 if test $cross_compiling = yes ; then
14725         cat >> confdefs.h <<\EOF
14726 #define CROSS_COMPILING 1
14727 EOF
14728
14729 else
14730         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14731 echo "configure:14732: checking whether byte ordering is bigendian" >&5
14732 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14733   echo $ac_n "(cached) $ac_c" 1>&6
14734 else
14735   ac_cv_c_bigendian=unknown
14736 # See if sys/param.h defines the BYTE_ORDER macro.
14737 cat > conftest.$ac_ext <<EOF
14738 #line 14739 "configure"
14739 #include "confdefs.h"
14740 #include <sys/types.h>
14741 #include <sys/param.h>
14742 int main() {
14743
14744 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14745  bogus endian macros
14746 #endif
14747 ; return 0; }
14748 EOF
14749 if { (eval echo configure:14750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14750   rm -rf conftest*
14751   # It does; now see whether it defined to BIG_ENDIAN or not.
14752 cat > conftest.$ac_ext <<EOF
14753 #line 14754 "configure"
14754 #include "confdefs.h"
14755 #include <sys/types.h>
14756 #include <sys/param.h>
14757 int main() {
14758
14759 #if BYTE_ORDER != BIG_ENDIAN
14760  not big endian
14761 #endif
14762 ; return 0; }
14763 EOF
14764 if { (eval echo configure:14765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14765   rm -rf conftest*
14766   ac_cv_c_bigendian=yes
14767 else
14768   echo "configure: failed program was:" >&5
14769   cat conftest.$ac_ext >&5
14770   rm -rf conftest*
14771   ac_cv_c_bigendian=no
14772 fi
14773 rm -f conftest*
14774 else
14775   echo "configure: failed program was:" >&5
14776   cat conftest.$ac_ext >&5
14777 fi
14778 rm -f conftest*
14779 if test $ac_cv_c_bigendian = unknown; then
14780 if test "$cross_compiling" = yes; then
14781     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14782 else
14783   cat > conftest.$ac_ext <<EOF
14784 #line 14785 "configure"
14785 #include "confdefs.h"
14786 main () {
14787   /* Are we little or big endian?  From Harbison&Steele.  */
14788   union
14789   {
14790     long l;
14791     char c[sizeof (long)];
14792   } u;
14793   u.l = 1;
14794   exit (u.c[sizeof (long) - 1] == 1);
14795 }
14796 EOF
14797 if { (eval echo configure:14798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14798 then
14799   ac_cv_c_bigendian=no
14800 else
14801   echo "configure: failed program was:" >&5
14802   cat conftest.$ac_ext >&5
14803   rm -fr conftest*
14804   ac_cv_c_bigendian=yes
14805 fi
14806 rm -fr conftest*
14807 fi
14808
14809 fi
14810 fi
14811
14812 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14813 if test $ac_cv_c_bigendian = yes; then
14814   cat >> confdefs.h <<\EOF
14815 #define WORDS_BIGENDIAN 1
14816 EOF
14817
14818 fi
14819
14820 fi
14821
14822 echo $ac_n "checking size of short""... $ac_c" 1>&6
14823 echo "configure:14824: checking size of short" >&5 
14824 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14825   echo $ac_n "(cached) $ac_c" 1>&6
14826 else
14827   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14828   cat > conftest.$ac_ext <<EOF
14829 #line 14830 "configure"
14830 #include "confdefs.h"
14831 #include "confdefs.h" 
14832 #include <sys/types.h> 
14833  
14834
14835 int main() {
14836 switch (0) case 0: case (sizeof (short) == $ac_size):;
14837 ; return 0; }
14838 EOF
14839 if { (eval echo configure:14840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14840   rm -rf conftest*
14841   ac_cv_sizeof_short=$ac_size
14842 else
14843   echo "configure: failed program was:" >&5
14844   cat conftest.$ac_ext >&5
14845 fi
14846 rm -f conftest* 
14847   if test x$ac_cv_sizeof_short != x ; then break; fi 
14848 done 
14849
14850 fi
14851  
14852 if test x$ac_cv_sizeof_short = x ; then 
14853   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14854 fi 
14855 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14856 cat >> confdefs.h <<EOF
14857 #define SIZEOF_SHORT $ac_cv_sizeof_short
14858 EOF
14859  
14860  
14861 echo $ac_n "checking size of int""... $ac_c" 1>&6
14862 echo "configure:14863: checking size of int" >&5 
14863 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14864   echo $ac_n "(cached) $ac_c" 1>&6
14865 else
14866   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14867   cat > conftest.$ac_ext <<EOF
14868 #line 14869 "configure"
14869 #include "confdefs.h"
14870 #include "confdefs.h" 
14871 #include <sys/types.h> 
14872  
14873
14874 int main() {
14875 switch (0) case 0: case (sizeof (int) == $ac_size):;
14876 ; return 0; }
14877 EOF
14878 if { (eval echo configure:14879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14879   rm -rf conftest*
14880   ac_cv_sizeof_int=$ac_size
14881 else
14882   echo "configure: failed program was:" >&5
14883   cat conftest.$ac_ext >&5
14884 fi
14885 rm -f conftest* 
14886   if test x$ac_cv_sizeof_int != x ; then break; fi 
14887 done 
14888
14889 fi
14890  
14891 if test x$ac_cv_sizeof_int = x ; then 
14892   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14893 fi 
14894 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14895 cat >> confdefs.h <<EOF
14896 #define SIZEOF_INT $ac_cv_sizeof_int
14897 EOF
14898  
14899  
14900 echo $ac_n "checking size of long""... $ac_c" 1>&6
14901 echo "configure:14902: checking size of long" >&5 
14902 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14903   echo $ac_n "(cached) $ac_c" 1>&6
14904 else
14905   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14906   cat > conftest.$ac_ext <<EOF
14907 #line 14908 "configure"
14908 #include "confdefs.h"
14909 #include "confdefs.h" 
14910 #include <sys/types.h> 
14911  
14912
14913 int main() {
14914 switch (0) case 0: case (sizeof (long) == $ac_size):;
14915 ; return 0; }
14916 EOF
14917 if { (eval echo configure:14918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14918   rm -rf conftest*
14919   ac_cv_sizeof_long=$ac_size
14920 else
14921   echo "configure: failed program was:" >&5
14922   cat conftest.$ac_ext >&5
14923 fi
14924 rm -f conftest* 
14925   if test x$ac_cv_sizeof_long != x ; then break; fi 
14926 done 
14927
14928 fi
14929  
14930 if test x$ac_cv_sizeof_long = x ; then 
14931   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14932 fi 
14933 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14934 cat >> confdefs.h <<EOF
14935 #define SIZEOF_LONG $ac_cv_sizeof_long
14936 EOF
14937  
14938
14939
14940 if test "$ac_cv_sizeof_int" -lt 4 ; then
14941         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14942
14943         cat >> confdefs.h <<\EOF
14944 #define LBER_INT_T long
14945 EOF
14946
14947 else
14948         cat >> confdefs.h <<\EOF
14949 #define LBER_INT_T int
14950 EOF
14951
14952 fi
14953
14954 cat >> confdefs.h <<\EOF
14955 #define LBER_LEN_T long
14956 EOF
14957
14958 cat >> confdefs.h <<\EOF
14959 #define LBER_SOCKET_T int
14960 EOF
14961
14962 cat >> confdefs.h <<\EOF
14963 #define LBER_TAG_T long
14964 EOF
14965
14966
14967 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14968 echo "configure:14969: checking for 8-bit clean memcmp" >&5
14969 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14970   echo $ac_n "(cached) $ac_c" 1>&6
14971 else
14972   if test "$cross_compiling" = yes; then
14973   ac_cv_func_memcmp_clean=no
14974 else
14975   cat > conftest.$ac_ext <<EOF
14976 #line 14977 "configure"
14977 #include "confdefs.h"
14978
14979 main()
14980 {
14981   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14982   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14983 }
14984
14985 EOF
14986 if { (eval echo configure:14987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14987 then
14988   ac_cv_func_memcmp_clean=yes
14989 else
14990   echo "configure: failed program was:" >&5
14991   cat conftest.$ac_ext >&5
14992   rm -fr conftest*
14993   ac_cv_func_memcmp_clean=no
14994 fi
14995 rm -fr conftest*
14996 fi
14997
14998 fi
14999
15000 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15001 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15002
15003 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15004 echo "configure:15005: checking for strftime" >&5
15005 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15006   echo $ac_n "(cached) $ac_c" 1>&6
15007 else
15008   cat > conftest.$ac_ext <<EOF
15009 #line 15010 "configure"
15010 #include "confdefs.h"
15011 /* System header to define __stub macros and hopefully few prototypes,
15012     which can conflict with char strftime(); below.  */
15013 #include <assert.h>
15014 /* Override any gcc2 internal prototype to avoid an error.  */
15015 /* We use char because int might match the return type of a gcc2
15016     builtin and then its argument prototype would still apply.  */
15017 char strftime();
15018 char (*f)();
15019
15020 int main() {
15021
15022 /* The GNU C library defines this for functions which it implements
15023     to always fail with ENOSYS.  Some functions are actually named
15024     something starting with __ and the normal name is an alias.  */
15025 #if defined (__stub_strftime) || defined (__stub___strftime)
15026 choke me
15027 #else
15028 f = strftime;
15029 #endif
15030
15031 ; return 0; }
15032 EOF
15033 if { (eval echo configure:15034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15034   rm -rf conftest*
15035   eval "ac_cv_func_strftime=yes"
15036 else
15037   echo "configure: failed program was:" >&5
15038   cat conftest.$ac_ext >&5
15039   rm -rf conftest*
15040   eval "ac_cv_func_strftime=no"
15041 fi
15042 rm -f conftest*
15043 fi
15044
15045 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15046   echo "$ac_t""yes" 1>&6
15047   cat >> confdefs.h <<\EOF
15048 #define HAVE_STRFTIME 1
15049 EOF
15050
15051 else
15052   echo "$ac_t""no" 1>&6
15053 # strftime is in -lintl on SCO UNIX.
15054 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15055 echo "configure:15056: checking for strftime in -lintl" >&5
15056 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15057 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15058   echo $ac_n "(cached) $ac_c" 1>&6
15059 else
15060   ac_save_LIBS="$LIBS"
15061 LIBS="-lintl  $LIBS"
15062 cat > conftest.$ac_ext <<EOF
15063 #line 15064 "configure"
15064 #include "confdefs.h"
15065 /* Override any gcc2 internal prototype to avoid an error.  */
15066 /* We use char because int might match the return type of a gcc2
15067     builtin and then its argument prototype would still apply.  */
15068 char strftime();
15069
15070 int main() {
15071 strftime()
15072 ; return 0; }
15073 EOF
15074 if { (eval echo configure:15075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15075   rm -rf conftest*
15076   eval "ac_cv_lib_$ac_lib_var=yes"
15077 else
15078   echo "configure: failed program was:" >&5
15079   cat conftest.$ac_ext >&5
15080   rm -rf conftest*
15081   eval "ac_cv_lib_$ac_lib_var=no"
15082 fi
15083 rm -f conftest*
15084 LIBS="$ac_save_LIBS"
15085
15086 fi
15087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15088   echo "$ac_t""yes" 1>&6
15089   cat >> confdefs.h <<\EOF
15090 #define HAVE_STRFTIME 1
15091 EOF
15092
15093 LIBS="-lintl $LIBS"
15094 else
15095   echo "$ac_t""no" 1>&6
15096 fi
15097
15098 fi
15099
15100
15101 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15102 echo "configure:15103: checking for inet_aton()" >&5
15103 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15104   echo $ac_n "(cached) $ac_c" 1>&6
15105 else
15106   cat > conftest.$ac_ext <<EOF
15107 #line 15108 "configure"
15108 #include "confdefs.h"
15109
15110 #ifdef HAVE_SYS_TYPES_H
15111 #       include <sys/types.h>
15112 #endif
15113 #ifdef HAVE_SYS_SOCKET_H
15114 #       include <sys/socket.h>
15115 #       ifdef HAVE_SYS_SELECT_H
15116 #               include <sys/select.h>
15117 #       endif
15118 #       include <netinet/in.h>
15119 #       ifdef HAVE_ARPA_INET_H
15120 #               include <arpa/inet.h>
15121 #       endif
15122 #endif
15123
15124 int main() {
15125 struct in_addr in;
15126 int rc = inet_aton( "255.255.255.255", &in );
15127 ; return 0; }
15128 EOF
15129 if { (eval echo configure:15130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15130   rm -rf conftest*
15131   ol_cv_func_inet_aton=yes
15132 else
15133   echo "configure: failed program was:" >&5
15134   cat conftest.$ac_ext >&5
15135   rm -rf conftest*
15136   ol_cv_func_inet_aton=no
15137 fi
15138 rm -f conftest*
15139 fi
15140
15141 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15142   if test $ol_cv_func_inet_aton != no; then
15143     cat >> confdefs.h <<\EOF
15144 #define HAVE_INET_ATON 1
15145 EOF
15146
15147   fi
15148  
15149
15150 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15151 echo "configure:15152: checking for _spawnlp" >&5
15152 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15153   echo $ac_n "(cached) $ac_c" 1>&6
15154 else
15155   cat > conftest.$ac_ext <<EOF
15156 #line 15157 "configure"
15157 #include "confdefs.h"
15158 /* System header to define __stub macros and hopefully few prototypes,
15159     which can conflict with char _spawnlp(); below.  */
15160 #include <assert.h>
15161 /* Override any gcc2 internal prototype to avoid an error.  */
15162 /* We use char because int might match the return type of a gcc2
15163     builtin and then its argument prototype would still apply.  */
15164 char _spawnlp();
15165 char (*f)();
15166
15167 int main() {
15168
15169 /* The GNU C library defines this for functions which it implements
15170     to always fail with ENOSYS.  Some functions are actually named
15171     something starting with __ and the normal name is an alias.  */
15172 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15173 choke me
15174 #else
15175 f = _spawnlp;
15176 #endif
15177
15178 ; return 0; }
15179 EOF
15180 if { (eval echo configure:15181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15181   rm -rf conftest*
15182   eval "ac_cv_func__spawnlp=yes"
15183 else
15184   echo "configure: failed program was:" >&5
15185   cat conftest.$ac_ext >&5
15186   rm -rf conftest*
15187   eval "ac_cv_func__spawnlp=no"
15188 fi
15189 rm -f conftest*
15190 fi
15191
15192 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15193   echo "$ac_t""yes" 1>&6
15194   cat >> confdefs.h <<\EOF
15195 #define HAVE_SPAWNLP 1
15196 EOF
15197
15198 else
15199   echo "$ac_t""no" 1>&6
15200 fi
15201
15202
15203 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15204 echo "configure:15205: checking for _snprintf" >&5
15205 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15206   echo $ac_n "(cached) $ac_c" 1>&6
15207 else
15208   cat > conftest.$ac_ext <<EOF
15209 #line 15210 "configure"
15210 #include "confdefs.h"
15211 /* System header to define __stub macros and hopefully few prototypes,
15212     which can conflict with char _snprintf(); below.  */
15213 #include <assert.h>
15214 /* Override any gcc2 internal prototype to avoid an error.  */
15215 /* We use char because int might match the return type of a gcc2
15216     builtin and then its argument prototype would still apply.  */
15217 char _snprintf();
15218 char (*f)();
15219
15220 int main() {
15221
15222 /* The GNU C library defines this for functions which it implements
15223     to always fail with ENOSYS.  Some functions are actually named
15224     something starting with __ and the normal name is an alias.  */
15225 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15226 choke me
15227 #else
15228 f = _snprintf;
15229 #endif
15230
15231 ; return 0; }
15232 EOF
15233 if { (eval echo configure:15234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15234   rm -rf conftest*
15235   eval "ac_cv_func__snprintf=yes"
15236 else
15237   echo "configure: failed program was:" >&5
15238   cat conftest.$ac_ext >&5
15239   rm -rf conftest*
15240   eval "ac_cv_func__snprintf=no"
15241 fi
15242 rm -f conftest*
15243 fi
15244
15245 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15246   echo "$ac_t""yes" 1>&6
15247   ac_cv_func_snprintf=yes
15248         cat >> confdefs.h <<\EOF
15249 #define snprintf _snprintf
15250 EOF
15251
15252
15253 else
15254   echo "$ac_t""no" 1>&6
15255 fi
15256
15257
15258 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15259 echo "configure:15260: checking for _vsnprintf" >&5
15260 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15261   echo $ac_n "(cached) $ac_c" 1>&6
15262 else
15263   cat > conftest.$ac_ext <<EOF
15264 #line 15265 "configure"
15265 #include "confdefs.h"
15266 /* System header to define __stub macros and hopefully few prototypes,
15267     which can conflict with char _vsnprintf(); below.  */
15268 #include <assert.h>
15269 /* Override any gcc2 internal prototype to avoid an error.  */
15270 /* We use char because int might match the return type of a gcc2
15271     builtin and then its argument prototype would still apply.  */
15272 char _vsnprintf();
15273 char (*f)();
15274
15275 int main() {
15276
15277 /* The GNU C library defines this for functions which it implements
15278     to always fail with ENOSYS.  Some functions are actually named
15279     something starting with __ and the normal name is an alias.  */
15280 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15281 choke me
15282 #else
15283 f = _vsnprintf;
15284 #endif
15285
15286 ; return 0; }
15287 EOF
15288 if { (eval echo configure:15289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15289   rm -rf conftest*
15290   eval "ac_cv_func__vsnprintf=yes"
15291 else
15292   echo "configure: failed program was:" >&5
15293   cat conftest.$ac_ext >&5
15294   rm -rf conftest*
15295   eval "ac_cv_func__vsnprintf=no"
15296 fi
15297 rm -f conftest*
15298 fi
15299
15300 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15301   echo "$ac_t""yes" 1>&6
15302   ac_cv_func_vsnprintf=yes
15303         cat >> confdefs.h <<\EOF
15304 #define vsnprintf _vsnprintf
15305 EOF
15306
15307
15308 else
15309   echo "$ac_t""no" 1>&6
15310 fi
15311
15312
15313 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15314 echo "configure:15315: checking for vprintf" >&5
15315 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15316   echo $ac_n "(cached) $ac_c" 1>&6
15317 else
15318   cat > conftest.$ac_ext <<EOF
15319 #line 15320 "configure"
15320 #include "confdefs.h"
15321 /* System header to define __stub macros and hopefully few prototypes,
15322     which can conflict with char vprintf(); below.  */
15323 #include <assert.h>
15324 /* Override any gcc2 internal prototype to avoid an error.  */
15325 /* We use char because int might match the return type of a gcc2
15326     builtin and then its argument prototype would still apply.  */
15327 char vprintf();
15328 char (*f)();
15329
15330 int main() {
15331
15332 /* The GNU C library defines this for functions which it implements
15333     to always fail with ENOSYS.  Some functions are actually named
15334     something starting with __ and the normal name is an alias.  */
15335 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15336 choke me
15337 #else
15338 f = vprintf;
15339 #endif
15340
15341 ; return 0; }
15342 EOF
15343 if { (eval echo configure:15344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15344   rm -rf conftest*
15345   eval "ac_cv_func_vprintf=yes"
15346 else
15347   echo "configure: failed program was:" >&5
15348   cat conftest.$ac_ext >&5
15349   rm -rf conftest*
15350   eval "ac_cv_func_vprintf=no"
15351 fi
15352 rm -f conftest*
15353 fi
15354
15355 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15356   echo "$ac_t""yes" 1>&6
15357   cat >> confdefs.h <<\EOF
15358 #define HAVE_VPRINTF 1
15359 EOF
15360
15361 else
15362   echo "$ac_t""no" 1>&6
15363 fi
15364
15365 if test "$ac_cv_func_vprintf" != yes; then
15366 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15367 echo "configure:15368: checking for _doprnt" >&5
15368 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15369   echo $ac_n "(cached) $ac_c" 1>&6
15370 else
15371   cat > conftest.$ac_ext <<EOF
15372 #line 15373 "configure"
15373 #include "confdefs.h"
15374 /* System header to define __stub macros and hopefully few prototypes,
15375     which can conflict with char _doprnt(); below.  */
15376 #include <assert.h>
15377 /* Override any gcc2 internal prototype to avoid an error.  */
15378 /* We use char because int might match the return type of a gcc2
15379     builtin and then its argument prototype would still apply.  */
15380 char _doprnt();
15381 char (*f)();
15382
15383 int main() {
15384
15385 /* The GNU C library defines this for functions which it implements
15386     to always fail with ENOSYS.  Some functions are actually named
15387     something starting with __ and the normal name is an alias.  */
15388 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15389 choke me
15390 #else
15391 f = _doprnt;
15392 #endif
15393
15394 ; return 0; }
15395 EOF
15396 if { (eval echo configure:15397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15397   rm -rf conftest*
15398   eval "ac_cv_func__doprnt=yes"
15399 else
15400   echo "configure: failed program was:" >&5
15401   cat conftest.$ac_ext >&5
15402   rm -rf conftest*
15403   eval "ac_cv_func__doprnt=no"
15404 fi
15405 rm -f conftest*
15406 fi
15407
15408 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15409   echo "$ac_t""yes" 1>&6
15410   cat >> confdefs.h <<\EOF
15411 #define HAVE_DOPRNT 1
15412 EOF
15413
15414 else
15415   echo "$ac_t""no" 1>&6
15416 fi
15417
15418 fi
15419
15420
15421 if test $ac_cv_func_vprintf = yes ; then
15422                 for ac_func in vsnprintf vsprintf
15423 do
15424 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15425 echo "configure:15426: checking for $ac_func" >&5
15426 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15427   echo $ac_n "(cached) $ac_c" 1>&6
15428 else
15429   cat > conftest.$ac_ext <<EOF
15430 #line 15431 "configure"
15431 #include "confdefs.h"
15432 /* System header to define __stub macros and hopefully few prototypes,
15433     which can conflict with char $ac_func(); below.  */
15434 #include <assert.h>
15435 /* Override any gcc2 internal prototype to avoid an error.  */
15436 /* We use char because int might match the return type of a gcc2
15437     builtin and then its argument prototype would still apply.  */
15438 char $ac_func();
15439 char (*f)();
15440
15441 int main() {
15442
15443 /* The GNU C library defines this for functions which it implements
15444     to always fail with ENOSYS.  Some functions are actually named
15445     something starting with __ and the normal name is an alias.  */
15446 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15447 choke me
15448 #else
15449 f = $ac_func;
15450 #endif
15451
15452 ; return 0; }
15453 EOF
15454 if { (eval echo configure:15455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15455   rm -rf conftest*
15456   eval "ac_cv_func_$ac_func=yes"
15457 else
15458   echo "configure: failed program was:" >&5
15459   cat conftest.$ac_ext >&5
15460   rm -rf conftest*
15461   eval "ac_cv_func_$ac_func=no"
15462 fi
15463 rm -f conftest*
15464 fi
15465
15466 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15467   echo "$ac_t""yes" 1>&6
15468     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15469   cat >> confdefs.h <<EOF
15470 #define $ac_tr_func 1
15471 EOF
15472  
15473 else
15474   echo "$ac_t""no" 1>&6
15475 fi
15476 done
15477
15478 fi
15479
15480 for ac_func in \
15481         bcopy                   \
15482         closesocket             \
15483         chroot                  \
15484         endgrent                \
15485         endpwent                \
15486         flock                   \
15487         getdtablesize   \
15488         getgrgid                \
15489         gethostname             \
15490         getpass                 \
15491         getpwuid                \
15492         getpwnam                \
15493         getspnam                \
15494         gettimeofday    \
15495         initgroups              \
15496         lockf                   \
15497         memcpy                  \
15498         memmove                 \
15499         mkstemp                 \
15500         pipe                    \
15501         read                    \
15502         recv                    \
15503         recvfrom                \
15504         setpwfile               \
15505         setgid                  \
15506         setegid                 \
15507         setsid                  \
15508         setuid                  \
15509         seteuid                 \
15510         sigaction               \
15511         signal                  \
15512         sigset                  \
15513         snprintf                \
15514         strdup                  \
15515         strerror                \
15516         strpbrk                 \
15517         strrchr                 \
15518         strsep                  \
15519         strstr                  \
15520         strtol                  \
15521         strtoul                 \
15522         strspn                  \
15523         sysconf                 \
15524         waitpid                 \
15525         wait4                   \
15526         write                   \
15527         send                    \
15528         sendto                  \
15529
15530 do
15531 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15532 echo "configure:15533: checking for $ac_func" >&5
15533 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15534   echo $ac_n "(cached) $ac_c" 1>&6
15535 else
15536   cat > conftest.$ac_ext <<EOF
15537 #line 15538 "configure"
15538 #include "confdefs.h"
15539 /* System header to define __stub macros and hopefully few prototypes,
15540     which can conflict with char $ac_func(); below.  */
15541 #include <assert.h>
15542 /* Override any gcc2 internal prototype to avoid an error.  */
15543 /* We use char because int might match the return type of a gcc2
15544     builtin and then its argument prototype would still apply.  */
15545 char $ac_func();
15546 char (*f)();
15547
15548 int main() {
15549
15550 /* The GNU C library defines this for functions which it implements
15551     to always fail with ENOSYS.  Some functions are actually named
15552     something starting with __ and the normal name is an alias.  */
15553 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15554 choke me
15555 #else
15556 f = $ac_func;
15557 #endif
15558
15559 ; return 0; }
15560 EOF
15561 if { (eval echo configure:15562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15562   rm -rf conftest*
15563   eval "ac_cv_func_$ac_func=yes"
15564 else
15565   echo "configure: failed program was:" >&5
15566   cat conftest.$ac_ext >&5
15567   rm -rf conftest*
15568   eval "ac_cv_func_$ac_func=no"
15569 fi
15570 rm -f conftest*
15571 fi
15572
15573 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15574   echo "$ac_t""yes" 1>&6
15575     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15576   cat >> confdefs.h <<EOF
15577 #define $ac_tr_func 1
15578 EOF
15579  
15580 else
15581   echo "$ac_t""no" 1>&6
15582 fi
15583 done
15584
15585
15586 for ac_func in getopt tempnam
15587 do
15588 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15589 echo "configure:15590: checking for $ac_func" >&5
15590 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15591   echo $ac_n "(cached) $ac_c" 1>&6
15592 else
15593   cat > conftest.$ac_ext <<EOF
15594 #line 15595 "configure"
15595 #include "confdefs.h"
15596 /* System header to define __stub macros and hopefully few prototypes,
15597     which can conflict with char $ac_func(); below.  */
15598 #include <assert.h>
15599 /* Override any gcc2 internal prototype to avoid an error.  */
15600 /* We use char because int might match the return type of a gcc2
15601     builtin and then its argument prototype would still apply.  */
15602 char $ac_func();
15603 char (*f)();
15604
15605 int main() {
15606
15607 /* The GNU C library defines this for functions which it implements
15608     to always fail with ENOSYS.  Some functions are actually named
15609     something starting with __ and the normal name is an alias.  */
15610 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15611 choke me
15612 #else
15613 f = $ac_func;
15614 #endif
15615
15616 ; return 0; }
15617 EOF
15618 if { (eval echo configure:15619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15619   rm -rf conftest*
15620   eval "ac_cv_func_$ac_func=yes"
15621 else
15622   echo "configure: failed program was:" >&5
15623   cat conftest.$ac_ext >&5
15624   rm -rf conftest*
15625   eval "ac_cv_func_$ac_func=no"
15626 fi
15627 rm -f conftest*
15628 fi
15629
15630 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15631   echo "$ac_t""yes" 1>&6
15632     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15633   cat >> confdefs.h <<EOF
15634 #define $ac_tr_func 1
15635 EOF
15636  
15637 else
15638   echo "$ac_t""no" 1>&6
15639 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15640 fi
15641 done
15642
15643
15644
15645 if test "$ac_cv_func_getopt" != yes; then
15646     LIBSRCS="$LIBSRCS getopt.c"
15647 fi
15648
15649 if test "$ac_cv_func_tempnam" != yes; then
15650     LIBSRCS="$LIBSRCS tempnam.c"
15651 fi
15652
15653 # Check Configuration
15654 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15655 echo "configure:15656: checking declaration of sys_errlist" >&5
15656 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15657   echo $ac_n "(cached) $ac_c" 1>&6
15658 else
15659   
15660         cat > conftest.$ac_ext <<EOF
15661 #line 15662 "configure"
15662 #include "confdefs.h"
15663
15664 #include <stdio.h>
15665 #include <sys/types.h>
15666 #include <errno.h>
15667 #ifdef WINNT
15668 #include <stdlib.h>
15669 #endif 
15670 int main() {
15671 char *c = (char *) *sys_errlist
15672 ; return 0; }
15673 EOF
15674 if { (eval echo configure:15675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15675   rm -rf conftest*
15676   ol_cv_dcl_sys_errlist=yes
15677         ol_cv_have_sys_errlist=yes
15678 else
15679   echo "configure: failed program was:" >&5
15680   cat conftest.$ac_ext >&5
15681   rm -rf conftest*
15682   ol_cv_dcl_sys_errlist=no
15683 fi
15684 rm -f conftest*
15685 fi
15686
15687 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15688 #
15689 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15690 if test $ol_cv_dcl_sys_errlist = no ; then
15691         cat >> confdefs.h <<\EOF
15692 #define DECL_SYS_ERRLIST 1
15693 EOF
15694
15695
15696         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15697 echo "configure:15698: checking existence of sys_errlist" >&5
15698 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15699   echo $ac_n "(cached) $ac_c" 1>&6
15700 else
15701   
15702                 cat > conftest.$ac_ext <<EOF
15703 #line 15704 "configure"
15704 #include "confdefs.h"
15705 #include <errno.h>
15706 int main() {
15707 char *c = (char *) *sys_errlist
15708 ; return 0; }
15709 EOF
15710 if { (eval echo configure:15711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15711   rm -rf conftest*
15712   ol_cv_have_sys_errlist=yes
15713 else
15714   echo "configure: failed program was:" >&5
15715   cat conftest.$ac_ext >&5
15716   rm -rf conftest*
15717   ol_cv_have_sys_errlist=no
15718 fi
15719 rm -f conftest*
15720 fi
15721
15722 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15723 fi
15724 if test $ol_cv_have_sys_errlist = yes ; then
15725         cat >> confdefs.h <<\EOF
15726 #define HAVE_SYS_ERRLIST 1
15727 EOF
15728
15729 fi
15730
15731
15732
15733 if test "$ol_enable_debug" != no ; then
15734         cat >> confdefs.h <<\EOF
15735 #define LDAP_DEBUG 1
15736 EOF
15737
15738 fi
15739 if test "$ol_enable_syslog" = yes ; then
15740         cat >> confdefs.h <<\EOF
15741 #define LDAP_SYSLOG 1
15742 EOF
15743
15744 fi
15745 if test "$ol_enable_libui" = yes ; then
15746         cat >> confdefs.h <<\EOF
15747 #define LDAP_LIBUI 1
15748 EOF
15749
15750 fi
15751 if test "$ol_enable_cache" = no ; then
15752         cat >> confdefs.h <<\EOF
15753 #define LDAP_NOCACHE 1
15754 EOF
15755
15756 fi
15757 if test "$ol_link_kbind" != no ; then
15758         cat >> confdefs.h <<\EOF
15759 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15760 EOF
15761
15762 fi
15763 if test "$ol_enable_dns" != no ; then
15764         cat >> confdefs.h <<\EOF
15765 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
15766 EOF
15767
15768 fi
15769 if test "$ol_enable_proctitle" != no ; then
15770         cat >> confdefs.h <<\EOF
15771 #define LDAP_PROCTITLE 1
15772 EOF
15773
15774 fi
15775 if test "$ol_enable_referrals" != no ; then
15776         cat >> confdefs.h <<\EOF
15777 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15778 EOF
15779
15780 fi
15781 if test "$ol_enable_cldap" != no ; then
15782         cat >> confdefs.h <<\EOF
15783 #define LDAP_CONNECTIONLESS 1
15784 EOF
15785
15786 fi
15787 if test "$ol_enable_ldapi" != no; then
15788         cat >> confdefs.h <<\EOF
15789 #define USE_PF_LOCAL 1
15790 EOF
15791
15792 fi
15793
15794 if test "$ol_enable_cleartext" != no ; then
15795         cat >> confdefs.h <<\EOF
15796 #define SLAPD_CLEARTEXT 1
15797 EOF
15798
15799 fi
15800 if test "$ol_enable_crypt" != no ; then
15801         cat >> confdefs.h <<\EOF
15802 #define SLAPD_CRYPT 1
15803 EOF
15804
15805 fi
15806 if test "$ol_link_kpasswd" != no ; then
15807         cat >> confdefs.h <<\EOF
15808 #define SLAPD_KPASSWD 1
15809 EOF
15810
15811 fi
15812 if test "$ol_link_spasswd" != no ; then
15813         cat >> confdefs.h <<\EOF
15814 #define SLAPD_SPASSWD 1
15815 EOF
15816
15817 fi
15818 if test "$ol_enable_multimaster" != no ; then
15819         cat >> confdefs.h <<\EOF
15820 #define SLAPD_MULTIMASTER 1
15821 EOF
15822
15823 fi
15824 if test "$ol_enable_phonetic" != no ; then
15825         cat >> confdefs.h <<\EOF
15826 #define SLAPD_PHONETIC 1
15827 EOF
15828
15829 fi
15830 if test "$ol_enable_rlookups" != no ; then
15831         cat >> confdefs.h <<\EOF
15832 #define SLAPD_RLOOKUPS 1
15833 EOF
15834
15835 fi
15836 if test "$ol_enable_aci" != no ; then
15837         cat >> confdefs.h <<\EOF
15838 #define SLAPD_ACI_ENABLED 1
15839 EOF
15840
15841 fi
15842
15843 if test "$ol_link_modules" != no ; then
15844         cat >> confdefs.h <<\EOF
15845 #define SLAPD_MODULES 1
15846 EOF
15847
15848         BUILD_SLAPD=yes
15849         SLAPD_MODULES_LDFLAGS="-dlopen self"
15850 fi
15851
15852 if test "$ol_link_bdb2" != no ; then
15853         cat >> confdefs.h <<\EOF
15854 #define SLAPD_BDB2 1
15855 EOF
15856
15857         BUILD_SLAPD=yes
15858         BUILD_BDB2=yes
15859         if test "$ol_with_bdb2_module" != static ; then
15860                 cat >> confdefs.h <<\EOF
15861 #define SLAPD_BDB2_DYNAMIC 1
15862 EOF
15863
15864                 BUILD_BDB2=mod
15865                 BUILD_BDB2_DYNAMIC=shared
15866                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15867         fi
15868 fi
15869
15870 if test "$ol_enable_dnssrv" != no ; then
15871         cat >> confdefs.h <<\EOF
15872 #define SLAPD_DNSSRV 1
15873 EOF
15874
15875         BUILD_SLAPD=yes
15876         BUILD_DNSSRV=yes
15877         if test "$ol_with_dnssrv_module" != static ; then
15878                 cat >> confdefs.h <<\EOF
15879 #define SLAPD_DNSSRV_DYNAMIC 1
15880 EOF
15881
15882                 BUILD_DNSSRV=mod
15883                 BUILD_DNSSRV_DYNAMIC=shared
15884                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15885         fi
15886 fi
15887
15888 if test "$ol_enable_ldap" != no ; then
15889         cat >> confdefs.h <<\EOF
15890 #define SLAPD_LDAP 1
15891 EOF
15892
15893         BUILD_SLAPD=yes
15894         BUILD_LDAP=yes
15895         if test "$ol_with_ldap_module" != static ; then
15896                 cat >> confdefs.h <<\EOF
15897 #define SLAPD_LDAP_DYNAMIC 1
15898 EOF
15899
15900                 BUILD_LDAP=mod
15901                 BUILD_LDAP_DYNAMIC=shared
15902                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15903         fi
15904 fi
15905
15906 if test "$ol_link_ldbm" != no ; then
15907         cat >> confdefs.h <<\EOF
15908 #define SLAPD_LDBM 1
15909 EOF
15910
15911         BUILD_SLAPD=yes
15912         BUILD_LDBM=yes
15913         if test "$ol_with_ldbm_module" != static ; then
15914                 cat >> confdefs.h <<\EOF
15915 #define SLAPD_LDBM_DYNAMIC 1
15916 EOF
15917
15918                 BUILD_LDBM=mod
15919                 BUILD_LDBM_DYNAMIC=shared
15920                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15921         fi
15922 fi
15923
15924 if test "$ol_enable_passwd" != no ; then
15925         cat >> confdefs.h <<\EOF
15926 #define SLAPD_PASSWD 1
15927 EOF
15928
15929         BUILD_SLAPD=yes
15930         BUILD_PASSWD=yes
15931         if test "$ol_with_passwd_module" != static ; then
15932                 cat >> confdefs.h <<\EOF
15933 #define SLAPD_PASSWD_DYNAMIC 1
15934 EOF
15935
15936                 BUILD_PASSWD=mod
15937                 BUILD_PASSWD_DYNAMIC=shared
15938                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15939         fi
15940 fi
15941
15942 if test "$ol_link_perl" != no ; then
15943         cat >> confdefs.h <<\EOF
15944 #define SLAPD_PERL 1
15945 EOF
15946
15947         BUILD_SLAPD=yes
15948         BUILD_PERL=yes
15949         if test "$ol_with_perl_module" != static ; then
15950                 cat >> confdefs.h <<\EOF
15951 #define SLAPD_PERL_DYNAMIC 1
15952 EOF
15953
15954                 BUILD_PERL=mod
15955                 BUILD_PERL_DYNAMIC=shared
15956                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15957         fi
15958 fi
15959
15960 if test "$ol_enable_shell" != no ; then
15961         cat >> confdefs.h <<\EOF
15962 #define SLAPD_SHELL 1
15963 EOF
15964
15965         BUILD_SLAPD=yes
15966         BUILD_SHELL=yes
15967         if test "$ol_with_shell_module" != static ; then
15968                 cat >> confdefs.h <<\EOF
15969 #define SLAPD_SHELL_DYNAMIC 1
15970 EOF
15971
15972                 BUILD_SHELL=mod
15973                 BUILD_SHELL_DYNAMIC=shared
15974                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15975         fi
15976 fi
15977
15978 if test "$ol_enable_tcl" != no ; then
15979         cat >> confdefs.h <<\EOF
15980 #define SLAPD_TCL 1
15981 EOF
15982
15983         BUILD_SLAPD=yes
15984         BUILD_TCL=yes
15985         if test "$ol_with_tcl_module" != static; then
15986                 cat >> confdefs.h <<\EOF
15987 #define SLAPD_TCL_DYNAMIC 1
15988 EOF
15989
15990                 BUILD_TCL=mod
15991                 BUILD_TCL_DYNAMIC=shared
15992                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15993         fi
15994 fi
15995
15996 if test "$ol_enable_sql" != no ; then
15997         cat >> confdefs.h <<\EOF
15998 #define SLAPD_SQL 1
15999 EOF
16000
16001         BUILD_SLAPD=yes
16002         BUILD_SQL=yes
16003         SLAPD_SQL_LIBS=-liodbc
16004         if test "$ol_with_sql_module" != static; then
16005                 cat >> confdefs.h <<\EOF
16006 #define SLAPD_SQL_DYNAMIC 1
16007 EOF
16008
16009                 BUILD_SQL=mod
16010                 BUILD_SQL_DYNAMIC=shared
16011                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16012         fi
16013 fi
16014
16015 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16016         $BUILD_SLAPD = yes ; then
16017         BUILD_SLURPD=yes
16018 fi
16019
16020 if test "$ol_link_isode" != no ; then
16021         BUILD_LDAPD=yes
16022 fi
16023
16024
16025 if test "$LINK_BINS_DYNAMIC" = yes; then
16026     LIB_LINKAGE=DYN
16027     LT_LIB_LINKAGE=shared
16028 else
16029     LIB_LINKAGE=STAT
16030     LT_LIB_LINKAGE=static
16031 fi
16032
16033 if test "$ac_cv_mingw32" = yes ; then
16034     PLAT=NT
16035     DYN_EXT=dll
16036 else
16037     PLAT=UNIX
16038     DYN_EXT=so
16039 fi
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050   
16051   
16052   
16053   
16054   
16055   
16056   
16057   
16058   
16059   
16060   
16061   
16062   
16063   
16064   
16065   
16066   
16067   
16068   
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104 trap '' 1 2 15
16105
16106 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16107
16108 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16109 # Let make expand exec_prefix.
16110 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16111
16112 # Any assignment to VPATH causes Sun make to only execute
16113 # the first set of double-colon rules, so remove it if not needed.
16114 # If there is a colon in the path, we need to keep it.
16115 if test "x$srcdir" = x.; then
16116   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16117 fi
16118
16119 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16120
16121 DEFS=-DHAVE_CONFIG_H
16122
16123 # Without the "./", some shells look in PATH for config.status.
16124 : ${CONFIG_STATUS=./config.status}
16125
16126 echo creating $CONFIG_STATUS
16127 rm -f $CONFIG_STATUS
16128 cat > $CONFIG_STATUS <<EOF
16129 #! /bin/sh
16130 # Generated automatically by configure.
16131 # Run this file to recreate the current configuration.
16132 # This directory was configured as follows,
16133 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16134 #
16135 # $0 $ac_configure_args
16136 #
16137 # Compiler output produced by configure, useful for debugging
16138 # configure, is in ./config.log if it exists.
16139
16140 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16141 for ac_option
16142 do
16143   case "\$ac_option" in
16144   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16145     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16146     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16147   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16148     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16149     exit 0 ;;
16150   -help | --help | --hel | --he | --h)
16151     echo "\$ac_cs_usage"; exit 0 ;;
16152   *) echo "\$ac_cs_usage"; exit 1 ;;
16153   esac
16154 done
16155
16156 ac_given_srcdir=$srcdir
16157 ac_given_INSTALL="$INSTALL"
16158
16159 trap 'rm -fr `echo "\
16160 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16161 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16162 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16163 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16164 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16165 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16166 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16167 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16168 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16169 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16170 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16171 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16172 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16173 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16174 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16175 include/Makefile:build/top.mk:include/Makefile.in \
16176 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16177 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16178 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16179 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16180 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16181 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16182 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16183 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16184 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16185 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16186 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
16187 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16188 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16189 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16190 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16191 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16192 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16193 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16194 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16195 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16196 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16197 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16198 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16199 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16200 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16201 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16202 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16203 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16204 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16205  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16206 EOF
16207 cat >> $CONFIG_STATUS <<EOF
16208
16209 # Protect against being on the right side of a sed subst in config.status.
16210 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16211  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16212 $ac_vpsub
16213 $extrasub
16214 s%@SHELL@%$SHELL%g
16215 s%@CFLAGS@%$CFLAGS%g
16216 s%@CPPFLAGS@%$CPPFLAGS%g
16217 s%@CXXFLAGS@%$CXXFLAGS%g
16218 s%@FFLAGS@%$FFLAGS%g
16219 s%@DEFS@%$DEFS%g
16220 s%@LDFLAGS@%$LDFLAGS%g
16221 s%@LIBS@%$LIBS%g
16222 s%@exec_prefix@%$exec_prefix%g
16223 s%@prefix@%$prefix%g
16224 s%@program_transform_name@%$program_transform_name%g
16225 s%@bindir@%$bindir%g
16226 s%@sbindir@%$sbindir%g
16227 s%@libexecdir@%$libexecdir%g
16228 s%@datadir@%$datadir%g
16229 s%@sysconfdir@%$sysconfdir%g
16230 s%@sharedstatedir@%$sharedstatedir%g
16231 s%@localstatedir@%$localstatedir%g
16232 s%@libdir@%$libdir%g
16233 s%@includedir@%$includedir%g
16234 s%@oldincludedir@%$oldincludedir%g
16235 s%@infodir@%$infodir%g
16236 s%@mandir@%$mandir%g
16237 s%@host@%$host%g
16238 s%@host_alias@%$host_alias%g
16239 s%@host_cpu@%$host_cpu%g
16240 s%@host_vendor@%$host_vendor%g
16241 s%@host_os@%$host_os%g
16242 s%@target@%$target%g
16243 s%@target_alias@%$target_alias%g
16244 s%@target_cpu@%$target_cpu%g
16245 s%@target_vendor@%$target_vendor%g
16246 s%@target_os@%$target_os%g
16247 s%@build@%$build%g
16248 s%@build_alias@%$build_alias%g
16249 s%@build_cpu@%$build_cpu%g
16250 s%@build_vendor@%$build_vendor%g
16251 s%@build_os@%$build_os%g
16252 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16253 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16254 s%@INSTALL_DATA@%$INSTALL_DATA%g
16255 s%@PACKAGE@%$PACKAGE%g
16256 s%@VERSION@%$VERSION%g
16257 s%@ACLOCAL@%$ACLOCAL%g
16258 s%@AUTOCONF@%$AUTOCONF%g
16259 s%@AUTOMAKE@%$AUTOMAKE%g
16260 s%@AUTOHEADER@%$AUTOHEADER%g
16261 s%@MAKEINFO@%$MAKEINFO%g
16262 s%@install_sh@%$install_sh%g
16263 s%@AMTAR@%$AMTAR%g
16264 s%@AWK@%$AWK%g
16265 s%@AMTARFLAGS@%$AMTARFLAGS%g
16266 s%@SET_MAKE@%$SET_MAKE%g
16267 s%@top_builddir@%$top_builddir%g
16268 s%@ldap_subdir@%$ldap_subdir%g
16269 s%@CC@%$CC%g
16270 s%@RANLIB@%$RANLIB%g
16271 s%@LD@%$LD%g
16272 s%@NM@%$NM%g
16273 s%@LN_S@%$LN_S%g
16274 s%@DLLTOOL@%$DLLTOOL%g
16275 s%@AS@%$AS%g
16276 s%@OBJDUMP@%$OBJDUMP%g
16277 s%@LIBTOOL@%$LIBTOOL%g
16278 s%@LN_H@%$LN_H%g
16279 s%@SENDMAIL@%$SENDMAIL%g
16280 s%@EDITOR@%$EDITOR%g
16281 s%@FINGER@%$FINGER%g
16282 s%@PERLBIN@%$PERLBIN%g
16283 s%@CPP@%$CPP%g
16284 s%@EXEEXT@%$EXEEXT%g
16285 s%@OBJEXT@%$OBJEXT%g
16286 s%@OL_MKDEP@%$OL_MKDEP%g
16287 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16288 s%@PEPSY@%$PEPSY%g
16289 s%@LIBOBJS@%$LIBOBJS%g
16290 s%@LIBSRCS@%$LIBSRCS%g
16291 s%@PLAT@%$PLAT%g
16292 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16293 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16294 s%@DYN_EXT@%$DYN_EXT%g
16295 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
16296 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16297 s%@BUILD_BDB2@%$BUILD_BDB2%g
16298 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16299 s%@BUILD_LDAP@%$BUILD_LDAP%g
16300 s%@BUILD_LDBM@%$BUILD_LDBM%g
16301 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16302 s%@BUILD_PERL@%$BUILD_PERL%g
16303 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16304 s%@BUILD_SHELL@%$BUILD_SHELL%g
16305 s%@BUILD_SQL@%$BUILD_SQL%g
16306 s%@BUILD_TCL@%$BUILD_TCL%g
16307 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
16308 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16309 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16310 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16311 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16312 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16313 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16314 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16315 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16316 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16317 s%@LDAP_LIBS@%$LDAP_LIBS%g
16318 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
16319 s%@LDIF_LIBS@%$LDIF_LIBS%g
16320 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16321 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16322 s%@LDBM_LIBS@%$LDBM_LIBS%g
16323 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16324 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16325 s%@WRAP_LIBS@%$WRAP_LIBS%g
16326 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16327 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16328 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16329 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16330 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16331 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16332 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16333 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16334 s%@KRB4_LIBS@%$KRB4_LIBS%g
16335 s%@KRB5_LIBS@%$KRB5_LIBS%g
16336 s%@READLINE_LIBS@%$READLINE_LIBS%g
16337 s%@SASL_LIBS@%$SASL_LIBS%g
16338 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16339 s%@TLS_LIBS@%$TLS_LIBS%g
16340 s%@MODULES_LIBS@%$MODULES_LIBS%g
16341 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16342 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16343 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16344
16345 CEOF
16346 EOF
16347
16348 cat >> $CONFIG_STATUS <<\EOF
16349
16350 # Split the substitutions into bite-sized pieces for seds with
16351 # small command number limits, like on Digital OSF/1 and HP-UX.
16352 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16353 ac_file=1 # Number of current file.
16354 ac_beg=1 # First line for current file.
16355 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16356 ac_more_lines=:
16357 ac_sed_cmds=""
16358 while $ac_more_lines; do
16359   if test $ac_beg -gt 1; then
16360     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16361   else
16362     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16363   fi
16364   if test ! -s conftest.s$ac_file; then
16365     ac_more_lines=false
16366     rm -f conftest.s$ac_file
16367   else
16368     if test -z "$ac_sed_cmds"; then
16369       ac_sed_cmds="sed -f conftest.s$ac_file"
16370     else
16371       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16372     fi
16373     ac_file=`expr $ac_file + 1`
16374     ac_beg=$ac_end
16375     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16376   fi
16377 done
16378 if test -z "$ac_sed_cmds"; then
16379   ac_sed_cmds=cat
16380 fi
16381 EOF
16382
16383 cat >> $CONFIG_STATUS <<EOF
16384
16385 CONFIG_FILES=\${CONFIG_FILES-"\
16386 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16387 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16388 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16389 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16390 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16391 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16392 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16393 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16394 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16395 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16396 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16397 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16398 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16399 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16400 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16401 include/Makefile:build/top.mk:include/Makefile.in \
16402 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16403 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16404 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16405 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16406 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16407 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16408 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16409 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16410 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16411 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16412 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
16413 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16414 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16415 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16416 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16417 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16418 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16419 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16420 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16421 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16422 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16423 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16424 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16425 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16426 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16427 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16428 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16429 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16430 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16431 "}
16432 EOF
16433 cat >> $CONFIG_STATUS <<\EOF
16434 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16435   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16436   case "$ac_file" in
16437   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16438        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16439   *) ac_file_in="${ac_file}.in" ;;
16440   esac
16441
16442   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16443
16444   # Remove last slash and all that follows it.  Not all systems have dirname.
16445   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16446   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16447     # The file is in a subdirectory.
16448     test ! -d "$ac_dir" && mkdir "$ac_dir"
16449     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16450     # A "../" for each directory in $ac_dir_suffix.
16451     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16452   else
16453     ac_dir_suffix= ac_dots=
16454   fi
16455
16456   case "$ac_given_srcdir" in
16457   .)  srcdir=.
16458       if test -z "$ac_dots"; then top_srcdir=.
16459       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16460   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16461   *) # Relative path.
16462     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16463     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16464   esac
16465
16466   case "$ac_given_INSTALL" in
16467   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16468   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16469   esac
16470
16471   echo creating "$ac_file"
16472   rm -f "$ac_file"
16473   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16474   case "$ac_file" in
16475   *[Mm]akefile*) ac_comsub="1i\\
16476 # $configure_input" ;;
16477   *) ac_comsub= ;;
16478   esac
16479
16480   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16481   sed -e "$ac_comsub
16482 s%@configure_input@%$configure_input%g
16483 s%@srcdir@%$srcdir%g
16484 s%@top_srcdir@%$top_srcdir%g
16485 s%@INSTALL@%$INSTALL%g
16486 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16487 fi; done
16488 rm -f conftest.s*
16489
16490 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16491 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16492 #
16493 # ac_d sets the value in "#define NAME VALUE" lines.
16494 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16495 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16496 ac_dC='\3'
16497 ac_dD='%g'
16498 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16499 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16500 ac_uB='\([      ]\)%\1#\2define\3'
16501 ac_uC=' '
16502 ac_uD='\4%g'
16503 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16504 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16505 ac_eB='$%\1#\2define\3'
16506 ac_eC=' '
16507 ac_eD='%g'
16508
16509 if test "${CONFIG_HEADERS+set}" != set; then
16510 EOF
16511 cat >> $CONFIG_STATUS <<EOF
16512   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16513 EOF
16514 cat >> $CONFIG_STATUS <<\EOF
16515 fi
16516 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16517   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16518   case "$ac_file" in
16519   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16520        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16521   *) ac_file_in="${ac_file}.in" ;;
16522   esac
16523
16524   echo creating $ac_file
16525
16526   rm -f conftest.frag conftest.in conftest.out
16527   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16528   cat $ac_file_inputs > conftest.in
16529
16530 EOF
16531
16532 # Transform confdefs.h into a sed script conftest.vals that substitutes
16533 # the proper values into config.h.in to produce config.h.  And first:
16534 # Protect against being on the right side of a sed subst in config.status.
16535 # Protect against being in an unquoted here document in config.status.
16536 rm -f conftest.vals
16537 cat > conftest.hdr <<\EOF
16538 s/[\\&%]/\\&/g
16539 s%[\\$`]%\\&%g
16540 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16541 s%ac_d%ac_u%gp
16542 s%ac_u%ac_e%gp
16543 EOF
16544 sed -n -f conftest.hdr confdefs.h > conftest.vals
16545 rm -f conftest.hdr
16546
16547 # This sed command replaces #undef with comments.  This is necessary, for
16548 # example, in the case of _POSIX_SOURCE, which is predefined and required
16549 # on some systems where configure will not decide to define it.
16550 cat >> conftest.vals <<\EOF
16551 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16552 EOF
16553
16554 # Break up conftest.vals because some shells have a limit on
16555 # the size of here documents, and old seds have small limits too.
16556
16557 rm -f conftest.tail
16558 while :
16559 do
16560   ac_lines=`grep -c . conftest.vals`
16561   # grep -c gives empty output for an empty file on some AIX systems.
16562   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16563   # Write a limited-size here document to conftest.frag.
16564   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16565   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16566   echo 'CEOF
16567   sed -f conftest.frag conftest.in > conftest.out
16568   rm -f conftest.in
16569   mv conftest.out conftest.in
16570 ' >> $CONFIG_STATUS
16571   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16572   rm -f conftest.vals
16573   mv conftest.tail conftest.vals
16574 done
16575 rm -f conftest.vals
16576
16577 cat >> $CONFIG_STATUS <<\EOF
16578   rm -f conftest.frag conftest.h
16579   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16580   cat conftest.in >> conftest.h
16581   rm -f conftest.in
16582   if cmp -s $ac_file conftest.h 2>/dev/null; then
16583     echo "$ac_file is unchanged"
16584     rm -f conftest.h
16585   else
16586     # Remove last slash and all that follows it.  Not all systems have dirname.
16587       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16588       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16589       # The file is in a subdirectory.
16590       test ! -d "$ac_dir" && mkdir "$ac_dir"
16591     fi
16592     rm -f $ac_file
16593     mv conftest.h $ac_file
16594   fi
16595 fi; done
16596
16597 EOF
16598 cat >> $CONFIG_STATUS <<EOF
16599
16600 EOF
16601 cat >> $CONFIG_STATUS <<\EOF
16602
16603 date > stamp-h
16604 echo Please \"make depend\" to build dependencies
16605
16606 exit 0
16607 EOF
16608 chmod +x $CONFIG_STATUS
16609 rm -fr confdefs* $ac_clean_files
16610 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16611