]> git.sur5r.net Git - openldap/blob - configure
8273ab9c6a2a2dfdeb89d3db41f533c9204343fb
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.300 2000/05/11 08:10:53 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 AUTH_LIBS=
2622
2623
2624
2625 cat >> confdefs.h <<\EOF
2626 #define HAVE_MKVERSION 1
2627 EOF
2628
2629
2630
2631
2632 ol_aix_threads=no
2633 case "$target" in
2634 *-*-aix*)       if test -z "$CC" ; then
2635                 case "$ol_with_threads" in
2636                 auto | yes |  posix) ol_aix_threads=yes ;;
2637                 esac
2638         fi
2639 ;;
2640 esac
2641
2642 if test $ol_aix_threads = yes ; then
2643         if test -z "${CC}" ; then
2644                 for ac_prog in cc_r xlc_r cc
2645 do
2646 # Extract the first word of "$ac_prog", so it can be a program name with args.
2647 set dummy $ac_prog; ac_word=$2
2648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2649 echo "configure:2650: checking for $ac_word" >&5
2650 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2651   echo $ac_n "(cached) $ac_c" 1>&6
2652 else
2653   if test -n "$CC"; then
2654   ac_cv_prog_CC="$CC" # Let the user override the test.
2655 else
2656   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2657   ac_dummy="$PATH"
2658   for ac_dir in $ac_dummy; do
2659     test -z "$ac_dir" && ac_dir=.
2660     if test -f $ac_dir/$ac_word; then
2661       ac_cv_prog_CC="$ac_prog"
2662       break
2663     fi
2664   done
2665   IFS="$ac_save_ifs"
2666 fi
2667 fi
2668 CC="$ac_cv_prog_CC"
2669 if test -n "$CC"; then
2670   echo "$ac_t""$CC" 1>&6
2671 else
2672   echo "$ac_t""no" 1>&6
2673 fi
2674
2675 test -n "$CC" && break
2676 done
2677
2678
2679                 if test "$CC" = cc ; then
2680                                                 if test $ol_with_threads != auto ; then
2681                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2682                         else
2683                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2684                         fi
2685                         ol_with_threads=no
2686                 fi
2687         fi
2688
2689         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2690                 ol_with_threads=posix
2691                 ol_cv_pthread_create=yes
2692         fi
2693 fi
2694
2695 if test -z "${CC}"; then
2696         for ac_prog in cc
2697 do
2698 # Extract the first word of "$ac_prog", so it can be a program name with args.
2699 set dummy $ac_prog; ac_word=$2
2700 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2701 echo "configure:2702: checking for $ac_word" >&5
2702 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2703   echo $ac_n "(cached) $ac_c" 1>&6
2704 else
2705   if test -n "$CC"; then
2706   ac_cv_prog_CC="$CC" # Let the user override the test.
2707 else
2708   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2709   ac_dummy="$PATH"
2710   for ac_dir in $ac_dummy; do
2711     test -z "$ac_dir" && ac_dir=.
2712     if test -f $ac_dir/$ac_word; then
2713       ac_cv_prog_CC="$ac_prog"
2714       break
2715     fi
2716   done
2717   IFS="$ac_save_ifs"
2718 fi
2719 fi
2720 CC="$ac_cv_prog_CC"
2721 if test -n "$CC"; then
2722   echo "$ac_t""$CC" 1>&6
2723 else
2724   echo "$ac_t""no" 1>&6
2725 fi
2726
2727 test -n "$CC" && break
2728 done
2729
2730 fi
2731
2732
2733
2734
2735 # Check whether --enable-fast-install or --disable-fast-install was given.
2736 if test "${enable_fast_install+set}" = set; then
2737   enableval="$enable_fast_install"
2738   p=${PACKAGE-default}
2739 case "$enableval" in
2740 yes) enable_fast_install=yes ;;
2741 no) enable_fast_install=no ;;
2742 *)
2743   enable_fast_install=no
2744   # Look at the argument we got.  We use all the common list separators.
2745   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2746   for pkg in $enableval; do
2747     if test "X$pkg" = "X$p"; then
2748       enable_fast_install=yes
2749     fi
2750   done
2751   IFS="$ac_save_ifs"
2752   ;;
2753 esac
2754 else
2755   enable_fast_install=yes
2756 fi
2757
2758 # Extract the first word of "ranlib", so it can be a program name with args.
2759 set dummy ranlib; ac_word=$2
2760 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2761 echo "configure:2762: checking for $ac_word" >&5
2762 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2763   echo $ac_n "(cached) $ac_c" 1>&6
2764 else
2765   if test -n "$RANLIB"; then
2766   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2767 else
2768   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2769   ac_dummy="$PATH"
2770   for ac_dir in $ac_dummy; do
2771     test -z "$ac_dir" && ac_dir=.
2772     if test -f $ac_dir/$ac_word; then
2773       ac_cv_prog_RANLIB="ranlib"
2774       break
2775     fi
2776   done
2777   IFS="$ac_save_ifs"
2778   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2779 fi
2780 fi
2781 RANLIB="$ac_cv_prog_RANLIB"
2782 if test -n "$RANLIB"; then
2783   echo "$ac_t""$RANLIB" 1>&6
2784 else
2785   echo "$ac_t""no" 1>&6
2786 fi
2787
2788 # Extract the first word of "gcc", so it can be a program name with args.
2789 set dummy gcc; ac_word=$2
2790 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2791 echo "configure:2792: checking for $ac_word" >&5
2792 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2793   echo $ac_n "(cached) $ac_c" 1>&6
2794 else
2795   if test -n "$CC"; then
2796   ac_cv_prog_CC="$CC" # Let the user override the test.
2797 else
2798   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2799   ac_dummy="$PATH"
2800   for ac_dir in $ac_dummy; do
2801     test -z "$ac_dir" && ac_dir=.
2802     if test -f $ac_dir/$ac_word; then
2803       ac_cv_prog_CC="gcc"
2804       break
2805     fi
2806   done
2807   IFS="$ac_save_ifs"
2808 fi
2809 fi
2810 CC="$ac_cv_prog_CC"
2811 if test -n "$CC"; then
2812   echo "$ac_t""$CC" 1>&6
2813 else
2814   echo "$ac_t""no" 1>&6
2815 fi
2816
2817 if test -z "$CC"; then
2818   # Extract the first word of "cc", so it can be a program name with args.
2819 set dummy cc; ac_word=$2
2820 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2821 echo "configure:2822: checking for $ac_word" >&5
2822 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2823   echo $ac_n "(cached) $ac_c" 1>&6
2824 else
2825   if test -n "$CC"; then
2826   ac_cv_prog_CC="$CC" # Let the user override the test.
2827 else
2828   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2829   ac_prog_rejected=no
2830   ac_dummy="$PATH"
2831   for ac_dir in $ac_dummy; do
2832     test -z "$ac_dir" && ac_dir=.
2833     if test -f $ac_dir/$ac_word; then
2834       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2835         ac_prog_rejected=yes
2836         continue
2837       fi
2838       ac_cv_prog_CC="cc"
2839       break
2840     fi
2841   done
2842   IFS="$ac_save_ifs"
2843 if test $ac_prog_rejected = yes; then
2844   # We found a bogon in the path, so make sure we never use it.
2845   set dummy $ac_cv_prog_CC
2846   shift
2847   if test $# -gt 0; then
2848     # We chose a different compiler from the bogus one.
2849     # However, it has the same basename, so the bogon will be chosen
2850     # first if we set CC to just the basename; use the full file name.
2851     shift
2852     set dummy "$ac_dir/$ac_word" "$@"
2853     shift
2854     ac_cv_prog_CC="$@"
2855   fi
2856 fi
2857 fi
2858 fi
2859 CC="$ac_cv_prog_CC"
2860 if test -n "$CC"; then
2861   echo "$ac_t""$CC" 1>&6
2862 else
2863   echo "$ac_t""no" 1>&6
2864 fi
2865
2866   if test -z "$CC"; then
2867     case "`uname -s`" in
2868     *win32* | *WIN32* | *CYGWIN*)
2869       # Extract the first word of "cl", so it can be a program name with args.
2870 set dummy cl; ac_word=$2
2871 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2872 echo "configure:2873: checking for $ac_word" >&5
2873 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2874   echo $ac_n "(cached) $ac_c" 1>&6
2875 else
2876   if test -n "$CC"; then
2877   ac_cv_prog_CC="$CC" # Let the user override the test.
2878 else
2879   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2880   ac_dummy="$PATH"
2881   for ac_dir in $ac_dummy; do
2882     test -z "$ac_dir" && ac_dir=.
2883     if test -f $ac_dir/$ac_word; then
2884       ac_cv_prog_CC="cl"
2885       break
2886     fi
2887   done
2888   IFS="$ac_save_ifs"
2889 fi
2890 fi
2891 CC="$ac_cv_prog_CC"
2892 if test -n "$CC"; then
2893   echo "$ac_t""$CC" 1>&6
2894 else
2895   echo "$ac_t""no" 1>&6
2896 fi
2897  ;;
2898     esac
2899   fi
2900   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2901 fi
2902
2903 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2904 echo "configure:2905: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2905
2906 ac_ext=c
2907 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2908 ac_cpp='$CPP $CPPFLAGS'
2909 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2910 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2911 cross_compiling=$ac_cv_prog_cc_cross
2912
2913 cat > conftest.$ac_ext << EOF
2914
2915 #line 2916 "configure"
2916 #include "confdefs.h"
2917
2918 main(){return(0);}
2919 EOF
2920 if { (eval echo configure:2921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2921   ac_cv_prog_cc_works=yes
2922   # If we can't run a trivial program, we are probably using a cross compiler.
2923   if (./conftest; exit) 2>/dev/null; then
2924     ac_cv_prog_cc_cross=no
2925   else
2926     ac_cv_prog_cc_cross=yes
2927   fi
2928 else
2929   echo "configure: failed program was:" >&5
2930   cat conftest.$ac_ext >&5
2931   ac_cv_prog_cc_works=no
2932 fi
2933 rm -fr conftest*
2934 ac_ext=c
2935 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2936 ac_cpp='$CPP $CPPFLAGS'
2937 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2938 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2939 cross_compiling=$ac_cv_prog_cc_cross
2940
2941 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2942 if test $ac_cv_prog_cc_works = no; then
2943   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2944 fi
2945 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2946 echo "configure:2947: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2947 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2948 cross_compiling=$ac_cv_prog_cc_cross
2949
2950 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2951 echo "configure:2952: checking whether we are using GNU C" >&5
2952 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2953   echo $ac_n "(cached) $ac_c" 1>&6
2954 else
2955   cat > conftest.c <<EOF
2956 #ifdef __GNUC__
2957   yes;
2958 #endif
2959 EOF
2960 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2961   ac_cv_prog_gcc=yes
2962 else
2963   ac_cv_prog_gcc=no
2964 fi
2965 fi
2966
2967 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2968
2969 if test $ac_cv_prog_gcc = yes; then
2970   GCC=yes
2971 else
2972   GCC=
2973 fi
2974
2975 ac_test_CFLAGS="${CFLAGS+set}"
2976 ac_save_CFLAGS="$CFLAGS"
2977 CFLAGS=
2978 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2979 echo "configure:2980: checking whether ${CC-cc} accepts -g" >&5
2980 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2981   echo $ac_n "(cached) $ac_c" 1>&6
2982 else
2983   echo 'void f(){}' > conftest.c
2984 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2985   ac_cv_prog_cc_g=yes
2986 else
2987   ac_cv_prog_cc_g=no
2988 fi
2989 rm -f conftest*
2990
2991 fi
2992
2993 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2994 if test "$ac_test_CFLAGS" = set; then
2995   CFLAGS="$ac_save_CFLAGS"
2996 elif test $ac_cv_prog_cc_g = yes; then
2997   if test "$GCC" = yes; then
2998     CFLAGS="-g -O2"
2999   else
3000     CFLAGS="-g"
3001   fi
3002 else
3003   if test "$GCC" = yes; then
3004     CFLAGS="-O2"
3005   else
3006     CFLAGS=
3007   fi
3008 fi
3009
3010 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3011 if test "${with_gnu_ld+set}" = set; then
3012   withval="$with_gnu_ld"
3013   test "$withval" = no || with_gnu_ld=yes
3014 else
3015   with_gnu_ld=no
3016 fi
3017
3018 ac_prog=ld
3019 if test "$ac_cv_prog_gcc" = yes; then
3020   # Check if gcc -print-prog-name=ld gives a path.
3021   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3022 echo "configure:3023: checking for ld used by GCC" >&5
3023   ac_prog=`($CC -print-prog-name=ld) 2>&5`
3024   case "$ac_prog" in
3025     # Accept absolute paths.
3026     [\\/]* | [A-Za-z]:[\\/]*)
3027       re_direlt='/[^/][^/]*/\.\./'
3028       # Canonicalize the path of ld
3029       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3030       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3031         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3032       done
3033       test -z "$LD" && LD="$ac_prog"
3034       ;;
3035   "")
3036     # If it fails, then pretend we aren't using GCC.
3037     ac_prog=ld
3038     ;;
3039   *)
3040     # If it is relative, then search for the first ld in PATH.
3041     with_gnu_ld=unknown
3042     ;;
3043   esac
3044 elif test "$with_gnu_ld" = yes; then
3045   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3046 echo "configure:3047: checking for GNU ld" >&5
3047 else
3048   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3049 echo "configure:3050: checking for non-GNU ld" >&5
3050 fi
3051 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
3052   echo $ac_n "(cached) $ac_c" 1>&6
3053 else
3054   if test -z "$LD"; then
3055   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3056   for ac_dir in $PATH; do
3057     test -z "$ac_dir" && ac_dir=.
3058     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3059       ac_cv_path_LD="$ac_dir/$ac_prog"
3060       # Check to see if the program is GNU ld.  I'd rather use --version,
3061       # but apparently some GNU ld's only accept -v.
3062       # Break only if it was the GNU/non-GNU ld that we prefer.
3063       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3064         test "$with_gnu_ld" != no && break
3065       else
3066         test "$with_gnu_ld" != yes && break
3067       fi
3068     fi
3069   done
3070   IFS="$ac_save_ifs"
3071 else
3072   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3073 fi
3074 fi
3075
3076 LD="$ac_cv_path_LD"
3077 if test -n "$LD"; then
3078   echo "$ac_t""$LD" 1>&6
3079 else
3080   echo "$ac_t""no" 1>&6
3081 fi
3082 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3083
3084 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3085 echo "configure:3086: checking if the linker ($LD) is GNU ld" >&5
3086 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3087   echo $ac_n "(cached) $ac_c" 1>&6
3088 else
3089   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3090 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3091   ac_cv_prog_gnu_ld=yes
3092 else
3093   ac_cv_prog_gnu_ld=no
3094 fi
3095 fi
3096
3097 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3098
3099
3100 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3101 echo "configure:3102: checking for BSD-compatible nm" >&5
3102 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3103   echo $ac_n "(cached) $ac_c" 1>&6
3104 else
3105   if test -n "$NM"; then
3106   # Let the user override the test.
3107   ac_cv_path_NM="$NM"
3108 else
3109   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3110   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3111     test -z "$ac_dir" && ac_dir=.
3112     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3113       # Check to see if the nm accepts a BSD-compat flag.
3114       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3115       #   nm: unknown option "B" ignored
3116       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3117         ac_cv_path_NM="$ac_dir/nm -B"
3118         break
3119       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3120         ac_cv_path_NM="$ac_dir/nm -p"
3121         break
3122       else
3123         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3124         continue # so that we can try to find one that supports BSD flags
3125       fi
3126     fi
3127   done
3128   IFS="$ac_save_ifs"
3129   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3130 fi
3131 fi
3132
3133 NM="$ac_cv_path_NM"
3134 echo "$ac_t""$NM" 1>&6
3135
3136
3137 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3138 echo "configure:3139: checking whether ln -s works" >&5
3139 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3140   echo $ac_n "(cached) $ac_c" 1>&6
3141 else
3142   rm -f conftestdata
3143 if ln -s X conftestdata 2>/dev/null
3144 then
3145   rm -f conftestdata
3146   ac_cv_prog_LN_S="ln -s"
3147 else
3148   ac_cv_prog_LN_S=ln
3149 fi
3150 fi
3151 LN_S="$ac_cv_prog_LN_S"
3152 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3153   echo "$ac_t""yes" 1>&6
3154 else
3155   echo "$ac_t""no" 1>&6
3156 fi
3157
3158 if test $host != $build; then
3159   ac_tool_prefix=${host_alias}-
3160 else
3161   ac_tool_prefix=
3162 fi
3163
3164
3165 # Check for any special flags to pass to ltconfig.
3166 libtool_flags="--cache-file=$cache_file"
3167 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3168 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3169 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3170 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3171 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3172 libtool_flags="$libtool_flags --enable-dlopen"
3173 libtool_flags="$libtool_flags --enable-win32-dll"
3174 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3175 if test "${enable_libtool_lock+set}" = set; then
3176   enableval="$enable_libtool_lock"
3177   :
3178 fi
3179
3180 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3181 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3182
3183 # Some flags need to be propagated to the compiler or linker for good
3184 # libtool support.
3185 case "$host" in
3186 *-*-irix6*)
3187   # Find out which ABI we are using.
3188   echo '#line 3189 "configure"' > conftest.$ac_ext
3189   if { (eval echo configure:3190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3190     case "`/usr/bin/file conftest.o`" in
3191     *32-bit*)
3192       LD="${LD-ld} -32"
3193       ;;
3194     *N32*)
3195       LD="${LD-ld} -n32"
3196       ;;
3197     *64-bit*)
3198       LD="${LD-ld} -64"
3199       ;;
3200     esac
3201   fi
3202   rm -rf conftest*
3203   ;;
3204
3205 *-*-sco3.2v5*)
3206   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3207   SAVE_CFLAGS="$CFLAGS"
3208   CFLAGS="$CFLAGS -belf"
3209   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3210 echo "configure:3211: checking whether the C compiler needs -belf" >&5
3211 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3212   echo $ac_n "(cached) $ac_c" 1>&6
3213 else
3214   cat > conftest.$ac_ext <<EOF
3215 #line 3216 "configure"
3216 #include "confdefs.h"
3217
3218 int main() {
3219
3220 ; return 0; }
3221 EOF
3222 if { (eval echo configure:3223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3223   rm -rf conftest*
3224   lt_cv_cc_needs_belf=yes
3225 else
3226   echo "configure: failed program was:" >&5
3227   cat conftest.$ac_ext >&5
3228   rm -rf conftest*
3229   lt_cv_cc_needs_belf=no
3230 fi
3231 rm -f conftest*
3232 fi
3233
3234 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3235   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3236     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3237     CFLAGS="$SAVE_CFLAGS"
3238   fi
3239   ;;
3240
3241 *-*-cygwin* | *-*-mingw*)
3242   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3243 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3244 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3245 echo "configure:3246: checking for $ac_word" >&5
3246 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3247   echo $ac_n "(cached) $ac_c" 1>&6
3248 else
3249   if test -n "$DLLTOOL"; then
3250   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3251 else
3252   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3253   ac_dummy="$PATH"
3254   for ac_dir in $ac_dummy; do
3255     test -z "$ac_dir" && ac_dir=.
3256     if test -f $ac_dir/$ac_word; then
3257       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3258       break
3259     fi
3260   done
3261   IFS="$ac_save_ifs"
3262 fi
3263 fi
3264 DLLTOOL="$ac_cv_prog_DLLTOOL"
3265 if test -n "$DLLTOOL"; then
3266   echo "$ac_t""$DLLTOOL" 1>&6
3267 else
3268   echo "$ac_t""no" 1>&6
3269 fi
3270
3271
3272 if test -z "$ac_cv_prog_DLLTOOL"; then
3273 if test -n "$ac_tool_prefix"; then
3274   # Extract the first word of "dlltool", so it can be a program name with args.
3275 set dummy dlltool; ac_word=$2
3276 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3277 echo "configure:3278: checking for $ac_word" >&5
3278 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3279   echo $ac_n "(cached) $ac_c" 1>&6
3280 else
3281   if test -n "$DLLTOOL"; then
3282   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3283 else
3284   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3285   ac_dummy="$PATH"
3286   for ac_dir in $ac_dummy; do
3287     test -z "$ac_dir" && ac_dir=.
3288     if test -f $ac_dir/$ac_word; then
3289       ac_cv_prog_DLLTOOL="dlltool"
3290       break
3291     fi
3292   done
3293   IFS="$ac_save_ifs"
3294   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3295 fi
3296 fi
3297 DLLTOOL="$ac_cv_prog_DLLTOOL"
3298 if test -n "$DLLTOOL"; then
3299   echo "$ac_t""$DLLTOOL" 1>&6
3300 else
3301   echo "$ac_t""no" 1>&6
3302 fi
3303
3304 else
3305   DLLTOOL="false"
3306 fi
3307 fi
3308
3309   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3310 set dummy ${ac_tool_prefix}as; ac_word=$2
3311 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3312 echo "configure:3313: checking for $ac_word" >&5
3313 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3314   echo $ac_n "(cached) $ac_c" 1>&6
3315 else
3316   if test -n "$AS"; then
3317   ac_cv_prog_AS="$AS" # Let the user override the test.
3318 else
3319   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3320   ac_dummy="$PATH"
3321   for ac_dir in $ac_dummy; do
3322     test -z "$ac_dir" && ac_dir=.
3323     if test -f $ac_dir/$ac_word; then
3324       ac_cv_prog_AS="${ac_tool_prefix}as"
3325       break
3326     fi
3327   done
3328   IFS="$ac_save_ifs"
3329 fi
3330 fi
3331 AS="$ac_cv_prog_AS"
3332 if test -n "$AS"; then
3333   echo "$ac_t""$AS" 1>&6
3334 else
3335   echo "$ac_t""no" 1>&6
3336 fi
3337
3338
3339 if test -z "$ac_cv_prog_AS"; then
3340 if test -n "$ac_tool_prefix"; then
3341   # Extract the first word of "as", so it can be a program name with args.
3342 set dummy as; ac_word=$2
3343 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3344 echo "configure:3345: checking for $ac_word" >&5
3345 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3346   echo $ac_n "(cached) $ac_c" 1>&6
3347 else
3348   if test -n "$AS"; then
3349   ac_cv_prog_AS="$AS" # Let the user override the test.
3350 else
3351   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3352   ac_dummy="$PATH"
3353   for ac_dir in $ac_dummy; do
3354     test -z "$ac_dir" && ac_dir=.
3355     if test -f $ac_dir/$ac_word; then
3356       ac_cv_prog_AS="as"
3357       break
3358     fi
3359   done
3360   IFS="$ac_save_ifs"
3361   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3362 fi
3363 fi
3364 AS="$ac_cv_prog_AS"
3365 if test -n "$AS"; then
3366   echo "$ac_t""$AS" 1>&6
3367 else
3368   echo "$ac_t""no" 1>&6
3369 fi
3370
3371 else
3372   AS="false"
3373 fi
3374 fi
3375
3376   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3377 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3378 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3379 echo "configure:3380: checking for $ac_word" >&5
3380 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3381   echo $ac_n "(cached) $ac_c" 1>&6
3382 else
3383   if test -n "$OBJDUMP"; then
3384   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3385 else
3386   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3387   ac_dummy="$PATH"
3388   for ac_dir in $ac_dummy; do
3389     test -z "$ac_dir" && ac_dir=.
3390     if test -f $ac_dir/$ac_word; then
3391       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3392       break
3393     fi
3394   done
3395   IFS="$ac_save_ifs"
3396 fi
3397 fi
3398 OBJDUMP="$ac_cv_prog_OBJDUMP"
3399 if test -n "$OBJDUMP"; then
3400   echo "$ac_t""$OBJDUMP" 1>&6
3401 else
3402   echo "$ac_t""no" 1>&6
3403 fi
3404
3405
3406 if test -z "$ac_cv_prog_OBJDUMP"; then
3407 if test -n "$ac_tool_prefix"; then
3408   # Extract the first word of "objdump", so it can be a program name with args.
3409 set dummy objdump; ac_word=$2
3410 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3411 echo "configure:3412: checking for $ac_word" >&5
3412 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3413   echo $ac_n "(cached) $ac_c" 1>&6
3414 else
3415   if test -n "$OBJDUMP"; then
3416   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3417 else
3418   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3419   ac_dummy="$PATH"
3420   for ac_dir in $ac_dummy; do
3421     test -z "$ac_dir" && ac_dir=.
3422     if test -f $ac_dir/$ac_word; then
3423       ac_cv_prog_OBJDUMP="objdump"
3424       break
3425     fi
3426   done
3427   IFS="$ac_save_ifs"
3428   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3429 fi
3430 fi
3431 OBJDUMP="$ac_cv_prog_OBJDUMP"
3432 if test -n "$OBJDUMP"; then
3433   echo "$ac_t""$OBJDUMP" 1>&6
3434 else
3435   echo "$ac_t""no" 1>&6
3436 fi
3437
3438 else
3439   OBJDUMP="false"
3440 fi
3441 fi
3442
3443   ;;
3444
3445 esac
3446
3447
3448 # Save cache, so that ltconfig can load it
3449
3450
3451 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3452 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3453 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3454 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3455 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3456 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3457 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3458 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3459
3460 # Reload cache, that may have been modified by ltconfig
3461
3462
3463 # This can be used to rebuild libtool when needed
3464 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3465
3466 # Always use our own libtool.
3467 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3468
3469 # Redirect the config.log output again, so that the ltconfig log is not
3470 # clobbered by the next message.
3471 exec 5>>./config.log
3472
3473
3474 for ac_prog in mawk gawk nawk awk
3475 do
3476 # Extract the first word of "$ac_prog", so it can be a program name with args.
3477 set dummy $ac_prog; ac_word=$2
3478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3479 echo "configure:3480: checking for $ac_word" >&5
3480 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3481   echo $ac_n "(cached) $ac_c" 1>&6
3482 else
3483   if test -n "$AWK"; then
3484   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3485 else
3486   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3487   ac_dummy="$PATH"
3488   for ac_dir in $ac_dummy; do
3489     test -z "$ac_dir" && ac_dir=.
3490     if test -f $ac_dir/$ac_word; then
3491       ac_cv_prog_AWK="$ac_prog"
3492       break
3493     fi
3494   done
3495   IFS="$ac_save_ifs"
3496 fi
3497 fi
3498 AWK="$ac_cv_prog_AWK"
3499 if test -n "$AWK"; then
3500   echo "$ac_t""$AWK" 1>&6
3501 else
3502   echo "$ac_t""no" 1>&6
3503 fi
3504
3505 test -n "$AWK" && break
3506 done
3507
3508 # test for ln hardlink support
3509 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3510 echo "configure:3511: checking whether ln works" >&5
3511 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3512   echo $ac_n "(cached) $ac_c" 1>&6
3513 else
3514   rm -f conftest.src conftest.dst
3515 echo "conftest" > conftest.src
3516 if ln conftest.src conftest.dst 2>/dev/null
3517 then
3518   ol_cv_prog_LN_H="ln"
3519 else
3520   ol_cv_prog_LN_H="cp"
3521 fi
3522 rm -f conftest.src conftest.dst
3523
3524 fi
3525 LN_H="$ol_cv_prog_LN_H"
3526 if test "$ol_cv_prog_LN_H" = "ln"; then
3527         echo "$ac_t""yes" 1>&6
3528 else
3529         echo "$ac_t""no" 1>&6
3530 fi
3531
3532 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3533 echo "configure:3534: checking whether ln -s works" >&5
3534 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3535   echo $ac_n "(cached) $ac_c" 1>&6
3536 else
3537   rm -f conftestdata
3538 if ln -s X conftestdata 2>/dev/null
3539 then
3540   rm -f conftestdata
3541   ac_cv_prog_LN_S="ln -s"
3542 else
3543   ac_cv_prog_LN_S=ln
3544 fi
3545 fi
3546 LN_S="$ac_cv_prog_LN_S"
3547 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3548   echo "$ac_t""yes" 1>&6
3549 else
3550   echo "$ac_t""no" 1>&6
3551 fi
3552
3553
3554 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3555         LN_S="$LN_H"
3556 fi
3557
3558 # Extract the first word of "sendmail", so it can be a program name with args.
3559 set dummy sendmail; ac_word=$2
3560 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3561 echo "configure:3562: checking for $ac_word" >&5
3562 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3563   echo $ac_n "(cached) $ac_c" 1>&6
3564 else
3565   case "$SENDMAIL" in
3566   /*)
3567   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3568   ;;
3569   ?:/*)
3570   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3571   ;;
3572   *)
3573   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3574   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3575   for ac_dir in $ac_dummy; do 
3576     test -z "$ac_dir" && ac_dir=.
3577     if test -f $ac_dir/$ac_word; then
3578       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3579       break
3580     fi
3581   done
3582   IFS="$ac_save_ifs"
3583   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3584   ;;
3585 esac
3586 fi
3587 SENDMAIL="$ac_cv_path_SENDMAIL"
3588 if test -n "$SENDMAIL"; then
3589   echo "$ac_t""$SENDMAIL" 1>&6
3590 else
3591   echo "$ac_t""no" 1>&6
3592 fi
3593
3594 # Extract the first word of "vi", so it can be a program name with args.
3595 set dummy vi; ac_word=$2
3596 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3597 echo "configure:3598: checking for $ac_word" >&5
3598 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3599   echo $ac_n "(cached) $ac_c" 1>&6
3600 else
3601   case "$EDITOR" in
3602   /*)
3603   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3604   ;;
3605   ?:/*)
3606   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3607   ;;
3608   *)
3609   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3610   ac_dummy="$PATH:/usr/ucb"
3611   for ac_dir in $ac_dummy; do 
3612     test -z "$ac_dir" && ac_dir=.
3613     if test -f $ac_dir/$ac_word; then
3614       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3615       break
3616     fi
3617   done
3618   IFS="$ac_save_ifs"
3619   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3620   ;;
3621 esac
3622 fi
3623 EDITOR="$ac_cv_path_EDITOR"
3624 if test -n "$EDITOR"; then
3625   echo "$ac_t""$EDITOR" 1>&6
3626 else
3627   echo "$ac_t""no" 1>&6
3628 fi
3629
3630 # Extract the first word of "finger", so it can be a program name with args.
3631 set dummy finger; ac_word=$2
3632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3633 echo "configure:3634: checking for $ac_word" >&5
3634 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3635   echo $ac_n "(cached) $ac_c" 1>&6
3636 else
3637   case "$FINGER" in
3638   /*)
3639   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3640   ;;
3641   ?:/*)
3642   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3643   ;;
3644   *)
3645   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3646   ac_dummy="$PATH:/usr/ucb"
3647   for ac_dir in $ac_dummy; do 
3648     test -z "$ac_dir" && ac_dir=.
3649     if test -f $ac_dir/$ac_word; then
3650       ac_cv_path_FINGER="$ac_dir/$ac_word"
3651       break
3652     fi
3653   done
3654   IFS="$ac_save_ifs"
3655   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3656   ;;
3657 esac
3658 fi
3659 FINGER="$ac_cv_path_FINGER"
3660 if test -n "$FINGER"; then
3661   echo "$ac_t""$FINGER" 1>&6
3662 else
3663   echo "$ac_t""no" 1>&6
3664 fi
3665
3666
3667 ol_link_perl=no
3668 if test $ol_enable_perl != no ; then
3669         # Extract the first word of "perl", so it can be a program name with args.
3670 set dummy perl; ac_word=$2
3671 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3672 echo "configure:3673: checking for $ac_word" >&5
3673 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3674   echo $ac_n "(cached) $ac_c" 1>&6
3675 else
3676   case "$PERLBIN" in
3677   /*)
3678   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3679   ;;
3680   ?:/*)
3681   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3682   ;;
3683   *)
3684   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3685   ac_dummy="$PATH"
3686   for ac_dir in $ac_dummy; do 
3687     test -z "$ac_dir" && ac_dir=.
3688     if test -f $ac_dir/$ac_word; then
3689       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3690       break
3691     fi
3692   done
3693   IFS="$ac_save_ifs"
3694   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3695   ;;
3696 esac
3697 fi
3698 PERLBIN="$ac_cv_path_PERLBIN"
3699 if test -n "$PERLBIN"; then
3700   echo "$ac_t""$PERLBIN" 1>&6
3701 else
3702   echo "$ac_t""no" 1>&6
3703 fi
3704
3705
3706         if test "no$PERLBIN" = "no" ; then
3707                 if test $ol_enable_perl = yes ; then
3708                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3709                 fi
3710
3711         else
3712                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3713                 if test x"$ol_with_perl_module" = "xstatic" ; then
3714                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3715                 else
3716                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3717                 fi
3718                                 ol_link_perl=yes
3719         fi
3720 fi
3721
3722 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3723 echo "configure:3724: checking how to run the C preprocessor" >&5
3724 # On Suns, sometimes $CPP names a directory.
3725 if test -n "$CPP" && test -d "$CPP"; then
3726   CPP=
3727 fi
3728 if test -z "$CPP"; then
3729 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3730   echo $ac_n "(cached) $ac_c" 1>&6
3731 else
3732     # This must be in double quotes, not single quotes, because CPP may get
3733   # substituted into the Makefile and "${CC-cc}" will confuse make.
3734   CPP="${CC-cc} -E"
3735   # On the NeXT, cc -E runs the code through the compiler's parser,
3736   # not just through cpp.
3737   cat > conftest.$ac_ext <<EOF
3738 #line 3739 "configure"
3739 #include "confdefs.h"
3740 #include <assert.h>
3741 Syntax Error
3742 EOF
3743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3744 { (eval echo configure:3745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3746 if test -z "$ac_err"; then
3747   :
3748 else
3749   echo "$ac_err" >&5
3750   echo "configure: failed program was:" >&5
3751   cat conftest.$ac_ext >&5
3752   rm -rf conftest*
3753   CPP="${CC-cc} -E -traditional-cpp"
3754   cat > conftest.$ac_ext <<EOF
3755 #line 3756 "configure"
3756 #include "confdefs.h"
3757 #include <assert.h>
3758 Syntax Error
3759 EOF
3760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3761 { (eval echo configure:3762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3763 if test -z "$ac_err"; then
3764   :
3765 else
3766   echo "$ac_err" >&5
3767   echo "configure: failed program was:" >&5
3768   cat conftest.$ac_ext >&5
3769   rm -rf conftest*
3770   CPP="${CC-cc} -nologo -E"
3771   cat > conftest.$ac_ext <<EOF
3772 #line 3773 "configure"
3773 #include "confdefs.h"
3774 #include <assert.h>
3775 Syntax Error
3776 EOF
3777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3778 { (eval echo configure:3779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3780 if test -z "$ac_err"; then
3781   :
3782 else
3783   echo "$ac_err" >&5
3784   echo "configure: failed program was:" >&5
3785   cat conftest.$ac_ext >&5
3786   rm -rf conftest*
3787   CPP=/lib/cpp
3788 fi
3789 rm -f conftest*
3790 fi
3791 rm -f conftest*
3792 fi
3793 rm -f conftest*
3794   ac_cv_prog_CPP="$CPP"
3795 fi
3796   CPP="$ac_cv_prog_CPP"
3797 else
3798   ac_cv_prog_CPP="$CPP"
3799 fi
3800 echo "$ac_t""$CPP" 1>&6
3801
3802
3803 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3804         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3805
3806 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3807         echo "configure: warning: programs compiled here do run here..." 1>&2
3808         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3809
3810 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3811         echo "configure: warning: programs compiled here do not run here..." 1>&2
3812         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3813 fi
3814
3815 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3816 echo "configure:3817: checking for AIX" >&5
3817 cat > conftest.$ac_ext <<EOF
3818 #line 3819 "configure"
3819 #include "confdefs.h"
3820 #ifdef _AIX
3821   yes
3822 #endif
3823
3824 EOF
3825 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3826   egrep "yes" >/dev/null 2>&1; then
3827   rm -rf conftest*
3828   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3829 #define _ALL_SOURCE 1
3830 EOF
3831
3832 else
3833   rm -rf conftest*
3834   echo "$ac_t""no" 1>&6
3835 fi
3836 rm -f conftest*
3837
3838
3839 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3840 echo "configure:3841: checking for POSIXized ISC" >&5
3841 if test -d /etc/conf/kconfig.d &&
3842   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3843 then
3844   echo "$ac_t""yes" 1>&6
3845   ISC=yes # If later tests want to check for ISC.
3846   cat >> confdefs.h <<\EOF
3847 #define _POSIX_SOURCE 1
3848 EOF
3849
3850   if test "$GCC" = yes; then
3851     CC="$CC -posix"
3852   else
3853     CC="$CC -Xp"
3854   fi
3855 else
3856   echo "$ac_t""no" 1>&6
3857   ISC=
3858 fi
3859
3860 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3861 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3862 echo "configure:3863: checking for minix/config.h" >&5
3863 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3864   echo $ac_n "(cached) $ac_c" 1>&6
3865 else
3866   cat > conftest.$ac_ext <<EOF
3867 #line 3868 "configure"
3868 #include "confdefs.h"
3869 #include <minix/config.h>
3870 EOF
3871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3872 { (eval echo configure:3873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3874 if test -z "$ac_err"; then
3875   rm -rf conftest*
3876   eval "ac_cv_header_$ac_safe=yes"
3877 else
3878   echo "$ac_err" >&5
3879   echo "configure: failed program was:" >&5
3880   cat conftest.$ac_ext >&5
3881   rm -rf conftest*
3882   eval "ac_cv_header_$ac_safe=no"
3883 fi
3884 rm -f conftest*
3885 fi
3886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3887   echo "$ac_t""yes" 1>&6
3888   MINIX=yes
3889 else
3890   echo "$ac_t""no" 1>&6
3891 MINIX=
3892 fi
3893
3894 if test "$MINIX" = yes; then
3895   cat >> confdefs.h <<\EOF
3896 #define _POSIX_SOURCE 1
3897 EOF
3898
3899   cat >> confdefs.h <<\EOF
3900 #define _POSIX_1_SOURCE 2
3901 EOF
3902
3903   cat >> confdefs.h <<\EOF
3904 #define _MINIX 1
3905 EOF
3906
3907 fi
3908
3909
3910 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3911 echo "configure:3912: checking for Cygwin environment" >&5
3912 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3913   echo $ac_n "(cached) $ac_c" 1>&6
3914 else
3915   cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918
3919 int main() {
3920
3921 #ifndef __CYGWIN__
3922 #define __CYGWIN__ __CYGWIN32__
3923 #endif
3924 return __CYGWIN__;
3925 ; return 0; }
3926 EOF
3927 if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3928   rm -rf conftest*
3929   ac_cv_cygwin=yes
3930 else
3931   echo "configure: failed program was:" >&5
3932   cat conftest.$ac_ext >&5
3933   rm -rf conftest*
3934   ac_cv_cygwin=no
3935 fi
3936 rm -f conftest*
3937 fi
3938
3939 echo "$ac_t""$ac_cv_cygwin" 1>&6
3940 CYGWIN=
3941 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3942 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3943 echo "configure:3944: checking for mingw32 environment" >&5
3944 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3945   echo $ac_n "(cached) $ac_c" 1>&6
3946 else
3947   cat > conftest.$ac_ext <<EOF
3948 #line 3949 "configure"
3949 #include "confdefs.h"
3950
3951 int main() {
3952 return __MINGW32__;
3953 ; return 0; }
3954 EOF
3955 if { (eval echo configure:3956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3956   rm -rf conftest*
3957   ac_cv_mingw32=yes
3958 else
3959   echo "configure: failed program was:" >&5
3960   cat conftest.$ac_ext >&5
3961   rm -rf conftest*
3962   ac_cv_mingw32=no
3963 fi
3964 rm -f conftest*
3965 fi
3966
3967 echo "$ac_t""$ac_cv_mingw32" 1>&6
3968 MINGW32=
3969 test "$ac_cv_mingw32" = yes && MINGW32=yes
3970 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3971 echo "configure:3972: checking for EMX OS/2 environment" >&5
3972 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3973   echo $ac_n "(cached) $ac_c" 1>&6
3974 else
3975   cat > conftest.$ac_ext <<EOF
3976 #line 3977 "configure"
3977 #include "confdefs.h"
3978
3979 int main() {
3980 return __EMX__;
3981 ; return 0; }
3982 EOF
3983 if { (eval echo configure:3984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3984   rm -rf conftest*
3985   ac_cv_emxos2=yes
3986 else
3987   echo "configure: failed program was:" >&5
3988   cat conftest.$ac_ext >&5
3989   rm -rf conftest*
3990   ac_cv_emxos2=no
3991 fi
3992 rm -f conftest*
3993 fi
3994
3995 echo "$ac_t""$ac_cv_emxos2" 1>&6
3996 EMXOS2=
3997 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3998
3999
4000
4001 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4002 echo "configure:4003: checking for executable suffix" >&5
4003 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4004   echo $ac_n "(cached) $ac_c" 1>&6
4005 else
4006   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4007   ac_cv_exeext=.exe
4008 else
4009   rm -f conftest*
4010   echo 'int main () { return 0; }' > conftest.$ac_ext
4011   ac_cv_exeext=
4012   if { (eval echo configure:4013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4013     for file in conftest.*; do
4014       case $file in
4015       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4016       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4017       esac
4018     done
4019   else
4020     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4021   fi
4022   rm -f conftest*
4023   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4024 fi
4025 fi
4026
4027 EXEEXT=""
4028 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4029 echo "$ac_t""${ac_cv_exeext}" 1>&6
4030 ac_exeext=$EXEEXT
4031
4032 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4033 echo "configure:4034: checking for object suffix" >&5
4034 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4035   echo $ac_n "(cached) $ac_c" 1>&6
4036 else
4037   rm -f conftest*
4038 echo 'int i = 1;' > conftest.$ac_ext
4039 if { (eval echo configure:4040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4040   for ac_file in conftest.*; do
4041     case $ac_file in
4042     *.c) ;;
4043     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4044     esac
4045   done
4046 else
4047   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4048 fi
4049 rm -f conftest*
4050 fi
4051
4052 echo "$ac_t""$ac_cv_objext" 1>&6
4053 OBJEXT=$ac_cv_objext
4054 ac_objext=$ac_cv_objext
4055
4056
4057 cat >> confdefs.h <<EOF
4058 #define EXEEXT "${EXEEXT}"
4059 EOF
4060
4061
4062 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4063 echo "configure:4064: checking for be_app in -lbe" >&5
4064 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4066   echo $ac_n "(cached) $ac_c" 1>&6
4067 else
4068   ac_save_LIBS="$LIBS"
4069 LIBS="-lbe -lroot -lnet $LIBS"
4070 cat > conftest.$ac_ext <<EOF
4071 #line 4072 "configure"
4072 #include "confdefs.h"
4073 /* Override any gcc2 internal prototype to avoid an error.  */
4074 /* We use char because int might match the return type of a gcc2
4075     builtin and then its argument prototype would still apply.  */
4076 char be_app();
4077
4078 int main() {
4079 be_app()
4080 ; return 0; }
4081 EOF
4082 if { (eval echo configure:4083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4083   rm -rf conftest*
4084   eval "ac_cv_lib_$ac_lib_var=yes"
4085 else
4086   echo "configure: failed program was:" >&5
4087   cat conftest.$ac_ext >&5
4088   rm -rf conftest*
4089   eval "ac_cv_lib_$ac_lib_var=no"
4090 fi
4091 rm -f conftest*
4092 LIBS="$ac_save_LIBS"
4093
4094 fi
4095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4096   echo "$ac_t""yes" 1>&6
4097   LIBS="$LIBS -lbe -lroot -lnet"
4098 else
4099   echo "$ac_t""no" 1>&6
4100 :
4101 fi
4102
4103
4104
4105
4106
4107 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4108 echo "configure:4109: checking for ${CC-cc} option to accept ANSI C" >&5
4109 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4110   echo $ac_n "(cached) $ac_c" 1>&6
4111 else
4112   am_cv_prog_cc_stdc=no
4113 ac_save_CC="$CC"
4114 # Don't try gcc -ansi; that turns off useful extensions and
4115 # breaks some systems' header files.
4116 # AIX                   -qlanglvl=ansi
4117 # Ultrix and OSF/1      -std1
4118 # HP-UX 10.20 and later -Ae
4119 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4120 # SVR4                  -Xc -D__EXTENSIONS__
4121 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4122 do
4123   CC="$ac_save_CC $ac_arg"
4124   cat > conftest.$ac_ext <<EOF
4125 #line 4126 "configure"
4126 #include "confdefs.h"
4127 #include <stdarg.h>
4128 #include <stdio.h>
4129 #include <sys/types.h>
4130 #include <sys/stat.h>
4131 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4132 struct buf { int x; };
4133 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4134 static char *e (p, i)
4135      char **p;
4136      int i;
4137 {
4138   return p[i];
4139 }
4140 static char *f (char * (*g) (char **, int), char **p, ...)
4141 {
4142   char *s;
4143   va_list v;
4144   va_start (v,p);
4145   s = g (p, va_arg (v,int));
4146   va_end (v);
4147   return s;
4148 }
4149 int test (int i, double x);
4150 struct s1 {int (*f) (int a);};
4151 struct s2 {int (*f) (double a);};
4152 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4153 int argc;
4154 char **argv;
4155
4156 int main() {
4157
4158 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4159
4160 ; return 0; }
4161 EOF
4162 if { (eval echo configure:4163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4163   rm -rf conftest*
4164   am_cv_prog_cc_stdc="$ac_arg"; break
4165 else
4166   echo "configure: failed program was:" >&5
4167   cat conftest.$ac_ext >&5
4168 fi
4169 rm -f conftest*
4170 done
4171 CC="$ac_save_CC"
4172
4173 fi
4174
4175 if test -z "$am_cv_prog_cc_stdc"; then
4176   echo "$ac_t""none needed" 1>&6
4177 else
4178   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4179 fi
4180 case "x$am_cv_prog_cc_stdc" in
4181   x|xno) ;;
4182   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4183 esac
4184
4185 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4186         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4187 fi
4188
4189 # test for make depend flag
4190 OL_MKDEP=
4191 OL_MKDEP_FLAGS=
4192 if test -z "${MKDEP}"; then
4193         OL_MKDEP="${CC-cc}"
4194         if test -z "${MKDEP_FLAGS}"; then
4195                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4196 echo "configure:4197: checking for ${OL_MKDEP} depend flag" >&5
4197 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4198   echo $ac_n "(cached) $ac_c" 1>&6
4199 else
4200   
4201                         ol_cv_mkdep=no
4202                         for flag in "-M" "-xM"; do
4203                                 cat > conftest.c <<EOF
4204  noCode;
4205 EOF
4206                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4207                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4208                                 then
4209                                         if test ! -f conftest."${ac_object}" ; then
4210                                                 ol_cv_mkdep=$flag
4211                                                 OL_MKDEP_FLAGS="$flag"
4212                                                 break
4213                                         fi
4214                                 fi
4215                         done
4216                         rm -f conftest*
4217                 
4218 fi
4219
4220 echo "$ac_t""$ol_cv_mkdep" 1>&6
4221         else
4222                 cc_cv_mkdep=yes
4223                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4224         fi
4225 else
4226         cc_cv_mkdep=yes
4227         OL_MKDEP="${MKDEP}"
4228         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4229 fi
4230
4231
4232
4233 if test "${ol_cv_mkdep}" = no ; then
4234         # this will soon become an error
4235         echo "configure: warning: do not know how to generate dependencies" 1>&2
4236 fi
4237
4238 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4239 echo "configure:4240: checking for afopen in -ls" >&5
4240 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4241 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4242   echo $ac_n "(cached) $ac_c" 1>&6
4243 else
4244   ac_save_LIBS="$LIBS"
4245 LIBS="-ls  $LIBS"
4246 cat > conftest.$ac_ext <<EOF
4247 #line 4248 "configure"
4248 #include "confdefs.h"
4249 /* Override any gcc2 internal prototype to avoid an error.  */
4250 /* We use char because int might match the return type of a gcc2
4251     builtin and then its argument prototype would still apply.  */
4252 char afopen();
4253
4254 int main() {
4255 afopen()
4256 ; return 0; }
4257 EOF
4258 if { (eval echo configure:4259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4259   rm -rf conftest*
4260   eval "ac_cv_lib_$ac_lib_var=yes"
4261 else
4262   echo "configure: failed program was:" >&5
4263   cat conftest.$ac_ext >&5
4264   rm -rf conftest*
4265   eval "ac_cv_lib_$ac_lib_var=no"
4266 fi
4267 rm -f conftest*
4268 LIBS="$ac_save_LIBS"
4269
4270 fi
4271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4272   echo "$ac_t""yes" 1>&6
4273   
4274         AUTH_LIBS=-ls
4275         cat >> confdefs.h <<\EOF
4276 #define HAVE_AIX_SECURITY 1
4277 EOF
4278
4279
4280 else
4281   echo "$ac_t""no" 1>&6
4282 fi
4283
4284
4285 ol_link_modules=no
4286 if test $ol_enable_modules != no ; then
4287         for ac_hdr in ltdl.h
4288 do
4289 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4290 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4291 echo "configure:4292: checking for $ac_hdr" >&5
4292 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4293   echo $ac_n "(cached) $ac_c" 1>&6
4294 else
4295   cat > conftest.$ac_ext <<EOF
4296 #line 4297 "configure"
4297 #include "confdefs.h"
4298 #include <$ac_hdr>
4299 EOF
4300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4301 { (eval echo configure:4302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4303 if test -z "$ac_err"; then
4304   rm -rf conftest*
4305   eval "ac_cv_header_$ac_safe=yes"
4306 else
4307   echo "$ac_err" >&5
4308   echo "configure: failed program was:" >&5
4309   cat conftest.$ac_ext >&5
4310   rm -rf conftest*
4311   eval "ac_cv_header_$ac_safe=no"
4312 fi
4313 rm -f conftest*
4314 fi
4315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4316   echo "$ac_t""yes" 1>&6
4317     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4318   cat >> confdefs.h <<EOF
4319 #define $ac_tr_hdr 1
4320 EOF
4321  
4322 else
4323   echo "$ac_t""no" 1>&6
4324 fi
4325 done
4326
4327
4328         if test $ac_cv_header_ltdl_h = no ; then
4329                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4330         fi
4331
4332         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4333 echo "configure:4334: checking for lt_dlinit in -lltdl" >&5
4334 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4335 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4336   echo $ac_n "(cached) $ac_c" 1>&6
4337 else
4338   ac_save_LIBS="$LIBS"
4339 LIBS="-lltdl  $LIBS"
4340 cat > conftest.$ac_ext <<EOF
4341 #line 4342 "configure"
4342 #include "confdefs.h"
4343 /* Override any gcc2 internal prototype to avoid an error.  */
4344 /* We use char because int might match the return type of a gcc2
4345     builtin and then its argument prototype would still apply.  */
4346 char lt_dlinit();
4347
4348 int main() {
4349 lt_dlinit()
4350 ; return 0; }
4351 EOF
4352 if { (eval echo configure:4353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4353   rm -rf conftest*
4354   eval "ac_cv_lib_$ac_lib_var=yes"
4355 else
4356   echo "configure: failed program was:" >&5
4357   cat conftest.$ac_ext >&5
4358   rm -rf conftest*
4359   eval "ac_cv_lib_$ac_lib_var=no"
4360 fi
4361 rm -f conftest*
4362 LIBS="$ac_save_LIBS"
4363
4364 fi
4365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4366   echo "$ac_t""yes" 1>&6
4367   
4368             MODULES_LIBS=-lltdl
4369             cat >> confdefs.h <<\EOF
4370 #define HAVE_LIBLTDL 1
4371 EOF
4372
4373         
4374 else
4375   echo "$ac_t""no" 1>&6
4376 fi
4377
4378
4379         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4380                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4381         fi
4382         ol_link_modules=yes
4383 else
4384         ol_with_bdb2_module=static
4385         ol_with_dnssrv_module=static
4386         ol_with_ldap_module=static
4387         ol_with_ldbm_module=static
4388         ol_with_passwd_module=static
4389         ol_with_perl_module=static
4390         ol_with_shell_module=static
4391         ol_with_tcl_module=static
4392         ol_with_sql_module=static
4393 fi
4394
4395 # test for EBCDIC
4396 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4397 echo "configure:4398: checking for EBCDIC" >&5
4398 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4399   echo $ac_n "(cached) $ac_c" 1>&6
4400 else
4401   
4402         cat > conftest.$ac_ext <<EOF
4403 #line 4404 "configure"
4404 #include "confdefs.h"
4405
4406 #if !('M' == 0xd4)
4407 #include <__ASCII__/generate_error.h>
4408 #endif
4409
4410 EOF
4411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4412 { (eval echo configure:4413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4414 if test -z "$ac_err"; then
4415   rm -rf conftest*
4416   ol_cv_cpp_ebcdic=yes
4417 else
4418   echo "$ac_err" >&5
4419   echo "configure: failed program was:" >&5
4420   cat conftest.$ac_ext >&5
4421   rm -rf conftest*
4422   ol_cv_cpp_ebcdic=no
4423 fi
4424 rm -f conftest*
4425 fi
4426
4427 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4428 if test $ol_cv_cpp_ebcdic = yes ; then
4429         cat >> confdefs.h <<\EOF
4430 #define HAVE_EBCDIC 1
4431 EOF
4432
4433 fi
4434
4435 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4436 echo "configure:4437: checking for ANSI C header files" >&5
4437 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4438   echo $ac_n "(cached) $ac_c" 1>&6
4439 else
4440   cat > conftest.$ac_ext <<EOF
4441 #line 4442 "configure"
4442 #include "confdefs.h"
4443 #include <stdlib.h>
4444 #include <stdarg.h>
4445 #include <string.h>
4446 #include <float.h>
4447 EOF
4448 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4449 { (eval echo configure:4450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4450 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4451 if test -z "$ac_err"; then
4452   rm -rf conftest*
4453   ol_cv_header_stdc=yes
4454 else
4455   echo "$ac_err" >&5
4456   echo "configure: failed program was:" >&5
4457   cat conftest.$ac_ext >&5
4458   rm -rf conftest*
4459   ol_cv_header_stdc=no
4460 fi
4461 rm -f conftest*
4462
4463 if test $ol_cv_header_stdc = yes; then
4464   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4465 cat > conftest.$ac_ext <<EOF
4466 #line 4467 "configure"
4467 #include "confdefs.h"
4468 #include <string.h>
4469 EOF
4470 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4471   egrep "memchr" >/dev/null 2>&1; then
4472   :
4473 else
4474   rm -rf conftest*
4475   ol_cv_header_stdc=no
4476 fi
4477 rm -f conftest*
4478
4479 fi
4480
4481 if test $ol_cv_header_stdc = yes; then
4482   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4483 cat > conftest.$ac_ext <<EOF
4484 #line 4485 "configure"
4485 #include "confdefs.h"
4486 #include <stdlib.h>
4487 EOF
4488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4489   egrep "free" >/dev/null 2>&1; then
4490   :
4491 else
4492   rm -rf conftest*
4493   ol_cv_header_stdc=no
4494 fi
4495 rm -f conftest*
4496
4497 fi
4498
4499 if test $ol_cv_header_stdc = yes; then
4500   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4501 if test "$cross_compiling" = yes; then
4502   :
4503 else
4504   cat > conftest.$ac_ext <<EOF
4505 #line 4506 "configure"
4506 #include "confdefs.h"
4507 #include <ctype.h>
4508 #ifndef HAVE_EBCDIC
4509 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4510 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4511 #else
4512 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4513                 || ('j' <= (c) && (c) <= 'r') \
4514                 || ('s' <= (c) && (c) <= 'z'))
4515 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4516 #endif
4517 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4518 int main () { int i; for (i = 0; i < 256; i++)
4519 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4520 exit (0); }
4521
4522 EOF
4523 if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4524 then
4525   :
4526 else
4527   echo "configure: failed program was:" >&5
4528   cat conftest.$ac_ext >&5
4529   rm -fr conftest*
4530   ol_cv_header_stdc=no
4531 fi
4532 rm -fr conftest*
4533 fi
4534
4535 fi
4536 fi
4537
4538 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4539 if test $ol_cv_header_stdc = yes; then
4540   cat >> confdefs.h <<\EOF
4541 #define STDC_HEADERS 1
4542 EOF
4543
4544 fi
4545 ac_cv_header_stdc=disable
4546
4547
4548 if test $ol_cv_header_stdc != yes; then
4549         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4550 fi
4551
4552 ac_header_dirent=no
4553 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4554 do
4555 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4556 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4557 echo "configure:4558: checking for $ac_hdr that defines DIR" >&5
4558 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4559   echo $ac_n "(cached) $ac_c" 1>&6
4560 else
4561   cat > conftest.$ac_ext <<EOF
4562 #line 4563 "configure"
4563 #include "confdefs.h"
4564 #include <sys/types.h>
4565 #include <$ac_hdr>
4566 int main() {
4567 DIR *dirp = 0;
4568 ; return 0; }
4569 EOF
4570 if { (eval echo configure:4571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4571   rm -rf conftest*
4572   eval "ac_cv_header_dirent_$ac_safe=yes"
4573 else
4574   echo "configure: failed program was:" >&5
4575   cat conftest.$ac_ext >&5
4576   rm -rf conftest*
4577   eval "ac_cv_header_dirent_$ac_safe=no"
4578 fi
4579 rm -f conftest*
4580 fi
4581 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4582   echo "$ac_t""yes" 1>&6
4583     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4584   cat >> confdefs.h <<EOF
4585 #define $ac_tr_hdr 1
4586 EOF
4587  ac_header_dirent=$ac_hdr; break
4588 else
4589   echo "$ac_t""no" 1>&6
4590 fi
4591 done
4592 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4593 if test $ac_header_dirent = dirent.h; then
4594 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4595 echo "configure:4596: checking for opendir in -ldir" >&5
4596 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4597 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4598   echo $ac_n "(cached) $ac_c" 1>&6
4599 else
4600   ac_save_LIBS="$LIBS"
4601 LIBS="-ldir  $LIBS"
4602 cat > conftest.$ac_ext <<EOF
4603 #line 4604 "configure"
4604 #include "confdefs.h"
4605 /* Override any gcc2 internal prototype to avoid an error.  */
4606 /* We use char because int might match the return type of a gcc2
4607     builtin and then its argument prototype would still apply.  */
4608 char opendir();
4609
4610 int main() {
4611 opendir()
4612 ; return 0; }
4613 EOF
4614 if { (eval echo configure:4615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4615   rm -rf conftest*
4616   eval "ac_cv_lib_$ac_lib_var=yes"
4617 else
4618   echo "configure: failed program was:" >&5
4619   cat conftest.$ac_ext >&5
4620   rm -rf conftest*
4621   eval "ac_cv_lib_$ac_lib_var=no"
4622 fi
4623 rm -f conftest*
4624 LIBS="$ac_save_LIBS"
4625
4626 fi
4627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4628   echo "$ac_t""yes" 1>&6
4629   LIBS="$LIBS -ldir"
4630 else
4631   echo "$ac_t""no" 1>&6
4632 fi
4633
4634 else
4635 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4636 echo "configure:4637: checking for opendir in -lx" >&5
4637 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4638 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4639   echo $ac_n "(cached) $ac_c" 1>&6
4640 else
4641   ac_save_LIBS="$LIBS"
4642 LIBS="-lx  $LIBS"
4643 cat > conftest.$ac_ext <<EOF
4644 #line 4645 "configure"
4645 #include "confdefs.h"
4646 /* Override any gcc2 internal prototype to avoid an error.  */
4647 /* We use char because int might match the return type of a gcc2
4648     builtin and then its argument prototype would still apply.  */
4649 char opendir();
4650
4651 int main() {
4652 opendir()
4653 ; return 0; }
4654 EOF
4655 if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4656   rm -rf conftest*
4657   eval "ac_cv_lib_$ac_lib_var=yes"
4658 else
4659   echo "configure: failed program was:" >&5
4660   cat conftest.$ac_ext >&5
4661   rm -rf conftest*
4662   eval "ac_cv_lib_$ac_lib_var=no"
4663 fi
4664 rm -f conftest*
4665 LIBS="$ac_save_LIBS"
4666
4667 fi
4668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4669   echo "$ac_t""yes" 1>&6
4670   LIBS="$LIBS -lx"
4671 else
4672   echo "$ac_t""no" 1>&6
4673 fi
4674
4675 fi
4676
4677 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4678 echo "configure:4679: checking for sys/wait.h that is POSIX.1 compatible" >&5
4679 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   cat > conftest.$ac_ext <<EOF
4683 #line 4684 "configure"
4684 #include "confdefs.h"
4685 #include <sys/types.h>
4686 #include <sys/wait.h>
4687 #ifndef WEXITSTATUS
4688 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4689 #endif
4690 #ifndef WIFEXITED
4691 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4692 #endif
4693 int main() {
4694 int s;
4695 wait (&s);
4696 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4697 ; return 0; }
4698 EOF
4699 if { (eval echo configure:4700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4700   rm -rf conftest*
4701   ac_cv_header_sys_wait_h=yes
4702 else
4703   echo "configure: failed program was:" >&5
4704   cat conftest.$ac_ext >&5
4705   rm -rf conftest*
4706   ac_cv_header_sys_wait_h=no
4707 fi
4708 rm -f conftest*
4709 fi
4710
4711 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4712 if test $ac_cv_header_sys_wait_h = yes; then
4713   cat >> confdefs.h <<\EOF
4714 #define HAVE_SYS_WAIT_H 1
4715 EOF
4716
4717 fi
4718
4719 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4720 echo "configure:4721: checking POSIX termios" >&5
4721 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4722   echo $ac_n "(cached) $ac_c" 1>&6
4723 else
4724   cat > conftest.$ac_ext <<EOF
4725 #line 4726 "configure"
4726 #include "confdefs.h"
4727 #include <sys/types.h>
4728 #include <unistd.h>
4729 #include <termios.h>
4730 int main() {
4731 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4732    tcgetattr(0, 0);
4733 ; return 0; }
4734 EOF
4735 if { (eval echo configure:4736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4736   rm -rf conftest*
4737   am_cv_sys_posix_termios=yes
4738 else
4739   echo "configure: failed program was:" >&5
4740   cat conftest.$ac_ext >&5
4741   rm -rf conftest*
4742   am_cv_sys_posix_termios=no
4743 fi
4744 rm -f conftest*
4745 fi
4746
4747 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4748
4749
4750  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4751 echo "configure:4752: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4752 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4753   echo $ac_n "(cached) $ac_c" 1>&6
4754 else
4755   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4756
4757   gwinsz_in_termios_h=no
4758   if test $am_cv_sys_posix_termios = yes; then
4759     cat > conftest.$ac_ext <<EOF
4760 #line 4761 "configure"
4761 #include "confdefs.h"
4762 #include <sys/types.h>
4763 #     include <termios.h>
4764 #     ifdef TIOCGWINSZ
4765         yes
4766 #     endif
4767     
4768 EOF
4769 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4770   egrep "yes" >/dev/null 2>&1; then
4771   rm -rf conftest*
4772   gwinsz_in_termios_h=yes
4773 fi
4774 rm -f conftest*
4775
4776   fi
4777
4778   if test $gwinsz_in_termios_h = no; then
4779     cat > conftest.$ac_ext <<EOF
4780 #line 4781 "configure"
4781 #include "confdefs.h"
4782 #include <sys/types.h>
4783 #     include <sys/ioctl.h>
4784 #     ifdef TIOCGWINSZ
4785         yes
4786 #     endif
4787     
4788 EOF
4789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4790   egrep "yes" >/dev/null 2>&1; then
4791   rm -rf conftest*
4792   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4793 fi
4794 rm -f conftest*
4795
4796   fi
4797   
4798 fi
4799
4800 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4801   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4802     cat >> confdefs.h <<\EOF
4803 #define GWINSZ_IN_SYS_IOCTL 1
4804 EOF
4805
4806   fi
4807
4808 if test $am_cv_sys_posix_termios = yes ; then
4809         cat >> confdefs.h <<\EOF
4810 #define HAVE_POSIX_TERMIOS 1
4811 EOF
4812
4813 fi
4814
4815 for ac_hdr in \
4816         arpa/inet.h             \
4817         arpa/nameser.h  \
4818         assert.h                \
4819         conio.h                 \
4820         crypt.h                 \
4821         direct.h                \
4822         errno.h                 \
4823         fcntl.h                 \
4824         filio.h                 \
4825         getopt.h                \
4826         grp.h                   \
4827         io.h                    \
4828         libutil.h               \
4829         limits.h                \
4830         locale.h                \
4831         netinet/tcp.h   \
4832         malloc.h                \
4833         memory.h                \
4834         psap.h                  \
4835         pwd.h                   \
4836         process.h               \
4837         resolv.h                \
4838         sgtty.h                 \
4839         shadow.h                \
4840         stddef.h                \
4841         string.h                \
4842         strings.h               \
4843         sysexits.h              \
4844         sys/file.h              \
4845         sys/filio.h             \
4846         sys/errno.h             \
4847         sys/ioctl.h             \
4848         sys/param.h             \
4849         sys/resource.h  \
4850         sys/select.h    \
4851         sys/socket.h    \
4852         sys/syslog.h    \
4853         sys/time.h              \
4854         sys/types.h             \
4855         syslog.h                \
4856         termios.h               \
4857         unistd.h                \
4858         winsock.h               \
4859
4860 do
4861 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4862 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4863 echo "configure:4864: checking for $ac_hdr" >&5
4864 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4865   echo $ac_n "(cached) $ac_c" 1>&6
4866 else
4867   cat > conftest.$ac_ext <<EOF
4868 #line 4869 "configure"
4869 #include "confdefs.h"
4870 #include <$ac_hdr>
4871 EOF
4872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4873 { (eval echo configure:4874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4875 if test -z "$ac_err"; then
4876   rm -rf conftest*
4877   eval "ac_cv_header_$ac_safe=yes"
4878 else
4879   echo "$ac_err" >&5
4880   echo "configure: failed program was:" >&5
4881   cat conftest.$ac_ext >&5
4882   rm -rf conftest*
4883   eval "ac_cv_header_$ac_safe=no"
4884 fi
4885 rm -f conftest*
4886 fi
4887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4888   echo "$ac_t""yes" 1>&6
4889     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4890   cat >> confdefs.h <<EOF
4891 #define $ac_tr_hdr 1
4892 EOF
4893  
4894 else
4895   echo "$ac_t""no" 1>&6
4896 fi
4897 done
4898
4899
4900
4901
4902 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4903 echo "configure:4904: checking for sigset in -lV3" >&5
4904 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4905 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4906   echo $ac_n "(cached) $ac_c" 1>&6
4907 else
4908   ac_save_LIBS="$LIBS"
4909 LIBS="-lV3  $LIBS"
4910 cat > conftest.$ac_ext <<EOF
4911 #line 4912 "configure"
4912 #include "confdefs.h"
4913 /* Override any gcc2 internal prototype to avoid an error.  */
4914 /* We use char because int might match the return type of a gcc2
4915     builtin and then its argument prototype would still apply.  */
4916 char sigset();
4917
4918 int main() {
4919 sigset()
4920 ; return 0; }
4921 EOF
4922 if { (eval echo configure:4923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4923   rm -rf conftest*
4924   eval "ac_cv_lib_$ac_lib_var=yes"
4925 else
4926   echo "configure: failed program was:" >&5
4927   cat conftest.$ac_ext >&5
4928   rm -rf conftest*
4929   eval "ac_cv_lib_$ac_lib_var=no"
4930 fi
4931 rm -f conftest*
4932 LIBS="$ac_save_LIBS"
4933
4934 fi
4935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4936   echo "$ac_t""yes" 1>&6
4937     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4938     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4939   cat >> confdefs.h <<EOF
4940 #define $ac_tr_lib 1
4941 EOF
4942
4943   LIBS="-lV3 $LIBS"
4944
4945 else
4946   echo "$ac_t""no" 1>&6
4947 fi
4948
4949
4950 if test $ac_cv_header_winsock_h = yes; then
4951         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4952 echo "configure:4953: checking for winsock" >&5
4953 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4954   echo $ac_n "(cached) $ac_c" 1>&6
4955 else
4956   cat > conftest.$ac_ext <<EOF
4957 #line 4958 "configure"
4958 #include "confdefs.h"
4959 #include <winsock.h>
4960 int main() {
4961
4962                         socket(0,0,0);
4963                         select(0,NULL,NULL,NULL,NULL);
4964                         closesocket(0);
4965                         gethostname(NULL,0);
4966         
4967 ; return 0; }
4968 EOF
4969 if { (eval echo configure:4970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4970   rm -rf conftest*
4971   ol_cv_winsock=yes
4972 else
4973   echo "configure: failed program was:" >&5
4974   cat conftest.$ac_ext >&5
4975   rm -rf conftest*
4976   ol_cv_winsock=no
4977 fi
4978 rm -f conftest*]
4979 fi
4980
4981 echo "$ac_t""$ol_cv_winsock" 1>&6
4982
4983         if test $ol_cv_winsock = yes ; then
4984                 cat >> confdefs.h <<\EOF
4985 #define HAVE_WINSOCK 1
4986 EOF
4987
4988                 ac_cv_func_socket=yes
4989                 ac_cv_func_select=yes
4990                 ac_cv_func_closesocket=yes
4991                 ac_cv_func_gethostname=yes
4992         fi
4993 fi
4994
4995
4996 echo $ac_n "checking for socket""... $ac_c" 1>&6
4997 echo "configure:4998: checking for socket" >&5
4998 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4999   echo $ac_n "(cached) $ac_c" 1>&6
5000 else
5001   cat > conftest.$ac_ext <<EOF
5002 #line 5003 "configure"
5003 #include "confdefs.h"
5004 /* System header to define __stub macros and hopefully few prototypes,
5005     which can conflict with char socket(); below.  */
5006 #include <assert.h>
5007 /* Override any gcc2 internal prototype to avoid an error.  */
5008 /* We use char because int might match the return type of a gcc2
5009     builtin and then its argument prototype would still apply.  */
5010 char socket();
5011 char (*f)();
5012
5013 int main() {
5014
5015 /* The GNU C library defines this for functions which it implements
5016     to always fail with ENOSYS.  Some functions are actually named
5017     something starting with __ and the normal name is an alias.  */
5018 #if defined (__stub_socket) || defined (__stub___socket)
5019 choke me
5020 #else
5021 f = socket;
5022 #endif
5023
5024 ; return 0; }
5025 EOF
5026 if { (eval echo configure:5027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5027   rm -rf conftest*
5028   eval "ac_cv_func_socket=yes"
5029 else
5030   echo "configure: failed program was:" >&5
5031   cat conftest.$ac_ext >&5
5032   rm -rf conftest*
5033   eval "ac_cv_func_socket=no"
5034 fi
5035 rm -f conftest*
5036 fi
5037
5038 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5039   echo "$ac_t""yes" 1>&6
5040   :
5041 else
5042   echo "$ac_t""no" 1>&6
5043         
5044         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5045 echo "configure:5046: checking for main in -lsocket" >&5
5046 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5047 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5048   echo $ac_n "(cached) $ac_c" 1>&6
5049 else
5050   ac_save_LIBS="$LIBS"
5051 LIBS="-lsocket  $LIBS"
5052 cat > conftest.$ac_ext <<EOF
5053 #line 5054 "configure"
5054 #include "confdefs.h"
5055
5056 int main() {
5057 main()
5058 ; return 0; }
5059 EOF
5060 if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5061   rm -rf conftest*
5062   eval "ac_cv_lib_$ac_lib_var=yes"
5063 else
5064   echo "configure: failed program was:" >&5
5065   cat conftest.$ac_ext >&5
5066   rm -rf conftest*
5067   eval "ac_cv_lib_$ac_lib_var=no"
5068 fi
5069 rm -f conftest*
5070 LIBS="$ac_save_LIBS"
5071
5072 fi
5073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5074   echo "$ac_t""yes" 1>&6
5075     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5076     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5077   cat >> confdefs.h <<EOF
5078 #define $ac_tr_lib 1
5079 EOF
5080
5081   LIBS="-lsocket $LIBS"
5082
5083 else
5084   echo "$ac_t""no" 1>&6
5085 fi
5086
5087         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5088 echo "configure:5089: checking for main in -lnet" >&5
5089 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5090 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5091   echo $ac_n "(cached) $ac_c" 1>&6
5092 else
5093   ac_save_LIBS="$LIBS"
5094 LIBS="-lnet  $LIBS"
5095 cat > conftest.$ac_ext <<EOF
5096 #line 5097 "configure"
5097 #include "confdefs.h"
5098
5099 int main() {
5100 main()
5101 ; return 0; }
5102 EOF
5103 if { (eval echo configure:5104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5104   rm -rf conftest*
5105   eval "ac_cv_lib_$ac_lib_var=yes"
5106 else
5107   echo "configure: failed program was:" >&5
5108   cat conftest.$ac_ext >&5
5109   rm -rf conftest*
5110   eval "ac_cv_lib_$ac_lib_var=no"
5111 fi
5112 rm -f conftest*
5113 LIBS="$ac_save_LIBS"
5114
5115 fi
5116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5117   echo "$ac_t""yes" 1>&6
5118     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5119     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5120   cat >> confdefs.h <<EOF
5121 #define $ac_tr_lib 1
5122 EOF
5123
5124   LIBS="-lnet $LIBS"
5125
5126 else
5127   echo "$ac_t""no" 1>&6
5128 fi
5129
5130         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5131 echo "configure:5132: checking for main in -lnsl_s" >&5
5132 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5133 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5134   echo $ac_n "(cached) $ac_c" 1>&6
5135 else
5136   ac_save_LIBS="$LIBS"
5137 LIBS="-lnsl_s  $LIBS"
5138 cat > conftest.$ac_ext <<EOF
5139 #line 5140 "configure"
5140 #include "confdefs.h"
5141
5142 int main() {
5143 main()
5144 ; return 0; }
5145 EOF
5146 if { (eval echo configure:5147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5147   rm -rf conftest*
5148   eval "ac_cv_lib_$ac_lib_var=yes"
5149 else
5150   echo "configure: failed program was:" >&5
5151   cat conftest.$ac_ext >&5
5152   rm -rf conftest*
5153   eval "ac_cv_lib_$ac_lib_var=no"
5154 fi
5155 rm -f conftest*
5156 LIBS="$ac_save_LIBS"
5157
5158 fi
5159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5160   echo "$ac_t""yes" 1>&6
5161     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5162     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5163   cat >> confdefs.h <<EOF
5164 #define $ac_tr_lib 1
5165 EOF
5166
5167   LIBS="-lnsl_s $LIBS"
5168
5169 else
5170   echo "$ac_t""no" 1>&6
5171 fi
5172
5173         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5174 echo "configure:5175: checking for main in -lnsl" >&5
5175 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5177   echo $ac_n "(cached) $ac_c" 1>&6
5178 else
5179   ac_save_LIBS="$LIBS"
5180 LIBS="-lnsl  $LIBS"
5181 cat > conftest.$ac_ext <<EOF
5182 #line 5183 "configure"
5183 #include "confdefs.h"
5184
5185 int main() {
5186 main()
5187 ; return 0; }
5188 EOF
5189 if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5190   rm -rf conftest*
5191   eval "ac_cv_lib_$ac_lib_var=yes"
5192 else
5193   echo "configure: failed program was:" >&5
5194   cat conftest.$ac_ext >&5
5195   rm -rf conftest*
5196   eval "ac_cv_lib_$ac_lib_var=no"
5197 fi
5198 rm -f conftest*
5199 LIBS="$ac_save_LIBS"
5200
5201 fi
5202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5203   echo "$ac_t""yes" 1>&6
5204     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5205     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5206   cat >> confdefs.h <<EOF
5207 #define $ac_tr_lib 1
5208 EOF
5209
5210   LIBS="-lnsl $LIBS"
5211
5212 else
5213   echo "$ac_t""no" 1>&6
5214 fi
5215
5216         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5217 echo "configure:5218: checking for socket in -linet" >&5
5218 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5219 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5220   echo $ac_n "(cached) $ac_c" 1>&6
5221 else
5222   ac_save_LIBS="$LIBS"
5223 LIBS="-linet  $LIBS"
5224 cat > conftest.$ac_ext <<EOF
5225 #line 5226 "configure"
5226 #include "confdefs.h"
5227 /* Override any gcc2 internal prototype to avoid an error.  */
5228 /* We use char because int might match the return type of a gcc2
5229     builtin and then its argument prototype would still apply.  */
5230 char socket();
5231
5232 int main() {
5233 socket()
5234 ; return 0; }
5235 EOF
5236 if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5237   rm -rf conftest*
5238   eval "ac_cv_lib_$ac_lib_var=yes"
5239 else
5240   echo "configure: failed program was:" >&5
5241   cat conftest.$ac_ext >&5
5242   rm -rf conftest*
5243   eval "ac_cv_lib_$ac_lib_var=no"
5244 fi
5245 rm -f conftest*
5246 LIBS="$ac_save_LIBS"
5247
5248 fi
5249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5250   echo "$ac_t""yes" 1>&6
5251     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5252     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5253   cat >> confdefs.h <<EOF
5254 #define $ac_tr_lib 1
5255 EOF
5256
5257   LIBS="-linet $LIBS"
5258
5259 else
5260   echo "$ac_t""no" 1>&6
5261 fi
5262
5263         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5264 echo "configure:5265: checking for main in -lgen" >&5
5265 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5266 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5267   echo $ac_n "(cached) $ac_c" 1>&6
5268 else
5269   ac_save_LIBS="$LIBS"
5270 LIBS="-lgen  $LIBS"
5271 cat > conftest.$ac_ext <<EOF
5272 #line 5273 "configure"
5273 #include "confdefs.h"
5274
5275 int main() {
5276 main()
5277 ; return 0; }
5278 EOF
5279 if { (eval echo configure:5280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5280   rm -rf conftest*
5281   eval "ac_cv_lib_$ac_lib_var=yes"
5282 else
5283   echo "configure: failed program was:" >&5
5284   cat conftest.$ac_ext >&5
5285   rm -rf conftest*
5286   eval "ac_cv_lib_$ac_lib_var=no"
5287 fi
5288 rm -f conftest*
5289 LIBS="$ac_save_LIBS"
5290
5291 fi
5292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5293   echo "$ac_t""yes" 1>&6
5294     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5295     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5296   cat >> confdefs.h <<EOF
5297 #define $ac_tr_lib 1
5298 EOF
5299
5300   LIBS="-lgen $LIBS"
5301
5302 else
5303   echo "$ac_t""no" 1>&6
5304 fi
5305
5306
5307 fi
5308
5309
5310 echo $ac_n "checking for select""... $ac_c" 1>&6
5311 echo "configure:5312: checking for select" >&5
5312 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5313   echo $ac_n "(cached) $ac_c" 1>&6
5314 else
5315   cat > conftest.$ac_ext <<EOF
5316 #line 5317 "configure"
5317 #include "confdefs.h"
5318 /* System header to define __stub macros and hopefully few prototypes,
5319     which can conflict with char select(); below.  */
5320 #include <assert.h>
5321 /* Override any gcc2 internal prototype to avoid an error.  */
5322 /* We use char because int might match the return type of a gcc2
5323     builtin and then its argument prototype would still apply.  */
5324 char select();
5325 char (*f)();
5326
5327 int main() {
5328
5329 /* The GNU C library defines this for functions which it implements
5330     to always fail with ENOSYS.  Some functions are actually named
5331     something starting with __ and the normal name is an alias.  */
5332 #if defined (__stub_select) || defined (__stub___select)
5333 choke me
5334 #else
5335 f = select;
5336 #endif
5337
5338 ; return 0; }
5339 EOF
5340 if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5341   rm -rf conftest*
5342   eval "ac_cv_func_select=yes"
5343 else
5344   echo "configure: failed program was:" >&5
5345   cat conftest.$ac_ext >&5
5346   rm -rf conftest*
5347   eval "ac_cv_func_select=no"
5348 fi
5349 rm -f conftest*
5350 fi
5351
5352 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5353   echo "$ac_t""yes" 1>&6
5354   :
5355 else
5356   echo "$ac_t""no" 1>&6
5357 { echo "configure: error: select() required." 1>&2; exit 1; }
5358 fi
5359
5360
5361 if test "${ac_cv_header_winsock_h}" != yes; then
5362                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5363 echo "configure:5364: checking types of arguments for select()" >&5
5364  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5365   echo $ac_n "(cached) $ac_c" 1>&6
5366 else
5367    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5368   echo $ac_n "(cached) $ac_c" 1>&6
5369 else
5370     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5371   echo $ac_n "(cached) $ac_c" 1>&6
5372 else
5373      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5374      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5375       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5376        cat > conftest.$ac_ext <<EOF
5377 #line 5378 "configure"
5378 #include "confdefs.h"
5379 #ifdef HAVE_SYS_TYPES_H
5380 #include <sys/types.h>
5381 #endif
5382 #ifdef HAVE_SYS_TIME_H
5383 #include <sys/time.h>
5384 #endif
5385 #ifdef HAVE_SYS_SELECT_H
5386 #include <sys/select.h>
5387 #endif
5388 #ifdef HAVE_SYS_SOCKET_H
5389 #include <sys/socket.h>
5390 #endif
5391 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);
5392 int main() {
5393
5394 ; return 0; }
5395 EOF
5396 if { (eval echo configure:5397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5397   rm -rf conftest*
5398           ac_not_found=no ; break 3
5399 else
5400   echo "configure: failed program was:" >&5
5401   cat conftest.$ac_ext >&5
5402   rm -rf conftest*
5403   ac_not_found=yes
5404 fi
5405 rm -f conftest*
5406       done
5407      done
5408     done
5409    
5410 fi
5411   
5412 fi
5413  
5414 fi
5415  if test "$ac_not_found" = yes; then
5416   ac_cv_func_select_arg1=int 
5417   ac_cv_func_select_arg234='int *' 
5418   ac_cv_func_select_arg5='struct timeval *'
5419  fi
5420  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5421  cat >> confdefs.h <<EOF
5422 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5423 EOF
5424
5425  cat >> confdefs.h <<EOF
5426 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5427 EOF
5428
5429  cat >> confdefs.h <<EOF
5430 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5431 EOF
5432
5433
5434 fi
5435
5436
5437 for ac_hdr in regex.h 
5438 do
5439 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5440 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5441 echo "configure:5442: checking for $ac_hdr" >&5
5442 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5443   echo $ac_n "(cached) $ac_c" 1>&6
5444 else
5445   cat > conftest.$ac_ext <<EOF
5446 #line 5447 "configure"
5447 #include "confdefs.h"
5448 #include <$ac_hdr>
5449 EOF
5450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5451 { (eval echo configure:5452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5453 if test -z "$ac_err"; then
5454   rm -rf conftest*
5455   eval "ac_cv_header_$ac_safe=yes"
5456 else
5457   echo "$ac_err" >&5
5458   echo "configure: failed program was:" >&5
5459   cat conftest.$ac_ext >&5
5460   rm -rf conftest*
5461   eval "ac_cv_header_$ac_safe=no"
5462 fi
5463 rm -f conftest*
5464 fi
5465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5466   echo "$ac_t""yes" 1>&6
5467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5468   cat >> confdefs.h <<EOF
5469 #define $ac_tr_hdr 1
5470 EOF
5471  
5472 else
5473   echo "$ac_t""no" 1>&6
5474 fi
5475 done
5476
5477 if test "$ac_cv_header_regex_h" != yes ; then
5478         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5479 fi
5480 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5481 echo "configure:5482: checking for regfree" >&5
5482 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5483   echo $ac_n "(cached) $ac_c" 1>&6
5484 else
5485   cat > conftest.$ac_ext <<EOF
5486 #line 5487 "configure"
5487 #include "confdefs.h"
5488 /* System header to define __stub macros and hopefully few prototypes,
5489     which can conflict with char regfree(); below.  */
5490 #include <assert.h>
5491 /* Override any gcc2 internal prototype to avoid an error.  */
5492 /* We use char because int might match the return type of a gcc2
5493     builtin and then its argument prototype would still apply.  */
5494 char regfree();
5495 char (*f)();
5496
5497 int main() {
5498
5499 /* The GNU C library defines this for functions which it implements
5500     to always fail with ENOSYS.  Some functions are actually named
5501     something starting with __ and the normal name is an alias.  */
5502 #if defined (__stub_regfree) || defined (__stub___regfree)
5503 choke me
5504 #else
5505 f = regfree;
5506 #endif
5507
5508 ; return 0; }
5509 EOF
5510 if { (eval echo configure:5511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5511   rm -rf conftest*
5512   eval "ac_cv_func_regfree=yes"
5513 else
5514   echo "configure: failed program was:" >&5
5515   cat conftest.$ac_ext >&5
5516   rm -rf conftest*
5517   eval "ac_cv_func_regfree=no"
5518 fi
5519 rm -f conftest*
5520 fi
5521
5522 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5523   echo "$ac_t""yes" 1>&6
5524   :
5525 else
5526   echo "$ac_t""no" 1>&6
5527 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5528 fi
5529
5530
5531
5532 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5533 echo "configure:5534: checking for compatible POSIX regex" >&5
5534 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5535   echo $ac_n "(cached) $ac_c" 1>&6
5536 else
5537   
5538         if test "$cross_compiling" = yes; then
5539   ol_cv_c_posix_regex=cross
5540 else
5541   cat > conftest.$ac_ext <<EOF
5542 #line 5543 "configure"
5543 #include "confdefs.h"
5544
5545 #include <sys/types.h>
5546 #include <regex.h>
5547 static char *pattern, *string;
5548 main()
5549 {
5550         int rc;
5551         regex_t re;
5552
5553         pattern = "^A";
5554
5555         if(regcomp(&re, pattern, 0)) {
5556                 return -1;
5557         }
5558         
5559         string = "ALL MATCH";
5560         
5561         rc = regexec(&re, string, 0, (void*)0, 0);
5562
5563         regfree(&re);
5564
5565         return rc;
5566 }
5567 EOF
5568 if { (eval echo configure:5569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5569 then
5570   ol_cv_c_posix_regex=yes
5571 else
5572   echo "configure: failed program was:" >&5
5573   cat conftest.$ac_ext >&5
5574   rm -fr conftest*
5575   ol_cv_c_posix_regex=no
5576 fi
5577 rm -fr conftest*
5578 fi
5579
5580 fi
5581
5582 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5583
5584 if test "$ol_cv_c_posix_regex" = no ; then
5585         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5586 fi
5587
5588 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5589 echo "configure:5590: checking for res_search" >&5
5590 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5591   echo $ac_n "(cached) $ac_c" 1>&6
5592 else
5593   cat > conftest.$ac_ext <<EOF
5594 #line 5595 "configure"
5595 #include "confdefs.h"
5596 /* System header to define __stub macros and hopefully few prototypes,
5597     which can conflict with char res_search(); below.  */
5598 #include <assert.h>
5599 /* Override any gcc2 internal prototype to avoid an error.  */
5600 /* We use char because int might match the return type of a gcc2
5601     builtin and then its argument prototype would still apply.  */
5602 char res_search();
5603 char (*f)();
5604
5605 int main() {
5606
5607 /* The GNU C library defines this for functions which it implements
5608     to always fail with ENOSYS.  Some functions are actually named
5609     something starting with __ and the normal name is an alias.  */
5610 #if defined (__stub_res_search) || defined (__stub___res_search)
5611 choke me
5612 #else
5613 f = res_search;
5614 #endif
5615
5616 ; return 0; }
5617 EOF
5618 if { (eval echo configure:5619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5619   rm -rf conftest*
5620   eval "ac_cv_func_res_search=yes"
5621 else
5622   echo "configure: failed program was:" >&5
5623   cat conftest.$ac_ext >&5
5624   rm -rf conftest*
5625   eval "ac_cv_func_res_search=no"
5626 fi
5627 rm -f conftest*
5628 fi
5629
5630 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5631   echo "$ac_t""yes" 1>&6
5632   :
5633 else
5634   echo "$ac_t""no" 1>&6
5635 fi
5636
5637 if test $ac_cv_func_res_search = no ; then 
5638         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5639 echo "configure:5640: checking for res_search in -lbind" >&5
5640 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5641 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5642   echo $ac_n "(cached) $ac_c" 1>&6
5643 else
5644   ac_save_LIBS="$LIBS"
5645 LIBS="-lbind  $LIBS"
5646 cat > conftest.$ac_ext <<EOF
5647 #line 5648 "configure"
5648 #include "confdefs.h"
5649 /* Override any gcc2 internal prototype to avoid an error.  */
5650 /* We use char because int might match the return type of a gcc2
5651     builtin and then its argument prototype would still apply.  */
5652 char res_search();
5653
5654 int main() {
5655 res_search()
5656 ; return 0; }
5657 EOF
5658 if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5659   rm -rf conftest*
5660   eval "ac_cv_lib_$ac_lib_var=yes"
5661 else
5662   echo "configure: failed program was:" >&5
5663   cat conftest.$ac_ext >&5
5664   rm -rf conftest*
5665   eval "ac_cv_lib_$ac_lib_var=no"
5666 fi
5667 rm -f conftest*
5668 LIBS="$ac_save_LIBS"
5669
5670 fi
5671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5672   echo "$ac_t""yes" 1>&6
5673     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5674     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5675   cat >> confdefs.h <<EOF
5676 #define $ac_tr_lib 1
5677 EOF
5678
5679   LIBS="-lbind $LIBS"
5680
5681 else
5682   echo "$ac_t""no" 1>&6
5683 fi
5684
5685         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5686 fi
5687
5688 if test $ac_cv_func_res_search = no ; then 
5689         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5690 echo "configure:5691: checking for __res_search in -lbind" >&5
5691 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5692 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5693   echo $ac_n "(cached) $ac_c" 1>&6
5694 else
5695   ac_save_LIBS="$LIBS"
5696 LIBS="-lbind  $LIBS"
5697 cat > conftest.$ac_ext <<EOF
5698 #line 5699 "configure"
5699 #include "confdefs.h"
5700 /* Override any gcc2 internal prototype to avoid an error.  */
5701 /* We use char because int might match the return type of a gcc2
5702     builtin and then its argument prototype would still apply.  */
5703 char __res_search();
5704
5705 int main() {
5706 __res_search()
5707 ; return 0; }
5708 EOF
5709 if { (eval echo configure:5710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5710   rm -rf conftest*
5711   eval "ac_cv_lib_$ac_lib_var=yes"
5712 else
5713   echo "configure: failed program was:" >&5
5714   cat conftest.$ac_ext >&5
5715   rm -rf conftest*
5716   eval "ac_cv_lib_$ac_lib_var=no"
5717 fi
5718 rm -f conftest*
5719 LIBS="$ac_save_LIBS"
5720
5721 fi
5722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5723   echo "$ac_t""yes" 1>&6
5724     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5725     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5726   cat >> confdefs.h <<EOF
5727 #define $ac_tr_lib 1
5728 EOF
5729
5730   LIBS="-lbind $LIBS"
5731
5732 else
5733   echo "$ac_t""no" 1>&6
5734 fi
5735
5736         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5737 fi
5738
5739 if test $ac_cv_func_res_search = no ; then 
5740         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5741 echo "configure:5742: checking for res_search in -lresolv" >&5
5742 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5743 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5744   echo $ac_n "(cached) $ac_c" 1>&6
5745 else
5746   ac_save_LIBS="$LIBS"
5747 LIBS="-lresolv  $LIBS"
5748 cat > conftest.$ac_ext <<EOF
5749 #line 5750 "configure"
5750 #include "confdefs.h"
5751 /* Override any gcc2 internal prototype to avoid an error.  */
5752 /* We use char because int might match the return type of a gcc2
5753     builtin and then its argument prototype would still apply.  */
5754 char res_search();
5755
5756 int main() {
5757 res_search()
5758 ; return 0; }
5759 EOF
5760 if { (eval echo configure:5761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5761   rm -rf conftest*
5762   eval "ac_cv_lib_$ac_lib_var=yes"
5763 else
5764   echo "configure: failed program was:" >&5
5765   cat conftest.$ac_ext >&5
5766   rm -rf conftest*
5767   eval "ac_cv_lib_$ac_lib_var=no"
5768 fi
5769 rm -f conftest*
5770 LIBS="$ac_save_LIBS"
5771
5772 fi
5773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5774   echo "$ac_t""yes" 1>&6
5775     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5776     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5777   cat >> confdefs.h <<EOF
5778 #define $ac_tr_lib 1
5779 EOF
5780
5781   LIBS="-lresolv $LIBS"
5782
5783 else
5784   echo "$ac_t""no" 1>&6
5785 fi
5786
5787         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5788 fi
5789
5790 if test "$ac_cv_func_res_search" = yes ; then
5791         cat >> confdefs.h <<\EOF
5792 #define HAVE_RES_SEARCH 1
5793 EOF
5794
5795 elif test $ol_enable_dns = yes ; then
5796         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5797 elif test $ol_enable_dns != no ; then
5798         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5799 fi
5800
5801
5802 ol_link_isode=no
5803 if test $ol_enable_ldapd != no ; then
5804         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5805
5806                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5807 echo "configure:5808: checking for main in -lxtpp" >&5
5808 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5809 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5810   echo $ac_n "(cached) $ac_c" 1>&6
5811 else
5812   ac_save_LIBS="$LIBS"
5813 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5814 cat > conftest.$ac_ext <<EOF
5815 #line 5816 "configure"
5816 #include "confdefs.h"
5817
5818 int main() {
5819 main()
5820 ; return 0; }
5821 EOF
5822 if { (eval echo configure:5823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5823   rm -rf conftest*
5824   eval "ac_cv_lib_$ac_lib_var=yes"
5825 else
5826   echo "configure: failed program was:" >&5
5827   cat conftest.$ac_ext >&5
5828   rm -rf conftest*
5829   eval "ac_cv_lib_$ac_lib_var=no"
5830 fi
5831 rm -f conftest*
5832 LIBS="$ac_save_LIBS"
5833
5834 fi
5835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5836   echo "$ac_t""yes" 1>&6
5837   
5838                 ol_link_isode=yes
5839                 cat >> confdefs.h <<\EOF
5840 #define HAVE_XTPP 1
5841 EOF
5842
5843                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5844                 
5845 else
5846   echo "$ac_t""no" 1>&6
5847 :
5848 fi
5849
5850         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5851 echo "configure:5852: checking for main in -ldsap" >&5
5852 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5853 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5854   echo $ac_n "(cached) $ac_c" 1>&6
5855 else
5856   ac_save_LIBS="$LIBS"
5857 LIBS="-ldsap -lisode $LIBS"
5858 cat > conftest.$ac_ext <<EOF
5859 #line 5860 "configure"
5860 #include "confdefs.h"
5861
5862 int main() {
5863 main()
5864 ; return 0; }
5865 EOF
5866 if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5867   rm -rf conftest*
5868   eval "ac_cv_lib_$ac_lib_var=yes"
5869 else
5870   echo "configure: failed program was:" >&5
5871   cat conftest.$ac_ext >&5
5872   rm -rf conftest*
5873   eval "ac_cv_lib_$ac_lib_var=no"
5874 fi
5875 rm -f conftest*
5876 LIBS="$ac_save_LIBS"
5877
5878 fi
5879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5880   echo "$ac_t""yes" 1>&6
5881   
5882                 ol_link_isode=yes
5883                 cat >> confdefs.h <<\EOF
5884 #define HAVE_DSAP 1
5885 EOF
5886
5887                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5888                 
5889 else
5890   echo "$ac_t""no" 1>&6
5891 :
5892 fi
5893
5894         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5895 echo "configure:5896: checking for main in -lisode" >&5
5896 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5897 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5898   echo $ac_n "(cached) $ac_c" 1>&6
5899 else
5900   ac_save_LIBS="$LIBS"
5901 LIBS="-lisode  $LIBS"
5902 cat > conftest.$ac_ext <<EOF
5903 #line 5904 "configure"
5904 #include "confdefs.h"
5905
5906 int main() {
5907 main()
5908 ; return 0; }
5909 EOF
5910 if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5911   rm -rf conftest*
5912   eval "ac_cv_lib_$ac_lib_var=yes"
5913 else
5914   echo "configure: failed program was:" >&5
5915   cat conftest.$ac_ext >&5
5916   rm -rf conftest*
5917   eval "ac_cv_lib_$ac_lib_var=no"
5918 fi
5919 rm -f conftest*
5920 LIBS="$ac_save_LIBS"
5921
5922 fi
5923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5924   echo "$ac_t""yes" 1>&6
5925   
5926                 ol_link_isode=yes
5927                 cat >> confdefs.h <<\EOF
5928 #define HAVE_ISODE 1
5929 EOF
5930
5931                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5932                 
5933 else
5934   echo "$ac_t""no" 1>&6
5935 :
5936 fi
5937
5938 fi
5939
5940 if test $ol_link_isode != no; then
5941         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5942 echo "configure:5943: checking for main in -lpp" >&5
5943 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5944 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5945   echo $ac_n "(cached) $ac_c" 1>&6
5946 else
5947   ac_save_LIBS="$LIBS"
5948 LIBS="-lpp  $LIBS"
5949 cat > conftest.$ac_ext <<EOF
5950 #line 5951 "configure"
5951 #include "confdefs.h"
5952
5953 int main() {
5954 main()
5955 ; return 0; }
5956 EOF
5957 if { (eval echo configure:5958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5958   rm -rf conftest*
5959   eval "ac_cv_lib_$ac_lib_var=yes"
5960 else
5961   echo "configure: failed program was:" >&5
5962   cat conftest.$ac_ext >&5
5963   rm -rf conftest*
5964   eval "ac_cv_lib_$ac_lib_var=no"
5965 fi
5966 rm -f conftest*
5967 LIBS="$ac_save_LIBS"
5968
5969 fi
5970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5971   echo "$ac_t""yes" 1>&6
5972   
5973                 cat >> confdefs.h <<\EOF
5974 #define HAVE_PP 1
5975 EOF
5976
5977                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5978                 
5979 else
5980   echo "$ac_t""no" 1>&6
5981 :
5982 fi
5983
5984
5985         # Extract the first word of "pepsy", so it can be a program name with args.
5986 set dummy pepsy; ac_word=$2
5987 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5988 echo "configure:5989: checking for $ac_word" >&5
5989 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5990   echo $ac_n "(cached) $ac_c" 1>&6
5991 else
5992   case "$PEPSY" in
5993   /*)
5994   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5995   ;;
5996   ?:/*)
5997   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5998   ;;
5999   *)
6000   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6001   ac_dummy="$PATH"
6002   for ac_dir in $ac_dummy; do 
6003     test -z "$ac_dir" && ac_dir=.
6004     if test -f $ac_dir/$ac_word; then
6005       ac_cv_path_PEPSY="$ac_dir/$ac_word"
6006       break
6007     fi
6008   done
6009   IFS="$ac_save_ifs"
6010   ;;
6011 esac
6012 fi
6013 PEPSY="$ac_cv_path_PEPSY"
6014 if test -n "$PEPSY"; then
6015   echo "$ac_t""$PEPSY" 1>&6
6016 else
6017   echo "$ac_t""no" 1>&6
6018 fi
6019
6020 fi
6021
6022 if test $ol_enable_quipu != no ; then
6023         for ac_hdr in quipu/commonarg.h
6024 do
6025 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6026 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6027 echo "configure:6028: checking for $ac_hdr" >&5
6028 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6029   echo $ac_n "(cached) $ac_c" 1>&6
6030 else
6031   cat > conftest.$ac_ext <<EOF
6032 #line 6033 "configure"
6033 #include "confdefs.h"
6034 #include <$ac_hdr>
6035 EOF
6036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6037 { (eval echo configure:6038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6039 if test -z "$ac_err"; then
6040   rm -rf conftest*
6041   eval "ac_cv_header_$ac_safe=yes"
6042 else
6043   echo "$ac_err" >&5
6044   echo "configure: failed program was:" >&5
6045   cat conftest.$ac_ext >&5
6046   rm -rf conftest*
6047   eval "ac_cv_header_$ac_safe=no"
6048 fi
6049 rm -f conftest*
6050 fi
6051 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6052   echo "$ac_t""yes" 1>&6
6053     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6054   cat >> confdefs.h <<EOF
6055 #define $ac_tr_hdr 1
6056 EOF
6057  
6058 else
6059   echo "$ac_t""no" 1>&6
6060 fi
6061 done
6062
6063
6064         if test $ac_cv_header_quipu_commonarg_h = yes ; then
6065                 BUILD_QUIPU=yes
6066         elif test $ol_enable_quipu = auto ; then
6067                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
6068         else
6069                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
6070         fi
6071 fi
6072
6073 ol_link_kbind=no
6074 ol_link_kpasswd=no
6075 ol_link_krb5=no
6076 ol_link_krb4=no
6077
6078 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
6079         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
6080
6081         for ac_hdr in krb5.h
6082 do
6083 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6084 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6085 echo "configure:6086: checking for $ac_hdr" >&5
6086 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6087   echo $ac_n "(cached) $ac_c" 1>&6
6088 else
6089   cat > conftest.$ac_ext <<EOF
6090 #line 6091 "configure"
6091 #include "confdefs.h"
6092 #include <$ac_hdr>
6093 EOF
6094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6095 { (eval echo configure:6096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6097 if test -z "$ac_err"; then
6098   rm -rf conftest*
6099   eval "ac_cv_header_$ac_safe=yes"
6100 else
6101   echo "$ac_err" >&5
6102   echo "configure: failed program was:" >&5
6103   cat conftest.$ac_ext >&5
6104   rm -rf conftest*
6105   eval "ac_cv_header_$ac_safe=no"
6106 fi
6107 rm -f conftest*
6108 fi
6109 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6110   echo "$ac_t""yes" 1>&6
6111     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6112   cat >> confdefs.h <<EOF
6113 #define $ac_tr_hdr 1
6114 EOF
6115  
6116 else
6117   echo "$ac_t""no" 1>&6
6118 fi
6119 done
6120
6121
6122         if test $ac_cv_header_krb5_h = yes ; then
6123                                 for ac_hdr in heim_err.h
6124 do
6125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6126 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6127 echo "configure:6128: checking for $ac_hdr" >&5
6128 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6129   echo $ac_n "(cached) $ac_c" 1>&6
6130 else
6131   cat > conftest.$ac_ext <<EOF
6132 #line 6133 "configure"
6133 #include "confdefs.h"
6134 #include <$ac_hdr>
6135 EOF
6136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6137 { (eval echo configure:6138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6139 if test -z "$ac_err"; then
6140   rm -rf conftest*
6141   eval "ac_cv_header_$ac_safe=yes"
6142 else
6143   echo "$ac_err" >&5
6144   echo "configure: failed program was:" >&5
6145   cat conftest.$ac_ext >&5
6146   rm -rf conftest*
6147   eval "ac_cv_header_$ac_safe=no"
6148 fi
6149 rm -f conftest*
6150 fi
6151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6152   echo "$ac_t""yes" 1>&6
6153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6154   cat >> confdefs.h <<EOF
6155 #define $ac_tr_hdr 1
6156 EOF
6157  
6158 else
6159   echo "$ac_t""no" 1>&6
6160 fi
6161 done
6162
6163                 if test $ac_cv_header_heim_err_h = yes ; then
6164                         krb5_impl=heimdal
6165                 else
6166                         krb5_impl=mit
6167                 fi
6168
6169                 if test $krb5_impl = mit; then
6170                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6171 echo "configure:6172: checking for main in -lkrb5" >&5
6172 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6173 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6174   echo $ac_n "(cached) $ac_c" 1>&6
6175 else
6176   ac_save_LIBS="$LIBS"
6177 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6178 cat > conftest.$ac_ext <<EOF
6179 #line 6180 "configure"
6180 #include "confdefs.h"
6181
6182 int main() {
6183 main()
6184 ; return 0; }
6185 EOF
6186 if { (eval echo configure:6187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6187   rm -rf conftest*
6188   eval "ac_cv_lib_$ac_lib_var=yes"
6189 else
6190   echo "configure: failed program was:" >&5
6191   cat conftest.$ac_ext >&5
6192   rm -rf conftest*
6193   eval "ac_cv_lib_$ac_lib_var=no"
6194 fi
6195 rm -f conftest*
6196 LIBS="$ac_save_LIBS"
6197
6198 fi
6199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6200   echo "$ac_t""yes" 1>&6
6201   have_krb5=yes
6202                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6203 else
6204   echo "$ac_t""no" 1>&6
6205 have_krb5=no
6206 fi
6207
6208
6209                 elif test $krb5_impl = heimdal; then
6210                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6211 echo "configure:6212: checking for main in -lkrb5" >&5
6212 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6213 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6214   echo $ac_n "(cached) $ac_c" 1>&6
6215 else
6216   ac_save_LIBS="$LIBS"
6217 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6218 cat > conftest.$ac_ext <<EOF
6219 #line 6220 "configure"
6220 #include "confdefs.h"
6221
6222 int main() {
6223 main()
6224 ; return 0; }
6225 EOF
6226 if { (eval echo configure:6227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6227   rm -rf conftest*
6228   eval "ac_cv_lib_$ac_lib_var=yes"
6229 else
6230   echo "configure: failed program was:" >&5
6231   cat conftest.$ac_ext >&5
6232   rm -rf conftest*
6233   eval "ac_cv_lib_$ac_lib_var=no"
6234 fi
6235 rm -f conftest*
6236 LIBS="$ac_save_LIBS"
6237
6238 fi
6239 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6240   echo "$ac_t""yes" 1>&6
6241   have_krb5=yes
6242                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6243 else
6244   echo "$ac_t""no" 1>&6
6245 have_krb5=no
6246 fi
6247
6248
6249                         cat >> confdefs.h <<\EOF
6250 #define HAVE_HEIMDAL_KERBEROS 1
6251 EOF
6252
6253                 else
6254                         have_krb5=no
6255                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6256                 fi
6257
6258                 if test $have_krb5 = yes ; then
6259                         ol_link_krb5=yes
6260
6261                         cat >> confdefs.h <<\EOF
6262 #define HAVE_KRB5 1
6263 EOF
6264
6265
6266                         if test $ol_enable_kpasswd != no ; then
6267                                 ol_link_kpasswd=yes;
6268                         fi
6269
6270                         if test $ol_with_kerberos = k5only ; then
6271                                 ol_with_kerberos=found
6272                         fi
6273
6274                 elif test $ol_with_kerberos != auto ; then
6275                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6276                 fi
6277
6278         fi
6279 fi
6280
6281 if test $ol_link_krb5 = yes -a \
6282         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6283
6284         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6285 do
6286 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6287 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6288 echo "configure:6289: checking for $ac_hdr" >&5
6289 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6290   echo $ac_n "(cached) $ac_c" 1>&6
6291 else
6292   cat > conftest.$ac_ext <<EOF
6293 #line 6294 "configure"
6294 #include "confdefs.h"
6295 #include <$ac_hdr>
6296 EOF
6297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6298 { (eval echo configure:6299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6300 if test -z "$ac_err"; then
6301   rm -rf conftest*
6302   eval "ac_cv_header_$ac_safe=yes"
6303 else
6304   echo "$ac_err" >&5
6305   echo "configure: failed program was:" >&5
6306   cat conftest.$ac_ext >&5
6307   rm -rf conftest*
6308   eval "ac_cv_header_$ac_safe=no"
6309 fi
6310 rm -f conftest*
6311 fi
6312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6313   echo "$ac_t""yes" 1>&6
6314     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6315   cat >> confdefs.h <<EOF
6316 #define $ac_tr_hdr 1
6317 EOF
6318  
6319 else
6320   echo "$ac_t""no" 1>&6
6321 fi
6322 done
6323
6324
6325         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6326                 if test $krb5_impl = mit; then
6327                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6328 echo "configure:6329: checking for main in -lkrb4" >&5
6329 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6330 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6331   echo $ac_n "(cached) $ac_c" 1>&6
6332 else
6333   ac_save_LIBS="$LIBS"
6334 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6335 cat > conftest.$ac_ext <<EOF
6336 #line 6337 "configure"
6337 #include "confdefs.h"
6338
6339 int main() {
6340 main()
6341 ; return 0; }
6342 EOF
6343 if { (eval echo configure:6344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6344   rm -rf conftest*
6345   eval "ac_cv_lib_$ac_lib_var=yes"
6346 else
6347   echo "configure: failed program was:" >&5
6348   cat conftest.$ac_ext >&5
6349   rm -rf conftest*
6350   eval "ac_cv_lib_$ac_lib_var=no"
6351 fi
6352 rm -f conftest*
6353 LIBS="$ac_save_LIBS"
6354
6355 fi
6356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6357   echo "$ac_t""yes" 1>&6
6358   have_k425=yes
6359                                 KRB4_LIBS="-lkrb4 -ldes425"
6360 else
6361   echo "$ac_t""no" 1>&6
6362 have_k425=no
6363 fi
6364
6365
6366                 elif test $krb5_impl = heimdal; then
6367                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6368 echo "configure:6369: checking for main in -lkrb4" >&5
6369 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6370 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6371   echo $ac_n "(cached) $ac_c" 1>&6
6372 else
6373   ac_save_LIBS="$LIBS"
6374 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6375 cat > conftest.$ac_ext <<EOF
6376 #line 6377 "configure"
6377 #include "confdefs.h"
6378
6379 int main() {
6380 main()
6381 ; return 0; }
6382 EOF
6383 if { (eval echo configure:6384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6384   rm -rf conftest*
6385   eval "ac_cv_lib_$ac_lib_var=yes"
6386 else
6387   echo "configure: failed program was:" >&5
6388   cat conftest.$ac_ext >&5
6389   rm -rf conftest*
6390   eval "ac_cv_lib_$ac_lib_var=no"
6391 fi
6392 rm -f conftest*
6393 LIBS="$ac_save_LIBS"
6394
6395 fi
6396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6397   echo "$ac_t""yes" 1>&6
6398   have_k425=yes
6399                                 KRB4_LIBS="-lkrb4"
6400 else
6401   echo "$ac_t""no" 1>&6
6402 have_k425=no
6403 fi
6404
6405
6406                 else
6407                         have_425=no
6408                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6409                 fi
6410
6411                 if test $have_k425 = yes ; then
6412                         ol_with_kerberos=found
6413                         ol_link_krb4=yes
6414
6415                         cat >> confdefs.h <<\EOF
6416 #define HAVE_KRB425 1
6417 EOF
6418
6419                         cat >> confdefs.h <<\EOF
6420 #define HAVE_KRB4 1
6421 EOF
6422
6423
6424                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6425 echo "configure:6426: checking for des_debug in Kerberos libraries" >&5
6426 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6427   echo $ac_n "(cached) $ac_c" 1>&6
6428 else
6429   
6430                                                                 save_LIBS="$LIBS"
6431                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6432                                 cat > conftest.$ac_ext <<EOF
6433 #line 6434 "configure"
6434 #include "confdefs.h"
6435
6436 #include <kerberosIV/krb.h>
6437 #include <kerberosIV/des.h>
6438 extern int des_debug;
6439
6440 int main() {
6441
6442 des_debug = 1;
6443
6444 ; return 0; }
6445 EOF
6446 if { (eval echo configure:6447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6447   rm -rf conftest*
6448   ol_cv_var_des_debug=yes
6449 else
6450   echo "configure: failed program was:" >&5
6451   cat conftest.$ac_ext >&5
6452   rm -rf conftest*
6453   ol_cv_var_des_debug=no
6454 fi
6455 rm -f conftest*
6456                                                                 LIBS="$save_LIBS"
6457                         
6458 fi
6459
6460 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6461
6462                         if test $ol_cv_var_des_debug = yes ; then
6463                                 cat >> confdefs.h <<\EOF
6464 #define HAVE_DES_DEBUG 1
6465 EOF
6466
6467                         fi
6468
6469                         LIBS="$save_LIBS"
6470                 fi
6471         fi
6472 fi
6473
6474 if test $ol_link_krb5 = yes ; then
6475         ol_with_kerberos=found
6476 fi
6477
6478 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6479         -o $ol_with_kerberos = kth ; then
6480
6481         for ac_hdr in krb.h des.h krb-archaeology.h 
6482 do
6483 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6484 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6485 echo "configure:6486: checking for $ac_hdr" >&5
6486 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6487   echo $ac_n "(cached) $ac_c" 1>&6
6488 else
6489   cat > conftest.$ac_ext <<EOF
6490 #line 6491 "configure"
6491 #include "confdefs.h"
6492 #include <$ac_hdr>
6493 EOF
6494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6495 { (eval echo configure:6496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6497 if test -z "$ac_err"; then
6498   rm -rf conftest*
6499   eval "ac_cv_header_$ac_safe=yes"
6500 else
6501   echo "$ac_err" >&5
6502   echo "configure: failed program was:" >&5
6503   cat conftest.$ac_ext >&5
6504   rm -rf conftest*
6505   eval "ac_cv_header_$ac_safe=no"
6506 fi
6507 rm -f conftest*
6508 fi
6509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6510   echo "$ac_t""yes" 1>&6
6511     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6512   cat >> confdefs.h <<EOF
6513 #define $ac_tr_hdr 1
6514 EOF
6515  
6516 else
6517   echo "$ac_t""no" 1>&6
6518 fi
6519 done
6520
6521
6522         if test $ac_cv_header_krb_h = yes ; then
6523                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6524 echo "configure:6525: checking for main in -lkrb" >&5
6525 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6526 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6527   echo $ac_n "(cached) $ac_c" 1>&6
6528 else
6529   ac_save_LIBS="$LIBS"
6530 LIBS="-lkrb -ldes $LIBS"
6531 cat > conftest.$ac_ext <<EOF
6532 #line 6533 "configure"
6533 #include "confdefs.h"
6534
6535 int main() {
6536 main()
6537 ; return 0; }
6538 EOF
6539 if { (eval echo configure:6540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6540   rm -rf conftest*
6541   eval "ac_cv_lib_$ac_lib_var=yes"
6542 else
6543   echo "configure: failed program was:" >&5
6544   cat conftest.$ac_ext >&5
6545   rm -rf conftest*
6546   eval "ac_cv_lib_$ac_lib_var=no"
6547 fi
6548 rm -f conftest*
6549 LIBS="$ac_save_LIBS"
6550
6551 fi
6552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6553   echo "$ac_t""yes" 1>&6
6554   have_k4=yes
6555 else
6556   echo "$ac_t""no" 1>&6
6557 have_k4=no
6558 fi
6559
6560
6561                 if test $have_k4 = yes ; then
6562                         ol_with_kerberos=found
6563                         ol_link_krb4=yes
6564
6565                         cat >> confdefs.h <<\EOF
6566 #define HAVE_KRB4 1
6567 EOF
6568
6569
6570                         KRB4_LIBS="-lkrb -ldes"
6571
6572                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6573                                 cat >> confdefs.h <<\EOF
6574 #define HAVE_KTH_KERBEROS 1
6575 EOF
6576
6577                         fi
6578                 fi
6579         fi
6580 fi
6581
6582 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6583         ol_link_kpasswd=yes;
6584 fi
6585
6586 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6587         cat >> confdefs.h <<\EOF
6588 #define HAVE_KERBEROS 1
6589 EOF
6590
6591
6592 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6593         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6594 fi
6595
6596 ol_link_tls=no
6597 if test $ol_with_tls != no ; then
6598         
6599         for ac_hdr in openssl/ssl.h ssl.h
6600 do
6601 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6602 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6603 echo "configure:6604: checking for $ac_hdr" >&5
6604 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6605   echo $ac_n "(cached) $ac_c" 1>&6
6606 else
6607   cat > conftest.$ac_ext <<EOF
6608 #line 6609 "configure"
6609 #include "confdefs.h"
6610 #include <$ac_hdr>
6611 EOF
6612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6613 { (eval echo configure:6614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6615 if test -z "$ac_err"; then
6616   rm -rf conftest*
6617   eval "ac_cv_header_$ac_safe=yes"
6618 else
6619   echo "$ac_err" >&5
6620   echo "configure: failed program was:" >&5
6621   cat conftest.$ac_ext >&5
6622   rm -rf conftest*
6623   eval "ac_cv_header_$ac_safe=no"
6624 fi
6625 rm -f conftest*
6626 fi
6627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6628   echo "$ac_t""yes" 1>&6
6629     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6630   cat >> confdefs.h <<EOF
6631 #define $ac_tr_hdr 1
6632 EOF
6633  
6634 else
6635   echo "$ac_t""no" 1>&6
6636 fi
6637 done
6638
6639         
6640         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6641                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6642 echo "configure:6643: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6643 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6645   echo $ac_n "(cached) $ac_c" 1>&6
6646 else
6647   ac_save_LIBS="$LIBS"
6648 LIBS="-lssl -lcrypto $LIBS"
6649 cat > conftest.$ac_ext <<EOF
6650 #line 6651 "configure"
6651 #include "confdefs.h"
6652 /* Override any gcc2 internal prototype to avoid an error.  */
6653 /* We use char because int might match the return type of a gcc2
6654     builtin and then its argument prototype would still apply.  */
6655 char SSLeay_add_ssl_algorithms();
6656
6657 int main() {
6658 SSLeay_add_ssl_algorithms()
6659 ; return 0; }
6660 EOF
6661 if { (eval echo configure:6662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6662   rm -rf conftest*
6663   eval "ac_cv_lib_$ac_lib_var=yes"
6664 else
6665   echo "configure: failed program was:" >&5
6666   cat conftest.$ac_ext >&5
6667   rm -rf conftest*
6668   eval "ac_cv_lib_$ac_lib_var=no"
6669 fi
6670 rm -f conftest*
6671 LIBS="$ac_save_LIBS"
6672
6673 fi
6674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6675   echo "$ac_t""yes" 1>&6
6676   have_ssleay=yes
6677                         need_rsaref=no
6678 else
6679   echo "$ac_t""no" 1>&6
6680 have_ssleay=no
6681 fi
6682
6683                         
6684                 if test $have_ssleay = no ; then
6685                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6686 echo "configure:6687: checking for SSL_library_init in -lssl" >&5
6687 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6688 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6689   echo $ac_n "(cached) $ac_c" 1>&6
6690 else
6691   ac_save_LIBS="$LIBS"
6692 LIBS="-lssl -lcrypto $LIBS"
6693 cat > conftest.$ac_ext <<EOF
6694 #line 6695 "configure"
6695 #include "confdefs.h"
6696 /* Override any gcc2 internal prototype to avoid an error.  */
6697 /* We use char because int might match the return type of a gcc2
6698     builtin and then its argument prototype would still apply.  */
6699 char SSL_library_init();
6700
6701 int main() {
6702 SSL_library_init()
6703 ; return 0; }
6704 EOF
6705 if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6706   rm -rf conftest*
6707   eval "ac_cv_lib_$ac_lib_var=yes"
6708 else
6709   echo "configure: failed program was:" >&5
6710   cat conftest.$ac_ext >&5
6711   rm -rf conftest*
6712   eval "ac_cv_lib_$ac_lib_var=no"
6713 fi
6714 rm -f conftest*
6715 LIBS="$ac_save_LIBS"
6716
6717 fi
6718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6719   echo "$ac_t""yes" 1>&6
6720   have_ssleay=yes
6721                                 need_rsaref=no
6722 else
6723   echo "$ac_t""no" 1>&6
6724 have_ssleay=no
6725 fi
6726
6727                 fi
6728
6729                 if test $have_ssleay = no ; then
6730                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6731 echo "configure:6732: checking for ssl3_accept in -lssl" >&5
6732 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6733 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6734   echo $ac_n "(cached) $ac_c" 1>&6
6735 else
6736   ac_save_LIBS="$LIBS"
6737 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6738 cat > conftest.$ac_ext <<EOF
6739 #line 6740 "configure"
6740 #include "confdefs.h"
6741 /* Override any gcc2 internal prototype to avoid an error.  */
6742 /* We use char because int might match the return type of a gcc2
6743     builtin and then its argument prototype would still apply.  */
6744 char ssl3_accept();
6745
6746 int main() {
6747 ssl3_accept()
6748 ; return 0; }
6749 EOF
6750 if { (eval echo configure:6751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6751   rm -rf conftest*
6752   eval "ac_cv_lib_$ac_lib_var=yes"
6753 else
6754   echo "configure: failed program was:" >&5
6755   cat conftest.$ac_ext >&5
6756   rm -rf conftest*
6757   eval "ac_cv_lib_$ac_lib_var=no"
6758 fi
6759 rm -f conftest*
6760 LIBS="$ac_save_LIBS"
6761
6762 fi
6763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6764   echo "$ac_t""yes" 1>&6
6765   have_ssleay=yes
6766                                 need_rsaref=yes
6767 else
6768   echo "$ac_t""no" 1>&6
6769 have_ssleay=no
6770 fi
6771
6772                 fi
6773
6774                 if test $have_ssleay = yes ; then
6775                         ol_with_tls=found
6776                         ol_link_tls=yes
6777
6778                         cat >> confdefs.h <<\EOF
6779 #define HAVE_SSLEAY 1
6780 EOF
6781
6782
6783                         if test $need_rsaref = yes; then
6784                                 cat >> confdefs.h <<\EOF
6785 #define HAVE_RSAREF 1
6786 EOF
6787
6788
6789                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6790                         else
6791                                 TLS_LIBS="-lssl -lcrypto"
6792                         fi
6793                 fi
6794         fi
6795 fi
6796
6797 if test $ol_link_tls = yes ; then
6798         cat >> confdefs.h <<\EOF
6799 #define HAVE_TLS 1
6800 EOF
6801
6802 fi      
6803
6804 for ac_func in \
6805         ctime_r                 \
6806         gethostbyname_r gethostbyaddr_r \
6807
6808 do
6809 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6810 echo "configure:6811: checking for $ac_func" >&5
6811 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6812   echo $ac_n "(cached) $ac_c" 1>&6
6813 else
6814   cat > conftest.$ac_ext <<EOF
6815 #line 6816 "configure"
6816 #include "confdefs.h"
6817 /* System header to define __stub macros and hopefully few prototypes,
6818     which can conflict with char $ac_func(); below.  */
6819 #include <assert.h>
6820 /* Override any gcc2 internal prototype to avoid an error.  */
6821 /* We use char because int might match the return type of a gcc2
6822     builtin and then its argument prototype would still apply.  */
6823 char $ac_func();
6824 char (*f)();
6825
6826 int main() {
6827
6828 /* The GNU C library defines this for functions which it implements
6829     to always fail with ENOSYS.  Some functions are actually named
6830     something starting with __ and the normal name is an alias.  */
6831 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6832 choke me
6833 #else
6834 f = $ac_func;
6835 #endif
6836
6837 ; return 0; }
6838 EOF
6839 if { (eval echo configure:6840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6840   rm -rf conftest*
6841   eval "ac_cv_func_$ac_func=yes"
6842 else
6843   echo "configure: failed program was:" >&5
6844   cat conftest.$ac_ext >&5
6845   rm -rf conftest*
6846   eval "ac_cv_func_$ac_func=no"
6847 fi
6848 rm -f conftest*
6849 fi
6850
6851 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6852   echo "$ac_t""yes" 1>&6
6853     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6854   cat >> confdefs.h <<EOF
6855 #define $ac_tr_func 1
6856 EOF
6857  
6858 else
6859   echo "$ac_t""no" 1>&6
6860 fi
6861 done
6862
6863
6864 if test "$ac_cv_func_ctime_r" = no ; then
6865         ol_cv_func_ctime_r_nargs=0
6866 else
6867         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6868 echo "configure:6869: checking number of arguments of ctime_r" >&5
6869 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6870   echo $ac_n "(cached) $ac_c" 1>&6
6871 else
6872   cat > conftest.$ac_ext <<EOF
6873 #line 6874 "configure"
6874 #include "confdefs.h"
6875 #include <time.h>
6876 int main() {
6877 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6878 ; return 0; }
6879 EOF
6880 if { (eval echo configure:6881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6881   rm -rf conftest*
6882   ol_cv_func_ctime_r_nargs3=yes
6883 else
6884   echo "configure: failed program was:" >&5
6885   cat conftest.$ac_ext >&5
6886   rm -rf conftest*
6887   ol_cv_func_ctime_r_nargs3=no
6888 fi
6889 rm -f conftest*
6890
6891         cat > conftest.$ac_ext <<EOF
6892 #line 6893 "configure"
6893 #include "confdefs.h"
6894 #include <time.h>
6895 int main() {
6896 time_t ti; char *buffer; ctime_r(&ti,buffer);
6897 ; return 0; }
6898 EOF
6899 if { (eval echo configure:6900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6900   rm -rf conftest*
6901   ol_cv_func_ctime_r_nargs2=yes
6902 else
6903   echo "configure: failed program was:" >&5
6904   cat conftest.$ac_ext >&5
6905   rm -rf conftest*
6906   ol_cv_func_ctime_r_nargs2=no
6907 fi
6908 rm -f conftest*
6909
6910         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6911                 $ol_cv_func_ctime_r_nargs2 = no ; then
6912
6913                 ol_cv_func_ctime_r_nargs=3
6914
6915         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6916                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6917
6918                 ol_cv_func_ctime_r_nargs=2
6919
6920         else
6921                 ol_cv_func_ctime_r_nargs=0
6922         fi
6923   
6924 fi
6925
6926 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6927
6928   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6929         cat >> confdefs.h <<EOF
6930 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6931 EOF
6932
6933   fi
6934
6935 fi
6936
6937 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6938         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6939 echo "configure:6940: checking number of arguments of gethostbyname_r" >&5
6940 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6941   echo $ac_n "(cached) $ac_c" 1>&6
6942 else
6943   cat > conftest.$ac_ext <<EOF
6944 #line 6945 "configure"
6945 #include "confdefs.h"
6946 #include <sys/types.h>
6947 #include <sys/socket.h>
6948 #include <netinet/in.h>
6949 #include <netdb.h>
6950 #define BUFSIZE (sizeof(struct hostent)+10)
6951 int main() {
6952 struct hostent hent; char buffer[BUFSIZE];
6953                 int bufsize=BUFSIZE;int h_errno;
6954                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6955                         buffer, bufsize, &h_errno);
6956 ; return 0; }
6957 EOF
6958 if { (eval echo configure:6959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6959   rm -rf conftest*
6960   ol_cv_func_gethostbyname_r_nargs5=yes
6961 else
6962   echo "configure: failed program was:" >&5
6963   cat conftest.$ac_ext >&5
6964   rm -rf conftest*
6965   ol_cv_func_gethostbyname_r_nargs5=no
6966 fi
6967 rm -f conftest*
6968
6969         cat > conftest.$ac_ext <<EOF
6970 #line 6971 "configure"
6971 #include "confdefs.h"
6972 #include <sys/types.h>
6973 #include <sys/socket.h>
6974 #include <netinet/in.h>
6975 #include <netdb.h>
6976 #define BUFSIZE (sizeof(struct hostent)+10)
6977 int main() {
6978 struct hostent hent;struct hostent *rhent;
6979                 char buffer[BUFSIZE];
6980                 int bufsize=BUFSIZE;int h_errno;
6981                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6982                         &rhent, &h_errno);
6983 ; return 0; }
6984 EOF
6985 if { (eval echo configure:6986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6986   rm -rf conftest*
6987   ol_cv_func_gethostbyname_r_nargs6=yes
6988 else
6989   echo "configure: failed program was:" >&5
6990   cat conftest.$ac_ext >&5
6991   rm -rf conftest*
6992   ol_cv_func_gethostbyname_r_nargs6=no
6993 fi
6994 rm -f conftest*
6995
6996         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6997                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6998
6999                 ol_cv_func_gethostbyname_r_nargs=5
7000
7001         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
7002                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
7003
7004                 ol_cv_func_gethostbyname_r_nargs=6
7005
7006         else
7007                 ol_cv_func_gethostbyname_r_nargs=0
7008         fi
7009   
7010 fi
7011
7012 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
7013   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
7014         cat >> confdefs.h <<EOF
7015 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
7016 EOF
7017
7018   fi
7019
7020 else
7021         ol_cv_func_gethostbyname_r_nargs=0
7022 fi
7023  
7024 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
7025         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
7026 echo "configure:7027: checking number of arguments of gethostbyaddr_r" >&5
7027 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
7028   echo $ac_n "(cached) $ac_c" 1>&6
7029 else
7030   cat > conftest.$ac_ext <<EOF
7031 #line 7032 "configure"
7032 #include "confdefs.h"
7033 #include <sys/types.h>
7034 #include <sys/socket.h>
7035 #include <netinet/in.h>
7036 #include <netdb.h>
7037 #define BUFSIZE (sizeof(struct hostent)+10)
7038 int main() {
7039 struct hostent hent; char buffer[BUFSIZE]; 
7040             struct in_addr add;
7041             size_t alen=sizeof(struct in_addr);
7042             int bufsize=BUFSIZE;int h_errno;
7043                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7044                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
7045 ; return 0; }
7046 EOF
7047 if { (eval echo configure:7048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7048   rm -rf conftest*
7049   ol_cv_func_gethostbyaddr_r_nargs7=yes
7050 else
7051   echo "configure: failed program was:" >&5
7052   cat conftest.$ac_ext >&5
7053   rm -rf conftest*
7054   ol_cv_func_gethostbyaddr_r_nargs7=no
7055 fi
7056 rm -f conftest*
7057
7058         cat > conftest.$ac_ext <<EOF
7059 #line 7060 "configure"
7060 #include "confdefs.h"
7061 #include <sys/types.h>
7062 #include <sys/socket.h>
7063 #include <netinet/in.h>
7064 #include <netdb.h>
7065 #define BUFSIZE (sizeof(struct hostent)+10)
7066 int main() {
7067 struct hostent hent;
7068                 struct hostent *rhent; char buffer[BUFSIZE]; 
7069                 struct in_addr add;
7070                 size_t alen=sizeof(struct in_addr);
7071                 int bufsize=BUFSIZE;int h_errno;
7072                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7073                         alen, AF_INET, &hent, buffer, bufsize, 
7074                         &rhent, &h_errno);
7075 ; return 0; }
7076 EOF
7077 if { (eval echo configure:7078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7078   rm -rf conftest*
7079   ol_cv_func_gethostbyaddr_r_nargs8=yes
7080 else
7081   echo "configure: failed program was:" >&5
7082   cat conftest.$ac_ext >&5
7083   rm -rf conftest*
7084   ol_cv_func_gethostbyaddr_r_nargs8=no
7085 fi
7086 rm -f conftest*
7087
7088         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7089                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7090
7091                 ol_cv_func_gethostbyaddr_r_nargs=7
7092
7093         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7094                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7095
7096                 ol_cv_func_gethostbyaddr_r_nargs=8
7097
7098         else
7099                 ol_cv_func_gethostbyaddr_r_nargs=0
7100         fi
7101   
7102 fi
7103
7104 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7105   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7106     cat >> confdefs.h <<EOF
7107 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7108 EOF
7109
7110   fi
7111
7112 else
7113         ol_cv_func_gethostbyaddr_r_nargs=0
7114 fi
7115
7116 if test "$ac_cv_func_ctime_r" = yes \
7117         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7118         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7119         -a "$ac_cv_func_gethostbyname_r" = yes \
7120         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7121         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7122         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7123         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7124         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7125         ; then
7126  
7127         cat >> confdefs.h <<\EOF
7128 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7129 EOF
7130
7131 fi
7132
7133 ol_link_threads=no
7134
7135 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7136         -o $ol_with_threads = nt ; then
7137
7138         
7139         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
7140 echo "configure:7141: checking for NT Threads" >&5
7141 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
7142   echo $ac_n "(cached) $ac_c" 1>&6
7143 else
7144   
7145                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7146 echo "configure:7147: checking for _beginthread" >&5
7147 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7148   echo $ac_n "(cached) $ac_c" 1>&6
7149 else
7150   cat > conftest.$ac_ext <<EOF
7151 #line 7152 "configure"
7152 #include "confdefs.h"
7153 /* System header to define __stub macros and hopefully few prototypes,
7154     which can conflict with char _beginthread(); below.  */
7155 #include <assert.h>
7156 /* Override any gcc2 internal prototype to avoid an error.  */
7157 /* We use char because int might match the return type of a gcc2
7158     builtin and then its argument prototype would still apply.  */
7159 char _beginthread();
7160 char (*f)();
7161
7162 int main() {
7163
7164 /* The GNU C library defines this for functions which it implements
7165     to always fail with ENOSYS.  Some functions are actually named
7166     something starting with __ and the normal name is an alias.  */
7167 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7168 choke me
7169 #else
7170 f = _beginthread;
7171 #endif
7172
7173 ; return 0; }
7174 EOF
7175 if { (eval echo configure:7176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7176   rm -rf conftest*
7177   eval "ac_cv_func__beginthread=yes"
7178 else
7179   echo "configure: failed program was:" >&5
7180   cat conftest.$ac_ext >&5
7181   rm -rf conftest*
7182   eval "ac_cv_func__beginthread=no"
7183 fi
7184 rm -f conftest*
7185 fi
7186
7187 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7188   echo "$ac_t""yes" 1>&6
7189   ol_cv_nt_threads=yes
7190 else
7191   echo "$ac_t""no" 1>&6
7192 ol_cv_nt_threads=no
7193 fi
7194
7195         
7196 fi
7197
7198 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7199
7200         if test $ol_cv_nt_threads = yes ; then
7201                 cat >> confdefs.h <<\EOF
7202 #define HAVE_NT_THREADS 1
7203 EOF
7204
7205         fi
7206
7207
7208         if test "$ol_cv_nt_threads" = yes ; then
7209         ol_link_threads=nt
7210         ol_with_threads=found
7211         ol_with_yielding_select=yes
7212
7213                 cat >> confdefs.h <<\EOF
7214 #define HAVE_NT_SERVICE_MANAGER 1
7215 EOF
7216
7217                 cat >> confdefs.h <<\EOF
7218 #define HAVE_NT_EVENT_LOG 1
7219 EOF
7220
7221         fi
7222
7223         if test $ol_with_threads = nt ; then
7224                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7225         fi
7226 fi
7227
7228 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7229         -o $ol_with_threads = posix ; then
7230
7231         for ac_hdr in pthread.h
7232 do
7233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7235 echo "configure:7236: checking for $ac_hdr" >&5
7236 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7237   echo $ac_n "(cached) $ac_c" 1>&6
7238 else
7239   cat > conftest.$ac_ext <<EOF
7240 #line 7241 "configure"
7241 #include "confdefs.h"
7242 #include <$ac_hdr>
7243 EOF
7244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7245 { (eval echo configure:7246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7247 if test -z "$ac_err"; then
7248   rm -rf conftest*
7249   eval "ac_cv_header_$ac_safe=yes"
7250 else
7251   echo "$ac_err" >&5
7252   echo "configure: failed program was:" >&5
7253   cat conftest.$ac_ext >&5
7254   rm -rf conftest*
7255   eval "ac_cv_header_$ac_safe=no"
7256 fi
7257 rm -f conftest*
7258 fi
7259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7260   echo "$ac_t""yes" 1>&6
7261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7262   cat >> confdefs.h <<EOF
7263 #define $ac_tr_hdr 1
7264 EOF
7265  
7266 else
7267   echo "$ac_t""no" 1>&6
7268 fi
7269 done
7270
7271
7272         if test $ac_cv_header_pthread_h = yes ; then
7273                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7274 echo "configure:7275: checking POSIX thread version" >&5
7275 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7276   echo $ac_n "(cached) $ac_c" 1>&6
7277 else
7278   
7279         cat > conftest.$ac_ext <<EOF
7280 #line 7281 "configure"
7281 #include "confdefs.h"
7282
7283 #               include <pthread.h>
7284                 /* this check could be improved */
7285 #               ifdef PTHREAD_ONCE_INIT
7286                         pthread_version_final;
7287 #               endif
7288         
7289 EOF
7290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7291   egrep "pthread_version_final" >/dev/null 2>&1; then
7292   rm -rf conftest*
7293   ol_pthread_final=yes
7294 else
7295   rm -rf conftest*
7296   ol_pthread_final=no
7297 fi
7298 rm -f conftest*
7299
7300
7301         cat > conftest.$ac_ext <<EOF
7302 #line 7303 "configure"
7303 #include "confdefs.h"
7304
7305 #               include <pthread.h>
7306                 /* this check could be improved */
7307 #               ifdef pthread_once_init
7308                         pthread_version_draft4;
7309 #               endif
7310         
7311 EOF
7312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7313   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7314   rm -rf conftest*
7315   ol_pthread_draft4=yes
7316 else
7317   rm -rf conftest*
7318   ol_pthread_draft4=no
7319 fi
7320 rm -f conftest*
7321
7322
7323         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7324                 ol_cv_pthread_version=final
7325         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7326                 ol_cv_pthread_version=draft4
7327         else
7328                 ol_cv_pthread_version=unknown
7329         fi
7330
7331 fi
7332
7333 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7334
7335
7336                 if test $ol_cv_pthread_version = final ; then
7337                         cat >> confdefs.h <<\EOF
7338 #define HAVE_PTHREADS_FINAL 1
7339 EOF
7340
7341                 elif test $ol_cv_pthread_version = draft4 ; then
7342                         cat >> confdefs.h <<\EOF
7343 #define HAVE_PTHREADS_D4 1
7344 EOF
7345
7346                 else
7347                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7348                 fi
7349
7350                 # consider threads found
7351                 ol_with_threads=found
7352
7353                 
7354         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7355 echo "configure:7356: checking for LinuxThreads pthread.h" >&5
7356 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7357   echo $ac_n "(cached) $ac_c" 1>&6
7358 else
7359   cat > conftest.$ac_ext <<EOF
7360 #line 7361 "configure"
7361 #include "confdefs.h"
7362 #include <pthread.h>
7363 EOF
7364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7365   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7366   rm -rf conftest*
7367   ol_cv_header_linux_threads=yes
7368 else
7369   rm -rf conftest*
7370   ol_cv_header_linux_threads=no
7371 fi
7372 rm -f conftest*
7373
7374                 
7375 fi
7376
7377 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7378         if test $ol_cv_header_linux_threads = yes; then
7379                 cat >> confdefs.h <<\EOF
7380 #define HAVE_LINUX_THREADS 1
7381 EOF
7382
7383         fi
7384
7385                 
7386         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7387 echo "configure:7388: checking for GNU Pth pthread.h" >&5
7388 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7389   echo $ac_n "(cached) $ac_c" 1>&6
7390 else
7391   cat > conftest.$ac_ext <<EOF
7392 #line 7393 "configure"
7393 #include "confdefs.h"
7394 #include <pthread.h>
7395 #ifdef _POSIX_THREAD_IS_GNU_PTH
7396         __gnu_pth__;
7397 #endif
7398
7399 EOF
7400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7401   egrep "__gnu_pth__" >/dev/null 2>&1; then
7402   rm -rf conftest*
7403   ol_cv_header_gnu_pth_pthread_h=yes
7404 else
7405   rm -rf conftest*
7406   ol_cv_header_gnu_pth_pthread_h=no
7407 fi
7408 rm -f conftest*
7409
7410                 
7411 fi
7412
7413 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7414
7415
7416                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7417                         for ac_hdr in sched.h
7418 do
7419 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7420 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7421 echo "configure:7422: checking for $ac_hdr" >&5
7422 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7423   echo $ac_n "(cached) $ac_c" 1>&6
7424 else
7425   cat > conftest.$ac_ext <<EOF
7426 #line 7427 "configure"
7427 #include "confdefs.h"
7428 #include <$ac_hdr>
7429 EOF
7430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7431 { (eval echo configure:7432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7433 if test -z "$ac_err"; then
7434   rm -rf conftest*
7435   eval "ac_cv_header_$ac_safe=yes"
7436 else
7437   echo "$ac_err" >&5
7438   echo "configure: failed program was:" >&5
7439   cat conftest.$ac_ext >&5
7440   rm -rf conftest*
7441   eval "ac_cv_header_$ac_safe=no"
7442 fi
7443 rm -f conftest*
7444 fi
7445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7446   echo "$ac_t""yes" 1>&6
7447     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7448   cat >> confdefs.h <<EOF
7449 #define $ac_tr_hdr 1
7450 EOF
7451  
7452 else
7453   echo "$ac_t""no" 1>&6
7454 fi
7455 done
7456
7457                 fi
7458
7459                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7460                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7461 echo "configure:7462: checking for pthread_create in default libraries" >&5
7462 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7463   echo $ac_n "(cached) $ac_c" 1>&6
7464 else
7465   
7466                 if test "$cross_compiling" = yes; then
7467   cat > conftest.$ac_ext <<EOF
7468 #line 7469 "configure"
7469 #include "confdefs.h"
7470 /* pthread test headers */
7471 #include <pthread.h>
7472 #ifndef NULL
7473 #define NULL (void*)0
7474 #endif
7475
7476 static void *task(p)
7477         void *p;
7478 {
7479         return (void *) (p == NULL);
7480 }
7481
7482 int main() {
7483
7484         /* pthread test function */
7485         pthread_t t;
7486         int status;
7487 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7488         /* This system (e.g. AIX) defaults detached; must override */
7489         pthread_attr_t attr;
7490
7491         status = pthread_attr_init(&attr);
7492         if( status ) exit( status );
7493
7494         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7495         if( status ) exit( status );
7496
7497 #define ATTR    &attr
7498 #else
7499 #if HAVE_PTHREADS_D4
7500 #define ATTR    pthread_attr_default
7501 #else
7502 #define ATTR    NULL
7503 #endif
7504 #endif
7505         /* make sure pthread_create() isn't just a stub */
7506         status = pthread_create(&t, ATTR, task, NULL);
7507         if( status ) exit( status );
7508
7509         /* make sure pthread_detach() isn't just a stub */
7510 #if HAVE_PTHREADS_D4
7511         status = pthread_detach( &t );
7512 #else
7513         status = pthread_detach( t );
7514 #endif
7515
7516 #ifdef HAVE_LINUX_THREADS
7517         pthread_kill_other_threads_np();
7518 #endif
7519
7520         exit( status );
7521
7522 ; return 0; }
7523 EOF
7524 if { (eval echo configure:7525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7525   rm -rf conftest*
7526   ol_cv_pthread_create=yes
7527 else
7528   echo "configure: failed program was:" >&5
7529   cat conftest.$ac_ext >&5
7530   rm -rf conftest*
7531   ol_cv_pthread_create=no
7532 fi
7533 rm -f conftest*
7534 else
7535   cat > conftest.$ac_ext <<EOF
7536 #line 7537 "configure"
7537 #include "confdefs.h"
7538 /* pthread test headers */
7539 #include <pthread.h>
7540 #ifndef NULL
7541 #define NULL (void*)0
7542 #endif
7543
7544 static void *task(p)
7545         void *p;
7546 {
7547         return (void *) (p == NULL);
7548 }
7549
7550
7551 int main(argc, argv)
7552         int argc;
7553         char **argv;
7554 {
7555
7556         /* pthread test function */
7557         pthread_t t;
7558         int status;
7559 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7560         /* This system (e.g. AIX) defaults detached; must override */
7561         pthread_attr_t attr;
7562
7563         status = pthread_attr_init(&attr);
7564         if( status ) exit( status );
7565
7566         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7567         if( status ) exit( status );
7568
7569 #define ATTR    &attr
7570 #else
7571 #if HAVE_PTHREADS_D4
7572 #define ATTR    pthread_attr_default
7573 #else
7574 #define ATTR    NULL
7575 #endif
7576 #endif
7577         /* make sure pthread_create() isn't just a stub */
7578         status = pthread_create(&t, ATTR, task, NULL);
7579         if( status ) exit( status );
7580
7581         /* make sure pthread_detach() isn't just a stub */
7582 #if HAVE_PTHREADS_D4
7583         status = pthread_detach( &t );
7584 #else
7585         status = pthread_detach( t );
7586 #endif
7587
7588 #ifdef HAVE_LINUX_THREADS
7589         pthread_kill_other_threads_np();
7590 #endif
7591
7592         exit( status );
7593
7594 }
7595
7596 EOF
7597 if { (eval echo configure:7598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7598 then
7599   ol_cv_pthread_create=yes
7600 else
7601   echo "configure: failed program was:" >&5
7602   cat conftest.$ac_ext >&5
7603   rm -fr conftest*
7604   ol_cv_pthread_create=no
7605 fi
7606 rm -fr conftest*
7607 fi
7608
7609 fi
7610
7611 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7612
7613                 if test $ol_cv_pthread_create != no ; then
7614                         ol_link_threads=posix
7615                         ol_link_pthreads=""
7616                 fi
7617                 
7618                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7619 if test "$ol_link_threads" = no ; then
7620         # try -kthread
7621         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7622 echo "configure:7623: checking for pthread link with -kthread" >&5
7623 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7624   echo $ac_n "(cached) $ac_c" 1>&6
7625 else
7626   
7627                 # save the flags
7628                 ol_LIBS="$LIBS"
7629                 LIBS="-kthread $LIBS"
7630
7631                 if test "$cross_compiling" = yes; then
7632   cat > conftest.$ac_ext <<EOF
7633 #line 7634 "configure"
7634 #include "confdefs.h"
7635 /* pthread test headers */
7636 #include <pthread.h>
7637 #ifndef NULL
7638 #define NULL (void*)0
7639 #endif
7640
7641 static void *task(p)
7642         void *p;
7643 {
7644         return (void *) (p == NULL);
7645 }
7646
7647 int main() {
7648
7649         /* pthread test function */
7650         pthread_t t;
7651         int status;
7652 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7653         /* This system (e.g. AIX) defaults detached; must override */
7654         pthread_attr_t attr;
7655
7656         status = pthread_attr_init(&attr);
7657         if( status ) exit( status );
7658
7659         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7660         if( status ) exit( status );
7661
7662 #define ATTR    &attr
7663 #else
7664 #if HAVE_PTHREADS_D4
7665 #define ATTR    pthread_attr_default
7666 #else
7667 #define ATTR    NULL
7668 #endif
7669 #endif
7670         /* make sure pthread_create() isn't just a stub */
7671         status = pthread_create(&t, ATTR, task, NULL);
7672         if( status ) exit( status );
7673
7674         /* make sure pthread_detach() isn't just a stub */
7675 #if HAVE_PTHREADS_D4
7676         status = pthread_detach( &t );
7677 #else
7678         status = pthread_detach( t );
7679 #endif
7680
7681 #ifdef HAVE_LINUX_THREADS
7682         pthread_kill_other_threads_np();
7683 #endif
7684
7685         exit( status );
7686
7687 ; return 0; }
7688 EOF
7689 if { (eval echo configure:7690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7690   rm -rf conftest*
7691   ol_cv_pthread_kthread=yes
7692 else
7693   echo "configure: failed program was:" >&5
7694   cat conftest.$ac_ext >&5
7695   rm -rf conftest*
7696   ol_cv_pthread_kthread=no
7697 fi
7698 rm -f conftest*
7699 else
7700   cat > conftest.$ac_ext <<EOF
7701 #line 7702 "configure"
7702 #include "confdefs.h"
7703 /* pthread test headers */
7704 #include <pthread.h>
7705 #ifndef NULL
7706 #define NULL (void*)0
7707 #endif
7708
7709 static void *task(p)
7710         void *p;
7711 {
7712         return (void *) (p == NULL);
7713 }
7714
7715
7716 int main(argc, argv)
7717         int argc;
7718         char **argv;
7719 {
7720
7721         /* pthread test function */
7722         pthread_t t;
7723         int status;
7724 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7725         /* This system (e.g. AIX) defaults detached; must override */
7726         pthread_attr_t attr;
7727
7728         status = pthread_attr_init(&attr);
7729         if( status ) exit( status );
7730
7731         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7732         if( status ) exit( status );
7733
7734 #define ATTR    &attr
7735 #else
7736 #if HAVE_PTHREADS_D4
7737 #define ATTR    pthread_attr_default
7738 #else
7739 #define ATTR    NULL
7740 #endif
7741 #endif
7742         /* make sure pthread_create() isn't just a stub */
7743         status = pthread_create(&t, ATTR, task, NULL);
7744         if( status ) exit( status );
7745
7746         /* make sure pthread_detach() isn't just a stub */
7747 #if HAVE_PTHREADS_D4
7748         status = pthread_detach( &t );
7749 #else
7750         status = pthread_detach( t );
7751 #endif
7752
7753 #ifdef HAVE_LINUX_THREADS
7754         pthread_kill_other_threads_np();
7755 #endif
7756
7757         exit( status );
7758
7759 }
7760
7761 EOF
7762 if { (eval echo configure:7763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7763 then
7764   ol_cv_pthread_kthread=yes
7765 else
7766   echo "configure: failed program was:" >&5
7767   cat conftest.$ac_ext >&5
7768   rm -fr conftest*
7769   ol_cv_pthread_kthread=no
7770 fi
7771 rm -fr conftest*
7772 fi
7773
7774
7775                 # restore the LIBS
7776                 LIBS="$ol_LIBS"
7777         
7778 fi
7779
7780 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7781
7782         if test $ol_cv_pthread_kthread = yes ; then
7783                 ol_link_pthreads="-kthread"
7784                 ol_link_threads=posix
7785         fi
7786 fi
7787
7788                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7789 if test "$ol_link_threads" = no ; then
7790         # try -pthread
7791         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7792 echo "configure:7793: checking for pthread link with -pthread" >&5
7793 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7794   echo $ac_n "(cached) $ac_c" 1>&6
7795 else
7796   
7797                 # save the flags
7798                 ol_LIBS="$LIBS"
7799                 LIBS="-pthread $LIBS"
7800
7801                 if test "$cross_compiling" = yes; then
7802   cat > conftest.$ac_ext <<EOF
7803 #line 7804 "configure"
7804 #include "confdefs.h"
7805 /* pthread test headers */
7806 #include <pthread.h>
7807 #ifndef NULL
7808 #define NULL (void*)0
7809 #endif
7810
7811 static void *task(p)
7812         void *p;
7813 {
7814         return (void *) (p == NULL);
7815 }
7816
7817 int main() {
7818
7819         /* pthread test function */
7820         pthread_t t;
7821         int status;
7822 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7823         /* This system (e.g. AIX) defaults detached; must override */
7824         pthread_attr_t attr;
7825
7826         status = pthread_attr_init(&attr);
7827         if( status ) exit( status );
7828
7829         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7830         if( status ) exit( status );
7831
7832 #define ATTR    &attr
7833 #else
7834 #if HAVE_PTHREADS_D4
7835 #define ATTR    pthread_attr_default
7836 #else
7837 #define ATTR    NULL
7838 #endif
7839 #endif
7840         /* make sure pthread_create() isn't just a stub */
7841         status = pthread_create(&t, ATTR, task, NULL);
7842         if( status ) exit( status );
7843
7844         /* make sure pthread_detach() isn't just a stub */
7845 #if HAVE_PTHREADS_D4
7846         status = pthread_detach( &t );
7847 #else
7848         status = pthread_detach( t );
7849 #endif
7850
7851 #ifdef HAVE_LINUX_THREADS
7852         pthread_kill_other_threads_np();
7853 #endif
7854
7855         exit( status );
7856
7857 ; return 0; }
7858 EOF
7859 if { (eval echo configure:7860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7860   rm -rf conftest*
7861   ol_cv_pthread_pthread=yes
7862 else
7863   echo "configure: failed program was:" >&5
7864   cat conftest.$ac_ext >&5
7865   rm -rf conftest*
7866   ol_cv_pthread_pthread=no
7867 fi
7868 rm -f conftest*
7869 else
7870   cat > conftest.$ac_ext <<EOF
7871 #line 7872 "configure"
7872 #include "confdefs.h"
7873 /* pthread test headers */
7874 #include <pthread.h>
7875 #ifndef NULL
7876 #define NULL (void*)0
7877 #endif
7878
7879 static void *task(p)
7880         void *p;
7881 {
7882         return (void *) (p == NULL);
7883 }
7884
7885
7886 int main(argc, argv)
7887         int argc;
7888         char **argv;
7889 {
7890
7891         /* pthread test function */
7892         pthread_t t;
7893         int status;
7894 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7895         /* This system (e.g. AIX) defaults detached; must override */
7896         pthread_attr_t attr;
7897
7898         status = pthread_attr_init(&attr);
7899         if( status ) exit( status );
7900
7901         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7902         if( status ) exit( status );
7903
7904 #define ATTR    &attr
7905 #else
7906 #if HAVE_PTHREADS_D4
7907 #define ATTR    pthread_attr_default
7908 #else
7909 #define ATTR    NULL
7910 #endif
7911 #endif
7912         /* make sure pthread_create() isn't just a stub */
7913         status = pthread_create(&t, ATTR, task, NULL);
7914         if( status ) exit( status );
7915
7916         /* make sure pthread_detach() isn't just a stub */
7917 #if HAVE_PTHREADS_D4
7918         status = pthread_detach( &t );
7919 #else
7920         status = pthread_detach( t );
7921 #endif
7922
7923 #ifdef HAVE_LINUX_THREADS
7924         pthread_kill_other_threads_np();
7925 #endif
7926
7927         exit( status );
7928
7929 }
7930
7931 EOF
7932 if { (eval echo configure:7933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7933 then
7934   ol_cv_pthread_pthread=yes
7935 else
7936   echo "configure: failed program was:" >&5
7937   cat conftest.$ac_ext >&5
7938   rm -fr conftest*
7939   ol_cv_pthread_pthread=no
7940 fi
7941 rm -fr conftest*
7942 fi
7943
7944
7945                 # restore the LIBS
7946                 LIBS="$ol_LIBS"
7947         
7948 fi
7949
7950 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7951
7952         if test $ol_cv_pthread_pthread = yes ; then
7953                 ol_link_pthreads="-pthread"
7954                 ol_link_threads=posix
7955         fi
7956 fi
7957
7958                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7959 if test "$ol_link_threads" = no ; then
7960         # try -pthreads
7961         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7962 echo "configure:7963: checking for pthread link with -pthreads" >&5
7963 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7964   echo $ac_n "(cached) $ac_c" 1>&6
7965 else
7966   
7967                 # save the flags
7968                 ol_LIBS="$LIBS"
7969                 LIBS="-pthreads $LIBS"
7970
7971                 if test "$cross_compiling" = yes; then
7972   cat > conftest.$ac_ext <<EOF
7973 #line 7974 "configure"
7974 #include "confdefs.h"
7975 /* pthread test headers */
7976 #include <pthread.h>
7977 #ifndef NULL
7978 #define NULL (void*)0
7979 #endif
7980
7981 static void *task(p)
7982         void *p;
7983 {
7984         return (void *) (p == NULL);
7985 }
7986
7987 int main() {
7988
7989         /* pthread test function */
7990         pthread_t t;
7991         int status;
7992 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7993         /* This system (e.g. AIX) defaults detached; must override */
7994         pthread_attr_t attr;
7995
7996         status = pthread_attr_init(&attr);
7997         if( status ) exit( status );
7998
7999         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8000         if( status ) exit( status );
8001
8002 #define ATTR    &attr
8003 #else
8004 #if HAVE_PTHREADS_D4
8005 #define ATTR    pthread_attr_default
8006 #else
8007 #define ATTR    NULL
8008 #endif
8009 #endif
8010         /* make sure pthread_create() isn't just a stub */
8011         status = pthread_create(&t, ATTR, task, NULL);
8012         if( status ) exit( status );
8013
8014         /* make sure pthread_detach() isn't just a stub */
8015 #if HAVE_PTHREADS_D4
8016         status = pthread_detach( &t );
8017 #else
8018         status = pthread_detach( t );
8019 #endif
8020
8021 #ifdef HAVE_LINUX_THREADS
8022         pthread_kill_other_threads_np();
8023 #endif
8024
8025         exit( status );
8026
8027 ; return 0; }
8028 EOF
8029 if { (eval echo configure:8030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8030   rm -rf conftest*
8031   ol_cv_pthread_pthreads=yes
8032 else
8033   echo "configure: failed program was:" >&5
8034   cat conftest.$ac_ext >&5
8035   rm -rf conftest*
8036   ol_cv_pthread_pthreads=no
8037 fi
8038 rm -f conftest*
8039 else
8040   cat > conftest.$ac_ext <<EOF
8041 #line 8042 "configure"
8042 #include "confdefs.h"
8043 /* pthread test headers */
8044 #include <pthread.h>
8045 #ifndef NULL
8046 #define NULL (void*)0
8047 #endif
8048
8049 static void *task(p)
8050         void *p;
8051 {
8052         return (void *) (p == NULL);
8053 }
8054
8055
8056 int main(argc, argv)
8057         int argc;
8058         char **argv;
8059 {
8060
8061         /* pthread test function */
8062         pthread_t t;
8063         int status;
8064 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8065         /* This system (e.g. AIX) defaults detached; must override */
8066         pthread_attr_t attr;
8067
8068         status = pthread_attr_init(&attr);
8069         if( status ) exit( status );
8070
8071         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8072         if( status ) exit( status );
8073
8074 #define ATTR    &attr
8075 #else
8076 #if HAVE_PTHREADS_D4
8077 #define ATTR    pthread_attr_default
8078 #else
8079 #define ATTR    NULL
8080 #endif
8081 #endif
8082         /* make sure pthread_create() isn't just a stub */
8083         status = pthread_create(&t, ATTR, task, NULL);
8084         if( status ) exit( status );
8085
8086         /* make sure pthread_detach() isn't just a stub */
8087 #if HAVE_PTHREADS_D4
8088         status = pthread_detach( &t );
8089 #else
8090         status = pthread_detach( t );
8091 #endif
8092
8093 #ifdef HAVE_LINUX_THREADS
8094         pthread_kill_other_threads_np();
8095 #endif
8096
8097         exit( status );
8098
8099 }
8100
8101 EOF
8102 if { (eval echo configure:8103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8103 then
8104   ol_cv_pthread_pthreads=yes
8105 else
8106   echo "configure: failed program was:" >&5
8107   cat conftest.$ac_ext >&5
8108   rm -fr conftest*
8109   ol_cv_pthread_pthreads=no
8110 fi
8111 rm -fr conftest*
8112 fi
8113
8114
8115                 # restore the LIBS
8116                 LIBS="$ol_LIBS"
8117         
8118 fi
8119
8120 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8121
8122         if test $ol_cv_pthread_pthreads = yes ; then
8123                 ol_link_pthreads="-pthreads"
8124                 ol_link_threads=posix
8125         fi
8126 fi
8127
8128                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8129 if test "$ol_link_threads" = no ; then
8130         # try -mthreads
8131         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8132 echo "configure:8133: checking for pthread link with -mthreads" >&5
8133 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8134   echo $ac_n "(cached) $ac_c" 1>&6
8135 else
8136   
8137                 # save the flags
8138                 ol_LIBS="$LIBS"
8139                 LIBS="-mthreads $LIBS"
8140
8141                 if test "$cross_compiling" = yes; then
8142   cat > conftest.$ac_ext <<EOF
8143 #line 8144 "configure"
8144 #include "confdefs.h"
8145 /* pthread test headers */
8146 #include <pthread.h>
8147 #ifndef NULL
8148 #define NULL (void*)0
8149 #endif
8150
8151 static void *task(p)
8152         void *p;
8153 {
8154         return (void *) (p == NULL);
8155 }
8156
8157 int main() {
8158
8159         /* pthread test function */
8160         pthread_t t;
8161         int status;
8162 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8163         /* This system (e.g. AIX) defaults detached; must override */
8164         pthread_attr_t attr;
8165
8166         status = pthread_attr_init(&attr);
8167         if( status ) exit( status );
8168
8169         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8170         if( status ) exit( status );
8171
8172 #define ATTR    &attr
8173 #else
8174 #if HAVE_PTHREADS_D4
8175 #define ATTR    pthread_attr_default
8176 #else
8177 #define ATTR    NULL
8178 #endif
8179 #endif
8180         /* make sure pthread_create() isn't just a stub */
8181         status = pthread_create(&t, ATTR, task, NULL);
8182         if( status ) exit( status );
8183
8184         /* make sure pthread_detach() isn't just a stub */
8185 #if HAVE_PTHREADS_D4
8186         status = pthread_detach( &t );
8187 #else
8188         status = pthread_detach( t );
8189 #endif
8190
8191 #ifdef HAVE_LINUX_THREADS
8192         pthread_kill_other_threads_np();
8193 #endif
8194
8195         exit( status );
8196
8197 ; return 0; }
8198 EOF
8199 if { (eval echo configure:8200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8200   rm -rf conftest*
8201   ol_cv_pthread_mthreads=yes
8202 else
8203   echo "configure: failed program was:" >&5
8204   cat conftest.$ac_ext >&5
8205   rm -rf conftest*
8206   ol_cv_pthread_mthreads=no
8207 fi
8208 rm -f conftest*
8209 else
8210   cat > conftest.$ac_ext <<EOF
8211 #line 8212 "configure"
8212 #include "confdefs.h"
8213 /* pthread test headers */
8214 #include <pthread.h>
8215 #ifndef NULL
8216 #define NULL (void*)0
8217 #endif
8218
8219 static void *task(p)
8220         void *p;
8221 {
8222         return (void *) (p == NULL);
8223 }
8224
8225
8226 int main(argc, argv)
8227         int argc;
8228         char **argv;
8229 {
8230
8231         /* pthread test function */
8232         pthread_t t;
8233         int status;
8234 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8235         /* This system (e.g. AIX) defaults detached; must override */
8236         pthread_attr_t attr;
8237
8238         status = pthread_attr_init(&attr);
8239         if( status ) exit( status );
8240
8241         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8242         if( status ) exit( status );
8243
8244 #define ATTR    &attr
8245 #else
8246 #if HAVE_PTHREADS_D4
8247 #define ATTR    pthread_attr_default
8248 #else
8249 #define ATTR    NULL
8250 #endif
8251 #endif
8252         /* make sure pthread_create() isn't just a stub */
8253         status = pthread_create(&t, ATTR, task, NULL);
8254         if( status ) exit( status );
8255
8256         /* make sure pthread_detach() isn't just a stub */
8257 #if HAVE_PTHREADS_D4
8258         status = pthread_detach( &t );
8259 #else
8260         status = pthread_detach( t );
8261 #endif
8262
8263 #ifdef HAVE_LINUX_THREADS
8264         pthread_kill_other_threads_np();
8265 #endif
8266
8267         exit( status );
8268
8269 }
8270
8271 EOF
8272 if { (eval echo configure:8273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8273 then
8274   ol_cv_pthread_mthreads=yes
8275 else
8276   echo "configure: failed program was:" >&5
8277   cat conftest.$ac_ext >&5
8278   rm -fr conftest*
8279   ol_cv_pthread_mthreads=no
8280 fi
8281 rm -fr conftest*
8282 fi
8283
8284
8285                 # restore the LIBS
8286                 LIBS="$ol_LIBS"
8287         
8288 fi
8289
8290 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8291
8292         if test $ol_cv_pthread_mthreads = yes ; then
8293                 ol_link_pthreads="-mthreads"
8294                 ol_link_threads=posix
8295         fi
8296 fi
8297
8298                 # Pthread try link: -thread (ol_cv_pthread_thread)
8299 if test "$ol_link_threads" = no ; then
8300         # try -thread
8301         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8302 echo "configure:8303: checking for pthread link with -thread" >&5
8303 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8304   echo $ac_n "(cached) $ac_c" 1>&6
8305 else
8306   
8307                 # save the flags
8308                 ol_LIBS="$LIBS"
8309                 LIBS="-thread $LIBS"
8310
8311                 if test "$cross_compiling" = yes; then
8312   cat > conftest.$ac_ext <<EOF
8313 #line 8314 "configure"
8314 #include "confdefs.h"
8315 /* pthread test headers */
8316 #include <pthread.h>
8317 #ifndef NULL
8318 #define NULL (void*)0
8319 #endif
8320
8321 static void *task(p)
8322         void *p;
8323 {
8324         return (void *) (p == NULL);
8325 }
8326
8327 int main() {
8328
8329         /* pthread test function */
8330         pthread_t t;
8331         int status;
8332 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8333         /* This system (e.g. AIX) defaults detached; must override */
8334         pthread_attr_t attr;
8335
8336         status = pthread_attr_init(&attr);
8337         if( status ) exit( status );
8338
8339         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8340         if( status ) exit( status );
8341
8342 #define ATTR    &attr
8343 #else
8344 #if HAVE_PTHREADS_D4
8345 #define ATTR    pthread_attr_default
8346 #else
8347 #define ATTR    NULL
8348 #endif
8349 #endif
8350         /* make sure pthread_create() isn't just a stub */
8351         status = pthread_create(&t, ATTR, task, NULL);
8352         if( status ) exit( status );
8353
8354         /* make sure pthread_detach() isn't just a stub */
8355 #if HAVE_PTHREADS_D4
8356         status = pthread_detach( &t );
8357 #else
8358         status = pthread_detach( t );
8359 #endif
8360
8361 #ifdef HAVE_LINUX_THREADS
8362         pthread_kill_other_threads_np();
8363 #endif
8364
8365         exit( status );
8366
8367 ; return 0; }
8368 EOF
8369 if { (eval echo configure:8370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8370   rm -rf conftest*
8371   ol_cv_pthread_thread=yes
8372 else
8373   echo "configure: failed program was:" >&5
8374   cat conftest.$ac_ext >&5
8375   rm -rf conftest*
8376   ol_cv_pthread_thread=no
8377 fi
8378 rm -f conftest*
8379 else
8380   cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8383 /* pthread test headers */
8384 #include <pthread.h>
8385 #ifndef NULL
8386 #define NULL (void*)0
8387 #endif
8388
8389 static void *task(p)
8390         void *p;
8391 {
8392         return (void *) (p == NULL);
8393 }
8394
8395
8396 int main(argc, argv)
8397         int argc;
8398         char **argv;
8399 {
8400
8401         /* pthread test function */
8402         pthread_t t;
8403         int status;
8404 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8405         /* This system (e.g. AIX) defaults detached; must override */
8406         pthread_attr_t attr;
8407
8408         status = pthread_attr_init(&attr);
8409         if( status ) exit( status );
8410
8411         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8412         if( status ) exit( status );
8413
8414 #define ATTR    &attr
8415 #else
8416 #if HAVE_PTHREADS_D4
8417 #define ATTR    pthread_attr_default
8418 #else
8419 #define ATTR    NULL
8420 #endif
8421 #endif
8422         /* make sure pthread_create() isn't just a stub */
8423         status = pthread_create(&t, ATTR, task, NULL);
8424         if( status ) exit( status );
8425
8426         /* make sure pthread_detach() isn't just a stub */
8427 #if HAVE_PTHREADS_D4
8428         status = pthread_detach( &t );
8429 #else
8430         status = pthread_detach( t );
8431 #endif
8432
8433 #ifdef HAVE_LINUX_THREADS
8434         pthread_kill_other_threads_np();
8435 #endif
8436
8437         exit( status );
8438
8439 }
8440
8441 EOF
8442 if { (eval echo configure:8443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8443 then
8444   ol_cv_pthread_thread=yes
8445 else
8446   echo "configure: failed program was:" >&5
8447   cat conftest.$ac_ext >&5
8448   rm -fr conftest*
8449   ol_cv_pthread_thread=no
8450 fi
8451 rm -fr conftest*
8452 fi
8453
8454
8455                 # restore the LIBS
8456                 LIBS="$ol_LIBS"
8457         
8458 fi
8459
8460 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8461
8462         if test $ol_cv_pthread_thread = yes ; then
8463                 ol_link_pthreads="-thread"
8464                 ol_link_threads=posix
8465         fi
8466 fi
8467
8468
8469                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8470 if test "$ol_link_threads" = no ; then
8471         # try -lpthread -lmach -lexc -lc_r
8472         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8473 echo "configure:8474: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8474 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8475   echo $ac_n "(cached) $ac_c" 1>&6
8476 else
8477   
8478                 # save the flags
8479                 ol_LIBS="$LIBS"
8480                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8481
8482                 if test "$cross_compiling" = yes; then
8483   cat > conftest.$ac_ext <<EOF
8484 #line 8485 "configure"
8485 #include "confdefs.h"
8486 /* pthread test headers */
8487 #include <pthread.h>
8488 #ifndef NULL
8489 #define NULL (void*)0
8490 #endif
8491
8492 static void *task(p)
8493         void *p;
8494 {
8495         return (void *) (p == NULL);
8496 }
8497
8498 int main() {
8499
8500         /* pthread test function */
8501         pthread_t t;
8502         int status;
8503 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8504         /* This system (e.g. AIX) defaults detached; must override */
8505         pthread_attr_t attr;
8506
8507         status = pthread_attr_init(&attr);
8508         if( status ) exit( status );
8509
8510         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8511         if( status ) exit( status );
8512
8513 #define ATTR    &attr
8514 #else
8515 #if HAVE_PTHREADS_D4
8516 #define ATTR    pthread_attr_default
8517 #else
8518 #define ATTR    NULL
8519 #endif
8520 #endif
8521         /* make sure pthread_create() isn't just a stub */
8522         status = pthread_create(&t, ATTR, task, NULL);
8523         if( status ) exit( status );
8524
8525         /* make sure pthread_detach() isn't just a stub */
8526 #if HAVE_PTHREADS_D4
8527         status = pthread_detach( &t );
8528 #else
8529         status = pthread_detach( t );
8530 #endif
8531
8532 #ifdef HAVE_LINUX_THREADS
8533         pthread_kill_other_threads_np();
8534 #endif
8535
8536         exit( status );
8537
8538 ; return 0; }
8539 EOF
8540 if { (eval echo configure:8541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8541   rm -rf conftest*
8542   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8543 else
8544   echo "configure: failed program was:" >&5
8545   cat conftest.$ac_ext >&5
8546   rm -rf conftest*
8547   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8548 fi
8549 rm -f conftest*
8550 else
8551   cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 /* pthread test headers */
8555 #include <pthread.h>
8556 #ifndef NULL
8557 #define NULL (void*)0
8558 #endif
8559
8560 static void *task(p)
8561         void *p;
8562 {
8563         return (void *) (p == NULL);
8564 }
8565
8566
8567 int main(argc, argv)
8568         int argc;
8569         char **argv;
8570 {
8571
8572         /* pthread test function */
8573         pthread_t t;
8574         int status;
8575 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8576         /* This system (e.g. AIX) defaults detached; must override */
8577         pthread_attr_t attr;
8578
8579         status = pthread_attr_init(&attr);
8580         if( status ) exit( status );
8581
8582         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8583         if( status ) exit( status );
8584
8585 #define ATTR    &attr
8586 #else
8587 #if HAVE_PTHREADS_D4
8588 #define ATTR    pthread_attr_default
8589 #else
8590 #define ATTR    NULL
8591 #endif
8592 #endif
8593         /* make sure pthread_create() isn't just a stub */
8594         status = pthread_create(&t, ATTR, task, NULL);
8595         if( status ) exit( status );
8596
8597         /* make sure pthread_detach() isn't just a stub */
8598 #if HAVE_PTHREADS_D4
8599         status = pthread_detach( &t );
8600 #else
8601         status = pthread_detach( t );
8602 #endif
8603
8604 #ifdef HAVE_LINUX_THREADS
8605         pthread_kill_other_threads_np();
8606 #endif
8607
8608         exit( status );
8609
8610 }
8611
8612 EOF
8613 if { (eval echo configure:8614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8614 then
8615   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8616 else
8617   echo "configure: failed program was:" >&5
8618   cat conftest.$ac_ext >&5
8619   rm -fr conftest*
8620   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8621 fi
8622 rm -fr conftest*
8623 fi
8624
8625
8626                 # restore the LIBS
8627                 LIBS="$ol_LIBS"
8628         
8629 fi
8630
8631 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8632
8633         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8634                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8635                 ol_link_threads=posix
8636         fi
8637 fi
8638
8639                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8640 if test "$ol_link_threads" = no ; then
8641         # try -lpthread -lmach -lexc
8642         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8643 echo "configure:8644: checking for pthread link with -lpthread -lmach -lexc" >&5
8644 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8645   echo $ac_n "(cached) $ac_c" 1>&6
8646 else
8647   
8648                 # save the flags
8649                 ol_LIBS="$LIBS"
8650                 LIBS="-lpthread -lmach -lexc $LIBS"
8651
8652                 if test "$cross_compiling" = yes; then
8653   cat > conftest.$ac_ext <<EOF
8654 #line 8655 "configure"
8655 #include "confdefs.h"
8656 /* pthread test headers */
8657 #include <pthread.h>
8658 #ifndef NULL
8659 #define NULL (void*)0
8660 #endif
8661
8662 static void *task(p)
8663         void *p;
8664 {
8665         return (void *) (p == NULL);
8666 }
8667
8668 int main() {
8669
8670         /* pthread test function */
8671         pthread_t t;
8672         int status;
8673 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8674         /* This system (e.g. AIX) defaults detached; must override */
8675         pthread_attr_t attr;
8676
8677         status = pthread_attr_init(&attr);
8678         if( status ) exit( status );
8679
8680         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8681         if( status ) exit( status );
8682
8683 #define ATTR    &attr
8684 #else
8685 #if HAVE_PTHREADS_D4
8686 #define ATTR    pthread_attr_default
8687 #else
8688 #define ATTR    NULL
8689 #endif
8690 #endif
8691         /* make sure pthread_create() isn't just a stub */
8692         status = pthread_create(&t, ATTR, task, NULL);
8693         if( status ) exit( status );
8694
8695         /* make sure pthread_detach() isn't just a stub */
8696 #if HAVE_PTHREADS_D4
8697         status = pthread_detach( &t );
8698 #else
8699         status = pthread_detach( t );
8700 #endif
8701
8702 #ifdef HAVE_LINUX_THREADS
8703         pthread_kill_other_threads_np();
8704 #endif
8705
8706         exit( status );
8707
8708 ; return 0; }
8709 EOF
8710 if { (eval echo configure:8711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8711   rm -rf conftest*
8712   ol_cv_pthread_lpthread_lmach_lexc=yes
8713 else
8714   echo "configure: failed program was:" >&5
8715   cat conftest.$ac_ext >&5
8716   rm -rf conftest*
8717   ol_cv_pthread_lpthread_lmach_lexc=no
8718 fi
8719 rm -f conftest*
8720 else
8721   cat > conftest.$ac_ext <<EOF
8722 #line 8723 "configure"
8723 #include "confdefs.h"
8724 /* pthread test headers */
8725 #include <pthread.h>
8726 #ifndef NULL
8727 #define NULL (void*)0
8728 #endif
8729
8730 static void *task(p)
8731         void *p;
8732 {
8733         return (void *) (p == NULL);
8734 }
8735
8736
8737 int main(argc, argv)
8738         int argc;
8739         char **argv;
8740 {
8741
8742         /* pthread test function */
8743         pthread_t t;
8744         int status;
8745 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8746         /* This system (e.g. AIX) defaults detached; must override */
8747         pthread_attr_t attr;
8748
8749         status = pthread_attr_init(&attr);
8750         if( status ) exit( status );
8751
8752         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8753         if( status ) exit( status );
8754
8755 #define ATTR    &attr
8756 #else
8757 #if HAVE_PTHREADS_D4
8758 #define ATTR    pthread_attr_default
8759 #else
8760 #define ATTR    NULL
8761 #endif
8762 #endif
8763         /* make sure pthread_create() isn't just a stub */
8764         status = pthread_create(&t, ATTR, task, NULL);
8765         if( status ) exit( status );
8766
8767         /* make sure pthread_detach() isn't just a stub */
8768 #if HAVE_PTHREADS_D4
8769         status = pthread_detach( &t );
8770 #else
8771         status = pthread_detach( t );
8772 #endif
8773
8774 #ifdef HAVE_LINUX_THREADS
8775         pthread_kill_other_threads_np();
8776 #endif
8777
8778         exit( status );
8779
8780 }
8781
8782 EOF
8783 if { (eval echo configure:8784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8784 then
8785   ol_cv_pthread_lpthread_lmach_lexc=yes
8786 else
8787   echo "configure: failed program was:" >&5
8788   cat conftest.$ac_ext >&5
8789   rm -fr conftest*
8790   ol_cv_pthread_lpthread_lmach_lexc=no
8791 fi
8792 rm -fr conftest*
8793 fi
8794
8795
8796                 # restore the LIBS
8797                 LIBS="$ol_LIBS"
8798         
8799 fi
8800
8801 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8802
8803         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8804                 ol_link_pthreads="-lpthread -lmach -lexc"
8805                 ol_link_threads=posix
8806         fi
8807 fi
8808
8809
8810                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8811 if test "$ol_link_threads" = no ; then
8812         # try -lpthread -Wl,-woff,85
8813         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8814 echo "configure:8815: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8815 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8816   echo $ac_n "(cached) $ac_c" 1>&6
8817 else
8818   
8819                 # save the flags
8820                 ol_LIBS="$LIBS"
8821                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8822
8823                 if test "$cross_compiling" = yes; then
8824   cat > conftest.$ac_ext <<EOF
8825 #line 8826 "configure"
8826 #include "confdefs.h"
8827 /* pthread test headers */
8828 #include <pthread.h>
8829 #ifndef NULL
8830 #define NULL (void*)0
8831 #endif
8832
8833 static void *task(p)
8834         void *p;
8835 {
8836         return (void *) (p == NULL);
8837 }
8838
8839 int main() {
8840
8841         /* pthread test function */
8842         pthread_t t;
8843         int status;
8844 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8845         /* This system (e.g. AIX) defaults detached; must override */
8846         pthread_attr_t attr;
8847
8848         status = pthread_attr_init(&attr);
8849         if( status ) exit( status );
8850
8851         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8852         if( status ) exit( status );
8853
8854 #define ATTR    &attr
8855 #else
8856 #if HAVE_PTHREADS_D4
8857 #define ATTR    pthread_attr_default
8858 #else
8859 #define ATTR    NULL
8860 #endif
8861 #endif
8862         /* make sure pthread_create() isn't just a stub */
8863         status = pthread_create(&t, ATTR, task, NULL);
8864         if( status ) exit( status );
8865
8866         /* make sure pthread_detach() isn't just a stub */
8867 #if HAVE_PTHREADS_D4
8868         status = pthread_detach( &t );
8869 #else
8870         status = pthread_detach( t );
8871 #endif
8872
8873 #ifdef HAVE_LINUX_THREADS
8874         pthread_kill_other_threads_np();
8875 #endif
8876
8877         exit( status );
8878
8879 ; return 0; }
8880 EOF
8881 if { (eval echo configure:8882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8882   rm -rf conftest*
8883   ol_cv_pthread_lib_lpthread_woff=yes
8884 else
8885   echo "configure: failed program was:" >&5
8886   cat conftest.$ac_ext >&5
8887   rm -rf conftest*
8888   ol_cv_pthread_lib_lpthread_woff=no
8889 fi
8890 rm -f conftest*
8891 else
8892   cat > conftest.$ac_ext <<EOF
8893 #line 8894 "configure"
8894 #include "confdefs.h"
8895 /* pthread test headers */
8896 #include <pthread.h>
8897 #ifndef NULL
8898 #define NULL (void*)0
8899 #endif
8900
8901 static void *task(p)
8902         void *p;
8903 {
8904         return (void *) (p == NULL);
8905 }
8906
8907
8908 int main(argc, argv)
8909         int argc;
8910         char **argv;
8911 {
8912
8913         /* pthread test function */
8914         pthread_t t;
8915         int status;
8916 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8917         /* This system (e.g. AIX) defaults detached; must override */
8918         pthread_attr_t attr;
8919
8920         status = pthread_attr_init(&attr);
8921         if( status ) exit( status );
8922
8923         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8924         if( status ) exit( status );
8925
8926 #define ATTR    &attr
8927 #else
8928 #if HAVE_PTHREADS_D4
8929 #define ATTR    pthread_attr_default
8930 #else
8931 #define ATTR    NULL
8932 #endif
8933 #endif
8934         /* make sure pthread_create() isn't just a stub */
8935         status = pthread_create(&t, ATTR, task, NULL);
8936         if( status ) exit( status );
8937
8938         /* make sure pthread_detach() isn't just a stub */
8939 #if HAVE_PTHREADS_D4
8940         status = pthread_detach( &t );
8941 #else
8942         status = pthread_detach( t );
8943 #endif
8944
8945 #ifdef HAVE_LINUX_THREADS
8946         pthread_kill_other_threads_np();
8947 #endif
8948
8949         exit( status );
8950
8951 }
8952
8953 EOF
8954 if { (eval echo configure:8955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8955 then
8956   ol_cv_pthread_lib_lpthread_woff=yes
8957 else
8958   echo "configure: failed program was:" >&5
8959   cat conftest.$ac_ext >&5
8960   rm -fr conftest*
8961   ol_cv_pthread_lib_lpthread_woff=no
8962 fi
8963 rm -fr conftest*
8964 fi
8965
8966
8967                 # restore the LIBS
8968                 LIBS="$ol_LIBS"
8969         
8970 fi
8971
8972 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8973
8974         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8975                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8976                 ol_link_threads=posix
8977         fi
8978 fi
8979
8980
8981                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8982 if test "$ol_link_threads" = no ; then
8983         # try -lpthread
8984         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8985 echo "configure:8986: checking for pthread link with -lpthread" >&5
8986 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8987   echo $ac_n "(cached) $ac_c" 1>&6
8988 else
8989   
8990                 # save the flags
8991                 ol_LIBS="$LIBS"
8992                 LIBS="-lpthread $LIBS"
8993
8994                 if test "$cross_compiling" = yes; then
8995   cat > conftest.$ac_ext <<EOF
8996 #line 8997 "configure"
8997 #include "confdefs.h"
8998 /* pthread test headers */
8999 #include <pthread.h>
9000 #ifndef NULL
9001 #define NULL (void*)0
9002 #endif
9003
9004 static void *task(p)
9005         void *p;
9006 {
9007         return (void *) (p == NULL);
9008 }
9009
9010 int main() {
9011
9012         /* pthread test function */
9013         pthread_t t;
9014         int status;
9015 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9016         /* This system (e.g. AIX) defaults detached; must override */
9017         pthread_attr_t attr;
9018
9019         status = pthread_attr_init(&attr);
9020         if( status ) exit( status );
9021
9022         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9023         if( status ) exit( status );
9024
9025 #define ATTR    &attr
9026 #else
9027 #if HAVE_PTHREADS_D4
9028 #define ATTR    pthread_attr_default
9029 #else
9030 #define ATTR    NULL
9031 #endif
9032 #endif
9033         /* make sure pthread_create() isn't just a stub */
9034         status = pthread_create(&t, ATTR, task, NULL);
9035         if( status ) exit( status );
9036
9037         /* make sure pthread_detach() isn't just a stub */
9038 #if HAVE_PTHREADS_D4
9039         status = pthread_detach( &t );
9040 #else
9041         status = pthread_detach( t );
9042 #endif
9043
9044 #ifdef HAVE_LINUX_THREADS
9045         pthread_kill_other_threads_np();
9046 #endif
9047
9048         exit( status );
9049
9050 ; return 0; }
9051 EOF
9052 if { (eval echo configure:9053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9053   rm -rf conftest*
9054   ol_cv_pthread_lpthread=yes
9055 else
9056   echo "configure: failed program was:" >&5
9057   cat conftest.$ac_ext >&5
9058   rm -rf conftest*
9059   ol_cv_pthread_lpthread=no
9060 fi
9061 rm -f conftest*
9062 else
9063   cat > conftest.$ac_ext <<EOF
9064 #line 9065 "configure"
9065 #include "confdefs.h"
9066 /* pthread test headers */
9067 #include <pthread.h>
9068 #ifndef NULL
9069 #define NULL (void*)0
9070 #endif
9071
9072 static void *task(p)
9073         void *p;
9074 {
9075         return (void *) (p == NULL);
9076 }
9077
9078
9079 int main(argc, argv)
9080         int argc;
9081         char **argv;
9082 {
9083
9084         /* pthread test function */
9085         pthread_t t;
9086         int status;
9087 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9088         /* This system (e.g. AIX) defaults detached; must override */
9089         pthread_attr_t attr;
9090
9091         status = pthread_attr_init(&attr);
9092         if( status ) exit( status );
9093
9094         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9095         if( status ) exit( status );
9096
9097 #define ATTR    &attr
9098 #else
9099 #if HAVE_PTHREADS_D4
9100 #define ATTR    pthread_attr_default
9101 #else
9102 #define ATTR    NULL
9103 #endif
9104 #endif
9105         /* make sure pthread_create() isn't just a stub */
9106         status = pthread_create(&t, ATTR, task, NULL);
9107         if( status ) exit( status );
9108
9109         /* make sure pthread_detach() isn't just a stub */
9110 #if HAVE_PTHREADS_D4
9111         status = pthread_detach( &t );
9112 #else
9113         status = pthread_detach( t );
9114 #endif
9115
9116 #ifdef HAVE_LINUX_THREADS
9117         pthread_kill_other_threads_np();
9118 #endif
9119
9120         exit( status );
9121
9122 }
9123
9124 EOF
9125 if { (eval echo configure:9126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9126 then
9127   ol_cv_pthread_lpthread=yes
9128 else
9129   echo "configure: failed program was:" >&5
9130   cat conftest.$ac_ext >&5
9131   rm -fr conftest*
9132   ol_cv_pthread_lpthread=no
9133 fi
9134 rm -fr conftest*
9135 fi
9136
9137
9138                 # restore the LIBS
9139                 LIBS="$ol_LIBS"
9140         
9141 fi
9142
9143 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9144
9145         if test $ol_cv_pthread_lpthread = yes ; then
9146                 ol_link_pthreads="-lpthread"
9147                 ol_link_threads=posix
9148         fi
9149 fi
9150
9151                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9152 if test "$ol_link_threads" = no ; then
9153         # try -lc_r
9154         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9155 echo "configure:9156: checking for pthread link with -lc_r" >&5
9156 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9157   echo $ac_n "(cached) $ac_c" 1>&6
9158 else
9159   
9160                 # save the flags
9161                 ol_LIBS="$LIBS"
9162                 LIBS="-lc_r $LIBS"
9163
9164                 if test "$cross_compiling" = yes; then
9165   cat > conftest.$ac_ext <<EOF
9166 #line 9167 "configure"
9167 #include "confdefs.h"
9168 /* pthread test headers */
9169 #include <pthread.h>
9170 #ifndef NULL
9171 #define NULL (void*)0
9172 #endif
9173
9174 static void *task(p)
9175         void *p;
9176 {
9177         return (void *) (p == NULL);
9178 }
9179
9180 int main() {
9181
9182         /* pthread test function */
9183         pthread_t t;
9184         int status;
9185 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9186         /* This system (e.g. AIX) defaults detached; must override */
9187         pthread_attr_t attr;
9188
9189         status = pthread_attr_init(&attr);
9190         if( status ) exit( status );
9191
9192         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9193         if( status ) exit( status );
9194
9195 #define ATTR    &attr
9196 #else
9197 #if HAVE_PTHREADS_D4
9198 #define ATTR    pthread_attr_default
9199 #else
9200 #define ATTR    NULL
9201 #endif
9202 #endif
9203         /* make sure pthread_create() isn't just a stub */
9204         status = pthread_create(&t, ATTR, task, NULL);
9205         if( status ) exit( status );
9206
9207         /* make sure pthread_detach() isn't just a stub */
9208 #if HAVE_PTHREADS_D4
9209         status = pthread_detach( &t );
9210 #else
9211         status = pthread_detach( t );
9212 #endif
9213
9214 #ifdef HAVE_LINUX_THREADS
9215         pthread_kill_other_threads_np();
9216 #endif
9217
9218         exit( status );
9219
9220 ; return 0; }
9221 EOF
9222 if { (eval echo configure:9223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9223   rm -rf conftest*
9224   ol_cv_pthread_lc_r=yes
9225 else
9226   echo "configure: failed program was:" >&5
9227   cat conftest.$ac_ext >&5
9228   rm -rf conftest*
9229   ol_cv_pthread_lc_r=no
9230 fi
9231 rm -f conftest*
9232 else
9233   cat > conftest.$ac_ext <<EOF
9234 #line 9235 "configure"
9235 #include "confdefs.h"
9236 /* pthread test headers */
9237 #include <pthread.h>
9238 #ifndef NULL
9239 #define NULL (void*)0
9240 #endif
9241
9242 static void *task(p)
9243         void *p;
9244 {
9245         return (void *) (p == NULL);
9246 }
9247
9248
9249 int main(argc, argv)
9250         int argc;
9251         char **argv;
9252 {
9253
9254         /* pthread test function */
9255         pthread_t t;
9256         int status;
9257 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9258         /* This system (e.g. AIX) defaults detached; must override */
9259         pthread_attr_t attr;
9260
9261         status = pthread_attr_init(&attr);
9262         if( status ) exit( status );
9263
9264         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9265         if( status ) exit( status );
9266
9267 #define ATTR    &attr
9268 #else
9269 #if HAVE_PTHREADS_D4
9270 #define ATTR    pthread_attr_default
9271 #else
9272 #define ATTR    NULL
9273 #endif
9274 #endif
9275         /* make sure pthread_create() isn't just a stub */
9276         status = pthread_create(&t, ATTR, task, NULL);
9277         if( status ) exit( status );
9278
9279         /* make sure pthread_detach() isn't just a stub */
9280 #if HAVE_PTHREADS_D4
9281         status = pthread_detach( &t );
9282 #else
9283         status = pthread_detach( t );
9284 #endif
9285
9286 #ifdef HAVE_LINUX_THREADS
9287         pthread_kill_other_threads_np();
9288 #endif
9289
9290         exit( status );
9291
9292 }
9293
9294 EOF
9295 if { (eval echo configure:9296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9296 then
9297   ol_cv_pthread_lc_r=yes
9298 else
9299   echo "configure: failed program was:" >&5
9300   cat conftest.$ac_ext >&5
9301   rm -fr conftest*
9302   ol_cv_pthread_lc_r=no
9303 fi
9304 rm -fr conftest*
9305 fi
9306
9307
9308                 # restore the LIBS
9309                 LIBS="$ol_LIBS"
9310         
9311 fi
9312
9313 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9314
9315         if test $ol_cv_pthread_lc_r = yes ; then
9316                 ol_link_pthreads="-lc_r"
9317                 ol_link_threads=posix
9318         fi
9319 fi
9320
9321
9322                 # Pthread try link: -threads (ol_cv_pthread_threads)
9323 if test "$ol_link_threads" = no ; then
9324         # try -threads
9325         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9326 echo "configure:9327: checking for pthread link with -threads" >&5
9327 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9328   echo $ac_n "(cached) $ac_c" 1>&6
9329 else
9330   
9331                 # save the flags
9332                 ol_LIBS="$LIBS"
9333                 LIBS="-threads $LIBS"
9334
9335                 if test "$cross_compiling" = yes; then
9336   cat > conftest.$ac_ext <<EOF
9337 #line 9338 "configure"
9338 #include "confdefs.h"
9339 /* pthread test headers */
9340 #include <pthread.h>
9341 #ifndef NULL
9342 #define NULL (void*)0
9343 #endif
9344
9345 static void *task(p)
9346         void *p;
9347 {
9348         return (void *) (p == NULL);
9349 }
9350
9351 int main() {
9352
9353         /* pthread test function */
9354         pthread_t t;
9355         int status;
9356 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9357         /* This system (e.g. AIX) defaults detached; must override */
9358         pthread_attr_t attr;
9359
9360         status = pthread_attr_init(&attr);
9361         if( status ) exit( status );
9362
9363         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9364         if( status ) exit( status );
9365
9366 #define ATTR    &attr
9367 #else
9368 #if HAVE_PTHREADS_D4
9369 #define ATTR    pthread_attr_default
9370 #else
9371 #define ATTR    NULL
9372 #endif
9373 #endif
9374         /* make sure pthread_create() isn't just a stub */
9375         status = pthread_create(&t, ATTR, task, NULL);
9376         if( status ) exit( status );
9377
9378         /* make sure pthread_detach() isn't just a stub */
9379 #if HAVE_PTHREADS_D4
9380         status = pthread_detach( &t );
9381 #else
9382         status = pthread_detach( t );
9383 #endif
9384
9385 #ifdef HAVE_LINUX_THREADS
9386         pthread_kill_other_threads_np();
9387 #endif
9388
9389         exit( status );
9390
9391 ; return 0; }
9392 EOF
9393 if { (eval echo configure:9394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9394   rm -rf conftest*
9395   ol_cv_pthread_threads=yes
9396 else
9397   echo "configure: failed program was:" >&5
9398   cat conftest.$ac_ext >&5
9399   rm -rf conftest*
9400   ol_cv_pthread_threads=no
9401 fi
9402 rm -f conftest*
9403 else
9404   cat > conftest.$ac_ext <<EOF
9405 #line 9406 "configure"
9406 #include "confdefs.h"
9407 /* pthread test headers */
9408 #include <pthread.h>
9409 #ifndef NULL
9410 #define NULL (void*)0
9411 #endif
9412
9413 static void *task(p)
9414         void *p;
9415 {
9416         return (void *) (p == NULL);
9417 }
9418
9419
9420 int main(argc, argv)
9421         int argc;
9422         char **argv;
9423 {
9424
9425         /* pthread test function */
9426         pthread_t t;
9427         int status;
9428 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9429         /* This system (e.g. AIX) defaults detached; must override */
9430         pthread_attr_t attr;
9431
9432         status = pthread_attr_init(&attr);
9433         if( status ) exit( status );
9434
9435         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9436         if( status ) exit( status );
9437
9438 #define ATTR    &attr
9439 #else
9440 #if HAVE_PTHREADS_D4
9441 #define ATTR    pthread_attr_default
9442 #else
9443 #define ATTR    NULL
9444 #endif
9445 #endif
9446         /* make sure pthread_create() isn't just a stub */
9447         status = pthread_create(&t, ATTR, task, NULL);
9448         if( status ) exit( status );
9449
9450         /* make sure pthread_detach() isn't just a stub */
9451 #if HAVE_PTHREADS_D4
9452         status = pthread_detach( &t );
9453 #else
9454         status = pthread_detach( t );
9455 #endif
9456
9457 #ifdef HAVE_LINUX_THREADS
9458         pthread_kill_other_threads_np();
9459 #endif
9460
9461         exit( status );
9462
9463 }
9464
9465 EOF
9466 if { (eval echo configure:9467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9467 then
9468   ol_cv_pthread_threads=yes
9469 else
9470   echo "configure: failed program was:" >&5
9471   cat conftest.$ac_ext >&5
9472   rm -fr conftest*
9473   ol_cv_pthread_threads=no
9474 fi
9475 rm -fr conftest*
9476 fi
9477
9478
9479                 # restore the LIBS
9480                 LIBS="$ol_LIBS"
9481         
9482 fi
9483
9484 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9485
9486         if test $ol_cv_pthread_threads = yes ; then
9487                 ol_link_pthreads="-threads"
9488                 ol_link_threads=posix
9489         fi
9490 fi
9491
9492
9493                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9494 if test "$ol_link_threads" = no ; then
9495         # try -lpthreads -lmach -lexc -lc_r
9496         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9497 echo "configure:9498: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9498 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9499   echo $ac_n "(cached) $ac_c" 1>&6
9500 else
9501   
9502                 # save the flags
9503                 ol_LIBS="$LIBS"
9504                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9505
9506                 if test "$cross_compiling" = yes; then
9507   cat > conftest.$ac_ext <<EOF
9508 #line 9509 "configure"
9509 #include "confdefs.h"
9510 /* pthread test headers */
9511 #include <pthread.h>
9512 #ifndef NULL
9513 #define NULL (void*)0
9514 #endif
9515
9516 static void *task(p)
9517         void *p;
9518 {
9519         return (void *) (p == NULL);
9520 }
9521
9522 int main() {
9523
9524         /* pthread test function */
9525         pthread_t t;
9526         int status;
9527 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9528         /* This system (e.g. AIX) defaults detached; must override */
9529         pthread_attr_t attr;
9530
9531         status = pthread_attr_init(&attr);
9532         if( status ) exit( status );
9533
9534         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9535         if( status ) exit( status );
9536
9537 #define ATTR    &attr
9538 #else
9539 #if HAVE_PTHREADS_D4
9540 #define ATTR    pthread_attr_default
9541 #else
9542 #define ATTR    NULL
9543 #endif
9544 #endif
9545         /* make sure pthread_create() isn't just a stub */
9546         status = pthread_create(&t, ATTR, task, NULL);
9547         if( status ) exit( status );
9548
9549         /* make sure pthread_detach() isn't just a stub */
9550 #if HAVE_PTHREADS_D4
9551         status = pthread_detach( &t );
9552 #else
9553         status = pthread_detach( t );
9554 #endif
9555
9556 #ifdef HAVE_LINUX_THREADS
9557         pthread_kill_other_threads_np();
9558 #endif
9559
9560         exit( status );
9561
9562 ; return 0; }
9563 EOF
9564 if { (eval echo configure:9565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9565   rm -rf conftest*
9566   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9567 else
9568   echo "configure: failed program was:" >&5
9569   cat conftest.$ac_ext >&5
9570   rm -rf conftest*
9571   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9572 fi
9573 rm -f conftest*
9574 else
9575   cat > conftest.$ac_ext <<EOF
9576 #line 9577 "configure"
9577 #include "confdefs.h"
9578 /* pthread test headers */
9579 #include <pthread.h>
9580 #ifndef NULL
9581 #define NULL (void*)0
9582 #endif
9583
9584 static void *task(p)
9585         void *p;
9586 {
9587         return (void *) (p == NULL);
9588 }
9589
9590
9591 int main(argc, argv)
9592         int argc;
9593         char **argv;
9594 {
9595
9596         /* pthread test function */
9597         pthread_t t;
9598         int status;
9599 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9600         /* This system (e.g. AIX) defaults detached; must override */
9601         pthread_attr_t attr;
9602
9603         status = pthread_attr_init(&attr);
9604         if( status ) exit( status );
9605
9606         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9607         if( status ) exit( status );
9608
9609 #define ATTR    &attr
9610 #else
9611 #if HAVE_PTHREADS_D4
9612 #define ATTR    pthread_attr_default
9613 #else
9614 #define ATTR    NULL
9615 #endif
9616 #endif
9617         /* make sure pthread_create() isn't just a stub */
9618         status = pthread_create(&t, ATTR, task, NULL);
9619         if( status ) exit( status );
9620
9621         /* make sure pthread_detach() isn't just a stub */
9622 #if HAVE_PTHREADS_D4
9623         status = pthread_detach( &t );
9624 #else
9625         status = pthread_detach( t );
9626 #endif
9627
9628 #ifdef HAVE_LINUX_THREADS
9629         pthread_kill_other_threads_np();
9630 #endif
9631
9632         exit( status );
9633
9634 }
9635
9636 EOF
9637 if { (eval echo configure:9638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9638 then
9639   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9640 else
9641   echo "configure: failed program was:" >&5
9642   cat conftest.$ac_ext >&5
9643   rm -fr conftest*
9644   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9645 fi
9646 rm -fr conftest*
9647 fi
9648
9649
9650                 # restore the LIBS
9651                 LIBS="$ol_LIBS"
9652         
9653 fi
9654
9655 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9656
9657         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9658                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9659                 ol_link_threads=posix
9660         fi
9661 fi
9662
9663                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9664 if test "$ol_link_threads" = no ; then
9665         # try -lpthreads -lmach -lexc
9666         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9667 echo "configure:9668: checking for pthread link with -lpthreads -lmach -lexc" >&5
9668 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9669   echo $ac_n "(cached) $ac_c" 1>&6
9670 else
9671   
9672                 # save the flags
9673                 ol_LIBS="$LIBS"
9674                 LIBS="-lpthreads -lmach -lexc $LIBS"
9675
9676                 if test "$cross_compiling" = yes; then
9677   cat > conftest.$ac_ext <<EOF
9678 #line 9679 "configure"
9679 #include "confdefs.h"
9680 /* pthread test headers */
9681 #include <pthread.h>
9682 #ifndef NULL
9683 #define NULL (void*)0
9684 #endif
9685
9686 static void *task(p)
9687         void *p;
9688 {
9689         return (void *) (p == NULL);
9690 }
9691
9692 int main() {
9693
9694         /* pthread test function */
9695         pthread_t t;
9696         int status;
9697 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9698         /* This system (e.g. AIX) defaults detached; must override */
9699         pthread_attr_t attr;
9700
9701         status = pthread_attr_init(&attr);
9702         if( status ) exit( status );
9703
9704         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9705         if( status ) exit( status );
9706
9707 #define ATTR    &attr
9708 #else
9709 #if HAVE_PTHREADS_D4
9710 #define ATTR    pthread_attr_default
9711 #else
9712 #define ATTR    NULL
9713 #endif
9714 #endif
9715         /* make sure pthread_create() isn't just a stub */
9716         status = pthread_create(&t, ATTR, task, NULL);
9717         if( status ) exit( status );
9718
9719         /* make sure pthread_detach() isn't just a stub */
9720 #if HAVE_PTHREADS_D4
9721         status = pthread_detach( &t );
9722 #else
9723         status = pthread_detach( t );
9724 #endif
9725
9726 #ifdef HAVE_LINUX_THREADS
9727         pthread_kill_other_threads_np();
9728 #endif
9729
9730         exit( status );
9731
9732 ; return 0; }
9733 EOF
9734 if { (eval echo configure:9735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9735   rm -rf conftest*
9736   ol_cv_pthread_lpthreads_lmach_lexc=yes
9737 else
9738   echo "configure: failed program was:" >&5
9739   cat conftest.$ac_ext >&5
9740   rm -rf conftest*
9741   ol_cv_pthread_lpthreads_lmach_lexc=no
9742 fi
9743 rm -f conftest*
9744 else
9745   cat > conftest.$ac_ext <<EOF
9746 #line 9747 "configure"
9747 #include "confdefs.h"
9748 /* pthread test headers */
9749 #include <pthread.h>
9750 #ifndef NULL
9751 #define NULL (void*)0
9752 #endif
9753
9754 static void *task(p)
9755         void *p;
9756 {
9757         return (void *) (p == NULL);
9758 }
9759
9760
9761 int main(argc, argv)
9762         int argc;
9763         char **argv;
9764 {
9765
9766         /* pthread test function */
9767         pthread_t t;
9768         int status;
9769 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9770         /* This system (e.g. AIX) defaults detached; must override */
9771         pthread_attr_t attr;
9772
9773         status = pthread_attr_init(&attr);
9774         if( status ) exit( status );
9775
9776         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9777         if( status ) exit( status );
9778
9779 #define ATTR    &attr
9780 #else
9781 #if HAVE_PTHREADS_D4
9782 #define ATTR    pthread_attr_default
9783 #else
9784 #define ATTR    NULL
9785 #endif
9786 #endif
9787         /* make sure pthread_create() isn't just a stub */
9788         status = pthread_create(&t, ATTR, task, NULL);
9789         if( status ) exit( status );
9790
9791         /* make sure pthread_detach() isn't just a stub */
9792 #if HAVE_PTHREADS_D4
9793         status = pthread_detach( &t );
9794 #else
9795         status = pthread_detach( t );
9796 #endif
9797
9798 #ifdef HAVE_LINUX_THREADS
9799         pthread_kill_other_threads_np();
9800 #endif
9801
9802         exit( status );
9803
9804 }
9805
9806 EOF
9807 if { (eval echo configure:9808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9808 then
9809   ol_cv_pthread_lpthreads_lmach_lexc=yes
9810 else
9811   echo "configure: failed program was:" >&5
9812   cat conftest.$ac_ext >&5
9813   rm -fr conftest*
9814   ol_cv_pthread_lpthreads_lmach_lexc=no
9815 fi
9816 rm -fr conftest*
9817 fi
9818
9819
9820                 # restore the LIBS
9821                 LIBS="$ol_LIBS"
9822         
9823 fi
9824
9825 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9826
9827         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9828                 ol_link_pthreads="-lpthreads -lmach -lexc"
9829                 ol_link_threads=posix
9830         fi
9831 fi
9832
9833                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9834 if test "$ol_link_threads" = no ; then
9835         # try -lpthreads -lexc
9836         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9837 echo "configure:9838: checking for pthread link with -lpthreads -lexc" >&5
9838 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9839   echo $ac_n "(cached) $ac_c" 1>&6
9840 else
9841   
9842                 # save the flags
9843                 ol_LIBS="$LIBS"
9844                 LIBS="-lpthreads -lexc $LIBS"
9845
9846                 if test "$cross_compiling" = yes; then
9847   cat > conftest.$ac_ext <<EOF
9848 #line 9849 "configure"
9849 #include "confdefs.h"
9850 /* pthread test headers */
9851 #include <pthread.h>
9852 #ifndef NULL
9853 #define NULL (void*)0
9854 #endif
9855
9856 static void *task(p)
9857         void *p;
9858 {
9859         return (void *) (p == NULL);
9860 }
9861
9862 int main() {
9863
9864         /* pthread test function */
9865         pthread_t t;
9866         int status;
9867 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9868         /* This system (e.g. AIX) defaults detached; must override */
9869         pthread_attr_t attr;
9870
9871         status = pthread_attr_init(&attr);
9872         if( status ) exit( status );
9873
9874         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9875         if( status ) exit( status );
9876
9877 #define ATTR    &attr
9878 #else
9879 #if HAVE_PTHREADS_D4
9880 #define ATTR    pthread_attr_default
9881 #else
9882 #define ATTR    NULL
9883 #endif
9884 #endif
9885         /* make sure pthread_create() isn't just a stub */
9886         status = pthread_create(&t, ATTR, task, NULL);
9887         if( status ) exit( status );
9888
9889         /* make sure pthread_detach() isn't just a stub */
9890 #if HAVE_PTHREADS_D4
9891         status = pthread_detach( &t );
9892 #else
9893         status = pthread_detach( t );
9894 #endif
9895
9896 #ifdef HAVE_LINUX_THREADS
9897         pthread_kill_other_threads_np();
9898 #endif
9899
9900         exit( status );
9901
9902 ; return 0; }
9903 EOF
9904 if { (eval echo configure:9905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9905   rm -rf conftest*
9906   ol_cv_pthread_lpthreads_lexc=yes
9907 else
9908   echo "configure: failed program was:" >&5
9909   cat conftest.$ac_ext >&5
9910   rm -rf conftest*
9911   ol_cv_pthread_lpthreads_lexc=no
9912 fi
9913 rm -f conftest*
9914 else
9915   cat > conftest.$ac_ext <<EOF
9916 #line 9917 "configure"
9917 #include "confdefs.h"
9918 /* pthread test headers */
9919 #include <pthread.h>
9920 #ifndef NULL
9921 #define NULL (void*)0
9922 #endif
9923
9924 static void *task(p)
9925         void *p;
9926 {
9927         return (void *) (p == NULL);
9928 }
9929
9930
9931 int main(argc, argv)
9932         int argc;
9933         char **argv;
9934 {
9935
9936         /* pthread test function */
9937         pthread_t t;
9938         int status;
9939 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9940         /* This system (e.g. AIX) defaults detached; must override */
9941         pthread_attr_t attr;
9942
9943         status = pthread_attr_init(&attr);
9944         if( status ) exit( status );
9945
9946         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9947         if( status ) exit( status );
9948
9949 #define ATTR    &attr
9950 #else
9951 #if HAVE_PTHREADS_D4
9952 #define ATTR    pthread_attr_default
9953 #else
9954 #define ATTR    NULL
9955 #endif
9956 #endif
9957         /* make sure pthread_create() isn't just a stub */
9958         status = pthread_create(&t, ATTR, task, NULL);
9959         if( status ) exit( status );
9960
9961         /* make sure pthread_detach() isn't just a stub */
9962 #if HAVE_PTHREADS_D4
9963         status = pthread_detach( &t );
9964 #else
9965         status = pthread_detach( t );
9966 #endif
9967
9968 #ifdef HAVE_LINUX_THREADS
9969         pthread_kill_other_threads_np();
9970 #endif
9971
9972         exit( status );
9973
9974 }
9975
9976 EOF
9977 if { (eval echo configure:9978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9978 then
9979   ol_cv_pthread_lpthreads_lexc=yes
9980 else
9981   echo "configure: failed program was:" >&5
9982   cat conftest.$ac_ext >&5
9983   rm -fr conftest*
9984   ol_cv_pthread_lpthreads_lexc=no
9985 fi
9986 rm -fr conftest*
9987 fi
9988
9989
9990                 # restore the LIBS
9991                 LIBS="$ol_LIBS"
9992         
9993 fi
9994
9995 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9996
9997         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9998                 ol_link_pthreads="-lpthreads -lexc"
9999                 ol_link_threads=posix
10000         fi
10001 fi
10002
10003
10004                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
10005 if test "$ol_link_threads" = no ; then
10006         # try -lpthreads
10007         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
10008 echo "configure:10009: checking for pthread link with -lpthreads" >&5
10009 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
10010   echo $ac_n "(cached) $ac_c" 1>&6
10011 else
10012   
10013                 # save the flags
10014                 ol_LIBS="$LIBS"
10015                 LIBS="-lpthreads $LIBS"
10016
10017                 if test "$cross_compiling" = yes; then
10018   cat > conftest.$ac_ext <<EOF
10019 #line 10020 "configure"
10020 #include "confdefs.h"
10021 /* pthread test headers */
10022 #include <pthread.h>
10023 #ifndef NULL
10024 #define NULL (void*)0
10025 #endif
10026
10027 static void *task(p)
10028         void *p;
10029 {
10030         return (void *) (p == NULL);
10031 }
10032
10033 int main() {
10034
10035         /* pthread test function */
10036         pthread_t t;
10037         int status;
10038 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10039         /* This system (e.g. AIX) defaults detached; must override */
10040         pthread_attr_t attr;
10041
10042         status = pthread_attr_init(&attr);
10043         if( status ) exit( status );
10044
10045         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10046         if( status ) exit( status );
10047
10048 #define ATTR    &attr
10049 #else
10050 #if HAVE_PTHREADS_D4
10051 #define ATTR    pthread_attr_default
10052 #else
10053 #define ATTR    NULL
10054 #endif
10055 #endif
10056         /* make sure pthread_create() isn't just a stub */
10057         status = pthread_create(&t, ATTR, task, NULL);
10058         if( status ) exit( status );
10059
10060         /* make sure pthread_detach() isn't just a stub */
10061 #if HAVE_PTHREADS_D4
10062         status = pthread_detach( &t );
10063 #else
10064         status = pthread_detach( t );
10065 #endif
10066
10067 #ifdef HAVE_LINUX_THREADS
10068         pthread_kill_other_threads_np();
10069 #endif
10070
10071         exit( status );
10072
10073 ; return 0; }
10074 EOF
10075 if { (eval echo configure:10076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10076   rm -rf conftest*
10077   ol_cv_pthread_lib_lpthreads=yes
10078 else
10079   echo "configure: failed program was:" >&5
10080   cat conftest.$ac_ext >&5
10081   rm -rf conftest*
10082   ol_cv_pthread_lib_lpthreads=no
10083 fi
10084 rm -f conftest*
10085 else
10086   cat > conftest.$ac_ext <<EOF
10087 #line 10088 "configure"
10088 #include "confdefs.h"
10089 /* pthread test headers */
10090 #include <pthread.h>
10091 #ifndef NULL
10092 #define NULL (void*)0
10093 #endif
10094
10095 static void *task(p)
10096         void *p;
10097 {
10098         return (void *) (p == NULL);
10099 }
10100
10101
10102 int main(argc, argv)
10103         int argc;
10104         char **argv;
10105 {
10106
10107         /* pthread test function */
10108         pthread_t t;
10109         int status;
10110 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10111         /* This system (e.g. AIX) defaults detached; must override */
10112         pthread_attr_t attr;
10113
10114         status = pthread_attr_init(&attr);
10115         if( status ) exit( status );
10116
10117         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10118         if( status ) exit( status );
10119
10120 #define ATTR    &attr
10121 #else
10122 #if HAVE_PTHREADS_D4
10123 #define ATTR    pthread_attr_default
10124 #else
10125 #define ATTR    NULL
10126 #endif
10127 #endif
10128         /* make sure pthread_create() isn't just a stub */
10129         status = pthread_create(&t, ATTR, task, NULL);
10130         if( status ) exit( status );
10131
10132         /* make sure pthread_detach() isn't just a stub */
10133 #if HAVE_PTHREADS_D4
10134         status = pthread_detach( &t );
10135 #else
10136         status = pthread_detach( t );
10137 #endif
10138
10139 #ifdef HAVE_LINUX_THREADS
10140         pthread_kill_other_threads_np();
10141 #endif
10142
10143         exit( status );
10144
10145 }
10146
10147 EOF
10148 if { (eval echo configure:10149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10149 then
10150   ol_cv_pthread_lib_lpthreads=yes
10151 else
10152   echo "configure: failed program was:" >&5
10153   cat conftest.$ac_ext >&5
10154   rm -fr conftest*
10155   ol_cv_pthread_lib_lpthreads=no
10156 fi
10157 rm -fr conftest*
10158 fi
10159
10160
10161                 # restore the LIBS
10162                 LIBS="$ol_LIBS"
10163         
10164 fi
10165
10166 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10167
10168         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10169                 ol_link_pthreads="-lpthreads"
10170                 ol_link_threads=posix
10171         fi
10172 fi
10173
10174
10175                 if test $ol_link_threads != no ; then
10176                         cat >> confdefs.h <<\EOF
10177 #define HAVE_PTHREADS 1
10178 EOF
10179
10180
10181                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10182
10183                                                 save_CPPFLAGS="$CPPFLAGS"
10184                         save_LIBS="$LIBS"
10185                         LIBS="$LTHREAD_LIBS $LIBS"
10186
10187                                                                                                 for ac_func in sched_yield pthread_yield
10188 do
10189 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10190 echo "configure:10191: checking for $ac_func" >&5
10191 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10192   echo $ac_n "(cached) $ac_c" 1>&6
10193 else
10194   cat > conftest.$ac_ext <<EOF
10195 #line 10196 "configure"
10196 #include "confdefs.h"
10197 /* System header to define __stub macros and hopefully few prototypes,
10198     which can conflict with char $ac_func(); below.  */
10199 #include <assert.h>
10200 /* Override any gcc2 internal prototype to avoid an error.  */
10201 /* We use char because int might match the return type of a gcc2
10202     builtin and then its argument prototype would still apply.  */
10203 char $ac_func();
10204 char (*f)();
10205
10206 int main() {
10207
10208 /* The GNU C library defines this for functions which it implements
10209     to always fail with ENOSYS.  Some functions are actually named
10210     something starting with __ and the normal name is an alias.  */
10211 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10212 choke me
10213 #else
10214 f = $ac_func;
10215 #endif
10216
10217 ; return 0; }
10218 EOF
10219 if { (eval echo configure:10220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10220   rm -rf conftest*
10221   eval "ac_cv_func_$ac_func=yes"
10222 else
10223   echo "configure: failed program was:" >&5
10224   cat conftest.$ac_ext >&5
10225   rm -rf conftest*
10226   eval "ac_cv_func_$ac_func=no"
10227 fi
10228 rm -f conftest*
10229 fi
10230
10231 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10232   echo "$ac_t""yes" 1>&6
10233     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10234   cat >> confdefs.h <<EOF
10235 #define $ac_tr_func 1
10236 EOF
10237  
10238 else
10239   echo "$ac_t""no" 1>&6
10240 fi
10241 done
10242
10243
10244                         if test $ac_cv_func_sched_yield = no -a \
10245                                 $ac_cv_func_pthread_yield = no ; then
10246                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10247 echo "configure:10248: checking for sched_yield in -lrt" >&5
10248 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10249 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10250   echo $ac_n "(cached) $ac_c" 1>&6
10251 else
10252   ac_save_LIBS="$LIBS"
10253 LIBS="-lrt  $LIBS"
10254 cat > conftest.$ac_ext <<EOF
10255 #line 10256 "configure"
10256 #include "confdefs.h"
10257 /* Override any gcc2 internal prototype to avoid an error.  */
10258 /* We use char because int might match the return type of a gcc2
10259     builtin and then its argument prototype would still apply.  */
10260 char sched_yield();
10261
10262 int main() {
10263 sched_yield()
10264 ; return 0; }
10265 EOF
10266 if { (eval echo configure:10267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10267   rm -rf conftest*
10268   eval "ac_cv_lib_$ac_lib_var=yes"
10269 else
10270   echo "configure: failed program was:" >&5
10271   cat conftest.$ac_ext >&5
10272   rm -rf conftest*
10273   eval "ac_cv_lib_$ac_lib_var=no"
10274 fi
10275 rm -f conftest*
10276 LIBS="$ac_save_LIBS"
10277
10278 fi
10279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10280   echo "$ac_t""yes" 1>&6
10281   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10282                                         cat >> confdefs.h <<\EOF
10283 #define HAVE_SCHED_YIELD 1
10284 EOF
10285
10286                                         ac_cv_func_sched_yield=yes
10287 else
10288   echo "$ac_t""no" 1>&6
10289 ac_cv_func_sched_yield=no
10290 fi
10291
10292                         fi
10293                         if test $ac_cv_func_sched_yield = no -a \
10294                                 $ac_cv_func_pthread_yield = no ; then
10295                                                                                                 for ac_func in thr_yield
10296 do
10297 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10298 echo "configure:10299: checking for $ac_func" >&5
10299 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10300   echo $ac_n "(cached) $ac_c" 1>&6
10301 else
10302   cat > conftest.$ac_ext <<EOF
10303 #line 10304 "configure"
10304 #include "confdefs.h"
10305 /* System header to define __stub macros and hopefully few prototypes,
10306     which can conflict with char $ac_func(); below.  */
10307 #include <assert.h>
10308 /* Override any gcc2 internal prototype to avoid an error.  */
10309 /* We use char because int might match the return type of a gcc2
10310     builtin and then its argument prototype would still apply.  */
10311 char $ac_func();
10312 char (*f)();
10313
10314 int main() {
10315
10316 /* The GNU C library defines this for functions which it implements
10317     to always fail with ENOSYS.  Some functions are actually named
10318     something starting with __ and the normal name is an alias.  */
10319 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10320 choke me
10321 #else
10322 f = $ac_func;
10323 #endif
10324
10325 ; return 0; }
10326 EOF
10327 if { (eval echo configure:10328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10328   rm -rf conftest*
10329   eval "ac_cv_func_$ac_func=yes"
10330 else
10331   echo "configure: failed program was:" >&5
10332   cat conftest.$ac_ext >&5
10333   rm -rf conftest*
10334   eval "ac_cv_func_$ac_func=no"
10335 fi
10336 rm -f conftest*
10337 fi
10338
10339 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10340   echo "$ac_t""yes" 1>&6
10341     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10342   cat >> confdefs.h <<EOF
10343 #define $ac_tr_func 1
10344 EOF
10345  
10346 else
10347   echo "$ac_t""no" 1>&6
10348 fi
10349 done
10350
10351                         fi
10352                         if test $ac_cv_func_sched_yield = no -a \
10353                                 $ac_cv_func_pthread_yield = no -a \
10354                                 "$ac_cv_func_thr_yield" = no ; then
10355                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10356                         fi
10357
10358                                                 for ac_func in pthread_kill
10359 do
10360 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10361 echo "configure:10362: checking for $ac_func" >&5
10362 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10363   echo $ac_n "(cached) $ac_c" 1>&6
10364 else
10365   cat > conftest.$ac_ext <<EOF
10366 #line 10367 "configure"
10367 #include "confdefs.h"
10368 /* System header to define __stub macros and hopefully few prototypes,
10369     which can conflict with char $ac_func(); below.  */
10370 #include <assert.h>
10371 /* Override any gcc2 internal prototype to avoid an error.  */
10372 /* We use char because int might match the return type of a gcc2
10373     builtin and then its argument prototype would still apply.  */
10374 char $ac_func();
10375 char (*f)();
10376
10377 int main() {
10378
10379 /* The GNU C library defines this for functions which it implements
10380     to always fail with ENOSYS.  Some functions are actually named
10381     something starting with __ and the normal name is an alias.  */
10382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10383 choke me
10384 #else
10385 f = $ac_func;
10386 #endif
10387
10388 ; return 0; }
10389 EOF
10390 if { (eval echo configure:10391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10391   rm -rf conftest*
10392   eval "ac_cv_func_$ac_func=yes"
10393 else
10394   echo "configure: failed program was:" >&5
10395   cat conftest.$ac_ext >&5
10396   rm -rf conftest*
10397   eval "ac_cv_func_$ac_func=no"
10398 fi
10399 rm -f conftest*
10400 fi
10401
10402 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10403   echo "$ac_t""yes" 1>&6
10404     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10405   cat >> confdefs.h <<EOF
10406 #define $ac_tr_func 1
10407 EOF
10408  
10409 else
10410   echo "$ac_t""no" 1>&6
10411 fi
10412 done
10413
10414
10415                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10416 echo "configure:10417: checking for pthread_detach with <pthread.h>" >&5
10417 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10418   echo $ac_n "(cached) $ac_c" 1>&6
10419 else
10420   
10421                                                                 cat > conftest.$ac_ext <<EOF
10422 #line 10423 "configure"
10423 #include "confdefs.h"
10424
10425 #include <pthread.h>
10426 #ifndef NULL
10427 #define NULL (void*)0
10428 #endif
10429
10430 int main() {
10431 pthread_detach(NULL);
10432 ; return 0; }
10433 EOF
10434 if { (eval echo configure:10435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10435   rm -rf conftest*
10436   ol_cv_func_pthread_detach=yes
10437 else
10438   echo "configure: failed program was:" >&5
10439   cat conftest.$ac_ext >&5
10440   rm -rf conftest*
10441   ol_cv_func_pthread_detach=no
10442 fi
10443 rm -f conftest*
10444                         
10445 fi
10446
10447 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10448
10449                         if test $ol_cv_func_pthread_detach = no ; then
10450                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10451                         fi
10452
10453                         cat >> confdefs.h <<\EOF
10454 #define HAVE_PTHREAD_DETACH 1
10455 EOF
10456
10457
10458                                                 for ac_func in \
10459                                 pthread_setconcurrency \
10460                                 pthread_getconcurrency \
10461                                 thr_setconcurrency \
10462                                 thr_getconcurrency \
10463                         
10464 do
10465 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10466 echo "configure:10467: checking for $ac_func" >&5
10467 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10468   echo $ac_n "(cached) $ac_c" 1>&6
10469 else
10470   cat > conftest.$ac_ext <<EOF
10471 #line 10472 "configure"
10472 #include "confdefs.h"
10473 /* System header to define __stub macros and hopefully few prototypes,
10474     which can conflict with char $ac_func(); below.  */
10475 #include <assert.h>
10476 /* Override any gcc2 internal prototype to avoid an error.  */
10477 /* We use char because int might match the return type of a gcc2
10478     builtin and then its argument prototype would still apply.  */
10479 char $ac_func();
10480 char (*f)();
10481
10482 int main() {
10483
10484 /* The GNU C library defines this for functions which it implements
10485     to always fail with ENOSYS.  Some functions are actually named
10486     something starting with __ and the normal name is an alias.  */
10487 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10488 choke me
10489 #else
10490 f = $ac_func;
10491 #endif
10492
10493 ; return 0; }
10494 EOF
10495 if { (eval echo configure:10496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10496   rm -rf conftest*
10497   eval "ac_cv_func_$ac_func=yes"
10498 else
10499   echo "configure: failed program was:" >&5
10500   cat conftest.$ac_ext >&5
10501   rm -rf conftest*
10502   eval "ac_cv_func_$ac_func=no"
10503 fi
10504 rm -f conftest*
10505 fi
10506
10507 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10508   echo "$ac_t""yes" 1>&6
10509     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10510   cat >> confdefs.h <<EOF
10511 #define $ac_tr_func 1
10512 EOF
10513  
10514 else
10515   echo "$ac_t""no" 1>&6
10516 fi
10517 done
10518
10519
10520                         
10521         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10522 echo "configure:10523: checking for pthread_kill_other_threads_np" >&5
10523 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10524   echo $ac_n "(cached) $ac_c" 1>&6
10525 else
10526   cat > conftest.$ac_ext <<EOF
10527 #line 10528 "configure"
10528 #include "confdefs.h"
10529 /* System header to define __stub macros and hopefully few prototypes,
10530     which can conflict with char pthread_kill_other_threads_np(); below.  */
10531 #include <assert.h>
10532 /* Override any gcc2 internal prototype to avoid an error.  */
10533 /* We use char because int might match the return type of a gcc2
10534     builtin and then its argument prototype would still apply.  */
10535 char pthread_kill_other_threads_np();
10536 char (*f)();
10537
10538 int main() {
10539
10540 /* The GNU C library defines this for functions which it implements
10541     to always fail with ENOSYS.  Some functions are actually named
10542     something starting with __ and the normal name is an alias.  */
10543 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10544 choke me
10545 #else
10546 f = pthread_kill_other_threads_np;
10547 #endif
10548
10549 ; return 0; }
10550 EOF
10551 if { (eval echo configure:10552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10552   rm -rf conftest*
10553   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10554 else
10555   echo "configure: failed program was:" >&5
10556   cat conftest.$ac_ext >&5
10557   rm -rf conftest*
10558   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10559 fi
10560 rm -f conftest*
10561 fi
10562
10563 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10564   echo "$ac_t""yes" 1>&6
10565   :
10566 else
10567   echo "$ac_t""no" 1>&6
10568 fi
10569
10570         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10571 echo "configure:10572: checking for LinuxThreads implementation" >&5
10572 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10573   echo $ac_n "(cached) $ac_c" 1>&6
10574 else
10575   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10576 fi
10577
10578 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10579
10580                         
10581         
10582         
10583         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10584 echo "configure:10585: checking for LinuxThreads consistency" >&5
10585 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10586   echo $ac_n "(cached) $ac_c" 1>&6
10587 else
10588   
10589                 if test $ol_cv_header_linux_threads = yes -a \
10590                         $ol_cv_sys_linux_threads = yes; then
10591                         ol_cv_linux_threads=yes
10592                 elif test $ol_cv_header_linux_threads = no -a \
10593                         $ol_cv_sys_linux_threads = no; then
10594                         ol_cv_linux_threads=no
10595                 else
10596                         ol_cv_linux_threads=error
10597                 fi
10598         
10599 fi
10600
10601 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10602
10603
10604                         if test $ol_cv_linux_threads = error; then
10605                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10606                         fi
10607
10608                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10609 echo "configure:10610: checking if pthread_create() works" >&5
10610 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10611   echo $ac_n "(cached) $ac_c" 1>&6
10612 else
10613   
10614                         if test "$cross_compiling" = yes; then
10615                                 ol_cv_pthread_create_works=yes
10616 else
10617   cat > conftest.$ac_ext <<EOF
10618 #line 10619 "configure"
10619 #include "confdefs.h"
10620 /* pthread test headers */
10621 #include <pthread.h>
10622 #ifndef NULL
10623 #define NULL (void*)0
10624 #endif
10625
10626 static void *task(p)
10627         void *p;
10628 {
10629         return (void *) (p == NULL);
10630 }
10631
10632
10633 int main(argc, argv)
10634         int argc;
10635         char **argv;
10636 {
10637
10638         /* pthread test function */
10639         pthread_t t;
10640         int status;
10641 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10642         /* This system (e.g. AIX) defaults detached; must override */
10643         pthread_attr_t attr;
10644
10645         status = pthread_attr_init(&attr);
10646         if( status ) exit( status );
10647
10648         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10649         if( status ) exit( status );
10650
10651 #define ATTR    &attr
10652 #else
10653 #if HAVE_PTHREADS_D4
10654 #define ATTR    pthread_attr_default
10655 #else
10656 #define ATTR    NULL
10657 #endif
10658 #endif
10659         /* make sure pthread_create() isn't just a stub */
10660         status = pthread_create(&t, ATTR, task, NULL);
10661         if( status ) exit( status );
10662
10663         /* make sure pthread_detach() isn't just a stub */
10664 #if HAVE_PTHREADS_D4
10665         status = pthread_detach( &t );
10666 #else
10667         status = pthread_detach( t );
10668 #endif
10669
10670 #ifdef HAVE_LINUX_THREADS
10671         pthread_kill_other_threads_np();
10672 #endif
10673
10674         exit( status );
10675
10676 }
10677
10678 EOF
10679 if { (eval echo configure:10680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10680 then
10681   ol_cv_pthread_create_works=yes
10682 else
10683   echo "configure: failed program was:" >&5
10684   cat conftest.$ac_ext >&5
10685   rm -fr conftest*
10686   ol_cv_pthread_create_works=no
10687 fi
10688 rm -fr conftest*
10689 fi
10690
10691 fi
10692
10693 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10694
10695                         if test $ol_cv_pthread_create_works = no ; then
10696                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10697                         fi
10698
10699                                                 if test $ol_with_yielding_select = auto ; then
10700                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10701 echo "configure:10702: checking if select yields when using pthreads" >&5
10702 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10703   echo $ac_n "(cached) $ac_c" 1>&6
10704 else
10705   
10706                                 if test "$cross_compiling" = yes; then
10707   ol_cv_pthread_select_yields=cross
10708 else
10709   cat > conftest.$ac_ext <<EOF
10710 #line 10711 "configure"
10711 #include "confdefs.h"
10712
10713 #include <sys/types.h>
10714 #include <sys/time.h>
10715 #include <unistd.h>
10716 #include <pthread.h>
10717 #ifndef NULL
10718 #define NULL (void*) 0
10719 #endif
10720
10721 static int fildes[2];
10722
10723 static void *task(p)
10724         void *p;
10725 {
10726         int i;
10727         struct timeval tv;
10728
10729         fd_set rfds;
10730
10731         tv.tv_sec=10;
10732         tv.tv_usec=0;
10733
10734         FD_ZERO(&rfds);
10735         FD_SET(fildes[0], &rfds);
10736
10737         /* we're not interested in any fds */
10738         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10739
10740         if(i < 0) {
10741                 perror("select");
10742                 exit(10);
10743         }
10744
10745         exit(0); /* if we exit here, the select blocked the whole process */
10746 }
10747
10748 int main(argc, argv)
10749         int argc;
10750         char **argv;
10751 {
10752         pthread_t t;
10753
10754         /* create a pipe to select */
10755         if(pipe(&fildes[0])) {
10756                 perror("select");
10757                 exit(1);
10758         }
10759
10760 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10761         (void) pthread_setconcurrency(2);
10762 #else
10763 #ifdef HAVE_THR_SETCONCURRENCY
10764         /* Set Solaris LWP concurrency to 2 */
10765         thr_setconcurrency(2);
10766 #endif
10767 #endif
10768
10769 #if HAVE_PTHREADS_D4
10770         pthread_create(&t, pthread_attr_default, task, NULL);
10771 #else
10772         pthread_create(&t, NULL, task, NULL);
10773 #endif
10774
10775 #if HAVE_SCHED_YIELD
10776         sched_yield();  /* make sure task runs first */
10777 #else
10778 #ifdef HAVE_PTHREAD_YIELD
10779         pthread_yield();        /* make sure task runs first */
10780 #endif
10781 #endif
10782
10783         exit(2);
10784 }
10785 EOF
10786 if { (eval echo configure:10787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10787 then
10788   ol_cv_pthread_select_yields=no
10789 else
10790   echo "configure: failed program was:" >&5
10791   cat conftest.$ac_ext >&5
10792   rm -fr conftest*
10793   ol_cv_pthread_select_yields=yes
10794 fi
10795 rm -fr conftest*
10796 fi
10797
10798 fi
10799
10800 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10801
10802                                 if test $ol_cv_pthread_select_yields = cross ; then
10803                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10804                                 fi
10805
10806                                 if test $ol_cv_pthread_select_yields = yes ; then
10807                                         ol_with_yielding_select=yes
10808                                 fi
10809                         fi
10810
10811                                                 CPPFLAGS="$save_CPPFLAGS"
10812                         LIBS="$save_LIBS"
10813                 else
10814                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10815                 fi
10816         fi
10817
10818         if test $ol_with_threads = posix ; then
10819                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10820         fi
10821 fi
10822
10823 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10824         -o $ol_with_threads = mach ; then
10825
10826                 for ac_hdr in mach/cthreads.h
10827 do
10828 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10829 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10830 echo "configure:10831: checking for $ac_hdr" >&5
10831 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10832   echo $ac_n "(cached) $ac_c" 1>&6
10833 else
10834   cat > conftest.$ac_ext <<EOF
10835 #line 10836 "configure"
10836 #include "confdefs.h"
10837 #include <$ac_hdr>
10838 EOF
10839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10840 { (eval echo configure:10841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10842 if test -z "$ac_err"; then
10843   rm -rf conftest*
10844   eval "ac_cv_header_$ac_safe=yes"
10845 else
10846   echo "$ac_err" >&5
10847   echo "configure: failed program was:" >&5
10848   cat conftest.$ac_ext >&5
10849   rm -rf conftest*
10850   eval "ac_cv_header_$ac_safe=no"
10851 fi
10852 rm -f conftest*
10853 fi
10854 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10855   echo "$ac_t""yes" 1>&6
10856     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10857   cat >> confdefs.h <<EOF
10858 #define $ac_tr_hdr 1
10859 EOF
10860  
10861 else
10862   echo "$ac_t""no" 1>&6
10863 fi
10864 done
10865
10866         if test $ac_cv_header_mach_cthreads_h = yes ; then
10867                 ol_with_threads=found
10868
10869                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10870 echo "configure:10871: checking for cthread_fork" >&5
10871 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10872   echo $ac_n "(cached) $ac_c" 1>&6
10873 else
10874   cat > conftest.$ac_ext <<EOF
10875 #line 10876 "configure"
10876 #include "confdefs.h"
10877 /* System header to define __stub macros and hopefully few prototypes,
10878     which can conflict with char cthread_fork(); below.  */
10879 #include <assert.h>
10880 /* Override any gcc2 internal prototype to avoid an error.  */
10881 /* We use char because int might match the return type of a gcc2
10882     builtin and then its argument prototype would still apply.  */
10883 char cthread_fork();
10884 char (*f)();
10885
10886 int main() {
10887
10888 /* The GNU C library defines this for functions which it implements
10889     to always fail with ENOSYS.  Some functions are actually named
10890     something starting with __ and the normal name is an alias.  */
10891 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10892 choke me
10893 #else
10894 f = cthread_fork;
10895 #endif
10896
10897 ; return 0; }
10898 EOF
10899 if { (eval echo configure:10900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10900   rm -rf conftest*
10901   eval "ac_cv_func_cthread_fork=yes"
10902 else
10903   echo "configure: failed program was:" >&5
10904   cat conftest.$ac_ext >&5
10905   rm -rf conftest*
10906   eval "ac_cv_func_cthread_fork=no"
10907 fi
10908 rm -f conftest*
10909 fi
10910
10911 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10912   echo "$ac_t""yes" 1>&6
10913   ol_link_threads=yes
10914 else
10915   echo "$ac_t""no" 1>&6
10916 fi
10917
10918
10919                 if test $ol_link_threads = no ; then
10920                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10921 echo "configure:10922: checking for cthread_fork with -all_load" >&5
10922 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10923   echo $ac_n "(cached) $ac_c" 1>&6
10924 else
10925   
10926                                                                 save_LIBS="$LIBS"
10927                                 LIBS="-all_load $LIBS"
10928                                 cat > conftest.$ac_ext <<EOF
10929 #line 10930 "configure"
10930 #include "confdefs.h"
10931 #include <mach/cthreads.h>
10932 int main() {
10933
10934                                         cthread_fork((void *)0, (void *)0);
10935                                         
10936 ; return 0; }
10937 EOF
10938 if { (eval echo configure:10939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10939   rm -rf conftest*
10940   ol_cv_cthread_all_load=yes
10941 else
10942   echo "configure: failed program was:" >&5
10943   cat conftest.$ac_ext >&5
10944   rm -rf conftest*
10945   ol_cv_cthread_all_load=no
10946 fi
10947 rm -f conftest*
10948                                                                 LIBS="$save_LIBS"
10949                         
10950 fi
10951
10952 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10953
10954                         if test $ol_cv_cthread_all_load = yes ; then
10955                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10956                                 ol_link_threads=mach
10957                         fi
10958                 fi
10959
10960                 if test $ol_link_threads != no ; then
10961                         : check for cthread specific functionality here
10962                         cat >> confdefs.h <<\EOF
10963 #define HAVE_MACH_CTHREADS 1
10964 EOF
10965
10966                 else
10967                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10968                 fi
10969         fi
10970
10971         if test $ol_with_threads = mach ; then
10972                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10973         fi
10974 fi
10975
10976 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10977         -o $ol_with_threads = pth ; then
10978
10979         for ac_hdr in pth.h
10980 do
10981 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10982 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10983 echo "configure:10984: checking for $ac_hdr" >&5
10984 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10985   echo $ac_n "(cached) $ac_c" 1>&6
10986 else
10987   cat > conftest.$ac_ext <<EOF
10988 #line 10989 "configure"
10989 #include "confdefs.h"
10990 #include <$ac_hdr>
10991 EOF
10992 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10993 { (eval echo configure:10994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10994 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10995 if test -z "$ac_err"; then
10996   rm -rf conftest*
10997   eval "ac_cv_header_$ac_safe=yes"
10998 else
10999   echo "$ac_err" >&5
11000   echo "configure: failed program was:" >&5
11001   cat conftest.$ac_ext >&5
11002   rm -rf conftest*
11003   eval "ac_cv_header_$ac_safe=no"
11004 fi
11005 rm -f conftest*
11006 fi
11007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11008   echo "$ac_t""yes" 1>&6
11009     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11010   cat >> confdefs.h <<EOF
11011 #define $ac_tr_hdr 1
11012 EOF
11013  
11014 else
11015   echo "$ac_t""no" 1>&6
11016 fi
11017 done
11018
11019
11020         if test $ac_cv_header_pth_h = yes ; then
11021                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
11022 echo "configure:11023: checking for pth_version in -lpth" >&5
11023 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
11024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11025   echo $ac_n "(cached) $ac_c" 1>&6
11026 else
11027   ac_save_LIBS="$LIBS"
11028 LIBS="-lpth  $LIBS"
11029 cat > conftest.$ac_ext <<EOF
11030 #line 11031 "configure"
11031 #include "confdefs.h"
11032 /* Override any gcc2 internal prototype to avoid an error.  */
11033 /* We use char because int might match the return type of a gcc2
11034     builtin and then its argument prototype would still apply.  */
11035 char pth_version();
11036
11037 int main() {
11038 pth_version()
11039 ; return 0; }
11040 EOF
11041 if { (eval echo configure:11042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11042   rm -rf conftest*
11043   eval "ac_cv_lib_$ac_lib_var=yes"
11044 else
11045   echo "configure: failed program was:" >&5
11046   cat conftest.$ac_ext >&5
11047   rm -rf conftest*
11048   eval "ac_cv_lib_$ac_lib_var=no"
11049 fi
11050 rm -f conftest*
11051 LIBS="$ac_save_LIBS"
11052
11053 fi
11054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11055   echo "$ac_t""yes" 1>&6
11056   have_pth=yes
11057 else
11058   echo "$ac_t""no" 1>&6
11059 have_pth=no
11060 fi
11061
11062
11063                 if test $have_pth = yes ; then
11064                         cat >> confdefs.h <<\EOF
11065 #define HAVE_GNU_PTH 1
11066 EOF
11067
11068                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
11069                         ol_link_threads=pth
11070
11071                         if test $ol_with_yielding_select = auto ; then
11072                                 ol_with_yielding_select=yes
11073                         fi
11074                 fi
11075         fi
11076 fi
11077
11078 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11079         -o $ol_with_threads = lwp ; then
11080
11081                 for ac_hdr in thread.h synch.h
11082 do
11083 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11084 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11085 echo "configure:11086: checking for $ac_hdr" >&5
11086 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11087   echo $ac_n "(cached) $ac_c" 1>&6
11088 else
11089   cat > conftest.$ac_ext <<EOF
11090 #line 11091 "configure"
11091 #include "confdefs.h"
11092 #include <$ac_hdr>
11093 EOF
11094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11095 { (eval echo configure:11096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11097 if test -z "$ac_err"; then
11098   rm -rf conftest*
11099   eval "ac_cv_header_$ac_safe=yes"
11100 else
11101   echo "$ac_err" >&5
11102   echo "configure: failed program was:" >&5
11103   cat conftest.$ac_ext >&5
11104   rm -rf conftest*
11105   eval "ac_cv_header_$ac_safe=no"
11106 fi
11107 rm -f conftest*
11108 fi
11109 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11110   echo "$ac_t""yes" 1>&6
11111     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11112   cat >> confdefs.h <<EOF
11113 #define $ac_tr_hdr 1
11114 EOF
11115  
11116 else
11117   echo "$ac_t""no" 1>&6
11118 fi
11119 done
11120
11121         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
11122                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
11123 echo "configure:11124: checking for thr_create in -lthread" >&5
11124 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
11125 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11126   echo $ac_n "(cached) $ac_c" 1>&6
11127 else
11128   ac_save_LIBS="$LIBS"
11129 LIBS="-lthread  $LIBS"
11130 cat > conftest.$ac_ext <<EOF
11131 #line 11132 "configure"
11132 #include "confdefs.h"
11133 /* Override any gcc2 internal prototype to avoid an error.  */
11134 /* We use char because int might match the return type of a gcc2
11135     builtin and then its argument prototype would still apply.  */
11136 char thr_create();
11137
11138 int main() {
11139 thr_create()
11140 ; return 0; }
11141 EOF
11142 if { (eval echo configure:11143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11143   rm -rf conftest*
11144   eval "ac_cv_lib_$ac_lib_var=yes"
11145 else
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148   rm -rf conftest*
11149   eval "ac_cv_lib_$ac_lib_var=no"
11150 fi
11151 rm -f conftest*
11152 LIBS="$ac_save_LIBS"
11153
11154 fi
11155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11156   echo "$ac_t""yes" 1>&6
11157   have_thr=yes
11158 else
11159   echo "$ac_t""no" 1>&6
11160 have_thr=no
11161 fi
11162
11163
11164                 if test $have_thr = yes ; then
11165                         cat >> confdefs.h <<\EOF
11166 #define HAVE_THR 1
11167 EOF
11168
11169                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11170                         ol_link_threads=thr
11171
11172                         if test $ol_with_yielding_select = auto ; then
11173                                 ol_with_yielding_select=yes
11174                         fi
11175
11176                                                 for ac_func in \
11177                                 thr_setconcurrency \
11178                                 thr_getconcurrency \
11179                         
11180 do
11181 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11182 echo "configure:11183: checking for $ac_func" >&5
11183 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11184   echo $ac_n "(cached) $ac_c" 1>&6
11185 else
11186   cat > conftest.$ac_ext <<EOF
11187 #line 11188 "configure"
11188 #include "confdefs.h"
11189 /* System header to define __stub macros and hopefully few prototypes,
11190     which can conflict with char $ac_func(); below.  */
11191 #include <assert.h>
11192 /* Override any gcc2 internal prototype to avoid an error.  */
11193 /* We use char because int might match the return type of a gcc2
11194     builtin and then its argument prototype would still apply.  */
11195 char $ac_func();
11196 char (*f)();
11197
11198 int main() {
11199
11200 /* The GNU C library defines this for functions which it implements
11201     to always fail with ENOSYS.  Some functions are actually named
11202     something starting with __ and the normal name is an alias.  */
11203 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11204 choke me
11205 #else
11206 f = $ac_func;
11207 #endif
11208
11209 ; return 0; }
11210 EOF
11211 if { (eval echo configure:11212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11212   rm -rf conftest*
11213   eval "ac_cv_func_$ac_func=yes"
11214 else
11215   echo "configure: failed program was:" >&5
11216   cat conftest.$ac_ext >&5
11217   rm -rf conftest*
11218   eval "ac_cv_func_$ac_func=no"
11219 fi
11220 rm -f conftest*
11221 fi
11222
11223 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11224   echo "$ac_t""yes" 1>&6
11225     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11226   cat >> confdefs.h <<EOF
11227 #define $ac_tr_func 1
11228 EOF
11229  
11230 else
11231   echo "$ac_t""no" 1>&6
11232 fi
11233 done
11234
11235                 fi
11236         fi
11237
11238                 for ac_hdr in lwp/lwp.h
11239 do
11240 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11241 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11242 echo "configure:11243: checking for $ac_hdr" >&5
11243 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11244   echo $ac_n "(cached) $ac_c" 1>&6
11245 else
11246   cat > conftest.$ac_ext <<EOF
11247 #line 11248 "configure"
11248 #include "confdefs.h"
11249 #include <$ac_hdr>
11250 EOF
11251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11252 { (eval echo configure:11253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11254 if test -z "$ac_err"; then
11255   rm -rf conftest*
11256   eval "ac_cv_header_$ac_safe=yes"
11257 else
11258   echo "$ac_err" >&5
11259   echo "configure: failed program was:" >&5
11260   cat conftest.$ac_ext >&5
11261   rm -rf conftest*
11262   eval "ac_cv_header_$ac_safe=no"
11263 fi
11264 rm -f conftest*
11265 fi
11266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11267   echo "$ac_t""yes" 1>&6
11268     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11269   cat >> confdefs.h <<EOF
11270 #define $ac_tr_hdr 1
11271 EOF
11272  
11273 else
11274   echo "$ac_t""no" 1>&6
11275 fi
11276 done
11277
11278         if test $ac_cv_header_lwp_lwp_h = yes ; then
11279                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11280 echo "configure:11281: checking for lwp_create in -llwp" >&5
11281 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11282 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11283   echo $ac_n "(cached) $ac_c" 1>&6
11284 else
11285   ac_save_LIBS="$LIBS"
11286 LIBS="-llwp  $LIBS"
11287 cat > conftest.$ac_ext <<EOF
11288 #line 11289 "configure"
11289 #include "confdefs.h"
11290 /* Override any gcc2 internal prototype to avoid an error.  */
11291 /* We use char because int might match the return type of a gcc2
11292     builtin and then its argument prototype would still apply.  */
11293 char lwp_create();
11294
11295 int main() {
11296 lwp_create()
11297 ; return 0; }
11298 EOF
11299 if { (eval echo configure:11300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11300   rm -rf conftest*
11301   eval "ac_cv_lib_$ac_lib_var=yes"
11302 else
11303   echo "configure: failed program was:" >&5
11304   cat conftest.$ac_ext >&5
11305   rm -rf conftest*
11306   eval "ac_cv_lib_$ac_lib_var=no"
11307 fi
11308 rm -f conftest*
11309 LIBS="$ac_save_LIBS"
11310
11311 fi
11312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11313   echo "$ac_t""yes" 1>&6
11314   have_lwp=yes
11315 else
11316   echo "$ac_t""no" 1>&6
11317 have_lwp=no
11318 fi
11319
11320
11321                 if test $have_lwp = yes ; then
11322                         cat >> confdefs.h <<\EOF
11323 #define HAVE_LWP 1
11324 EOF
11325
11326                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11327                         ol_link_threads=lwp
11328
11329                         if test $ol_with_yielding_select = auto ; then
11330                                 ol_with_yielding_select=no
11331                         fi
11332                 fi
11333         fi
11334 fi
11335
11336 if test $ol_with_yielding_select = yes ; then
11337         cat >> confdefs.h <<\EOF
11338 #define HAVE_YIELDING_SELECT 1
11339 EOF
11340
11341 fi
11342
11343 if test $ol_with_threads = manual ; then
11344                 ol_link_threads=yes
11345
11346         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11347
11348         for ac_hdr in pthread.h sched.h
11349 do
11350 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11351 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11352 echo "configure:11353: checking for $ac_hdr" >&5
11353 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11354   echo $ac_n "(cached) $ac_c" 1>&6
11355 else
11356   cat > conftest.$ac_ext <<EOF
11357 #line 11358 "configure"
11358 #include "confdefs.h"
11359 #include <$ac_hdr>
11360 EOF
11361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11362 { (eval echo configure:11363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11364 if test -z "$ac_err"; then
11365   rm -rf conftest*
11366   eval "ac_cv_header_$ac_safe=yes"
11367 else
11368   echo "$ac_err" >&5
11369   echo "configure: failed program was:" >&5
11370   cat conftest.$ac_ext >&5
11371   rm -rf conftest*
11372   eval "ac_cv_header_$ac_safe=no"
11373 fi
11374 rm -f conftest*
11375 fi
11376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11377   echo "$ac_t""yes" 1>&6
11378     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11379   cat >> confdefs.h <<EOF
11380 #define $ac_tr_hdr 1
11381 EOF
11382  
11383 else
11384   echo "$ac_t""no" 1>&6
11385 fi
11386 done
11387
11388         for ac_func in sched_yield pthread_yield
11389 do
11390 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11391 echo "configure:11392: checking for $ac_func" >&5
11392 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11393   echo $ac_n "(cached) $ac_c" 1>&6
11394 else
11395   cat > conftest.$ac_ext <<EOF
11396 #line 11397 "configure"
11397 #include "confdefs.h"
11398 /* System header to define __stub macros and hopefully few prototypes,
11399     which can conflict with char $ac_func(); below.  */
11400 #include <assert.h>
11401 /* Override any gcc2 internal prototype to avoid an error.  */
11402 /* We use char because int might match the return type of a gcc2
11403     builtin and then its argument prototype would still apply.  */
11404 char $ac_func();
11405 char (*f)();
11406
11407 int main() {
11408
11409 /* The GNU C library defines this for functions which it implements
11410     to always fail with ENOSYS.  Some functions are actually named
11411     something starting with __ and the normal name is an alias.  */
11412 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11413 choke me
11414 #else
11415 f = $ac_func;
11416 #endif
11417
11418 ; return 0; }
11419 EOF
11420 if { (eval echo configure:11421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11421   rm -rf conftest*
11422   eval "ac_cv_func_$ac_func=yes"
11423 else
11424   echo "configure: failed program was:" >&5
11425   cat conftest.$ac_ext >&5
11426   rm -rf conftest*
11427   eval "ac_cv_func_$ac_func=no"
11428 fi
11429 rm -f conftest*
11430 fi
11431
11432 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11433   echo "$ac_t""yes" 1>&6
11434     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11435   cat >> confdefs.h <<EOF
11436 #define $ac_tr_func 1
11437 EOF
11438  
11439 else
11440   echo "$ac_t""no" 1>&6
11441 fi
11442 done
11443
11444         
11445         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11446 echo "configure:11447: checking for LinuxThreads pthread.h" >&5
11447 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11448   echo $ac_n "(cached) $ac_c" 1>&6
11449 else
11450   cat > conftest.$ac_ext <<EOF
11451 #line 11452 "configure"
11452 #include "confdefs.h"
11453 #include <pthread.h>
11454 EOF
11455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11456   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11457   rm -rf conftest*
11458   ol_cv_header_linux_threads=yes
11459 else
11460   rm -rf conftest*
11461   ol_cv_header_linux_threads=no
11462 fi
11463 rm -f conftest*
11464
11465                 
11466 fi
11467
11468 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11469         if test $ol_cv_header_linux_threads = yes; then
11470                 cat >> confdefs.h <<\EOF
11471 #define HAVE_LINUX_THREADS 1
11472 EOF
11473
11474         fi
11475
11476
11477         for ac_hdr in mach/cthreads.h
11478 do
11479 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11480 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11481 echo "configure:11482: checking for $ac_hdr" >&5
11482 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11483   echo $ac_n "(cached) $ac_c" 1>&6
11484 else
11485   cat > conftest.$ac_ext <<EOF
11486 #line 11487 "configure"
11487 #include "confdefs.h"
11488 #include <$ac_hdr>
11489 EOF
11490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11491 { (eval echo configure:11492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11493 if test -z "$ac_err"; then
11494   rm -rf conftest*
11495   eval "ac_cv_header_$ac_safe=yes"
11496 else
11497   echo "$ac_err" >&5
11498   echo "configure: failed program was:" >&5
11499   cat conftest.$ac_ext >&5
11500   rm -rf conftest*
11501   eval "ac_cv_header_$ac_safe=no"
11502 fi
11503 rm -f conftest*
11504 fi
11505 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11506   echo "$ac_t""yes" 1>&6
11507     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11508   cat >> confdefs.h <<EOF
11509 #define $ac_tr_hdr 1
11510 EOF
11511  
11512 else
11513   echo "$ac_t""no" 1>&6
11514 fi
11515 done
11516
11517         for ac_hdr in lwp/lwp.h
11518 do
11519 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11520 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11521 echo "configure:11522: checking for $ac_hdr" >&5
11522 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11523   echo $ac_n "(cached) $ac_c" 1>&6
11524 else
11525   cat > conftest.$ac_ext <<EOF
11526 #line 11527 "configure"
11527 #include "confdefs.h"
11528 #include <$ac_hdr>
11529 EOF
11530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11531 { (eval echo configure:11532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11533 if test -z "$ac_err"; then
11534   rm -rf conftest*
11535   eval "ac_cv_header_$ac_safe=yes"
11536 else
11537   echo "$ac_err" >&5
11538   echo "configure: failed program was:" >&5
11539   cat conftest.$ac_ext >&5
11540   rm -rf conftest*
11541   eval "ac_cv_header_$ac_safe=no"
11542 fi
11543 rm -f conftest*
11544 fi
11545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11546   echo "$ac_t""yes" 1>&6
11547     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11548   cat >> confdefs.h <<EOF
11549 #define $ac_tr_hdr 1
11550 EOF
11551  
11552 else
11553   echo "$ac_t""no" 1>&6
11554 fi
11555 done
11556
11557         for ac_hdr in thread.h synch.h
11558 do
11559 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11560 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11561 echo "configure:11562: checking for $ac_hdr" >&5
11562 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11563   echo $ac_n "(cached) $ac_c" 1>&6
11564 else
11565   cat > conftest.$ac_ext <<EOF
11566 #line 11567 "configure"
11567 #include "confdefs.h"
11568 #include <$ac_hdr>
11569 EOF
11570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11571 { (eval echo configure:11572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11573 if test -z "$ac_err"; then
11574   rm -rf conftest*
11575   eval "ac_cv_header_$ac_safe=yes"
11576 else
11577   echo "$ac_err" >&5
11578   echo "configure: failed program was:" >&5
11579   cat conftest.$ac_ext >&5
11580   rm -rf conftest*
11581   eval "ac_cv_header_$ac_safe=no"
11582 fi
11583 rm -f conftest*
11584 fi
11585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11586   echo "$ac_t""yes" 1>&6
11587     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11588   cat >> confdefs.h <<EOF
11589 #define $ac_tr_hdr 1
11590 EOF
11591  
11592 else
11593   echo "$ac_t""no" 1>&6
11594 fi
11595 done
11596
11597 fi
11598
11599 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11600                         cat >> confdefs.h <<\EOF
11601 #define REENTRANT 1
11602 EOF
11603
11604         cat >> confdefs.h <<\EOF
11605 #define _REENTRANT 1
11606 EOF
11607
11608         cat >> confdefs.h <<\EOF
11609 #define THREAD_SAFE 1
11610 EOF
11611
11612         cat >> confdefs.h <<\EOF
11613 #define _THREAD_SAFE 1
11614 EOF
11615
11616         cat >> confdefs.h <<\EOF
11617 #define THREADSAFE 1
11618 EOF
11619
11620         cat >> confdefs.h <<\EOF
11621 #define _THREADSAFE 1
11622 EOF
11623
11624         cat >> confdefs.h <<\EOF
11625 #define _SGI_MP_SOURCE 1
11626 EOF
11627
11628
11629                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11630 echo "configure:11631: checking for thread specific errno" >&5
11631 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11632   echo $ac_n "(cached) $ac_c" 1>&6
11633 else
11634   
11635                 cat > conftest.$ac_ext <<EOF
11636 #line 11637 "configure"
11637 #include "confdefs.h"
11638 #include <errno.h>
11639 int main() {
11640 errno = 0;
11641 ; return 0; }
11642 EOF
11643 if { (eval echo configure:11644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11644   rm -rf conftest*
11645   ol_cv_errno_thread_specific=yes
11646 else
11647   echo "configure: failed program was:" >&5
11648   cat conftest.$ac_ext >&5
11649   rm -rf conftest*
11650   ol_cv_errno_thread_specific=no
11651 fi
11652 rm -f conftest*
11653         
11654 fi
11655
11656 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11657
11658                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11659 echo "configure:11660: checking for thread specific h_errno" >&5
11660 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11661   echo $ac_n "(cached) $ac_c" 1>&6
11662 else
11663   
11664                 cat > conftest.$ac_ext <<EOF
11665 #line 11666 "configure"
11666 #include "confdefs.h"
11667 #include <netdb.h>
11668 int main() {
11669 h_errno = 0;
11670 ; return 0; }
11671 EOF
11672 if { (eval echo configure:11673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11673   rm -rf conftest*
11674   ol_cv_h_errno_thread_specific=yes
11675 else
11676   echo "configure: failed program was:" >&5
11677   cat conftest.$ac_ext >&5
11678   rm -rf conftest*
11679   ol_cv_h_errno_thread_specific=no
11680 fi
11681 rm -f conftest*
11682         
11683 fi
11684
11685 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11686
11687         if test $ol_cv_errno_thread_specific != yes \
11688                 -o $ol_cv_h_errno_thread_specific != yes ; then
11689                 LIBS="$LTHREAD_LIBS $LIBS"
11690                 LTHREAD_LIBS=""
11691         fi
11692
11693 fi  
11694
11695 if test $ol_link_threads = no ; then
11696         if test $ol_with_threads = yes ; then
11697                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11698         fi
11699
11700         if test $ol_with_threads = auto ; then
11701                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11702                 ol_with_threads=no
11703         fi
11704
11705         cat >> confdefs.h <<\EOF
11706 #define NO_THREADS 1
11707 EOF
11708
11709         LTHREAD_LIBS=""
11710 fi
11711
11712 if test $ol_link_threads != no ; then
11713         cat >> confdefs.h <<\EOF
11714 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11715 EOF
11716
11717 fi
11718
11719
11720 ol_link_ldbm=no 
11721 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
11722         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
11723 echo "configure:11724: checking for DB2 library" >&5
11724 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
11725   echo $ac_n "(cached) $ac_c" 1>&6
11726 else
11727         ol_LIBS="$LIBS"
11728         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
11729 echo "configure:11730: checking for db_appexit in -ldb" >&5
11730 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
11731 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11732   echo $ac_n "(cached) $ac_c" 1>&6
11733 else
11734   ac_save_LIBS="$LIBS"
11735 LIBS="-ldb  $LIBS"
11736 cat > conftest.$ac_ext <<EOF
11737 #line 11738 "configure"
11738 #include "confdefs.h"
11739 /* Override any gcc2 internal prototype to avoid an error.  */
11740 /* We use char because int might match the return type of a gcc2
11741     builtin and then its argument prototype would still apply.  */
11742 char db_appexit();
11743
11744 int main() {
11745 db_appexit()
11746 ; return 0; }
11747 EOF
11748 if { (eval echo configure:11749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11749   rm -rf conftest*
11750   eval "ac_cv_lib_$ac_lib_var=yes"
11751 else
11752   echo "configure: failed program was:" >&5
11753   cat conftest.$ac_ext >&5
11754   rm -rf conftest*
11755   eval "ac_cv_lib_$ac_lib_var=no"
11756 fi
11757 rm -f conftest*
11758 LIBS="$ac_save_LIBS"
11759
11760 fi
11761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11762   echo "$ac_t""yes" 1>&6
11763   ol_cv_lib_db2=-ldb
11764 else
11765   echo "$ac_t""no" 1>&6
11766 ol_cv_lib_db2=no
11767 fi
11768
11769         LIBS="$ol_LIBS"
11770
11771 fi
11772
11773 echo "$ac_t""$ol_cv_lib_db2" 1>&6
11774
11775 for ac_hdr in db.h
11776 do
11777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11779 echo "configure:11780: checking for $ac_hdr" >&5
11780 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11781   echo $ac_n "(cached) $ac_c" 1>&6
11782 else
11783   cat > conftest.$ac_ext <<EOF
11784 #line 11785 "configure"
11785 #include "confdefs.h"
11786 #include <$ac_hdr>
11787 EOF
11788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11789 { (eval echo configure:11790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11791 if test -z "$ac_err"; then
11792   rm -rf conftest*
11793   eval "ac_cv_header_$ac_safe=yes"
11794 else
11795   echo "$ac_err" >&5
11796   echo "configure: failed program was:" >&5
11797   cat conftest.$ac_ext >&5
11798   rm -rf conftest*
11799   eval "ac_cv_header_$ac_safe=no"
11800 fi
11801 rm -f conftest*
11802 fi
11803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11804   echo "$ac_t""yes" 1>&6
11805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11806   cat >> confdefs.h <<EOF
11807 #define $ac_tr_hdr 1
11808 EOF
11809  
11810 else
11811   echo "$ac_t""no" 1>&6
11812 fi
11813 done
11814
11815 if test $ac_cv_header_db_h = yes ; then
11816         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
11817 echo "configure:11818: checking if db.h is DB2" >&5
11818 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
11819   echo $ac_n "(cached) $ac_c" 1>&6
11820 else
11821   
11822                 cat > conftest.$ac_ext <<EOF
11823 #line 11824 "configure"
11824 #include "confdefs.h"
11825
11826 #                       include <db.h>
11827                         /* this check could be improved */
11828 #                       ifdef DB_VERSION_MAJOR
11829 #                               if DB_VERSION_MAJOR == 2
11830                                         __db_version_2;
11831 #                               endif
11832 #                       endif
11833                 
11834 EOF
11835 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11836   egrep "__db_version_2" >/dev/null 2>&1; then
11837   rm -rf conftest*
11838   ol_cv_header_db2=yes
11839 else
11840   rm -rf conftest*
11841   ol_cv_header_db2=no
11842 fi
11843 rm -f conftest*
11844
11845 fi
11846
11847 echo "$ac_t""$ol_cv_header_db2" 1>&6
11848 else
11849         ol_cv_header_db2=no
11850 fi
11851
11852
11853  
11854  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
11855 echo "configure:11856: checking for Berkeley DB2" >&5
11856 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
11857   echo $ac_n "(cached) $ac_c" 1>&6
11858 else
11859   
11860         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
11861                 ol_cv_berkeley_db2=no
11862         else
11863                 ol_cv_berkeley_db2=yes
11864         fi
11865
11866 fi
11867
11868 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
11869  if test $ol_cv_berkeley_db2 = yes ; then
11870         cat >> confdefs.h <<\EOF
11871 #define HAVE_BERKELEY_DB2 1
11872 EOF
11873
11874  fi
11875
11876
11877         if test $ol_cv_berkeley_db2 = yes ; then
11878                 ol_link_ldbm=db2
11879                 ol_with_ldbm_api=db2
11880
11881                 if test $ol_with_ldbm_type = hash ; then
11882                         cat >> confdefs.h <<\EOF
11883 #define LDBM_USE_DBHASH 1
11884 EOF
11885
11886                 else
11887                         cat >> confdefs.h <<\EOF
11888 #define LDBM_USE_DBBTREE 1
11889 EOF
11890
11891                 fi
11892
11893                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11894 echo "configure:11895: checking for DB_THREAD support" >&5
11895 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
11896   echo $ac_n "(cached) $ac_c" 1>&6
11897 else
11898   
11899         ol_LIBS="$LIBS"
11900         if test $ol_cv_lib_db2 != yes ; then
11901                 LIBS="$ol_cv_lib_db2"
11902         fi
11903
11904         if test "$cross_compiling" = yes; then
11905   ol_cv_berkeley_db2_db_thread=cross
11906 else
11907   cat > conftest.$ac_ext <<EOF
11908 #line 11909 "configure"
11909 #include "confdefs.h"
11910
11911 #include <db.h>
11912 #ifndef NULL
11913 #define NULL ((void *)0)
11914 #endif
11915 main()
11916 {
11917         int rc;
11918         DB_ENV env;
11919         u_int32_t flags = DB_CREATE | DB_THREAD;
11920
11921         memset( &env, '\0', sizeof(env) );
11922
11923         rc = db_appinit( NULL, NULL, &env, flags );
11924
11925         if( rc == 0 ) {
11926                 db_appexit( &env );
11927         }
11928
11929         return rc;
11930 }
11931 EOF
11932 if { (eval echo configure:11933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11933 then
11934   ol_cv_berkeley_db2_db_thread=yes
11935 else
11936   echo "configure: failed program was:" >&5
11937   cat conftest.$ac_ext >&5
11938   rm -fr conftest*
11939   ol_cv_berkeley_db2_db_thread=no
11940 fi
11941 rm -fr conftest*
11942 fi
11943
11944
11945         LIBS="$ol_LIBS"
11946
11947         if test $ol_cv_berkeley_db2_db_thread != no ; then
11948                 cat >> confdefs.h <<\EOF
11949 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11950 EOF
11951
11952         fi
11953
11954 fi
11955
11956 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11957
11958                                                 if test $ol_cv_lib_db2 != yes ; then
11959                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11960                 fi
11961         fi
11962 fi
11963
11964 ol_link_bdb2=no
11965 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11966         if test $ol_cv_berkeley_db2_db_thread != no ; then
11967                 ol_link_bdb2=yes
11968         else
11969                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11970         fi
11971 fi
11972
11973 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11974         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11975 echo "configure:11976: checking for Berkeley DB library" >&5
11976 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11977   echo $ac_n "(cached) $ac_c" 1>&6
11978 else
11979   
11980         for ac_hdr in db1/db.h
11981 do
11982 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11983 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11984 echo "configure:11985: checking for $ac_hdr" >&5
11985 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11986   echo $ac_n "(cached) $ac_c" 1>&6
11987 else
11988   cat > conftest.$ac_ext <<EOF
11989 #line 11990 "configure"
11990 #include "confdefs.h"
11991 #include <$ac_hdr>
11992 EOF
11993 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11994 { (eval echo configure:11995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11995 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11996 if test -z "$ac_err"; then
11997   rm -rf conftest*
11998   eval "ac_cv_header_$ac_safe=yes"
11999 else
12000   echo "$ac_err" >&5
12001   echo "configure: failed program was:" >&5
12002   cat conftest.$ac_ext >&5
12003   rm -rf conftest*
12004   eval "ac_cv_header_$ac_safe=no"
12005 fi
12006 rm -f conftest*
12007 fi
12008 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12009   echo "$ac_t""yes" 1>&6
12010     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12011   cat >> confdefs.h <<EOF
12012 #define $ac_tr_hdr 1
12013 EOF
12014  
12015 else
12016   echo "$ac_t""no" 1>&6
12017 fi
12018 done
12019
12020         ol_LIBS="$LIBS"
12021         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
12022 echo "configure:12023: checking for dbopen" >&5
12023 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
12024   echo $ac_n "(cached) $ac_c" 1>&6
12025 else
12026   cat > conftest.$ac_ext <<EOF
12027 #line 12028 "configure"
12028 #include "confdefs.h"
12029 /* System header to define __stub macros and hopefully few prototypes,
12030     which can conflict with char dbopen(); below.  */
12031 #include <assert.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 char (*f)();
12037
12038 int main() {
12039
12040 /* The GNU C library defines this for functions which it implements
12041     to always fail with ENOSYS.  Some functions are actually named
12042     something starting with __ and the normal name is an alias.  */
12043 #if defined (__stub_dbopen) || defined (__stub___dbopen)
12044 choke me
12045 #else
12046 f = dbopen;
12047 #endif
12048
12049 ; return 0; }
12050 EOF
12051 if { (eval echo configure:12052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12052   rm -rf conftest*
12053   eval "ac_cv_func_dbopen=yes"
12054 else
12055   echo "configure: failed program was:" >&5
12056   cat conftest.$ac_ext >&5
12057   rm -rf conftest*
12058   eval "ac_cv_func_dbopen=no"
12059 fi
12060 rm -f conftest*
12061 fi
12062
12063 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
12064   echo "$ac_t""yes" 1>&6
12065   ol_cv_lib_db=yes
12066 else
12067   echo "$ac_t""no" 1>&6
12068
12069                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
12070 echo "configure:12071: checking for dbopen in -ldb1" >&5
12071 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
12072 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12073   echo $ac_n "(cached) $ac_c" 1>&6
12074 else
12075   ac_save_LIBS="$LIBS"
12076 LIBS="-ldb1  $LIBS"
12077 cat > conftest.$ac_ext <<EOF
12078 #line 12079 "configure"
12079 #include "confdefs.h"
12080 /* Override any gcc2 internal prototype to avoid an error.  */
12081 /* We use char because int might match the return type of a gcc2
12082     builtin and then its argument prototype would still apply.  */
12083 char dbopen();
12084
12085 int main() {
12086 dbopen()
12087 ; return 0; }
12088 EOF
12089 if { (eval echo configure:12090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12090   rm -rf conftest*
12091   eval "ac_cv_lib_$ac_lib_var=yes"
12092 else
12093   echo "configure: failed program was:" >&5
12094   cat conftest.$ac_ext >&5
12095   rm -rf conftest*
12096   eval "ac_cv_lib_$ac_lib_var=no"
12097 fi
12098 rm -f conftest*
12099 LIBS="$ac_save_LIBS"
12100
12101 fi
12102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12103   echo "$ac_t""yes" 1>&6
12104   ol_cv_lib_db=-ldb1
12105 else
12106   echo "$ac_t""no" 1>&6
12107
12108                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
12109 echo "configure:12110: checking for dbopen in -ldb" >&5
12110 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
12111 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12112   echo $ac_n "(cached) $ac_c" 1>&6
12113 else
12114   ac_save_LIBS="$LIBS"
12115 LIBS="-ldb  $LIBS"
12116 cat > conftest.$ac_ext <<EOF
12117 #line 12118 "configure"
12118 #include "confdefs.h"
12119 /* Override any gcc2 internal prototype to avoid an error.  */
12120 /* We use char because int might match the return type of a gcc2
12121     builtin and then its argument prototype would still apply.  */
12122 char dbopen();
12123
12124 int main() {
12125 dbopen()
12126 ; return 0; }
12127 EOF
12128 if { (eval echo configure:12129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12129   rm -rf conftest*
12130   eval "ac_cv_lib_$ac_lib_var=yes"
12131 else
12132   echo "configure: failed program was:" >&5
12133   cat conftest.$ac_ext >&5
12134   rm -rf conftest*
12135   eval "ac_cv_lib_$ac_lib_var=no"
12136 fi
12137 rm -f conftest*
12138 LIBS="$ac_save_LIBS"
12139
12140 fi
12141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12142   echo "$ac_t""yes" 1>&6
12143   ol_cv_lib_db=-ldb
12144 else
12145   echo "$ac_t""no" 1>&6
12146 ol_cv_lib_db=no
12147 fi
12148
12149                 
12150 fi
12151
12152         
12153 fi
12154
12155         LIBS="$ol_LIBS"
12156
12157 fi
12158
12159 echo "$ac_t""$ol_cv_lib_db" 1>&6
12160
12161
12162 for ac_hdr in db_185.h
12163 do
12164 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12165 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12166 echo "configure:12167: checking for $ac_hdr" >&5
12167 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12168   echo $ac_n "(cached) $ac_c" 1>&6
12169 else
12170   cat > conftest.$ac_ext <<EOF
12171 #line 12172 "configure"
12172 #include "confdefs.h"
12173 #include <$ac_hdr>
12174 EOF
12175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12176 { (eval echo configure:12177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12178 if test -z "$ac_err"; then
12179   rm -rf conftest*
12180   eval "ac_cv_header_$ac_safe=yes"
12181 else
12182   echo "$ac_err" >&5
12183   echo "configure: failed program was:" >&5
12184   cat conftest.$ac_ext >&5
12185   rm -rf conftest*
12186   eval "ac_cv_header_$ac_safe=no"
12187 fi
12188 rm -f conftest*
12189 fi
12190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12191   echo "$ac_t""yes" 1>&6
12192     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12193   cat >> confdefs.h <<EOF
12194 #define $ac_tr_hdr 1
12195 EOF
12196  
12197 else
12198   echo "$ac_t""no" 1>&6
12199 fi
12200 done
12201
12202 if test "$ol_cv_header_db2" = yes ; then
12203         
12204         ol_cv_header_db=$ac_cv_header_db_185_h
12205 else
12206         ol_cv_header_db=$ac_cv_header_db_h
12207 fi
12208
12209
12210  
12211  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
12212 echo "configure:12213: checking for Berkeley DB" >&5
12213 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
12214   echo $ac_n "(cached) $ac_c" 1>&6
12215 else
12216   
12217         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
12218                 ol_cv_berkeley_db=no
12219         else
12220                 ol_cv_berkeley_db=yes
12221         fi
12222
12223 fi
12224
12225 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
12226  if test $ol_cv_berkeley_db = yes ; then
12227         cat >> confdefs.h <<\EOF
12228 #define HAVE_BERKELEY_DB 1
12229 EOF
12230
12231  fi
12232
12233
12234         if test $ol_cv_berkeley_db = yes ; then
12235                 ol_link_ldbm=db
12236                 ol_with_ldbm_api=db
12237
12238                 if test $ol_with_ldbm_type = hash ; then
12239                         cat >> confdefs.h <<\EOF
12240 #define LDBM_USE_DBHASH 1
12241 EOF
12242
12243                 else
12244                         cat >> confdefs.h <<\EOF
12245 #define LDBM_USE_DBBTREE 1
12246 EOF
12247
12248                 fi
12249
12250                                                 if test $ol_cv_lib_db != yes ; then
12251                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12252                 fi
12253         fi
12254 fi
12255
12256 if test $ol_with_ldbm_api = manual ; then
12257                 ol_link_ldbm=yes
12258
12259         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
12260
12261         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
12262 do
12263 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12264 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12265 echo "configure:12266: checking for $ac_hdr" >&5
12266 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12267   echo $ac_n "(cached) $ac_c" 1>&6
12268 else
12269   cat > conftest.$ac_ext <<EOF
12270 #line 12271 "configure"
12271 #include "confdefs.h"
12272 #include <$ac_hdr>
12273 EOF
12274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12275 { (eval echo configure:12276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12277 if test -z "$ac_err"; then
12278   rm -rf conftest*
12279   eval "ac_cv_header_$ac_safe=yes"
12280 else
12281   echo "$ac_err" >&5
12282   echo "configure: failed program was:" >&5
12283   cat conftest.$ac_ext >&5
12284   rm -rf conftest*
12285   eval "ac_cv_header_$ac_safe=no"
12286 fi
12287 rm -f conftest*
12288 fi
12289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12290   echo "$ac_t""yes" 1>&6
12291     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12292   cat >> confdefs.h <<EOF
12293 #define $ac_tr_hdr 1
12294 EOF
12295  
12296 else
12297   echo "$ac_t""no" 1>&6
12298 fi
12299 done
12300
12301 fi
12302
12303 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12304         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12305         ol_with_ldbm_api=none
12306 fi
12307
12308 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12309         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12310 echo "configure:12311: checking for MDBM library" >&5
12311 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12312   echo $ac_n "(cached) $ac_c" 1>&6
12313 else
12314         ol_LIBS="$LIBS"
12315         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12316 echo "configure:12317: checking for mdbm_set_chain" >&5
12317 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12318   echo $ac_n "(cached) $ac_c" 1>&6
12319 else
12320   cat > conftest.$ac_ext <<EOF
12321 #line 12322 "configure"
12322 #include "confdefs.h"
12323 /* System header to define __stub macros and hopefully few prototypes,
12324     which can conflict with char mdbm_set_chain(); below.  */
12325 #include <assert.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 char (*f)();
12331
12332 int main() {
12333
12334 /* The GNU C library defines this for functions which it implements
12335     to always fail with ENOSYS.  Some functions are actually named
12336     something starting with __ and the normal name is an alias.  */
12337 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12338 choke me
12339 #else
12340 f = mdbm_set_chain;
12341 #endif
12342
12343 ; return 0; }
12344 EOF
12345 if { (eval echo configure:12346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12346   rm -rf conftest*
12347   eval "ac_cv_func_mdbm_set_chain=yes"
12348 else
12349   echo "configure: failed program was:" >&5
12350   cat conftest.$ac_ext >&5
12351   rm -rf conftest*
12352   eval "ac_cv_func_mdbm_set_chain=no"
12353 fi
12354 rm -f conftest*
12355 fi
12356
12357 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12358   echo "$ac_t""yes" 1>&6
12359   ol_cv_lib_mdbm=yes
12360 else
12361   echo "$ac_t""no" 1>&6
12362
12363                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12364 echo "configure:12365: checking for mdbm_set_chain in -lmdbm" >&5
12365 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12366 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12367   echo $ac_n "(cached) $ac_c" 1>&6
12368 else
12369   ac_save_LIBS="$LIBS"
12370 LIBS="-lmdbm  $LIBS"
12371 cat > conftest.$ac_ext <<EOF
12372 #line 12373 "configure"
12373 #include "confdefs.h"
12374 /* Override any gcc2 internal prototype to avoid an error.  */
12375 /* We use char because int might match the return type of a gcc2
12376     builtin and then its argument prototype would still apply.  */
12377 char mdbm_set_chain();
12378
12379 int main() {
12380 mdbm_set_chain()
12381 ; return 0; }
12382 EOF
12383 if { (eval echo configure:12384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12384   rm -rf conftest*
12385   eval "ac_cv_lib_$ac_lib_var=yes"
12386 else
12387   echo "configure: failed program was:" >&5
12388   cat conftest.$ac_ext >&5
12389   rm -rf conftest*
12390   eval "ac_cv_lib_$ac_lib_var=no"
12391 fi
12392 rm -f conftest*
12393 LIBS="$ac_save_LIBS"
12394
12395 fi
12396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12397   echo "$ac_t""yes" 1>&6
12398   ol_cv_lib_mdbm=-lmdbm
12399 else
12400   echo "$ac_t""no" 1>&6
12401 ol_cv_lib_mdbm=no
12402 fi
12403
12404         
12405 fi
12406
12407         LIBS="$ol_LIBS"
12408
12409 fi
12410
12411 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12412
12413
12414  for ac_hdr in mdbm.h
12415 do
12416 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12417 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12418 echo "configure:12419: checking for $ac_hdr" >&5
12419 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12420   echo $ac_n "(cached) $ac_c" 1>&6
12421 else
12422   cat > conftest.$ac_ext <<EOF
12423 #line 12424 "configure"
12424 #include "confdefs.h"
12425 #include <$ac_hdr>
12426 EOF
12427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12428 { (eval echo configure:12429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12430 if test -z "$ac_err"; then
12431   rm -rf conftest*
12432   eval "ac_cv_header_$ac_safe=yes"
12433 else
12434   echo "$ac_err" >&5
12435   echo "configure: failed program was:" >&5
12436   cat conftest.$ac_ext >&5
12437   rm -rf conftest*
12438   eval "ac_cv_header_$ac_safe=no"
12439 fi
12440 rm -f conftest*
12441 fi
12442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12443   echo "$ac_t""yes" 1>&6
12444     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12445   cat >> confdefs.h <<EOF
12446 #define $ac_tr_hdr 1
12447 EOF
12448  
12449 else
12450   echo "$ac_t""no" 1>&6
12451 fi
12452 done
12453
12454  echo $ac_n "checking for db""... $ac_c" 1>&6
12455 echo "configure:12456: checking for db" >&5
12456 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12457   echo $ac_n "(cached) $ac_c" 1>&6
12458 else
12459   
12460         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12461                 ol_cv_mdbm=no
12462         else
12463                 ol_cv_mdbm=yes
12464         fi
12465
12466 fi
12467
12468 echo "$ac_t""$ol_cv_mdbm" 1>&6
12469  if test $ol_cv_mdbm = yes ; then
12470         cat >> confdefs.h <<\EOF
12471 #define HAVE_MDBM 1
12472 EOF
12473
12474  fi
12475
12476
12477         if test $ol_cv_mdbm = yes ; then
12478                 ol_link_ldbm=mdbm
12479                 ol_with_ldbm_api=mdbm
12480                 if test $ol_cv_lib_mdbm != yes ; then
12481                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12482                 fi
12483         fi
12484 fi
12485
12486 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12487         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12488 echo "configure:12489: checking for GDBM library" >&5
12489 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12490   echo $ac_n "(cached) $ac_c" 1>&6
12491 else
12492         ol_LIBS="$LIBS"
12493         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12494 echo "configure:12495: checking for gdbm_open" >&5
12495 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12496   echo $ac_n "(cached) $ac_c" 1>&6
12497 else
12498   cat > conftest.$ac_ext <<EOF
12499 #line 12500 "configure"
12500 #include "confdefs.h"
12501 /* System header to define __stub macros and hopefully few prototypes,
12502     which can conflict with char gdbm_open(); below.  */
12503 #include <assert.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 char (*f)();
12509
12510 int main() {
12511
12512 /* The GNU C library defines this for functions which it implements
12513     to always fail with ENOSYS.  Some functions are actually named
12514     something starting with __ and the normal name is an alias.  */
12515 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12516 choke me
12517 #else
12518 f = gdbm_open;
12519 #endif
12520
12521 ; return 0; }
12522 EOF
12523 if { (eval echo configure:12524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12524   rm -rf conftest*
12525   eval "ac_cv_func_gdbm_open=yes"
12526 else
12527   echo "configure: failed program was:" >&5
12528   cat conftest.$ac_ext >&5
12529   rm -rf conftest*
12530   eval "ac_cv_func_gdbm_open=no"
12531 fi
12532 rm -f conftest*
12533 fi
12534
12535 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12536   echo "$ac_t""yes" 1>&6
12537   ol_cv_lib_gdbm=yes
12538 else
12539   echo "$ac_t""no" 1>&6
12540
12541                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12542 echo "configure:12543: checking for gdbm_open in -lgdbm" >&5
12543 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12544 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12545   echo $ac_n "(cached) $ac_c" 1>&6
12546 else
12547   ac_save_LIBS="$LIBS"
12548 LIBS="-lgdbm  $LIBS"
12549 cat > conftest.$ac_ext <<EOF
12550 #line 12551 "configure"
12551 #include "confdefs.h"
12552 /* Override any gcc2 internal prototype to avoid an error.  */
12553 /* We use char because int might match the return type of a gcc2
12554     builtin and then its argument prototype would still apply.  */
12555 char gdbm_open();
12556
12557 int main() {
12558 gdbm_open()
12559 ; return 0; }
12560 EOF
12561 if { (eval echo configure:12562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12562   rm -rf conftest*
12563   eval "ac_cv_lib_$ac_lib_var=yes"
12564 else
12565   echo "configure: failed program was:" >&5
12566   cat conftest.$ac_ext >&5
12567   rm -rf conftest*
12568   eval "ac_cv_lib_$ac_lib_var=no"
12569 fi
12570 rm -f conftest*
12571 LIBS="$ac_save_LIBS"
12572
12573 fi
12574 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12575   echo "$ac_t""yes" 1>&6
12576   ol_cv_lib_gdbm=-lgdbm
12577 else
12578   echo "$ac_t""no" 1>&6
12579 ol_cv_lib_gdbm=no
12580 fi
12581
12582         
12583 fi
12584
12585         LIBS="$ol_LIBS"
12586
12587 fi
12588
12589 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12590
12591
12592  for ac_hdr in gdbm.h
12593 do
12594 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12595 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12596 echo "configure:12597: checking for $ac_hdr" >&5
12597 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12598   echo $ac_n "(cached) $ac_c" 1>&6
12599 else
12600   cat > conftest.$ac_ext <<EOF
12601 #line 12602 "configure"
12602 #include "confdefs.h"
12603 #include <$ac_hdr>
12604 EOF
12605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12606 { (eval echo configure:12607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12608 if test -z "$ac_err"; then
12609   rm -rf conftest*
12610   eval "ac_cv_header_$ac_safe=yes"
12611 else
12612   echo "$ac_err" >&5
12613   echo "configure: failed program was:" >&5
12614   cat conftest.$ac_ext >&5
12615   rm -rf conftest*
12616   eval "ac_cv_header_$ac_safe=no"
12617 fi
12618 rm -f conftest*
12619 fi
12620 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12621   echo "$ac_t""yes" 1>&6
12622     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12623   cat >> confdefs.h <<EOF
12624 #define $ac_tr_hdr 1
12625 EOF
12626  
12627 else
12628   echo "$ac_t""no" 1>&6
12629 fi
12630 done
12631
12632  echo $ac_n "checking for db""... $ac_c" 1>&6
12633 echo "configure:12634: checking for db" >&5
12634 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12635   echo $ac_n "(cached) $ac_c" 1>&6
12636 else
12637   
12638         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12639                 ol_cv_gdbm=no
12640         else
12641                 ol_cv_gdbm=yes
12642         fi
12643
12644 fi
12645
12646 echo "$ac_t""$ol_cv_gdbm" 1>&6
12647  if test $ol_cv_gdbm = yes ; then
12648         cat >> confdefs.h <<\EOF
12649 #define HAVE_GDBM 1
12650 EOF
12651
12652  fi
12653
12654
12655         if test $ol_cv_gdbm = yes ; then
12656                 ol_link_ldbm=gdbm
12657                 ol_with_ldbm_api=gdbm
12658
12659                 if test $ol_cv_lib_gdbm != yes ; then
12660                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12661                 fi
12662         fi
12663 fi
12664
12665 if test $ol_with_ldbm_api = ndbm ; then
12666         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12667 echo "configure:12668: checking for NDBM library" >&5
12668 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12669   echo $ac_n "(cached) $ac_c" 1>&6
12670 else
12671         ol_LIBS="$LIBS"
12672         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12673 echo "configure:12674: checking for dbm_open" >&5
12674 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12675   echo $ac_n "(cached) $ac_c" 1>&6
12676 else
12677   cat > conftest.$ac_ext <<EOF
12678 #line 12679 "configure"
12679 #include "confdefs.h"
12680 /* System header to define __stub macros and hopefully few prototypes,
12681     which can conflict with char dbm_open(); below.  */
12682 #include <assert.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 char (*f)();
12688
12689 int main() {
12690
12691 /* The GNU C library defines this for functions which it implements
12692     to always fail with ENOSYS.  Some functions are actually named
12693     something starting with __ and the normal name is an alias.  */
12694 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12695 choke me
12696 #else
12697 f = dbm_open;
12698 #endif
12699
12700 ; return 0; }
12701 EOF
12702 if { (eval echo configure:12703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12703   rm -rf conftest*
12704   eval "ac_cv_func_dbm_open=yes"
12705 else
12706   echo "configure: failed program was:" >&5
12707   cat conftest.$ac_ext >&5
12708   rm -rf conftest*
12709   eval "ac_cv_func_dbm_open=no"
12710 fi
12711 rm -f conftest*
12712 fi
12713
12714 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12715   echo "$ac_t""yes" 1>&6
12716   ol_cv_lib_ndbm=yes
12717 else
12718   echo "$ac_t""no" 1>&6
12719
12720                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12721 echo "configure:12722: checking for dbm_open in -lndbm" >&5
12722 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12723 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12724   echo $ac_n "(cached) $ac_c" 1>&6
12725 else
12726   ac_save_LIBS="$LIBS"
12727 LIBS="-lndbm  $LIBS"
12728 cat > conftest.$ac_ext <<EOF
12729 #line 12730 "configure"
12730 #include "confdefs.h"
12731 /* Override any gcc2 internal prototype to avoid an error.  */
12732 /* We use char because int might match the return type of a gcc2
12733     builtin and then its argument prototype would still apply.  */
12734 char dbm_open();
12735
12736 int main() {
12737 dbm_open()
12738 ; return 0; }
12739 EOF
12740 if { (eval echo configure:12741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12741   rm -rf conftest*
12742   eval "ac_cv_lib_$ac_lib_var=yes"
12743 else
12744   echo "configure: failed program was:" >&5
12745   cat conftest.$ac_ext >&5
12746   rm -rf conftest*
12747   eval "ac_cv_lib_$ac_lib_var=no"
12748 fi
12749 rm -f conftest*
12750 LIBS="$ac_save_LIBS"
12751
12752 fi
12753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12754   echo "$ac_t""yes" 1>&6
12755   ol_cv_lib_ndbm=-lndbm
12756 else
12757   echo "$ac_t""no" 1>&6
12758
12759                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12760 echo "configure:12761: checking for dbm_open in -ldbm" >&5
12761 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12762 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12763   echo $ac_n "(cached) $ac_c" 1>&6
12764 else
12765   ac_save_LIBS="$LIBS"
12766 LIBS="-ldbm  $LIBS"
12767 cat > conftest.$ac_ext <<EOF
12768 #line 12769 "configure"
12769 #include "confdefs.h"
12770 /* Override any gcc2 internal prototype to avoid an error.  */
12771 /* We use char because int might match the return type of a gcc2
12772     builtin and then its argument prototype would still apply.  */
12773 char dbm_open();
12774
12775 int main() {
12776 dbm_open()
12777 ; return 0; }
12778 EOF
12779 if { (eval echo configure:12780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12780   rm -rf conftest*
12781   eval "ac_cv_lib_$ac_lib_var=yes"
12782 else
12783   echo "configure: failed program was:" >&5
12784   cat conftest.$ac_ext >&5
12785   rm -rf conftest*
12786   eval "ac_cv_lib_$ac_lib_var=no"
12787 fi
12788 rm -f conftest*
12789 LIBS="$ac_save_LIBS"
12790
12791 fi
12792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12793   echo "$ac_t""yes" 1>&6
12794   ol_cv_lib_ndbm=-ldbm
12795 else
12796   echo "$ac_t""no" 1>&6
12797 ol_cv_lib_ndbm=no
12798 fi
12799                 
12800 fi
12801
12802         
12803 fi
12804
12805         LIBS="$ol_LIBS"
12806
12807 fi
12808
12809 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12810
12811
12812  for ac_hdr in ndbm.h
12813 do
12814 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12815 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12816 echo "configure:12817: checking for $ac_hdr" >&5
12817 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12818   echo $ac_n "(cached) $ac_c" 1>&6
12819 else
12820   cat > conftest.$ac_ext <<EOF
12821 #line 12822 "configure"
12822 #include "confdefs.h"
12823 #include <$ac_hdr>
12824 EOF
12825 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12826 { (eval echo configure:12827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12827 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12828 if test -z "$ac_err"; then
12829   rm -rf conftest*
12830   eval "ac_cv_header_$ac_safe=yes"
12831 else
12832   echo "$ac_err" >&5
12833   echo "configure: failed program was:" >&5
12834   cat conftest.$ac_ext >&5
12835   rm -rf conftest*
12836   eval "ac_cv_header_$ac_safe=no"
12837 fi
12838 rm -f conftest*
12839 fi
12840 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12841   echo "$ac_t""yes" 1>&6
12842     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12843   cat >> confdefs.h <<EOF
12844 #define $ac_tr_hdr 1
12845 EOF
12846  
12847 else
12848   echo "$ac_t""no" 1>&6
12849 fi
12850 done
12851
12852  echo $ac_n "checking for db""... $ac_c" 1>&6
12853 echo "configure:12854: checking for db" >&5
12854 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12855   echo $ac_n "(cached) $ac_c" 1>&6
12856 else
12857   
12858         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12859                 ol_cv_ndbm=no
12860         else
12861                 ol_cv_ndbm=yes
12862         fi
12863
12864 fi
12865
12866 echo "$ac_t""$ol_cv_ndbm" 1>&6
12867  if test $ol_cv_ndbm = yes ; then
12868         cat >> confdefs.h <<\EOF
12869 #define HAVE_NDBM 1
12870 EOF
12871
12872  fi
12873
12874
12875         if test $ol_cv_ndbm = yes ; then
12876                 ol_link_ldbm=ndbm
12877                 ol_with_ldbm_api=ndbm
12878
12879                 if test $ol_cv_lib_ndbm != yes ; then
12880                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12881                 fi
12882         fi
12883 fi
12884
12885 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12886         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12887         if test $ol_enable_ldbm = yes ; then
12888                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12889         fi
12890
12891         echo "configure: warning: disabling LDBM" 1>&2
12892         ol_enable_ldbm=no
12893 fi
12894
12895 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12896         LINK_BINS_DYNAMIC="yes"
12897 else
12898         LINK_BINS_DYNAMIC="no"
12899 fi
12900
12901 if test $ol_enable_wrappers != no ; then
12902         for ac_hdr in tcpd.h
12903 do
12904 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12905 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12906 echo "configure:12907: checking for $ac_hdr" >&5
12907 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12908   echo $ac_n "(cached) $ac_c" 1>&6
12909 else
12910   cat > conftest.$ac_ext <<EOF
12911 #line 12912 "configure"
12912 #include "confdefs.h"
12913 #include <$ac_hdr>
12914 EOF
12915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12916 { (eval echo configure:12917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12918 if test -z "$ac_err"; then
12919   rm -rf conftest*
12920   eval "ac_cv_header_$ac_safe=yes"
12921 else
12922   echo "$ac_err" >&5
12923   echo "configure: failed program was:" >&5
12924   cat conftest.$ac_ext >&5
12925   rm -rf conftest*
12926   eval "ac_cv_header_$ac_safe=no"
12927 fi
12928 rm -f conftest*
12929 fi
12930 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12931   echo "$ac_t""yes" 1>&6
12932     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12933   cat >> confdefs.h <<EOF
12934 #define $ac_tr_hdr 1
12935 EOF
12936  
12937 else
12938   echo "$ac_t""no" 1>&6
12939 fi
12940 done
12941
12942
12943         if test $ac_cv_header_tcpd_h != yes ; then
12944                 have_wrappers=no
12945         else
12946                 cat > conftest.$ac_ext <<EOF
12947 #line 12948 "configure"
12948 #include "confdefs.h"
12949
12950 int allow_severity = 0;
12951 int deny_severity  = 0;
12952                 
12953 int main() {
12954 hosts_access()
12955 ; return 0; }
12956 EOF
12957 if { (eval echo configure:12958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12958   rm -rf conftest*
12959   have_wrappers=yes
12960 else
12961   echo "configure: failed program was:" >&5
12962   cat conftest.$ac_ext >&5
12963   rm -rf conftest*
12964   have_wrappers=no
12965 fi
12966 rm -f conftest*
12967         fi
12968
12969         if test $have_wrappers = yes ; then
12970                 cat >> confdefs.h <<\EOF
12971 #define HAVE_TCPD 1
12972 EOF
12973
12974                 WRAP_LIBS="-lwrap"
12975
12976                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12977 echo "configure:12978: checking for main in -lnsl" >&5
12978 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12979 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12980   echo $ac_n "(cached) $ac_c" 1>&6
12981 else
12982   ac_save_LIBS="$LIBS"
12983 LIBS="-lnsl  $LIBS"
12984 cat > conftest.$ac_ext <<EOF
12985 #line 12986 "configure"
12986 #include "confdefs.h"
12987
12988 int main() {
12989 main()
12990 ; return 0; }
12991 EOF
12992 if { (eval echo configure:12993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12993   rm -rf conftest*
12994   eval "ac_cv_lib_$ac_lib_var=yes"
12995 else
12996   echo "configure: failed program was:" >&5
12997   cat conftest.$ac_ext >&5
12998   rm -rf conftest*
12999   eval "ac_cv_lib_$ac_lib_var=no"
13000 fi
13001 rm -f conftest*
13002 LIBS="$ac_save_LIBS"
13003
13004 fi
13005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13006   echo "$ac_t""yes" 1>&6
13007     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13008     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13009   cat >> confdefs.h <<EOF
13010 #define $ac_tr_lib 1
13011 EOF
13012
13013   LIBS="-lnsl $LIBS"
13014
13015 else
13016   echo "$ac_t""no" 1>&6
13017 fi
13018
13019         else
13020                 echo "configure: warning: could not find -lwrap" 1>&2
13021                 if test $ol_enable_wrappers = yes ; then
13022                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13023                 fi
13024
13025                 echo "configure: warning: disabling wrappers support" 1>&2
13026                 ol_enable_wrappers=no
13027                 WRAP_LIBS=""
13028         fi
13029 fi
13030
13031 if test $ol_enable_syslog != no ; then
13032         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13033 echo "configure:13034: checking for openlog" >&5
13034 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13035   echo $ac_n "(cached) $ac_c" 1>&6
13036 else
13037   cat > conftest.$ac_ext <<EOF
13038 #line 13039 "configure"
13039 #include "confdefs.h"
13040 /* System header to define __stub macros and hopefully few prototypes,
13041     which can conflict with char openlog(); below.  */
13042 #include <assert.h>
13043 /* Override any gcc2 internal prototype to avoid an error.  */
13044 /* We use char because int might match the return type of a gcc2
13045     builtin and then its argument prototype would still apply.  */
13046 char openlog();
13047 char (*f)();
13048
13049 int main() {
13050
13051 /* The GNU C library defines this for functions which it implements
13052     to always fail with ENOSYS.  Some functions are actually named
13053     something starting with __ and the normal name is an alias.  */
13054 #if defined (__stub_openlog) || defined (__stub___openlog)
13055 choke me
13056 #else
13057 f = openlog;
13058 #endif
13059
13060 ; return 0; }
13061 EOF
13062 if { (eval echo configure:13063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13063   rm -rf conftest*
13064   eval "ac_cv_func_openlog=yes"
13065 else
13066   echo "configure: failed program was:" >&5
13067   cat conftest.$ac_ext >&5
13068   rm -rf conftest*
13069   eval "ac_cv_func_openlog=no"
13070 fi
13071 rm -f conftest*
13072 fi
13073
13074 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13075   echo "$ac_t""yes" 1>&6
13076   :
13077 else
13078   echo "$ac_t""no" 1>&6
13079 fi
13080
13081         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13082                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13083         fi
13084         ol_enable_syslog=$ac_cv_func_openlog
13085 fi
13086
13087 if test $ol_enable_dmalloc != no ; then
13088         for ac_hdr in dmalloc.h
13089 do
13090 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13091 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13092 echo "configure:13093: checking for $ac_hdr" >&5
13093 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13094   echo $ac_n "(cached) $ac_c" 1>&6
13095 else
13096   cat > conftest.$ac_ext <<EOF
13097 #line 13098 "configure"
13098 #include "confdefs.h"
13099 #include <$ac_hdr>
13100 EOF
13101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13102 { (eval echo configure:13103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13104 if test -z "$ac_err"; then
13105   rm -rf conftest*
13106   eval "ac_cv_header_$ac_safe=yes"
13107 else
13108   echo "$ac_err" >&5
13109   echo "configure: failed program was:" >&5
13110   cat conftest.$ac_ext >&5
13111   rm -rf conftest*
13112   eval "ac_cv_header_$ac_safe=no"
13113 fi
13114 rm -f conftest*
13115 fi
13116 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13117   echo "$ac_t""yes" 1>&6
13118     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13119   cat >> confdefs.h <<EOF
13120 #define $ac_tr_hdr 1
13121 EOF
13122  
13123 else
13124   echo "$ac_t""no" 1>&6
13125 fi
13126 done
13127
13128         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
13129 echo "configure:13130: checking for dmalloc_shutdown in -ldmalloc" >&5
13130 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
13131 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13132   echo $ac_n "(cached) $ac_c" 1>&6
13133 else
13134   ac_save_LIBS="$LIBS"
13135 LIBS="-ldmalloc  $LIBS"
13136 cat > conftest.$ac_ext <<EOF
13137 #line 13138 "configure"
13138 #include "confdefs.h"
13139 /* Override any gcc2 internal prototype to avoid an error.  */
13140 /* We use char because int might match the return type of a gcc2
13141     builtin and then its argument prototype would still apply.  */
13142 char dmalloc_shutdown();
13143
13144 int main() {
13145 dmalloc_shutdown()
13146 ; return 0; }
13147 EOF
13148 if { (eval echo configure:13149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13149   rm -rf conftest*
13150   eval "ac_cv_lib_$ac_lib_var=yes"
13151 else
13152   echo "configure: failed program was:" >&5
13153   cat conftest.$ac_ext >&5
13154   rm -rf conftest*
13155   eval "ac_cv_lib_$ac_lib_var=no"
13156 fi
13157 rm -f conftest*
13158 LIBS="$ac_save_LIBS"
13159
13160 fi
13161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13162   echo "$ac_t""yes" 1>&6
13163     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13164     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13165   cat >> confdefs.h <<EOF
13166 #define $ac_tr_lib 1
13167 EOF
13168
13169   LIBS="-ldmalloc $LIBS"
13170
13171 else
13172   echo "$ac_t""no" 1>&6
13173 fi
13174
13175 fi
13176
13177 if test $ol_enable_tcl != no ; then
13178         for ac_hdr in tcl.h
13179 do
13180 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13181 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13182 echo "configure:13183: checking for $ac_hdr" >&5
13183 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13184   echo $ac_n "(cached) $ac_c" 1>&6
13185 else
13186   cat > conftest.$ac_ext <<EOF
13187 #line 13188 "configure"
13188 #include "confdefs.h"
13189 #include <$ac_hdr>
13190 EOF
13191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13192 { (eval echo configure:13193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13193 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13194 if test -z "$ac_err"; then
13195   rm -rf conftest*
13196   eval "ac_cv_header_$ac_safe=yes"
13197 else
13198   echo "$ac_err" >&5
13199   echo "configure: failed program was:" >&5
13200   cat conftest.$ac_ext >&5
13201   rm -rf conftest*
13202   eval "ac_cv_header_$ac_safe=no"
13203 fi
13204 rm -f conftest*
13205 fi
13206 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13207   echo "$ac_t""yes" 1>&6
13208     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13209   cat >> confdefs.h <<EOF
13210 #define $ac_tr_hdr 1
13211 EOF
13212  
13213 else
13214   echo "$ac_t""no" 1>&6
13215 fi
13216 done
13217
13218
13219         if test $ac_cv_header_tcl_h != yes ; then
13220                 have_tcl=no
13221         else
13222                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13223                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13224 echo "configure:13225: checking for main in -l$lib" >&5
13225 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13226 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13227   echo $ac_n "(cached) $ac_c" 1>&6
13228 else
13229   ac_save_LIBS="$LIBS"
13230 LIBS="-l$lib  $LIBS"
13231 cat > conftest.$ac_ext <<EOF
13232 #line 13233 "configure"
13233 #include "confdefs.h"
13234
13235 int main() {
13236 main()
13237 ; return 0; }
13238 EOF
13239 if { (eval echo configure:13240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13240   rm -rf conftest*
13241   eval "ac_cv_lib_$ac_lib_var=yes"
13242 else
13243   echo "configure: failed program was:" >&5
13244   cat conftest.$ac_ext >&5
13245   rm -rf conftest*
13246   eval "ac_cv_lib_$ac_lib_var=no"
13247 fi
13248 rm -f conftest*
13249 LIBS="$ac_save_LIBS"
13250
13251 fi
13252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13253   echo "$ac_t""yes" 1>&6
13254   have_tcl=yes
13255                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13256                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13257                            else
13258                                MOD_TCL_LIB="-l${lib}"
13259                            fi;break
13260 else
13261   echo "$ac_t""no" 1>&6
13262 have_tcl=no
13263 fi
13264
13265                 done
13266         fi
13267
13268         if test $have_tcl != yes ; then
13269                 echo "configure: warning: could not find -ltcl" 1>&2
13270                 if test $ol_enable_tcl = yes ; then
13271                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13272                 fi
13273
13274                 ol_enable_tcl=no
13275         fi
13276 fi
13277
13278 ol_link_termcap=no
13279 for ac_hdr in termcap.h ncurses.h
13280 do
13281 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13282 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13283 echo "configure:13284: checking for $ac_hdr" >&5
13284 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13285   echo $ac_n "(cached) $ac_c" 1>&6
13286 else
13287   cat > conftest.$ac_ext <<EOF
13288 #line 13289 "configure"
13289 #include "confdefs.h"
13290 #include <$ac_hdr>
13291 EOF
13292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13293 { (eval echo configure:13294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13295 if test -z "$ac_err"; then
13296   rm -rf conftest*
13297   eval "ac_cv_header_$ac_safe=yes"
13298 else
13299   echo "$ac_err" >&5
13300   echo "configure: failed program was:" >&5
13301   cat conftest.$ac_ext >&5
13302   rm -rf conftest*
13303   eval "ac_cv_header_$ac_safe=no"
13304 fi
13305 rm -f conftest*
13306 fi
13307 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13308   echo "$ac_t""yes" 1>&6
13309     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13310   cat >> confdefs.h <<EOF
13311 #define $ac_tr_hdr 1
13312 EOF
13313  
13314 else
13315   echo "$ac_t""no" 1>&6
13316 fi
13317 done
13318
13319
13320 if test $ol_link_termcap = no ; then
13321         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13322 echo "configure:13323: checking for tputs in -ltermcap" >&5
13323 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13324 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13325   echo $ac_n "(cached) $ac_c" 1>&6
13326 else
13327   ac_save_LIBS="$LIBS"
13328 LIBS="-ltermcap  $LIBS"
13329 cat > conftest.$ac_ext <<EOF
13330 #line 13331 "configure"
13331 #include "confdefs.h"
13332 /* Override any gcc2 internal prototype to avoid an error.  */
13333 /* We use char because int might match the return type of a gcc2
13334     builtin and then its argument prototype would still apply.  */
13335 char tputs();
13336
13337 int main() {
13338 tputs()
13339 ; return 0; }
13340 EOF
13341 if { (eval echo configure:13342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13342   rm -rf conftest*
13343   eval "ac_cv_lib_$ac_lib_var=yes"
13344 else
13345   echo "configure: failed program was:" >&5
13346   cat conftest.$ac_ext >&5
13347   rm -rf conftest*
13348   eval "ac_cv_lib_$ac_lib_var=no"
13349 fi
13350 rm -f conftest*
13351 LIBS="$ac_save_LIBS"
13352
13353 fi
13354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13355   echo "$ac_t""yes" 1>&6
13356   have_termcap=yes
13357 else
13358   echo "$ac_t""no" 1>&6
13359 have_termcap=no
13360 fi
13361
13362         if test $have_termcap = yes ; then
13363                 cat >> confdefs.h <<\EOF
13364 #define HAVE_TERMCAP 1
13365 EOF
13366
13367                 ol_link_termcap=yes
13368                 TERMCAP_LIBS=-ltermcap
13369         fi
13370 fi
13371
13372 if test $ol_link_termcap = no ; then
13373         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13374 echo "configure:13375: checking for initscr in -lncurses" >&5
13375 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13376 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13377   echo $ac_n "(cached) $ac_c" 1>&6
13378 else
13379   ac_save_LIBS="$LIBS"
13380 LIBS="-lncurses  $LIBS"
13381 cat > conftest.$ac_ext <<EOF
13382 #line 13383 "configure"
13383 #include "confdefs.h"
13384 /* Override any gcc2 internal prototype to avoid an error.  */
13385 /* We use char because int might match the return type of a gcc2
13386     builtin and then its argument prototype would still apply.  */
13387 char initscr();
13388
13389 int main() {
13390 initscr()
13391 ; return 0; }
13392 EOF
13393 if { (eval echo configure:13394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13394   rm -rf conftest*
13395   eval "ac_cv_lib_$ac_lib_var=yes"
13396 else
13397   echo "configure: failed program was:" >&5
13398   cat conftest.$ac_ext >&5
13399   rm -rf conftest*
13400   eval "ac_cv_lib_$ac_lib_var=no"
13401 fi
13402 rm -f conftest*
13403 LIBS="$ac_save_LIBS"
13404
13405 fi
13406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13407   echo "$ac_t""yes" 1>&6
13408   have_ncurses=yes
13409 else
13410   echo "$ac_t""no" 1>&6
13411 have_ncurses=no
13412 fi
13413
13414         if test $have_ncurses = yes ; then
13415                 cat >> confdefs.h <<\EOF
13416 #define HAVE_NCURSES 1
13417 EOF
13418
13419                 ol_link_termcap=yes
13420                 TERMCAP_LIBS=-lncurses
13421         fi
13422 fi
13423
13424 if test $ol_link_termcap = no ; then
13425         cat >> confdefs.h <<\EOF
13426 #define NO_TERMCAP 1
13427 EOF
13428
13429         TERMCAP_LIBS=
13430 fi
13431
13432 ol_link_sasl=no
13433 ol_link_spasswd=no
13434 if test $ol_with_cyrus_sasl != no ; then
13435         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13436 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13437 echo "configure:13438: checking for sasl.h" >&5
13438 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13439   echo $ac_n "(cached) $ac_c" 1>&6
13440 else
13441   cat > conftest.$ac_ext <<EOF
13442 #line 13443 "configure"
13443 #include "confdefs.h"
13444 #include <sasl.h>
13445 EOF
13446 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13447 { (eval echo configure:13448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13448 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13449 if test -z "$ac_err"; then
13450   rm -rf conftest*
13451   eval "ac_cv_header_$ac_safe=yes"
13452 else
13453   echo "$ac_err" >&5
13454   echo "configure: failed program was:" >&5
13455   cat conftest.$ac_ext >&5
13456   rm -rf conftest*
13457   eval "ac_cv_header_$ac_safe=no"
13458 fi
13459 rm -f conftest*
13460 fi
13461 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13462   echo "$ac_t""yes" 1>&6
13463   :
13464 else
13465   echo "$ac_t""no" 1>&6
13466 fi
13467
13468
13469         if test $ac_cv_header_sasl_h = yes ; then
13470                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13471 echo "configure:13472: checking for sasl_client_init in -lsasl" >&5
13472 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13473 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13474   echo $ac_n "(cached) $ac_c" 1>&6
13475 else
13476   ac_save_LIBS="$LIBS"
13477 LIBS="-lsasl  $LIBS"
13478 cat > conftest.$ac_ext <<EOF
13479 #line 13480 "configure"
13480 #include "confdefs.h"
13481 /* Override any gcc2 internal prototype to avoid an error.  */
13482 /* We use char because int might match the return type of a gcc2
13483     builtin and then its argument prototype would still apply.  */
13484 char sasl_client_init();
13485
13486 int main() {
13487 sasl_client_init()
13488 ; return 0; }
13489 EOF
13490 if { (eval echo configure:13491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13491   rm -rf conftest*
13492   eval "ac_cv_lib_$ac_lib_var=yes"
13493 else
13494   echo "configure: failed program was:" >&5
13495   cat conftest.$ac_ext >&5
13496   rm -rf conftest*
13497   eval "ac_cv_lib_$ac_lib_var=no"
13498 fi
13499 rm -f conftest*
13500 LIBS="$ac_save_LIBS"
13501
13502 fi
13503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13504   echo "$ac_t""yes" 1>&6
13505   have_cyrus_sasl=yes
13506 else
13507   echo "$ac_t""no" 1>&6
13508 have_cyrus_sasl=no
13509 fi
13510
13511
13512                 if test $have_cyrus_sasl != no ; then
13513                         SASL_LIBS="-lsasl"
13514                         cat >> confdefs.h <<\EOF
13515 #define HAVE_CYRUS_SASL 1
13516 EOF
13517
13518                         ol_link_sasl=yes
13519                 fi
13520         fi
13521
13522         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13523                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13524         fi
13525 fi
13526
13527 if test $cross_compiling != yes ; then
13528         dev=no
13529         if test -r /dev/urandom ; then
13530                 dev="/dev/urandom";
13531         elif test -r /idev/urandom ; then
13532                 dev="/idev/urandom";
13533         elif test -r /dev/srandom ; then
13534                 dev="/dev/srandom";
13535         elif test -r /dev/random ; then
13536                 dev="/dev/random";
13537         elif test -r /idev/random ; then
13538                 dev="/idev/random";
13539         fi
13540
13541         if test $dev != no ; then
13542                 cat >> confdefs.h <<EOF
13543 #define URANDOM_DEVICE "$dev"
13544 EOF
13545
13546         fi
13547 fi
13548
13549 ol_link_fetch=no
13550 if test $ol_with_fetch != no ; then
13551         ol=$LIBS
13552 LIBS="-lfetch -lcom_err $LIBS"
13553 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13554 echo "configure:13555: checking fetch(3) library" >&5
13555 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13556   echo $ac_n "(cached) $ac_c" 1>&6
13557 else
13558   
13559         cat > conftest.$ac_ext <<EOF
13560 #line 13561 "configure"
13561 #include "confdefs.h"
13562
13563 #include <sys/param.h>
13564 #include <stdio.h>
13565 #include <fetch.h>
13566 int main() {
13567 struct url *u = fetchParseURL("file:///"); 
13568 ; return 0; }
13569 EOF
13570 if { (eval echo configure:13571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13571   rm -rf conftest*
13572   ol_cv_lib_fetch=yes
13573 else
13574   echo "configure: failed program was:" >&5
13575   cat conftest.$ac_ext >&5
13576   rm -rf conftest*
13577   ol_cv_lib_fetch=no
13578 fi
13579 rm -f conftest*
13580 fi
13581
13582 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13583 LIBS=$ol_LIBS
13584 if test $ol_cv_lib_fetch != no ; then
13585         ol_link_fetch="-lfetch -lcom_err"
13586         cat >> confdefs.h <<\EOF
13587 #define HAVE_FETCH 1
13588 EOF
13589
13590 fi
13591
13592
13593         if test $ol_cv_lib_fetch != no ; then
13594                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13595                 ol_link_fetch=freebsd
13596
13597         elif test $ol_with_fetch != auto ; then
13598                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13599         fi 
13600 fi
13601
13602 ol_link_readline=no
13603 if test $ol_with_readline != no ; then
13604         for ac_hdr in readline/readline.h readline/history.h
13605 do
13606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13607 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13608 echo "configure:13609: checking for $ac_hdr" >&5
13609 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13610   echo $ac_n "(cached) $ac_c" 1>&6
13611 else
13612   cat > conftest.$ac_ext <<EOF
13613 #line 13614 "configure"
13614 #include "confdefs.h"
13615 #include <$ac_hdr>
13616 EOF
13617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13618 { (eval echo configure:13619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13620 if test -z "$ac_err"; then
13621   rm -rf conftest*
13622   eval "ac_cv_header_$ac_safe=yes"
13623 else
13624   echo "$ac_err" >&5
13625   echo "configure: failed program was:" >&5
13626   cat conftest.$ac_ext >&5
13627   rm -rf conftest*
13628   eval "ac_cv_header_$ac_safe=no"
13629 fi
13630 rm -f conftest*
13631 fi
13632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13633   echo "$ac_t""yes" 1>&6
13634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13635   cat >> confdefs.h <<EOF
13636 #define $ac_tr_hdr 1
13637 EOF
13638  
13639 else
13640   echo "$ac_t""no" 1>&6
13641 fi
13642 done
13643
13644
13645         if test $ac_cv_header_readline_readline_h = yes ; then
13646                 save_LIBS="$LIBS"
13647                 LIBS="$TERMCAP_LIBS $LIBS"
13648                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13649 echo "configure:13650: checking for readline in -lreadline" >&5
13650 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13651 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13652   echo $ac_n "(cached) $ac_c" 1>&6
13653 else
13654   ac_save_LIBS="$LIBS"
13655 LIBS="-lreadline  $LIBS"
13656 cat > conftest.$ac_ext <<EOF
13657 #line 13658 "configure"
13658 #include "confdefs.h"
13659 /* Override any gcc2 internal prototype to avoid an error.  */
13660 /* We use char because int might match the return type of a gcc2
13661     builtin and then its argument prototype would still apply.  */
13662 char readline();
13663
13664 int main() {
13665 readline()
13666 ; return 0; }
13667 EOF
13668 if { (eval echo configure:13669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13669   rm -rf conftest*
13670   eval "ac_cv_lib_$ac_lib_var=yes"
13671 else
13672   echo "configure: failed program was:" >&5
13673   cat conftest.$ac_ext >&5
13674   rm -rf conftest*
13675   eval "ac_cv_lib_$ac_lib_var=no"
13676 fi
13677 rm -f conftest*
13678 LIBS="$ac_save_LIBS"
13679
13680 fi
13681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13682   echo "$ac_t""yes" 1>&6
13683   have_readline=yes
13684 else
13685   echo "$ac_t""no" 1>&6
13686 have_readline=no
13687 fi
13688
13689                 LIBS="$save_LIBS"
13690                         
13691                 if test $have_readline = yes ; then
13692                         ol_with_readline=found
13693                         ol_link_readline=yes
13694
13695                         READLINE_LIBS="-lreadline"
13696                 fi
13697         fi
13698 fi
13699
13700 if test $ol_link_readline = yes ; then
13701         cat >> confdefs.h <<\EOF
13702 #define HAVE_READLINE 1
13703 EOF
13704
13705 fi
13706
13707
13708 if test $ol_enable_crypt != no ; then
13709         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13710 echo "configure:13711: checking for crypt" >&5
13711 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13712   echo $ac_n "(cached) $ac_c" 1>&6
13713 else
13714   cat > conftest.$ac_ext <<EOF
13715 #line 13716 "configure"
13716 #include "confdefs.h"
13717 /* System header to define __stub macros and hopefully few prototypes,
13718     which can conflict with char crypt(); below.  */
13719 #include <assert.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 char (*f)();
13725
13726 int main() {
13727
13728 /* The GNU C library defines this for functions which it implements
13729     to always fail with ENOSYS.  Some functions are actually named
13730     something starting with __ and the normal name is an alias.  */
13731 #if defined (__stub_crypt) || defined (__stub___crypt)
13732 choke me
13733 #else
13734 f = crypt;
13735 #endif
13736
13737 ; return 0; }
13738 EOF
13739 if { (eval echo configure:13740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13740   rm -rf conftest*
13741   eval "ac_cv_func_crypt=yes"
13742 else
13743   echo "configure: failed program was:" >&5
13744   cat conftest.$ac_ext >&5
13745   rm -rf conftest*
13746   eval "ac_cv_func_crypt=no"
13747 fi
13748 rm -f conftest*
13749 fi
13750
13751 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13752   echo "$ac_t""yes" 1>&6
13753   have_crypt=yes
13754 else
13755   echo "$ac_t""no" 1>&6
13756
13757                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13758 echo "configure:13759: checking for crypt in -lcrypt" >&5
13759 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13760 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13761   echo $ac_n "(cached) $ac_c" 1>&6
13762 else
13763   ac_save_LIBS="$LIBS"
13764 LIBS="-lcrypt  $LIBS"
13765 cat > conftest.$ac_ext <<EOF
13766 #line 13767 "configure"
13767 #include "confdefs.h"
13768 /* Override any gcc2 internal prototype to avoid an error.  */
13769 /* We use char because int might match the return type of a gcc2
13770     builtin and then its argument prototype would still apply.  */
13771 char crypt();
13772
13773 int main() {
13774 crypt()
13775 ; return 0; }
13776 EOF
13777 if { (eval echo configure:13778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13778   rm -rf conftest*
13779   eval "ac_cv_lib_$ac_lib_var=yes"
13780 else
13781   echo "configure: failed program was:" >&5
13782   cat conftest.$ac_ext >&5
13783   rm -rf conftest*
13784   eval "ac_cv_lib_$ac_lib_var=no"
13785 fi
13786 rm -f conftest*
13787 LIBS="$ac_save_LIBS"
13788
13789 fi
13790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13791   echo "$ac_t""yes" 1>&6
13792   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13793                         have_crypt=yes
13794 else
13795   echo "$ac_t""no" 1>&6
13796 have_crypt=no
13797 fi
13798
13799 fi
13800
13801
13802         if test $have_crypt = yes ; then
13803                 cat >> confdefs.h <<\EOF
13804 #define HAVE_CRYPT 1
13805 EOF
13806
13807         else
13808                 echo "configure: warning: could not find crypt" 1>&2
13809                 if test $ol_enable_crypt = yes ; then
13810                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13811                 fi
13812
13813                 echo "configure: warning: disabling crypt support" 1>&2
13814                 ol_enable_crypt=no
13815         fi
13816 fi
13817
13818 if test $ol_enable_proctitle != no ; then
13819         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13820 echo "configure:13821: checking for setproctitle" >&5
13821 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13822   echo $ac_n "(cached) $ac_c" 1>&6
13823 else
13824   cat > conftest.$ac_ext <<EOF
13825 #line 13826 "configure"
13826 #include "confdefs.h"
13827 /* System header to define __stub macros and hopefully few prototypes,
13828     which can conflict with char setproctitle(); below.  */
13829 #include <assert.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 char (*f)();
13835
13836 int main() {
13837
13838 /* The GNU C library defines this for functions which it implements
13839     to always fail with ENOSYS.  Some functions are actually named
13840     something starting with __ and the normal name is an alias.  */
13841 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13842 choke me
13843 #else
13844 f = setproctitle;
13845 #endif
13846
13847 ; return 0; }
13848 EOF
13849 if { (eval echo configure:13850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13850   rm -rf conftest*
13851   eval "ac_cv_func_setproctitle=yes"
13852 else
13853   echo "configure: failed program was:" >&5
13854   cat conftest.$ac_ext >&5
13855   rm -rf conftest*
13856   eval "ac_cv_func_setproctitle=no"
13857 fi
13858 rm -f conftest*
13859 fi
13860
13861 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13862   echo "$ac_t""yes" 1>&6
13863   have_setproctitle=yes
13864 else
13865   echo "$ac_t""no" 1>&6
13866
13867                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13868 echo "configure:13869: checking for setproctitle in -lutil" >&5
13869 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13870 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13871   echo $ac_n "(cached) $ac_c" 1>&6
13872 else
13873   ac_save_LIBS="$LIBS"
13874 LIBS="-lutil  $LIBS"
13875 cat > conftest.$ac_ext <<EOF
13876 #line 13877 "configure"
13877 #include "confdefs.h"
13878 /* Override any gcc2 internal prototype to avoid an error.  */
13879 /* We use char because int might match the return type of a gcc2
13880     builtin and then its argument prototype would still apply.  */
13881 char setproctitle();
13882
13883 int main() {
13884 setproctitle()
13885 ; return 0; }
13886 EOF
13887 if { (eval echo configure:13888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13888   rm -rf conftest*
13889   eval "ac_cv_lib_$ac_lib_var=yes"
13890 else
13891   echo "configure: failed program was:" >&5
13892   cat conftest.$ac_ext >&5
13893   rm -rf conftest*
13894   eval "ac_cv_lib_$ac_lib_var=no"
13895 fi
13896 rm -f conftest*
13897 LIBS="$ac_save_LIBS"
13898
13899 fi
13900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13901   echo "$ac_t""yes" 1>&6
13902   have_setproctitle=yes
13903                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13904 else
13905   echo "$ac_t""no" 1>&6
13906 have_setproctitle=no
13907                         LIBOBJS="$LIBOBJS setproctitle.o"
13908                         LIBSRCS="$LIBSRCS setproctitle.c"
13909 fi
13910
13911 fi
13912
13913
13914         if test $have_setproctitle = yes ; then
13915                 cat >> confdefs.h <<\EOF
13916 #define HAVE_SETPROCTITLE 1
13917 EOF
13918
13919         fi
13920 fi
13921
13922 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13923 echo "configure:13924: checking for ANSI C header files" >&5
13924 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13925   echo $ac_n "(cached) $ac_c" 1>&6
13926 else
13927   cat > conftest.$ac_ext <<EOF
13928 #line 13929 "configure"
13929 #include "confdefs.h"
13930 #include <stdlib.h>
13931 #include <stdarg.h>
13932 #include <string.h>
13933 #include <float.h>
13934 EOF
13935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13936 { (eval echo configure:13937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13938 if test -z "$ac_err"; then
13939   rm -rf conftest*
13940   ac_cv_header_stdc=yes
13941 else
13942   echo "$ac_err" >&5
13943   echo "configure: failed program was:" >&5
13944   cat conftest.$ac_ext >&5
13945   rm -rf conftest*
13946   ac_cv_header_stdc=no
13947 fi
13948 rm -f conftest*
13949
13950 if test $ac_cv_header_stdc = yes; then
13951   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13952 cat > conftest.$ac_ext <<EOF
13953 #line 13954 "configure"
13954 #include "confdefs.h"
13955 #include <string.h>
13956 EOF
13957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13958   egrep "memchr" >/dev/null 2>&1; then
13959   :
13960 else
13961   rm -rf conftest*
13962   ac_cv_header_stdc=no
13963 fi
13964 rm -f conftest*
13965
13966 fi
13967
13968 if test $ac_cv_header_stdc = yes; then
13969   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13970 cat > conftest.$ac_ext <<EOF
13971 #line 13972 "configure"
13972 #include "confdefs.h"
13973 #include <stdlib.h>
13974 EOF
13975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13976   egrep "free" >/dev/null 2>&1; then
13977   :
13978 else
13979   rm -rf conftest*
13980   ac_cv_header_stdc=no
13981 fi
13982 rm -f conftest*
13983
13984 fi
13985
13986 if test $ac_cv_header_stdc = yes; then
13987   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13988 if test "$cross_compiling" = yes; then
13989   :
13990 else
13991   cat > conftest.$ac_ext <<EOF
13992 #line 13993 "configure"
13993 #include "confdefs.h"
13994 #include <ctype.h>
13995 #if ((' ' & 0x0FF) == 0x020)
13996 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13997 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13998 #else
13999 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14000  || ('j' <= (c) && (c) <= 'r') \
14001  || ('s' <= (c) && (c) <= 'z'))
14002 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14003 #endif
14004 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14005 int main () { int i; for (i = 0; i < 256; i++)
14006 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14007 exit (0); }
14008
14009 EOF
14010 if { (eval echo configure:14011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14011 then
14012   :
14013 else
14014   echo "configure: failed program was:" >&5
14015   cat conftest.$ac_ext >&5
14016   rm -fr conftest*
14017   ac_cv_header_stdc=no
14018 fi
14019 rm -fr conftest*
14020 fi
14021
14022 fi
14023 fi
14024
14025 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14026 if test $ac_cv_header_stdc = yes; then
14027   cat >> confdefs.h <<\EOF
14028 #define STDC_HEADERS 1
14029 EOF
14030
14031 fi
14032
14033 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14034 echo "configure:14035: checking for mode_t" >&5
14035 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14036   echo $ac_n "(cached) $ac_c" 1>&6
14037 else
14038   cat > conftest.$ac_ext <<EOF
14039 #line 14040 "configure"
14040 #include "confdefs.h"
14041 #include <sys/types.h>
14042 #if STDC_HEADERS
14043 #include <stdlib.h>
14044 #include <stddef.h>
14045 #endif
14046
14047 EOF
14048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14049   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14050   rm -rf conftest*
14051   eval "ac_cv_type_mode_t=yes"
14052 else
14053   rm -rf conftest*
14054   eval "ac_cv_type_mode_t=no"
14055 fi
14056 rm -f conftest*
14057
14058 fi
14059 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14060   echo "$ac_t""yes" 1>&6
14061 else
14062   echo "$ac_t""no" 1>&6
14063   cat >> confdefs.h <<EOF
14064 #define mode_t int
14065 EOF
14066
14067 fi
14068
14069 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14070 echo "configure:14071: checking for off_t" >&5
14071 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14072   echo $ac_n "(cached) $ac_c" 1>&6
14073 else
14074   cat > conftest.$ac_ext <<EOF
14075 #line 14076 "configure"
14076 #include "confdefs.h"
14077 #include <sys/types.h>
14078 #if STDC_HEADERS
14079 #include <stdlib.h>
14080 #include <stddef.h>
14081 #endif
14082
14083 EOF
14084 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14085   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14086   rm -rf conftest*
14087   eval "ac_cv_type_off_t=yes"
14088 else
14089   rm -rf conftest*
14090   eval "ac_cv_type_off_t=no"
14091 fi
14092 rm -f conftest*
14093
14094 fi
14095 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14096   echo "$ac_t""yes" 1>&6
14097 else
14098   echo "$ac_t""no" 1>&6
14099   cat >> confdefs.h <<EOF
14100 #define off_t long
14101 EOF
14102
14103 fi
14104
14105 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14106 echo "configure:14107: checking for pid_t" >&5
14107 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14108   echo $ac_n "(cached) $ac_c" 1>&6
14109 else
14110   cat > conftest.$ac_ext <<EOF
14111 #line 14112 "configure"
14112 #include "confdefs.h"
14113 #include <sys/types.h>
14114 #if STDC_HEADERS
14115 #include <stdlib.h>
14116 #include <stddef.h>
14117 #endif
14118
14119 EOF
14120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14121   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14122   rm -rf conftest*
14123   eval "ac_cv_type_pid_t=yes"
14124 else
14125   rm -rf conftest*
14126   eval "ac_cv_type_pid_t=no"
14127 fi
14128 rm -f conftest*
14129
14130 fi
14131 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14132   echo "$ac_t""yes" 1>&6
14133 else
14134   echo "$ac_t""no" 1>&6
14135   cat >> confdefs.h <<EOF
14136 #define pid_t int
14137 EOF
14138
14139 fi
14140
14141 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14142 echo "configure:14143: checking for ptrdiff_t" >&5
14143 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14144   echo $ac_n "(cached) $ac_c" 1>&6
14145 else
14146   cat > conftest.$ac_ext <<EOF
14147 #line 14148 "configure"
14148 #include "confdefs.h"
14149 #include <stddef.h>
14150 int main() {
14151 ptrdiff_t p
14152 ; return 0; }
14153 EOF
14154 if { (eval echo configure:14155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14155   rm -rf conftest*
14156   am_cv_type_ptrdiff_t=yes
14157 else
14158   echo "configure: failed program was:" >&5
14159   cat conftest.$ac_ext >&5
14160   rm -rf conftest*
14161   am_cv_type_ptrdiff_t=no
14162 fi
14163 rm -f conftest*
14164 fi
14165
14166 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14167    if test $am_cv_type_ptrdiff_t = yes; then
14168      cat >> confdefs.h <<\EOF
14169 #define HAVE_PTRDIFF_T 1
14170 EOF
14171
14172    fi
14173
14174 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14175 echo "configure:14176: checking return type of signal handlers" >&5
14176 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14177   echo $ac_n "(cached) $ac_c" 1>&6
14178 else
14179   cat > conftest.$ac_ext <<EOF
14180 #line 14181 "configure"
14181 #include "confdefs.h"
14182 #include <sys/types.h>
14183 #include <signal.h>
14184 #ifdef signal
14185 #undef signal
14186 #endif
14187 #ifdef __cplusplus
14188 extern "C" void (*signal (int, void (*)(int)))(int);
14189 #else
14190 void (*signal ()) ();
14191 #endif
14192
14193 int main() {
14194 int i;
14195 ; return 0; }
14196 EOF
14197 if { (eval echo configure:14198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14198   rm -rf conftest*
14199   ac_cv_type_signal=void
14200 else
14201   echo "configure: failed program was:" >&5
14202   cat conftest.$ac_ext >&5
14203   rm -rf conftest*
14204   ac_cv_type_signal=int
14205 fi
14206 rm -f conftest*
14207 fi
14208
14209 echo "$ac_t""$ac_cv_type_signal" 1>&6
14210 cat >> confdefs.h <<EOF
14211 #define RETSIGTYPE $ac_cv_type_signal
14212 EOF
14213
14214
14215 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14216 echo "configure:14217: checking for size_t" >&5
14217 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14218   echo $ac_n "(cached) $ac_c" 1>&6
14219 else
14220   cat > conftest.$ac_ext <<EOF
14221 #line 14222 "configure"
14222 #include "confdefs.h"
14223 #include <sys/types.h>
14224 #if STDC_HEADERS
14225 #include <stdlib.h>
14226 #include <stddef.h>
14227 #endif
14228
14229 EOF
14230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14231   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14232   rm -rf conftest*
14233   eval "ac_cv_type_size_t=yes"
14234 else
14235   rm -rf conftest*
14236   eval "ac_cv_type_size_t=no"
14237 fi
14238 rm -f conftest*
14239
14240 fi
14241 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14242   echo "$ac_t""yes" 1>&6
14243 else
14244   echo "$ac_t""no" 1>&6
14245   cat >> confdefs.h <<EOF
14246 #define size_t unsigned
14247 EOF
14248
14249 fi
14250
14251
14252 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14253 echo "configure:14254: checking for ssize_t" >&5
14254 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14255   echo $ac_n "(cached) $ac_c" 1>&6
14256 else
14257   cat > conftest.$ac_ext <<EOF
14258 #line 14259 "configure"
14259 #include "confdefs.h"
14260 #include <sys/types.h>
14261 #if STDC_HEADERS
14262 #include <stdlib.h>
14263 #include <stddef.h>
14264 #endif
14265
14266 EOF
14267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14268   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14269   rm -rf conftest*
14270   eval "ac_cv_type_ssize_t=yes"
14271 else
14272   rm -rf conftest*
14273   eval "ac_cv_type_ssize_t=no"
14274 fi
14275 rm -f conftest*
14276
14277 fi
14278 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14279   echo "$ac_t""yes" 1>&6
14280 else
14281   echo "$ac_t""no" 1>&6
14282   cat >> confdefs.h <<EOF
14283 #define ssize_t signed int
14284 EOF
14285
14286 fi
14287
14288 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14289 echo "configure:14290: checking for caddr_t" >&5
14290 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14291   echo $ac_n "(cached) $ac_c" 1>&6
14292 else
14293   cat > conftest.$ac_ext <<EOF
14294 #line 14295 "configure"
14295 #include "confdefs.h"
14296 #include <sys/types.h>
14297 #if STDC_HEADERS
14298 #include <stdlib.h>
14299 #include <stddef.h>
14300 #endif
14301
14302 EOF
14303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14304   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14305   rm -rf conftest*
14306   eval "ac_cv_type_caddr_t=yes"
14307 else
14308   rm -rf conftest*
14309   eval "ac_cv_type_caddr_t=no"
14310 fi
14311 rm -f conftest*
14312
14313 fi
14314 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14315   echo "$ac_t""yes" 1>&6
14316 else
14317   echo "$ac_t""no" 1>&6
14318   cat >> confdefs.h <<EOF
14319 #define caddr_t char *
14320 EOF
14321
14322 fi
14323
14324
14325 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14326 echo "configure:14327: checking for socklen_t" >&5
14327 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14328   echo $ac_n "(cached) $ac_c" 1>&6
14329 else
14330   cat > conftest.$ac_ext <<EOF
14331 #line 14332 "configure"
14332 #include "confdefs.h"
14333
14334 #ifdef HAVE_SYS_TYPES_H
14335 #include <sys/types.h>
14336 #endif
14337 #ifdef HAVE_SYS_SOCKET_H
14338 #include <sys/socket.h>
14339 #endif
14340
14341 int main() {
14342 socklen_t len;
14343 ; return 0; }
14344 EOF
14345 if { (eval echo configure:14346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14346   rm -rf conftest*
14347   ol_cv_type_socklen_t=yes
14348 else
14349   echo "configure: failed program was:" >&5
14350   cat conftest.$ac_ext >&5
14351   rm -rf conftest*
14352   ol_cv_type_socklen_t=no
14353 fi
14354 rm -f conftest*
14355 fi
14356
14357 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14358   if test $ol_cv_type_socklen_t = no; then
14359     cat >> confdefs.h <<\EOF
14360 #define socklen_t int
14361 EOF
14362
14363   fi
14364  
14365 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14366 echo "configure:14367: checking for member st_blksize in aggregate type struct stat" >&5
14367 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14368   echo $ac_n "(cached) $ac_c" 1>&6
14369 else
14370   cat > conftest.$ac_ext <<EOF
14371 #line 14372 "configure"
14372 #include "confdefs.h"
14373 #include <sys/types.h>
14374 #include <sys/stat.h>
14375 int main() {
14376 struct stat foo; foo.st_blksize;
14377 ; return 0; }
14378 EOF
14379 if { (eval echo configure:14380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14380   rm -rf conftest*
14381   ac_cv_c_struct_member_st_blksize=yes
14382 else
14383   echo "configure: failed program was:" >&5
14384   cat conftest.$ac_ext >&5
14385   rm -rf conftest*
14386   ac_cv_c_struct_member_st_blksize=no
14387 fi
14388 rm -f conftest*
14389 fi
14390
14391 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14392 st_blksize="$ac_cv_c_struct_member_st_blksize"
14393 if test $ac_cv_c_struct_member_st_blksize = yes; then
14394   cat >> confdefs.h <<\EOF
14395 #define HAVE_ST_BLKSIZE 1
14396 EOF
14397
14398 fi
14399
14400 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14401 echo "configure:14402: checking whether time.h and sys/time.h may both be included" >&5
14402 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14403   echo $ac_n "(cached) $ac_c" 1>&6
14404 else
14405   cat > conftest.$ac_ext <<EOF
14406 #line 14407 "configure"
14407 #include "confdefs.h"
14408 #include <sys/types.h>
14409 #include <sys/time.h>
14410 #include <time.h>
14411 int main() {
14412 struct tm *tp;
14413 ; return 0; }
14414 EOF
14415 if { (eval echo configure:14416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14416   rm -rf conftest*
14417   ac_cv_header_time=yes
14418 else
14419   echo "configure: failed program was:" >&5
14420   cat conftest.$ac_ext >&5
14421   rm -rf conftest*
14422   ac_cv_header_time=no
14423 fi
14424 rm -f conftest*
14425 fi
14426
14427 echo "$ac_t""$ac_cv_header_time" 1>&6
14428 if test $ac_cv_header_time = yes; then
14429   cat >> confdefs.h <<\EOF
14430 #define TIME_WITH_SYS_TIME 1
14431 EOF
14432
14433 fi
14434
14435 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14436 echo "configure:14437: checking whether struct tm is in sys/time.h or time.h" >&5
14437 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14438   echo $ac_n "(cached) $ac_c" 1>&6
14439 else
14440   cat > conftest.$ac_ext <<EOF
14441 #line 14442 "configure"
14442 #include "confdefs.h"
14443 #include <sys/types.h>
14444 #include <time.h>
14445 int main() {
14446 struct tm *tp; tp->tm_sec;
14447 ; return 0; }
14448 EOF
14449 if { (eval echo configure:14450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14450   rm -rf conftest*
14451   ac_cv_struct_tm=time.h
14452 else
14453   echo "configure: failed program was:" >&5
14454   cat conftest.$ac_ext >&5
14455   rm -rf conftest*
14456   ac_cv_struct_tm=sys/time.h
14457 fi
14458 rm -f conftest*
14459 fi
14460
14461 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14462 if test $ac_cv_struct_tm = sys/time.h; then
14463   cat >> confdefs.h <<\EOF
14464 #define TM_IN_SYS_TIME 1
14465 EOF
14466
14467 fi
14468
14469 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14470 echo "configure:14471: checking for uid_t in sys/types.h" >&5
14471 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14472   echo $ac_n "(cached) $ac_c" 1>&6
14473 else
14474   cat > conftest.$ac_ext <<EOF
14475 #line 14476 "configure"
14476 #include "confdefs.h"
14477 #include <sys/types.h>
14478 EOF
14479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14480   egrep "uid_t" >/dev/null 2>&1; then
14481   rm -rf conftest*
14482   ac_cv_type_uid_t=yes
14483 else
14484   rm -rf conftest*
14485   ac_cv_type_uid_t=no
14486 fi
14487 rm -f conftest*
14488
14489 fi
14490
14491 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14492 if test $ac_cv_type_uid_t = no; then
14493   cat >> confdefs.h <<\EOF
14494 #define uid_t int
14495 EOF
14496
14497   cat >> confdefs.h <<\EOF
14498 #define gid_t int
14499 EOF
14500
14501 fi
14502
14503 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14504 echo "configure:14505: checking for sig_atomic_t" >&5
14505 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14506   echo $ac_n "(cached) $ac_c" 1>&6
14507 else
14508   cat > conftest.$ac_ext <<EOF
14509 #line 14510 "configure"
14510 #include "confdefs.h"
14511 #include <signal.h>
14512 int main() {
14513 sig_atomic_t atomic;
14514 ; return 0; }
14515 EOF
14516 if { (eval echo configure:14517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14517   rm -rf conftest*
14518   ol_cv_type_sig_atomic_t=yes
14519 else
14520   echo "configure: failed program was:" >&5
14521   cat conftest.$ac_ext >&5
14522   rm -rf conftest*
14523   ol_cv_type_sig_atomic_t=no
14524 fi
14525 rm -f conftest*
14526 fi
14527
14528 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14529   if test $ol_cv_type_sig_atomic_t = no; then
14530     cat >> confdefs.h <<\EOF
14531 #define sig_atomic_t int
14532 EOF
14533
14534   fi
14535  
14536
14537
14538 # test for pw_gecos in struct passwd
14539 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14540 echo "configure:14541: checking struct passwd for pw_gecos" >&5
14541 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14542   echo $ac_n "(cached) $ac_c" 1>&6
14543 else
14544   
14545         cat > conftest.$ac_ext <<EOF
14546 #line 14547 "configure"
14547 #include "confdefs.h"
14548 #include <pwd.h>
14549 int main() {
14550
14551         struct passwd pwd;
14552         pwd.pw_gecos = pwd.pw_name;
14553
14554 ; return 0; }
14555 EOF
14556 if { (eval echo configure:14557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14557   rm -rf conftest*
14558   ol_cv_struct_passwd_pw_gecos=yes
14559 else
14560   echo "configure: failed program was:" >&5
14561   cat conftest.$ac_ext >&5
14562   rm -rf conftest*
14563   ol_cv_struct_passwd_pw_gecos=no
14564 fi
14565 rm -f conftest*
14566 fi
14567
14568 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14569 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14570         cat >> confdefs.h <<\EOF
14571 #define HAVE_PW_GECOS 1
14572 EOF
14573
14574 fi
14575
14576 # test for pw_passwd in struct passwd
14577 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14578 echo "configure:14579: checking struct passwd for pw_passwd" >&5
14579 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14580   echo $ac_n "(cached) $ac_c" 1>&6
14581 else
14582   
14583         cat > conftest.$ac_ext <<EOF
14584 #line 14585 "configure"
14585 #include "confdefs.h"
14586 #include <pwd.h>
14587 int main() {
14588
14589         struct passwd pwd;
14590         pwd.pw_passwd = pwd.pw_name;
14591
14592 ; return 0; }
14593 EOF
14594 if { (eval echo configure:14595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14595   rm -rf conftest*
14596   ol_cv_struct_passwd_pw_passwd=yes
14597 else
14598   echo "configure: failed program was:" >&5
14599   cat conftest.$ac_ext >&5
14600   rm -rf conftest*
14601   ol_cv_struct_passwd_pw_passwd=no
14602 fi
14603 rm -f conftest*
14604 fi
14605
14606 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14607 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14608         cat >> confdefs.h <<\EOF
14609 #define HAVE_PW_PASSWD 1
14610 EOF
14611
14612 fi
14613
14614
14615 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14616 echo "configure:14617: checking if toupper() requires islower()" >&5
14617 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14618   echo $ac_n "(cached) $ac_c" 1>&6
14619 else
14620   
14621         if test "$cross_compiling" = yes; then
14622   ol_cv_c_upper_lower=safe
14623 else
14624   cat > conftest.$ac_ext <<EOF
14625 #line 14626 "configure"
14626 #include "confdefs.h"
14627
14628 #include <ctype.h>
14629 main()
14630 {
14631         if ('C' == toupper('C'))
14632                 exit(0);
14633         else
14634                 exit(1);
14635 }
14636 EOF
14637 if { (eval echo configure:14638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14638 then
14639   ol_cv_c_upper_lower=no
14640 else
14641   echo "configure: failed program was:" >&5
14642   cat conftest.$ac_ext >&5
14643   rm -fr conftest*
14644   ol_cv_c_upper_lower=yes
14645 fi
14646 rm -fr conftest*
14647 fi
14648
14649 fi
14650
14651 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14652 if test $ol_cv_c_upper_lower != no ; then
14653         cat >> confdefs.h <<\EOF
14654 #define C_UPPER_LOWER 1
14655 EOF
14656
14657 fi
14658
14659 echo $ac_n "checking for working const""... $ac_c" 1>&6
14660 echo "configure:14661: checking for working const" >&5
14661 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14662   echo $ac_n "(cached) $ac_c" 1>&6
14663 else
14664   cat > conftest.$ac_ext <<EOF
14665 #line 14666 "configure"
14666 #include "confdefs.h"
14667
14668 int main() {
14669
14670 /* Ultrix mips cc rejects this.  */
14671 typedef int charset[2]; const charset x;
14672 /* SunOS 4.1.1 cc rejects this.  */
14673 char const *const *ccp;
14674 char **p;
14675 /* NEC SVR4.0.2 mips cc rejects this.  */
14676 struct point {int x, y;};
14677 static struct point const zero = {0,0};
14678 /* AIX XL C 1.02.0.0 rejects this.
14679    It does not let you subtract one const X* pointer from another in an arm
14680    of an if-expression whose if-part is not a constant expression */
14681 const char *g = "string";
14682 ccp = &g + (g ? g-g : 0);
14683 /* HPUX 7.0 cc rejects these. */
14684 ++ccp;
14685 p = (char**) ccp;
14686 ccp = (char const *const *) p;
14687 { /* SCO 3.2v4 cc rejects this.  */
14688   char *t;
14689   char const *s = 0 ? (char *) 0 : (char const *) 0;
14690
14691   *t++ = 0;
14692 }
14693 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14694   int x[] = {25, 17};
14695   const int *foo = &x[0];
14696   ++foo;
14697 }
14698 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14699   typedef const int *iptr;
14700   iptr p = 0;
14701   ++p;
14702 }
14703 { /* AIX XL C 1.02.0.0 rejects this saying
14704      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14705   struct s { int j; const int *ap[3]; };
14706   struct s *b; b->j = 5;
14707 }
14708 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14709   const int foo = 10;
14710 }
14711
14712 ; return 0; }
14713 EOF
14714 if { (eval echo configure:14715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14715   rm -rf conftest*
14716   ac_cv_c_const=yes
14717 else
14718   echo "configure: failed program was:" >&5
14719   cat conftest.$ac_ext >&5
14720   rm -rf conftest*
14721   ac_cv_c_const=no
14722 fi
14723 rm -f conftest*
14724 fi
14725
14726 echo "$ac_t""$ac_cv_c_const" 1>&6
14727 if test $ac_cv_c_const = no; then
14728   cat >> confdefs.h <<\EOF
14729 #define const 
14730 EOF
14731
14732 fi
14733
14734 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14735 echo "configure:14736: checking if compiler understands volatile" >&5
14736 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14737   echo $ac_n "(cached) $ac_c" 1>&6
14738 else
14739   cat > conftest.$ac_ext <<EOF
14740 #line 14741 "configure"
14741 #include "confdefs.h"
14742 int x, y, z;
14743 int main() {
14744 volatile int a; int * volatile b = x ? &y : &z;
14745       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14746       *b = 0;
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   ol_cv_c_volatile=yes
14752 else
14753   echo "configure: failed program was:" >&5
14754   cat conftest.$ac_ext >&5
14755   rm -rf conftest*
14756   ol_cv_c_volatile=no
14757 fi
14758 rm -f conftest*
14759 fi
14760
14761 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14762   if test $ol_cv_c_volatile = yes; then
14763     : 
14764   else
14765     cat >> confdefs.h <<\EOF
14766 #define volatile 
14767 EOF
14768
14769   fi
14770  
14771
14772 if test $cross_compiling = yes ; then
14773         cat >> confdefs.h <<\EOF
14774 #define CROSS_COMPILING 1
14775 EOF
14776
14777 else
14778         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14779 echo "configure:14780: checking whether byte ordering is bigendian" >&5
14780 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14781   echo $ac_n "(cached) $ac_c" 1>&6
14782 else
14783   ac_cv_c_bigendian=unknown
14784 # See if sys/param.h defines the BYTE_ORDER macro.
14785 cat > conftest.$ac_ext <<EOF
14786 #line 14787 "configure"
14787 #include "confdefs.h"
14788 #include <sys/types.h>
14789 #include <sys/param.h>
14790 int main() {
14791
14792 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14793  bogus endian macros
14794 #endif
14795 ; return 0; }
14796 EOF
14797 if { (eval echo configure:14798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14798   rm -rf conftest*
14799   # It does; now see whether it defined to BIG_ENDIAN or not.
14800 cat > conftest.$ac_ext <<EOF
14801 #line 14802 "configure"
14802 #include "confdefs.h"
14803 #include <sys/types.h>
14804 #include <sys/param.h>
14805 int main() {
14806
14807 #if BYTE_ORDER != BIG_ENDIAN
14808  not big endian
14809 #endif
14810 ; return 0; }
14811 EOF
14812 if { (eval echo configure:14813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14813   rm -rf conftest*
14814   ac_cv_c_bigendian=yes
14815 else
14816   echo "configure: failed program was:" >&5
14817   cat conftest.$ac_ext >&5
14818   rm -rf conftest*
14819   ac_cv_c_bigendian=no
14820 fi
14821 rm -f conftest*
14822 else
14823   echo "configure: failed program was:" >&5
14824   cat conftest.$ac_ext >&5
14825 fi
14826 rm -f conftest*
14827 if test $ac_cv_c_bigendian = unknown; then
14828 if test "$cross_compiling" = yes; then
14829     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14830 else
14831   cat > conftest.$ac_ext <<EOF
14832 #line 14833 "configure"
14833 #include "confdefs.h"
14834 main () {
14835   /* Are we little or big endian?  From Harbison&Steele.  */
14836   union
14837   {
14838     long l;
14839     char c[sizeof (long)];
14840   } u;
14841   u.l = 1;
14842   exit (u.c[sizeof (long) - 1] == 1);
14843 }
14844 EOF
14845 if { (eval echo configure:14846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14846 then
14847   ac_cv_c_bigendian=no
14848 else
14849   echo "configure: failed program was:" >&5
14850   cat conftest.$ac_ext >&5
14851   rm -fr conftest*
14852   ac_cv_c_bigendian=yes
14853 fi
14854 rm -fr conftest*
14855 fi
14856
14857 fi
14858 fi
14859
14860 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14861 if test $ac_cv_c_bigendian = yes; then
14862   cat >> confdefs.h <<\EOF
14863 #define WORDS_BIGENDIAN 1
14864 EOF
14865
14866 fi
14867
14868 fi
14869
14870 echo $ac_n "checking size of short""... $ac_c" 1>&6
14871 echo "configure:14872: checking size of short" >&5 
14872 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14873   echo $ac_n "(cached) $ac_c" 1>&6
14874 else
14875   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14876   cat > conftest.$ac_ext <<EOF
14877 #line 14878 "configure"
14878 #include "confdefs.h"
14879 #include "confdefs.h" 
14880 #include <sys/types.h> 
14881  
14882
14883 int main() {
14884 switch (0) case 0: case (sizeof (short) == $ac_size):;
14885 ; return 0; }
14886 EOF
14887 if { (eval echo configure:14888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14888   rm -rf conftest*
14889   ac_cv_sizeof_short=$ac_size
14890 else
14891   echo "configure: failed program was:" >&5
14892   cat conftest.$ac_ext >&5
14893 fi
14894 rm -f conftest* 
14895   if test x$ac_cv_sizeof_short != x ; then break; fi 
14896 done 
14897
14898 fi
14899  
14900 if test x$ac_cv_sizeof_short = x ; then 
14901   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14902 fi 
14903 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14904 cat >> confdefs.h <<EOF
14905 #define SIZEOF_SHORT $ac_cv_sizeof_short
14906 EOF
14907  
14908  
14909 echo $ac_n "checking size of int""... $ac_c" 1>&6
14910 echo "configure:14911: checking size of int" >&5 
14911 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14912   echo $ac_n "(cached) $ac_c" 1>&6
14913 else
14914   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14915   cat > conftest.$ac_ext <<EOF
14916 #line 14917 "configure"
14917 #include "confdefs.h"
14918 #include "confdefs.h" 
14919 #include <sys/types.h> 
14920  
14921
14922 int main() {
14923 switch (0) case 0: case (sizeof (int) == $ac_size):;
14924 ; return 0; }
14925 EOF
14926 if { (eval echo configure:14927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14927   rm -rf conftest*
14928   ac_cv_sizeof_int=$ac_size
14929 else
14930   echo "configure: failed program was:" >&5
14931   cat conftest.$ac_ext >&5
14932 fi
14933 rm -f conftest* 
14934   if test x$ac_cv_sizeof_int != x ; then break; fi 
14935 done 
14936
14937 fi
14938  
14939 if test x$ac_cv_sizeof_int = x ; then 
14940   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14941 fi 
14942 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14943 cat >> confdefs.h <<EOF
14944 #define SIZEOF_INT $ac_cv_sizeof_int
14945 EOF
14946  
14947  
14948 echo $ac_n "checking size of long""... $ac_c" 1>&6
14949 echo "configure:14950: checking size of long" >&5 
14950 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14951   echo $ac_n "(cached) $ac_c" 1>&6
14952 else
14953   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14954   cat > conftest.$ac_ext <<EOF
14955 #line 14956 "configure"
14956 #include "confdefs.h"
14957 #include "confdefs.h" 
14958 #include <sys/types.h> 
14959  
14960
14961 int main() {
14962 switch (0) case 0: case (sizeof (long) == $ac_size):;
14963 ; return 0; }
14964 EOF
14965 if { (eval echo configure:14966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14966   rm -rf conftest*
14967   ac_cv_sizeof_long=$ac_size
14968 else
14969   echo "configure: failed program was:" >&5
14970   cat conftest.$ac_ext >&5
14971 fi
14972 rm -f conftest* 
14973   if test x$ac_cv_sizeof_long != x ; then break; fi 
14974 done 
14975
14976 fi
14977  
14978 if test x$ac_cv_sizeof_long = x ; then 
14979   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14980 fi 
14981 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14982 cat >> confdefs.h <<EOF
14983 #define SIZEOF_LONG $ac_cv_sizeof_long
14984 EOF
14985  
14986
14987
14988 if test "$ac_cv_sizeof_int" -lt 4 ; then
14989         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14990
14991         cat >> confdefs.h <<\EOF
14992 #define LBER_INT_T long
14993 EOF
14994
14995 else
14996         cat >> confdefs.h <<\EOF
14997 #define LBER_INT_T int
14998 EOF
14999
15000 fi
15001
15002 cat >> confdefs.h <<\EOF
15003 #define LBER_LEN_T long
15004 EOF
15005
15006 cat >> confdefs.h <<\EOF
15007 #define LBER_SOCKET_T int
15008 EOF
15009
15010 cat >> confdefs.h <<\EOF
15011 #define LBER_TAG_T long
15012 EOF
15013
15014
15015 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15016 echo "configure:15017: checking for 8-bit clean memcmp" >&5
15017 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15018   echo $ac_n "(cached) $ac_c" 1>&6
15019 else
15020   if test "$cross_compiling" = yes; then
15021   ac_cv_func_memcmp_clean=no
15022 else
15023   cat > conftest.$ac_ext <<EOF
15024 #line 15025 "configure"
15025 #include "confdefs.h"
15026
15027 main()
15028 {
15029   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15030   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15031 }
15032
15033 EOF
15034 if { (eval echo configure:15035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15035 then
15036   ac_cv_func_memcmp_clean=yes
15037 else
15038   echo "configure: failed program was:" >&5
15039   cat conftest.$ac_ext >&5
15040   rm -fr conftest*
15041   ac_cv_func_memcmp_clean=no
15042 fi
15043 rm -fr conftest*
15044 fi
15045
15046 fi
15047
15048 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15049 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15050
15051 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15052 echo "configure:15053: checking for strftime" >&5
15053 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15054   echo $ac_n "(cached) $ac_c" 1>&6
15055 else
15056   cat > conftest.$ac_ext <<EOF
15057 #line 15058 "configure"
15058 #include "confdefs.h"
15059 /* System header to define __stub macros and hopefully few prototypes,
15060     which can conflict with char strftime(); below.  */
15061 #include <assert.h>
15062 /* Override any gcc2 internal prototype to avoid an error.  */
15063 /* We use char because int might match the return type of a gcc2
15064     builtin and then its argument prototype would still apply.  */
15065 char strftime();
15066 char (*f)();
15067
15068 int main() {
15069
15070 /* The GNU C library defines this for functions which it implements
15071     to always fail with ENOSYS.  Some functions are actually named
15072     something starting with __ and the normal name is an alias.  */
15073 #if defined (__stub_strftime) || defined (__stub___strftime)
15074 choke me
15075 #else
15076 f = strftime;
15077 #endif
15078
15079 ; return 0; }
15080 EOF
15081 if { (eval echo configure:15082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15082   rm -rf conftest*
15083   eval "ac_cv_func_strftime=yes"
15084 else
15085   echo "configure: failed program was:" >&5
15086   cat conftest.$ac_ext >&5
15087   rm -rf conftest*
15088   eval "ac_cv_func_strftime=no"
15089 fi
15090 rm -f conftest*
15091 fi
15092
15093 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15094   echo "$ac_t""yes" 1>&6
15095   cat >> confdefs.h <<\EOF
15096 #define HAVE_STRFTIME 1
15097 EOF
15098
15099 else
15100   echo "$ac_t""no" 1>&6
15101 # strftime is in -lintl on SCO UNIX.
15102 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15103 echo "configure:15104: checking for strftime in -lintl" >&5
15104 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15105 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15106   echo $ac_n "(cached) $ac_c" 1>&6
15107 else
15108   ac_save_LIBS="$LIBS"
15109 LIBS="-lintl  $LIBS"
15110 cat > conftest.$ac_ext <<EOF
15111 #line 15112 "configure"
15112 #include "confdefs.h"
15113 /* Override any gcc2 internal prototype to avoid an error.  */
15114 /* We use char because int might match the return type of a gcc2
15115     builtin and then its argument prototype would still apply.  */
15116 char strftime();
15117
15118 int main() {
15119 strftime()
15120 ; return 0; }
15121 EOF
15122 if { (eval echo configure:15123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15123   rm -rf conftest*
15124   eval "ac_cv_lib_$ac_lib_var=yes"
15125 else
15126   echo "configure: failed program was:" >&5
15127   cat conftest.$ac_ext >&5
15128   rm -rf conftest*
15129   eval "ac_cv_lib_$ac_lib_var=no"
15130 fi
15131 rm -f conftest*
15132 LIBS="$ac_save_LIBS"
15133
15134 fi
15135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15136   echo "$ac_t""yes" 1>&6
15137   cat >> confdefs.h <<\EOF
15138 #define HAVE_STRFTIME 1
15139 EOF
15140
15141 LIBS="-lintl $LIBS"
15142 else
15143   echo "$ac_t""no" 1>&6
15144 fi
15145
15146 fi
15147
15148
15149 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15150 echo "configure:15151: checking for inet_aton()" >&5
15151 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15152   echo $ac_n "(cached) $ac_c" 1>&6
15153 else
15154   cat > conftest.$ac_ext <<EOF
15155 #line 15156 "configure"
15156 #include "confdefs.h"
15157
15158 #ifdef HAVE_SYS_TYPES_H
15159 #       include <sys/types.h>
15160 #endif
15161 #ifdef HAVE_SYS_SOCKET_H
15162 #       include <sys/socket.h>
15163 #       ifdef HAVE_SYS_SELECT_H
15164 #               include <sys/select.h>
15165 #       endif
15166 #       include <netinet/in.h>
15167 #       ifdef HAVE_ARPA_INET_H
15168 #               include <arpa/inet.h>
15169 #       endif
15170 #endif
15171
15172 int main() {
15173 struct in_addr in;
15174 int rc = inet_aton( "255.255.255.255", &in );
15175 ; return 0; }
15176 EOF
15177 if { (eval echo configure:15178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15178   rm -rf conftest*
15179   ol_cv_func_inet_aton=yes
15180 else
15181   echo "configure: failed program was:" >&5
15182   cat conftest.$ac_ext >&5
15183   rm -rf conftest*
15184   ol_cv_func_inet_aton=no
15185 fi
15186 rm -f conftest*
15187 fi
15188
15189 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15190   if test $ol_cv_func_inet_aton != no; then
15191     cat >> confdefs.h <<\EOF
15192 #define HAVE_INET_ATON 1
15193 EOF
15194
15195   fi
15196  
15197
15198 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15199 echo "configure:15200: checking for _spawnlp" >&5
15200 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15201   echo $ac_n "(cached) $ac_c" 1>&6
15202 else
15203   cat > conftest.$ac_ext <<EOF
15204 #line 15205 "configure"
15205 #include "confdefs.h"
15206 /* System header to define __stub macros and hopefully few prototypes,
15207     which can conflict with char _spawnlp(); below.  */
15208 #include <assert.h>
15209 /* Override any gcc2 internal prototype to avoid an error.  */
15210 /* We use char because int might match the return type of a gcc2
15211     builtin and then its argument prototype would still apply.  */
15212 char _spawnlp();
15213 char (*f)();
15214
15215 int main() {
15216
15217 /* The GNU C library defines this for functions which it implements
15218     to always fail with ENOSYS.  Some functions are actually named
15219     something starting with __ and the normal name is an alias.  */
15220 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15221 choke me
15222 #else
15223 f = _spawnlp;
15224 #endif
15225
15226 ; return 0; }
15227 EOF
15228 if { (eval echo configure:15229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15229   rm -rf conftest*
15230   eval "ac_cv_func__spawnlp=yes"
15231 else
15232   echo "configure: failed program was:" >&5
15233   cat conftest.$ac_ext >&5
15234   rm -rf conftest*
15235   eval "ac_cv_func__spawnlp=no"
15236 fi
15237 rm -f conftest*
15238 fi
15239
15240 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15241   echo "$ac_t""yes" 1>&6
15242   cat >> confdefs.h <<\EOF
15243 #define HAVE_SPAWNLP 1
15244 EOF
15245
15246 else
15247   echo "$ac_t""no" 1>&6
15248 fi
15249
15250
15251 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15252 echo "configure:15253: checking for _snprintf" >&5
15253 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15254   echo $ac_n "(cached) $ac_c" 1>&6
15255 else
15256   cat > conftest.$ac_ext <<EOF
15257 #line 15258 "configure"
15258 #include "confdefs.h"
15259 /* System header to define __stub macros and hopefully few prototypes,
15260     which can conflict with char _snprintf(); below.  */
15261 #include <assert.h>
15262 /* Override any gcc2 internal prototype to avoid an error.  */
15263 /* We use char because int might match the return type of a gcc2
15264     builtin and then its argument prototype would still apply.  */
15265 char _snprintf();
15266 char (*f)();
15267
15268 int main() {
15269
15270 /* The GNU C library defines this for functions which it implements
15271     to always fail with ENOSYS.  Some functions are actually named
15272     something starting with __ and the normal name is an alias.  */
15273 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15274 choke me
15275 #else
15276 f = _snprintf;
15277 #endif
15278
15279 ; return 0; }
15280 EOF
15281 if { (eval echo configure:15282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15282   rm -rf conftest*
15283   eval "ac_cv_func__snprintf=yes"
15284 else
15285   echo "configure: failed program was:" >&5
15286   cat conftest.$ac_ext >&5
15287   rm -rf conftest*
15288   eval "ac_cv_func__snprintf=no"
15289 fi
15290 rm -f conftest*
15291 fi
15292
15293 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15294   echo "$ac_t""yes" 1>&6
15295   ac_cv_func_snprintf=yes
15296         cat >> confdefs.h <<\EOF
15297 #define snprintf _snprintf
15298 EOF
15299
15300
15301 else
15302   echo "$ac_t""no" 1>&6
15303 fi
15304
15305
15306 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15307 echo "configure:15308: checking for _vsnprintf" >&5
15308 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15309   echo $ac_n "(cached) $ac_c" 1>&6
15310 else
15311   cat > conftest.$ac_ext <<EOF
15312 #line 15313 "configure"
15313 #include "confdefs.h"
15314 /* System header to define __stub macros and hopefully few prototypes,
15315     which can conflict with char _vsnprintf(); below.  */
15316 #include <assert.h>
15317 /* Override any gcc2 internal prototype to avoid an error.  */
15318 /* We use char because int might match the return type of a gcc2
15319     builtin and then its argument prototype would still apply.  */
15320 char _vsnprintf();
15321 char (*f)();
15322
15323 int main() {
15324
15325 /* The GNU C library defines this for functions which it implements
15326     to always fail with ENOSYS.  Some functions are actually named
15327     something starting with __ and the normal name is an alias.  */
15328 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15329 choke me
15330 #else
15331 f = _vsnprintf;
15332 #endif
15333
15334 ; return 0; }
15335 EOF
15336 if { (eval echo configure:15337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15337   rm -rf conftest*
15338   eval "ac_cv_func__vsnprintf=yes"
15339 else
15340   echo "configure: failed program was:" >&5
15341   cat conftest.$ac_ext >&5
15342   rm -rf conftest*
15343   eval "ac_cv_func__vsnprintf=no"
15344 fi
15345 rm -f conftest*
15346 fi
15347
15348 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15349   echo "$ac_t""yes" 1>&6
15350   ac_cv_func_vsnprintf=yes
15351         cat >> confdefs.h <<\EOF
15352 #define vsnprintf _vsnprintf
15353 EOF
15354
15355
15356 else
15357   echo "$ac_t""no" 1>&6
15358 fi
15359
15360
15361 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15362 echo "configure:15363: checking for vprintf" >&5
15363 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15364   echo $ac_n "(cached) $ac_c" 1>&6
15365 else
15366   cat > conftest.$ac_ext <<EOF
15367 #line 15368 "configure"
15368 #include "confdefs.h"
15369 /* System header to define __stub macros and hopefully few prototypes,
15370     which can conflict with char vprintf(); below.  */
15371 #include <assert.h>
15372 /* Override any gcc2 internal prototype to avoid an error.  */
15373 /* We use char because int might match the return type of a gcc2
15374     builtin and then its argument prototype would still apply.  */
15375 char vprintf();
15376 char (*f)();
15377
15378 int main() {
15379
15380 /* The GNU C library defines this for functions which it implements
15381     to always fail with ENOSYS.  Some functions are actually named
15382     something starting with __ and the normal name is an alias.  */
15383 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15384 choke me
15385 #else
15386 f = vprintf;
15387 #endif
15388
15389 ; return 0; }
15390 EOF
15391 if { (eval echo configure:15392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15392   rm -rf conftest*
15393   eval "ac_cv_func_vprintf=yes"
15394 else
15395   echo "configure: failed program was:" >&5
15396   cat conftest.$ac_ext >&5
15397   rm -rf conftest*
15398   eval "ac_cv_func_vprintf=no"
15399 fi
15400 rm -f conftest*
15401 fi
15402
15403 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15404   echo "$ac_t""yes" 1>&6
15405   cat >> confdefs.h <<\EOF
15406 #define HAVE_VPRINTF 1
15407 EOF
15408
15409 else
15410   echo "$ac_t""no" 1>&6
15411 fi
15412
15413 if test "$ac_cv_func_vprintf" != yes; then
15414 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15415 echo "configure:15416: checking for _doprnt" >&5
15416 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15417   echo $ac_n "(cached) $ac_c" 1>&6
15418 else
15419   cat > conftest.$ac_ext <<EOF
15420 #line 15421 "configure"
15421 #include "confdefs.h"
15422 /* System header to define __stub macros and hopefully few prototypes,
15423     which can conflict with char _doprnt(); below.  */
15424 #include <assert.h>
15425 /* Override any gcc2 internal prototype to avoid an error.  */
15426 /* We use char because int might match the return type of a gcc2
15427     builtin and then its argument prototype would still apply.  */
15428 char _doprnt();
15429 char (*f)();
15430
15431 int main() {
15432
15433 /* The GNU C library defines this for functions which it implements
15434     to always fail with ENOSYS.  Some functions are actually named
15435     something starting with __ and the normal name is an alias.  */
15436 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15437 choke me
15438 #else
15439 f = _doprnt;
15440 #endif
15441
15442 ; return 0; }
15443 EOF
15444 if { (eval echo configure:15445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15445   rm -rf conftest*
15446   eval "ac_cv_func__doprnt=yes"
15447 else
15448   echo "configure: failed program was:" >&5
15449   cat conftest.$ac_ext >&5
15450   rm -rf conftest*
15451   eval "ac_cv_func__doprnt=no"
15452 fi
15453 rm -f conftest*
15454 fi
15455
15456 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15457   echo "$ac_t""yes" 1>&6
15458   cat >> confdefs.h <<\EOF
15459 #define HAVE_DOPRNT 1
15460 EOF
15461
15462 else
15463   echo "$ac_t""no" 1>&6
15464 fi
15465
15466 fi
15467
15468
15469 if test $ac_cv_func_vprintf = yes ; then
15470                 for ac_func in vsnprintf vsprintf
15471 do
15472 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15473 echo "configure:15474: checking for $ac_func" >&5
15474 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15475   echo $ac_n "(cached) $ac_c" 1>&6
15476 else
15477   cat > conftest.$ac_ext <<EOF
15478 #line 15479 "configure"
15479 #include "confdefs.h"
15480 /* System header to define __stub macros and hopefully few prototypes,
15481     which can conflict with char $ac_func(); below.  */
15482 #include <assert.h>
15483 /* Override any gcc2 internal prototype to avoid an error.  */
15484 /* We use char because int might match the return type of a gcc2
15485     builtin and then its argument prototype would still apply.  */
15486 char $ac_func();
15487 char (*f)();
15488
15489 int main() {
15490
15491 /* The GNU C library defines this for functions which it implements
15492     to always fail with ENOSYS.  Some functions are actually named
15493     something starting with __ and the normal name is an alias.  */
15494 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15495 choke me
15496 #else
15497 f = $ac_func;
15498 #endif
15499
15500 ; return 0; }
15501 EOF
15502 if { (eval echo configure:15503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15503   rm -rf conftest*
15504   eval "ac_cv_func_$ac_func=yes"
15505 else
15506   echo "configure: failed program was:" >&5
15507   cat conftest.$ac_ext >&5
15508   rm -rf conftest*
15509   eval "ac_cv_func_$ac_func=no"
15510 fi
15511 rm -f conftest*
15512 fi
15513
15514 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15515   echo "$ac_t""yes" 1>&6
15516     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15517   cat >> confdefs.h <<EOF
15518 #define $ac_tr_func 1
15519 EOF
15520  
15521 else
15522   echo "$ac_t""no" 1>&6
15523 fi
15524 done
15525
15526 fi
15527
15528 for ac_func in \
15529         bcopy                   \
15530         closesocket             \
15531         chroot                  \
15532         endgrent                \
15533         endpwent                \
15534         flock                   \
15535         getdtablesize   \
15536         getgrgid                \
15537         gethostname             \
15538         getpass                 \
15539         getpwuid                \
15540         getpwnam                \
15541         getspnam                \
15542         gettimeofday    \
15543         initgroups              \
15544         lockf                   \
15545         memcpy                  \
15546         memmove                 \
15547         mkstemp                 \
15548         pipe                    \
15549         read                    \
15550         recv                    \
15551         recvfrom                \
15552         setpwfile               \
15553         setgid                  \
15554         setegid                 \
15555         setsid                  \
15556         setuid                  \
15557         seteuid                 \
15558         sigaction               \
15559         signal                  \
15560         sigset                  \
15561         snprintf                \
15562         strdup                  \
15563         strerror                \
15564         strpbrk                 \
15565         strrchr                 \
15566         strsep                  \
15567         strstr                  \
15568         strtol                  \
15569         strtoul                 \
15570         strspn                  \
15571         sysconf                 \
15572         waitpid                 \
15573         wait4                   \
15574         write                   \
15575         send                    \
15576         sendto                  \
15577
15578 do
15579 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15580 echo "configure:15581: checking for $ac_func" >&5
15581 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15582   echo $ac_n "(cached) $ac_c" 1>&6
15583 else
15584   cat > conftest.$ac_ext <<EOF
15585 #line 15586 "configure"
15586 #include "confdefs.h"
15587 /* System header to define __stub macros and hopefully few prototypes,
15588     which can conflict with char $ac_func(); below.  */
15589 #include <assert.h>
15590 /* Override any gcc2 internal prototype to avoid an error.  */
15591 /* We use char because int might match the return type of a gcc2
15592     builtin and then its argument prototype would still apply.  */
15593 char $ac_func();
15594 char (*f)();
15595
15596 int main() {
15597
15598 /* The GNU C library defines this for functions which it implements
15599     to always fail with ENOSYS.  Some functions are actually named
15600     something starting with __ and the normal name is an alias.  */
15601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15602 choke me
15603 #else
15604 f = $ac_func;
15605 #endif
15606
15607 ; return 0; }
15608 EOF
15609 if { (eval echo configure:15610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15610   rm -rf conftest*
15611   eval "ac_cv_func_$ac_func=yes"
15612 else
15613   echo "configure: failed program was:" >&5
15614   cat conftest.$ac_ext >&5
15615   rm -rf conftest*
15616   eval "ac_cv_func_$ac_func=no"
15617 fi
15618 rm -f conftest*
15619 fi
15620
15621 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15622   echo "$ac_t""yes" 1>&6
15623     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15624   cat >> confdefs.h <<EOF
15625 #define $ac_tr_func 1
15626 EOF
15627  
15628 else
15629   echo "$ac_t""no" 1>&6
15630 fi
15631 done
15632
15633
15634 for ac_func in getopt tempnam
15635 do
15636 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15637 echo "configure:15638: checking for $ac_func" >&5
15638 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15639   echo $ac_n "(cached) $ac_c" 1>&6
15640 else
15641   cat > conftest.$ac_ext <<EOF
15642 #line 15643 "configure"
15643 #include "confdefs.h"
15644 /* System header to define __stub macros and hopefully few prototypes,
15645     which can conflict with char $ac_func(); below.  */
15646 #include <assert.h>
15647 /* Override any gcc2 internal prototype to avoid an error.  */
15648 /* We use char because int might match the return type of a gcc2
15649     builtin and then its argument prototype would still apply.  */
15650 char $ac_func();
15651 char (*f)();
15652
15653 int main() {
15654
15655 /* The GNU C library defines this for functions which it implements
15656     to always fail with ENOSYS.  Some functions are actually named
15657     something starting with __ and the normal name is an alias.  */
15658 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15659 choke me
15660 #else
15661 f = $ac_func;
15662 #endif
15663
15664 ; return 0; }
15665 EOF
15666 if { (eval echo configure:15667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15667   rm -rf conftest*
15668   eval "ac_cv_func_$ac_func=yes"
15669 else
15670   echo "configure: failed program was:" >&5
15671   cat conftest.$ac_ext >&5
15672   rm -rf conftest*
15673   eval "ac_cv_func_$ac_func=no"
15674 fi
15675 rm -f conftest*
15676 fi
15677
15678 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15679   echo "$ac_t""yes" 1>&6
15680     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15681   cat >> confdefs.h <<EOF
15682 #define $ac_tr_func 1
15683 EOF
15684  
15685 else
15686   echo "$ac_t""no" 1>&6
15687 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15688 fi
15689 done
15690
15691
15692
15693 if test "$ac_cv_func_getopt" != yes; then
15694     LIBSRCS="$LIBSRCS getopt.c"
15695 fi
15696
15697 if test "$ac_cv_func_tempnam" != yes; then
15698     LIBSRCS="$LIBSRCS tempnam.c"
15699 fi
15700
15701 # Check Configuration
15702 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15703 echo "configure:15704: checking declaration of sys_errlist" >&5
15704 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15705   echo $ac_n "(cached) $ac_c" 1>&6
15706 else
15707   
15708         cat > conftest.$ac_ext <<EOF
15709 #line 15710 "configure"
15710 #include "confdefs.h"
15711
15712 #include <stdio.h>
15713 #include <sys/types.h>
15714 #include <errno.h>
15715 #ifdef WINNT
15716 #include <stdlib.h>
15717 #endif 
15718 int main() {
15719 char *c = (char *) *sys_errlist
15720 ; return 0; }
15721 EOF
15722 if { (eval echo configure:15723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15723   rm -rf conftest*
15724   ol_cv_dcl_sys_errlist=yes
15725         ol_cv_have_sys_errlist=yes
15726 else
15727   echo "configure: failed program was:" >&5
15728   cat conftest.$ac_ext >&5
15729   rm -rf conftest*
15730   ol_cv_dcl_sys_errlist=no
15731 fi
15732 rm -f conftest*
15733 fi
15734
15735 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15736 #
15737 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15738 if test $ol_cv_dcl_sys_errlist = no ; then
15739         cat >> confdefs.h <<\EOF
15740 #define DECL_SYS_ERRLIST 1
15741 EOF
15742
15743
15744         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15745 echo "configure:15746: checking existence of sys_errlist" >&5
15746 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15747   echo $ac_n "(cached) $ac_c" 1>&6
15748 else
15749   
15750                 cat > conftest.$ac_ext <<EOF
15751 #line 15752 "configure"
15752 #include "confdefs.h"
15753 #include <errno.h>
15754 int main() {
15755 char *c = (char *) *sys_errlist
15756 ; return 0; }
15757 EOF
15758 if { (eval echo configure:15759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15759   rm -rf conftest*
15760   ol_cv_have_sys_errlist=yes
15761 else
15762   echo "configure: failed program was:" >&5
15763   cat conftest.$ac_ext >&5
15764   rm -rf conftest*
15765   ol_cv_have_sys_errlist=no
15766 fi
15767 rm -f conftest*
15768 fi
15769
15770 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15771 fi
15772 if test $ol_cv_have_sys_errlist = yes ; then
15773         cat >> confdefs.h <<\EOF
15774 #define HAVE_SYS_ERRLIST 1
15775 EOF
15776
15777 fi
15778
15779
15780
15781 if test "$ol_enable_debug" != no ; then
15782         cat >> confdefs.h <<\EOF
15783 #define LDAP_DEBUG 1
15784 EOF
15785
15786 fi
15787 if test "$ol_enable_syslog" = yes ; then
15788         cat >> confdefs.h <<\EOF
15789 #define LDAP_SYSLOG 1
15790 EOF
15791
15792 fi
15793 if test "$ol_enable_libui" = yes ; then
15794         cat >> confdefs.h <<\EOF
15795 #define LDAP_LIBUI 1
15796 EOF
15797
15798 fi
15799 if test "$ol_enable_cache" = no ; then
15800         cat >> confdefs.h <<\EOF
15801 #define LDAP_NOCACHE 1
15802 EOF
15803
15804 fi
15805 if test "$ol_link_kbind" != no ; then
15806         cat >> confdefs.h <<\EOF
15807 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15808 EOF
15809
15810 fi
15811 if test "$ol_enable_dns" != no ; then
15812         cat >> confdefs.h <<\EOF
15813 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
15814 EOF
15815
15816 fi
15817 if test "$ol_enable_proctitle" != no ; then
15818         cat >> confdefs.h <<\EOF
15819 #define LDAP_PROCTITLE 1
15820 EOF
15821
15822 fi
15823 if test "$ol_enable_referrals" != no ; then
15824         cat >> confdefs.h <<\EOF
15825 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15826 EOF
15827
15828 fi
15829 if test "$ol_enable_cldap" != no ; then
15830         cat >> confdefs.h <<\EOF
15831 #define LDAP_CONNECTIONLESS 1
15832 EOF
15833
15834 fi
15835 if test "$ol_enable_ldapi" != no; then
15836         cat >> confdefs.h <<\EOF
15837 #define USE_PF_LOCAL 1
15838 EOF
15839
15840 fi
15841
15842 if test "$ol_enable_cleartext" != no ; then
15843         cat >> confdefs.h <<\EOF
15844 #define SLAPD_CLEARTEXT 1
15845 EOF
15846
15847 fi
15848 if test "$ol_enable_crypt" != no ; then
15849         cat >> confdefs.h <<\EOF
15850 #define SLAPD_CRYPT 1
15851 EOF
15852
15853 fi
15854 if test "$ol_link_kpasswd" != no ; then
15855         cat >> confdefs.h <<\EOF
15856 #define SLAPD_KPASSWD 1
15857 EOF
15858
15859 fi
15860 if test "$ol_link_spasswd" != no ; then
15861         cat >> confdefs.h <<\EOF
15862 #define SLAPD_SPASSWD 1
15863 EOF
15864
15865 fi
15866 if test "$ol_enable_multimaster" != no ; then
15867         cat >> confdefs.h <<\EOF
15868 #define SLAPD_MULTIMASTER 1
15869 EOF
15870
15871 fi
15872 if test "$ol_enable_phonetic" != no ; then
15873         cat >> confdefs.h <<\EOF
15874 #define SLAPD_PHONETIC 1
15875 EOF
15876
15877 fi
15878 if test "$ol_enable_rlookups" != no ; then
15879         cat >> confdefs.h <<\EOF
15880 #define SLAPD_RLOOKUPS 1
15881 EOF
15882
15883 fi
15884 if test "$ol_enable_aci" != no ; then
15885         cat >> confdefs.h <<\EOF
15886 #define SLAPD_ACI_ENABLED 1
15887 EOF
15888
15889 fi
15890
15891 if test "$ol_link_modules" != no ; then
15892         cat >> confdefs.h <<\EOF
15893 #define SLAPD_MODULES 1
15894 EOF
15895
15896         BUILD_SLAPD=yes
15897         SLAPD_MODULES_LDFLAGS="-dlopen self"
15898 fi
15899
15900 if test "$ol_link_bdb2" != no ; then
15901         cat >> confdefs.h <<\EOF
15902 #define SLAPD_BDB2 1
15903 EOF
15904
15905         BUILD_SLAPD=yes
15906         BUILD_BDB2=yes
15907         if test "$ol_with_bdb2_module" != static ; then
15908                 cat >> confdefs.h <<\EOF
15909 #define SLAPD_BDB2_DYNAMIC 1
15910 EOF
15911
15912                 BUILD_BDB2=mod
15913                 BUILD_BDB2_DYNAMIC=shared
15914                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15915         fi
15916 fi
15917
15918 if test "$ol_enable_dnssrv" != no ; then
15919         cat >> confdefs.h <<\EOF
15920 #define SLAPD_DNSSRV 1
15921 EOF
15922
15923         BUILD_SLAPD=yes
15924         BUILD_DNSSRV=yes
15925         if test "$ol_with_dnssrv_module" != static ; then
15926                 cat >> confdefs.h <<\EOF
15927 #define SLAPD_DNSSRV_DYNAMIC 1
15928 EOF
15929
15930                 BUILD_DNSSRV=mod
15931                 BUILD_DNSSRV_DYNAMIC=shared
15932                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15933         fi
15934 fi
15935
15936 if test "$ol_enable_ldap" != no ; then
15937         cat >> confdefs.h <<\EOF
15938 #define SLAPD_LDAP 1
15939 EOF
15940
15941         BUILD_SLAPD=yes
15942         BUILD_LDAP=yes
15943         if test "$ol_with_ldap_module" != static ; then
15944                 cat >> confdefs.h <<\EOF
15945 #define SLAPD_LDAP_DYNAMIC 1
15946 EOF
15947
15948                 BUILD_LDAP=mod
15949                 BUILD_LDAP_DYNAMIC=shared
15950                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15951         fi
15952 fi
15953
15954 if test "$ol_link_ldbm" != no ; then
15955         cat >> confdefs.h <<\EOF
15956 #define SLAPD_LDBM 1
15957 EOF
15958
15959         BUILD_SLAPD=yes
15960         BUILD_LDBM=yes
15961         if test "$ol_with_ldbm_module" != static ; then
15962                 cat >> confdefs.h <<\EOF
15963 #define SLAPD_LDBM_DYNAMIC 1
15964 EOF
15965
15966                 BUILD_LDBM=mod
15967                 BUILD_LDBM_DYNAMIC=shared
15968                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15969         fi
15970 fi
15971
15972 if test "$ol_enable_passwd" != no ; then
15973         cat >> confdefs.h <<\EOF
15974 #define SLAPD_PASSWD 1
15975 EOF
15976
15977         BUILD_SLAPD=yes
15978         BUILD_PASSWD=yes
15979         if test "$ol_with_passwd_module" != static ; then
15980                 cat >> confdefs.h <<\EOF
15981 #define SLAPD_PASSWD_DYNAMIC 1
15982 EOF
15983
15984                 BUILD_PASSWD=mod
15985                 BUILD_PASSWD_DYNAMIC=shared
15986                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15987         fi
15988 fi
15989
15990 if test "$ol_link_perl" != no ; then
15991         cat >> confdefs.h <<\EOF
15992 #define SLAPD_PERL 1
15993 EOF
15994
15995         BUILD_SLAPD=yes
15996         BUILD_PERL=yes
15997         if test "$ol_with_perl_module" != static ; then
15998                 cat >> confdefs.h <<\EOF
15999 #define SLAPD_PERL_DYNAMIC 1
16000 EOF
16001
16002                 BUILD_PERL=mod
16003                 BUILD_PERL_DYNAMIC=shared
16004                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16005         fi
16006 fi
16007
16008 if test "$ol_enable_shell" != no ; then
16009         cat >> confdefs.h <<\EOF
16010 #define SLAPD_SHELL 1
16011 EOF
16012
16013         BUILD_SLAPD=yes
16014         BUILD_SHELL=yes
16015         if test "$ol_with_shell_module" != static ; then
16016                 cat >> confdefs.h <<\EOF
16017 #define SLAPD_SHELL_DYNAMIC 1
16018 EOF
16019
16020                 BUILD_SHELL=mod
16021                 BUILD_SHELL_DYNAMIC=shared
16022                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16023         fi
16024 fi
16025
16026 if test "$ol_enable_tcl" != no ; then
16027         cat >> confdefs.h <<\EOF
16028 #define SLAPD_TCL 1
16029 EOF
16030
16031         BUILD_SLAPD=yes
16032         BUILD_TCL=yes
16033         if test "$ol_with_tcl_module" != static; then
16034                 cat >> confdefs.h <<\EOF
16035 #define SLAPD_TCL_DYNAMIC 1
16036 EOF
16037
16038                 BUILD_TCL=mod
16039                 BUILD_TCL_DYNAMIC=shared
16040                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16041         fi
16042 fi
16043
16044 if test "$ol_enable_sql" != no ; then
16045         cat >> confdefs.h <<\EOF
16046 #define SLAPD_SQL 1
16047 EOF
16048
16049         BUILD_SLAPD=yes
16050         BUILD_SQL=yes
16051         SLAPD_SQL_LIBS=-liodbc
16052         if test "$ol_with_sql_module" != static; then
16053                 cat >> confdefs.h <<\EOF
16054 #define SLAPD_SQL_DYNAMIC 1
16055 EOF
16056
16057                 BUILD_SQL=mod
16058                 BUILD_SQL_DYNAMIC=shared
16059                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16060         fi
16061 fi
16062
16063 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16064         $BUILD_SLAPD = yes ; then
16065         BUILD_SLURPD=yes
16066 fi
16067
16068 if test "$ol_link_isode" != no ; then
16069         BUILD_LDAPD=yes
16070 fi
16071
16072
16073 if test "$LINK_BINS_DYNAMIC" = yes; then
16074     LIB_LINKAGE=DYN
16075     LT_LIB_LINKAGE=shared
16076 else
16077     LIB_LINKAGE=STAT
16078     LT_LIB_LINKAGE=static
16079 fi
16080
16081 if test "$ac_cv_mingw32" = yes ; then
16082     PLAT=NT
16083     DYN_EXT=dll
16084 else
16085     PLAT=UNIX
16086     DYN_EXT=so
16087 fi
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098   
16099   
16100   
16101   
16102   
16103   
16104   
16105   
16106   
16107   
16108   
16109   
16110   
16111   
16112   
16113   
16114   
16115   
16116   
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153 trap '' 1 2 15
16154
16155 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16156
16157 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16158 # Let make expand exec_prefix.
16159 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16160
16161 # Any assignment to VPATH causes Sun make to only execute
16162 # the first set of double-colon rules, so remove it if not needed.
16163 # If there is a colon in the path, we need to keep it.
16164 if test "x$srcdir" = x.; then
16165   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16166 fi
16167
16168 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16169
16170 DEFS=-DHAVE_CONFIG_H
16171
16172 # Without the "./", some shells look in PATH for config.status.
16173 : ${CONFIG_STATUS=./config.status}
16174
16175 echo creating $CONFIG_STATUS
16176 rm -f $CONFIG_STATUS
16177 cat > $CONFIG_STATUS <<EOF
16178 #! /bin/sh
16179 # Generated automatically by configure.
16180 # Run this file to recreate the current configuration.
16181 # This directory was configured as follows,
16182 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16183 #
16184 # $0 $ac_configure_args
16185 #
16186 # Compiler output produced by configure, useful for debugging
16187 # configure, is in ./config.log if it exists.
16188
16189 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16190 for ac_option
16191 do
16192   case "\$ac_option" in
16193   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16194     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16195     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16196   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16197     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16198     exit 0 ;;
16199   -help | --help | --hel | --he | --h)
16200     echo "\$ac_cs_usage"; exit 0 ;;
16201   *) echo "\$ac_cs_usage"; exit 1 ;;
16202   esac
16203 done
16204
16205 ac_given_srcdir=$srcdir
16206 ac_given_INSTALL="$INSTALL"
16207
16208 trap 'rm -fr `echo "\
16209 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16210 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16211 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16212 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16213 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16214 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16215 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16216 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16217 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16218 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16219 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16220 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16221 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16222 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16223 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16224 include/Makefile:build/top.mk:include/Makefile.in \
16225 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16226 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16227 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16228 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16229 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16230 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16231 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16232 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16233 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16234 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16235 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
16236 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16237 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16238 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16239 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16240 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16241 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16242 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16243 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16244 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16245 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16246 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16247 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16248 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16249 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16250 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16251 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16252 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16253 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16254  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16255 EOF
16256 cat >> $CONFIG_STATUS <<EOF
16257
16258 # Protect against being on the right side of a sed subst in config.status.
16259 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16260  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16261 $ac_vpsub
16262 $extrasub
16263 s%@SHELL@%$SHELL%g
16264 s%@CFLAGS@%$CFLAGS%g
16265 s%@CPPFLAGS@%$CPPFLAGS%g
16266 s%@CXXFLAGS@%$CXXFLAGS%g
16267 s%@FFLAGS@%$FFLAGS%g
16268 s%@DEFS@%$DEFS%g
16269 s%@LDFLAGS@%$LDFLAGS%g
16270 s%@LIBS@%$LIBS%g
16271 s%@exec_prefix@%$exec_prefix%g
16272 s%@prefix@%$prefix%g
16273 s%@program_transform_name@%$program_transform_name%g
16274 s%@bindir@%$bindir%g
16275 s%@sbindir@%$sbindir%g
16276 s%@libexecdir@%$libexecdir%g
16277 s%@datadir@%$datadir%g
16278 s%@sysconfdir@%$sysconfdir%g
16279 s%@sharedstatedir@%$sharedstatedir%g
16280 s%@localstatedir@%$localstatedir%g
16281 s%@libdir@%$libdir%g
16282 s%@includedir@%$includedir%g
16283 s%@oldincludedir@%$oldincludedir%g
16284 s%@infodir@%$infodir%g
16285 s%@mandir@%$mandir%g
16286 s%@host@%$host%g
16287 s%@host_alias@%$host_alias%g
16288 s%@host_cpu@%$host_cpu%g
16289 s%@host_vendor@%$host_vendor%g
16290 s%@host_os@%$host_os%g
16291 s%@target@%$target%g
16292 s%@target_alias@%$target_alias%g
16293 s%@target_cpu@%$target_cpu%g
16294 s%@target_vendor@%$target_vendor%g
16295 s%@target_os@%$target_os%g
16296 s%@build@%$build%g
16297 s%@build_alias@%$build_alias%g
16298 s%@build_cpu@%$build_cpu%g
16299 s%@build_vendor@%$build_vendor%g
16300 s%@build_os@%$build_os%g
16301 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16302 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16303 s%@INSTALL_DATA@%$INSTALL_DATA%g
16304 s%@PACKAGE@%$PACKAGE%g
16305 s%@VERSION@%$VERSION%g
16306 s%@ACLOCAL@%$ACLOCAL%g
16307 s%@AUTOCONF@%$AUTOCONF%g
16308 s%@AUTOMAKE@%$AUTOMAKE%g
16309 s%@AUTOHEADER@%$AUTOHEADER%g
16310 s%@MAKEINFO@%$MAKEINFO%g
16311 s%@install_sh@%$install_sh%g
16312 s%@AMTAR@%$AMTAR%g
16313 s%@AWK@%$AWK%g
16314 s%@AMTARFLAGS@%$AMTARFLAGS%g
16315 s%@SET_MAKE@%$SET_MAKE%g
16316 s%@top_builddir@%$top_builddir%g
16317 s%@ldap_subdir@%$ldap_subdir%g
16318 s%@CC@%$CC%g
16319 s%@RANLIB@%$RANLIB%g
16320 s%@LD@%$LD%g
16321 s%@NM@%$NM%g
16322 s%@LN_S@%$LN_S%g
16323 s%@DLLTOOL@%$DLLTOOL%g
16324 s%@AS@%$AS%g
16325 s%@OBJDUMP@%$OBJDUMP%g
16326 s%@LIBTOOL@%$LIBTOOL%g
16327 s%@LN_H@%$LN_H%g
16328 s%@SENDMAIL@%$SENDMAIL%g
16329 s%@EDITOR@%$EDITOR%g
16330 s%@FINGER@%$FINGER%g
16331 s%@PERLBIN@%$PERLBIN%g
16332 s%@CPP@%$CPP%g
16333 s%@EXEEXT@%$EXEEXT%g
16334 s%@OBJEXT@%$OBJEXT%g
16335 s%@OL_MKDEP@%$OL_MKDEP%g
16336 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16337 s%@PEPSY@%$PEPSY%g
16338 s%@LIBOBJS@%$LIBOBJS%g
16339 s%@LIBSRCS@%$LIBSRCS%g
16340 s%@PLAT@%$PLAT%g
16341 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16342 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16343 s%@DYN_EXT@%$DYN_EXT%g
16344 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
16345 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16346 s%@BUILD_BDB2@%$BUILD_BDB2%g
16347 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16348 s%@BUILD_LDAP@%$BUILD_LDAP%g
16349 s%@BUILD_LDBM@%$BUILD_LDBM%g
16350 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16351 s%@BUILD_PERL@%$BUILD_PERL%g
16352 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16353 s%@BUILD_SHELL@%$BUILD_SHELL%g
16354 s%@BUILD_SQL@%$BUILD_SQL%g
16355 s%@BUILD_TCL@%$BUILD_TCL%g
16356 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
16357 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16358 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16359 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16360 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16361 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16362 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16363 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16364 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16365 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16366 s%@LDAP_LIBS@%$LDAP_LIBS%g
16367 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
16368 s%@LDIF_LIBS@%$LDIF_LIBS%g
16369 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16370 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16371 s%@LDBM_LIBS@%$LDBM_LIBS%g
16372 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16373 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16374 s%@WRAP_LIBS@%$WRAP_LIBS%g
16375 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16376 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16377 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16378 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16379 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16380 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16381 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16382 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16383 s%@KRB4_LIBS@%$KRB4_LIBS%g
16384 s%@KRB5_LIBS@%$KRB5_LIBS%g
16385 s%@READLINE_LIBS@%$READLINE_LIBS%g
16386 s%@SASL_LIBS@%$SASL_LIBS%g
16387 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16388 s%@TLS_LIBS@%$TLS_LIBS%g
16389 s%@MODULES_LIBS@%$MODULES_LIBS%g
16390 s%@AUTH_LIBS@%$AUTH_LIBS%g
16391 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16392 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16393 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16394
16395 CEOF
16396 EOF
16397
16398 cat >> $CONFIG_STATUS <<\EOF
16399
16400 # Split the substitutions into bite-sized pieces for seds with
16401 # small command number limits, like on Digital OSF/1 and HP-UX.
16402 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16403 ac_file=1 # Number of current file.
16404 ac_beg=1 # First line for current file.
16405 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16406 ac_more_lines=:
16407 ac_sed_cmds=""
16408 while $ac_more_lines; do
16409   if test $ac_beg -gt 1; then
16410     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16411   else
16412     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16413   fi
16414   if test ! -s conftest.s$ac_file; then
16415     ac_more_lines=false
16416     rm -f conftest.s$ac_file
16417   else
16418     if test -z "$ac_sed_cmds"; then
16419       ac_sed_cmds="sed -f conftest.s$ac_file"
16420     else
16421       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16422     fi
16423     ac_file=`expr $ac_file + 1`
16424     ac_beg=$ac_end
16425     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16426   fi
16427 done
16428 if test -z "$ac_sed_cmds"; then
16429   ac_sed_cmds=cat
16430 fi
16431 EOF
16432
16433 cat >> $CONFIG_STATUS <<EOF
16434
16435 CONFIG_FILES=\${CONFIG_FILES-"\
16436 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16437 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16438 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16439 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16440 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16441 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16442 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16443 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16444 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16445 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16446 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16447 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16448 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16449 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16450 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16451 include/Makefile:build/top.mk:include/Makefile.in \
16452 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16453 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16454 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16455 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16456 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16457 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16458 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16459 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16460 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16461 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16462 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
16463 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16464 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16465 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16466 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16467 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16468 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16469 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16470 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16471 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16472 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16473 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16474 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16475 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16476 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16477 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16478 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16479 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16480 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16481 "}
16482 EOF
16483 cat >> $CONFIG_STATUS <<\EOF
16484 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16485   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16486   case "$ac_file" in
16487   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16488        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16489   *) ac_file_in="${ac_file}.in" ;;
16490   esac
16491
16492   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16493
16494   # Remove last slash and all that follows it.  Not all systems have dirname.
16495   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16496   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16497     # The file is in a subdirectory.
16498     test ! -d "$ac_dir" && mkdir "$ac_dir"
16499     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16500     # A "../" for each directory in $ac_dir_suffix.
16501     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16502   else
16503     ac_dir_suffix= ac_dots=
16504   fi
16505
16506   case "$ac_given_srcdir" in
16507   .)  srcdir=.
16508       if test -z "$ac_dots"; then top_srcdir=.
16509       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16510   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16511   *) # Relative path.
16512     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16513     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16514   esac
16515
16516   case "$ac_given_INSTALL" in
16517   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16518   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16519   esac
16520
16521   echo creating "$ac_file"
16522   rm -f "$ac_file"
16523   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16524   case "$ac_file" in
16525   *[Mm]akefile*) ac_comsub="1i\\
16526 # $configure_input" ;;
16527   *) ac_comsub= ;;
16528   esac
16529
16530   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16531   sed -e "$ac_comsub
16532 s%@configure_input@%$configure_input%g
16533 s%@srcdir@%$srcdir%g
16534 s%@top_srcdir@%$top_srcdir%g
16535 s%@INSTALL@%$INSTALL%g
16536 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16537 fi; done
16538 rm -f conftest.s*
16539
16540 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16541 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16542 #
16543 # ac_d sets the value in "#define NAME VALUE" lines.
16544 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16545 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16546 ac_dC='\3'
16547 ac_dD='%g'
16548 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16549 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16550 ac_uB='\([      ]\)%\1#\2define\3'
16551 ac_uC=' '
16552 ac_uD='\4%g'
16553 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16554 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16555 ac_eB='$%\1#\2define\3'
16556 ac_eC=' '
16557 ac_eD='%g'
16558
16559 if test "${CONFIG_HEADERS+set}" != set; then
16560 EOF
16561 cat >> $CONFIG_STATUS <<EOF
16562   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16563 EOF
16564 cat >> $CONFIG_STATUS <<\EOF
16565 fi
16566 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16567   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16568   case "$ac_file" in
16569   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16570        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16571   *) ac_file_in="${ac_file}.in" ;;
16572   esac
16573
16574   echo creating $ac_file
16575
16576   rm -f conftest.frag conftest.in conftest.out
16577   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16578   cat $ac_file_inputs > conftest.in
16579
16580 EOF
16581
16582 # Transform confdefs.h into a sed script conftest.vals that substitutes
16583 # the proper values into config.h.in to produce config.h.  And first:
16584 # Protect against being on the right side of a sed subst in config.status.
16585 # Protect against being in an unquoted here document in config.status.
16586 rm -f conftest.vals
16587 cat > conftest.hdr <<\EOF
16588 s/[\\&%]/\\&/g
16589 s%[\\$`]%\\&%g
16590 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16591 s%ac_d%ac_u%gp
16592 s%ac_u%ac_e%gp
16593 EOF
16594 sed -n -f conftest.hdr confdefs.h > conftest.vals
16595 rm -f conftest.hdr
16596
16597 # This sed command replaces #undef with comments.  This is necessary, for
16598 # example, in the case of _POSIX_SOURCE, which is predefined and required
16599 # on some systems where configure will not decide to define it.
16600 cat >> conftest.vals <<\EOF
16601 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16602 EOF
16603
16604 # Break up conftest.vals because some shells have a limit on
16605 # the size of here documents, and old seds have small limits too.
16606
16607 rm -f conftest.tail
16608 while :
16609 do
16610   ac_lines=`grep -c . conftest.vals`
16611   # grep -c gives empty output for an empty file on some AIX systems.
16612   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16613   # Write a limited-size here document to conftest.frag.
16614   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16615   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16616   echo 'CEOF
16617   sed -f conftest.frag conftest.in > conftest.out
16618   rm -f conftest.in
16619   mv conftest.out conftest.in
16620 ' >> $CONFIG_STATUS
16621   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16622   rm -f conftest.vals
16623   mv conftest.tail conftest.vals
16624 done
16625 rm -f conftest.vals
16626
16627 cat >> $CONFIG_STATUS <<\EOF
16628   rm -f conftest.frag conftest.h
16629   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16630   cat conftest.in >> conftest.h
16631   rm -f conftest.in
16632   if cmp -s $ac_file conftest.h 2>/dev/null; then
16633     echo "$ac_file is unchanged"
16634     rm -f conftest.h
16635   else
16636     # Remove last slash and all that follows it.  Not all systems have dirname.
16637       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16638       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16639       # The file is in a subdirectory.
16640       test ! -d "$ac_dir" && mkdir "$ac_dir"
16641     fi
16642     rm -f $ac_file
16643     mv conftest.h $ac_file
16644   fi
16645 fi; done
16646
16647 EOF
16648 cat >> $CONFIG_STATUS <<EOF
16649
16650 EOF
16651 cat >> $CONFIG_STATUS <<\EOF
16652
16653 date > stamp-h
16654 echo Please \"make depend\" to build dependencies
16655
16656 exit 0
16657 EOF
16658 chmod +x $CONFIG_STATUS
16659 rm -fr confdefs* $ac_clean_files
16660 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16661