]> git.sur5r.net Git - openldap/blob - configure
Remove dependency upon umichPilotPerson (use just newPilotPerson)
[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 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3084 echo "configure:3085: checking if the linker ($LD) is GNU ld" >&5
3085 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3086   echo $ac_n "(cached) $ac_c" 1>&6
3087 else
3088   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3089 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3090   ac_cv_prog_gnu_ld=yes
3091 else
3092   ac_cv_prog_gnu_ld=no
3093 fi
3094 fi
3095
3096 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3097
3098
3099 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3100 echo "configure:3101: checking for BSD-compatible nm" >&5
3101 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3102   echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104   if test -n "$NM"; then
3105   # Let the user override the test.
3106   ac_cv_path_NM="$NM"
3107 else
3108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3109   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3110     test -z "$ac_dir" && ac_dir=.
3111     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3112       # Check to see if the nm accepts a BSD-compat flag.
3113       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3114       #   nm: unknown option "B" ignored
3115       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3116         ac_cv_path_NM="$ac_dir/nm -B"
3117         break
3118       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3119         ac_cv_path_NM="$ac_dir/nm -p"
3120         break
3121       else
3122         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3123         continue # so that we can try to find one that supports BSD flags
3124       fi
3125     fi
3126   done
3127   IFS="$ac_save_ifs"
3128   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3129 fi
3130 fi
3131
3132 NM="$ac_cv_path_NM"
3133 echo "$ac_t""$NM" 1>&6
3134
3135 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3136 echo "configure:3137: checking whether ln -s works" >&5
3137 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3138   echo $ac_n "(cached) $ac_c" 1>&6
3139 else
3140   rm -f conftestdata
3141 if ln -s X conftestdata 2>/dev/null
3142 then
3143   rm -f conftestdata
3144   ac_cv_prog_LN_S="ln -s"
3145 else
3146   ac_cv_prog_LN_S=ln
3147 fi
3148 fi
3149 LN_S="$ac_cv_prog_LN_S"
3150 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3151   echo "$ac_t""yes" 1>&6
3152 else
3153   echo "$ac_t""no" 1>&6
3154 fi
3155
3156 if test $host != $build; then
3157   ac_tool_prefix=${host_alias}-
3158 else
3159   ac_tool_prefix=
3160 fi
3161
3162
3163 case "$target" in
3164 NONE) lt_target="$host" ;;
3165 *) lt_target="$target" ;;
3166 esac
3167
3168 # Check for any special flags to pass to ltconfig.
3169 libtool_flags="--cache-file=$cache_file"
3170 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3171 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3172 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3173 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3174 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3175 libtool_flags="$libtool_flags --enable-dlopen"
3176 libtool_flags="$libtool_flags --enable-win32-dll"
3177 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3178 if test "${enable_libtool_lock+set}" = set; then
3179   enableval="$enable_libtool_lock"
3180   :
3181 fi
3182
3183 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3184 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3185
3186 # Some flags need to be propagated to the compiler or linker for good
3187 # libtool support.
3188 case "$lt_target" in
3189 *-*-irix6*)
3190   # Find out which ABI we are using.
3191   echo '#line 3192 "configure"' > conftest.$ac_ext
3192   if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3193     case "`/usr/bin/file conftest.o`" in
3194     *32-bit*)
3195       LD="${LD-ld} -32"
3196       ;;
3197     *N32*)
3198       LD="${LD-ld} -n32"
3199       ;;
3200     *64-bit*)
3201       LD="${LD-ld} -64"
3202       ;;
3203     esac
3204   fi
3205   rm -rf conftest*
3206   ;;
3207
3208 *-*-sco3.2v5*)
3209   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3210   SAVE_CFLAGS="$CFLAGS"
3211   CFLAGS="$CFLAGS -belf"
3212   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3213 echo "configure:3214: checking whether the C compiler needs -belf" >&5
3214 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3215   echo $ac_n "(cached) $ac_c" 1>&6
3216 else
3217   cat > conftest.$ac_ext <<EOF
3218 #line 3219 "configure"
3219 #include "confdefs.h"
3220
3221 int main() {
3222
3223 ; return 0; }
3224 EOF
3225 if { (eval echo configure:3226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3226   rm -rf conftest*
3227   lt_cv_cc_needs_belf=yes
3228 else
3229   echo "configure: failed program was:" >&5
3230   cat conftest.$ac_ext >&5
3231   rm -rf conftest*
3232   lt_cv_cc_needs_belf=no
3233 fi
3234 rm -f conftest*
3235 fi
3236
3237 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3238   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3239     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3240     CFLAGS="$SAVE_CFLAGS"
3241   fi
3242   ;;
3243
3244 *-*-cygwin* | *-*-mingw*)
3245   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3246 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3247 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3248 echo "configure:3249: checking for $ac_word" >&5
3249 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3250   echo $ac_n "(cached) $ac_c" 1>&6
3251 else
3252   if test -n "$DLLTOOL"; then
3253   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3254 else
3255   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3256   ac_dummy="$PATH"
3257   for ac_dir in $ac_dummy; do
3258     test -z "$ac_dir" && ac_dir=.
3259     if test -f $ac_dir/$ac_word; then
3260       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3261       break
3262     fi
3263   done
3264   IFS="$ac_save_ifs"
3265 fi
3266 fi
3267 DLLTOOL="$ac_cv_prog_DLLTOOL"
3268 if test -n "$DLLTOOL"; then
3269   echo "$ac_t""$DLLTOOL" 1>&6
3270 else
3271   echo "$ac_t""no" 1>&6
3272 fi
3273
3274
3275 if test -z "$ac_cv_prog_DLLTOOL"; then
3276 if test -n "$ac_tool_prefix"; then
3277   # Extract the first word of "dlltool", so it can be a program name with args.
3278 set dummy dlltool; ac_word=$2
3279 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3280 echo "configure:3281: checking for $ac_word" >&5
3281 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3282   echo $ac_n "(cached) $ac_c" 1>&6
3283 else
3284   if test -n "$DLLTOOL"; then
3285   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3286 else
3287   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3288   ac_dummy="$PATH"
3289   for ac_dir in $ac_dummy; do
3290     test -z "$ac_dir" && ac_dir=.
3291     if test -f $ac_dir/$ac_word; then
3292       ac_cv_prog_DLLTOOL="dlltool"
3293       break
3294     fi
3295   done
3296   IFS="$ac_save_ifs"
3297   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3298 fi
3299 fi
3300 DLLTOOL="$ac_cv_prog_DLLTOOL"
3301 if test -n "$DLLTOOL"; then
3302   echo "$ac_t""$DLLTOOL" 1>&6
3303 else
3304   echo "$ac_t""no" 1>&6
3305 fi
3306
3307 else
3308   DLLTOOL="false"
3309 fi
3310 fi
3311
3312   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3313 set dummy ${ac_tool_prefix}as; ac_word=$2
3314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3315 echo "configure:3316: checking for $ac_word" >&5
3316 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3317   echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319   if test -n "$AS"; then
3320   ac_cv_prog_AS="$AS" # Let the user override the test.
3321 else
3322   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3323   ac_dummy="$PATH"
3324   for ac_dir in $ac_dummy; do
3325     test -z "$ac_dir" && ac_dir=.
3326     if test -f $ac_dir/$ac_word; then
3327       ac_cv_prog_AS="${ac_tool_prefix}as"
3328       break
3329     fi
3330   done
3331   IFS="$ac_save_ifs"
3332 fi
3333 fi
3334 AS="$ac_cv_prog_AS"
3335 if test -n "$AS"; then
3336   echo "$ac_t""$AS" 1>&6
3337 else
3338   echo "$ac_t""no" 1>&6
3339 fi
3340
3341
3342 if test -z "$ac_cv_prog_AS"; then
3343 if test -n "$ac_tool_prefix"; then
3344   # Extract the first word of "as", so it can be a program name with args.
3345 set dummy as; ac_word=$2
3346 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3347 echo "configure:3348: checking for $ac_word" >&5
3348 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3349   echo $ac_n "(cached) $ac_c" 1>&6
3350 else
3351   if test -n "$AS"; then
3352   ac_cv_prog_AS="$AS" # Let the user override the test.
3353 else
3354   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3355   ac_dummy="$PATH"
3356   for ac_dir in $ac_dummy; do
3357     test -z "$ac_dir" && ac_dir=.
3358     if test -f $ac_dir/$ac_word; then
3359       ac_cv_prog_AS="as"
3360       break
3361     fi
3362   done
3363   IFS="$ac_save_ifs"
3364   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3365 fi
3366 fi
3367 AS="$ac_cv_prog_AS"
3368 if test -n "$AS"; then
3369   echo "$ac_t""$AS" 1>&6
3370 else
3371   echo "$ac_t""no" 1>&6
3372 fi
3373
3374 else
3375   AS="false"
3376 fi
3377 fi
3378
3379   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3380 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3381 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3382 echo "configure:3383: checking for $ac_word" >&5
3383 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3384   echo $ac_n "(cached) $ac_c" 1>&6
3385 else
3386   if test -n "$OBJDUMP"; then
3387   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3388 else
3389   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3390   ac_dummy="$PATH"
3391   for ac_dir in $ac_dummy; do
3392     test -z "$ac_dir" && ac_dir=.
3393     if test -f $ac_dir/$ac_word; then
3394       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3395       break
3396     fi
3397   done
3398   IFS="$ac_save_ifs"
3399 fi
3400 fi
3401 OBJDUMP="$ac_cv_prog_OBJDUMP"
3402 if test -n "$OBJDUMP"; then
3403   echo "$ac_t""$OBJDUMP" 1>&6
3404 else
3405   echo "$ac_t""no" 1>&6
3406 fi
3407
3408
3409 if test -z "$ac_cv_prog_OBJDUMP"; then
3410 if test -n "$ac_tool_prefix"; then
3411   # Extract the first word of "objdump", so it can be a program name with args.
3412 set dummy objdump; ac_word=$2
3413 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3414 echo "configure:3415: checking for $ac_word" >&5
3415 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3416   echo $ac_n "(cached) $ac_c" 1>&6
3417 else
3418   if test -n "$OBJDUMP"; then
3419   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3420 else
3421   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3422   ac_dummy="$PATH"
3423   for ac_dir in $ac_dummy; do
3424     test -z "$ac_dir" && ac_dir=.
3425     if test -f $ac_dir/$ac_word; then
3426       ac_cv_prog_OBJDUMP="objdump"
3427       break
3428     fi
3429   done
3430   IFS="$ac_save_ifs"
3431   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3432 fi
3433 fi
3434 OBJDUMP="$ac_cv_prog_OBJDUMP"
3435 if test -n "$OBJDUMP"; then
3436   echo "$ac_t""$OBJDUMP" 1>&6
3437 else
3438   echo "$ac_t""no" 1>&6
3439 fi
3440
3441 else
3442   OBJDUMP="false"
3443 fi
3444 fi
3445
3446   ;;
3447
3448 esac
3449
3450
3451 # Save cache, so that ltconfig can load it
3452
3453
3454 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3455 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3456 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3457 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3458 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3459 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3460 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3461 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3462
3463 # Reload cache, that may have been modified by ltconfig
3464
3465
3466 # This can be used to rebuild libtool when needed
3467 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3468
3469 # Always use our own libtool.
3470 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3471
3472 # Redirect the config.log output again, so that the ltconfig log is not
3473 # clobbered by the next message.
3474 exec 5>>./config.log
3475
3476
3477 for ac_prog in mawk gawk nawk awk
3478 do
3479 # Extract the first word of "$ac_prog", so it can be a program name with args.
3480 set dummy $ac_prog; ac_word=$2
3481 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3482 echo "configure:3483: checking for $ac_word" >&5
3483 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3484   echo $ac_n "(cached) $ac_c" 1>&6
3485 else
3486   if test -n "$AWK"; then
3487   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3488 else
3489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3490   ac_dummy="$PATH"
3491   for ac_dir in $ac_dummy; do
3492     test -z "$ac_dir" && ac_dir=.
3493     if test -f $ac_dir/$ac_word; then
3494       ac_cv_prog_AWK="$ac_prog"
3495       break
3496     fi
3497   done
3498   IFS="$ac_save_ifs"
3499 fi
3500 fi
3501 AWK="$ac_cv_prog_AWK"
3502 if test -n "$AWK"; then
3503   echo "$ac_t""$AWK" 1>&6
3504 else
3505   echo "$ac_t""no" 1>&6
3506 fi
3507
3508 test -n "$AWK" && break
3509 done
3510
3511 # test for ln hardlink support
3512 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3513 echo "configure:3514: checking whether ln works" >&5
3514 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   rm -f conftest.src conftest.dst
3518 echo "conftest" > conftest.src
3519 if ln conftest.src conftest.dst 2>/dev/null
3520 then
3521   ol_cv_prog_LN_H="ln"
3522 else
3523   ol_cv_prog_LN_H="cp"
3524 fi
3525 rm -f conftest.src conftest.dst
3526
3527 fi
3528 LN_H="$ol_cv_prog_LN_H"
3529 if test "$ol_cv_prog_LN_H" = "ln"; then
3530         echo "$ac_t""yes" 1>&6
3531 else
3532         echo "$ac_t""no" 1>&6
3533 fi
3534
3535 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3536 echo "configure:3537: checking whether ln -s works" >&5
3537 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3538   echo $ac_n "(cached) $ac_c" 1>&6
3539 else
3540   rm -f conftestdata
3541 if ln -s X conftestdata 2>/dev/null
3542 then
3543   rm -f conftestdata
3544   ac_cv_prog_LN_S="ln -s"
3545 else
3546   ac_cv_prog_LN_S=ln
3547 fi
3548 fi
3549 LN_S="$ac_cv_prog_LN_S"
3550 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3551   echo "$ac_t""yes" 1>&6
3552 else
3553   echo "$ac_t""no" 1>&6
3554 fi
3555
3556
3557 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3558         LN_S="$LN_H"
3559 fi
3560
3561 # Extract the first word of "sendmail", so it can be a program name with args.
3562 set dummy sendmail; ac_word=$2
3563 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3564 echo "configure:3565: checking for $ac_word" >&5
3565 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3566   echo $ac_n "(cached) $ac_c" 1>&6
3567 else
3568   case "$SENDMAIL" in
3569   /*)
3570   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3571   ;;
3572   ?:/*)
3573   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3574   ;;
3575   *)
3576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3577   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3578   for ac_dir in $ac_dummy; do 
3579     test -z "$ac_dir" && ac_dir=.
3580     if test -f $ac_dir/$ac_word; then
3581       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3582       break
3583     fi
3584   done
3585   IFS="$ac_save_ifs"
3586   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3587   ;;
3588 esac
3589 fi
3590 SENDMAIL="$ac_cv_path_SENDMAIL"
3591 if test -n "$SENDMAIL"; then
3592   echo "$ac_t""$SENDMAIL" 1>&6
3593 else
3594   echo "$ac_t""no" 1>&6
3595 fi
3596
3597 # Extract the first word of "vi", so it can be a program name with args.
3598 set dummy vi; ac_word=$2
3599 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3600 echo "configure:3601: checking for $ac_word" >&5
3601 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3602   echo $ac_n "(cached) $ac_c" 1>&6
3603 else
3604   case "$EDITOR" in
3605   /*)
3606   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3607   ;;
3608   ?:/*)
3609   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3610   ;;
3611   *)
3612   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3613   ac_dummy="$PATH:/usr/ucb"
3614   for ac_dir in $ac_dummy; do 
3615     test -z "$ac_dir" && ac_dir=.
3616     if test -f $ac_dir/$ac_word; then
3617       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3618       break
3619     fi
3620   done
3621   IFS="$ac_save_ifs"
3622   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3623   ;;
3624 esac
3625 fi
3626 EDITOR="$ac_cv_path_EDITOR"
3627 if test -n "$EDITOR"; then
3628   echo "$ac_t""$EDITOR" 1>&6
3629 else
3630   echo "$ac_t""no" 1>&6
3631 fi
3632
3633 # Extract the first word of "finger", so it can be a program name with args.
3634 set dummy finger; ac_word=$2
3635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3636 echo "configure:3637: checking for $ac_word" >&5
3637 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3638   echo $ac_n "(cached) $ac_c" 1>&6
3639 else
3640   case "$FINGER" in
3641   /*)
3642   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3643   ;;
3644   ?:/*)
3645   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3646   ;;
3647   *)
3648   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3649   ac_dummy="$PATH:/usr/ucb"
3650   for ac_dir in $ac_dummy; do 
3651     test -z "$ac_dir" && ac_dir=.
3652     if test -f $ac_dir/$ac_word; then
3653       ac_cv_path_FINGER="$ac_dir/$ac_word"
3654       break
3655     fi
3656   done
3657   IFS="$ac_save_ifs"
3658   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3659   ;;
3660 esac
3661 fi
3662 FINGER="$ac_cv_path_FINGER"
3663 if test -n "$FINGER"; then
3664   echo "$ac_t""$FINGER" 1>&6
3665 else
3666   echo "$ac_t""no" 1>&6
3667 fi
3668
3669
3670 ol_link_perl=no
3671 if test $ol_enable_perl != no ; then
3672         # Extract the first word of "perl", so it can be a program name with args.
3673 set dummy perl; ac_word=$2
3674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3675 echo "configure:3676: checking for $ac_word" >&5
3676 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   case "$PERLBIN" in
3680   /*)
3681   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3682   ;;
3683   ?:/*)
3684   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3685   ;;
3686   *)
3687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3688   ac_dummy="$PATH"
3689   for ac_dir in $ac_dummy; do 
3690     test -z "$ac_dir" && ac_dir=.
3691     if test -f $ac_dir/$ac_word; then
3692       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3693       break
3694     fi
3695   done
3696   IFS="$ac_save_ifs"
3697   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3698   ;;
3699 esac
3700 fi
3701 PERLBIN="$ac_cv_path_PERLBIN"
3702 if test -n "$PERLBIN"; then
3703   echo "$ac_t""$PERLBIN" 1>&6
3704 else
3705   echo "$ac_t""no" 1>&6
3706 fi
3707
3708
3709         if test "no$PERLBIN" = "no" ; then
3710                 if test $ol_enable_perl = yes ; then
3711                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3712                 fi
3713
3714         else
3715                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3716                 if test x"$ol_with_perl_module" = "xstatic" ; then
3717                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3718                 else
3719                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3720                 fi
3721                                 ol_link_perl=yes
3722         fi
3723 fi
3724
3725 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3726 echo "configure:3727: checking how to run the C preprocessor" >&5
3727 # On Suns, sometimes $CPP names a directory.
3728 if test -n "$CPP" && test -d "$CPP"; then
3729   CPP=
3730 fi
3731 if test -z "$CPP"; then
3732 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3733   echo $ac_n "(cached) $ac_c" 1>&6
3734 else
3735     # This must be in double quotes, not single quotes, because CPP may get
3736   # substituted into the Makefile and "${CC-cc}" will confuse make.
3737   CPP="${CC-cc} -E"
3738   # On the NeXT, cc -E runs the code through the compiler's parser,
3739   # not just through cpp.
3740   cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743 #include <assert.h>
3744 Syntax Error
3745 EOF
3746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3747 { (eval echo configure:3748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3749 if test -z "$ac_err"; then
3750   :
3751 else
3752   echo "$ac_err" >&5
3753   echo "configure: failed program was:" >&5
3754   cat conftest.$ac_ext >&5
3755   rm -rf conftest*
3756   CPP="${CC-cc} -E -traditional-cpp"
3757   cat > conftest.$ac_ext <<EOF
3758 #line 3759 "configure"
3759 #include "confdefs.h"
3760 #include <assert.h>
3761 Syntax Error
3762 EOF
3763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3764 { (eval echo configure:3765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3766 if test -z "$ac_err"; then
3767   :
3768 else
3769   echo "$ac_err" >&5
3770   echo "configure: failed program was:" >&5
3771   cat conftest.$ac_ext >&5
3772   rm -rf conftest*
3773   CPP="${CC-cc} -nologo -E"
3774   cat > conftest.$ac_ext <<EOF
3775 #line 3776 "configure"
3776 #include "confdefs.h"
3777 #include <assert.h>
3778 Syntax Error
3779 EOF
3780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3781 { (eval echo configure:3782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3783 if test -z "$ac_err"; then
3784   :
3785 else
3786   echo "$ac_err" >&5
3787   echo "configure: failed program was:" >&5
3788   cat conftest.$ac_ext >&5
3789   rm -rf conftest*
3790   CPP=/lib/cpp
3791 fi
3792 rm -f conftest*
3793 fi
3794 rm -f conftest*
3795 fi
3796 rm -f conftest*
3797   ac_cv_prog_CPP="$CPP"
3798 fi
3799   CPP="$ac_cv_prog_CPP"
3800 else
3801   ac_cv_prog_CPP="$CPP"
3802 fi
3803 echo "$ac_t""$CPP" 1>&6
3804
3805
3806 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3807         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3808
3809 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3810         echo "configure: warning: programs compiled here do run here..." 1>&2
3811         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3812
3813 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3814         echo "configure: warning: programs compiled here do not run here..." 1>&2
3815         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3816 fi
3817
3818 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3819 echo "configure:3820: checking for AIX" >&5
3820 cat > conftest.$ac_ext <<EOF
3821 #line 3822 "configure"
3822 #include "confdefs.h"
3823 #ifdef _AIX
3824   yes
3825 #endif
3826
3827 EOF
3828 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3829   egrep "yes" >/dev/null 2>&1; then
3830   rm -rf conftest*
3831   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3832 #define _ALL_SOURCE 1
3833 EOF
3834
3835 else
3836   rm -rf conftest*
3837   echo "$ac_t""no" 1>&6
3838 fi
3839 rm -f conftest*
3840
3841
3842 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3843 echo "configure:3844: checking for POSIXized ISC" >&5
3844 if test -d /etc/conf/kconfig.d &&
3845   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3846 then
3847   echo "$ac_t""yes" 1>&6
3848   ISC=yes # If later tests want to check for ISC.
3849   cat >> confdefs.h <<\EOF
3850 #define _POSIX_SOURCE 1
3851 EOF
3852
3853   if test "$GCC" = yes; then
3854     CC="$CC -posix"
3855   else
3856     CC="$CC -Xp"
3857   fi
3858 else
3859   echo "$ac_t""no" 1>&6
3860   ISC=
3861 fi
3862
3863 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3864 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3865 echo "configure:3866: checking for minix/config.h" >&5
3866 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3867   echo $ac_n "(cached) $ac_c" 1>&6
3868 else
3869   cat > conftest.$ac_ext <<EOF
3870 #line 3871 "configure"
3871 #include "confdefs.h"
3872 #include <minix/config.h>
3873 EOF
3874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3875 { (eval echo configure:3876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3877 if test -z "$ac_err"; then
3878   rm -rf conftest*
3879   eval "ac_cv_header_$ac_safe=yes"
3880 else
3881   echo "$ac_err" >&5
3882   echo "configure: failed program was:" >&5
3883   cat conftest.$ac_ext >&5
3884   rm -rf conftest*
3885   eval "ac_cv_header_$ac_safe=no"
3886 fi
3887 rm -f conftest*
3888 fi
3889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3890   echo "$ac_t""yes" 1>&6
3891   MINIX=yes
3892 else
3893   echo "$ac_t""no" 1>&6
3894 MINIX=
3895 fi
3896
3897 if test "$MINIX" = yes; then
3898   cat >> confdefs.h <<\EOF
3899 #define _POSIX_SOURCE 1
3900 EOF
3901
3902   cat >> confdefs.h <<\EOF
3903 #define _POSIX_1_SOURCE 2
3904 EOF
3905
3906   cat >> confdefs.h <<\EOF
3907 #define _MINIX 1
3908 EOF
3909
3910 fi
3911
3912
3913 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3914 echo "configure:3915: checking for Cygwin environment" >&5
3915 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3916   echo $ac_n "(cached) $ac_c" 1>&6
3917 else
3918   cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921
3922 int main() {
3923
3924 #ifndef __CYGWIN__
3925 #define __CYGWIN__ __CYGWIN32__
3926 #endif
3927 return __CYGWIN__;
3928 ; return 0; }
3929 EOF
3930 if { (eval echo configure:3931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3931   rm -rf conftest*
3932   ac_cv_cygwin=yes
3933 else
3934   echo "configure: failed program was:" >&5
3935   cat conftest.$ac_ext >&5
3936   rm -rf conftest*
3937   ac_cv_cygwin=no
3938 fi
3939 rm -f conftest*
3940 fi
3941
3942 echo "$ac_t""$ac_cv_cygwin" 1>&6
3943 CYGWIN=
3944 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3945 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3946 echo "configure:3947: checking for mingw32 environment" >&5
3947 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3948   echo $ac_n "(cached) $ac_c" 1>&6
3949 else
3950   cat > conftest.$ac_ext <<EOF
3951 #line 3952 "configure"
3952 #include "confdefs.h"
3953
3954 int main() {
3955 return __MINGW32__;
3956 ; return 0; }
3957 EOF
3958 if { (eval echo configure:3959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3959   rm -rf conftest*
3960   ac_cv_mingw32=yes
3961 else
3962   echo "configure: failed program was:" >&5
3963   cat conftest.$ac_ext >&5
3964   rm -rf conftest*
3965   ac_cv_mingw32=no
3966 fi
3967 rm -f conftest*
3968 fi
3969
3970 echo "$ac_t""$ac_cv_mingw32" 1>&6
3971 MINGW32=
3972 test "$ac_cv_mingw32" = yes && MINGW32=yes
3973 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3974 echo "configure:3975: checking for EMX OS/2 environment" >&5
3975 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3976   echo $ac_n "(cached) $ac_c" 1>&6
3977 else
3978   cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981
3982 int main() {
3983 return __EMX__;
3984 ; return 0; }
3985 EOF
3986 if { (eval echo configure:3987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3987   rm -rf conftest*
3988   ac_cv_emxos2=yes
3989 else
3990   echo "configure: failed program was:" >&5
3991   cat conftest.$ac_ext >&5
3992   rm -rf conftest*
3993   ac_cv_emxos2=no
3994 fi
3995 rm -f conftest*
3996 fi
3997
3998 echo "$ac_t""$ac_cv_emxos2" 1>&6
3999 EMXOS2=
4000 test "$ac_cv_emxos2" = yes && EMXOS2=yes
4001
4002
4003
4004 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4005 echo "configure:4006: checking for executable suffix" >&5
4006 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4007   echo $ac_n "(cached) $ac_c" 1>&6
4008 else
4009   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4010   ac_cv_exeext=.exe
4011 else
4012   rm -f conftest*
4013   echo 'int main () { return 0; }' > conftest.$ac_ext
4014   ac_cv_exeext=
4015   if { (eval echo configure:4016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4016     for file in conftest.*; do
4017       case $file in
4018       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4019       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4020       esac
4021     done
4022   else
4023     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4024   fi
4025   rm -f conftest*
4026   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4027 fi
4028 fi
4029
4030 EXEEXT=""
4031 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4032 echo "$ac_t""${ac_cv_exeext}" 1>&6
4033 ac_exeext=$EXEEXT
4034
4035 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4036 echo "configure:4037: checking for object suffix" >&5
4037 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4038   echo $ac_n "(cached) $ac_c" 1>&6
4039 else
4040   rm -f conftest*
4041 echo 'int i = 1;' > conftest.$ac_ext
4042 if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4043   for ac_file in conftest.*; do
4044     case $ac_file in
4045     *.c) ;;
4046     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4047     esac
4048   done
4049 else
4050   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4051 fi
4052 rm -f conftest*
4053 fi
4054
4055 echo "$ac_t""$ac_cv_objext" 1>&6
4056 OBJEXT=$ac_cv_objext
4057 ac_objext=$ac_cv_objext
4058
4059
4060 cat >> confdefs.h <<EOF
4061 #define EXEEXT "${EXEEXT}"
4062 EOF
4063
4064
4065 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4066 echo "configure:4067: checking for be_app in -lbe" >&5
4067 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4068 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4069   echo $ac_n "(cached) $ac_c" 1>&6
4070 else
4071   ac_save_LIBS="$LIBS"
4072 LIBS="-lbe -lroot -lnet $LIBS"
4073 cat > conftest.$ac_ext <<EOF
4074 #line 4075 "configure"
4075 #include "confdefs.h"
4076 /* Override any gcc2 internal prototype to avoid an error.  */
4077 /* We use char because int might match the return type of a gcc2
4078     builtin and then its argument prototype would still apply.  */
4079 char be_app();
4080
4081 int main() {
4082 be_app()
4083 ; return 0; }
4084 EOF
4085 if { (eval echo configure:4086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4086   rm -rf conftest*
4087   eval "ac_cv_lib_$ac_lib_var=yes"
4088 else
4089   echo "configure: failed program was:" >&5
4090   cat conftest.$ac_ext >&5
4091   rm -rf conftest*
4092   eval "ac_cv_lib_$ac_lib_var=no"
4093 fi
4094 rm -f conftest*
4095 LIBS="$ac_save_LIBS"
4096
4097 fi
4098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4099   echo "$ac_t""yes" 1>&6
4100   LIBS="$LIBS -lbe -lroot -lnet"
4101 else
4102   echo "$ac_t""no" 1>&6
4103 :
4104 fi
4105
4106
4107
4108
4109
4110 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4111 echo "configure:4112: checking for ${CC-cc} option to accept ANSI C" >&5
4112 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4113   echo $ac_n "(cached) $ac_c" 1>&6
4114 else
4115   am_cv_prog_cc_stdc=no
4116 ac_save_CC="$CC"
4117 # Don't try gcc -ansi; that turns off useful extensions and
4118 # breaks some systems' header files.
4119 # AIX                   -qlanglvl=ansi
4120 # Ultrix and OSF/1      -std1
4121 # HP-UX 10.20 and later -Ae
4122 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4123 # SVR4                  -Xc -D__EXTENSIONS__
4124 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4125 do
4126   CC="$ac_save_CC $ac_arg"
4127   cat > conftest.$ac_ext <<EOF
4128 #line 4129 "configure"
4129 #include "confdefs.h"
4130 #include <stdarg.h>
4131 #include <stdio.h>
4132 #include <sys/types.h>
4133 #include <sys/stat.h>
4134 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4135 struct buf { int x; };
4136 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4137 static char *e (p, i)
4138      char **p;
4139      int i;
4140 {
4141   return p[i];
4142 }
4143 static char *f (char * (*g) (char **, int), char **p, ...)
4144 {
4145   char *s;
4146   va_list v;
4147   va_start (v,p);
4148   s = g (p, va_arg (v,int));
4149   va_end (v);
4150   return s;
4151 }
4152 int test (int i, double x);
4153 struct s1 {int (*f) (int a);};
4154 struct s2 {int (*f) (double a);};
4155 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4156 int argc;
4157 char **argv;
4158
4159 int main() {
4160
4161 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4162
4163 ; return 0; }
4164 EOF
4165 if { (eval echo configure:4166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4166   rm -rf conftest*
4167   am_cv_prog_cc_stdc="$ac_arg"; break
4168 else
4169   echo "configure: failed program was:" >&5
4170   cat conftest.$ac_ext >&5
4171 fi
4172 rm -f conftest*
4173 done
4174 CC="$ac_save_CC"
4175
4176 fi
4177
4178 if test -z "$am_cv_prog_cc_stdc"; then
4179   echo "$ac_t""none needed" 1>&6
4180 else
4181   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4182 fi
4183 case "x$am_cv_prog_cc_stdc" in
4184   x|xno) ;;
4185   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4186 esac
4187
4188 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4189         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4190 fi
4191
4192 # test for make depend flag
4193 OL_MKDEP=
4194 OL_MKDEP_FLAGS=
4195 if test -z "${MKDEP}"; then
4196         OL_MKDEP="${CC-cc}"
4197         if test -z "${MKDEP_FLAGS}"; then
4198                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4199 echo "configure:4200: checking for ${OL_MKDEP} depend flag" >&5
4200 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4201   echo $ac_n "(cached) $ac_c" 1>&6
4202 else
4203   
4204                         ol_cv_mkdep=no
4205                         for flag in "-M" "-xM"; do
4206                                 cat > conftest.c <<EOF
4207  noCode;
4208 EOF
4209                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4210                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4211                                 then
4212                                         if test ! -f conftest."${ac_object}" ; then
4213                                                 ol_cv_mkdep=$flag
4214                                                 OL_MKDEP_FLAGS="$flag"
4215                                                 break
4216                                         fi
4217                                 fi
4218                         done
4219                         rm -f conftest*
4220                 
4221 fi
4222
4223 echo "$ac_t""$ol_cv_mkdep" 1>&6
4224         else
4225                 cc_cv_mkdep=yes
4226                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4227         fi
4228 else
4229         cc_cv_mkdep=yes
4230         OL_MKDEP="${MKDEP}"
4231         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4232 fi
4233
4234
4235
4236 if test "${ol_cv_mkdep}" = no ; then
4237         # this will soon become an error
4238         echo "configure: warning: do not know how to generate dependencies" 1>&2
4239 fi
4240
4241 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4242 echo "configure:4243: checking for afopen in -ls" >&5
4243 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4245   echo $ac_n "(cached) $ac_c" 1>&6
4246 else
4247   ac_save_LIBS="$LIBS"
4248 LIBS="-ls  $LIBS"
4249 cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4252 /* Override any gcc2 internal prototype to avoid an error.  */
4253 /* We use char because int might match the return type of a gcc2
4254     builtin and then its argument prototype would still apply.  */
4255 char afopen();
4256
4257 int main() {
4258 afopen()
4259 ; return 0; }
4260 EOF
4261 if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4262   rm -rf conftest*
4263   eval "ac_cv_lib_$ac_lib_var=yes"
4264 else
4265   echo "configure: failed program was:" >&5
4266   cat conftest.$ac_ext >&5
4267   rm -rf conftest*
4268   eval "ac_cv_lib_$ac_lib_var=no"
4269 fi
4270 rm -f conftest*
4271 LIBS="$ac_save_LIBS"
4272
4273 fi
4274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4275   echo "$ac_t""yes" 1>&6
4276   
4277         AUTH_LIBS=-ls
4278         cat >> confdefs.h <<\EOF
4279 #define HAVE_AIX_SECURITY 1
4280 EOF
4281
4282
4283 else
4284   echo "$ac_t""no" 1>&6
4285 fi
4286
4287
4288 ol_link_modules=no
4289 if test $ol_enable_modules != no ; then
4290         for ac_hdr in ltdl.h
4291 do
4292 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4293 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4294 echo "configure:4295: checking for $ac_hdr" >&5
4295 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4296   echo $ac_n "(cached) $ac_c" 1>&6
4297 else
4298   cat > conftest.$ac_ext <<EOF
4299 #line 4300 "configure"
4300 #include "confdefs.h"
4301 #include <$ac_hdr>
4302 EOF
4303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4304 { (eval echo configure:4305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4306 if test -z "$ac_err"; then
4307   rm -rf conftest*
4308   eval "ac_cv_header_$ac_safe=yes"
4309 else
4310   echo "$ac_err" >&5
4311   echo "configure: failed program was:" >&5
4312   cat conftest.$ac_ext >&5
4313   rm -rf conftest*
4314   eval "ac_cv_header_$ac_safe=no"
4315 fi
4316 rm -f conftest*
4317 fi
4318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4319   echo "$ac_t""yes" 1>&6
4320     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4321   cat >> confdefs.h <<EOF
4322 #define $ac_tr_hdr 1
4323 EOF
4324  
4325 else
4326   echo "$ac_t""no" 1>&6
4327 fi
4328 done
4329
4330
4331         if test $ac_cv_header_ltdl_h = no ; then
4332                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4333         fi
4334
4335         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4336 echo "configure:4337: checking for lt_dlinit in -lltdl" >&5
4337 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4338 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4339   echo $ac_n "(cached) $ac_c" 1>&6
4340 else
4341   ac_save_LIBS="$LIBS"
4342 LIBS="-lltdl  $LIBS"
4343 cat > conftest.$ac_ext <<EOF
4344 #line 4345 "configure"
4345 #include "confdefs.h"
4346 /* Override any gcc2 internal prototype to avoid an error.  */
4347 /* We use char because int might match the return type of a gcc2
4348     builtin and then its argument prototype would still apply.  */
4349 char lt_dlinit();
4350
4351 int main() {
4352 lt_dlinit()
4353 ; return 0; }
4354 EOF
4355 if { (eval echo configure:4356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4356   rm -rf conftest*
4357   eval "ac_cv_lib_$ac_lib_var=yes"
4358 else
4359   echo "configure: failed program was:" >&5
4360   cat conftest.$ac_ext >&5
4361   rm -rf conftest*
4362   eval "ac_cv_lib_$ac_lib_var=no"
4363 fi
4364 rm -f conftest*
4365 LIBS="$ac_save_LIBS"
4366
4367 fi
4368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4369   echo "$ac_t""yes" 1>&6
4370   
4371             MODULES_LIBS=-lltdl
4372             cat >> confdefs.h <<\EOF
4373 #define HAVE_LIBLTDL 1
4374 EOF
4375
4376         
4377 else
4378   echo "$ac_t""no" 1>&6
4379 fi
4380
4381
4382         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4383                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4384         fi
4385         ol_link_modules=yes
4386 else
4387         ol_with_bdb2_module=static
4388         ol_with_dnssrv_module=static
4389         ol_with_ldap_module=static
4390         ol_with_ldbm_module=static
4391         ol_with_passwd_module=static
4392         ol_with_perl_module=static
4393         ol_with_shell_module=static
4394         ol_with_tcl_module=static
4395         ol_with_sql_module=static
4396 fi
4397
4398 # test for EBCDIC
4399 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4400 echo "configure:4401: checking for EBCDIC" >&5
4401 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4402   echo $ac_n "(cached) $ac_c" 1>&6
4403 else
4404   
4405         cat > conftest.$ac_ext <<EOF
4406 #line 4407 "configure"
4407 #include "confdefs.h"
4408
4409 #if !('M' == 0xd4)
4410 #include <__ASCII__/generate_error.h>
4411 #endif
4412
4413 EOF
4414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4415 { (eval echo configure:4416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4417 if test -z "$ac_err"; then
4418   rm -rf conftest*
4419   ol_cv_cpp_ebcdic=yes
4420 else
4421   echo "$ac_err" >&5
4422   echo "configure: failed program was:" >&5
4423   cat conftest.$ac_ext >&5
4424   rm -rf conftest*
4425   ol_cv_cpp_ebcdic=no
4426 fi
4427 rm -f conftest*
4428 fi
4429
4430 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4431 if test $ol_cv_cpp_ebcdic = yes ; then
4432         cat >> confdefs.h <<\EOF
4433 #define HAVE_EBCDIC 1
4434 EOF
4435
4436 fi
4437
4438 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4439 echo "configure:4440: checking for ANSI C header files" >&5
4440 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4441   echo $ac_n "(cached) $ac_c" 1>&6
4442 else
4443   cat > conftest.$ac_ext <<EOF
4444 #line 4445 "configure"
4445 #include "confdefs.h"
4446 #include <stdlib.h>
4447 #include <stdarg.h>
4448 #include <string.h>
4449 #include <float.h>
4450 EOF
4451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4452 { (eval echo configure:4453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4454 if test -z "$ac_err"; then
4455   rm -rf conftest*
4456   ol_cv_header_stdc=yes
4457 else
4458   echo "$ac_err" >&5
4459   echo "configure: failed program was:" >&5
4460   cat conftest.$ac_ext >&5
4461   rm -rf conftest*
4462   ol_cv_header_stdc=no
4463 fi
4464 rm -f conftest*
4465
4466 if test $ol_cv_header_stdc = yes; then
4467   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4468 cat > conftest.$ac_ext <<EOF
4469 #line 4470 "configure"
4470 #include "confdefs.h"
4471 #include <string.h>
4472 EOF
4473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4474   egrep "memchr" >/dev/null 2>&1; then
4475   :
4476 else
4477   rm -rf conftest*
4478   ol_cv_header_stdc=no
4479 fi
4480 rm -f conftest*
4481
4482 fi
4483
4484 if test $ol_cv_header_stdc = yes; then
4485   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4486 cat > conftest.$ac_ext <<EOF
4487 #line 4488 "configure"
4488 #include "confdefs.h"
4489 #include <stdlib.h>
4490 EOF
4491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4492   egrep "free" >/dev/null 2>&1; then
4493   :
4494 else
4495   rm -rf conftest*
4496   ol_cv_header_stdc=no
4497 fi
4498 rm -f conftest*
4499
4500 fi
4501
4502 if test $ol_cv_header_stdc = yes; then
4503   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4504 if test "$cross_compiling" = yes; then
4505   :
4506 else
4507   cat > conftest.$ac_ext <<EOF
4508 #line 4509 "configure"
4509 #include "confdefs.h"
4510 #include <ctype.h>
4511 #ifndef HAVE_EBCDIC
4512 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4513 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4514 #else
4515 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4516                 || ('j' <= (c) && (c) <= 'r') \
4517                 || ('s' <= (c) && (c) <= 'z'))
4518 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4519 #endif
4520 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4521 int main () { int i; for (i = 0; i < 256; i++)
4522 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4523 exit (0); }
4524
4525 EOF
4526 if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4527 then
4528   :
4529 else
4530   echo "configure: failed program was:" >&5
4531   cat conftest.$ac_ext >&5
4532   rm -fr conftest*
4533   ol_cv_header_stdc=no
4534 fi
4535 rm -fr conftest*
4536 fi
4537
4538 fi
4539 fi
4540
4541 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4542 if test $ol_cv_header_stdc = yes; then
4543   cat >> confdefs.h <<\EOF
4544 #define STDC_HEADERS 1
4545 EOF
4546
4547 fi
4548 ac_cv_header_stdc=disable
4549
4550
4551 if test $ol_cv_header_stdc != yes; then
4552         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4553 fi
4554
4555 ac_header_dirent=no
4556 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4557 do
4558 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4559 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4560 echo "configure:4561: checking for $ac_hdr that defines DIR" >&5
4561 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4562   echo $ac_n "(cached) $ac_c" 1>&6
4563 else
4564   cat > conftest.$ac_ext <<EOF
4565 #line 4566 "configure"
4566 #include "confdefs.h"
4567 #include <sys/types.h>
4568 #include <$ac_hdr>
4569 int main() {
4570 DIR *dirp = 0;
4571 ; return 0; }
4572 EOF
4573 if { (eval echo configure:4574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4574   rm -rf conftest*
4575   eval "ac_cv_header_dirent_$ac_safe=yes"
4576 else
4577   echo "configure: failed program was:" >&5
4578   cat conftest.$ac_ext >&5
4579   rm -rf conftest*
4580   eval "ac_cv_header_dirent_$ac_safe=no"
4581 fi
4582 rm -f conftest*
4583 fi
4584 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4585   echo "$ac_t""yes" 1>&6
4586     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4587   cat >> confdefs.h <<EOF
4588 #define $ac_tr_hdr 1
4589 EOF
4590  ac_header_dirent=$ac_hdr; break
4591 else
4592   echo "$ac_t""no" 1>&6
4593 fi
4594 done
4595 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4596 if test $ac_header_dirent = dirent.h; then
4597 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4598 echo "configure:4599: checking for opendir in -ldir" >&5
4599 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4600 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4601   echo $ac_n "(cached) $ac_c" 1>&6
4602 else
4603   ac_save_LIBS="$LIBS"
4604 LIBS="-ldir  $LIBS"
4605 cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 /* Override any gcc2 internal prototype to avoid an error.  */
4609 /* We use char because int might match the return type of a gcc2
4610     builtin and then its argument prototype would still apply.  */
4611 char opendir();
4612
4613 int main() {
4614 opendir()
4615 ; return 0; }
4616 EOF
4617 if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4618   rm -rf conftest*
4619   eval "ac_cv_lib_$ac_lib_var=yes"
4620 else
4621   echo "configure: failed program was:" >&5
4622   cat conftest.$ac_ext >&5
4623   rm -rf conftest*
4624   eval "ac_cv_lib_$ac_lib_var=no"
4625 fi
4626 rm -f conftest*
4627 LIBS="$ac_save_LIBS"
4628
4629 fi
4630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4631   echo "$ac_t""yes" 1>&6
4632   LIBS="$LIBS -ldir"
4633 else
4634   echo "$ac_t""no" 1>&6
4635 fi
4636
4637 else
4638 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4639 echo "configure:4640: checking for opendir in -lx" >&5
4640 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4641 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4642   echo $ac_n "(cached) $ac_c" 1>&6
4643 else
4644   ac_save_LIBS="$LIBS"
4645 LIBS="-lx  $LIBS"
4646 cat > conftest.$ac_ext <<EOF
4647 #line 4648 "configure"
4648 #include "confdefs.h"
4649 /* Override any gcc2 internal prototype to avoid an error.  */
4650 /* We use char because int might match the return type of a gcc2
4651     builtin and then its argument prototype would still apply.  */
4652 char opendir();
4653
4654 int main() {
4655 opendir()
4656 ; return 0; }
4657 EOF
4658 if { (eval echo configure:4659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4659   rm -rf conftest*
4660   eval "ac_cv_lib_$ac_lib_var=yes"
4661 else
4662   echo "configure: failed program was:" >&5
4663   cat conftest.$ac_ext >&5
4664   rm -rf conftest*
4665   eval "ac_cv_lib_$ac_lib_var=no"
4666 fi
4667 rm -f conftest*
4668 LIBS="$ac_save_LIBS"
4669
4670 fi
4671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4672   echo "$ac_t""yes" 1>&6
4673   LIBS="$LIBS -lx"
4674 else
4675   echo "$ac_t""no" 1>&6
4676 fi
4677
4678 fi
4679
4680 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4681 echo "configure:4682: checking for sys/wait.h that is POSIX.1 compatible" >&5
4682 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4683   echo $ac_n "(cached) $ac_c" 1>&6
4684 else
4685   cat > conftest.$ac_ext <<EOF
4686 #line 4687 "configure"
4687 #include "confdefs.h"
4688 #include <sys/types.h>
4689 #include <sys/wait.h>
4690 #ifndef WEXITSTATUS
4691 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4692 #endif
4693 #ifndef WIFEXITED
4694 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4695 #endif
4696 int main() {
4697 int s;
4698 wait (&s);
4699 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4700 ; return 0; }
4701 EOF
4702 if { (eval echo configure:4703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4703   rm -rf conftest*
4704   ac_cv_header_sys_wait_h=yes
4705 else
4706   echo "configure: failed program was:" >&5
4707   cat conftest.$ac_ext >&5
4708   rm -rf conftest*
4709   ac_cv_header_sys_wait_h=no
4710 fi
4711 rm -f conftest*
4712 fi
4713
4714 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4715 if test $ac_cv_header_sys_wait_h = yes; then
4716   cat >> confdefs.h <<\EOF
4717 #define HAVE_SYS_WAIT_H 1
4718 EOF
4719
4720 fi
4721
4722 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4723 echo "configure:4724: checking POSIX termios" >&5
4724 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4725   echo $ac_n "(cached) $ac_c" 1>&6
4726 else
4727   cat > conftest.$ac_ext <<EOF
4728 #line 4729 "configure"
4729 #include "confdefs.h"
4730 #include <sys/types.h>
4731 #include <unistd.h>
4732 #include <termios.h>
4733 int main() {
4734 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4735    tcgetattr(0, 0);
4736 ; return 0; }
4737 EOF
4738 if { (eval echo configure:4739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4739   rm -rf conftest*
4740   am_cv_sys_posix_termios=yes
4741 else
4742   echo "configure: failed program was:" >&5
4743   cat conftest.$ac_ext >&5
4744   rm -rf conftest*
4745   am_cv_sys_posix_termios=no
4746 fi
4747 rm -f conftest*
4748 fi
4749
4750 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4751
4752
4753  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4754 echo "configure:4755: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4755 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4756   echo $ac_n "(cached) $ac_c" 1>&6
4757 else
4758   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4759
4760   gwinsz_in_termios_h=no
4761   if test $am_cv_sys_posix_termios = yes; then
4762     cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765 #include <sys/types.h>
4766 #     include <termios.h>
4767 #     ifdef TIOCGWINSZ
4768         yes
4769 #     endif
4770     
4771 EOF
4772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4773   egrep "yes" >/dev/null 2>&1; then
4774   rm -rf conftest*
4775   gwinsz_in_termios_h=yes
4776 fi
4777 rm -f conftest*
4778
4779   fi
4780
4781   if test $gwinsz_in_termios_h = no; then
4782     cat > conftest.$ac_ext <<EOF
4783 #line 4784 "configure"
4784 #include "confdefs.h"
4785 #include <sys/types.h>
4786 #     include <sys/ioctl.h>
4787 #     ifdef TIOCGWINSZ
4788         yes
4789 #     endif
4790     
4791 EOF
4792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4793   egrep "yes" >/dev/null 2>&1; then
4794   rm -rf conftest*
4795   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4796 fi
4797 rm -f conftest*
4798
4799   fi
4800   
4801 fi
4802
4803 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4804   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4805     cat >> confdefs.h <<\EOF
4806 #define GWINSZ_IN_SYS_IOCTL 1
4807 EOF
4808
4809   fi
4810
4811 if test $am_cv_sys_posix_termios = yes ; then
4812         cat >> confdefs.h <<\EOF
4813 #define HAVE_POSIX_TERMIOS 1
4814 EOF
4815
4816 fi
4817
4818 for ac_hdr in \
4819         arpa/inet.h             \
4820         arpa/nameser.h  \
4821         assert.h                \
4822         conio.h                 \
4823         crypt.h                 \
4824         direct.h                \
4825         errno.h                 \
4826         fcntl.h                 \
4827         filio.h                 \
4828         getopt.h                \
4829         grp.h                   \
4830         io.h                    \
4831         libutil.h               \
4832         limits.h                \
4833         locale.h                \
4834         netinet/tcp.h   \
4835         malloc.h                \
4836         memory.h                \
4837         psap.h                  \
4838         pwd.h                   \
4839         process.h               \
4840         resolv.h                \
4841         sgtty.h                 \
4842         shadow.h                \
4843         stddef.h                \
4844         string.h                \
4845         strings.h               \
4846         sysexits.h              \
4847         sys/file.h              \
4848         sys/filio.h             \
4849         sys/errno.h             \
4850         sys/ioctl.h             \
4851         sys/param.h             \
4852         sys/resource.h  \
4853         sys/select.h    \
4854         sys/socket.h    \
4855         sys/syslog.h    \
4856         sys/time.h              \
4857         sys/types.h             \
4858         syslog.h                \
4859         termios.h               \
4860         unistd.h                \
4861         winsock.h               \
4862
4863 do
4864 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4865 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4866 echo "configure:4867: checking for $ac_hdr" >&5
4867 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4868   echo $ac_n "(cached) $ac_c" 1>&6
4869 else
4870   cat > conftest.$ac_ext <<EOF
4871 #line 4872 "configure"
4872 #include "confdefs.h"
4873 #include <$ac_hdr>
4874 EOF
4875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4876 { (eval echo configure:4877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4878 if test -z "$ac_err"; then
4879   rm -rf conftest*
4880   eval "ac_cv_header_$ac_safe=yes"
4881 else
4882   echo "$ac_err" >&5
4883   echo "configure: failed program was:" >&5
4884   cat conftest.$ac_ext >&5
4885   rm -rf conftest*
4886   eval "ac_cv_header_$ac_safe=no"
4887 fi
4888 rm -f conftest*
4889 fi
4890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4891   echo "$ac_t""yes" 1>&6
4892     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4893   cat >> confdefs.h <<EOF
4894 #define $ac_tr_hdr 1
4895 EOF
4896  
4897 else
4898   echo "$ac_t""no" 1>&6
4899 fi
4900 done
4901
4902
4903
4904
4905 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4906 echo "configure:4907: checking for sigset in -lV3" >&5
4907 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4908 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4909   echo $ac_n "(cached) $ac_c" 1>&6
4910 else
4911   ac_save_LIBS="$LIBS"
4912 LIBS="-lV3  $LIBS"
4913 cat > conftest.$ac_ext <<EOF
4914 #line 4915 "configure"
4915 #include "confdefs.h"
4916 /* Override any gcc2 internal prototype to avoid an error.  */
4917 /* We use char because int might match the return type of a gcc2
4918     builtin and then its argument prototype would still apply.  */
4919 char sigset();
4920
4921 int main() {
4922 sigset()
4923 ; return 0; }
4924 EOF
4925 if { (eval echo configure:4926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4926   rm -rf conftest*
4927   eval "ac_cv_lib_$ac_lib_var=yes"
4928 else
4929   echo "configure: failed program was:" >&5
4930   cat conftest.$ac_ext >&5
4931   rm -rf conftest*
4932   eval "ac_cv_lib_$ac_lib_var=no"
4933 fi
4934 rm -f conftest*
4935 LIBS="$ac_save_LIBS"
4936
4937 fi
4938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4939   echo "$ac_t""yes" 1>&6
4940     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4941     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4942   cat >> confdefs.h <<EOF
4943 #define $ac_tr_lib 1
4944 EOF
4945
4946   LIBS="-lV3 $LIBS"
4947
4948 else
4949   echo "$ac_t""no" 1>&6
4950 fi
4951
4952
4953 if test $ac_cv_header_winsock_h = yes; then
4954         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4955 echo "configure:4956: checking for winsock" >&5
4956 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4957   echo $ac_n "(cached) $ac_c" 1>&6
4958 else
4959   cat > conftest.$ac_ext <<EOF
4960 #line 4961 "configure"
4961 #include "confdefs.h"
4962 #include <winsock.h>
4963 int main() {
4964
4965                         socket(0,0,0);
4966                         select(0,NULL,NULL,NULL,NULL);
4967                         closesocket(0);
4968                         gethostname(NULL,0);
4969         
4970 ; return 0; }
4971 EOF
4972 if { (eval echo configure:4973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4973   rm -rf conftest*
4974   ol_cv_winsock=yes
4975 else
4976   echo "configure: failed program was:" >&5
4977   cat conftest.$ac_ext >&5
4978   rm -rf conftest*
4979   ol_cv_winsock=no
4980 fi
4981 rm -f conftest*]
4982 fi
4983
4984 echo "$ac_t""$ol_cv_winsock" 1>&6
4985
4986         if test $ol_cv_winsock = yes ; then
4987                 cat >> confdefs.h <<\EOF
4988 #define HAVE_WINSOCK 1
4989 EOF
4990
4991                 ac_cv_func_socket=yes
4992                 ac_cv_func_select=yes
4993                 ac_cv_func_closesocket=yes
4994                 ac_cv_func_gethostname=yes
4995         fi
4996 fi
4997
4998
4999 echo $ac_n "checking for socket""... $ac_c" 1>&6
5000 echo "configure:5001: checking for socket" >&5
5001 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
5002   echo $ac_n "(cached) $ac_c" 1>&6
5003 else
5004   cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007 /* System header to define __stub macros and hopefully few prototypes,
5008     which can conflict with char socket(); below.  */
5009 #include <assert.h>
5010 /* Override any gcc2 internal prototype to avoid an error.  */
5011 /* We use char because int might match the return type of a gcc2
5012     builtin and then its argument prototype would still apply.  */
5013 char socket();
5014 char (*f)();
5015
5016 int main() {
5017
5018 /* The GNU C library defines this for functions which it implements
5019     to always fail with ENOSYS.  Some functions are actually named
5020     something starting with __ and the normal name is an alias.  */
5021 #if defined (__stub_socket) || defined (__stub___socket)
5022 choke me
5023 #else
5024 f = socket;
5025 #endif
5026
5027 ; return 0; }
5028 EOF
5029 if { (eval echo configure:5030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5030   rm -rf conftest*
5031   eval "ac_cv_func_socket=yes"
5032 else
5033   echo "configure: failed program was:" >&5
5034   cat conftest.$ac_ext >&5
5035   rm -rf conftest*
5036   eval "ac_cv_func_socket=no"
5037 fi
5038 rm -f conftest*
5039 fi
5040
5041 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5042   echo "$ac_t""yes" 1>&6
5043   :
5044 else
5045   echo "$ac_t""no" 1>&6
5046         
5047         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5048 echo "configure:5049: checking for main in -lsocket" >&5
5049 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5051   echo $ac_n "(cached) $ac_c" 1>&6
5052 else
5053   ac_save_LIBS="$LIBS"
5054 LIBS="-lsocket  $LIBS"
5055 cat > conftest.$ac_ext <<EOF
5056 #line 5057 "configure"
5057 #include "confdefs.h"
5058
5059 int main() {
5060 main()
5061 ; return 0; }
5062 EOF
5063 if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5064   rm -rf conftest*
5065   eval "ac_cv_lib_$ac_lib_var=yes"
5066 else
5067   echo "configure: failed program was:" >&5
5068   cat conftest.$ac_ext >&5
5069   rm -rf conftest*
5070   eval "ac_cv_lib_$ac_lib_var=no"
5071 fi
5072 rm -f conftest*
5073 LIBS="$ac_save_LIBS"
5074
5075 fi
5076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5077   echo "$ac_t""yes" 1>&6
5078     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5079     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5080   cat >> confdefs.h <<EOF
5081 #define $ac_tr_lib 1
5082 EOF
5083
5084   LIBS="-lsocket $LIBS"
5085
5086 else
5087   echo "$ac_t""no" 1>&6
5088 fi
5089
5090         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5091 echo "configure:5092: checking for main in -lnet" >&5
5092 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5093 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5094   echo $ac_n "(cached) $ac_c" 1>&6
5095 else
5096   ac_save_LIBS="$LIBS"
5097 LIBS="-lnet  $LIBS"
5098 cat > conftest.$ac_ext <<EOF
5099 #line 5100 "configure"
5100 #include "confdefs.h"
5101
5102 int main() {
5103 main()
5104 ; return 0; }
5105 EOF
5106 if { (eval echo configure:5107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5107   rm -rf conftest*
5108   eval "ac_cv_lib_$ac_lib_var=yes"
5109 else
5110   echo "configure: failed program was:" >&5
5111   cat conftest.$ac_ext >&5
5112   rm -rf conftest*
5113   eval "ac_cv_lib_$ac_lib_var=no"
5114 fi
5115 rm -f conftest*
5116 LIBS="$ac_save_LIBS"
5117
5118 fi
5119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5120   echo "$ac_t""yes" 1>&6
5121     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5122     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5123   cat >> confdefs.h <<EOF
5124 #define $ac_tr_lib 1
5125 EOF
5126
5127   LIBS="-lnet $LIBS"
5128
5129 else
5130   echo "$ac_t""no" 1>&6
5131 fi
5132
5133         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5134 echo "configure:5135: checking for main in -lnsl_s" >&5
5135 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5137   echo $ac_n "(cached) $ac_c" 1>&6
5138 else
5139   ac_save_LIBS="$LIBS"
5140 LIBS="-lnsl_s  $LIBS"
5141 cat > conftest.$ac_ext <<EOF
5142 #line 5143 "configure"
5143 #include "confdefs.h"
5144
5145 int main() {
5146 main()
5147 ; return 0; }
5148 EOF
5149 if { (eval echo configure:5150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5150   rm -rf conftest*
5151   eval "ac_cv_lib_$ac_lib_var=yes"
5152 else
5153   echo "configure: failed program was:" >&5
5154   cat conftest.$ac_ext >&5
5155   rm -rf conftest*
5156   eval "ac_cv_lib_$ac_lib_var=no"
5157 fi
5158 rm -f conftest*
5159 LIBS="$ac_save_LIBS"
5160
5161 fi
5162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5163   echo "$ac_t""yes" 1>&6
5164     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5165     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5166   cat >> confdefs.h <<EOF
5167 #define $ac_tr_lib 1
5168 EOF
5169
5170   LIBS="-lnsl_s $LIBS"
5171
5172 else
5173   echo "$ac_t""no" 1>&6
5174 fi
5175
5176         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5177 echo "configure:5178: checking for main in -lnsl" >&5
5178 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5179 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5180   echo $ac_n "(cached) $ac_c" 1>&6
5181 else
5182   ac_save_LIBS="$LIBS"
5183 LIBS="-lnsl  $LIBS"
5184 cat > conftest.$ac_ext <<EOF
5185 #line 5186 "configure"
5186 #include "confdefs.h"
5187
5188 int main() {
5189 main()
5190 ; return 0; }
5191 EOF
5192 if { (eval echo configure:5193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5193   rm -rf conftest*
5194   eval "ac_cv_lib_$ac_lib_var=yes"
5195 else
5196   echo "configure: failed program was:" >&5
5197   cat conftest.$ac_ext >&5
5198   rm -rf conftest*
5199   eval "ac_cv_lib_$ac_lib_var=no"
5200 fi
5201 rm -f conftest*
5202 LIBS="$ac_save_LIBS"
5203
5204 fi
5205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5206   echo "$ac_t""yes" 1>&6
5207     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5208     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5209   cat >> confdefs.h <<EOF
5210 #define $ac_tr_lib 1
5211 EOF
5212
5213   LIBS="-lnsl $LIBS"
5214
5215 else
5216   echo "$ac_t""no" 1>&6
5217 fi
5218
5219         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5220 echo "configure:5221: checking for socket in -linet" >&5
5221 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5222 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5223   echo $ac_n "(cached) $ac_c" 1>&6
5224 else
5225   ac_save_LIBS="$LIBS"
5226 LIBS="-linet  $LIBS"
5227 cat > conftest.$ac_ext <<EOF
5228 #line 5229 "configure"
5229 #include "confdefs.h"
5230 /* Override any gcc2 internal prototype to avoid an error.  */
5231 /* We use char because int might match the return type of a gcc2
5232     builtin and then its argument prototype would still apply.  */
5233 char socket();
5234
5235 int main() {
5236 socket()
5237 ; return 0; }
5238 EOF
5239 if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5240   rm -rf conftest*
5241   eval "ac_cv_lib_$ac_lib_var=yes"
5242 else
5243   echo "configure: failed program was:" >&5
5244   cat conftest.$ac_ext >&5
5245   rm -rf conftest*
5246   eval "ac_cv_lib_$ac_lib_var=no"
5247 fi
5248 rm -f conftest*
5249 LIBS="$ac_save_LIBS"
5250
5251 fi
5252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5253   echo "$ac_t""yes" 1>&6
5254     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5255     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5256   cat >> confdefs.h <<EOF
5257 #define $ac_tr_lib 1
5258 EOF
5259
5260   LIBS="-linet $LIBS"
5261
5262 else
5263   echo "$ac_t""no" 1>&6
5264 fi
5265
5266         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5267 echo "configure:5268: checking for main in -lgen" >&5
5268 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5269 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5270   echo $ac_n "(cached) $ac_c" 1>&6
5271 else
5272   ac_save_LIBS="$LIBS"
5273 LIBS="-lgen  $LIBS"
5274 cat > conftest.$ac_ext <<EOF
5275 #line 5276 "configure"
5276 #include "confdefs.h"
5277
5278 int main() {
5279 main()
5280 ; return 0; }
5281 EOF
5282 if { (eval echo configure:5283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5283   rm -rf conftest*
5284   eval "ac_cv_lib_$ac_lib_var=yes"
5285 else
5286   echo "configure: failed program was:" >&5
5287   cat conftest.$ac_ext >&5
5288   rm -rf conftest*
5289   eval "ac_cv_lib_$ac_lib_var=no"
5290 fi
5291 rm -f conftest*
5292 LIBS="$ac_save_LIBS"
5293
5294 fi
5295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5296   echo "$ac_t""yes" 1>&6
5297     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5298     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5299   cat >> confdefs.h <<EOF
5300 #define $ac_tr_lib 1
5301 EOF
5302
5303   LIBS="-lgen $LIBS"
5304
5305 else
5306   echo "$ac_t""no" 1>&6
5307 fi
5308
5309
5310 fi
5311
5312
5313 echo $ac_n "checking for select""... $ac_c" 1>&6
5314 echo "configure:5315: checking for select" >&5
5315 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5316   echo $ac_n "(cached) $ac_c" 1>&6
5317 else
5318   cat > conftest.$ac_ext <<EOF
5319 #line 5320 "configure"
5320 #include "confdefs.h"
5321 /* System header to define __stub macros and hopefully few prototypes,
5322     which can conflict with char select(); below.  */
5323 #include <assert.h>
5324 /* Override any gcc2 internal prototype to avoid an error.  */
5325 /* We use char because int might match the return type of a gcc2
5326     builtin and then its argument prototype would still apply.  */
5327 char select();
5328 char (*f)();
5329
5330 int main() {
5331
5332 /* The GNU C library defines this for functions which it implements
5333     to always fail with ENOSYS.  Some functions are actually named
5334     something starting with __ and the normal name is an alias.  */
5335 #if defined (__stub_select) || defined (__stub___select)
5336 choke me
5337 #else
5338 f = select;
5339 #endif
5340
5341 ; return 0; }
5342 EOF
5343 if { (eval echo configure:5344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5344   rm -rf conftest*
5345   eval "ac_cv_func_select=yes"
5346 else
5347   echo "configure: failed program was:" >&5
5348   cat conftest.$ac_ext >&5
5349   rm -rf conftest*
5350   eval "ac_cv_func_select=no"
5351 fi
5352 rm -f conftest*
5353 fi
5354
5355 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5356   echo "$ac_t""yes" 1>&6
5357   :
5358 else
5359   echo "$ac_t""no" 1>&6
5360 { echo "configure: error: select() required." 1>&2; exit 1; }
5361 fi
5362
5363
5364 if test "${ac_cv_header_winsock_h}" != yes; then
5365                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5366 echo "configure:5367: checking types of arguments for select()" >&5
5367  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5368   echo $ac_n "(cached) $ac_c" 1>&6
5369 else
5370    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5371   echo $ac_n "(cached) $ac_c" 1>&6
5372 else
5373     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5374   echo $ac_n "(cached) $ac_c" 1>&6
5375 else
5376      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5377      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5378       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5379        cat > conftest.$ac_ext <<EOF
5380 #line 5381 "configure"
5381 #include "confdefs.h"
5382 #ifdef HAVE_SYS_TYPES_H
5383 #include <sys/types.h>
5384 #endif
5385 #ifdef HAVE_SYS_TIME_H
5386 #include <sys/time.h>
5387 #endif
5388 #ifdef HAVE_SYS_SELECT_H
5389 #include <sys/select.h>
5390 #endif
5391 #ifdef HAVE_SYS_SOCKET_H
5392 #include <sys/socket.h>
5393 #endif
5394 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);
5395 int main() {
5396
5397 ; return 0; }
5398 EOF
5399 if { (eval echo configure:5400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5400   rm -rf conftest*
5401           ac_not_found=no ; break 3
5402 else
5403   echo "configure: failed program was:" >&5
5404   cat conftest.$ac_ext >&5
5405   rm -rf conftest*
5406   ac_not_found=yes
5407 fi
5408 rm -f conftest*
5409       done
5410      done
5411     done
5412    
5413 fi
5414   
5415 fi
5416  
5417 fi
5418  if test "$ac_not_found" = yes; then
5419   ac_cv_func_select_arg1=int 
5420   ac_cv_func_select_arg234='int *' 
5421   ac_cv_func_select_arg5='struct timeval *'
5422  fi
5423  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5424  cat >> confdefs.h <<EOF
5425 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5426 EOF
5427
5428  cat >> confdefs.h <<EOF
5429 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5430 EOF
5431
5432  cat >> confdefs.h <<EOF
5433 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5434 EOF
5435
5436
5437 fi
5438
5439
5440 for ac_hdr in regex.h 
5441 do
5442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5444 echo "configure:5445: checking for $ac_hdr" >&5
5445 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5446   echo $ac_n "(cached) $ac_c" 1>&6
5447 else
5448   cat > conftest.$ac_ext <<EOF
5449 #line 5450 "configure"
5450 #include "confdefs.h"
5451 #include <$ac_hdr>
5452 EOF
5453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5454 { (eval echo configure:5455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5456 if test -z "$ac_err"; then
5457   rm -rf conftest*
5458   eval "ac_cv_header_$ac_safe=yes"
5459 else
5460   echo "$ac_err" >&5
5461   echo "configure: failed program was:" >&5
5462   cat conftest.$ac_ext >&5
5463   rm -rf conftest*
5464   eval "ac_cv_header_$ac_safe=no"
5465 fi
5466 rm -f conftest*
5467 fi
5468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5469   echo "$ac_t""yes" 1>&6
5470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5471   cat >> confdefs.h <<EOF
5472 #define $ac_tr_hdr 1
5473 EOF
5474  
5475 else
5476   echo "$ac_t""no" 1>&6
5477 fi
5478 done
5479
5480 if test "$ac_cv_header_regex_h" != yes ; then
5481         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5482 fi
5483 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5484 echo "configure:5485: checking for regfree" >&5
5485 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5486   echo $ac_n "(cached) $ac_c" 1>&6
5487 else
5488   cat > conftest.$ac_ext <<EOF
5489 #line 5490 "configure"
5490 #include "confdefs.h"
5491 /* System header to define __stub macros and hopefully few prototypes,
5492     which can conflict with char regfree(); below.  */
5493 #include <assert.h>
5494 /* Override any gcc2 internal prototype to avoid an error.  */
5495 /* We use char because int might match the return type of a gcc2
5496     builtin and then its argument prototype would still apply.  */
5497 char regfree();
5498 char (*f)();
5499
5500 int main() {
5501
5502 /* The GNU C library defines this for functions which it implements
5503     to always fail with ENOSYS.  Some functions are actually named
5504     something starting with __ and the normal name is an alias.  */
5505 #if defined (__stub_regfree) || defined (__stub___regfree)
5506 choke me
5507 #else
5508 f = regfree;
5509 #endif
5510
5511 ; return 0; }
5512 EOF
5513 if { (eval echo configure:5514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5514   rm -rf conftest*
5515   eval "ac_cv_func_regfree=yes"
5516 else
5517   echo "configure: failed program was:" >&5
5518   cat conftest.$ac_ext >&5
5519   rm -rf conftest*
5520   eval "ac_cv_func_regfree=no"
5521 fi
5522 rm -f conftest*
5523 fi
5524
5525 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5526   echo "$ac_t""yes" 1>&6
5527   :
5528 else
5529   echo "$ac_t""no" 1>&6
5530 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5531 fi
5532
5533
5534
5535 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5536 echo "configure:5537: checking for compatible POSIX regex" >&5
5537 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5538   echo $ac_n "(cached) $ac_c" 1>&6
5539 else
5540   
5541         if test "$cross_compiling" = yes; then
5542   ol_cv_c_posix_regex=cross
5543 else
5544   cat > conftest.$ac_ext <<EOF
5545 #line 5546 "configure"
5546 #include "confdefs.h"
5547
5548 #include <sys/types.h>
5549 #include <regex.h>
5550 static char *pattern, *string;
5551 main()
5552 {
5553         int rc;
5554         regex_t re;
5555
5556         pattern = "^A";
5557
5558         if(regcomp(&re, pattern, 0)) {
5559                 return -1;
5560         }
5561         
5562         string = "ALL MATCH";
5563         
5564         rc = regexec(&re, string, 0, (void*)0, 0);
5565
5566         regfree(&re);
5567
5568         return rc;
5569 }
5570 EOF
5571 if { (eval echo configure:5572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5572 then
5573   ol_cv_c_posix_regex=yes
5574 else
5575   echo "configure: failed program was:" >&5
5576   cat conftest.$ac_ext >&5
5577   rm -fr conftest*
5578   ol_cv_c_posix_regex=no
5579 fi
5580 rm -fr conftest*
5581 fi
5582
5583 fi
5584
5585 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5586
5587 if test "$ol_cv_c_posix_regex" = no ; then
5588         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5589 fi
5590
5591 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5592 echo "configure:5593: checking for res_search" >&5
5593 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5594   echo $ac_n "(cached) $ac_c" 1>&6
5595 else
5596   cat > conftest.$ac_ext <<EOF
5597 #line 5598 "configure"
5598 #include "confdefs.h"
5599 /* System header to define __stub macros and hopefully few prototypes,
5600     which can conflict with char res_search(); below.  */
5601 #include <assert.h>
5602 /* Override any gcc2 internal prototype to avoid an error.  */
5603 /* We use char because int might match the return type of a gcc2
5604     builtin and then its argument prototype would still apply.  */
5605 char res_search();
5606 char (*f)();
5607
5608 int main() {
5609
5610 /* The GNU C library defines this for functions which it implements
5611     to always fail with ENOSYS.  Some functions are actually named
5612     something starting with __ and the normal name is an alias.  */
5613 #if defined (__stub_res_search) || defined (__stub___res_search)
5614 choke me
5615 #else
5616 f = res_search;
5617 #endif
5618
5619 ; return 0; }
5620 EOF
5621 if { (eval echo configure:5622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5622   rm -rf conftest*
5623   eval "ac_cv_func_res_search=yes"
5624 else
5625   echo "configure: failed program was:" >&5
5626   cat conftest.$ac_ext >&5
5627   rm -rf conftest*
5628   eval "ac_cv_func_res_search=no"
5629 fi
5630 rm -f conftest*
5631 fi
5632
5633 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5634   echo "$ac_t""yes" 1>&6
5635   :
5636 else
5637   echo "$ac_t""no" 1>&6
5638 fi
5639
5640 if test $ac_cv_func_res_search = no ; then 
5641         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5642 echo "configure:5643: checking for res_search in -lbind" >&5
5643 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5645   echo $ac_n "(cached) $ac_c" 1>&6
5646 else
5647   ac_save_LIBS="$LIBS"
5648 LIBS="-lbind  $LIBS"
5649 cat > conftest.$ac_ext <<EOF
5650 #line 5651 "configure"
5651 #include "confdefs.h"
5652 /* Override any gcc2 internal prototype to avoid an error.  */
5653 /* We use char because int might match the return type of a gcc2
5654     builtin and then its argument prototype would still apply.  */
5655 char res_search();
5656
5657 int main() {
5658 res_search()
5659 ; return 0; }
5660 EOF
5661 if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5662   rm -rf conftest*
5663   eval "ac_cv_lib_$ac_lib_var=yes"
5664 else
5665   echo "configure: failed program was:" >&5
5666   cat conftest.$ac_ext >&5
5667   rm -rf conftest*
5668   eval "ac_cv_lib_$ac_lib_var=no"
5669 fi
5670 rm -f conftest*
5671 LIBS="$ac_save_LIBS"
5672
5673 fi
5674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5675   echo "$ac_t""yes" 1>&6
5676     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5677     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5678   cat >> confdefs.h <<EOF
5679 #define $ac_tr_lib 1
5680 EOF
5681
5682   LIBS="-lbind $LIBS"
5683
5684 else
5685   echo "$ac_t""no" 1>&6
5686 fi
5687
5688         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5689 fi
5690
5691 if test $ac_cv_func_res_search = no ; then 
5692         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5693 echo "configure:5694: checking for __res_search in -lbind" >&5
5694 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5695 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5696   echo $ac_n "(cached) $ac_c" 1>&6
5697 else
5698   ac_save_LIBS="$LIBS"
5699 LIBS="-lbind  $LIBS"
5700 cat > conftest.$ac_ext <<EOF
5701 #line 5702 "configure"
5702 #include "confdefs.h"
5703 /* Override any gcc2 internal prototype to avoid an error.  */
5704 /* We use char because int might match the return type of a gcc2
5705     builtin and then its argument prototype would still apply.  */
5706 char __res_search();
5707
5708 int main() {
5709 __res_search()
5710 ; return 0; }
5711 EOF
5712 if { (eval echo configure:5713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5713   rm -rf conftest*
5714   eval "ac_cv_lib_$ac_lib_var=yes"
5715 else
5716   echo "configure: failed program was:" >&5
5717   cat conftest.$ac_ext >&5
5718   rm -rf conftest*
5719   eval "ac_cv_lib_$ac_lib_var=no"
5720 fi
5721 rm -f conftest*
5722 LIBS="$ac_save_LIBS"
5723
5724 fi
5725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5726   echo "$ac_t""yes" 1>&6
5727     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5728     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5729   cat >> confdefs.h <<EOF
5730 #define $ac_tr_lib 1
5731 EOF
5732
5733   LIBS="-lbind $LIBS"
5734
5735 else
5736   echo "$ac_t""no" 1>&6
5737 fi
5738
5739         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5740 fi
5741
5742 if test $ac_cv_func_res_search = no ; then 
5743         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5744 echo "configure:5745: checking for res_search in -lresolv" >&5
5745 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5747   echo $ac_n "(cached) $ac_c" 1>&6
5748 else
5749   ac_save_LIBS="$LIBS"
5750 LIBS="-lresolv  $LIBS"
5751 cat > conftest.$ac_ext <<EOF
5752 #line 5753 "configure"
5753 #include "confdefs.h"
5754 /* Override any gcc2 internal prototype to avoid an error.  */
5755 /* We use char because int might match the return type of a gcc2
5756     builtin and then its argument prototype would still apply.  */
5757 char res_search();
5758
5759 int main() {
5760 res_search()
5761 ; return 0; }
5762 EOF
5763 if { (eval echo configure:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5764   rm -rf conftest*
5765   eval "ac_cv_lib_$ac_lib_var=yes"
5766 else
5767   echo "configure: failed program was:" >&5
5768   cat conftest.$ac_ext >&5
5769   rm -rf conftest*
5770   eval "ac_cv_lib_$ac_lib_var=no"
5771 fi
5772 rm -f conftest*
5773 LIBS="$ac_save_LIBS"
5774
5775 fi
5776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5777   echo "$ac_t""yes" 1>&6
5778     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5779     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5780   cat >> confdefs.h <<EOF
5781 #define $ac_tr_lib 1
5782 EOF
5783
5784   LIBS="-lresolv $LIBS"
5785
5786 else
5787   echo "$ac_t""no" 1>&6
5788 fi
5789
5790         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5791 fi
5792
5793 if test "$ac_cv_func_res_search" = yes ; then
5794         cat >> confdefs.h <<\EOF
5795 #define HAVE_RES_SEARCH 1
5796 EOF
5797
5798 elif test $ol_enable_dns = yes ; then
5799         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5800 elif test $ol_enable_dns != no ; then
5801         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5802 fi
5803
5804
5805 ol_link_isode=no
5806 if test $ol_enable_ldapd != no ; then
5807         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5808
5809                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5810 echo "configure:5811: checking for main in -lxtpp" >&5
5811 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5812 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5813   echo $ac_n "(cached) $ac_c" 1>&6
5814 else
5815   ac_save_LIBS="$LIBS"
5816 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5817 cat > conftest.$ac_ext <<EOF
5818 #line 5819 "configure"
5819 #include "confdefs.h"
5820
5821 int main() {
5822 main()
5823 ; return 0; }
5824 EOF
5825 if { (eval echo configure:5826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5826   rm -rf conftest*
5827   eval "ac_cv_lib_$ac_lib_var=yes"
5828 else
5829   echo "configure: failed program was:" >&5
5830   cat conftest.$ac_ext >&5
5831   rm -rf conftest*
5832   eval "ac_cv_lib_$ac_lib_var=no"
5833 fi
5834 rm -f conftest*
5835 LIBS="$ac_save_LIBS"
5836
5837 fi
5838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5839   echo "$ac_t""yes" 1>&6
5840   
5841                 ol_link_isode=yes
5842                 cat >> confdefs.h <<\EOF
5843 #define HAVE_XTPP 1
5844 EOF
5845
5846                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5847                 
5848 else
5849   echo "$ac_t""no" 1>&6
5850 :
5851 fi
5852
5853         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5854 echo "configure:5855: checking for main in -ldsap" >&5
5855 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5856 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5857   echo $ac_n "(cached) $ac_c" 1>&6
5858 else
5859   ac_save_LIBS="$LIBS"
5860 LIBS="-ldsap -lisode $LIBS"
5861 cat > conftest.$ac_ext <<EOF
5862 #line 5863 "configure"
5863 #include "confdefs.h"
5864
5865 int main() {
5866 main()
5867 ; return 0; }
5868 EOF
5869 if { (eval echo configure:5870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5870   rm -rf conftest*
5871   eval "ac_cv_lib_$ac_lib_var=yes"
5872 else
5873   echo "configure: failed program was:" >&5
5874   cat conftest.$ac_ext >&5
5875   rm -rf conftest*
5876   eval "ac_cv_lib_$ac_lib_var=no"
5877 fi
5878 rm -f conftest*
5879 LIBS="$ac_save_LIBS"
5880
5881 fi
5882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5883   echo "$ac_t""yes" 1>&6
5884   
5885                 ol_link_isode=yes
5886                 cat >> confdefs.h <<\EOF
5887 #define HAVE_DSAP 1
5888 EOF
5889
5890                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5891                 
5892 else
5893   echo "$ac_t""no" 1>&6
5894 :
5895 fi
5896
5897         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5898 echo "configure:5899: checking for main in -lisode" >&5
5899 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5900 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5901   echo $ac_n "(cached) $ac_c" 1>&6
5902 else
5903   ac_save_LIBS="$LIBS"
5904 LIBS="-lisode  $LIBS"
5905 cat > conftest.$ac_ext <<EOF
5906 #line 5907 "configure"
5907 #include "confdefs.h"
5908
5909 int main() {
5910 main()
5911 ; return 0; }
5912 EOF
5913 if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5914   rm -rf conftest*
5915   eval "ac_cv_lib_$ac_lib_var=yes"
5916 else
5917   echo "configure: failed program was:" >&5
5918   cat conftest.$ac_ext >&5
5919   rm -rf conftest*
5920   eval "ac_cv_lib_$ac_lib_var=no"
5921 fi
5922 rm -f conftest*
5923 LIBS="$ac_save_LIBS"
5924
5925 fi
5926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5927   echo "$ac_t""yes" 1>&6
5928   
5929                 ol_link_isode=yes
5930                 cat >> confdefs.h <<\EOF
5931 #define HAVE_ISODE 1
5932 EOF
5933
5934                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5935                 
5936 else
5937   echo "$ac_t""no" 1>&6
5938 :
5939 fi
5940
5941 fi
5942
5943 if test $ol_link_isode != no; then
5944         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5945 echo "configure:5946: checking for main in -lpp" >&5
5946 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5947 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5948   echo $ac_n "(cached) $ac_c" 1>&6
5949 else
5950   ac_save_LIBS="$LIBS"
5951 LIBS="-lpp  $LIBS"
5952 cat > conftest.$ac_ext <<EOF
5953 #line 5954 "configure"
5954 #include "confdefs.h"
5955
5956 int main() {
5957 main()
5958 ; return 0; }
5959 EOF
5960 if { (eval echo configure:5961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5961   rm -rf conftest*
5962   eval "ac_cv_lib_$ac_lib_var=yes"
5963 else
5964   echo "configure: failed program was:" >&5
5965   cat conftest.$ac_ext >&5
5966   rm -rf conftest*
5967   eval "ac_cv_lib_$ac_lib_var=no"
5968 fi
5969 rm -f conftest*
5970 LIBS="$ac_save_LIBS"
5971
5972 fi
5973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5974   echo "$ac_t""yes" 1>&6
5975   
5976                 cat >> confdefs.h <<\EOF
5977 #define HAVE_PP 1
5978 EOF
5979
5980                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5981                 
5982 else
5983   echo "$ac_t""no" 1>&6
5984 :
5985 fi
5986
5987
5988         # Extract the first word of "pepsy", so it can be a program name with args.
5989 set dummy pepsy; ac_word=$2
5990 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5991 echo "configure:5992: checking for $ac_word" >&5
5992 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5993   echo $ac_n "(cached) $ac_c" 1>&6
5994 else
5995   case "$PEPSY" in
5996   /*)
5997   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5998   ;;
5999   ?:/*)
6000   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
6001   ;;
6002   *)
6003   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6004   ac_dummy="$PATH"
6005   for ac_dir in $ac_dummy; do 
6006     test -z "$ac_dir" && ac_dir=.
6007     if test -f $ac_dir/$ac_word; then
6008       ac_cv_path_PEPSY="$ac_dir/$ac_word"
6009       break
6010     fi
6011   done
6012   IFS="$ac_save_ifs"
6013   ;;
6014 esac
6015 fi
6016 PEPSY="$ac_cv_path_PEPSY"
6017 if test -n "$PEPSY"; then
6018   echo "$ac_t""$PEPSY" 1>&6
6019 else
6020   echo "$ac_t""no" 1>&6
6021 fi
6022
6023 fi
6024
6025 if test $ol_enable_quipu != no ; then
6026         for ac_hdr in quipu/commonarg.h
6027 do
6028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6030 echo "configure:6031: checking for $ac_hdr" >&5
6031 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6032   echo $ac_n "(cached) $ac_c" 1>&6
6033 else
6034   cat > conftest.$ac_ext <<EOF
6035 #line 6036 "configure"
6036 #include "confdefs.h"
6037 #include <$ac_hdr>
6038 EOF
6039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6040 { (eval echo configure:6041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6042 if test -z "$ac_err"; then
6043   rm -rf conftest*
6044   eval "ac_cv_header_$ac_safe=yes"
6045 else
6046   echo "$ac_err" >&5
6047   echo "configure: failed program was:" >&5
6048   cat conftest.$ac_ext >&5
6049   rm -rf conftest*
6050   eval "ac_cv_header_$ac_safe=no"
6051 fi
6052 rm -f conftest*
6053 fi
6054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6055   echo "$ac_t""yes" 1>&6
6056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6057   cat >> confdefs.h <<EOF
6058 #define $ac_tr_hdr 1
6059 EOF
6060  
6061 else
6062   echo "$ac_t""no" 1>&6
6063 fi
6064 done
6065
6066
6067         if test $ac_cv_header_quipu_commonarg_h = yes ; then
6068                 BUILD_QUIPU=yes
6069         elif test $ol_enable_quipu = auto ; then
6070                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
6071         else
6072                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
6073         fi
6074 fi
6075
6076 ol_link_kbind=no
6077 ol_link_kpasswd=no
6078 ol_link_krb5=no
6079 ol_link_krb4=no
6080
6081 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
6082         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
6083
6084         for ac_hdr in krb5.h
6085 do
6086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6088 echo "configure:6089: checking for $ac_hdr" >&5
6089 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6090   echo $ac_n "(cached) $ac_c" 1>&6
6091 else
6092   cat > conftest.$ac_ext <<EOF
6093 #line 6094 "configure"
6094 #include "confdefs.h"
6095 #include <$ac_hdr>
6096 EOF
6097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6098 { (eval echo configure:6099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6100 if test -z "$ac_err"; then
6101   rm -rf conftest*
6102   eval "ac_cv_header_$ac_safe=yes"
6103 else
6104   echo "$ac_err" >&5
6105   echo "configure: failed program was:" >&5
6106   cat conftest.$ac_ext >&5
6107   rm -rf conftest*
6108   eval "ac_cv_header_$ac_safe=no"
6109 fi
6110 rm -f conftest*
6111 fi
6112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6113   echo "$ac_t""yes" 1>&6
6114     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6115   cat >> confdefs.h <<EOF
6116 #define $ac_tr_hdr 1
6117 EOF
6118  
6119 else
6120   echo "$ac_t""no" 1>&6
6121 fi
6122 done
6123
6124
6125         if test $ac_cv_header_krb5_h = yes ; then
6126                                 for ac_hdr in heim_err.h
6127 do
6128 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6129 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6130 echo "configure:6131: checking for $ac_hdr" >&5
6131 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6132   echo $ac_n "(cached) $ac_c" 1>&6
6133 else
6134   cat > conftest.$ac_ext <<EOF
6135 #line 6136 "configure"
6136 #include "confdefs.h"
6137 #include <$ac_hdr>
6138 EOF
6139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6140 { (eval echo configure:6141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6142 if test -z "$ac_err"; then
6143   rm -rf conftest*
6144   eval "ac_cv_header_$ac_safe=yes"
6145 else
6146   echo "$ac_err" >&5
6147   echo "configure: failed program was:" >&5
6148   cat conftest.$ac_ext >&5
6149   rm -rf conftest*
6150   eval "ac_cv_header_$ac_safe=no"
6151 fi
6152 rm -f conftest*
6153 fi
6154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6155   echo "$ac_t""yes" 1>&6
6156     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6157   cat >> confdefs.h <<EOF
6158 #define $ac_tr_hdr 1
6159 EOF
6160  
6161 else
6162   echo "$ac_t""no" 1>&6
6163 fi
6164 done
6165
6166                 if test $ac_cv_header_heim_err_h = yes ; then
6167                         krb5_impl=heimdal
6168                 else
6169                         krb5_impl=mit
6170                 fi
6171
6172                 if test $krb5_impl = mit; then
6173                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6174 echo "configure:6175: checking for main in -lkrb5" >&5
6175 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6177   echo $ac_n "(cached) $ac_c" 1>&6
6178 else
6179   ac_save_LIBS="$LIBS"
6180 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6181 cat > conftest.$ac_ext <<EOF
6182 #line 6183 "configure"
6183 #include "confdefs.h"
6184
6185 int main() {
6186 main()
6187 ; return 0; }
6188 EOF
6189 if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6190   rm -rf conftest*
6191   eval "ac_cv_lib_$ac_lib_var=yes"
6192 else
6193   echo "configure: failed program was:" >&5
6194   cat conftest.$ac_ext >&5
6195   rm -rf conftest*
6196   eval "ac_cv_lib_$ac_lib_var=no"
6197 fi
6198 rm -f conftest*
6199 LIBS="$ac_save_LIBS"
6200
6201 fi
6202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6203   echo "$ac_t""yes" 1>&6
6204   have_krb5=yes
6205                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6206 else
6207   echo "$ac_t""no" 1>&6
6208 have_krb5=no
6209 fi
6210
6211
6212                 elif test $krb5_impl = heimdal; then
6213                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6214 echo "configure:6215: checking for main in -lkrb5" >&5
6215 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6216 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6217   echo $ac_n "(cached) $ac_c" 1>&6
6218 else
6219   ac_save_LIBS="$LIBS"
6220 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6221 cat > conftest.$ac_ext <<EOF
6222 #line 6223 "configure"
6223 #include "confdefs.h"
6224
6225 int main() {
6226 main()
6227 ; return 0; }
6228 EOF
6229 if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6230   rm -rf conftest*
6231   eval "ac_cv_lib_$ac_lib_var=yes"
6232 else
6233   echo "configure: failed program was:" >&5
6234   cat conftest.$ac_ext >&5
6235   rm -rf conftest*
6236   eval "ac_cv_lib_$ac_lib_var=no"
6237 fi
6238 rm -f conftest*
6239 LIBS="$ac_save_LIBS"
6240
6241 fi
6242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6243   echo "$ac_t""yes" 1>&6
6244   have_krb5=yes
6245                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6246 else
6247   echo "$ac_t""no" 1>&6
6248 have_krb5=no
6249 fi
6250
6251
6252                         cat >> confdefs.h <<\EOF
6253 #define HAVE_HEIMDAL_KERBEROS 1
6254 EOF
6255
6256                 else
6257                         have_krb5=no
6258                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6259                 fi
6260
6261                 if test $have_krb5 = yes ; then
6262                         ol_link_krb5=yes
6263
6264                         cat >> confdefs.h <<\EOF
6265 #define HAVE_KRB5 1
6266 EOF
6267
6268
6269                         if test $ol_enable_kpasswd != no ; then
6270                                 ol_link_kpasswd=yes;
6271                         fi
6272
6273                         if test $ol_with_kerberos = k5only ; then
6274                                 ol_with_kerberos=found
6275                         fi
6276
6277                 elif test $ol_with_kerberos != auto ; then
6278                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6279                 fi
6280
6281         fi
6282 fi
6283
6284 if test $ol_link_krb5 = yes -a \
6285         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6286
6287         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6288 do
6289 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6290 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6291 echo "configure:6292: checking for $ac_hdr" >&5
6292 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6293   echo $ac_n "(cached) $ac_c" 1>&6
6294 else
6295   cat > conftest.$ac_ext <<EOF
6296 #line 6297 "configure"
6297 #include "confdefs.h"
6298 #include <$ac_hdr>
6299 EOF
6300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6301 { (eval echo configure:6302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6303 if test -z "$ac_err"; then
6304   rm -rf conftest*
6305   eval "ac_cv_header_$ac_safe=yes"
6306 else
6307   echo "$ac_err" >&5
6308   echo "configure: failed program was:" >&5
6309   cat conftest.$ac_ext >&5
6310   rm -rf conftest*
6311   eval "ac_cv_header_$ac_safe=no"
6312 fi
6313 rm -f conftest*
6314 fi
6315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6316   echo "$ac_t""yes" 1>&6
6317     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6318   cat >> confdefs.h <<EOF
6319 #define $ac_tr_hdr 1
6320 EOF
6321  
6322 else
6323   echo "$ac_t""no" 1>&6
6324 fi
6325 done
6326
6327
6328         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6329                 if test $krb5_impl = mit; then
6330                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6331 echo "configure:6332: checking for main in -lkrb4" >&5
6332 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6333 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6334   echo $ac_n "(cached) $ac_c" 1>&6
6335 else
6336   ac_save_LIBS="$LIBS"
6337 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6338 cat > conftest.$ac_ext <<EOF
6339 #line 6340 "configure"
6340 #include "confdefs.h"
6341
6342 int main() {
6343 main()
6344 ; return 0; }
6345 EOF
6346 if { (eval echo configure:6347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6347   rm -rf conftest*
6348   eval "ac_cv_lib_$ac_lib_var=yes"
6349 else
6350   echo "configure: failed program was:" >&5
6351   cat conftest.$ac_ext >&5
6352   rm -rf conftest*
6353   eval "ac_cv_lib_$ac_lib_var=no"
6354 fi
6355 rm -f conftest*
6356 LIBS="$ac_save_LIBS"
6357
6358 fi
6359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6360   echo "$ac_t""yes" 1>&6
6361   have_k425=yes
6362                                 KRB4_LIBS="-lkrb4 -ldes425"
6363 else
6364   echo "$ac_t""no" 1>&6
6365 have_k425=no
6366 fi
6367
6368
6369                 elif test $krb5_impl = heimdal; then
6370                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6371 echo "configure:6372: checking for main in -lkrb4" >&5
6372 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6373 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6374   echo $ac_n "(cached) $ac_c" 1>&6
6375 else
6376   ac_save_LIBS="$LIBS"
6377 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6378 cat > conftest.$ac_ext <<EOF
6379 #line 6380 "configure"
6380 #include "confdefs.h"
6381
6382 int main() {
6383 main()
6384 ; return 0; }
6385 EOF
6386 if { (eval echo configure:6387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6387   rm -rf conftest*
6388   eval "ac_cv_lib_$ac_lib_var=yes"
6389 else
6390   echo "configure: failed program was:" >&5
6391   cat conftest.$ac_ext >&5
6392   rm -rf conftest*
6393   eval "ac_cv_lib_$ac_lib_var=no"
6394 fi
6395 rm -f conftest*
6396 LIBS="$ac_save_LIBS"
6397
6398 fi
6399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6400   echo "$ac_t""yes" 1>&6
6401   have_k425=yes
6402                                 KRB4_LIBS="-lkrb4"
6403 else
6404   echo "$ac_t""no" 1>&6
6405 have_k425=no
6406 fi
6407
6408
6409                 else
6410                         have_425=no
6411                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6412                 fi
6413
6414                 if test $have_k425 = yes ; then
6415                         ol_with_kerberos=found
6416                         ol_link_krb4=yes
6417
6418                         cat >> confdefs.h <<\EOF
6419 #define HAVE_KRB425 1
6420 EOF
6421
6422                         cat >> confdefs.h <<\EOF
6423 #define HAVE_KRB4 1
6424 EOF
6425
6426
6427                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6428 echo "configure:6429: checking for des_debug in Kerberos libraries" >&5
6429 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6430   echo $ac_n "(cached) $ac_c" 1>&6
6431 else
6432   
6433                                                                 save_LIBS="$LIBS"
6434                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6435                                 cat > conftest.$ac_ext <<EOF
6436 #line 6437 "configure"
6437 #include "confdefs.h"
6438
6439 #include <kerberosIV/krb.h>
6440 #include <kerberosIV/des.h>
6441 extern int des_debug;
6442
6443 int main() {
6444
6445 des_debug = 1;
6446
6447 ; return 0; }
6448 EOF
6449 if { (eval echo configure:6450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6450   rm -rf conftest*
6451   ol_cv_var_des_debug=yes
6452 else
6453   echo "configure: failed program was:" >&5
6454   cat conftest.$ac_ext >&5
6455   rm -rf conftest*
6456   ol_cv_var_des_debug=no
6457 fi
6458 rm -f conftest*
6459                                                                 LIBS="$save_LIBS"
6460                         
6461 fi
6462
6463 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6464
6465                         if test $ol_cv_var_des_debug = yes ; then
6466                                 cat >> confdefs.h <<\EOF
6467 #define HAVE_DES_DEBUG 1
6468 EOF
6469
6470                         fi
6471
6472                         LIBS="$save_LIBS"
6473                 fi
6474         fi
6475 fi
6476
6477 if test $ol_link_krb5 = yes ; then
6478         ol_with_kerberos=found
6479 fi
6480
6481 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6482         -o $ol_with_kerberos = kth ; then
6483
6484         for ac_hdr in krb.h des.h krb-archaeology.h 
6485 do
6486 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6487 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6488 echo "configure:6489: checking for $ac_hdr" >&5
6489 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6490   echo $ac_n "(cached) $ac_c" 1>&6
6491 else
6492   cat > conftest.$ac_ext <<EOF
6493 #line 6494 "configure"
6494 #include "confdefs.h"
6495 #include <$ac_hdr>
6496 EOF
6497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6498 { (eval echo configure:6499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6500 if test -z "$ac_err"; then
6501   rm -rf conftest*
6502   eval "ac_cv_header_$ac_safe=yes"
6503 else
6504   echo "$ac_err" >&5
6505   echo "configure: failed program was:" >&5
6506   cat conftest.$ac_ext >&5
6507   rm -rf conftest*
6508   eval "ac_cv_header_$ac_safe=no"
6509 fi
6510 rm -f conftest*
6511 fi
6512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6513   echo "$ac_t""yes" 1>&6
6514     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6515   cat >> confdefs.h <<EOF
6516 #define $ac_tr_hdr 1
6517 EOF
6518  
6519 else
6520   echo "$ac_t""no" 1>&6
6521 fi
6522 done
6523
6524
6525         if test $ac_cv_header_krb_h = yes ; then
6526                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6527 echo "configure:6528: checking for main in -lkrb" >&5
6528 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6530   echo $ac_n "(cached) $ac_c" 1>&6
6531 else
6532   ac_save_LIBS="$LIBS"
6533 LIBS="-lkrb -ldes $LIBS"
6534 cat > conftest.$ac_ext <<EOF
6535 #line 6536 "configure"
6536 #include "confdefs.h"
6537
6538 int main() {
6539 main()
6540 ; return 0; }
6541 EOF
6542 if { (eval echo configure:6543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6543   rm -rf conftest*
6544   eval "ac_cv_lib_$ac_lib_var=yes"
6545 else
6546   echo "configure: failed program was:" >&5
6547   cat conftest.$ac_ext >&5
6548   rm -rf conftest*
6549   eval "ac_cv_lib_$ac_lib_var=no"
6550 fi
6551 rm -f conftest*
6552 LIBS="$ac_save_LIBS"
6553
6554 fi
6555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6556   echo "$ac_t""yes" 1>&6
6557   have_k4=yes
6558 else
6559   echo "$ac_t""no" 1>&6
6560 have_k4=no
6561 fi
6562
6563
6564                 if test $have_k4 = yes ; then
6565                         ol_with_kerberos=found
6566                         ol_link_krb4=yes
6567
6568                         cat >> confdefs.h <<\EOF
6569 #define HAVE_KRB4 1
6570 EOF
6571
6572
6573                         KRB4_LIBS="-lkrb -ldes"
6574
6575                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6576                                 cat >> confdefs.h <<\EOF
6577 #define HAVE_KTH_KERBEROS 1
6578 EOF
6579
6580                         fi
6581                 fi
6582         fi
6583 fi
6584
6585 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6586         ol_link_kpasswd=yes;
6587 fi
6588
6589 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6590         cat >> confdefs.h <<\EOF
6591 #define HAVE_KERBEROS 1
6592 EOF
6593
6594
6595 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6596         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6597 fi
6598
6599 ol_link_tls=no
6600 if test $ol_with_tls != no ; then
6601         
6602         for ac_hdr in openssl/ssl.h ssl.h
6603 do
6604 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6605 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6606 echo "configure:6607: checking for $ac_hdr" >&5
6607 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6608   echo $ac_n "(cached) $ac_c" 1>&6
6609 else
6610   cat > conftest.$ac_ext <<EOF
6611 #line 6612 "configure"
6612 #include "confdefs.h"
6613 #include <$ac_hdr>
6614 EOF
6615 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6616 { (eval echo configure:6617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6617 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6618 if test -z "$ac_err"; then
6619   rm -rf conftest*
6620   eval "ac_cv_header_$ac_safe=yes"
6621 else
6622   echo "$ac_err" >&5
6623   echo "configure: failed program was:" >&5
6624   cat conftest.$ac_ext >&5
6625   rm -rf conftest*
6626   eval "ac_cv_header_$ac_safe=no"
6627 fi
6628 rm -f conftest*
6629 fi
6630 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6631   echo "$ac_t""yes" 1>&6
6632     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6633   cat >> confdefs.h <<EOF
6634 #define $ac_tr_hdr 1
6635 EOF
6636  
6637 else
6638   echo "$ac_t""no" 1>&6
6639 fi
6640 done
6641
6642         
6643         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6644                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6645 echo "configure:6646: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6646 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6647 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6648   echo $ac_n "(cached) $ac_c" 1>&6
6649 else
6650   ac_save_LIBS="$LIBS"
6651 LIBS="-lssl -lcrypto $LIBS"
6652 cat > conftest.$ac_ext <<EOF
6653 #line 6654 "configure"
6654 #include "confdefs.h"
6655 /* Override any gcc2 internal prototype to avoid an error.  */
6656 /* We use char because int might match the return type of a gcc2
6657     builtin and then its argument prototype would still apply.  */
6658 char SSLeay_add_ssl_algorithms();
6659
6660 int main() {
6661 SSLeay_add_ssl_algorithms()
6662 ; return 0; }
6663 EOF
6664 if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6665   rm -rf conftest*
6666   eval "ac_cv_lib_$ac_lib_var=yes"
6667 else
6668   echo "configure: failed program was:" >&5
6669   cat conftest.$ac_ext >&5
6670   rm -rf conftest*
6671   eval "ac_cv_lib_$ac_lib_var=no"
6672 fi
6673 rm -f conftest*
6674 LIBS="$ac_save_LIBS"
6675
6676 fi
6677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6678   echo "$ac_t""yes" 1>&6
6679   have_ssleay=yes
6680                         need_rsaref=no
6681 else
6682   echo "$ac_t""no" 1>&6
6683 have_ssleay=no
6684 fi
6685
6686                         
6687                 if test $have_ssleay = no ; then
6688                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6689 echo "configure:6690: checking for SSL_library_init in -lssl" >&5
6690 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6691 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6692   echo $ac_n "(cached) $ac_c" 1>&6
6693 else
6694   ac_save_LIBS="$LIBS"
6695 LIBS="-lssl -lcrypto $LIBS"
6696 cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 /* Override any gcc2 internal prototype to avoid an error.  */
6700 /* We use char because int might match the return type of a gcc2
6701     builtin and then its argument prototype would still apply.  */
6702 char SSL_library_init();
6703
6704 int main() {
6705 SSL_library_init()
6706 ; return 0; }
6707 EOF
6708 if { (eval echo configure:6709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6709   rm -rf conftest*
6710   eval "ac_cv_lib_$ac_lib_var=yes"
6711 else
6712   echo "configure: failed program was:" >&5
6713   cat conftest.$ac_ext >&5
6714   rm -rf conftest*
6715   eval "ac_cv_lib_$ac_lib_var=no"
6716 fi
6717 rm -f conftest*
6718 LIBS="$ac_save_LIBS"
6719
6720 fi
6721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6722   echo "$ac_t""yes" 1>&6
6723   have_ssleay=yes
6724                                 need_rsaref=no
6725 else
6726   echo "$ac_t""no" 1>&6
6727 have_ssleay=no
6728 fi
6729
6730                 fi
6731
6732                 if test $have_ssleay = no ; then
6733                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6734 echo "configure:6735: checking for ssl3_accept in -lssl" >&5
6735 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6736 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6737   echo $ac_n "(cached) $ac_c" 1>&6
6738 else
6739   ac_save_LIBS="$LIBS"
6740 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6741 cat > conftest.$ac_ext <<EOF
6742 #line 6743 "configure"
6743 #include "confdefs.h"
6744 /* Override any gcc2 internal prototype to avoid an error.  */
6745 /* We use char because int might match the return type of a gcc2
6746     builtin and then its argument prototype would still apply.  */
6747 char ssl3_accept();
6748
6749 int main() {
6750 ssl3_accept()
6751 ; return 0; }
6752 EOF
6753 if { (eval echo configure:6754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6754   rm -rf conftest*
6755   eval "ac_cv_lib_$ac_lib_var=yes"
6756 else
6757   echo "configure: failed program was:" >&5
6758   cat conftest.$ac_ext >&5
6759   rm -rf conftest*
6760   eval "ac_cv_lib_$ac_lib_var=no"
6761 fi
6762 rm -f conftest*
6763 LIBS="$ac_save_LIBS"
6764
6765 fi
6766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6767   echo "$ac_t""yes" 1>&6
6768   have_ssleay=yes
6769                                 need_rsaref=yes
6770 else
6771   echo "$ac_t""no" 1>&6
6772 have_ssleay=no
6773 fi
6774
6775                 fi
6776
6777                 if test $have_ssleay = yes ; then
6778                         ol_with_tls=found
6779                         ol_link_tls=yes
6780
6781                         cat >> confdefs.h <<\EOF
6782 #define HAVE_SSLEAY 1
6783 EOF
6784
6785
6786                         if test $need_rsaref = yes; then
6787                                 cat >> confdefs.h <<\EOF
6788 #define HAVE_RSAREF 1
6789 EOF
6790
6791
6792                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6793                         else
6794                                 TLS_LIBS="-lssl -lcrypto"
6795                         fi
6796                 fi
6797         fi
6798 fi
6799
6800 if test $ol_link_tls = yes ; then
6801         cat >> confdefs.h <<\EOF
6802 #define HAVE_TLS 1
6803 EOF
6804
6805 fi      
6806
6807 for ac_func in \
6808         ctime_r                 \
6809         gethostbyname_r gethostbyaddr_r \
6810
6811 do
6812 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6813 echo "configure:6814: checking for $ac_func" >&5
6814 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6815   echo $ac_n "(cached) $ac_c" 1>&6
6816 else
6817   cat > conftest.$ac_ext <<EOF
6818 #line 6819 "configure"
6819 #include "confdefs.h"
6820 /* System header to define __stub macros and hopefully few prototypes,
6821     which can conflict with char $ac_func(); below.  */
6822 #include <assert.h>
6823 /* Override any gcc2 internal prototype to avoid an error.  */
6824 /* We use char because int might match the return type of a gcc2
6825     builtin and then its argument prototype would still apply.  */
6826 char $ac_func();
6827 char (*f)();
6828
6829 int main() {
6830
6831 /* The GNU C library defines this for functions which it implements
6832     to always fail with ENOSYS.  Some functions are actually named
6833     something starting with __ and the normal name is an alias.  */
6834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6835 choke me
6836 #else
6837 f = $ac_func;
6838 #endif
6839
6840 ; return 0; }
6841 EOF
6842 if { (eval echo configure:6843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6843   rm -rf conftest*
6844   eval "ac_cv_func_$ac_func=yes"
6845 else
6846   echo "configure: failed program was:" >&5
6847   cat conftest.$ac_ext >&5
6848   rm -rf conftest*
6849   eval "ac_cv_func_$ac_func=no"
6850 fi
6851 rm -f conftest*
6852 fi
6853
6854 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6855   echo "$ac_t""yes" 1>&6
6856     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6857   cat >> confdefs.h <<EOF
6858 #define $ac_tr_func 1
6859 EOF
6860  
6861 else
6862   echo "$ac_t""no" 1>&6
6863 fi
6864 done
6865
6866
6867 if test "$ac_cv_func_ctime_r" = no ; then
6868         ol_cv_func_ctime_r_nargs=0
6869 else
6870         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6871 echo "configure:6872: checking number of arguments of ctime_r" >&5
6872 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6873   echo $ac_n "(cached) $ac_c" 1>&6
6874 else
6875   cat > conftest.$ac_ext <<EOF
6876 #line 6877 "configure"
6877 #include "confdefs.h"
6878 #include <time.h>
6879 int main() {
6880 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6881 ; return 0; }
6882 EOF
6883 if { (eval echo configure:6884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6884   rm -rf conftest*
6885   ol_cv_func_ctime_r_nargs3=yes
6886 else
6887   echo "configure: failed program was:" >&5
6888   cat conftest.$ac_ext >&5
6889   rm -rf conftest*
6890   ol_cv_func_ctime_r_nargs3=no
6891 fi
6892 rm -f conftest*
6893
6894         cat > conftest.$ac_ext <<EOF
6895 #line 6896 "configure"
6896 #include "confdefs.h"
6897 #include <time.h>
6898 int main() {
6899 time_t ti; char *buffer; ctime_r(&ti,buffer);
6900 ; return 0; }
6901 EOF
6902 if { (eval echo configure:6903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6903   rm -rf conftest*
6904   ol_cv_func_ctime_r_nargs2=yes
6905 else
6906   echo "configure: failed program was:" >&5
6907   cat conftest.$ac_ext >&5
6908   rm -rf conftest*
6909   ol_cv_func_ctime_r_nargs2=no
6910 fi
6911 rm -f conftest*
6912
6913         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6914                 $ol_cv_func_ctime_r_nargs2 = no ; then
6915
6916                 ol_cv_func_ctime_r_nargs=3
6917
6918         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6919                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6920
6921                 ol_cv_func_ctime_r_nargs=2
6922
6923         else
6924                 ol_cv_func_ctime_r_nargs=0
6925         fi
6926   
6927 fi
6928
6929 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6930
6931   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6932         cat >> confdefs.h <<EOF
6933 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6934 EOF
6935
6936   fi
6937
6938 fi
6939
6940 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6941         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6942 echo "configure:6943: checking number of arguments of gethostbyname_r" >&5
6943 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6944   echo $ac_n "(cached) $ac_c" 1>&6
6945 else
6946   cat > conftest.$ac_ext <<EOF
6947 #line 6948 "configure"
6948 #include "confdefs.h"
6949 #include <sys/types.h>
6950 #include <sys/socket.h>
6951 #include <netinet/in.h>
6952 #include <netdb.h>
6953 #define BUFSIZE (sizeof(struct hostent)+10)
6954 int main() {
6955 struct hostent hent; char buffer[BUFSIZE];
6956                 int bufsize=BUFSIZE;int h_errno;
6957                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6958                         buffer, bufsize, &h_errno);
6959 ; return 0; }
6960 EOF
6961 if { (eval echo configure:6962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6962   rm -rf conftest*
6963   ol_cv_func_gethostbyname_r_nargs5=yes
6964 else
6965   echo "configure: failed program was:" >&5
6966   cat conftest.$ac_ext >&5
6967   rm -rf conftest*
6968   ol_cv_func_gethostbyname_r_nargs5=no
6969 fi
6970 rm -f conftest*
6971
6972         cat > conftest.$ac_ext <<EOF
6973 #line 6974 "configure"
6974 #include "confdefs.h"
6975 #include <sys/types.h>
6976 #include <sys/socket.h>
6977 #include <netinet/in.h>
6978 #include <netdb.h>
6979 #define BUFSIZE (sizeof(struct hostent)+10)
6980 int main() {
6981 struct hostent hent;struct hostent *rhent;
6982                 char buffer[BUFSIZE];
6983                 int bufsize=BUFSIZE;int h_errno;
6984                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6985                         &rhent, &h_errno);
6986 ; return 0; }
6987 EOF
6988 if { (eval echo configure:6989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6989   rm -rf conftest*
6990   ol_cv_func_gethostbyname_r_nargs6=yes
6991 else
6992   echo "configure: failed program was:" >&5
6993   cat conftest.$ac_ext >&5
6994   rm -rf conftest*
6995   ol_cv_func_gethostbyname_r_nargs6=no
6996 fi
6997 rm -f conftest*
6998
6999         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
7000                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
7001
7002                 ol_cv_func_gethostbyname_r_nargs=5
7003
7004         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
7005                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
7006
7007                 ol_cv_func_gethostbyname_r_nargs=6
7008
7009         else
7010                 ol_cv_func_gethostbyname_r_nargs=0
7011         fi
7012   
7013 fi
7014
7015 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
7016   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
7017         cat >> confdefs.h <<EOF
7018 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
7019 EOF
7020
7021   fi
7022
7023 else
7024         ol_cv_func_gethostbyname_r_nargs=0
7025 fi
7026  
7027 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
7028         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
7029 echo "configure:7030: checking number of arguments of gethostbyaddr_r" >&5
7030 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
7031   echo $ac_n "(cached) $ac_c" 1>&6
7032 else
7033   cat > conftest.$ac_ext <<EOF
7034 #line 7035 "configure"
7035 #include "confdefs.h"
7036 #include <sys/types.h>
7037 #include <sys/socket.h>
7038 #include <netinet/in.h>
7039 #include <netdb.h>
7040 #define BUFSIZE (sizeof(struct hostent)+10)
7041 int main() {
7042 struct hostent hent; char buffer[BUFSIZE]; 
7043             struct in_addr add;
7044             size_t alen=sizeof(struct in_addr);
7045             int bufsize=BUFSIZE;int h_errno;
7046                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7047                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
7048 ; return 0; }
7049 EOF
7050 if { (eval echo configure:7051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7051   rm -rf conftest*
7052   ol_cv_func_gethostbyaddr_r_nargs7=yes
7053 else
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   ol_cv_func_gethostbyaddr_r_nargs7=no
7058 fi
7059 rm -f conftest*
7060
7061         cat > conftest.$ac_ext <<EOF
7062 #line 7063 "configure"
7063 #include "confdefs.h"
7064 #include <sys/types.h>
7065 #include <sys/socket.h>
7066 #include <netinet/in.h>
7067 #include <netdb.h>
7068 #define BUFSIZE (sizeof(struct hostent)+10)
7069 int main() {
7070 struct hostent hent;
7071                 struct hostent *rhent; char buffer[BUFSIZE]; 
7072                 struct in_addr add;
7073                 size_t alen=sizeof(struct in_addr);
7074                 int bufsize=BUFSIZE;int h_errno;
7075                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7076                         alen, AF_INET, &hent, buffer, bufsize, 
7077                         &rhent, &h_errno);
7078 ; return 0; }
7079 EOF
7080 if { (eval echo configure:7081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7081   rm -rf conftest*
7082   ol_cv_func_gethostbyaddr_r_nargs8=yes
7083 else
7084   echo "configure: failed program was:" >&5
7085   cat conftest.$ac_ext >&5
7086   rm -rf conftest*
7087   ol_cv_func_gethostbyaddr_r_nargs8=no
7088 fi
7089 rm -f conftest*
7090
7091         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7092                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7093
7094                 ol_cv_func_gethostbyaddr_r_nargs=7
7095
7096         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7097                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7098
7099                 ol_cv_func_gethostbyaddr_r_nargs=8
7100
7101         else
7102                 ol_cv_func_gethostbyaddr_r_nargs=0
7103         fi
7104   
7105 fi
7106
7107 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7108   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7109     cat >> confdefs.h <<EOF
7110 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7111 EOF
7112
7113   fi
7114
7115 else
7116         ol_cv_func_gethostbyaddr_r_nargs=0
7117 fi
7118
7119 if test "$ac_cv_func_ctime_r" = yes \
7120         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7121         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7122         -a "$ac_cv_func_gethostbyname_r" = yes \
7123         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7124         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7125         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7126         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7127         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7128         ; then
7129  
7130         cat >> confdefs.h <<\EOF
7131 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7132 EOF
7133
7134 fi
7135
7136 ol_link_threads=no
7137
7138 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7139         -o $ol_with_threads = nt ; then
7140
7141         
7142         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
7143 echo "configure:7144: checking for NT Threads" >&5
7144 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
7145   echo $ac_n "(cached) $ac_c" 1>&6
7146 else
7147   
7148                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7149 echo "configure:7150: checking for _beginthread" >&5
7150 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7151   echo $ac_n "(cached) $ac_c" 1>&6
7152 else
7153   cat > conftest.$ac_ext <<EOF
7154 #line 7155 "configure"
7155 #include "confdefs.h"
7156 /* System header to define __stub macros and hopefully few prototypes,
7157     which can conflict with char _beginthread(); below.  */
7158 #include <assert.h>
7159 /* Override any gcc2 internal prototype to avoid an error.  */
7160 /* We use char because int might match the return type of a gcc2
7161     builtin and then its argument prototype would still apply.  */
7162 char _beginthread();
7163 char (*f)();
7164
7165 int main() {
7166
7167 /* The GNU C library defines this for functions which it implements
7168     to always fail with ENOSYS.  Some functions are actually named
7169     something starting with __ and the normal name is an alias.  */
7170 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7171 choke me
7172 #else
7173 f = _beginthread;
7174 #endif
7175
7176 ; return 0; }
7177 EOF
7178 if { (eval echo configure:7179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7179   rm -rf conftest*
7180   eval "ac_cv_func__beginthread=yes"
7181 else
7182   echo "configure: failed program was:" >&5
7183   cat conftest.$ac_ext >&5
7184   rm -rf conftest*
7185   eval "ac_cv_func__beginthread=no"
7186 fi
7187 rm -f conftest*
7188 fi
7189
7190 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7191   echo "$ac_t""yes" 1>&6
7192   ol_cv_nt_threads=yes
7193 else
7194   echo "$ac_t""no" 1>&6
7195 ol_cv_nt_threads=no
7196 fi
7197
7198         
7199 fi
7200
7201 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7202
7203         if test $ol_cv_nt_threads = yes ; then
7204                 cat >> confdefs.h <<\EOF
7205 #define HAVE_NT_THREADS 1
7206 EOF
7207
7208         fi
7209
7210
7211         if test "$ol_cv_nt_threads" = yes ; then
7212         ol_link_threads=nt
7213         ol_with_threads=found
7214         ol_with_yielding_select=yes
7215
7216                 cat >> confdefs.h <<\EOF
7217 #define HAVE_NT_SERVICE_MANAGER 1
7218 EOF
7219
7220                 cat >> confdefs.h <<\EOF
7221 #define HAVE_NT_EVENT_LOG 1
7222 EOF
7223
7224         fi
7225
7226         if test $ol_with_threads = nt ; then
7227                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7228         fi
7229 fi
7230
7231 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7232         -o $ol_with_threads = posix ; then
7233
7234         for ac_hdr in pthread.h
7235 do
7236 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7237 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7238 echo "configure:7239: checking for $ac_hdr" >&5
7239 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7240   echo $ac_n "(cached) $ac_c" 1>&6
7241 else
7242   cat > conftest.$ac_ext <<EOF
7243 #line 7244 "configure"
7244 #include "confdefs.h"
7245 #include <$ac_hdr>
7246 EOF
7247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7248 { (eval echo configure:7249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7250 if test -z "$ac_err"; then
7251   rm -rf conftest*
7252   eval "ac_cv_header_$ac_safe=yes"
7253 else
7254   echo "$ac_err" >&5
7255   echo "configure: failed program was:" >&5
7256   cat conftest.$ac_ext >&5
7257   rm -rf conftest*
7258   eval "ac_cv_header_$ac_safe=no"
7259 fi
7260 rm -f conftest*
7261 fi
7262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7263   echo "$ac_t""yes" 1>&6
7264     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7265   cat >> confdefs.h <<EOF
7266 #define $ac_tr_hdr 1
7267 EOF
7268  
7269 else
7270   echo "$ac_t""no" 1>&6
7271 fi
7272 done
7273
7274
7275         if test $ac_cv_header_pthread_h = yes ; then
7276                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7277 echo "configure:7278: checking POSIX thread version" >&5
7278 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7279   echo $ac_n "(cached) $ac_c" 1>&6
7280 else
7281   
7282         cat > conftest.$ac_ext <<EOF
7283 #line 7284 "configure"
7284 #include "confdefs.h"
7285
7286 #               include <pthread.h>
7287                 /* this check could be improved */
7288 #               ifdef PTHREAD_ONCE_INIT
7289                         pthread_version_final;
7290 #               endif
7291         
7292 EOF
7293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7294   egrep "pthread_version_final" >/dev/null 2>&1; then
7295   rm -rf conftest*
7296   ol_pthread_final=yes
7297 else
7298   rm -rf conftest*
7299   ol_pthread_final=no
7300 fi
7301 rm -f conftest*
7302
7303
7304         cat > conftest.$ac_ext <<EOF
7305 #line 7306 "configure"
7306 #include "confdefs.h"
7307
7308 #               include <pthread.h>
7309                 /* this check could be improved */
7310 #               ifdef pthread_once_init
7311                         pthread_version_draft4;
7312 #               endif
7313         
7314 EOF
7315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7316   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7317   rm -rf conftest*
7318   ol_pthread_draft4=yes
7319 else
7320   rm -rf conftest*
7321   ol_pthread_draft4=no
7322 fi
7323 rm -f conftest*
7324
7325
7326         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7327                 ol_cv_pthread_version=final
7328         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7329                 ol_cv_pthread_version=draft4
7330         else
7331                 ol_cv_pthread_version=unknown
7332         fi
7333
7334 fi
7335
7336 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7337
7338
7339                 if test $ol_cv_pthread_version = final ; then
7340                         cat >> confdefs.h <<\EOF
7341 #define HAVE_PTHREADS_FINAL 1
7342 EOF
7343
7344                 elif test $ol_cv_pthread_version = draft4 ; then
7345                         cat >> confdefs.h <<\EOF
7346 #define HAVE_PTHREADS_D4 1
7347 EOF
7348
7349                 else
7350                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7351                 fi
7352
7353                 # consider threads found
7354                 ol_with_threads=found
7355
7356                 
7357         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7358 echo "configure:7359: checking for LinuxThreads pthread.h" >&5
7359 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7360   echo $ac_n "(cached) $ac_c" 1>&6
7361 else
7362   cat > conftest.$ac_ext <<EOF
7363 #line 7364 "configure"
7364 #include "confdefs.h"
7365 #include <pthread.h>
7366 EOF
7367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7368   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7369   rm -rf conftest*
7370   ol_cv_header_linux_threads=yes
7371 else
7372   rm -rf conftest*
7373   ol_cv_header_linux_threads=no
7374 fi
7375 rm -f conftest*
7376
7377                 
7378 fi
7379
7380 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7381         if test $ol_cv_header_linux_threads = yes; then
7382                 cat >> confdefs.h <<\EOF
7383 #define HAVE_LINUX_THREADS 1
7384 EOF
7385
7386         fi
7387
7388                 
7389         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7390 echo "configure:7391: checking for GNU Pth pthread.h" >&5
7391 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7392   echo $ac_n "(cached) $ac_c" 1>&6
7393 else
7394   cat > conftest.$ac_ext <<EOF
7395 #line 7396 "configure"
7396 #include "confdefs.h"
7397 #include <pthread.h>
7398 #ifdef _POSIX_THREAD_IS_GNU_PTH
7399         __gnu_pth__;
7400 #endif
7401
7402 EOF
7403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7404   egrep "__gnu_pth__" >/dev/null 2>&1; then
7405   rm -rf conftest*
7406   ol_cv_header_gnu_pth_pthread_h=yes
7407 else
7408   rm -rf conftest*
7409   ol_cv_header_gnu_pth_pthread_h=no
7410 fi
7411 rm -f conftest*
7412
7413                 
7414 fi
7415
7416 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7417
7418
7419                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7420                         for ac_hdr in sched.h
7421 do
7422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7424 echo "configure:7425: checking for $ac_hdr" >&5
7425 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7426   echo $ac_n "(cached) $ac_c" 1>&6
7427 else
7428   cat > conftest.$ac_ext <<EOF
7429 #line 7430 "configure"
7430 #include "confdefs.h"
7431 #include <$ac_hdr>
7432 EOF
7433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7434 { (eval echo configure:7435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7436 if test -z "$ac_err"; then
7437   rm -rf conftest*
7438   eval "ac_cv_header_$ac_safe=yes"
7439 else
7440   echo "$ac_err" >&5
7441   echo "configure: failed program was:" >&5
7442   cat conftest.$ac_ext >&5
7443   rm -rf conftest*
7444   eval "ac_cv_header_$ac_safe=no"
7445 fi
7446 rm -f conftest*
7447 fi
7448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7449   echo "$ac_t""yes" 1>&6
7450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7451   cat >> confdefs.h <<EOF
7452 #define $ac_tr_hdr 1
7453 EOF
7454  
7455 else
7456   echo "$ac_t""no" 1>&6
7457 fi
7458 done
7459
7460                 fi
7461
7462                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7463                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7464 echo "configure:7465: checking for pthread_create in default libraries" >&5
7465 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7466   echo $ac_n "(cached) $ac_c" 1>&6
7467 else
7468   
7469                 if test "$cross_compiling" = yes; then
7470   cat > conftest.$ac_ext <<EOF
7471 #line 7472 "configure"
7472 #include "confdefs.h"
7473 /* pthread test headers */
7474 #include <pthread.h>
7475 #ifndef NULL
7476 #define NULL (void*)0
7477 #endif
7478
7479 static void *task(p)
7480         void *p;
7481 {
7482         return (void *) (p == NULL);
7483 }
7484
7485 int main() {
7486
7487         /* pthread test function */
7488         pthread_t t;
7489         int status;
7490 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7491         /* This system (e.g. AIX) defaults detached; must override */
7492         pthread_attr_t attr;
7493
7494         status = pthread_attr_init(&attr);
7495         if( status ) exit( status );
7496
7497         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7498         if( status ) exit( status );
7499
7500 #define ATTR    &attr
7501 #else
7502 #if HAVE_PTHREADS_D4
7503 #define ATTR    pthread_attr_default
7504 #else
7505 #define ATTR    NULL
7506 #endif
7507 #endif
7508         /* make sure pthread_create() isn't just a stub */
7509         status = pthread_create(&t, ATTR, task, NULL);
7510         if( status ) exit( status );
7511
7512         /* make sure pthread_detach() isn't just a stub */
7513 #if HAVE_PTHREADS_D4
7514         status = pthread_detach( &t );
7515 #else
7516         status = pthread_detach( t );
7517 #endif
7518
7519 #ifdef HAVE_LINUX_THREADS
7520         pthread_kill_other_threads_np();
7521 #endif
7522
7523         exit( status );
7524
7525 ; return 0; }
7526 EOF
7527 if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7528   rm -rf conftest*
7529   ol_cv_pthread_create=yes
7530 else
7531   echo "configure: failed program was:" >&5
7532   cat conftest.$ac_ext >&5
7533   rm -rf conftest*
7534   ol_cv_pthread_create=no
7535 fi
7536 rm -f conftest*
7537 else
7538   cat > conftest.$ac_ext <<EOF
7539 #line 7540 "configure"
7540 #include "confdefs.h"
7541 /* pthread test headers */
7542 #include <pthread.h>
7543 #ifndef NULL
7544 #define NULL (void*)0
7545 #endif
7546
7547 static void *task(p)
7548         void *p;
7549 {
7550         return (void *) (p == NULL);
7551 }
7552
7553
7554 int main(argc, argv)
7555         int argc;
7556         char **argv;
7557 {
7558
7559         /* pthread test function */
7560         pthread_t t;
7561         int status;
7562 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7563         /* This system (e.g. AIX) defaults detached; must override */
7564         pthread_attr_t attr;
7565
7566         status = pthread_attr_init(&attr);
7567         if( status ) exit( status );
7568
7569         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7570         if( status ) exit( status );
7571
7572 #define ATTR    &attr
7573 #else
7574 #if HAVE_PTHREADS_D4
7575 #define ATTR    pthread_attr_default
7576 #else
7577 #define ATTR    NULL
7578 #endif
7579 #endif
7580         /* make sure pthread_create() isn't just a stub */
7581         status = pthread_create(&t, ATTR, task, NULL);
7582         if( status ) exit( status );
7583
7584         /* make sure pthread_detach() isn't just a stub */
7585 #if HAVE_PTHREADS_D4
7586         status = pthread_detach( &t );
7587 #else
7588         status = pthread_detach( t );
7589 #endif
7590
7591 #ifdef HAVE_LINUX_THREADS
7592         pthread_kill_other_threads_np();
7593 #endif
7594
7595         exit( status );
7596
7597 }
7598
7599 EOF
7600 if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7601 then
7602   ol_cv_pthread_create=yes
7603 else
7604   echo "configure: failed program was:" >&5
7605   cat conftest.$ac_ext >&5
7606   rm -fr conftest*
7607   ol_cv_pthread_create=no
7608 fi
7609 rm -fr conftest*
7610 fi
7611
7612 fi
7613
7614 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7615
7616                 if test $ol_cv_pthread_create != no ; then
7617                         ol_link_threads=posix
7618                         ol_link_pthreads=""
7619                 fi
7620                 
7621                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7622 if test "$ol_link_threads" = no ; then
7623         # try -kthread
7624         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7625 echo "configure:7626: checking for pthread link with -kthread" >&5
7626 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7627   echo $ac_n "(cached) $ac_c" 1>&6
7628 else
7629   
7630                 # save the flags
7631                 ol_LIBS="$LIBS"
7632                 LIBS="-kthread $LIBS"
7633
7634                 if test "$cross_compiling" = yes; then
7635   cat > conftest.$ac_ext <<EOF
7636 #line 7637 "configure"
7637 #include "confdefs.h"
7638 /* pthread test headers */
7639 #include <pthread.h>
7640 #ifndef NULL
7641 #define NULL (void*)0
7642 #endif
7643
7644 static void *task(p)
7645         void *p;
7646 {
7647         return (void *) (p == NULL);
7648 }
7649
7650 int main() {
7651
7652         /* pthread test function */
7653         pthread_t t;
7654         int status;
7655 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7656         /* This system (e.g. AIX) defaults detached; must override */
7657         pthread_attr_t attr;
7658
7659         status = pthread_attr_init(&attr);
7660         if( status ) exit( status );
7661
7662         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7663         if( status ) exit( status );
7664
7665 #define ATTR    &attr
7666 #else
7667 #if HAVE_PTHREADS_D4
7668 #define ATTR    pthread_attr_default
7669 #else
7670 #define ATTR    NULL
7671 #endif
7672 #endif
7673         /* make sure pthread_create() isn't just a stub */
7674         status = pthread_create(&t, ATTR, task, NULL);
7675         if( status ) exit( status );
7676
7677         /* make sure pthread_detach() isn't just a stub */
7678 #if HAVE_PTHREADS_D4
7679         status = pthread_detach( &t );
7680 #else
7681         status = pthread_detach( t );
7682 #endif
7683
7684 #ifdef HAVE_LINUX_THREADS
7685         pthread_kill_other_threads_np();
7686 #endif
7687
7688         exit( status );
7689
7690 ; return 0; }
7691 EOF
7692 if { (eval echo configure:7693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7693   rm -rf conftest*
7694   ol_cv_pthread_kthread=yes
7695 else
7696   echo "configure: failed program was:" >&5
7697   cat conftest.$ac_ext >&5
7698   rm -rf conftest*
7699   ol_cv_pthread_kthread=no
7700 fi
7701 rm -f conftest*
7702 else
7703   cat > conftest.$ac_ext <<EOF
7704 #line 7705 "configure"
7705 #include "confdefs.h"
7706 /* pthread test headers */
7707 #include <pthread.h>
7708 #ifndef NULL
7709 #define NULL (void*)0
7710 #endif
7711
7712 static void *task(p)
7713         void *p;
7714 {
7715         return (void *) (p == NULL);
7716 }
7717
7718
7719 int main(argc, argv)
7720         int argc;
7721         char **argv;
7722 {
7723
7724         /* pthread test function */
7725         pthread_t t;
7726         int status;
7727 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7728         /* This system (e.g. AIX) defaults detached; must override */
7729         pthread_attr_t attr;
7730
7731         status = pthread_attr_init(&attr);
7732         if( status ) exit( status );
7733
7734         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7735         if( status ) exit( status );
7736
7737 #define ATTR    &attr
7738 #else
7739 #if HAVE_PTHREADS_D4
7740 #define ATTR    pthread_attr_default
7741 #else
7742 #define ATTR    NULL
7743 #endif
7744 #endif
7745         /* make sure pthread_create() isn't just a stub */
7746         status = pthread_create(&t, ATTR, task, NULL);
7747         if( status ) exit( status );
7748
7749         /* make sure pthread_detach() isn't just a stub */
7750 #if HAVE_PTHREADS_D4
7751         status = pthread_detach( &t );
7752 #else
7753         status = pthread_detach( t );
7754 #endif
7755
7756 #ifdef HAVE_LINUX_THREADS
7757         pthread_kill_other_threads_np();
7758 #endif
7759
7760         exit( status );
7761
7762 }
7763
7764 EOF
7765 if { (eval echo configure:7766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7766 then
7767   ol_cv_pthread_kthread=yes
7768 else
7769   echo "configure: failed program was:" >&5
7770   cat conftest.$ac_ext >&5
7771   rm -fr conftest*
7772   ol_cv_pthread_kthread=no
7773 fi
7774 rm -fr conftest*
7775 fi
7776
7777
7778                 # restore the LIBS
7779                 LIBS="$ol_LIBS"
7780         
7781 fi
7782
7783 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7784
7785         if test $ol_cv_pthread_kthread = yes ; then
7786                 ol_link_pthreads="-kthread"
7787                 ol_link_threads=posix
7788         fi
7789 fi
7790
7791                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7792 if test "$ol_link_threads" = no ; then
7793         # try -pthread
7794         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7795 echo "configure:7796: checking for pthread link with -pthread" >&5
7796 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7797   echo $ac_n "(cached) $ac_c" 1>&6
7798 else
7799   
7800                 # save the flags
7801                 ol_LIBS="$LIBS"
7802                 LIBS="-pthread $LIBS"
7803
7804                 if test "$cross_compiling" = yes; then
7805   cat > conftest.$ac_ext <<EOF
7806 #line 7807 "configure"
7807 #include "confdefs.h"
7808 /* pthread test headers */
7809 #include <pthread.h>
7810 #ifndef NULL
7811 #define NULL (void*)0
7812 #endif
7813
7814 static void *task(p)
7815         void *p;
7816 {
7817         return (void *) (p == NULL);
7818 }
7819
7820 int main() {
7821
7822         /* pthread test function */
7823         pthread_t t;
7824         int status;
7825 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7826         /* This system (e.g. AIX) defaults detached; must override */
7827         pthread_attr_t attr;
7828
7829         status = pthread_attr_init(&attr);
7830         if( status ) exit( status );
7831
7832         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7833         if( status ) exit( status );
7834
7835 #define ATTR    &attr
7836 #else
7837 #if HAVE_PTHREADS_D4
7838 #define ATTR    pthread_attr_default
7839 #else
7840 #define ATTR    NULL
7841 #endif
7842 #endif
7843         /* make sure pthread_create() isn't just a stub */
7844         status = pthread_create(&t, ATTR, task, NULL);
7845         if( status ) exit( status );
7846
7847         /* make sure pthread_detach() isn't just a stub */
7848 #if HAVE_PTHREADS_D4
7849         status = pthread_detach( &t );
7850 #else
7851         status = pthread_detach( t );
7852 #endif
7853
7854 #ifdef HAVE_LINUX_THREADS
7855         pthread_kill_other_threads_np();
7856 #endif
7857
7858         exit( status );
7859
7860 ; return 0; }
7861 EOF
7862 if { (eval echo configure:7863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7863   rm -rf conftest*
7864   ol_cv_pthread_pthread=yes
7865 else
7866   echo "configure: failed program was:" >&5
7867   cat conftest.$ac_ext >&5
7868   rm -rf conftest*
7869   ol_cv_pthread_pthread=no
7870 fi
7871 rm -f conftest*
7872 else
7873   cat > conftest.$ac_ext <<EOF
7874 #line 7875 "configure"
7875 #include "confdefs.h"
7876 /* pthread test headers */
7877 #include <pthread.h>
7878 #ifndef NULL
7879 #define NULL (void*)0
7880 #endif
7881
7882 static void *task(p)
7883         void *p;
7884 {
7885         return (void *) (p == NULL);
7886 }
7887
7888
7889 int main(argc, argv)
7890         int argc;
7891         char **argv;
7892 {
7893
7894         /* pthread test function */
7895         pthread_t t;
7896         int status;
7897 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7898         /* This system (e.g. AIX) defaults detached; must override */
7899         pthread_attr_t attr;
7900
7901         status = pthread_attr_init(&attr);
7902         if( status ) exit( status );
7903
7904         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7905         if( status ) exit( status );
7906
7907 #define ATTR    &attr
7908 #else
7909 #if HAVE_PTHREADS_D4
7910 #define ATTR    pthread_attr_default
7911 #else
7912 #define ATTR    NULL
7913 #endif
7914 #endif
7915         /* make sure pthread_create() isn't just a stub */
7916         status = pthread_create(&t, ATTR, task, NULL);
7917         if( status ) exit( status );
7918
7919         /* make sure pthread_detach() isn't just a stub */
7920 #if HAVE_PTHREADS_D4
7921         status = pthread_detach( &t );
7922 #else
7923         status = pthread_detach( t );
7924 #endif
7925
7926 #ifdef HAVE_LINUX_THREADS
7927         pthread_kill_other_threads_np();
7928 #endif
7929
7930         exit( status );
7931
7932 }
7933
7934 EOF
7935 if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7936 then
7937   ol_cv_pthread_pthread=yes
7938 else
7939   echo "configure: failed program was:" >&5
7940   cat conftest.$ac_ext >&5
7941   rm -fr conftest*
7942   ol_cv_pthread_pthread=no
7943 fi
7944 rm -fr conftest*
7945 fi
7946
7947
7948                 # restore the LIBS
7949                 LIBS="$ol_LIBS"
7950         
7951 fi
7952
7953 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7954
7955         if test $ol_cv_pthread_pthread = yes ; then
7956                 ol_link_pthreads="-pthread"
7957                 ol_link_threads=posix
7958         fi
7959 fi
7960
7961                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7962 if test "$ol_link_threads" = no ; then
7963         # try -pthreads
7964         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7965 echo "configure:7966: checking for pthread link with -pthreads" >&5
7966 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7967   echo $ac_n "(cached) $ac_c" 1>&6
7968 else
7969   
7970                 # save the flags
7971                 ol_LIBS="$LIBS"
7972                 LIBS="-pthreads $LIBS"
7973
7974                 if test "$cross_compiling" = yes; then
7975   cat > conftest.$ac_ext <<EOF
7976 #line 7977 "configure"
7977 #include "confdefs.h"
7978 /* pthread test headers */
7979 #include <pthread.h>
7980 #ifndef NULL
7981 #define NULL (void*)0
7982 #endif
7983
7984 static void *task(p)
7985         void *p;
7986 {
7987         return (void *) (p == NULL);
7988 }
7989
7990 int main() {
7991
7992         /* pthread test function */
7993         pthread_t t;
7994         int status;
7995 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7996         /* This system (e.g. AIX) defaults detached; must override */
7997         pthread_attr_t attr;
7998
7999         status = pthread_attr_init(&attr);
8000         if( status ) exit( status );
8001
8002         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8003         if( status ) exit( status );
8004
8005 #define ATTR    &attr
8006 #else
8007 #if HAVE_PTHREADS_D4
8008 #define ATTR    pthread_attr_default
8009 #else
8010 #define ATTR    NULL
8011 #endif
8012 #endif
8013         /* make sure pthread_create() isn't just a stub */
8014         status = pthread_create(&t, ATTR, task, NULL);
8015         if( status ) exit( status );
8016
8017         /* make sure pthread_detach() isn't just a stub */
8018 #if HAVE_PTHREADS_D4
8019         status = pthread_detach( &t );
8020 #else
8021         status = pthread_detach( t );
8022 #endif
8023
8024 #ifdef HAVE_LINUX_THREADS
8025         pthread_kill_other_threads_np();
8026 #endif
8027
8028         exit( status );
8029
8030 ; return 0; }
8031 EOF
8032 if { (eval echo configure:8033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8033   rm -rf conftest*
8034   ol_cv_pthread_pthreads=yes
8035 else
8036   echo "configure: failed program was:" >&5
8037   cat conftest.$ac_ext >&5
8038   rm -rf conftest*
8039   ol_cv_pthread_pthreads=no
8040 fi
8041 rm -f conftest*
8042 else
8043   cat > conftest.$ac_ext <<EOF
8044 #line 8045 "configure"
8045 #include "confdefs.h"
8046 /* pthread test headers */
8047 #include <pthread.h>
8048 #ifndef NULL
8049 #define NULL (void*)0
8050 #endif
8051
8052 static void *task(p)
8053         void *p;
8054 {
8055         return (void *) (p == NULL);
8056 }
8057
8058
8059 int main(argc, argv)
8060         int argc;
8061         char **argv;
8062 {
8063
8064         /* pthread test function */
8065         pthread_t t;
8066         int status;
8067 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8068         /* This system (e.g. AIX) defaults detached; must override */
8069         pthread_attr_t attr;
8070
8071         status = pthread_attr_init(&attr);
8072         if( status ) exit( status );
8073
8074         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8075         if( status ) exit( status );
8076
8077 #define ATTR    &attr
8078 #else
8079 #if HAVE_PTHREADS_D4
8080 #define ATTR    pthread_attr_default
8081 #else
8082 #define ATTR    NULL
8083 #endif
8084 #endif
8085         /* make sure pthread_create() isn't just a stub */
8086         status = pthread_create(&t, ATTR, task, NULL);
8087         if( status ) exit( status );
8088
8089         /* make sure pthread_detach() isn't just a stub */
8090 #if HAVE_PTHREADS_D4
8091         status = pthread_detach( &t );
8092 #else
8093         status = pthread_detach( t );
8094 #endif
8095
8096 #ifdef HAVE_LINUX_THREADS
8097         pthread_kill_other_threads_np();
8098 #endif
8099
8100         exit( status );
8101
8102 }
8103
8104 EOF
8105 if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8106 then
8107   ol_cv_pthread_pthreads=yes
8108 else
8109   echo "configure: failed program was:" >&5
8110   cat conftest.$ac_ext >&5
8111   rm -fr conftest*
8112   ol_cv_pthread_pthreads=no
8113 fi
8114 rm -fr conftest*
8115 fi
8116
8117
8118                 # restore the LIBS
8119                 LIBS="$ol_LIBS"
8120         
8121 fi
8122
8123 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8124
8125         if test $ol_cv_pthread_pthreads = yes ; then
8126                 ol_link_pthreads="-pthreads"
8127                 ol_link_threads=posix
8128         fi
8129 fi
8130
8131                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8132 if test "$ol_link_threads" = no ; then
8133         # try -mthreads
8134         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8135 echo "configure:8136: checking for pthread link with -mthreads" >&5
8136 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8137   echo $ac_n "(cached) $ac_c" 1>&6
8138 else
8139   
8140                 # save the flags
8141                 ol_LIBS="$LIBS"
8142                 LIBS="-mthreads $LIBS"
8143
8144                 if test "$cross_compiling" = yes; then
8145   cat > conftest.$ac_ext <<EOF
8146 #line 8147 "configure"
8147 #include "confdefs.h"
8148 /* pthread test headers */
8149 #include <pthread.h>
8150 #ifndef NULL
8151 #define NULL (void*)0
8152 #endif
8153
8154 static void *task(p)
8155         void *p;
8156 {
8157         return (void *) (p == NULL);
8158 }
8159
8160 int main() {
8161
8162         /* pthread test function */
8163         pthread_t t;
8164         int status;
8165 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8166         /* This system (e.g. AIX) defaults detached; must override */
8167         pthread_attr_t attr;
8168
8169         status = pthread_attr_init(&attr);
8170         if( status ) exit( status );
8171
8172         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8173         if( status ) exit( status );
8174
8175 #define ATTR    &attr
8176 #else
8177 #if HAVE_PTHREADS_D4
8178 #define ATTR    pthread_attr_default
8179 #else
8180 #define ATTR    NULL
8181 #endif
8182 #endif
8183         /* make sure pthread_create() isn't just a stub */
8184         status = pthread_create(&t, ATTR, task, NULL);
8185         if( status ) exit( status );
8186
8187         /* make sure pthread_detach() isn't just a stub */
8188 #if HAVE_PTHREADS_D4
8189         status = pthread_detach( &t );
8190 #else
8191         status = pthread_detach( t );
8192 #endif
8193
8194 #ifdef HAVE_LINUX_THREADS
8195         pthread_kill_other_threads_np();
8196 #endif
8197
8198         exit( status );
8199
8200 ; return 0; }
8201 EOF
8202 if { (eval echo configure:8203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8203   rm -rf conftest*
8204   ol_cv_pthread_mthreads=yes
8205 else
8206   echo "configure: failed program was:" >&5
8207   cat conftest.$ac_ext >&5
8208   rm -rf conftest*
8209   ol_cv_pthread_mthreads=no
8210 fi
8211 rm -f conftest*
8212 else
8213   cat > conftest.$ac_ext <<EOF
8214 #line 8215 "configure"
8215 #include "confdefs.h"
8216 /* pthread test headers */
8217 #include <pthread.h>
8218 #ifndef NULL
8219 #define NULL (void*)0
8220 #endif
8221
8222 static void *task(p)
8223         void *p;
8224 {
8225         return (void *) (p == NULL);
8226 }
8227
8228
8229 int main(argc, argv)
8230         int argc;
8231         char **argv;
8232 {
8233
8234         /* pthread test function */
8235         pthread_t t;
8236         int status;
8237 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8238         /* This system (e.g. AIX) defaults detached; must override */
8239         pthread_attr_t attr;
8240
8241         status = pthread_attr_init(&attr);
8242         if( status ) exit( status );
8243
8244         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8245         if( status ) exit( status );
8246
8247 #define ATTR    &attr
8248 #else
8249 #if HAVE_PTHREADS_D4
8250 #define ATTR    pthread_attr_default
8251 #else
8252 #define ATTR    NULL
8253 #endif
8254 #endif
8255         /* make sure pthread_create() isn't just a stub */
8256         status = pthread_create(&t, ATTR, task, NULL);
8257         if( status ) exit( status );
8258
8259         /* make sure pthread_detach() isn't just a stub */
8260 #if HAVE_PTHREADS_D4
8261         status = pthread_detach( &t );
8262 #else
8263         status = pthread_detach( t );
8264 #endif
8265
8266 #ifdef HAVE_LINUX_THREADS
8267         pthread_kill_other_threads_np();
8268 #endif
8269
8270         exit( status );
8271
8272 }
8273
8274 EOF
8275 if { (eval echo configure:8276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8276 then
8277   ol_cv_pthread_mthreads=yes
8278 else
8279   echo "configure: failed program was:" >&5
8280   cat conftest.$ac_ext >&5
8281   rm -fr conftest*
8282   ol_cv_pthread_mthreads=no
8283 fi
8284 rm -fr conftest*
8285 fi
8286
8287
8288                 # restore the LIBS
8289                 LIBS="$ol_LIBS"
8290         
8291 fi
8292
8293 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8294
8295         if test $ol_cv_pthread_mthreads = yes ; then
8296                 ol_link_pthreads="-mthreads"
8297                 ol_link_threads=posix
8298         fi
8299 fi
8300
8301                 # Pthread try link: -thread (ol_cv_pthread_thread)
8302 if test "$ol_link_threads" = no ; then
8303         # try -thread
8304         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8305 echo "configure:8306: checking for pthread link with -thread" >&5
8306 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8307   echo $ac_n "(cached) $ac_c" 1>&6
8308 else
8309   
8310                 # save the flags
8311                 ol_LIBS="$LIBS"
8312                 LIBS="-thread $LIBS"
8313
8314                 if test "$cross_compiling" = yes; then
8315   cat > conftest.$ac_ext <<EOF
8316 #line 8317 "configure"
8317 #include "confdefs.h"
8318 /* pthread test headers */
8319 #include <pthread.h>
8320 #ifndef NULL
8321 #define NULL (void*)0
8322 #endif
8323
8324 static void *task(p)
8325         void *p;
8326 {
8327         return (void *) (p == NULL);
8328 }
8329
8330 int main() {
8331
8332         /* pthread test function */
8333         pthread_t t;
8334         int status;
8335 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8336         /* This system (e.g. AIX) defaults detached; must override */
8337         pthread_attr_t attr;
8338
8339         status = pthread_attr_init(&attr);
8340         if( status ) exit( status );
8341
8342         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8343         if( status ) exit( status );
8344
8345 #define ATTR    &attr
8346 #else
8347 #if HAVE_PTHREADS_D4
8348 #define ATTR    pthread_attr_default
8349 #else
8350 #define ATTR    NULL
8351 #endif
8352 #endif
8353         /* make sure pthread_create() isn't just a stub */
8354         status = pthread_create(&t, ATTR, task, NULL);
8355         if( status ) exit( status );
8356
8357         /* make sure pthread_detach() isn't just a stub */
8358 #if HAVE_PTHREADS_D4
8359         status = pthread_detach( &t );
8360 #else
8361         status = pthread_detach( t );
8362 #endif
8363
8364 #ifdef HAVE_LINUX_THREADS
8365         pthread_kill_other_threads_np();
8366 #endif
8367
8368         exit( status );
8369
8370 ; return 0; }
8371 EOF
8372 if { (eval echo configure:8373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8373   rm -rf conftest*
8374   ol_cv_pthread_thread=yes
8375 else
8376   echo "configure: failed program was:" >&5
8377   cat conftest.$ac_ext >&5
8378   rm -rf conftest*
8379   ol_cv_pthread_thread=no
8380 fi
8381 rm -f conftest*
8382 else
8383   cat > conftest.$ac_ext <<EOF
8384 #line 8385 "configure"
8385 #include "confdefs.h"
8386 /* pthread test headers */
8387 #include <pthread.h>
8388 #ifndef NULL
8389 #define NULL (void*)0
8390 #endif
8391
8392 static void *task(p)
8393         void *p;
8394 {
8395         return (void *) (p == NULL);
8396 }
8397
8398
8399 int main(argc, argv)
8400         int argc;
8401         char **argv;
8402 {
8403
8404         /* pthread test function */
8405         pthread_t t;
8406         int status;
8407 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8408         /* This system (e.g. AIX) defaults detached; must override */
8409         pthread_attr_t attr;
8410
8411         status = pthread_attr_init(&attr);
8412         if( status ) exit( status );
8413
8414         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8415         if( status ) exit( status );
8416
8417 #define ATTR    &attr
8418 #else
8419 #if HAVE_PTHREADS_D4
8420 #define ATTR    pthread_attr_default
8421 #else
8422 #define ATTR    NULL
8423 #endif
8424 #endif
8425         /* make sure pthread_create() isn't just a stub */
8426         status = pthread_create(&t, ATTR, task, NULL);
8427         if( status ) exit( status );
8428
8429         /* make sure pthread_detach() isn't just a stub */
8430 #if HAVE_PTHREADS_D4
8431         status = pthread_detach( &t );
8432 #else
8433         status = pthread_detach( t );
8434 #endif
8435
8436 #ifdef HAVE_LINUX_THREADS
8437         pthread_kill_other_threads_np();
8438 #endif
8439
8440         exit( status );
8441
8442 }
8443
8444 EOF
8445 if { (eval echo configure:8446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8446 then
8447   ol_cv_pthread_thread=yes
8448 else
8449   echo "configure: failed program was:" >&5
8450   cat conftest.$ac_ext >&5
8451   rm -fr conftest*
8452   ol_cv_pthread_thread=no
8453 fi
8454 rm -fr conftest*
8455 fi
8456
8457
8458                 # restore the LIBS
8459                 LIBS="$ol_LIBS"
8460         
8461 fi
8462
8463 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8464
8465         if test $ol_cv_pthread_thread = yes ; then
8466                 ol_link_pthreads="-thread"
8467                 ol_link_threads=posix
8468         fi
8469 fi
8470
8471
8472                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8473 if test "$ol_link_threads" = no ; then
8474         # try -lpthread -lmach -lexc -lc_r
8475         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8476 echo "configure:8477: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8477 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8478   echo $ac_n "(cached) $ac_c" 1>&6
8479 else
8480   
8481                 # save the flags
8482                 ol_LIBS="$LIBS"
8483                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8484
8485                 if test "$cross_compiling" = yes; then
8486   cat > conftest.$ac_ext <<EOF
8487 #line 8488 "configure"
8488 #include "confdefs.h"
8489 /* pthread test headers */
8490 #include <pthread.h>
8491 #ifndef NULL
8492 #define NULL (void*)0
8493 #endif
8494
8495 static void *task(p)
8496         void *p;
8497 {
8498         return (void *) (p == NULL);
8499 }
8500
8501 int main() {
8502
8503         /* pthread test function */
8504         pthread_t t;
8505         int status;
8506 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8507         /* This system (e.g. AIX) defaults detached; must override */
8508         pthread_attr_t attr;
8509
8510         status = pthread_attr_init(&attr);
8511         if( status ) exit( status );
8512
8513         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8514         if( status ) exit( status );
8515
8516 #define ATTR    &attr
8517 #else
8518 #if HAVE_PTHREADS_D4
8519 #define ATTR    pthread_attr_default
8520 #else
8521 #define ATTR    NULL
8522 #endif
8523 #endif
8524         /* make sure pthread_create() isn't just a stub */
8525         status = pthread_create(&t, ATTR, task, NULL);
8526         if( status ) exit( status );
8527
8528         /* make sure pthread_detach() isn't just a stub */
8529 #if HAVE_PTHREADS_D4
8530         status = pthread_detach( &t );
8531 #else
8532         status = pthread_detach( t );
8533 #endif
8534
8535 #ifdef HAVE_LINUX_THREADS
8536         pthread_kill_other_threads_np();
8537 #endif
8538
8539         exit( status );
8540
8541 ; return 0; }
8542 EOF
8543 if { (eval echo configure:8544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8544   rm -rf conftest*
8545   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8546 else
8547   echo "configure: failed program was:" >&5
8548   cat conftest.$ac_ext >&5
8549   rm -rf conftest*
8550   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8551 fi
8552 rm -f conftest*
8553 else
8554   cat > conftest.$ac_ext <<EOF
8555 #line 8556 "configure"
8556 #include "confdefs.h"
8557 /* pthread test headers */
8558 #include <pthread.h>
8559 #ifndef NULL
8560 #define NULL (void*)0
8561 #endif
8562
8563 static void *task(p)
8564         void *p;
8565 {
8566         return (void *) (p == NULL);
8567 }
8568
8569
8570 int main(argc, argv)
8571         int argc;
8572         char **argv;
8573 {
8574
8575         /* pthread test function */
8576         pthread_t t;
8577         int status;
8578 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8579         /* This system (e.g. AIX) defaults detached; must override */
8580         pthread_attr_t attr;
8581
8582         status = pthread_attr_init(&attr);
8583         if( status ) exit( status );
8584
8585         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8586         if( status ) exit( status );
8587
8588 #define ATTR    &attr
8589 #else
8590 #if HAVE_PTHREADS_D4
8591 #define ATTR    pthread_attr_default
8592 #else
8593 #define ATTR    NULL
8594 #endif
8595 #endif
8596         /* make sure pthread_create() isn't just a stub */
8597         status = pthread_create(&t, ATTR, task, NULL);
8598         if( status ) exit( status );
8599
8600         /* make sure pthread_detach() isn't just a stub */
8601 #if HAVE_PTHREADS_D4
8602         status = pthread_detach( &t );
8603 #else
8604         status = pthread_detach( t );
8605 #endif
8606
8607 #ifdef HAVE_LINUX_THREADS
8608         pthread_kill_other_threads_np();
8609 #endif
8610
8611         exit( status );
8612
8613 }
8614
8615 EOF
8616 if { (eval echo configure:8617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8617 then
8618   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8619 else
8620   echo "configure: failed program was:" >&5
8621   cat conftest.$ac_ext >&5
8622   rm -fr conftest*
8623   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8624 fi
8625 rm -fr conftest*
8626 fi
8627
8628
8629                 # restore the LIBS
8630                 LIBS="$ol_LIBS"
8631         
8632 fi
8633
8634 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8635
8636         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8637                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8638                 ol_link_threads=posix
8639         fi
8640 fi
8641
8642                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8643 if test "$ol_link_threads" = no ; then
8644         # try -lpthread -lmach -lexc
8645         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8646 echo "configure:8647: checking for pthread link with -lpthread -lmach -lexc" >&5
8647 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8648   echo $ac_n "(cached) $ac_c" 1>&6
8649 else
8650   
8651                 # save the flags
8652                 ol_LIBS="$LIBS"
8653                 LIBS="-lpthread -lmach -lexc $LIBS"
8654
8655                 if test "$cross_compiling" = yes; then
8656   cat > conftest.$ac_ext <<EOF
8657 #line 8658 "configure"
8658 #include "confdefs.h"
8659 /* pthread test headers */
8660 #include <pthread.h>
8661 #ifndef NULL
8662 #define NULL (void*)0
8663 #endif
8664
8665 static void *task(p)
8666         void *p;
8667 {
8668         return (void *) (p == NULL);
8669 }
8670
8671 int main() {
8672
8673         /* pthread test function */
8674         pthread_t t;
8675         int status;
8676 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8677         /* This system (e.g. AIX) defaults detached; must override */
8678         pthread_attr_t attr;
8679
8680         status = pthread_attr_init(&attr);
8681         if( status ) exit( status );
8682
8683         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8684         if( status ) exit( status );
8685
8686 #define ATTR    &attr
8687 #else
8688 #if HAVE_PTHREADS_D4
8689 #define ATTR    pthread_attr_default
8690 #else
8691 #define ATTR    NULL
8692 #endif
8693 #endif
8694         /* make sure pthread_create() isn't just a stub */
8695         status = pthread_create(&t, ATTR, task, NULL);
8696         if( status ) exit( status );
8697
8698         /* make sure pthread_detach() isn't just a stub */
8699 #if HAVE_PTHREADS_D4
8700         status = pthread_detach( &t );
8701 #else
8702         status = pthread_detach( t );
8703 #endif
8704
8705 #ifdef HAVE_LINUX_THREADS
8706         pthread_kill_other_threads_np();
8707 #endif
8708
8709         exit( status );
8710
8711 ; return 0; }
8712 EOF
8713 if { (eval echo configure:8714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8714   rm -rf conftest*
8715   ol_cv_pthread_lpthread_lmach_lexc=yes
8716 else
8717   echo "configure: failed program was:" >&5
8718   cat conftest.$ac_ext >&5
8719   rm -rf conftest*
8720   ol_cv_pthread_lpthread_lmach_lexc=no
8721 fi
8722 rm -f conftest*
8723 else
8724   cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727 /* pthread test headers */
8728 #include <pthread.h>
8729 #ifndef NULL
8730 #define NULL (void*)0
8731 #endif
8732
8733 static void *task(p)
8734         void *p;
8735 {
8736         return (void *) (p == NULL);
8737 }
8738
8739
8740 int main(argc, argv)
8741         int argc;
8742         char **argv;
8743 {
8744
8745         /* pthread test function */
8746         pthread_t t;
8747         int status;
8748 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8749         /* This system (e.g. AIX) defaults detached; must override */
8750         pthread_attr_t attr;
8751
8752         status = pthread_attr_init(&attr);
8753         if( status ) exit( status );
8754
8755         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8756         if( status ) exit( status );
8757
8758 #define ATTR    &attr
8759 #else
8760 #if HAVE_PTHREADS_D4
8761 #define ATTR    pthread_attr_default
8762 #else
8763 #define ATTR    NULL
8764 #endif
8765 #endif
8766         /* make sure pthread_create() isn't just a stub */
8767         status = pthread_create(&t, ATTR, task, NULL);
8768         if( status ) exit( status );
8769
8770         /* make sure pthread_detach() isn't just a stub */
8771 #if HAVE_PTHREADS_D4
8772         status = pthread_detach( &t );
8773 #else
8774         status = pthread_detach( t );
8775 #endif
8776
8777 #ifdef HAVE_LINUX_THREADS
8778         pthread_kill_other_threads_np();
8779 #endif
8780
8781         exit( status );
8782
8783 }
8784
8785 EOF
8786 if { (eval echo configure:8787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8787 then
8788   ol_cv_pthread_lpthread_lmach_lexc=yes
8789 else
8790   echo "configure: failed program was:" >&5
8791   cat conftest.$ac_ext >&5
8792   rm -fr conftest*
8793   ol_cv_pthread_lpthread_lmach_lexc=no
8794 fi
8795 rm -fr conftest*
8796 fi
8797
8798
8799                 # restore the LIBS
8800                 LIBS="$ol_LIBS"
8801         
8802 fi
8803
8804 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8805
8806         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8807                 ol_link_pthreads="-lpthread -lmach -lexc"
8808                 ol_link_threads=posix
8809         fi
8810 fi
8811
8812
8813                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8814 if test "$ol_link_threads" = no ; then
8815         # try -lpthread -Wl,-woff,85
8816         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8817 echo "configure:8818: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8818 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8819   echo $ac_n "(cached) $ac_c" 1>&6
8820 else
8821   
8822                 # save the flags
8823                 ol_LIBS="$LIBS"
8824                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8825
8826                 if test "$cross_compiling" = yes; then
8827   cat > conftest.$ac_ext <<EOF
8828 #line 8829 "configure"
8829 #include "confdefs.h"
8830 /* pthread test headers */
8831 #include <pthread.h>
8832 #ifndef NULL
8833 #define NULL (void*)0
8834 #endif
8835
8836 static void *task(p)
8837         void *p;
8838 {
8839         return (void *) (p == NULL);
8840 }
8841
8842 int main() {
8843
8844         /* pthread test function */
8845         pthread_t t;
8846         int status;
8847 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8848         /* This system (e.g. AIX) defaults detached; must override */
8849         pthread_attr_t attr;
8850
8851         status = pthread_attr_init(&attr);
8852         if( status ) exit( status );
8853
8854         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8855         if( status ) exit( status );
8856
8857 #define ATTR    &attr
8858 #else
8859 #if HAVE_PTHREADS_D4
8860 #define ATTR    pthread_attr_default
8861 #else
8862 #define ATTR    NULL
8863 #endif
8864 #endif
8865         /* make sure pthread_create() isn't just a stub */
8866         status = pthread_create(&t, ATTR, task, NULL);
8867         if( status ) exit( status );
8868
8869         /* make sure pthread_detach() isn't just a stub */
8870 #if HAVE_PTHREADS_D4
8871         status = pthread_detach( &t );
8872 #else
8873         status = pthread_detach( t );
8874 #endif
8875
8876 #ifdef HAVE_LINUX_THREADS
8877         pthread_kill_other_threads_np();
8878 #endif
8879
8880         exit( status );
8881
8882 ; return 0; }
8883 EOF
8884 if { (eval echo configure:8885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8885   rm -rf conftest*
8886   ol_cv_pthread_lib_lpthread_woff=yes
8887 else
8888   echo "configure: failed program was:" >&5
8889   cat conftest.$ac_ext >&5
8890   rm -rf conftest*
8891   ol_cv_pthread_lib_lpthread_woff=no
8892 fi
8893 rm -f conftest*
8894 else
8895   cat > conftest.$ac_ext <<EOF
8896 #line 8897 "configure"
8897 #include "confdefs.h"
8898 /* pthread test headers */
8899 #include <pthread.h>
8900 #ifndef NULL
8901 #define NULL (void*)0
8902 #endif
8903
8904 static void *task(p)
8905         void *p;
8906 {
8907         return (void *) (p == NULL);
8908 }
8909
8910
8911 int main(argc, argv)
8912         int argc;
8913         char **argv;
8914 {
8915
8916         /* pthread test function */
8917         pthread_t t;
8918         int status;
8919 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8920         /* This system (e.g. AIX) defaults detached; must override */
8921         pthread_attr_t attr;
8922
8923         status = pthread_attr_init(&attr);
8924         if( status ) exit( status );
8925
8926         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8927         if( status ) exit( status );
8928
8929 #define ATTR    &attr
8930 #else
8931 #if HAVE_PTHREADS_D4
8932 #define ATTR    pthread_attr_default
8933 #else
8934 #define ATTR    NULL
8935 #endif
8936 #endif
8937         /* make sure pthread_create() isn't just a stub */
8938         status = pthread_create(&t, ATTR, task, NULL);
8939         if( status ) exit( status );
8940
8941         /* make sure pthread_detach() isn't just a stub */
8942 #if HAVE_PTHREADS_D4
8943         status = pthread_detach( &t );
8944 #else
8945         status = pthread_detach( t );
8946 #endif
8947
8948 #ifdef HAVE_LINUX_THREADS
8949         pthread_kill_other_threads_np();
8950 #endif
8951
8952         exit( status );
8953
8954 }
8955
8956 EOF
8957 if { (eval echo configure:8958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8958 then
8959   ol_cv_pthread_lib_lpthread_woff=yes
8960 else
8961   echo "configure: failed program was:" >&5
8962   cat conftest.$ac_ext >&5
8963   rm -fr conftest*
8964   ol_cv_pthread_lib_lpthread_woff=no
8965 fi
8966 rm -fr conftest*
8967 fi
8968
8969
8970                 # restore the LIBS
8971                 LIBS="$ol_LIBS"
8972         
8973 fi
8974
8975 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8976
8977         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8978                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8979                 ol_link_threads=posix
8980         fi
8981 fi
8982
8983
8984                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8985 if test "$ol_link_threads" = no ; then
8986         # try -lpthread
8987         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8988 echo "configure:8989: checking for pthread link with -lpthread" >&5
8989 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8990   echo $ac_n "(cached) $ac_c" 1>&6
8991 else
8992   
8993                 # save the flags
8994                 ol_LIBS="$LIBS"
8995                 LIBS="-lpthread $LIBS"
8996
8997                 if test "$cross_compiling" = yes; then
8998   cat > conftest.$ac_ext <<EOF
8999 #line 9000 "configure"
9000 #include "confdefs.h"
9001 /* pthread test headers */
9002 #include <pthread.h>
9003 #ifndef NULL
9004 #define NULL (void*)0
9005 #endif
9006
9007 static void *task(p)
9008         void *p;
9009 {
9010         return (void *) (p == NULL);
9011 }
9012
9013 int main() {
9014
9015         /* pthread test function */
9016         pthread_t t;
9017         int status;
9018 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9019         /* This system (e.g. AIX) defaults detached; must override */
9020         pthread_attr_t attr;
9021
9022         status = pthread_attr_init(&attr);
9023         if( status ) exit( status );
9024
9025         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9026         if( status ) exit( status );
9027
9028 #define ATTR    &attr
9029 #else
9030 #if HAVE_PTHREADS_D4
9031 #define ATTR    pthread_attr_default
9032 #else
9033 #define ATTR    NULL
9034 #endif
9035 #endif
9036         /* make sure pthread_create() isn't just a stub */
9037         status = pthread_create(&t, ATTR, task, NULL);
9038         if( status ) exit( status );
9039
9040         /* make sure pthread_detach() isn't just a stub */
9041 #if HAVE_PTHREADS_D4
9042         status = pthread_detach( &t );
9043 #else
9044         status = pthread_detach( t );
9045 #endif
9046
9047 #ifdef HAVE_LINUX_THREADS
9048         pthread_kill_other_threads_np();
9049 #endif
9050
9051         exit( status );
9052
9053 ; return 0; }
9054 EOF
9055 if { (eval echo configure:9056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9056   rm -rf conftest*
9057   ol_cv_pthread_lpthread=yes
9058 else
9059   echo "configure: failed program was:" >&5
9060   cat conftest.$ac_ext >&5
9061   rm -rf conftest*
9062   ol_cv_pthread_lpthread=no
9063 fi
9064 rm -f conftest*
9065 else
9066   cat > conftest.$ac_ext <<EOF
9067 #line 9068 "configure"
9068 #include "confdefs.h"
9069 /* pthread test headers */
9070 #include <pthread.h>
9071 #ifndef NULL
9072 #define NULL (void*)0
9073 #endif
9074
9075 static void *task(p)
9076         void *p;
9077 {
9078         return (void *) (p == NULL);
9079 }
9080
9081
9082 int main(argc, argv)
9083         int argc;
9084         char **argv;
9085 {
9086
9087         /* pthread test function */
9088         pthread_t t;
9089         int status;
9090 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9091         /* This system (e.g. AIX) defaults detached; must override */
9092         pthread_attr_t attr;
9093
9094         status = pthread_attr_init(&attr);
9095         if( status ) exit( status );
9096
9097         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9098         if( status ) exit( status );
9099
9100 #define ATTR    &attr
9101 #else
9102 #if HAVE_PTHREADS_D4
9103 #define ATTR    pthread_attr_default
9104 #else
9105 #define ATTR    NULL
9106 #endif
9107 #endif
9108         /* make sure pthread_create() isn't just a stub */
9109         status = pthread_create(&t, ATTR, task, NULL);
9110         if( status ) exit( status );
9111
9112         /* make sure pthread_detach() isn't just a stub */
9113 #if HAVE_PTHREADS_D4
9114         status = pthread_detach( &t );
9115 #else
9116         status = pthread_detach( t );
9117 #endif
9118
9119 #ifdef HAVE_LINUX_THREADS
9120         pthread_kill_other_threads_np();
9121 #endif
9122
9123         exit( status );
9124
9125 }
9126
9127 EOF
9128 if { (eval echo configure:9129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9129 then
9130   ol_cv_pthread_lpthread=yes
9131 else
9132   echo "configure: failed program was:" >&5
9133   cat conftest.$ac_ext >&5
9134   rm -fr conftest*
9135   ol_cv_pthread_lpthread=no
9136 fi
9137 rm -fr conftest*
9138 fi
9139
9140
9141                 # restore the LIBS
9142                 LIBS="$ol_LIBS"
9143         
9144 fi
9145
9146 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9147
9148         if test $ol_cv_pthread_lpthread = yes ; then
9149                 ol_link_pthreads="-lpthread"
9150                 ol_link_threads=posix
9151         fi
9152 fi
9153
9154                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9155 if test "$ol_link_threads" = no ; then
9156         # try -lc_r
9157         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9158 echo "configure:9159: checking for pthread link with -lc_r" >&5
9159 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9160   echo $ac_n "(cached) $ac_c" 1>&6
9161 else
9162   
9163                 # save the flags
9164                 ol_LIBS="$LIBS"
9165                 LIBS="-lc_r $LIBS"
9166
9167                 if test "$cross_compiling" = yes; then
9168   cat > conftest.$ac_ext <<EOF
9169 #line 9170 "configure"
9170 #include "confdefs.h"
9171 /* pthread test headers */
9172 #include <pthread.h>
9173 #ifndef NULL
9174 #define NULL (void*)0
9175 #endif
9176
9177 static void *task(p)
9178         void *p;
9179 {
9180         return (void *) (p == NULL);
9181 }
9182
9183 int main() {
9184
9185         /* pthread test function */
9186         pthread_t t;
9187         int status;
9188 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9189         /* This system (e.g. AIX) defaults detached; must override */
9190         pthread_attr_t attr;
9191
9192         status = pthread_attr_init(&attr);
9193         if( status ) exit( status );
9194
9195         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9196         if( status ) exit( status );
9197
9198 #define ATTR    &attr
9199 #else
9200 #if HAVE_PTHREADS_D4
9201 #define ATTR    pthread_attr_default
9202 #else
9203 #define ATTR    NULL
9204 #endif
9205 #endif
9206         /* make sure pthread_create() isn't just a stub */
9207         status = pthread_create(&t, ATTR, task, NULL);
9208         if( status ) exit( status );
9209
9210         /* make sure pthread_detach() isn't just a stub */
9211 #if HAVE_PTHREADS_D4
9212         status = pthread_detach( &t );
9213 #else
9214         status = pthread_detach( t );
9215 #endif
9216
9217 #ifdef HAVE_LINUX_THREADS
9218         pthread_kill_other_threads_np();
9219 #endif
9220
9221         exit( status );
9222
9223 ; return 0; }
9224 EOF
9225 if { (eval echo configure:9226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9226   rm -rf conftest*
9227   ol_cv_pthread_lc_r=yes
9228 else
9229   echo "configure: failed program was:" >&5
9230   cat conftest.$ac_ext >&5
9231   rm -rf conftest*
9232   ol_cv_pthread_lc_r=no
9233 fi
9234 rm -f conftest*
9235 else
9236   cat > conftest.$ac_ext <<EOF
9237 #line 9238 "configure"
9238 #include "confdefs.h"
9239 /* pthread test headers */
9240 #include <pthread.h>
9241 #ifndef NULL
9242 #define NULL (void*)0
9243 #endif
9244
9245 static void *task(p)
9246         void *p;
9247 {
9248         return (void *) (p == NULL);
9249 }
9250
9251
9252 int main(argc, argv)
9253         int argc;
9254         char **argv;
9255 {
9256
9257         /* pthread test function */
9258         pthread_t t;
9259         int status;
9260 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9261         /* This system (e.g. AIX) defaults detached; must override */
9262         pthread_attr_t attr;
9263
9264         status = pthread_attr_init(&attr);
9265         if( status ) exit( status );
9266
9267         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9268         if( status ) exit( status );
9269
9270 #define ATTR    &attr
9271 #else
9272 #if HAVE_PTHREADS_D4
9273 #define ATTR    pthread_attr_default
9274 #else
9275 #define ATTR    NULL
9276 #endif
9277 #endif
9278         /* make sure pthread_create() isn't just a stub */
9279         status = pthread_create(&t, ATTR, task, NULL);
9280         if( status ) exit( status );
9281
9282         /* make sure pthread_detach() isn't just a stub */
9283 #if HAVE_PTHREADS_D4
9284         status = pthread_detach( &t );
9285 #else
9286         status = pthread_detach( t );
9287 #endif
9288
9289 #ifdef HAVE_LINUX_THREADS
9290         pthread_kill_other_threads_np();
9291 #endif
9292
9293         exit( status );
9294
9295 }
9296
9297 EOF
9298 if { (eval echo configure:9299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9299 then
9300   ol_cv_pthread_lc_r=yes
9301 else
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -fr conftest*
9305   ol_cv_pthread_lc_r=no
9306 fi
9307 rm -fr conftest*
9308 fi
9309
9310
9311                 # restore the LIBS
9312                 LIBS="$ol_LIBS"
9313         
9314 fi
9315
9316 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9317
9318         if test $ol_cv_pthread_lc_r = yes ; then
9319                 ol_link_pthreads="-lc_r"
9320                 ol_link_threads=posix
9321         fi
9322 fi
9323
9324
9325                 # Pthread try link: -threads (ol_cv_pthread_threads)
9326 if test "$ol_link_threads" = no ; then
9327         # try -threads
9328         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9329 echo "configure:9330: checking for pthread link with -threads" >&5
9330 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9331   echo $ac_n "(cached) $ac_c" 1>&6
9332 else
9333   
9334                 # save the flags
9335                 ol_LIBS="$LIBS"
9336                 LIBS="-threads $LIBS"
9337
9338                 if test "$cross_compiling" = yes; then
9339   cat > conftest.$ac_ext <<EOF
9340 #line 9341 "configure"
9341 #include "confdefs.h"
9342 /* pthread test headers */
9343 #include <pthread.h>
9344 #ifndef NULL
9345 #define NULL (void*)0
9346 #endif
9347
9348 static void *task(p)
9349         void *p;
9350 {
9351         return (void *) (p == NULL);
9352 }
9353
9354 int main() {
9355
9356         /* pthread test function */
9357         pthread_t t;
9358         int status;
9359 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9360         /* This system (e.g. AIX) defaults detached; must override */
9361         pthread_attr_t attr;
9362
9363         status = pthread_attr_init(&attr);
9364         if( status ) exit( status );
9365
9366         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9367         if( status ) exit( status );
9368
9369 #define ATTR    &attr
9370 #else
9371 #if HAVE_PTHREADS_D4
9372 #define ATTR    pthread_attr_default
9373 #else
9374 #define ATTR    NULL
9375 #endif
9376 #endif
9377         /* make sure pthread_create() isn't just a stub */
9378         status = pthread_create(&t, ATTR, task, NULL);
9379         if( status ) exit( status );
9380
9381         /* make sure pthread_detach() isn't just a stub */
9382 #if HAVE_PTHREADS_D4
9383         status = pthread_detach( &t );
9384 #else
9385         status = pthread_detach( t );
9386 #endif
9387
9388 #ifdef HAVE_LINUX_THREADS
9389         pthread_kill_other_threads_np();
9390 #endif
9391
9392         exit( status );
9393
9394 ; return 0; }
9395 EOF
9396 if { (eval echo configure:9397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9397   rm -rf conftest*
9398   ol_cv_pthread_threads=yes
9399 else
9400   echo "configure: failed program was:" >&5
9401   cat conftest.$ac_ext >&5
9402   rm -rf conftest*
9403   ol_cv_pthread_threads=no
9404 fi
9405 rm -f conftest*
9406 else
9407   cat > conftest.$ac_ext <<EOF
9408 #line 9409 "configure"
9409 #include "confdefs.h"
9410 /* pthread test headers */
9411 #include <pthread.h>
9412 #ifndef NULL
9413 #define NULL (void*)0
9414 #endif
9415
9416 static void *task(p)
9417         void *p;
9418 {
9419         return (void *) (p == NULL);
9420 }
9421
9422
9423 int main(argc, argv)
9424         int argc;
9425         char **argv;
9426 {
9427
9428         /* pthread test function */
9429         pthread_t t;
9430         int status;
9431 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9432         /* This system (e.g. AIX) defaults detached; must override */
9433         pthread_attr_t attr;
9434
9435         status = pthread_attr_init(&attr);
9436         if( status ) exit( status );
9437
9438         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9439         if( status ) exit( status );
9440
9441 #define ATTR    &attr
9442 #else
9443 #if HAVE_PTHREADS_D4
9444 #define ATTR    pthread_attr_default
9445 #else
9446 #define ATTR    NULL
9447 #endif
9448 #endif
9449         /* make sure pthread_create() isn't just a stub */
9450         status = pthread_create(&t, ATTR, task, NULL);
9451         if( status ) exit( status );
9452
9453         /* make sure pthread_detach() isn't just a stub */
9454 #if HAVE_PTHREADS_D4
9455         status = pthread_detach( &t );
9456 #else
9457         status = pthread_detach( t );
9458 #endif
9459
9460 #ifdef HAVE_LINUX_THREADS
9461         pthread_kill_other_threads_np();
9462 #endif
9463
9464         exit( status );
9465
9466 }
9467
9468 EOF
9469 if { (eval echo configure:9470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9470 then
9471   ol_cv_pthread_threads=yes
9472 else
9473   echo "configure: failed program was:" >&5
9474   cat conftest.$ac_ext >&5
9475   rm -fr conftest*
9476   ol_cv_pthread_threads=no
9477 fi
9478 rm -fr conftest*
9479 fi
9480
9481
9482                 # restore the LIBS
9483                 LIBS="$ol_LIBS"
9484         
9485 fi
9486
9487 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9488
9489         if test $ol_cv_pthread_threads = yes ; then
9490                 ol_link_pthreads="-threads"
9491                 ol_link_threads=posix
9492         fi
9493 fi
9494
9495
9496                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9497 if test "$ol_link_threads" = no ; then
9498         # try -lpthreads -lmach -lexc -lc_r
9499         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9500 echo "configure:9501: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9501 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9502   echo $ac_n "(cached) $ac_c" 1>&6
9503 else
9504   
9505                 # save the flags
9506                 ol_LIBS="$LIBS"
9507                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9508
9509                 if test "$cross_compiling" = yes; then
9510   cat > conftest.$ac_ext <<EOF
9511 #line 9512 "configure"
9512 #include "confdefs.h"
9513 /* pthread test headers */
9514 #include <pthread.h>
9515 #ifndef NULL
9516 #define NULL (void*)0
9517 #endif
9518
9519 static void *task(p)
9520         void *p;
9521 {
9522         return (void *) (p == NULL);
9523 }
9524
9525 int main() {
9526
9527         /* pthread test function */
9528         pthread_t t;
9529         int status;
9530 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9531         /* This system (e.g. AIX) defaults detached; must override */
9532         pthread_attr_t attr;
9533
9534         status = pthread_attr_init(&attr);
9535         if( status ) exit( status );
9536
9537         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9538         if( status ) exit( status );
9539
9540 #define ATTR    &attr
9541 #else
9542 #if HAVE_PTHREADS_D4
9543 #define ATTR    pthread_attr_default
9544 #else
9545 #define ATTR    NULL
9546 #endif
9547 #endif
9548         /* make sure pthread_create() isn't just a stub */
9549         status = pthread_create(&t, ATTR, task, NULL);
9550         if( status ) exit( status );
9551
9552         /* make sure pthread_detach() isn't just a stub */
9553 #if HAVE_PTHREADS_D4
9554         status = pthread_detach( &t );
9555 #else
9556         status = pthread_detach( t );
9557 #endif
9558
9559 #ifdef HAVE_LINUX_THREADS
9560         pthread_kill_other_threads_np();
9561 #endif
9562
9563         exit( status );
9564
9565 ; return 0; }
9566 EOF
9567 if { (eval echo configure:9568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9568   rm -rf conftest*
9569   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9570 else
9571   echo "configure: failed program was:" >&5
9572   cat conftest.$ac_ext >&5
9573   rm -rf conftest*
9574   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9575 fi
9576 rm -f conftest*
9577 else
9578   cat > conftest.$ac_ext <<EOF
9579 #line 9580 "configure"
9580 #include "confdefs.h"
9581 /* pthread test headers */
9582 #include <pthread.h>
9583 #ifndef NULL
9584 #define NULL (void*)0
9585 #endif
9586
9587 static void *task(p)
9588         void *p;
9589 {
9590         return (void *) (p == NULL);
9591 }
9592
9593
9594 int main(argc, argv)
9595         int argc;
9596         char **argv;
9597 {
9598
9599         /* pthread test function */
9600         pthread_t t;
9601         int status;
9602 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9603         /* This system (e.g. AIX) defaults detached; must override */
9604         pthread_attr_t attr;
9605
9606         status = pthread_attr_init(&attr);
9607         if( status ) exit( status );
9608
9609         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9610         if( status ) exit( status );
9611
9612 #define ATTR    &attr
9613 #else
9614 #if HAVE_PTHREADS_D4
9615 #define ATTR    pthread_attr_default
9616 #else
9617 #define ATTR    NULL
9618 #endif
9619 #endif
9620         /* make sure pthread_create() isn't just a stub */
9621         status = pthread_create(&t, ATTR, task, NULL);
9622         if( status ) exit( status );
9623
9624         /* make sure pthread_detach() isn't just a stub */
9625 #if HAVE_PTHREADS_D4
9626         status = pthread_detach( &t );
9627 #else
9628         status = pthread_detach( t );
9629 #endif
9630
9631 #ifdef HAVE_LINUX_THREADS
9632         pthread_kill_other_threads_np();
9633 #endif
9634
9635         exit( status );
9636
9637 }
9638
9639 EOF
9640 if { (eval echo configure:9641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9641 then
9642   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9643 else
9644   echo "configure: failed program was:" >&5
9645   cat conftest.$ac_ext >&5
9646   rm -fr conftest*
9647   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9648 fi
9649 rm -fr conftest*
9650 fi
9651
9652
9653                 # restore the LIBS
9654                 LIBS="$ol_LIBS"
9655         
9656 fi
9657
9658 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9659
9660         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9661                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9662                 ol_link_threads=posix
9663         fi
9664 fi
9665
9666                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9667 if test "$ol_link_threads" = no ; then
9668         # try -lpthreads -lmach -lexc
9669         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9670 echo "configure:9671: checking for pthread link with -lpthreads -lmach -lexc" >&5
9671 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9672   echo $ac_n "(cached) $ac_c" 1>&6
9673 else
9674   
9675                 # save the flags
9676                 ol_LIBS="$LIBS"
9677                 LIBS="-lpthreads -lmach -lexc $LIBS"
9678
9679                 if test "$cross_compiling" = yes; then
9680   cat > conftest.$ac_ext <<EOF
9681 #line 9682 "configure"
9682 #include "confdefs.h"
9683 /* pthread test headers */
9684 #include <pthread.h>
9685 #ifndef NULL
9686 #define NULL (void*)0
9687 #endif
9688
9689 static void *task(p)
9690         void *p;
9691 {
9692         return (void *) (p == NULL);
9693 }
9694
9695 int main() {
9696
9697         /* pthread test function */
9698         pthread_t t;
9699         int status;
9700 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9701         /* This system (e.g. AIX) defaults detached; must override */
9702         pthread_attr_t attr;
9703
9704         status = pthread_attr_init(&attr);
9705         if( status ) exit( status );
9706
9707         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9708         if( status ) exit( status );
9709
9710 #define ATTR    &attr
9711 #else
9712 #if HAVE_PTHREADS_D4
9713 #define ATTR    pthread_attr_default
9714 #else
9715 #define ATTR    NULL
9716 #endif
9717 #endif
9718         /* make sure pthread_create() isn't just a stub */
9719         status = pthread_create(&t, ATTR, task, NULL);
9720         if( status ) exit( status );
9721
9722         /* make sure pthread_detach() isn't just a stub */
9723 #if HAVE_PTHREADS_D4
9724         status = pthread_detach( &t );
9725 #else
9726         status = pthread_detach( t );
9727 #endif
9728
9729 #ifdef HAVE_LINUX_THREADS
9730         pthread_kill_other_threads_np();
9731 #endif
9732
9733         exit( status );
9734
9735 ; return 0; }
9736 EOF
9737 if { (eval echo configure:9738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9738   rm -rf conftest*
9739   ol_cv_pthread_lpthreads_lmach_lexc=yes
9740 else
9741   echo "configure: failed program was:" >&5
9742   cat conftest.$ac_ext >&5
9743   rm -rf conftest*
9744   ol_cv_pthread_lpthreads_lmach_lexc=no
9745 fi
9746 rm -f conftest*
9747 else
9748   cat > conftest.$ac_ext <<EOF
9749 #line 9750 "configure"
9750 #include "confdefs.h"
9751 /* pthread test headers */
9752 #include <pthread.h>
9753 #ifndef NULL
9754 #define NULL (void*)0
9755 #endif
9756
9757 static void *task(p)
9758         void *p;
9759 {
9760         return (void *) (p == NULL);
9761 }
9762
9763
9764 int main(argc, argv)
9765         int argc;
9766         char **argv;
9767 {
9768
9769         /* pthread test function */
9770         pthread_t t;
9771         int status;
9772 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9773         /* This system (e.g. AIX) defaults detached; must override */
9774         pthread_attr_t attr;
9775
9776         status = pthread_attr_init(&attr);
9777         if( status ) exit( status );
9778
9779         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9780         if( status ) exit( status );
9781
9782 #define ATTR    &attr
9783 #else
9784 #if HAVE_PTHREADS_D4
9785 #define ATTR    pthread_attr_default
9786 #else
9787 #define ATTR    NULL
9788 #endif
9789 #endif
9790         /* make sure pthread_create() isn't just a stub */
9791         status = pthread_create(&t, ATTR, task, NULL);
9792         if( status ) exit( status );
9793
9794         /* make sure pthread_detach() isn't just a stub */
9795 #if HAVE_PTHREADS_D4
9796         status = pthread_detach( &t );
9797 #else
9798         status = pthread_detach( t );
9799 #endif
9800
9801 #ifdef HAVE_LINUX_THREADS
9802         pthread_kill_other_threads_np();
9803 #endif
9804
9805         exit( status );
9806
9807 }
9808
9809 EOF
9810 if { (eval echo configure:9811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9811 then
9812   ol_cv_pthread_lpthreads_lmach_lexc=yes
9813 else
9814   echo "configure: failed program was:" >&5
9815   cat conftest.$ac_ext >&5
9816   rm -fr conftest*
9817   ol_cv_pthread_lpthreads_lmach_lexc=no
9818 fi
9819 rm -fr conftest*
9820 fi
9821
9822
9823                 # restore the LIBS
9824                 LIBS="$ol_LIBS"
9825         
9826 fi
9827
9828 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9829
9830         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9831                 ol_link_pthreads="-lpthreads -lmach -lexc"
9832                 ol_link_threads=posix
9833         fi
9834 fi
9835
9836                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9837 if test "$ol_link_threads" = no ; then
9838         # try -lpthreads -lexc
9839         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9840 echo "configure:9841: checking for pthread link with -lpthreads -lexc" >&5
9841 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9842   echo $ac_n "(cached) $ac_c" 1>&6
9843 else
9844   
9845                 # save the flags
9846                 ol_LIBS="$LIBS"
9847                 LIBS="-lpthreads -lexc $LIBS"
9848
9849                 if test "$cross_compiling" = yes; then
9850   cat > conftest.$ac_ext <<EOF
9851 #line 9852 "configure"
9852 #include "confdefs.h"
9853 /* pthread test headers */
9854 #include <pthread.h>
9855 #ifndef NULL
9856 #define NULL (void*)0
9857 #endif
9858
9859 static void *task(p)
9860         void *p;
9861 {
9862         return (void *) (p == NULL);
9863 }
9864
9865 int main() {
9866
9867         /* pthread test function */
9868         pthread_t t;
9869         int status;
9870 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9871         /* This system (e.g. AIX) defaults detached; must override */
9872         pthread_attr_t attr;
9873
9874         status = pthread_attr_init(&attr);
9875         if( status ) exit( status );
9876
9877         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9878         if( status ) exit( status );
9879
9880 #define ATTR    &attr
9881 #else
9882 #if HAVE_PTHREADS_D4
9883 #define ATTR    pthread_attr_default
9884 #else
9885 #define ATTR    NULL
9886 #endif
9887 #endif
9888         /* make sure pthread_create() isn't just a stub */
9889         status = pthread_create(&t, ATTR, task, NULL);
9890         if( status ) exit( status );
9891
9892         /* make sure pthread_detach() isn't just a stub */
9893 #if HAVE_PTHREADS_D4
9894         status = pthread_detach( &t );
9895 #else
9896         status = pthread_detach( t );
9897 #endif
9898
9899 #ifdef HAVE_LINUX_THREADS
9900         pthread_kill_other_threads_np();
9901 #endif
9902
9903         exit( status );
9904
9905 ; return 0; }
9906 EOF
9907 if { (eval echo configure:9908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9908   rm -rf conftest*
9909   ol_cv_pthread_lpthreads_lexc=yes
9910 else
9911   echo "configure: failed program was:" >&5
9912   cat conftest.$ac_ext >&5
9913   rm -rf conftest*
9914   ol_cv_pthread_lpthreads_lexc=no
9915 fi
9916 rm -f conftest*
9917 else
9918   cat > conftest.$ac_ext <<EOF
9919 #line 9920 "configure"
9920 #include "confdefs.h"
9921 /* pthread test headers */
9922 #include <pthread.h>
9923 #ifndef NULL
9924 #define NULL (void*)0
9925 #endif
9926
9927 static void *task(p)
9928         void *p;
9929 {
9930         return (void *) (p == NULL);
9931 }
9932
9933
9934 int main(argc, argv)
9935         int argc;
9936         char **argv;
9937 {
9938
9939         /* pthread test function */
9940         pthread_t t;
9941         int status;
9942 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9943         /* This system (e.g. AIX) defaults detached; must override */
9944         pthread_attr_t attr;
9945
9946         status = pthread_attr_init(&attr);
9947         if( status ) exit( status );
9948
9949         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9950         if( status ) exit( status );
9951
9952 #define ATTR    &attr
9953 #else
9954 #if HAVE_PTHREADS_D4
9955 #define ATTR    pthread_attr_default
9956 #else
9957 #define ATTR    NULL
9958 #endif
9959 #endif
9960         /* make sure pthread_create() isn't just a stub */
9961         status = pthread_create(&t, ATTR, task, NULL);
9962         if( status ) exit( status );
9963
9964         /* make sure pthread_detach() isn't just a stub */
9965 #if HAVE_PTHREADS_D4
9966         status = pthread_detach( &t );
9967 #else
9968         status = pthread_detach( t );
9969 #endif
9970
9971 #ifdef HAVE_LINUX_THREADS
9972         pthread_kill_other_threads_np();
9973 #endif
9974
9975         exit( status );
9976
9977 }
9978
9979 EOF
9980 if { (eval echo configure:9981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9981 then
9982   ol_cv_pthread_lpthreads_lexc=yes
9983 else
9984   echo "configure: failed program was:" >&5
9985   cat conftest.$ac_ext >&5
9986   rm -fr conftest*
9987   ol_cv_pthread_lpthreads_lexc=no
9988 fi
9989 rm -fr conftest*
9990 fi
9991
9992
9993                 # restore the LIBS
9994                 LIBS="$ol_LIBS"
9995         
9996 fi
9997
9998 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9999
10000         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
10001                 ol_link_pthreads="-lpthreads -lexc"
10002                 ol_link_threads=posix
10003         fi
10004 fi
10005
10006
10007                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
10008 if test "$ol_link_threads" = no ; then
10009         # try -lpthreads
10010         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
10011 echo "configure:10012: checking for pthread link with -lpthreads" >&5
10012 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
10013   echo $ac_n "(cached) $ac_c" 1>&6
10014 else
10015   
10016                 # save the flags
10017                 ol_LIBS="$LIBS"
10018                 LIBS="-lpthreads $LIBS"
10019
10020                 if test "$cross_compiling" = yes; then
10021   cat > conftest.$ac_ext <<EOF
10022 #line 10023 "configure"
10023 #include "confdefs.h"
10024 /* pthread test headers */
10025 #include <pthread.h>
10026 #ifndef NULL
10027 #define NULL (void*)0
10028 #endif
10029
10030 static void *task(p)
10031         void *p;
10032 {
10033         return (void *) (p == NULL);
10034 }
10035
10036 int main() {
10037
10038         /* pthread test function */
10039         pthread_t t;
10040         int status;
10041 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10042         /* This system (e.g. AIX) defaults detached; must override */
10043         pthread_attr_t attr;
10044
10045         status = pthread_attr_init(&attr);
10046         if( status ) exit( status );
10047
10048         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10049         if( status ) exit( status );
10050
10051 #define ATTR    &attr
10052 #else
10053 #if HAVE_PTHREADS_D4
10054 #define ATTR    pthread_attr_default
10055 #else
10056 #define ATTR    NULL
10057 #endif
10058 #endif
10059         /* make sure pthread_create() isn't just a stub */
10060         status = pthread_create(&t, ATTR, task, NULL);
10061         if( status ) exit( status );
10062
10063         /* make sure pthread_detach() isn't just a stub */
10064 #if HAVE_PTHREADS_D4
10065         status = pthread_detach( &t );
10066 #else
10067         status = pthread_detach( t );
10068 #endif
10069
10070 #ifdef HAVE_LINUX_THREADS
10071         pthread_kill_other_threads_np();
10072 #endif
10073
10074         exit( status );
10075
10076 ; return 0; }
10077 EOF
10078 if { (eval echo configure:10079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10079   rm -rf conftest*
10080   ol_cv_pthread_lib_lpthreads=yes
10081 else
10082   echo "configure: failed program was:" >&5
10083   cat conftest.$ac_ext >&5
10084   rm -rf conftest*
10085   ol_cv_pthread_lib_lpthreads=no
10086 fi
10087 rm -f conftest*
10088 else
10089   cat > conftest.$ac_ext <<EOF
10090 #line 10091 "configure"
10091 #include "confdefs.h"
10092 /* pthread test headers */
10093 #include <pthread.h>
10094 #ifndef NULL
10095 #define NULL (void*)0
10096 #endif
10097
10098 static void *task(p)
10099         void *p;
10100 {
10101         return (void *) (p == NULL);
10102 }
10103
10104
10105 int main(argc, argv)
10106         int argc;
10107         char **argv;
10108 {
10109
10110         /* pthread test function */
10111         pthread_t t;
10112         int status;
10113 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10114         /* This system (e.g. AIX) defaults detached; must override */
10115         pthread_attr_t attr;
10116
10117         status = pthread_attr_init(&attr);
10118         if( status ) exit( status );
10119
10120         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10121         if( status ) exit( status );
10122
10123 #define ATTR    &attr
10124 #else
10125 #if HAVE_PTHREADS_D4
10126 #define ATTR    pthread_attr_default
10127 #else
10128 #define ATTR    NULL
10129 #endif
10130 #endif
10131         /* make sure pthread_create() isn't just a stub */
10132         status = pthread_create(&t, ATTR, task, NULL);
10133         if( status ) exit( status );
10134
10135         /* make sure pthread_detach() isn't just a stub */
10136 #if HAVE_PTHREADS_D4
10137         status = pthread_detach( &t );
10138 #else
10139         status = pthread_detach( t );
10140 #endif
10141
10142 #ifdef HAVE_LINUX_THREADS
10143         pthread_kill_other_threads_np();
10144 #endif
10145
10146         exit( status );
10147
10148 }
10149
10150 EOF
10151 if { (eval echo configure:10152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10152 then
10153   ol_cv_pthread_lib_lpthreads=yes
10154 else
10155   echo "configure: failed program was:" >&5
10156   cat conftest.$ac_ext >&5
10157   rm -fr conftest*
10158   ol_cv_pthread_lib_lpthreads=no
10159 fi
10160 rm -fr conftest*
10161 fi
10162
10163
10164                 # restore the LIBS
10165                 LIBS="$ol_LIBS"
10166         
10167 fi
10168
10169 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10170
10171         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10172                 ol_link_pthreads="-lpthreads"
10173                 ol_link_threads=posix
10174         fi
10175 fi
10176
10177
10178                 if test $ol_link_threads != no ; then
10179                         cat >> confdefs.h <<\EOF
10180 #define HAVE_PTHREADS 1
10181 EOF
10182
10183
10184                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10185
10186                                                 save_CPPFLAGS="$CPPFLAGS"
10187                         save_LIBS="$LIBS"
10188                         LIBS="$LTHREAD_LIBS $LIBS"
10189
10190                                                                                                 for ac_func in sched_yield pthread_yield
10191 do
10192 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10193 echo "configure:10194: checking for $ac_func" >&5
10194 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10195   echo $ac_n "(cached) $ac_c" 1>&6
10196 else
10197   cat > conftest.$ac_ext <<EOF
10198 #line 10199 "configure"
10199 #include "confdefs.h"
10200 /* System header to define __stub macros and hopefully few prototypes,
10201     which can conflict with char $ac_func(); below.  */
10202 #include <assert.h>
10203 /* Override any gcc2 internal prototype to avoid an error.  */
10204 /* We use char because int might match the return type of a gcc2
10205     builtin and then its argument prototype would still apply.  */
10206 char $ac_func();
10207 char (*f)();
10208
10209 int main() {
10210
10211 /* The GNU C library defines this for functions which it implements
10212     to always fail with ENOSYS.  Some functions are actually named
10213     something starting with __ and the normal name is an alias.  */
10214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10215 choke me
10216 #else
10217 f = $ac_func;
10218 #endif
10219
10220 ; return 0; }
10221 EOF
10222 if { (eval echo configure:10223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10223   rm -rf conftest*
10224   eval "ac_cv_func_$ac_func=yes"
10225 else
10226   echo "configure: failed program was:" >&5
10227   cat conftest.$ac_ext >&5
10228   rm -rf conftest*
10229   eval "ac_cv_func_$ac_func=no"
10230 fi
10231 rm -f conftest*
10232 fi
10233
10234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10235   echo "$ac_t""yes" 1>&6
10236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10237   cat >> confdefs.h <<EOF
10238 #define $ac_tr_func 1
10239 EOF
10240  
10241 else
10242   echo "$ac_t""no" 1>&6
10243 fi
10244 done
10245
10246
10247                         if test $ac_cv_func_sched_yield = no -a \
10248                                 $ac_cv_func_pthread_yield = no ; then
10249                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10250 echo "configure:10251: checking for sched_yield in -lrt" >&5
10251 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10253   echo $ac_n "(cached) $ac_c" 1>&6
10254 else
10255   ac_save_LIBS="$LIBS"
10256 LIBS="-lrt  $LIBS"
10257 cat > conftest.$ac_ext <<EOF
10258 #line 10259 "configure"
10259 #include "confdefs.h"
10260 /* Override any gcc2 internal prototype to avoid an error.  */
10261 /* We use char because int might match the return type of a gcc2
10262     builtin and then its argument prototype would still apply.  */
10263 char sched_yield();
10264
10265 int main() {
10266 sched_yield()
10267 ; return 0; }
10268 EOF
10269 if { (eval echo configure:10270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10270   rm -rf conftest*
10271   eval "ac_cv_lib_$ac_lib_var=yes"
10272 else
10273   echo "configure: failed program was:" >&5
10274   cat conftest.$ac_ext >&5
10275   rm -rf conftest*
10276   eval "ac_cv_lib_$ac_lib_var=no"
10277 fi
10278 rm -f conftest*
10279 LIBS="$ac_save_LIBS"
10280
10281 fi
10282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10283   echo "$ac_t""yes" 1>&6
10284   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10285                                         cat >> confdefs.h <<\EOF
10286 #define HAVE_SCHED_YIELD 1
10287 EOF
10288
10289                                         ac_cv_func_sched_yield=yes
10290 else
10291   echo "$ac_t""no" 1>&6
10292 ac_cv_func_sched_yield=no
10293 fi
10294
10295                         fi
10296                         if test $ac_cv_func_sched_yield = no -a \
10297                                 $ac_cv_func_pthread_yield = no ; then
10298                                                                                                 for ac_func in thr_yield
10299 do
10300 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10301 echo "configure:10302: checking for $ac_func" >&5
10302 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10303   echo $ac_n "(cached) $ac_c" 1>&6
10304 else
10305   cat > conftest.$ac_ext <<EOF
10306 #line 10307 "configure"
10307 #include "confdefs.h"
10308 /* System header to define __stub macros and hopefully few prototypes,
10309     which can conflict with char $ac_func(); below.  */
10310 #include <assert.h>
10311 /* Override any gcc2 internal prototype to avoid an error.  */
10312 /* We use char because int might match the return type of a gcc2
10313     builtin and then its argument prototype would still apply.  */
10314 char $ac_func();
10315 char (*f)();
10316
10317 int main() {
10318
10319 /* The GNU C library defines this for functions which it implements
10320     to always fail with ENOSYS.  Some functions are actually named
10321     something starting with __ and the normal name is an alias.  */
10322 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10323 choke me
10324 #else
10325 f = $ac_func;
10326 #endif
10327
10328 ; return 0; }
10329 EOF
10330 if { (eval echo configure:10331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10331   rm -rf conftest*
10332   eval "ac_cv_func_$ac_func=yes"
10333 else
10334   echo "configure: failed program was:" >&5
10335   cat conftest.$ac_ext >&5
10336   rm -rf conftest*
10337   eval "ac_cv_func_$ac_func=no"
10338 fi
10339 rm -f conftest*
10340 fi
10341
10342 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10343   echo "$ac_t""yes" 1>&6
10344     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10345   cat >> confdefs.h <<EOF
10346 #define $ac_tr_func 1
10347 EOF
10348  
10349 else
10350   echo "$ac_t""no" 1>&6
10351 fi
10352 done
10353
10354                         fi
10355                         if test $ac_cv_func_sched_yield = no -a \
10356                                 $ac_cv_func_pthread_yield = no -a \
10357                                 "$ac_cv_func_thr_yield" = no ; then
10358                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10359                         fi
10360
10361                                                 for ac_func in pthread_kill
10362 do
10363 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10364 echo "configure:10365: checking for $ac_func" >&5
10365 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10366   echo $ac_n "(cached) $ac_c" 1>&6
10367 else
10368   cat > conftest.$ac_ext <<EOF
10369 #line 10370 "configure"
10370 #include "confdefs.h"
10371 /* System header to define __stub macros and hopefully few prototypes,
10372     which can conflict with char $ac_func(); below.  */
10373 #include <assert.h>
10374 /* Override any gcc2 internal prototype to avoid an error.  */
10375 /* We use char because int might match the return type of a gcc2
10376     builtin and then its argument prototype would still apply.  */
10377 char $ac_func();
10378 char (*f)();
10379
10380 int main() {
10381
10382 /* The GNU C library defines this for functions which it implements
10383     to always fail with ENOSYS.  Some functions are actually named
10384     something starting with __ and the normal name is an alias.  */
10385 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10386 choke me
10387 #else
10388 f = $ac_func;
10389 #endif
10390
10391 ; return 0; }
10392 EOF
10393 if { (eval echo configure:10394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10394   rm -rf conftest*
10395   eval "ac_cv_func_$ac_func=yes"
10396 else
10397   echo "configure: failed program was:" >&5
10398   cat conftest.$ac_ext >&5
10399   rm -rf conftest*
10400   eval "ac_cv_func_$ac_func=no"
10401 fi
10402 rm -f conftest*
10403 fi
10404
10405 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10406   echo "$ac_t""yes" 1>&6
10407     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10408   cat >> confdefs.h <<EOF
10409 #define $ac_tr_func 1
10410 EOF
10411  
10412 else
10413   echo "$ac_t""no" 1>&6
10414 fi
10415 done
10416
10417
10418                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10419 echo "configure:10420: checking for pthread_detach with <pthread.h>" >&5
10420 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10421   echo $ac_n "(cached) $ac_c" 1>&6
10422 else
10423   
10424                                                                 cat > conftest.$ac_ext <<EOF
10425 #line 10426 "configure"
10426 #include "confdefs.h"
10427
10428 #include <pthread.h>
10429 #ifndef NULL
10430 #define NULL (void*)0
10431 #endif
10432
10433 int main() {
10434 pthread_detach(NULL);
10435 ; return 0; }
10436 EOF
10437 if { (eval echo configure:10438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10438   rm -rf conftest*
10439   ol_cv_func_pthread_detach=yes
10440 else
10441   echo "configure: failed program was:" >&5
10442   cat conftest.$ac_ext >&5
10443   rm -rf conftest*
10444   ol_cv_func_pthread_detach=no
10445 fi
10446 rm -f conftest*
10447                         
10448 fi
10449
10450 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10451
10452                         if test $ol_cv_func_pthread_detach = no ; then
10453                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10454                         fi
10455
10456                         cat >> confdefs.h <<\EOF
10457 #define HAVE_PTHREAD_DETACH 1
10458 EOF
10459
10460
10461                                                 for ac_func in \
10462                                 pthread_setconcurrency \
10463                                 pthread_getconcurrency \
10464                                 thr_setconcurrency \
10465                                 thr_getconcurrency \
10466                         
10467 do
10468 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10469 echo "configure:10470: checking for $ac_func" >&5
10470 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10471   echo $ac_n "(cached) $ac_c" 1>&6
10472 else
10473   cat > conftest.$ac_ext <<EOF
10474 #line 10475 "configure"
10475 #include "confdefs.h"
10476 /* System header to define __stub macros and hopefully few prototypes,
10477     which can conflict with char $ac_func(); below.  */
10478 #include <assert.h>
10479 /* Override any gcc2 internal prototype to avoid an error.  */
10480 /* We use char because int might match the return type of a gcc2
10481     builtin and then its argument prototype would still apply.  */
10482 char $ac_func();
10483 char (*f)();
10484
10485 int main() {
10486
10487 /* The GNU C library defines this for functions which it implements
10488     to always fail with ENOSYS.  Some functions are actually named
10489     something starting with __ and the normal name is an alias.  */
10490 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10491 choke me
10492 #else
10493 f = $ac_func;
10494 #endif
10495
10496 ; return 0; }
10497 EOF
10498 if { (eval echo configure:10499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10499   rm -rf conftest*
10500   eval "ac_cv_func_$ac_func=yes"
10501 else
10502   echo "configure: failed program was:" >&5
10503   cat conftest.$ac_ext >&5
10504   rm -rf conftest*
10505   eval "ac_cv_func_$ac_func=no"
10506 fi
10507 rm -f conftest*
10508 fi
10509
10510 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10511   echo "$ac_t""yes" 1>&6
10512     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10513   cat >> confdefs.h <<EOF
10514 #define $ac_tr_func 1
10515 EOF
10516  
10517 else
10518   echo "$ac_t""no" 1>&6
10519 fi
10520 done
10521
10522
10523                         
10524         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10525 echo "configure:10526: checking for pthread_kill_other_threads_np" >&5
10526 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10527   echo $ac_n "(cached) $ac_c" 1>&6
10528 else
10529   cat > conftest.$ac_ext <<EOF
10530 #line 10531 "configure"
10531 #include "confdefs.h"
10532 /* System header to define __stub macros and hopefully few prototypes,
10533     which can conflict with char pthread_kill_other_threads_np(); below.  */
10534 #include <assert.h>
10535 /* Override any gcc2 internal prototype to avoid an error.  */
10536 /* We use char because int might match the return type of a gcc2
10537     builtin and then its argument prototype would still apply.  */
10538 char pthread_kill_other_threads_np();
10539 char (*f)();
10540
10541 int main() {
10542
10543 /* The GNU C library defines this for functions which it implements
10544     to always fail with ENOSYS.  Some functions are actually named
10545     something starting with __ and the normal name is an alias.  */
10546 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10547 choke me
10548 #else
10549 f = pthread_kill_other_threads_np;
10550 #endif
10551
10552 ; return 0; }
10553 EOF
10554 if { (eval echo configure:10555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10555   rm -rf conftest*
10556   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10557 else
10558   echo "configure: failed program was:" >&5
10559   cat conftest.$ac_ext >&5
10560   rm -rf conftest*
10561   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10562 fi
10563 rm -f conftest*
10564 fi
10565
10566 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10567   echo "$ac_t""yes" 1>&6
10568   :
10569 else
10570   echo "$ac_t""no" 1>&6
10571 fi
10572
10573         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10574 echo "configure:10575: checking for LinuxThreads implementation" >&5
10575 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10576   echo $ac_n "(cached) $ac_c" 1>&6
10577 else
10578   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10579 fi
10580
10581 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10582
10583                         
10584         
10585         
10586         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10587 echo "configure:10588: checking for LinuxThreads consistency" >&5
10588 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10589   echo $ac_n "(cached) $ac_c" 1>&6
10590 else
10591   
10592                 if test $ol_cv_header_linux_threads = yes -a \
10593                         $ol_cv_sys_linux_threads = yes; then
10594                         ol_cv_linux_threads=yes
10595                 elif test $ol_cv_header_linux_threads = no -a \
10596                         $ol_cv_sys_linux_threads = no; then
10597                         ol_cv_linux_threads=no
10598                 else
10599                         ol_cv_linux_threads=error
10600                 fi
10601         
10602 fi
10603
10604 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10605
10606
10607                         if test $ol_cv_linux_threads = error; then
10608                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10609                         fi
10610
10611                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10612 echo "configure:10613: checking if pthread_create() works" >&5
10613 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10614   echo $ac_n "(cached) $ac_c" 1>&6
10615 else
10616   
10617                         if test "$cross_compiling" = yes; then
10618                                 ol_cv_pthread_create_works=yes
10619 else
10620   cat > conftest.$ac_ext <<EOF
10621 #line 10622 "configure"
10622 #include "confdefs.h"
10623 /* pthread test headers */
10624 #include <pthread.h>
10625 #ifndef NULL
10626 #define NULL (void*)0
10627 #endif
10628
10629 static void *task(p)
10630         void *p;
10631 {
10632         return (void *) (p == NULL);
10633 }
10634
10635
10636 int main(argc, argv)
10637         int argc;
10638         char **argv;
10639 {
10640
10641         /* pthread test function */
10642         pthread_t t;
10643         int status;
10644 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10645         /* This system (e.g. AIX) defaults detached; must override */
10646         pthread_attr_t attr;
10647
10648         status = pthread_attr_init(&attr);
10649         if( status ) exit( status );
10650
10651         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10652         if( status ) exit( status );
10653
10654 #define ATTR    &attr
10655 #else
10656 #if HAVE_PTHREADS_D4
10657 #define ATTR    pthread_attr_default
10658 #else
10659 #define ATTR    NULL
10660 #endif
10661 #endif
10662         /* make sure pthread_create() isn't just a stub */
10663         status = pthread_create(&t, ATTR, task, NULL);
10664         if( status ) exit( status );
10665
10666         /* make sure pthread_detach() isn't just a stub */
10667 #if HAVE_PTHREADS_D4
10668         status = pthread_detach( &t );
10669 #else
10670         status = pthread_detach( t );
10671 #endif
10672
10673 #ifdef HAVE_LINUX_THREADS
10674         pthread_kill_other_threads_np();
10675 #endif
10676
10677         exit( status );
10678
10679 }
10680
10681 EOF
10682 if { (eval echo configure:10683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10683 then
10684   ol_cv_pthread_create_works=yes
10685 else
10686   echo "configure: failed program was:" >&5
10687   cat conftest.$ac_ext >&5
10688   rm -fr conftest*
10689   ol_cv_pthread_create_works=no
10690 fi
10691 rm -fr conftest*
10692 fi
10693
10694 fi
10695
10696 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10697
10698                         if test $ol_cv_pthread_create_works = no ; then
10699                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10700                         fi
10701
10702                                                 if test $ol_with_yielding_select = auto ; then
10703                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10704 echo "configure:10705: checking if select yields when using pthreads" >&5
10705 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10706   echo $ac_n "(cached) $ac_c" 1>&6
10707 else
10708   
10709                                 if test "$cross_compiling" = yes; then
10710   ol_cv_pthread_select_yields=cross
10711 else
10712   cat > conftest.$ac_ext <<EOF
10713 #line 10714 "configure"
10714 #include "confdefs.h"
10715
10716 #include <sys/types.h>
10717 #include <sys/time.h>
10718 #include <unistd.h>
10719 #include <pthread.h>
10720 #ifndef NULL
10721 #define NULL (void*) 0
10722 #endif
10723
10724 static int fildes[2];
10725
10726 static void *task(p)
10727         void *p;
10728 {
10729         int i;
10730         struct timeval tv;
10731
10732         fd_set rfds;
10733
10734         tv.tv_sec=10;
10735         tv.tv_usec=0;
10736
10737         FD_ZERO(&rfds);
10738         FD_SET(fildes[0], &rfds);
10739
10740         /* we're not interested in any fds */
10741         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10742
10743         if(i < 0) {
10744                 perror("select");
10745                 exit(10);
10746         }
10747
10748         exit(0); /* if we exit here, the select blocked the whole process */
10749 }
10750
10751 int main(argc, argv)
10752         int argc;
10753         char **argv;
10754 {
10755         pthread_t t;
10756
10757         /* create a pipe to select */
10758         if(pipe(&fildes[0])) {
10759                 perror("select");
10760                 exit(1);
10761         }
10762
10763 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10764         (void) pthread_setconcurrency(2);
10765 #else
10766 #ifdef HAVE_THR_SETCONCURRENCY
10767         /* Set Solaris LWP concurrency to 2 */
10768         thr_setconcurrency(2);
10769 #endif
10770 #endif
10771
10772 #if HAVE_PTHREADS_D4
10773         pthread_create(&t, pthread_attr_default, task, NULL);
10774 #else
10775         pthread_create(&t, NULL, task, NULL);
10776 #endif
10777
10778 #if HAVE_SCHED_YIELD
10779         sched_yield();  /* make sure task runs first */
10780 #else
10781 #ifdef HAVE_PTHREAD_YIELD
10782         pthread_yield();        /* make sure task runs first */
10783 #endif
10784 #endif
10785
10786         exit(2);
10787 }
10788 EOF
10789 if { (eval echo configure:10790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10790 then
10791   ol_cv_pthread_select_yields=no
10792 else
10793   echo "configure: failed program was:" >&5
10794   cat conftest.$ac_ext >&5
10795   rm -fr conftest*
10796   ol_cv_pthread_select_yields=yes
10797 fi
10798 rm -fr conftest*
10799 fi
10800
10801 fi
10802
10803 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10804
10805                                 if test $ol_cv_pthread_select_yields = cross ; then
10806                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10807                                 fi
10808
10809                                 if test $ol_cv_pthread_select_yields = yes ; then
10810                                         ol_with_yielding_select=yes
10811                                 fi
10812                         fi
10813
10814                                                 CPPFLAGS="$save_CPPFLAGS"
10815                         LIBS="$save_LIBS"
10816                 else
10817                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10818                 fi
10819         fi
10820
10821         if test $ol_with_threads = posix ; then
10822                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10823         fi
10824 fi
10825
10826 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10827         -o $ol_with_threads = mach ; then
10828
10829                 for ac_hdr in mach/cthreads.h
10830 do
10831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10833 echo "configure:10834: checking for $ac_hdr" >&5
10834 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10835   echo $ac_n "(cached) $ac_c" 1>&6
10836 else
10837   cat > conftest.$ac_ext <<EOF
10838 #line 10839 "configure"
10839 #include "confdefs.h"
10840 #include <$ac_hdr>
10841 EOF
10842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10843 { (eval echo configure:10844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10845 if test -z "$ac_err"; then
10846   rm -rf conftest*
10847   eval "ac_cv_header_$ac_safe=yes"
10848 else
10849   echo "$ac_err" >&5
10850   echo "configure: failed program was:" >&5
10851   cat conftest.$ac_ext >&5
10852   rm -rf conftest*
10853   eval "ac_cv_header_$ac_safe=no"
10854 fi
10855 rm -f conftest*
10856 fi
10857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10858   echo "$ac_t""yes" 1>&6
10859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10860   cat >> confdefs.h <<EOF
10861 #define $ac_tr_hdr 1
10862 EOF
10863  
10864 else
10865   echo "$ac_t""no" 1>&6
10866 fi
10867 done
10868
10869         if test $ac_cv_header_mach_cthreads_h = yes ; then
10870                 ol_with_threads=found
10871
10872                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10873 echo "configure:10874: checking for cthread_fork" >&5
10874 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10875   echo $ac_n "(cached) $ac_c" 1>&6
10876 else
10877   cat > conftest.$ac_ext <<EOF
10878 #line 10879 "configure"
10879 #include "confdefs.h"
10880 /* System header to define __stub macros and hopefully few prototypes,
10881     which can conflict with char cthread_fork(); below.  */
10882 #include <assert.h>
10883 /* Override any gcc2 internal prototype to avoid an error.  */
10884 /* We use char because int might match the return type of a gcc2
10885     builtin and then its argument prototype would still apply.  */
10886 char cthread_fork();
10887 char (*f)();
10888
10889 int main() {
10890
10891 /* The GNU C library defines this for functions which it implements
10892     to always fail with ENOSYS.  Some functions are actually named
10893     something starting with __ and the normal name is an alias.  */
10894 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10895 choke me
10896 #else
10897 f = cthread_fork;
10898 #endif
10899
10900 ; return 0; }
10901 EOF
10902 if { (eval echo configure:10903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10903   rm -rf conftest*
10904   eval "ac_cv_func_cthread_fork=yes"
10905 else
10906   echo "configure: failed program was:" >&5
10907   cat conftest.$ac_ext >&5
10908   rm -rf conftest*
10909   eval "ac_cv_func_cthread_fork=no"
10910 fi
10911 rm -f conftest*
10912 fi
10913
10914 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10915   echo "$ac_t""yes" 1>&6
10916   ol_link_threads=yes
10917 else
10918   echo "$ac_t""no" 1>&6
10919 fi
10920
10921
10922                 if test $ol_link_threads = no ; then
10923                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10924 echo "configure:10925: checking for cthread_fork with -all_load" >&5
10925 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10926   echo $ac_n "(cached) $ac_c" 1>&6
10927 else
10928   
10929                                                                 save_LIBS="$LIBS"
10930                                 LIBS="-all_load $LIBS"
10931                                 cat > conftest.$ac_ext <<EOF
10932 #line 10933 "configure"
10933 #include "confdefs.h"
10934 #include <mach/cthreads.h>
10935 int main() {
10936
10937                                         cthread_fork((void *)0, (void *)0);
10938                                         
10939 ; return 0; }
10940 EOF
10941 if { (eval echo configure:10942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10942   rm -rf conftest*
10943   ol_cv_cthread_all_load=yes
10944 else
10945   echo "configure: failed program was:" >&5
10946   cat conftest.$ac_ext >&5
10947   rm -rf conftest*
10948   ol_cv_cthread_all_load=no
10949 fi
10950 rm -f conftest*
10951                                                                 LIBS="$save_LIBS"
10952                         
10953 fi
10954
10955 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10956
10957                         if test $ol_cv_cthread_all_load = yes ; then
10958                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10959                                 ol_link_threads=mach
10960                         fi
10961                 fi
10962
10963                 if test $ol_link_threads != no ; then
10964                         : check for cthread specific functionality here
10965                         cat >> confdefs.h <<\EOF
10966 #define HAVE_MACH_CTHREADS 1
10967 EOF
10968
10969                 else
10970                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10971                 fi
10972         fi
10973
10974         if test $ol_with_threads = mach ; then
10975                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10976         fi
10977 fi
10978
10979 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10980         -o $ol_with_threads = pth ; then
10981
10982         for ac_hdr in pth.h
10983 do
10984 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10985 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10986 echo "configure:10987: checking for $ac_hdr" >&5
10987 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   cat > conftest.$ac_ext <<EOF
10991 #line 10992 "configure"
10992 #include "confdefs.h"
10993 #include <$ac_hdr>
10994 EOF
10995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10996 { (eval echo configure:10997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10998 if test -z "$ac_err"; then
10999   rm -rf conftest*
11000   eval "ac_cv_header_$ac_safe=yes"
11001 else
11002   echo "$ac_err" >&5
11003   echo "configure: failed program was:" >&5
11004   cat conftest.$ac_ext >&5
11005   rm -rf conftest*
11006   eval "ac_cv_header_$ac_safe=no"
11007 fi
11008 rm -f conftest*
11009 fi
11010 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11011   echo "$ac_t""yes" 1>&6
11012     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11013   cat >> confdefs.h <<EOF
11014 #define $ac_tr_hdr 1
11015 EOF
11016  
11017 else
11018   echo "$ac_t""no" 1>&6
11019 fi
11020 done
11021
11022
11023         if test $ac_cv_header_pth_h = yes ; then
11024                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
11025 echo "configure:11026: checking for pth_version in -lpth" >&5
11026 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
11027 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11028   echo $ac_n "(cached) $ac_c" 1>&6
11029 else
11030   ac_save_LIBS="$LIBS"
11031 LIBS="-lpth  $LIBS"
11032 cat > conftest.$ac_ext <<EOF
11033 #line 11034 "configure"
11034 #include "confdefs.h"
11035 /* Override any gcc2 internal prototype to avoid an error.  */
11036 /* We use char because int might match the return type of a gcc2
11037     builtin and then its argument prototype would still apply.  */
11038 char pth_version();
11039
11040 int main() {
11041 pth_version()
11042 ; return 0; }
11043 EOF
11044 if { (eval echo configure:11045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11045   rm -rf conftest*
11046   eval "ac_cv_lib_$ac_lib_var=yes"
11047 else
11048   echo "configure: failed program was:" >&5
11049   cat conftest.$ac_ext >&5
11050   rm -rf conftest*
11051   eval "ac_cv_lib_$ac_lib_var=no"
11052 fi
11053 rm -f conftest*
11054 LIBS="$ac_save_LIBS"
11055
11056 fi
11057 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11058   echo "$ac_t""yes" 1>&6
11059   have_pth=yes
11060 else
11061   echo "$ac_t""no" 1>&6
11062 have_pth=no
11063 fi
11064
11065
11066                 if test $have_pth = yes ; then
11067                         cat >> confdefs.h <<\EOF
11068 #define HAVE_GNU_PTH 1
11069 EOF
11070
11071                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
11072                         ol_link_threads=pth
11073
11074                         if test $ol_with_yielding_select = auto ; then
11075                                 ol_with_yielding_select=yes
11076                         fi
11077                 fi
11078         fi
11079 fi
11080
11081 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11082         -o $ol_with_threads = lwp ; then
11083
11084                 for ac_hdr in thread.h synch.h
11085 do
11086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11088 echo "configure:11089: checking for $ac_hdr" >&5
11089 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11090   echo $ac_n "(cached) $ac_c" 1>&6
11091 else
11092   cat > conftest.$ac_ext <<EOF
11093 #line 11094 "configure"
11094 #include "confdefs.h"
11095 #include <$ac_hdr>
11096 EOF
11097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11098 { (eval echo configure:11099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11100 if test -z "$ac_err"; then
11101   rm -rf conftest*
11102   eval "ac_cv_header_$ac_safe=yes"
11103 else
11104   echo "$ac_err" >&5
11105   echo "configure: failed program was:" >&5
11106   cat conftest.$ac_ext >&5
11107   rm -rf conftest*
11108   eval "ac_cv_header_$ac_safe=no"
11109 fi
11110 rm -f conftest*
11111 fi
11112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11113   echo "$ac_t""yes" 1>&6
11114     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11115   cat >> confdefs.h <<EOF
11116 #define $ac_tr_hdr 1
11117 EOF
11118  
11119 else
11120   echo "$ac_t""no" 1>&6
11121 fi
11122 done
11123
11124         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
11125                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
11126 echo "configure:11127: checking for thr_create in -lthread" >&5
11127 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
11128 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11129   echo $ac_n "(cached) $ac_c" 1>&6
11130 else
11131   ac_save_LIBS="$LIBS"
11132 LIBS="-lthread  $LIBS"
11133 cat > conftest.$ac_ext <<EOF
11134 #line 11135 "configure"
11135 #include "confdefs.h"
11136 /* Override any gcc2 internal prototype to avoid an error.  */
11137 /* We use char because int might match the return type of a gcc2
11138     builtin and then its argument prototype would still apply.  */
11139 char thr_create();
11140
11141 int main() {
11142 thr_create()
11143 ; return 0; }
11144 EOF
11145 if { (eval echo configure:11146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11146   rm -rf conftest*
11147   eval "ac_cv_lib_$ac_lib_var=yes"
11148 else
11149   echo "configure: failed program was:" >&5
11150   cat conftest.$ac_ext >&5
11151   rm -rf conftest*
11152   eval "ac_cv_lib_$ac_lib_var=no"
11153 fi
11154 rm -f conftest*
11155 LIBS="$ac_save_LIBS"
11156
11157 fi
11158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11159   echo "$ac_t""yes" 1>&6
11160   have_thr=yes
11161 else
11162   echo "$ac_t""no" 1>&6
11163 have_thr=no
11164 fi
11165
11166
11167                 if test $have_thr = yes ; then
11168                         cat >> confdefs.h <<\EOF
11169 #define HAVE_THR 1
11170 EOF
11171
11172                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11173                         ol_link_threads=thr
11174
11175                         if test $ol_with_yielding_select = auto ; then
11176                                 ol_with_yielding_select=yes
11177                         fi
11178
11179                                                 for ac_func in \
11180                                 thr_setconcurrency \
11181                                 thr_getconcurrency \
11182                         
11183 do
11184 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11185 echo "configure:11186: checking for $ac_func" >&5
11186 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11187   echo $ac_n "(cached) $ac_c" 1>&6
11188 else
11189   cat > conftest.$ac_ext <<EOF
11190 #line 11191 "configure"
11191 #include "confdefs.h"
11192 /* System header to define __stub macros and hopefully few prototypes,
11193     which can conflict with char $ac_func(); below.  */
11194 #include <assert.h>
11195 /* Override any gcc2 internal prototype to avoid an error.  */
11196 /* We use char because int might match the return type of a gcc2
11197     builtin and then its argument prototype would still apply.  */
11198 char $ac_func();
11199 char (*f)();
11200
11201 int main() {
11202
11203 /* The GNU C library defines this for functions which it implements
11204     to always fail with ENOSYS.  Some functions are actually named
11205     something starting with __ and the normal name is an alias.  */
11206 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11207 choke me
11208 #else
11209 f = $ac_func;
11210 #endif
11211
11212 ; return 0; }
11213 EOF
11214 if { (eval echo configure:11215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11215   rm -rf conftest*
11216   eval "ac_cv_func_$ac_func=yes"
11217 else
11218   echo "configure: failed program was:" >&5
11219   cat conftest.$ac_ext >&5
11220   rm -rf conftest*
11221   eval "ac_cv_func_$ac_func=no"
11222 fi
11223 rm -f conftest*
11224 fi
11225
11226 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11227   echo "$ac_t""yes" 1>&6
11228     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11229   cat >> confdefs.h <<EOF
11230 #define $ac_tr_func 1
11231 EOF
11232  
11233 else
11234   echo "$ac_t""no" 1>&6
11235 fi
11236 done
11237
11238                 fi
11239         fi
11240
11241                 for ac_hdr in lwp/lwp.h
11242 do
11243 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11244 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11245 echo "configure:11246: checking for $ac_hdr" >&5
11246 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11247   echo $ac_n "(cached) $ac_c" 1>&6
11248 else
11249   cat > conftest.$ac_ext <<EOF
11250 #line 11251 "configure"
11251 #include "confdefs.h"
11252 #include <$ac_hdr>
11253 EOF
11254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11255 { (eval echo configure:11256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11257 if test -z "$ac_err"; then
11258   rm -rf conftest*
11259   eval "ac_cv_header_$ac_safe=yes"
11260 else
11261   echo "$ac_err" >&5
11262   echo "configure: failed program was:" >&5
11263   cat conftest.$ac_ext >&5
11264   rm -rf conftest*
11265   eval "ac_cv_header_$ac_safe=no"
11266 fi
11267 rm -f conftest*
11268 fi
11269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11270   echo "$ac_t""yes" 1>&6
11271     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11272   cat >> confdefs.h <<EOF
11273 #define $ac_tr_hdr 1
11274 EOF
11275  
11276 else
11277   echo "$ac_t""no" 1>&6
11278 fi
11279 done
11280
11281         if test $ac_cv_header_lwp_lwp_h = yes ; then
11282                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11283 echo "configure:11284: checking for lwp_create in -llwp" >&5
11284 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11285 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11286   echo $ac_n "(cached) $ac_c" 1>&6
11287 else
11288   ac_save_LIBS="$LIBS"
11289 LIBS="-llwp  $LIBS"
11290 cat > conftest.$ac_ext <<EOF
11291 #line 11292 "configure"
11292 #include "confdefs.h"
11293 /* Override any gcc2 internal prototype to avoid an error.  */
11294 /* We use char because int might match the return type of a gcc2
11295     builtin and then its argument prototype would still apply.  */
11296 char lwp_create();
11297
11298 int main() {
11299 lwp_create()
11300 ; return 0; }
11301 EOF
11302 if { (eval echo configure:11303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11303   rm -rf conftest*
11304   eval "ac_cv_lib_$ac_lib_var=yes"
11305 else
11306   echo "configure: failed program was:" >&5
11307   cat conftest.$ac_ext >&5
11308   rm -rf conftest*
11309   eval "ac_cv_lib_$ac_lib_var=no"
11310 fi
11311 rm -f conftest*
11312 LIBS="$ac_save_LIBS"
11313
11314 fi
11315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11316   echo "$ac_t""yes" 1>&6
11317   have_lwp=yes
11318 else
11319   echo "$ac_t""no" 1>&6
11320 have_lwp=no
11321 fi
11322
11323
11324                 if test $have_lwp = yes ; then
11325                         cat >> confdefs.h <<\EOF
11326 #define HAVE_LWP 1
11327 EOF
11328
11329                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11330                         ol_link_threads=lwp
11331
11332                         if test $ol_with_yielding_select = auto ; then
11333                                 ol_with_yielding_select=no
11334                         fi
11335                 fi
11336         fi
11337 fi
11338
11339 if test $ol_with_yielding_select = yes ; then
11340         cat >> confdefs.h <<\EOF
11341 #define HAVE_YIELDING_SELECT 1
11342 EOF
11343
11344 fi
11345
11346 if test $ol_with_threads = manual ; then
11347                 ol_link_threads=yes
11348
11349         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11350
11351         for ac_hdr in pthread.h sched.h
11352 do
11353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11355 echo "configure:11356: checking for $ac_hdr" >&5
11356 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11357   echo $ac_n "(cached) $ac_c" 1>&6
11358 else
11359   cat > conftest.$ac_ext <<EOF
11360 #line 11361 "configure"
11361 #include "confdefs.h"
11362 #include <$ac_hdr>
11363 EOF
11364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11365 { (eval echo configure:11366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11367 if test -z "$ac_err"; then
11368   rm -rf conftest*
11369   eval "ac_cv_header_$ac_safe=yes"
11370 else
11371   echo "$ac_err" >&5
11372   echo "configure: failed program was:" >&5
11373   cat conftest.$ac_ext >&5
11374   rm -rf conftest*
11375   eval "ac_cv_header_$ac_safe=no"
11376 fi
11377 rm -f conftest*
11378 fi
11379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11380   echo "$ac_t""yes" 1>&6
11381     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11382   cat >> confdefs.h <<EOF
11383 #define $ac_tr_hdr 1
11384 EOF
11385  
11386 else
11387   echo "$ac_t""no" 1>&6
11388 fi
11389 done
11390
11391         for ac_func in sched_yield pthread_yield
11392 do
11393 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11394 echo "configure:11395: checking for $ac_func" >&5
11395 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11396   echo $ac_n "(cached) $ac_c" 1>&6
11397 else
11398   cat > conftest.$ac_ext <<EOF
11399 #line 11400 "configure"
11400 #include "confdefs.h"
11401 /* System header to define __stub macros and hopefully few prototypes,
11402     which can conflict with char $ac_func(); below.  */
11403 #include <assert.h>
11404 /* Override any gcc2 internal prototype to avoid an error.  */
11405 /* We use char because int might match the return type of a gcc2
11406     builtin and then its argument prototype would still apply.  */
11407 char $ac_func();
11408 char (*f)();
11409
11410 int main() {
11411
11412 /* The GNU C library defines this for functions which it implements
11413     to always fail with ENOSYS.  Some functions are actually named
11414     something starting with __ and the normal name is an alias.  */
11415 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11416 choke me
11417 #else
11418 f = $ac_func;
11419 #endif
11420
11421 ; return 0; }
11422 EOF
11423 if { (eval echo configure:11424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11424   rm -rf conftest*
11425   eval "ac_cv_func_$ac_func=yes"
11426 else
11427   echo "configure: failed program was:" >&5
11428   cat conftest.$ac_ext >&5
11429   rm -rf conftest*
11430   eval "ac_cv_func_$ac_func=no"
11431 fi
11432 rm -f conftest*
11433 fi
11434
11435 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11436   echo "$ac_t""yes" 1>&6
11437     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11438   cat >> confdefs.h <<EOF
11439 #define $ac_tr_func 1
11440 EOF
11441  
11442 else
11443   echo "$ac_t""no" 1>&6
11444 fi
11445 done
11446
11447         
11448         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11449 echo "configure:11450: checking for LinuxThreads pthread.h" >&5
11450 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11451   echo $ac_n "(cached) $ac_c" 1>&6
11452 else
11453   cat > conftest.$ac_ext <<EOF
11454 #line 11455 "configure"
11455 #include "confdefs.h"
11456 #include <pthread.h>
11457 EOF
11458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11459   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11460   rm -rf conftest*
11461   ol_cv_header_linux_threads=yes
11462 else
11463   rm -rf conftest*
11464   ol_cv_header_linux_threads=no
11465 fi
11466 rm -f conftest*
11467
11468                 
11469 fi
11470
11471 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11472         if test $ol_cv_header_linux_threads = yes; then
11473                 cat >> confdefs.h <<\EOF
11474 #define HAVE_LINUX_THREADS 1
11475 EOF
11476
11477         fi
11478
11479
11480         for ac_hdr in mach/cthreads.h
11481 do
11482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11484 echo "configure:11485: checking for $ac_hdr" >&5
11485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11486   echo $ac_n "(cached) $ac_c" 1>&6
11487 else
11488   cat > conftest.$ac_ext <<EOF
11489 #line 11490 "configure"
11490 #include "confdefs.h"
11491 #include <$ac_hdr>
11492 EOF
11493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11494 { (eval echo configure:11495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11496 if test -z "$ac_err"; then
11497   rm -rf conftest*
11498   eval "ac_cv_header_$ac_safe=yes"
11499 else
11500   echo "$ac_err" >&5
11501   echo "configure: failed program was:" >&5
11502   cat conftest.$ac_ext >&5
11503   rm -rf conftest*
11504   eval "ac_cv_header_$ac_safe=no"
11505 fi
11506 rm -f conftest*
11507 fi
11508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11509   echo "$ac_t""yes" 1>&6
11510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11511   cat >> confdefs.h <<EOF
11512 #define $ac_tr_hdr 1
11513 EOF
11514  
11515 else
11516   echo "$ac_t""no" 1>&6
11517 fi
11518 done
11519
11520         for ac_hdr in lwp/lwp.h
11521 do
11522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11524 echo "configure:11525: checking for $ac_hdr" >&5
11525 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11526   echo $ac_n "(cached) $ac_c" 1>&6
11527 else
11528   cat > conftest.$ac_ext <<EOF
11529 #line 11530 "configure"
11530 #include "confdefs.h"
11531 #include <$ac_hdr>
11532 EOF
11533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11534 { (eval echo configure:11535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11536 if test -z "$ac_err"; then
11537   rm -rf conftest*
11538   eval "ac_cv_header_$ac_safe=yes"
11539 else
11540   echo "$ac_err" >&5
11541   echo "configure: failed program was:" >&5
11542   cat conftest.$ac_ext >&5
11543   rm -rf conftest*
11544   eval "ac_cv_header_$ac_safe=no"
11545 fi
11546 rm -f conftest*
11547 fi
11548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11549   echo "$ac_t""yes" 1>&6
11550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11551   cat >> confdefs.h <<EOF
11552 #define $ac_tr_hdr 1
11553 EOF
11554  
11555 else
11556   echo "$ac_t""no" 1>&6
11557 fi
11558 done
11559
11560         for ac_hdr in thread.h synch.h
11561 do
11562 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11563 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11564 echo "configure:11565: checking for $ac_hdr" >&5
11565 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11566   echo $ac_n "(cached) $ac_c" 1>&6
11567 else
11568   cat > conftest.$ac_ext <<EOF
11569 #line 11570 "configure"
11570 #include "confdefs.h"
11571 #include <$ac_hdr>
11572 EOF
11573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11574 { (eval echo configure:11575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11576 if test -z "$ac_err"; then
11577   rm -rf conftest*
11578   eval "ac_cv_header_$ac_safe=yes"
11579 else
11580   echo "$ac_err" >&5
11581   echo "configure: failed program was:" >&5
11582   cat conftest.$ac_ext >&5
11583   rm -rf conftest*
11584   eval "ac_cv_header_$ac_safe=no"
11585 fi
11586 rm -f conftest*
11587 fi
11588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11589   echo "$ac_t""yes" 1>&6
11590     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11591   cat >> confdefs.h <<EOF
11592 #define $ac_tr_hdr 1
11593 EOF
11594  
11595 else
11596   echo "$ac_t""no" 1>&6
11597 fi
11598 done
11599
11600 fi
11601
11602 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11603                         cat >> confdefs.h <<\EOF
11604 #define REENTRANT 1
11605 EOF
11606
11607         cat >> confdefs.h <<\EOF
11608 #define _REENTRANT 1
11609 EOF
11610
11611         cat >> confdefs.h <<\EOF
11612 #define THREAD_SAFE 1
11613 EOF
11614
11615         cat >> confdefs.h <<\EOF
11616 #define _THREAD_SAFE 1
11617 EOF
11618
11619         cat >> confdefs.h <<\EOF
11620 #define THREADSAFE 1
11621 EOF
11622
11623         cat >> confdefs.h <<\EOF
11624 #define _THREADSAFE 1
11625 EOF
11626
11627         cat >> confdefs.h <<\EOF
11628 #define _SGI_MP_SOURCE 1
11629 EOF
11630
11631
11632                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11633 echo "configure:11634: checking for thread specific errno" >&5
11634 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11635   echo $ac_n "(cached) $ac_c" 1>&6
11636 else
11637   
11638                 cat > conftest.$ac_ext <<EOF
11639 #line 11640 "configure"
11640 #include "confdefs.h"
11641 #include <errno.h>
11642 int main() {
11643 errno = 0;
11644 ; return 0; }
11645 EOF
11646 if { (eval echo configure:11647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11647   rm -rf conftest*
11648   ol_cv_errno_thread_specific=yes
11649 else
11650   echo "configure: failed program was:" >&5
11651   cat conftest.$ac_ext >&5
11652   rm -rf conftest*
11653   ol_cv_errno_thread_specific=no
11654 fi
11655 rm -f conftest*
11656         
11657 fi
11658
11659 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11660
11661                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11662 echo "configure:11663: checking for thread specific h_errno" >&5
11663 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11664   echo $ac_n "(cached) $ac_c" 1>&6
11665 else
11666   
11667                 cat > conftest.$ac_ext <<EOF
11668 #line 11669 "configure"
11669 #include "confdefs.h"
11670 #include <netdb.h>
11671 int main() {
11672 h_errno = 0;
11673 ; return 0; }
11674 EOF
11675 if { (eval echo configure:11676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11676   rm -rf conftest*
11677   ol_cv_h_errno_thread_specific=yes
11678 else
11679   echo "configure: failed program was:" >&5
11680   cat conftest.$ac_ext >&5
11681   rm -rf conftest*
11682   ol_cv_h_errno_thread_specific=no
11683 fi
11684 rm -f conftest*
11685         
11686 fi
11687
11688 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11689
11690         if test $ol_cv_errno_thread_specific != yes \
11691                 -o $ol_cv_h_errno_thread_specific != yes ; then
11692                 LIBS="$LTHREAD_LIBS $LIBS"
11693                 LTHREAD_LIBS=""
11694         fi
11695
11696 fi  
11697
11698 if test $ol_link_threads = no ; then
11699         if test $ol_with_threads = yes ; then
11700                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11701         fi
11702
11703         if test $ol_with_threads = auto ; then
11704                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11705                 ol_with_threads=no
11706         fi
11707
11708         cat >> confdefs.h <<\EOF
11709 #define NO_THREADS 1
11710 EOF
11711
11712         LTHREAD_LIBS=""
11713 fi
11714
11715 if test $ol_link_threads != no ; then
11716         cat >> confdefs.h <<\EOF
11717 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11718 EOF
11719
11720 fi
11721
11722
11723 ol_link_ldbm=no 
11724 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
11725         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
11726 echo "configure:11727: checking for DB2 library" >&5
11727 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
11728   echo $ac_n "(cached) $ac_c" 1>&6
11729 else
11730         ol_LIBS="$LIBS"
11731         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
11732 echo "configure:11733: checking for db_appexit in -ldb" >&5
11733 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
11734 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11735   echo $ac_n "(cached) $ac_c" 1>&6
11736 else
11737   ac_save_LIBS="$LIBS"
11738 LIBS="-ldb  $LIBS"
11739 cat > conftest.$ac_ext <<EOF
11740 #line 11741 "configure"
11741 #include "confdefs.h"
11742 /* Override any gcc2 internal prototype to avoid an error.  */
11743 /* We use char because int might match the return type of a gcc2
11744     builtin and then its argument prototype would still apply.  */
11745 char db_appexit();
11746
11747 int main() {
11748 db_appexit()
11749 ; return 0; }
11750 EOF
11751 if { (eval echo configure:11752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11752   rm -rf conftest*
11753   eval "ac_cv_lib_$ac_lib_var=yes"
11754 else
11755   echo "configure: failed program was:" >&5
11756   cat conftest.$ac_ext >&5
11757   rm -rf conftest*
11758   eval "ac_cv_lib_$ac_lib_var=no"
11759 fi
11760 rm -f conftest*
11761 LIBS="$ac_save_LIBS"
11762
11763 fi
11764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11765   echo "$ac_t""yes" 1>&6
11766   ol_cv_lib_db2=-ldb
11767 else
11768   echo "$ac_t""no" 1>&6
11769 ol_cv_lib_db2=no
11770 fi
11771
11772         LIBS="$ol_LIBS"
11773
11774 fi
11775
11776 echo "$ac_t""$ol_cv_lib_db2" 1>&6
11777
11778 for ac_hdr in db.h
11779 do
11780 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11781 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11782 echo "configure:11783: checking for $ac_hdr" >&5
11783 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11784   echo $ac_n "(cached) $ac_c" 1>&6
11785 else
11786   cat > conftest.$ac_ext <<EOF
11787 #line 11788 "configure"
11788 #include "confdefs.h"
11789 #include <$ac_hdr>
11790 EOF
11791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11792 { (eval echo configure:11793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11794 if test -z "$ac_err"; then
11795   rm -rf conftest*
11796   eval "ac_cv_header_$ac_safe=yes"
11797 else
11798   echo "$ac_err" >&5
11799   echo "configure: failed program was:" >&5
11800   cat conftest.$ac_ext >&5
11801   rm -rf conftest*
11802   eval "ac_cv_header_$ac_safe=no"
11803 fi
11804 rm -f conftest*
11805 fi
11806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11807   echo "$ac_t""yes" 1>&6
11808     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11809   cat >> confdefs.h <<EOF
11810 #define $ac_tr_hdr 1
11811 EOF
11812  
11813 else
11814   echo "$ac_t""no" 1>&6
11815 fi
11816 done
11817
11818 if test $ac_cv_header_db_h = yes ; then
11819         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
11820 echo "configure:11821: checking if db.h is DB2" >&5
11821 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
11822   echo $ac_n "(cached) $ac_c" 1>&6
11823 else
11824   
11825                 cat > conftest.$ac_ext <<EOF
11826 #line 11827 "configure"
11827 #include "confdefs.h"
11828
11829 #                       include <db.h>
11830                         /* this check could be improved */
11831 #                       ifdef DB_VERSION_MAJOR
11832 #                               if DB_VERSION_MAJOR == 2
11833                                         __db_version_2;
11834 #                               endif
11835 #                       endif
11836                 
11837 EOF
11838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11839   egrep "__db_version_2" >/dev/null 2>&1; then
11840   rm -rf conftest*
11841   ol_cv_header_db2=yes
11842 else
11843   rm -rf conftest*
11844   ol_cv_header_db2=no
11845 fi
11846 rm -f conftest*
11847
11848 fi
11849
11850 echo "$ac_t""$ol_cv_header_db2" 1>&6
11851 else
11852         ol_cv_header_db2=no
11853 fi
11854
11855
11856  
11857  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
11858 echo "configure:11859: checking for Berkeley DB2" >&5
11859 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
11860   echo $ac_n "(cached) $ac_c" 1>&6
11861 else
11862   
11863         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
11864                 ol_cv_berkeley_db2=no
11865         else
11866                 ol_cv_berkeley_db2=yes
11867         fi
11868
11869 fi
11870
11871 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
11872  if test $ol_cv_berkeley_db2 = yes ; then
11873         cat >> confdefs.h <<\EOF
11874 #define HAVE_BERKELEY_DB2 1
11875 EOF
11876
11877  fi
11878
11879
11880         if test $ol_cv_berkeley_db2 = yes ; then
11881                 ol_link_ldbm=db2
11882                 ol_with_ldbm_api=db2
11883
11884                 if test $ol_with_ldbm_type = hash ; then
11885                         cat >> confdefs.h <<\EOF
11886 #define LDBM_USE_DBHASH 1
11887 EOF
11888
11889                 else
11890                         cat >> confdefs.h <<\EOF
11891 #define LDBM_USE_DBBTREE 1
11892 EOF
11893
11894                 fi
11895
11896                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11897 echo "configure:11898: checking for DB_THREAD support" >&5
11898 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
11899   echo $ac_n "(cached) $ac_c" 1>&6
11900 else
11901   
11902         ol_LIBS="$LIBS"
11903         if test $ol_cv_lib_db2 != yes ; then
11904                 LIBS="$ol_cv_lib_db2"
11905         fi
11906
11907         if test "$cross_compiling" = yes; then
11908   ol_cv_berkeley_db2_db_thread=cross
11909 else
11910   cat > conftest.$ac_ext <<EOF
11911 #line 11912 "configure"
11912 #include "confdefs.h"
11913
11914 #include <db.h>
11915 #ifndef NULL
11916 #define NULL ((void *)0)
11917 #endif
11918 main()
11919 {
11920         int rc;
11921         DB_ENV env;
11922         u_int32_t flags = DB_CREATE | DB_THREAD;
11923
11924         memset( &env, '\0', sizeof(env) );
11925
11926         rc = db_appinit( NULL, NULL, &env, flags );
11927
11928         if( rc == 0 ) {
11929                 db_appexit( &env );
11930         }
11931
11932         return rc;
11933 }
11934 EOF
11935 if { (eval echo configure:11936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11936 then
11937   ol_cv_berkeley_db2_db_thread=yes
11938 else
11939   echo "configure: failed program was:" >&5
11940   cat conftest.$ac_ext >&5
11941   rm -fr conftest*
11942   ol_cv_berkeley_db2_db_thread=no
11943 fi
11944 rm -fr conftest*
11945 fi
11946
11947
11948         LIBS="$ol_LIBS"
11949
11950         if test $ol_cv_berkeley_db2_db_thread != no ; then
11951                 cat >> confdefs.h <<\EOF
11952 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11953 EOF
11954
11955         fi
11956
11957 fi
11958
11959 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11960
11961                                                 if test $ol_cv_lib_db2 != yes ; then
11962                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11963                 fi
11964         fi
11965 fi
11966
11967 ol_link_bdb2=no
11968 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11969         if test $ol_cv_berkeley_db2_db_thread != no ; then
11970                 ol_link_bdb2=yes
11971         else
11972                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11973         fi
11974 fi
11975
11976 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11977         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11978 echo "configure:11979: checking for Berkeley DB library" >&5
11979 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11980   echo $ac_n "(cached) $ac_c" 1>&6
11981 else
11982   
11983         for ac_hdr in db1/db.h
11984 do
11985 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11986 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11987 echo "configure:11988: checking for $ac_hdr" >&5
11988 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11989   echo $ac_n "(cached) $ac_c" 1>&6
11990 else
11991   cat > conftest.$ac_ext <<EOF
11992 #line 11993 "configure"
11993 #include "confdefs.h"
11994 #include <$ac_hdr>
11995 EOF
11996 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11997 { (eval echo configure:11998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11998 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11999 if test -z "$ac_err"; then
12000   rm -rf conftest*
12001   eval "ac_cv_header_$ac_safe=yes"
12002 else
12003   echo "$ac_err" >&5
12004   echo "configure: failed program was:" >&5
12005   cat conftest.$ac_ext >&5
12006   rm -rf conftest*
12007   eval "ac_cv_header_$ac_safe=no"
12008 fi
12009 rm -f conftest*
12010 fi
12011 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12012   echo "$ac_t""yes" 1>&6
12013     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12014   cat >> confdefs.h <<EOF
12015 #define $ac_tr_hdr 1
12016 EOF
12017  
12018 else
12019   echo "$ac_t""no" 1>&6
12020 fi
12021 done
12022
12023         ol_LIBS="$LIBS"
12024         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
12025 echo "configure:12026: checking for dbopen" >&5
12026 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
12027   echo $ac_n "(cached) $ac_c" 1>&6
12028 else
12029   cat > conftest.$ac_ext <<EOF
12030 #line 12031 "configure"
12031 #include "confdefs.h"
12032 /* System header to define __stub macros and hopefully few prototypes,
12033     which can conflict with char dbopen(); below.  */
12034 #include <assert.h>
12035 /* Override any gcc2 internal prototype to avoid an error.  */
12036 /* We use char because int might match the return type of a gcc2
12037     builtin and then its argument prototype would still apply.  */
12038 char dbopen();
12039 char (*f)();
12040
12041 int main() {
12042
12043 /* The GNU C library defines this for functions which it implements
12044     to always fail with ENOSYS.  Some functions are actually named
12045     something starting with __ and the normal name is an alias.  */
12046 #if defined (__stub_dbopen) || defined (__stub___dbopen)
12047 choke me
12048 #else
12049 f = dbopen;
12050 #endif
12051
12052 ; return 0; }
12053 EOF
12054 if { (eval echo configure:12055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12055   rm -rf conftest*
12056   eval "ac_cv_func_dbopen=yes"
12057 else
12058   echo "configure: failed program was:" >&5
12059   cat conftest.$ac_ext >&5
12060   rm -rf conftest*
12061   eval "ac_cv_func_dbopen=no"
12062 fi
12063 rm -f conftest*
12064 fi
12065
12066 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
12067   echo "$ac_t""yes" 1>&6
12068   ol_cv_lib_db=yes
12069 else
12070   echo "$ac_t""no" 1>&6
12071
12072                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
12073 echo "configure:12074: checking for dbopen in -ldb1" >&5
12074 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
12075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12076   echo $ac_n "(cached) $ac_c" 1>&6
12077 else
12078   ac_save_LIBS="$LIBS"
12079 LIBS="-ldb1  $LIBS"
12080 cat > conftest.$ac_ext <<EOF
12081 #line 12082 "configure"
12082 #include "confdefs.h"
12083 /* Override any gcc2 internal prototype to avoid an error.  */
12084 /* We use char because int might match the return type of a gcc2
12085     builtin and then its argument prototype would still apply.  */
12086 char dbopen();
12087
12088 int main() {
12089 dbopen()
12090 ; return 0; }
12091 EOF
12092 if { (eval echo configure:12093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12093   rm -rf conftest*
12094   eval "ac_cv_lib_$ac_lib_var=yes"
12095 else
12096   echo "configure: failed program was:" >&5
12097   cat conftest.$ac_ext >&5
12098   rm -rf conftest*
12099   eval "ac_cv_lib_$ac_lib_var=no"
12100 fi
12101 rm -f conftest*
12102 LIBS="$ac_save_LIBS"
12103
12104 fi
12105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12106   echo "$ac_t""yes" 1>&6
12107   ol_cv_lib_db=-ldb1
12108 else
12109   echo "$ac_t""no" 1>&6
12110
12111                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
12112 echo "configure:12113: checking for dbopen in -ldb" >&5
12113 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
12114 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12115   echo $ac_n "(cached) $ac_c" 1>&6
12116 else
12117   ac_save_LIBS="$LIBS"
12118 LIBS="-ldb  $LIBS"
12119 cat > conftest.$ac_ext <<EOF
12120 #line 12121 "configure"
12121 #include "confdefs.h"
12122 /* Override any gcc2 internal prototype to avoid an error.  */
12123 /* We use char because int might match the return type of a gcc2
12124     builtin and then its argument prototype would still apply.  */
12125 char dbopen();
12126
12127 int main() {
12128 dbopen()
12129 ; return 0; }
12130 EOF
12131 if { (eval echo configure:12132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12132   rm -rf conftest*
12133   eval "ac_cv_lib_$ac_lib_var=yes"
12134 else
12135   echo "configure: failed program was:" >&5
12136   cat conftest.$ac_ext >&5
12137   rm -rf conftest*
12138   eval "ac_cv_lib_$ac_lib_var=no"
12139 fi
12140 rm -f conftest*
12141 LIBS="$ac_save_LIBS"
12142
12143 fi
12144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12145   echo "$ac_t""yes" 1>&6
12146   ol_cv_lib_db=-ldb
12147 else
12148   echo "$ac_t""no" 1>&6
12149 ol_cv_lib_db=no
12150 fi
12151
12152                 
12153 fi
12154
12155         
12156 fi
12157
12158         LIBS="$ol_LIBS"
12159
12160 fi
12161
12162 echo "$ac_t""$ol_cv_lib_db" 1>&6
12163
12164
12165 for ac_hdr in db_185.h
12166 do
12167 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12168 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12169 echo "configure:12170: checking for $ac_hdr" >&5
12170 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12171   echo $ac_n "(cached) $ac_c" 1>&6
12172 else
12173   cat > conftest.$ac_ext <<EOF
12174 #line 12175 "configure"
12175 #include "confdefs.h"
12176 #include <$ac_hdr>
12177 EOF
12178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12179 { (eval echo configure:12180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12181 if test -z "$ac_err"; then
12182   rm -rf conftest*
12183   eval "ac_cv_header_$ac_safe=yes"
12184 else
12185   echo "$ac_err" >&5
12186   echo "configure: failed program was:" >&5
12187   cat conftest.$ac_ext >&5
12188   rm -rf conftest*
12189   eval "ac_cv_header_$ac_safe=no"
12190 fi
12191 rm -f conftest*
12192 fi
12193 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12194   echo "$ac_t""yes" 1>&6
12195     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12196   cat >> confdefs.h <<EOF
12197 #define $ac_tr_hdr 1
12198 EOF
12199  
12200 else
12201   echo "$ac_t""no" 1>&6
12202 fi
12203 done
12204
12205 if test "$ol_cv_header_db2" = yes ; then
12206         
12207         ol_cv_header_db=$ac_cv_header_db_185_h
12208 else
12209         ol_cv_header_db=$ac_cv_header_db_h
12210 fi
12211
12212
12213  
12214  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
12215 echo "configure:12216: checking for Berkeley DB" >&5
12216 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
12217   echo $ac_n "(cached) $ac_c" 1>&6
12218 else
12219   
12220         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
12221                 ol_cv_berkeley_db=no
12222         else
12223                 ol_cv_berkeley_db=yes
12224         fi
12225
12226 fi
12227
12228 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
12229  if test $ol_cv_berkeley_db = yes ; then
12230         cat >> confdefs.h <<\EOF
12231 #define HAVE_BERKELEY_DB 1
12232 EOF
12233
12234  fi
12235
12236
12237         if test $ol_cv_berkeley_db = yes ; then
12238                 ol_link_ldbm=db
12239                 ol_with_ldbm_api=db
12240
12241                 if test $ol_with_ldbm_type = hash ; then
12242                         cat >> confdefs.h <<\EOF
12243 #define LDBM_USE_DBHASH 1
12244 EOF
12245
12246                 else
12247                         cat >> confdefs.h <<\EOF
12248 #define LDBM_USE_DBBTREE 1
12249 EOF
12250
12251                 fi
12252
12253                                                 if test $ol_cv_lib_db != yes ; then
12254                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12255                 fi
12256         fi
12257 fi
12258
12259 if test $ol_with_ldbm_api = manual ; then
12260                 ol_link_ldbm=yes
12261
12262         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
12263
12264         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
12265 do
12266 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12267 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12268 echo "configure:12269: checking for $ac_hdr" >&5
12269 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12270   echo $ac_n "(cached) $ac_c" 1>&6
12271 else
12272   cat > conftest.$ac_ext <<EOF
12273 #line 12274 "configure"
12274 #include "confdefs.h"
12275 #include <$ac_hdr>
12276 EOF
12277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12278 { (eval echo configure:12279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12280 if test -z "$ac_err"; then
12281   rm -rf conftest*
12282   eval "ac_cv_header_$ac_safe=yes"
12283 else
12284   echo "$ac_err" >&5
12285   echo "configure: failed program was:" >&5
12286   cat conftest.$ac_ext >&5
12287   rm -rf conftest*
12288   eval "ac_cv_header_$ac_safe=no"
12289 fi
12290 rm -f conftest*
12291 fi
12292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12293   echo "$ac_t""yes" 1>&6
12294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12295   cat >> confdefs.h <<EOF
12296 #define $ac_tr_hdr 1
12297 EOF
12298  
12299 else
12300   echo "$ac_t""no" 1>&6
12301 fi
12302 done
12303
12304 fi
12305
12306 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12307         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12308         ol_with_ldbm_api=none
12309 fi
12310
12311 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12312         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12313 echo "configure:12314: checking for MDBM library" >&5
12314 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12315   echo $ac_n "(cached) $ac_c" 1>&6
12316 else
12317         ol_LIBS="$LIBS"
12318         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12319 echo "configure:12320: checking for mdbm_set_chain" >&5
12320 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12321   echo $ac_n "(cached) $ac_c" 1>&6
12322 else
12323   cat > conftest.$ac_ext <<EOF
12324 #line 12325 "configure"
12325 #include "confdefs.h"
12326 /* System header to define __stub macros and hopefully few prototypes,
12327     which can conflict with char mdbm_set_chain(); below.  */
12328 #include <assert.h>
12329 /* Override any gcc2 internal prototype to avoid an error.  */
12330 /* We use char because int might match the return type of a gcc2
12331     builtin and then its argument prototype would still apply.  */
12332 char mdbm_set_chain();
12333 char (*f)();
12334
12335 int main() {
12336
12337 /* The GNU C library defines this for functions which it implements
12338     to always fail with ENOSYS.  Some functions are actually named
12339     something starting with __ and the normal name is an alias.  */
12340 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12341 choke me
12342 #else
12343 f = mdbm_set_chain;
12344 #endif
12345
12346 ; return 0; }
12347 EOF
12348 if { (eval echo configure:12349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12349   rm -rf conftest*
12350   eval "ac_cv_func_mdbm_set_chain=yes"
12351 else
12352   echo "configure: failed program was:" >&5
12353   cat conftest.$ac_ext >&5
12354   rm -rf conftest*
12355   eval "ac_cv_func_mdbm_set_chain=no"
12356 fi
12357 rm -f conftest*
12358 fi
12359
12360 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12361   echo "$ac_t""yes" 1>&6
12362   ol_cv_lib_mdbm=yes
12363 else
12364   echo "$ac_t""no" 1>&6
12365
12366                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12367 echo "configure:12368: checking for mdbm_set_chain in -lmdbm" >&5
12368 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12369 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12370   echo $ac_n "(cached) $ac_c" 1>&6
12371 else
12372   ac_save_LIBS="$LIBS"
12373 LIBS="-lmdbm  $LIBS"
12374 cat > conftest.$ac_ext <<EOF
12375 #line 12376 "configure"
12376 #include "confdefs.h"
12377 /* Override any gcc2 internal prototype to avoid an error.  */
12378 /* We use char because int might match the return type of a gcc2
12379     builtin and then its argument prototype would still apply.  */
12380 char mdbm_set_chain();
12381
12382 int main() {
12383 mdbm_set_chain()
12384 ; return 0; }
12385 EOF
12386 if { (eval echo configure:12387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12387   rm -rf conftest*
12388   eval "ac_cv_lib_$ac_lib_var=yes"
12389 else
12390   echo "configure: failed program was:" >&5
12391   cat conftest.$ac_ext >&5
12392   rm -rf conftest*
12393   eval "ac_cv_lib_$ac_lib_var=no"
12394 fi
12395 rm -f conftest*
12396 LIBS="$ac_save_LIBS"
12397
12398 fi
12399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12400   echo "$ac_t""yes" 1>&6
12401   ol_cv_lib_mdbm=-lmdbm
12402 else
12403   echo "$ac_t""no" 1>&6
12404 ol_cv_lib_mdbm=no
12405 fi
12406
12407         
12408 fi
12409
12410         LIBS="$ol_LIBS"
12411
12412 fi
12413
12414 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12415
12416
12417  for ac_hdr in mdbm.h
12418 do
12419 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12420 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12421 echo "configure:12422: checking for $ac_hdr" >&5
12422 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12423   echo $ac_n "(cached) $ac_c" 1>&6
12424 else
12425   cat > conftest.$ac_ext <<EOF
12426 #line 12427 "configure"
12427 #include "confdefs.h"
12428 #include <$ac_hdr>
12429 EOF
12430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12431 { (eval echo configure:12432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12433 if test -z "$ac_err"; then
12434   rm -rf conftest*
12435   eval "ac_cv_header_$ac_safe=yes"
12436 else
12437   echo "$ac_err" >&5
12438   echo "configure: failed program was:" >&5
12439   cat conftest.$ac_ext >&5
12440   rm -rf conftest*
12441   eval "ac_cv_header_$ac_safe=no"
12442 fi
12443 rm -f conftest*
12444 fi
12445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12446   echo "$ac_t""yes" 1>&6
12447     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12448   cat >> confdefs.h <<EOF
12449 #define $ac_tr_hdr 1
12450 EOF
12451  
12452 else
12453   echo "$ac_t""no" 1>&6
12454 fi
12455 done
12456
12457  echo $ac_n "checking for db""... $ac_c" 1>&6
12458 echo "configure:12459: checking for db" >&5
12459 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12460   echo $ac_n "(cached) $ac_c" 1>&6
12461 else
12462   
12463         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12464                 ol_cv_mdbm=no
12465         else
12466                 ol_cv_mdbm=yes
12467         fi
12468
12469 fi
12470
12471 echo "$ac_t""$ol_cv_mdbm" 1>&6
12472  if test $ol_cv_mdbm = yes ; then
12473         cat >> confdefs.h <<\EOF
12474 #define HAVE_MDBM 1
12475 EOF
12476
12477  fi
12478
12479
12480         if test $ol_cv_mdbm = yes ; then
12481                 ol_link_ldbm=mdbm
12482                 ol_with_ldbm_api=mdbm
12483                 if test $ol_cv_lib_mdbm != yes ; then
12484                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12485                 fi
12486         fi
12487 fi
12488
12489 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12490         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12491 echo "configure:12492: checking for GDBM library" >&5
12492 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12493   echo $ac_n "(cached) $ac_c" 1>&6
12494 else
12495         ol_LIBS="$LIBS"
12496         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12497 echo "configure:12498: checking for gdbm_open" >&5
12498 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12499   echo $ac_n "(cached) $ac_c" 1>&6
12500 else
12501   cat > conftest.$ac_ext <<EOF
12502 #line 12503 "configure"
12503 #include "confdefs.h"
12504 /* System header to define __stub macros and hopefully few prototypes,
12505     which can conflict with char gdbm_open(); below.  */
12506 #include <assert.h>
12507 /* Override any gcc2 internal prototype to avoid an error.  */
12508 /* We use char because int might match the return type of a gcc2
12509     builtin and then its argument prototype would still apply.  */
12510 char gdbm_open();
12511 char (*f)();
12512
12513 int main() {
12514
12515 /* The GNU C library defines this for functions which it implements
12516     to always fail with ENOSYS.  Some functions are actually named
12517     something starting with __ and the normal name is an alias.  */
12518 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12519 choke me
12520 #else
12521 f = gdbm_open;
12522 #endif
12523
12524 ; return 0; }
12525 EOF
12526 if { (eval echo configure:12527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12527   rm -rf conftest*
12528   eval "ac_cv_func_gdbm_open=yes"
12529 else
12530   echo "configure: failed program was:" >&5
12531   cat conftest.$ac_ext >&5
12532   rm -rf conftest*
12533   eval "ac_cv_func_gdbm_open=no"
12534 fi
12535 rm -f conftest*
12536 fi
12537
12538 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12539   echo "$ac_t""yes" 1>&6
12540   ol_cv_lib_gdbm=yes
12541 else
12542   echo "$ac_t""no" 1>&6
12543
12544                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12545 echo "configure:12546: checking for gdbm_open in -lgdbm" >&5
12546 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12547 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12548   echo $ac_n "(cached) $ac_c" 1>&6
12549 else
12550   ac_save_LIBS="$LIBS"
12551 LIBS="-lgdbm  $LIBS"
12552 cat > conftest.$ac_ext <<EOF
12553 #line 12554 "configure"
12554 #include "confdefs.h"
12555 /* Override any gcc2 internal prototype to avoid an error.  */
12556 /* We use char because int might match the return type of a gcc2
12557     builtin and then its argument prototype would still apply.  */
12558 char gdbm_open();
12559
12560 int main() {
12561 gdbm_open()
12562 ; return 0; }
12563 EOF
12564 if { (eval echo configure:12565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12565   rm -rf conftest*
12566   eval "ac_cv_lib_$ac_lib_var=yes"
12567 else
12568   echo "configure: failed program was:" >&5
12569   cat conftest.$ac_ext >&5
12570   rm -rf conftest*
12571   eval "ac_cv_lib_$ac_lib_var=no"
12572 fi
12573 rm -f conftest*
12574 LIBS="$ac_save_LIBS"
12575
12576 fi
12577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12578   echo "$ac_t""yes" 1>&6
12579   ol_cv_lib_gdbm=-lgdbm
12580 else
12581   echo "$ac_t""no" 1>&6
12582 ol_cv_lib_gdbm=no
12583 fi
12584
12585         
12586 fi
12587
12588         LIBS="$ol_LIBS"
12589
12590 fi
12591
12592 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12593
12594
12595  for ac_hdr in gdbm.h
12596 do
12597 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12598 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12599 echo "configure:12600: checking for $ac_hdr" >&5
12600 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12601   echo $ac_n "(cached) $ac_c" 1>&6
12602 else
12603   cat > conftest.$ac_ext <<EOF
12604 #line 12605 "configure"
12605 #include "confdefs.h"
12606 #include <$ac_hdr>
12607 EOF
12608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12609 { (eval echo configure:12610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12611 if test -z "$ac_err"; then
12612   rm -rf conftest*
12613   eval "ac_cv_header_$ac_safe=yes"
12614 else
12615   echo "$ac_err" >&5
12616   echo "configure: failed program was:" >&5
12617   cat conftest.$ac_ext >&5
12618   rm -rf conftest*
12619   eval "ac_cv_header_$ac_safe=no"
12620 fi
12621 rm -f conftest*
12622 fi
12623 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12624   echo "$ac_t""yes" 1>&6
12625     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12626   cat >> confdefs.h <<EOF
12627 #define $ac_tr_hdr 1
12628 EOF
12629  
12630 else
12631   echo "$ac_t""no" 1>&6
12632 fi
12633 done
12634
12635  echo $ac_n "checking for db""... $ac_c" 1>&6
12636 echo "configure:12637: checking for db" >&5
12637 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12638   echo $ac_n "(cached) $ac_c" 1>&6
12639 else
12640   
12641         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12642                 ol_cv_gdbm=no
12643         else
12644                 ol_cv_gdbm=yes
12645         fi
12646
12647 fi
12648
12649 echo "$ac_t""$ol_cv_gdbm" 1>&6
12650  if test $ol_cv_gdbm = yes ; then
12651         cat >> confdefs.h <<\EOF
12652 #define HAVE_GDBM 1
12653 EOF
12654
12655  fi
12656
12657
12658         if test $ol_cv_gdbm = yes ; then
12659                 ol_link_ldbm=gdbm
12660                 ol_with_ldbm_api=gdbm
12661
12662                 if test $ol_cv_lib_gdbm != yes ; then
12663                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12664                 fi
12665         fi
12666 fi
12667
12668 if test $ol_with_ldbm_api = ndbm ; then
12669         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12670 echo "configure:12671: checking for NDBM library" >&5
12671 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12672   echo $ac_n "(cached) $ac_c" 1>&6
12673 else
12674         ol_LIBS="$LIBS"
12675         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12676 echo "configure:12677: checking for dbm_open" >&5
12677 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12678   echo $ac_n "(cached) $ac_c" 1>&6
12679 else
12680   cat > conftest.$ac_ext <<EOF
12681 #line 12682 "configure"
12682 #include "confdefs.h"
12683 /* System header to define __stub macros and hopefully few prototypes,
12684     which can conflict with char dbm_open(); below.  */
12685 #include <assert.h>
12686 /* Override any gcc2 internal prototype to avoid an error.  */
12687 /* We use char because int might match the return type of a gcc2
12688     builtin and then its argument prototype would still apply.  */
12689 char dbm_open();
12690 char (*f)();
12691
12692 int main() {
12693
12694 /* The GNU C library defines this for functions which it implements
12695     to always fail with ENOSYS.  Some functions are actually named
12696     something starting with __ and the normal name is an alias.  */
12697 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12698 choke me
12699 #else
12700 f = dbm_open;
12701 #endif
12702
12703 ; return 0; }
12704 EOF
12705 if { (eval echo configure:12706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12706   rm -rf conftest*
12707   eval "ac_cv_func_dbm_open=yes"
12708 else
12709   echo "configure: failed program was:" >&5
12710   cat conftest.$ac_ext >&5
12711   rm -rf conftest*
12712   eval "ac_cv_func_dbm_open=no"
12713 fi
12714 rm -f conftest*
12715 fi
12716
12717 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12718   echo "$ac_t""yes" 1>&6
12719   ol_cv_lib_ndbm=yes
12720 else
12721   echo "$ac_t""no" 1>&6
12722
12723                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12724 echo "configure:12725: checking for dbm_open in -lndbm" >&5
12725 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12726 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12727   echo $ac_n "(cached) $ac_c" 1>&6
12728 else
12729   ac_save_LIBS="$LIBS"
12730 LIBS="-lndbm  $LIBS"
12731 cat > conftest.$ac_ext <<EOF
12732 #line 12733 "configure"
12733 #include "confdefs.h"
12734 /* Override any gcc2 internal prototype to avoid an error.  */
12735 /* We use char because int might match the return type of a gcc2
12736     builtin and then its argument prototype would still apply.  */
12737 char dbm_open();
12738
12739 int main() {
12740 dbm_open()
12741 ; return 0; }
12742 EOF
12743 if { (eval echo configure:12744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12744   rm -rf conftest*
12745   eval "ac_cv_lib_$ac_lib_var=yes"
12746 else
12747   echo "configure: failed program was:" >&5
12748   cat conftest.$ac_ext >&5
12749   rm -rf conftest*
12750   eval "ac_cv_lib_$ac_lib_var=no"
12751 fi
12752 rm -f conftest*
12753 LIBS="$ac_save_LIBS"
12754
12755 fi
12756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12757   echo "$ac_t""yes" 1>&6
12758   ol_cv_lib_ndbm=-lndbm
12759 else
12760   echo "$ac_t""no" 1>&6
12761
12762                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12763 echo "configure:12764: checking for dbm_open in -ldbm" >&5
12764 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12765 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12766   echo $ac_n "(cached) $ac_c" 1>&6
12767 else
12768   ac_save_LIBS="$LIBS"
12769 LIBS="-ldbm  $LIBS"
12770 cat > conftest.$ac_ext <<EOF
12771 #line 12772 "configure"
12772 #include "confdefs.h"
12773 /* Override any gcc2 internal prototype to avoid an error.  */
12774 /* We use char because int might match the return type of a gcc2
12775     builtin and then its argument prototype would still apply.  */
12776 char dbm_open();
12777
12778 int main() {
12779 dbm_open()
12780 ; return 0; }
12781 EOF
12782 if { (eval echo configure:12783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12783   rm -rf conftest*
12784   eval "ac_cv_lib_$ac_lib_var=yes"
12785 else
12786   echo "configure: failed program was:" >&5
12787   cat conftest.$ac_ext >&5
12788   rm -rf conftest*
12789   eval "ac_cv_lib_$ac_lib_var=no"
12790 fi
12791 rm -f conftest*
12792 LIBS="$ac_save_LIBS"
12793
12794 fi
12795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12796   echo "$ac_t""yes" 1>&6
12797   ol_cv_lib_ndbm=-ldbm
12798 else
12799   echo "$ac_t""no" 1>&6
12800 ol_cv_lib_ndbm=no
12801 fi
12802                 
12803 fi
12804
12805         
12806 fi
12807
12808         LIBS="$ol_LIBS"
12809
12810 fi
12811
12812 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12813
12814
12815  for ac_hdr in ndbm.h
12816 do
12817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12819 echo "configure:12820: checking for $ac_hdr" >&5
12820 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12821   echo $ac_n "(cached) $ac_c" 1>&6
12822 else
12823   cat > conftest.$ac_ext <<EOF
12824 #line 12825 "configure"
12825 #include "confdefs.h"
12826 #include <$ac_hdr>
12827 EOF
12828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12829 { (eval echo configure:12830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12831 if test -z "$ac_err"; then
12832   rm -rf conftest*
12833   eval "ac_cv_header_$ac_safe=yes"
12834 else
12835   echo "$ac_err" >&5
12836   echo "configure: failed program was:" >&5
12837   cat conftest.$ac_ext >&5
12838   rm -rf conftest*
12839   eval "ac_cv_header_$ac_safe=no"
12840 fi
12841 rm -f conftest*
12842 fi
12843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12844   echo "$ac_t""yes" 1>&6
12845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12846   cat >> confdefs.h <<EOF
12847 #define $ac_tr_hdr 1
12848 EOF
12849  
12850 else
12851   echo "$ac_t""no" 1>&6
12852 fi
12853 done
12854
12855  echo $ac_n "checking for db""... $ac_c" 1>&6
12856 echo "configure:12857: checking for db" >&5
12857 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12858   echo $ac_n "(cached) $ac_c" 1>&6
12859 else
12860   
12861         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12862                 ol_cv_ndbm=no
12863         else
12864                 ol_cv_ndbm=yes
12865         fi
12866
12867 fi
12868
12869 echo "$ac_t""$ol_cv_ndbm" 1>&6
12870  if test $ol_cv_ndbm = yes ; then
12871         cat >> confdefs.h <<\EOF
12872 #define HAVE_NDBM 1
12873 EOF
12874
12875  fi
12876
12877
12878         if test $ol_cv_ndbm = yes ; then
12879                 ol_link_ldbm=ndbm
12880                 ol_with_ldbm_api=ndbm
12881
12882                 if test $ol_cv_lib_ndbm != yes ; then
12883                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12884                 fi
12885         fi
12886 fi
12887
12888 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12889         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12890         if test $ol_enable_ldbm = yes ; then
12891                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12892         fi
12893
12894         echo "configure: warning: disabling LDBM" 1>&2
12895         ol_enable_ldbm=no
12896 fi
12897
12898 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12899         LINK_BINS_DYNAMIC="yes"
12900 else
12901         LINK_BINS_DYNAMIC="no"
12902 fi
12903
12904 if test $ol_enable_wrappers != no ; then
12905         for ac_hdr in tcpd.h
12906 do
12907 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12908 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12909 echo "configure:12910: checking for $ac_hdr" >&5
12910 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12911   echo $ac_n "(cached) $ac_c" 1>&6
12912 else
12913   cat > conftest.$ac_ext <<EOF
12914 #line 12915 "configure"
12915 #include "confdefs.h"
12916 #include <$ac_hdr>
12917 EOF
12918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12919 { (eval echo configure:12920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12921 if test -z "$ac_err"; then
12922   rm -rf conftest*
12923   eval "ac_cv_header_$ac_safe=yes"
12924 else
12925   echo "$ac_err" >&5
12926   echo "configure: failed program was:" >&5
12927   cat conftest.$ac_ext >&5
12928   rm -rf conftest*
12929   eval "ac_cv_header_$ac_safe=no"
12930 fi
12931 rm -f conftest*
12932 fi
12933 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12934   echo "$ac_t""yes" 1>&6
12935     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12936   cat >> confdefs.h <<EOF
12937 #define $ac_tr_hdr 1
12938 EOF
12939  
12940 else
12941   echo "$ac_t""no" 1>&6
12942 fi
12943 done
12944
12945
12946         if test $ac_cv_header_tcpd_h != yes ; then
12947                 have_wrappers=no
12948         else
12949                 cat > conftest.$ac_ext <<EOF
12950 #line 12951 "configure"
12951 #include "confdefs.h"
12952
12953 int allow_severity = 0;
12954 int deny_severity  = 0;
12955                 
12956 int main() {
12957 hosts_access()
12958 ; return 0; }
12959 EOF
12960 if { (eval echo configure:12961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12961   rm -rf conftest*
12962   have_wrappers=yes
12963 else
12964   echo "configure: failed program was:" >&5
12965   cat conftest.$ac_ext >&5
12966   rm -rf conftest*
12967   have_wrappers=no
12968 fi
12969 rm -f conftest*
12970         fi
12971
12972         if test $have_wrappers = yes ; then
12973                 cat >> confdefs.h <<\EOF
12974 #define HAVE_TCPD 1
12975 EOF
12976
12977                 WRAP_LIBS="-lwrap"
12978
12979                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12980 echo "configure:12981: checking for main in -lnsl" >&5
12981 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12982 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12983   echo $ac_n "(cached) $ac_c" 1>&6
12984 else
12985   ac_save_LIBS="$LIBS"
12986 LIBS="-lnsl  $LIBS"
12987 cat > conftest.$ac_ext <<EOF
12988 #line 12989 "configure"
12989 #include "confdefs.h"
12990
12991 int main() {
12992 main()
12993 ; return 0; }
12994 EOF
12995 if { (eval echo configure:12996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12996   rm -rf conftest*
12997   eval "ac_cv_lib_$ac_lib_var=yes"
12998 else
12999   echo "configure: failed program was:" >&5
13000   cat conftest.$ac_ext >&5
13001   rm -rf conftest*
13002   eval "ac_cv_lib_$ac_lib_var=no"
13003 fi
13004 rm -f conftest*
13005 LIBS="$ac_save_LIBS"
13006
13007 fi
13008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13009   echo "$ac_t""yes" 1>&6
13010     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13011     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13012   cat >> confdefs.h <<EOF
13013 #define $ac_tr_lib 1
13014 EOF
13015
13016   LIBS="-lnsl $LIBS"
13017
13018 else
13019   echo "$ac_t""no" 1>&6
13020 fi
13021
13022         else
13023                 echo "configure: warning: could not find -lwrap" 1>&2
13024                 if test $ol_enable_wrappers = yes ; then
13025                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13026                 fi
13027
13028                 echo "configure: warning: disabling wrappers support" 1>&2
13029                 ol_enable_wrappers=no
13030                 WRAP_LIBS=""
13031         fi
13032 fi
13033
13034 if test $ol_enable_syslog != no ; then
13035         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13036 echo "configure:13037: checking for openlog" >&5
13037 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13038   echo $ac_n "(cached) $ac_c" 1>&6
13039 else
13040   cat > conftest.$ac_ext <<EOF
13041 #line 13042 "configure"
13042 #include "confdefs.h"
13043 /* System header to define __stub macros and hopefully few prototypes,
13044     which can conflict with char openlog(); below.  */
13045 #include <assert.h>
13046 /* Override any gcc2 internal prototype to avoid an error.  */
13047 /* We use char because int might match the return type of a gcc2
13048     builtin and then its argument prototype would still apply.  */
13049 char openlog();
13050 char (*f)();
13051
13052 int main() {
13053
13054 /* The GNU C library defines this for functions which it implements
13055     to always fail with ENOSYS.  Some functions are actually named
13056     something starting with __ and the normal name is an alias.  */
13057 #if defined (__stub_openlog) || defined (__stub___openlog)
13058 choke me
13059 #else
13060 f = openlog;
13061 #endif
13062
13063 ; return 0; }
13064 EOF
13065 if { (eval echo configure:13066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13066   rm -rf conftest*
13067   eval "ac_cv_func_openlog=yes"
13068 else
13069   echo "configure: failed program was:" >&5
13070   cat conftest.$ac_ext >&5
13071   rm -rf conftest*
13072   eval "ac_cv_func_openlog=no"
13073 fi
13074 rm -f conftest*
13075 fi
13076
13077 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13078   echo "$ac_t""yes" 1>&6
13079   :
13080 else
13081   echo "$ac_t""no" 1>&6
13082 fi
13083
13084         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13085                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13086         fi
13087         ol_enable_syslog=$ac_cv_func_openlog
13088 fi
13089
13090 if test $ol_enable_dmalloc != no ; then
13091         for ac_hdr in dmalloc.h
13092 do
13093 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13094 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13095 echo "configure:13096: checking for $ac_hdr" >&5
13096 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13097   echo $ac_n "(cached) $ac_c" 1>&6
13098 else
13099   cat > conftest.$ac_ext <<EOF
13100 #line 13101 "configure"
13101 #include "confdefs.h"
13102 #include <$ac_hdr>
13103 EOF
13104 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13105 { (eval echo configure:13106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13106 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13107 if test -z "$ac_err"; then
13108   rm -rf conftest*
13109   eval "ac_cv_header_$ac_safe=yes"
13110 else
13111   echo "$ac_err" >&5
13112   echo "configure: failed program was:" >&5
13113   cat conftest.$ac_ext >&5
13114   rm -rf conftest*
13115   eval "ac_cv_header_$ac_safe=no"
13116 fi
13117 rm -f conftest*
13118 fi
13119 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13120   echo "$ac_t""yes" 1>&6
13121     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13122   cat >> confdefs.h <<EOF
13123 #define $ac_tr_hdr 1
13124 EOF
13125  
13126 else
13127   echo "$ac_t""no" 1>&6
13128 fi
13129 done
13130
13131         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
13132 echo "configure:13133: checking for dmalloc_shutdown in -ldmalloc" >&5
13133 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
13134 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13135   echo $ac_n "(cached) $ac_c" 1>&6
13136 else
13137   ac_save_LIBS="$LIBS"
13138 LIBS="-ldmalloc  $LIBS"
13139 cat > conftest.$ac_ext <<EOF
13140 #line 13141 "configure"
13141 #include "confdefs.h"
13142 /* Override any gcc2 internal prototype to avoid an error.  */
13143 /* We use char because int might match the return type of a gcc2
13144     builtin and then its argument prototype would still apply.  */
13145 char dmalloc_shutdown();
13146
13147 int main() {
13148 dmalloc_shutdown()
13149 ; return 0; }
13150 EOF
13151 if { (eval echo configure:13152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13152   rm -rf conftest*
13153   eval "ac_cv_lib_$ac_lib_var=yes"
13154 else
13155   echo "configure: failed program was:" >&5
13156   cat conftest.$ac_ext >&5
13157   rm -rf conftest*
13158   eval "ac_cv_lib_$ac_lib_var=no"
13159 fi
13160 rm -f conftest*
13161 LIBS="$ac_save_LIBS"
13162
13163 fi
13164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13165   echo "$ac_t""yes" 1>&6
13166     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13167     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13168   cat >> confdefs.h <<EOF
13169 #define $ac_tr_lib 1
13170 EOF
13171
13172   LIBS="-ldmalloc $LIBS"
13173
13174 else
13175   echo "$ac_t""no" 1>&6
13176 fi
13177
13178 fi
13179
13180 if test $ol_enable_tcl != no ; then
13181         for ac_hdr in tcl.h
13182 do
13183 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13184 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13185 echo "configure:13186: checking for $ac_hdr" >&5
13186 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13187   echo $ac_n "(cached) $ac_c" 1>&6
13188 else
13189   cat > conftest.$ac_ext <<EOF
13190 #line 13191 "configure"
13191 #include "confdefs.h"
13192 #include <$ac_hdr>
13193 EOF
13194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13195 { (eval echo configure:13196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13197 if test -z "$ac_err"; then
13198   rm -rf conftest*
13199   eval "ac_cv_header_$ac_safe=yes"
13200 else
13201   echo "$ac_err" >&5
13202   echo "configure: failed program was:" >&5
13203   cat conftest.$ac_ext >&5
13204   rm -rf conftest*
13205   eval "ac_cv_header_$ac_safe=no"
13206 fi
13207 rm -f conftest*
13208 fi
13209 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13210   echo "$ac_t""yes" 1>&6
13211     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13212   cat >> confdefs.h <<EOF
13213 #define $ac_tr_hdr 1
13214 EOF
13215  
13216 else
13217   echo "$ac_t""no" 1>&6
13218 fi
13219 done
13220
13221
13222         if test $ac_cv_header_tcl_h != yes ; then
13223                 have_tcl=no
13224         else
13225                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13226                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13227 echo "configure:13228: checking for main in -l$lib" >&5
13228 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13229 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13230   echo $ac_n "(cached) $ac_c" 1>&6
13231 else
13232   ac_save_LIBS="$LIBS"
13233 LIBS="-l$lib  $LIBS"
13234 cat > conftest.$ac_ext <<EOF
13235 #line 13236 "configure"
13236 #include "confdefs.h"
13237
13238 int main() {
13239 main()
13240 ; return 0; }
13241 EOF
13242 if { (eval echo configure:13243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13243   rm -rf conftest*
13244   eval "ac_cv_lib_$ac_lib_var=yes"
13245 else
13246   echo "configure: failed program was:" >&5
13247   cat conftest.$ac_ext >&5
13248   rm -rf conftest*
13249   eval "ac_cv_lib_$ac_lib_var=no"
13250 fi
13251 rm -f conftest*
13252 LIBS="$ac_save_LIBS"
13253
13254 fi
13255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13256   echo "$ac_t""yes" 1>&6
13257   have_tcl=yes
13258                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13259                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13260                            else
13261                                MOD_TCL_LIB="-l${lib}"
13262                            fi;break
13263 else
13264   echo "$ac_t""no" 1>&6
13265 have_tcl=no
13266 fi
13267
13268                 done
13269         fi
13270
13271         if test $have_tcl != yes ; then
13272                 echo "configure: warning: could not find -ltcl" 1>&2
13273                 if test $ol_enable_tcl = yes ; then
13274                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13275                 fi
13276
13277                 ol_enable_tcl=no
13278         fi
13279 fi
13280
13281 ol_link_termcap=no
13282 for ac_hdr in termcap.h ncurses.h
13283 do
13284 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13285 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13286 echo "configure:13287: checking for $ac_hdr" >&5
13287 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13288   echo $ac_n "(cached) $ac_c" 1>&6
13289 else
13290   cat > conftest.$ac_ext <<EOF
13291 #line 13292 "configure"
13292 #include "confdefs.h"
13293 #include <$ac_hdr>
13294 EOF
13295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13296 { (eval echo configure:13297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13298 if test -z "$ac_err"; then
13299   rm -rf conftest*
13300   eval "ac_cv_header_$ac_safe=yes"
13301 else
13302   echo "$ac_err" >&5
13303   echo "configure: failed program was:" >&5
13304   cat conftest.$ac_ext >&5
13305   rm -rf conftest*
13306   eval "ac_cv_header_$ac_safe=no"
13307 fi
13308 rm -f conftest*
13309 fi
13310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13311   echo "$ac_t""yes" 1>&6
13312     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13313   cat >> confdefs.h <<EOF
13314 #define $ac_tr_hdr 1
13315 EOF
13316  
13317 else
13318   echo "$ac_t""no" 1>&6
13319 fi
13320 done
13321
13322
13323 if test $ol_link_termcap = no ; then
13324         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13325 echo "configure:13326: checking for tputs in -ltermcap" >&5
13326 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13327 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13328   echo $ac_n "(cached) $ac_c" 1>&6
13329 else
13330   ac_save_LIBS="$LIBS"
13331 LIBS="-ltermcap  $LIBS"
13332 cat > conftest.$ac_ext <<EOF
13333 #line 13334 "configure"
13334 #include "confdefs.h"
13335 /* Override any gcc2 internal prototype to avoid an error.  */
13336 /* We use char because int might match the return type of a gcc2
13337     builtin and then its argument prototype would still apply.  */
13338 char tputs();
13339
13340 int main() {
13341 tputs()
13342 ; return 0; }
13343 EOF
13344 if { (eval echo configure:13345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13345   rm -rf conftest*
13346   eval "ac_cv_lib_$ac_lib_var=yes"
13347 else
13348   echo "configure: failed program was:" >&5
13349   cat conftest.$ac_ext >&5
13350   rm -rf conftest*
13351   eval "ac_cv_lib_$ac_lib_var=no"
13352 fi
13353 rm -f conftest*
13354 LIBS="$ac_save_LIBS"
13355
13356 fi
13357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13358   echo "$ac_t""yes" 1>&6
13359   have_termcap=yes
13360 else
13361   echo "$ac_t""no" 1>&6
13362 have_termcap=no
13363 fi
13364
13365         if test $have_termcap = yes ; then
13366                 cat >> confdefs.h <<\EOF
13367 #define HAVE_TERMCAP 1
13368 EOF
13369
13370                 ol_link_termcap=yes
13371                 TERMCAP_LIBS=-ltermcap
13372         fi
13373 fi
13374
13375 if test $ol_link_termcap = no ; then
13376         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13377 echo "configure:13378: checking for initscr in -lncurses" >&5
13378 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13379 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13380   echo $ac_n "(cached) $ac_c" 1>&6
13381 else
13382   ac_save_LIBS="$LIBS"
13383 LIBS="-lncurses  $LIBS"
13384 cat > conftest.$ac_ext <<EOF
13385 #line 13386 "configure"
13386 #include "confdefs.h"
13387 /* Override any gcc2 internal prototype to avoid an error.  */
13388 /* We use char because int might match the return type of a gcc2
13389     builtin and then its argument prototype would still apply.  */
13390 char initscr();
13391
13392 int main() {
13393 initscr()
13394 ; return 0; }
13395 EOF
13396 if { (eval echo configure:13397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13397   rm -rf conftest*
13398   eval "ac_cv_lib_$ac_lib_var=yes"
13399 else
13400   echo "configure: failed program was:" >&5
13401   cat conftest.$ac_ext >&5
13402   rm -rf conftest*
13403   eval "ac_cv_lib_$ac_lib_var=no"
13404 fi
13405 rm -f conftest*
13406 LIBS="$ac_save_LIBS"
13407
13408 fi
13409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13410   echo "$ac_t""yes" 1>&6
13411   have_ncurses=yes
13412 else
13413   echo "$ac_t""no" 1>&6
13414 have_ncurses=no
13415 fi
13416
13417         if test $have_ncurses = yes ; then
13418                 cat >> confdefs.h <<\EOF
13419 #define HAVE_NCURSES 1
13420 EOF
13421
13422                 ol_link_termcap=yes
13423                 TERMCAP_LIBS=-lncurses
13424         fi
13425 fi
13426
13427 if test $ol_link_termcap = no ; then
13428         cat >> confdefs.h <<\EOF
13429 #define NO_TERMCAP 1
13430 EOF
13431
13432         TERMCAP_LIBS=
13433 fi
13434
13435 ol_link_sasl=no
13436 ol_link_spasswd=no
13437 if test $ol_with_cyrus_sasl != no ; then
13438         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13439 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13440 echo "configure:13441: checking for sasl.h" >&5
13441 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13442   echo $ac_n "(cached) $ac_c" 1>&6
13443 else
13444   cat > conftest.$ac_ext <<EOF
13445 #line 13446 "configure"
13446 #include "confdefs.h"
13447 #include <sasl.h>
13448 EOF
13449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13450 { (eval echo configure:13451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13452 if test -z "$ac_err"; then
13453   rm -rf conftest*
13454   eval "ac_cv_header_$ac_safe=yes"
13455 else
13456   echo "$ac_err" >&5
13457   echo "configure: failed program was:" >&5
13458   cat conftest.$ac_ext >&5
13459   rm -rf conftest*
13460   eval "ac_cv_header_$ac_safe=no"
13461 fi
13462 rm -f conftest*
13463 fi
13464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13465   echo "$ac_t""yes" 1>&6
13466   :
13467 else
13468   echo "$ac_t""no" 1>&6
13469 fi
13470
13471
13472         if test $ac_cv_header_sasl_h = yes ; then
13473                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13474 echo "configure:13475: checking for sasl_client_init in -lsasl" >&5
13475 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13476 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13477   echo $ac_n "(cached) $ac_c" 1>&6
13478 else
13479   ac_save_LIBS="$LIBS"
13480 LIBS="-lsasl  $LIBS"
13481 cat > conftest.$ac_ext <<EOF
13482 #line 13483 "configure"
13483 #include "confdefs.h"
13484 /* Override any gcc2 internal prototype to avoid an error.  */
13485 /* We use char because int might match the return type of a gcc2
13486     builtin and then its argument prototype would still apply.  */
13487 char sasl_client_init();
13488
13489 int main() {
13490 sasl_client_init()
13491 ; return 0; }
13492 EOF
13493 if { (eval echo configure:13494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13494   rm -rf conftest*
13495   eval "ac_cv_lib_$ac_lib_var=yes"
13496 else
13497   echo "configure: failed program was:" >&5
13498   cat conftest.$ac_ext >&5
13499   rm -rf conftest*
13500   eval "ac_cv_lib_$ac_lib_var=no"
13501 fi
13502 rm -f conftest*
13503 LIBS="$ac_save_LIBS"
13504
13505 fi
13506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13507   echo "$ac_t""yes" 1>&6
13508   have_cyrus_sasl=yes
13509 else
13510   echo "$ac_t""no" 1>&6
13511 have_cyrus_sasl=no
13512 fi
13513
13514
13515                 if test $have_cyrus_sasl != no ; then
13516                         SASL_LIBS="-lsasl"
13517                         cat >> confdefs.h <<\EOF
13518 #define HAVE_CYRUS_SASL 1
13519 EOF
13520
13521                         ol_link_sasl=yes
13522                 fi
13523         fi
13524
13525         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13526                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13527         fi
13528 fi
13529
13530 if test $cross_compiling != yes ; then
13531         dev=no
13532         if test -r /dev/urandom ; then
13533                 dev="/dev/urandom";
13534         elif test -r /idev/urandom ; then
13535                 dev="/idev/urandom";
13536         elif test -r /dev/srandom ; then
13537                 dev="/dev/srandom";
13538         elif test -r /dev/random ; then
13539                 dev="/dev/random";
13540         elif test -r /idev/random ; then
13541                 dev="/idev/random";
13542         fi
13543
13544         if test $dev != no ; then
13545                 cat >> confdefs.h <<EOF
13546 #define URANDOM_DEVICE "$dev"
13547 EOF
13548
13549         fi
13550 fi
13551
13552 ol_link_fetch=no
13553 if test $ol_with_fetch != no ; then
13554         ol_LIBS=$LIBS
13555 LIBS="-lfetch -lcom_err $LIBS"
13556 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13557 echo "configure:13558: checking fetch(3) library" >&5
13558 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13559   echo $ac_n "(cached) $ac_c" 1>&6
13560 else
13561   
13562         cat > conftest.$ac_ext <<EOF
13563 #line 13564 "configure"
13564 #include "confdefs.h"
13565
13566 #include <sys/param.h>
13567 #include <stdio.h>
13568 #include <fetch.h>
13569 int main() {
13570 struct url *u = fetchParseURL("file:///"); 
13571 ; return 0; }
13572 EOF
13573 if { (eval echo configure:13574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13574   rm -rf conftest*
13575   ol_cv_lib_fetch=yes
13576 else
13577   echo "configure: failed program was:" >&5
13578   cat conftest.$ac_ext >&5
13579   rm -rf conftest*
13580   ol_cv_lib_fetch=no
13581 fi
13582 rm -f conftest*
13583 fi
13584
13585 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13586 LIBS=$ol_LIBS
13587 if test $ol_cv_lib_fetch != no ; then
13588         ol_link_fetch="-lfetch -lcom_err"
13589         cat >> confdefs.h <<\EOF
13590 #define HAVE_FETCH 1
13591 EOF
13592
13593 fi
13594
13595
13596         if test $ol_cv_lib_fetch != no ; then
13597                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13598                 ol_link_fetch=freebsd
13599
13600         elif test $ol_with_fetch != auto ; then
13601                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13602         fi 
13603 fi
13604
13605 ol_link_readline=no
13606 if test $ol_with_readline != no ; then
13607         for ac_hdr in readline/readline.h readline/history.h
13608 do
13609 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13610 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13611 echo "configure:13612: checking for $ac_hdr" >&5
13612 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13613   echo $ac_n "(cached) $ac_c" 1>&6
13614 else
13615   cat > conftest.$ac_ext <<EOF
13616 #line 13617 "configure"
13617 #include "confdefs.h"
13618 #include <$ac_hdr>
13619 EOF
13620 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13621 { (eval echo configure:13622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13622 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13623 if test -z "$ac_err"; then
13624   rm -rf conftest*
13625   eval "ac_cv_header_$ac_safe=yes"
13626 else
13627   echo "$ac_err" >&5
13628   echo "configure: failed program was:" >&5
13629   cat conftest.$ac_ext >&5
13630   rm -rf conftest*
13631   eval "ac_cv_header_$ac_safe=no"
13632 fi
13633 rm -f conftest*
13634 fi
13635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13636   echo "$ac_t""yes" 1>&6
13637     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13638   cat >> confdefs.h <<EOF
13639 #define $ac_tr_hdr 1
13640 EOF
13641  
13642 else
13643   echo "$ac_t""no" 1>&6
13644 fi
13645 done
13646
13647
13648         if test $ac_cv_header_readline_readline_h = yes ; then
13649                 save_LIBS="$LIBS"
13650                 LIBS="$TERMCAP_LIBS $LIBS"
13651                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13652 echo "configure:13653: checking for readline in -lreadline" >&5
13653 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13654 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13655   echo $ac_n "(cached) $ac_c" 1>&6
13656 else
13657   ac_save_LIBS="$LIBS"
13658 LIBS="-lreadline  $LIBS"
13659 cat > conftest.$ac_ext <<EOF
13660 #line 13661 "configure"
13661 #include "confdefs.h"
13662 /* Override any gcc2 internal prototype to avoid an error.  */
13663 /* We use char because int might match the return type of a gcc2
13664     builtin and then its argument prototype would still apply.  */
13665 char readline();
13666
13667 int main() {
13668 readline()
13669 ; return 0; }
13670 EOF
13671 if { (eval echo configure:13672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13672   rm -rf conftest*
13673   eval "ac_cv_lib_$ac_lib_var=yes"
13674 else
13675   echo "configure: failed program was:" >&5
13676   cat conftest.$ac_ext >&5
13677   rm -rf conftest*
13678   eval "ac_cv_lib_$ac_lib_var=no"
13679 fi
13680 rm -f conftest*
13681 LIBS="$ac_save_LIBS"
13682
13683 fi
13684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13685   echo "$ac_t""yes" 1>&6
13686   have_readline=yes
13687 else
13688   echo "$ac_t""no" 1>&6
13689 have_readline=no
13690 fi
13691
13692                 LIBS="$save_LIBS"
13693                         
13694                 if test $have_readline = yes ; then
13695                         ol_with_readline=found
13696                         ol_link_readline=yes
13697
13698                         READLINE_LIBS="-lreadline"
13699                 fi
13700         fi
13701 fi
13702
13703 if test $ol_link_readline = yes ; then
13704         cat >> confdefs.h <<\EOF
13705 #define HAVE_READLINE 1
13706 EOF
13707
13708 fi
13709
13710
13711 if test $ol_enable_crypt != no ; then
13712         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13713 echo "configure:13714: checking for crypt" >&5
13714 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13715   echo $ac_n "(cached) $ac_c" 1>&6
13716 else
13717   cat > conftest.$ac_ext <<EOF
13718 #line 13719 "configure"
13719 #include "confdefs.h"
13720 /* System header to define __stub macros and hopefully few prototypes,
13721     which can conflict with char crypt(); below.  */
13722 #include <assert.h>
13723 /* Override any gcc2 internal prototype to avoid an error.  */
13724 /* We use char because int might match the return type of a gcc2
13725     builtin and then its argument prototype would still apply.  */
13726 char crypt();
13727 char (*f)();
13728
13729 int main() {
13730
13731 /* The GNU C library defines this for functions which it implements
13732     to always fail with ENOSYS.  Some functions are actually named
13733     something starting with __ and the normal name is an alias.  */
13734 #if defined (__stub_crypt) || defined (__stub___crypt)
13735 choke me
13736 #else
13737 f = crypt;
13738 #endif
13739
13740 ; return 0; }
13741 EOF
13742 if { (eval echo configure:13743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13743   rm -rf conftest*
13744   eval "ac_cv_func_crypt=yes"
13745 else
13746   echo "configure: failed program was:" >&5
13747   cat conftest.$ac_ext >&5
13748   rm -rf conftest*
13749   eval "ac_cv_func_crypt=no"
13750 fi
13751 rm -f conftest*
13752 fi
13753
13754 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13755   echo "$ac_t""yes" 1>&6
13756   have_crypt=yes
13757 else
13758   echo "$ac_t""no" 1>&6
13759
13760                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13761 echo "configure:13762: checking for crypt in -lcrypt" >&5
13762 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13764   echo $ac_n "(cached) $ac_c" 1>&6
13765 else
13766   ac_save_LIBS="$LIBS"
13767 LIBS="-lcrypt  $LIBS"
13768 cat > conftest.$ac_ext <<EOF
13769 #line 13770 "configure"
13770 #include "confdefs.h"
13771 /* Override any gcc2 internal prototype to avoid an error.  */
13772 /* We use char because int might match the return type of a gcc2
13773     builtin and then its argument prototype would still apply.  */
13774 char crypt();
13775
13776 int main() {
13777 crypt()
13778 ; return 0; }
13779 EOF
13780 if { (eval echo configure:13781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13781   rm -rf conftest*
13782   eval "ac_cv_lib_$ac_lib_var=yes"
13783 else
13784   echo "configure: failed program was:" >&5
13785   cat conftest.$ac_ext >&5
13786   rm -rf conftest*
13787   eval "ac_cv_lib_$ac_lib_var=no"
13788 fi
13789 rm -f conftest*
13790 LIBS="$ac_save_LIBS"
13791
13792 fi
13793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13794   echo "$ac_t""yes" 1>&6
13795   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13796                         have_crypt=yes
13797 else
13798   echo "$ac_t""no" 1>&6
13799 have_crypt=no
13800 fi
13801
13802 fi
13803
13804
13805         if test $have_crypt = yes ; then
13806                 cat >> confdefs.h <<\EOF
13807 #define HAVE_CRYPT 1
13808 EOF
13809
13810         else
13811                 echo "configure: warning: could not find crypt" 1>&2
13812                 if test $ol_enable_crypt = yes ; then
13813                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13814                 fi
13815
13816                 echo "configure: warning: disabling crypt support" 1>&2
13817                 ol_enable_crypt=no
13818         fi
13819 fi
13820
13821 if test $ol_enable_proctitle != no ; then
13822         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13823 echo "configure:13824: checking for setproctitle" >&5
13824 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13825   echo $ac_n "(cached) $ac_c" 1>&6
13826 else
13827   cat > conftest.$ac_ext <<EOF
13828 #line 13829 "configure"
13829 #include "confdefs.h"
13830 /* System header to define __stub macros and hopefully few prototypes,
13831     which can conflict with char setproctitle(); below.  */
13832 #include <assert.h>
13833 /* Override any gcc2 internal prototype to avoid an error.  */
13834 /* We use char because int might match the return type of a gcc2
13835     builtin and then its argument prototype would still apply.  */
13836 char setproctitle();
13837 char (*f)();
13838
13839 int main() {
13840
13841 /* The GNU C library defines this for functions which it implements
13842     to always fail with ENOSYS.  Some functions are actually named
13843     something starting with __ and the normal name is an alias.  */
13844 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13845 choke me
13846 #else
13847 f = setproctitle;
13848 #endif
13849
13850 ; return 0; }
13851 EOF
13852 if { (eval echo configure:13853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13853   rm -rf conftest*
13854   eval "ac_cv_func_setproctitle=yes"
13855 else
13856   echo "configure: failed program was:" >&5
13857   cat conftest.$ac_ext >&5
13858   rm -rf conftest*
13859   eval "ac_cv_func_setproctitle=no"
13860 fi
13861 rm -f conftest*
13862 fi
13863
13864 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13865   echo "$ac_t""yes" 1>&6
13866   have_setproctitle=yes
13867 else
13868   echo "$ac_t""no" 1>&6
13869
13870                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13871 echo "configure:13872: checking for setproctitle in -lutil" >&5
13872 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13873 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13874   echo $ac_n "(cached) $ac_c" 1>&6
13875 else
13876   ac_save_LIBS="$LIBS"
13877 LIBS="-lutil  $LIBS"
13878 cat > conftest.$ac_ext <<EOF
13879 #line 13880 "configure"
13880 #include "confdefs.h"
13881 /* Override any gcc2 internal prototype to avoid an error.  */
13882 /* We use char because int might match the return type of a gcc2
13883     builtin and then its argument prototype would still apply.  */
13884 char setproctitle();
13885
13886 int main() {
13887 setproctitle()
13888 ; return 0; }
13889 EOF
13890 if { (eval echo configure:13891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13891   rm -rf conftest*
13892   eval "ac_cv_lib_$ac_lib_var=yes"
13893 else
13894   echo "configure: failed program was:" >&5
13895   cat conftest.$ac_ext >&5
13896   rm -rf conftest*
13897   eval "ac_cv_lib_$ac_lib_var=no"
13898 fi
13899 rm -f conftest*
13900 LIBS="$ac_save_LIBS"
13901
13902 fi
13903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13904   echo "$ac_t""yes" 1>&6
13905   have_setproctitle=yes
13906                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13907 else
13908   echo "$ac_t""no" 1>&6
13909 have_setproctitle=no
13910                         LIBOBJS="$LIBOBJS setproctitle.o"
13911                         LIBSRCS="$LIBSRCS setproctitle.c"
13912 fi
13913
13914 fi
13915
13916
13917         if test $have_setproctitle = yes ; then
13918                 cat >> confdefs.h <<\EOF
13919 #define HAVE_SETPROCTITLE 1
13920 EOF
13921
13922         fi
13923 fi
13924
13925 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13926 echo "configure:13927: checking for ANSI C header files" >&5
13927 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13928   echo $ac_n "(cached) $ac_c" 1>&6
13929 else
13930   cat > conftest.$ac_ext <<EOF
13931 #line 13932 "configure"
13932 #include "confdefs.h"
13933 #include <stdlib.h>
13934 #include <stdarg.h>
13935 #include <string.h>
13936 #include <float.h>
13937 EOF
13938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13939 { (eval echo configure:13940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13940 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13941 if test -z "$ac_err"; then
13942   rm -rf conftest*
13943   ac_cv_header_stdc=yes
13944 else
13945   echo "$ac_err" >&5
13946   echo "configure: failed program was:" >&5
13947   cat conftest.$ac_ext >&5
13948   rm -rf conftest*
13949   ac_cv_header_stdc=no
13950 fi
13951 rm -f conftest*
13952
13953 if test $ac_cv_header_stdc = yes; then
13954   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13955 cat > conftest.$ac_ext <<EOF
13956 #line 13957 "configure"
13957 #include "confdefs.h"
13958 #include <string.h>
13959 EOF
13960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13961   egrep "memchr" >/dev/null 2>&1; then
13962   :
13963 else
13964   rm -rf conftest*
13965   ac_cv_header_stdc=no
13966 fi
13967 rm -f conftest*
13968
13969 fi
13970
13971 if test $ac_cv_header_stdc = yes; then
13972   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13973 cat > conftest.$ac_ext <<EOF
13974 #line 13975 "configure"
13975 #include "confdefs.h"
13976 #include <stdlib.h>
13977 EOF
13978 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13979   egrep "free" >/dev/null 2>&1; then
13980   :
13981 else
13982   rm -rf conftest*
13983   ac_cv_header_stdc=no
13984 fi
13985 rm -f conftest*
13986
13987 fi
13988
13989 if test $ac_cv_header_stdc = yes; then
13990   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13991 if test "$cross_compiling" = yes; then
13992   :
13993 else
13994   cat > conftest.$ac_ext <<EOF
13995 #line 13996 "configure"
13996 #include "confdefs.h"
13997 #include <ctype.h>
13998 #if ((' ' & 0x0FF) == 0x020)
13999 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14000 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14001 #else
14002 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14003  || ('j' <= (c) && (c) <= 'r') \
14004  || ('s' <= (c) && (c) <= 'z'))
14005 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14006 #endif
14007 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14008 int main () { int i; for (i = 0; i < 256; i++)
14009 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14010 exit (0); }
14011
14012 EOF
14013 if { (eval echo configure:14014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14014 then
14015   :
14016 else
14017   echo "configure: failed program was:" >&5
14018   cat conftest.$ac_ext >&5
14019   rm -fr conftest*
14020   ac_cv_header_stdc=no
14021 fi
14022 rm -fr conftest*
14023 fi
14024
14025 fi
14026 fi
14027
14028 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14029 if test $ac_cv_header_stdc = yes; then
14030   cat >> confdefs.h <<\EOF
14031 #define STDC_HEADERS 1
14032 EOF
14033
14034 fi
14035
14036 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14037 echo "configure:14038: checking for mode_t" >&5
14038 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14039   echo $ac_n "(cached) $ac_c" 1>&6
14040 else
14041   cat > conftest.$ac_ext <<EOF
14042 #line 14043 "configure"
14043 #include "confdefs.h"
14044 #include <sys/types.h>
14045 #if STDC_HEADERS
14046 #include <stdlib.h>
14047 #include <stddef.h>
14048 #endif
14049
14050 EOF
14051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14052   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14053   rm -rf conftest*
14054   eval "ac_cv_type_mode_t=yes"
14055 else
14056   rm -rf conftest*
14057   eval "ac_cv_type_mode_t=no"
14058 fi
14059 rm -f conftest*
14060
14061 fi
14062 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14063   echo "$ac_t""yes" 1>&6
14064 else
14065   echo "$ac_t""no" 1>&6
14066   cat >> confdefs.h <<EOF
14067 #define mode_t int
14068 EOF
14069
14070 fi
14071
14072 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14073 echo "configure:14074: checking for off_t" >&5
14074 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14075   echo $ac_n "(cached) $ac_c" 1>&6
14076 else
14077   cat > conftest.$ac_ext <<EOF
14078 #line 14079 "configure"
14079 #include "confdefs.h"
14080 #include <sys/types.h>
14081 #if STDC_HEADERS
14082 #include <stdlib.h>
14083 #include <stddef.h>
14084 #endif
14085
14086 EOF
14087 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14088   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14089   rm -rf conftest*
14090   eval "ac_cv_type_off_t=yes"
14091 else
14092   rm -rf conftest*
14093   eval "ac_cv_type_off_t=no"
14094 fi
14095 rm -f conftest*
14096
14097 fi
14098 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14099   echo "$ac_t""yes" 1>&6
14100 else
14101   echo "$ac_t""no" 1>&6
14102   cat >> confdefs.h <<EOF
14103 #define off_t long
14104 EOF
14105
14106 fi
14107
14108 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14109 echo "configure:14110: checking for pid_t" >&5
14110 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14111   echo $ac_n "(cached) $ac_c" 1>&6
14112 else
14113   cat > conftest.$ac_ext <<EOF
14114 #line 14115 "configure"
14115 #include "confdefs.h"
14116 #include <sys/types.h>
14117 #if STDC_HEADERS
14118 #include <stdlib.h>
14119 #include <stddef.h>
14120 #endif
14121
14122 EOF
14123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14124   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14125   rm -rf conftest*
14126   eval "ac_cv_type_pid_t=yes"
14127 else
14128   rm -rf conftest*
14129   eval "ac_cv_type_pid_t=no"
14130 fi
14131 rm -f conftest*
14132
14133 fi
14134 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14135   echo "$ac_t""yes" 1>&6
14136 else
14137   echo "$ac_t""no" 1>&6
14138   cat >> confdefs.h <<EOF
14139 #define pid_t int
14140 EOF
14141
14142 fi
14143
14144 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14145 echo "configure:14146: checking for ptrdiff_t" >&5
14146 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14147   echo $ac_n "(cached) $ac_c" 1>&6
14148 else
14149   cat > conftest.$ac_ext <<EOF
14150 #line 14151 "configure"
14151 #include "confdefs.h"
14152 #include <stddef.h>
14153 int main() {
14154 ptrdiff_t p
14155 ; return 0; }
14156 EOF
14157 if { (eval echo configure:14158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14158   rm -rf conftest*
14159   am_cv_type_ptrdiff_t=yes
14160 else
14161   echo "configure: failed program was:" >&5
14162   cat conftest.$ac_ext >&5
14163   rm -rf conftest*
14164   am_cv_type_ptrdiff_t=no
14165 fi
14166 rm -f conftest*
14167 fi
14168
14169 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14170    if test $am_cv_type_ptrdiff_t = yes; then
14171      cat >> confdefs.h <<\EOF
14172 #define HAVE_PTRDIFF_T 1
14173 EOF
14174
14175    fi
14176
14177 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14178 echo "configure:14179: checking return type of signal handlers" >&5
14179 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14180   echo $ac_n "(cached) $ac_c" 1>&6
14181 else
14182   cat > conftest.$ac_ext <<EOF
14183 #line 14184 "configure"
14184 #include "confdefs.h"
14185 #include <sys/types.h>
14186 #include <signal.h>
14187 #ifdef signal
14188 #undef signal
14189 #endif
14190 #ifdef __cplusplus
14191 extern "C" void (*signal (int, void (*)(int)))(int);
14192 #else
14193 void (*signal ()) ();
14194 #endif
14195
14196 int main() {
14197 int i;
14198 ; return 0; }
14199 EOF
14200 if { (eval echo configure:14201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14201   rm -rf conftest*
14202   ac_cv_type_signal=void
14203 else
14204   echo "configure: failed program was:" >&5
14205   cat conftest.$ac_ext >&5
14206   rm -rf conftest*
14207   ac_cv_type_signal=int
14208 fi
14209 rm -f conftest*
14210 fi
14211
14212 echo "$ac_t""$ac_cv_type_signal" 1>&6
14213 cat >> confdefs.h <<EOF
14214 #define RETSIGTYPE $ac_cv_type_signal
14215 EOF
14216
14217
14218 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14219 echo "configure:14220: checking for size_t" >&5
14220 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14221   echo $ac_n "(cached) $ac_c" 1>&6
14222 else
14223   cat > conftest.$ac_ext <<EOF
14224 #line 14225 "configure"
14225 #include "confdefs.h"
14226 #include <sys/types.h>
14227 #if STDC_HEADERS
14228 #include <stdlib.h>
14229 #include <stddef.h>
14230 #endif
14231
14232 EOF
14233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14234   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14235   rm -rf conftest*
14236   eval "ac_cv_type_size_t=yes"
14237 else
14238   rm -rf conftest*
14239   eval "ac_cv_type_size_t=no"
14240 fi
14241 rm -f conftest*
14242
14243 fi
14244 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14245   echo "$ac_t""yes" 1>&6
14246 else
14247   echo "$ac_t""no" 1>&6
14248   cat >> confdefs.h <<EOF
14249 #define size_t unsigned
14250 EOF
14251
14252 fi
14253
14254
14255 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14256 echo "configure:14257: checking for ssize_t" >&5
14257 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14258   echo $ac_n "(cached) $ac_c" 1>&6
14259 else
14260   cat > conftest.$ac_ext <<EOF
14261 #line 14262 "configure"
14262 #include "confdefs.h"
14263 #include <sys/types.h>
14264 #if STDC_HEADERS
14265 #include <stdlib.h>
14266 #include <stddef.h>
14267 #endif
14268
14269 EOF
14270 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14271   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14272   rm -rf conftest*
14273   eval "ac_cv_type_ssize_t=yes"
14274 else
14275   rm -rf conftest*
14276   eval "ac_cv_type_ssize_t=no"
14277 fi
14278 rm -f conftest*
14279
14280 fi
14281 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14282   echo "$ac_t""yes" 1>&6
14283 else
14284   echo "$ac_t""no" 1>&6
14285   cat >> confdefs.h <<EOF
14286 #define ssize_t signed int
14287 EOF
14288
14289 fi
14290
14291 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14292 echo "configure:14293: checking for caddr_t" >&5
14293 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14294   echo $ac_n "(cached) $ac_c" 1>&6
14295 else
14296   cat > conftest.$ac_ext <<EOF
14297 #line 14298 "configure"
14298 #include "confdefs.h"
14299 #include <sys/types.h>
14300 #if STDC_HEADERS
14301 #include <stdlib.h>
14302 #include <stddef.h>
14303 #endif
14304
14305 EOF
14306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14307   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14308   rm -rf conftest*
14309   eval "ac_cv_type_caddr_t=yes"
14310 else
14311   rm -rf conftest*
14312   eval "ac_cv_type_caddr_t=no"
14313 fi
14314 rm -f conftest*
14315
14316 fi
14317 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14318   echo "$ac_t""yes" 1>&6
14319 else
14320   echo "$ac_t""no" 1>&6
14321   cat >> confdefs.h <<EOF
14322 #define caddr_t char *
14323 EOF
14324
14325 fi
14326
14327
14328 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14329 echo "configure:14330: checking for socklen_t" >&5
14330 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14331   echo $ac_n "(cached) $ac_c" 1>&6
14332 else
14333   cat > conftest.$ac_ext <<EOF
14334 #line 14335 "configure"
14335 #include "confdefs.h"
14336
14337 #ifdef HAVE_SYS_TYPES_H
14338 #include <sys/types.h>
14339 #endif
14340 #ifdef HAVE_SYS_SOCKET_H
14341 #include <sys/socket.h>
14342 #endif
14343
14344 int main() {
14345 socklen_t len;
14346 ; return 0; }
14347 EOF
14348 if { (eval echo configure:14349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14349   rm -rf conftest*
14350   ol_cv_type_socklen_t=yes
14351 else
14352   echo "configure: failed program was:" >&5
14353   cat conftest.$ac_ext >&5
14354   rm -rf conftest*
14355   ol_cv_type_socklen_t=no
14356 fi
14357 rm -f conftest*
14358 fi
14359
14360 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14361   if test $ol_cv_type_socklen_t = no; then
14362     cat >> confdefs.h <<\EOF
14363 #define socklen_t int
14364 EOF
14365
14366   fi
14367  
14368 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14369 echo "configure:14370: checking for member st_blksize in aggregate type struct stat" >&5
14370 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14371   echo $ac_n "(cached) $ac_c" 1>&6
14372 else
14373   cat > conftest.$ac_ext <<EOF
14374 #line 14375 "configure"
14375 #include "confdefs.h"
14376 #include <sys/types.h>
14377 #include <sys/stat.h>
14378 int main() {
14379 struct stat foo; foo.st_blksize;
14380 ; return 0; }
14381 EOF
14382 if { (eval echo configure:14383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14383   rm -rf conftest*
14384   ac_cv_c_struct_member_st_blksize=yes
14385 else
14386   echo "configure: failed program was:" >&5
14387   cat conftest.$ac_ext >&5
14388   rm -rf conftest*
14389   ac_cv_c_struct_member_st_blksize=no
14390 fi
14391 rm -f conftest*
14392 fi
14393
14394 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14395 st_blksize="$ac_cv_c_struct_member_st_blksize"
14396 if test $ac_cv_c_struct_member_st_blksize = yes; then
14397   cat >> confdefs.h <<\EOF
14398 #define HAVE_ST_BLKSIZE 1
14399 EOF
14400
14401 fi
14402
14403 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14404 echo "configure:14405: checking whether time.h and sys/time.h may both be included" >&5
14405 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14406   echo $ac_n "(cached) $ac_c" 1>&6
14407 else
14408   cat > conftest.$ac_ext <<EOF
14409 #line 14410 "configure"
14410 #include "confdefs.h"
14411 #include <sys/types.h>
14412 #include <sys/time.h>
14413 #include <time.h>
14414 int main() {
14415 struct tm *tp;
14416 ; return 0; }
14417 EOF
14418 if { (eval echo configure:14419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14419   rm -rf conftest*
14420   ac_cv_header_time=yes
14421 else
14422   echo "configure: failed program was:" >&5
14423   cat conftest.$ac_ext >&5
14424   rm -rf conftest*
14425   ac_cv_header_time=no
14426 fi
14427 rm -f conftest*
14428 fi
14429
14430 echo "$ac_t""$ac_cv_header_time" 1>&6
14431 if test $ac_cv_header_time = yes; then
14432   cat >> confdefs.h <<\EOF
14433 #define TIME_WITH_SYS_TIME 1
14434 EOF
14435
14436 fi
14437
14438 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14439 echo "configure:14440: checking whether struct tm is in sys/time.h or time.h" >&5
14440 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14441   echo $ac_n "(cached) $ac_c" 1>&6
14442 else
14443   cat > conftest.$ac_ext <<EOF
14444 #line 14445 "configure"
14445 #include "confdefs.h"
14446 #include <sys/types.h>
14447 #include <time.h>
14448 int main() {
14449 struct tm *tp; tp->tm_sec;
14450 ; return 0; }
14451 EOF
14452 if { (eval echo configure:14453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14453   rm -rf conftest*
14454   ac_cv_struct_tm=time.h
14455 else
14456   echo "configure: failed program was:" >&5
14457   cat conftest.$ac_ext >&5
14458   rm -rf conftest*
14459   ac_cv_struct_tm=sys/time.h
14460 fi
14461 rm -f conftest*
14462 fi
14463
14464 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14465 if test $ac_cv_struct_tm = sys/time.h; then
14466   cat >> confdefs.h <<\EOF
14467 #define TM_IN_SYS_TIME 1
14468 EOF
14469
14470 fi
14471
14472 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14473 echo "configure:14474: checking for uid_t in sys/types.h" >&5
14474 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14475   echo $ac_n "(cached) $ac_c" 1>&6
14476 else
14477   cat > conftest.$ac_ext <<EOF
14478 #line 14479 "configure"
14479 #include "confdefs.h"
14480 #include <sys/types.h>
14481 EOF
14482 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14483   egrep "uid_t" >/dev/null 2>&1; then
14484   rm -rf conftest*
14485   ac_cv_type_uid_t=yes
14486 else
14487   rm -rf conftest*
14488   ac_cv_type_uid_t=no
14489 fi
14490 rm -f conftest*
14491
14492 fi
14493
14494 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14495 if test $ac_cv_type_uid_t = no; then
14496   cat >> confdefs.h <<\EOF
14497 #define uid_t int
14498 EOF
14499
14500   cat >> confdefs.h <<\EOF
14501 #define gid_t int
14502 EOF
14503
14504 fi
14505
14506 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14507 echo "configure:14508: checking for sig_atomic_t" >&5
14508 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14509   echo $ac_n "(cached) $ac_c" 1>&6
14510 else
14511   cat > conftest.$ac_ext <<EOF
14512 #line 14513 "configure"
14513 #include "confdefs.h"
14514 #include <signal.h>
14515 int main() {
14516 sig_atomic_t atomic;
14517 ; return 0; }
14518 EOF
14519 if { (eval echo configure:14520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14520   rm -rf conftest*
14521   ol_cv_type_sig_atomic_t=yes
14522 else
14523   echo "configure: failed program was:" >&5
14524   cat conftest.$ac_ext >&5
14525   rm -rf conftest*
14526   ol_cv_type_sig_atomic_t=no
14527 fi
14528 rm -f conftest*
14529 fi
14530
14531 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14532   if test $ol_cv_type_sig_atomic_t = no; then
14533     cat >> confdefs.h <<\EOF
14534 #define sig_atomic_t int
14535 EOF
14536
14537   fi
14538  
14539
14540
14541 # test for pw_gecos in struct passwd
14542 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14543 echo "configure:14544: checking struct passwd for pw_gecos" >&5
14544 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14545   echo $ac_n "(cached) $ac_c" 1>&6
14546 else
14547   
14548         cat > conftest.$ac_ext <<EOF
14549 #line 14550 "configure"
14550 #include "confdefs.h"
14551 #include <pwd.h>
14552 int main() {
14553
14554         struct passwd pwd;
14555         pwd.pw_gecos = pwd.pw_name;
14556
14557 ; return 0; }
14558 EOF
14559 if { (eval echo configure:14560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14560   rm -rf conftest*
14561   ol_cv_struct_passwd_pw_gecos=yes
14562 else
14563   echo "configure: failed program was:" >&5
14564   cat conftest.$ac_ext >&5
14565   rm -rf conftest*
14566   ol_cv_struct_passwd_pw_gecos=no
14567 fi
14568 rm -f conftest*
14569 fi
14570
14571 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14572 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14573         cat >> confdefs.h <<\EOF
14574 #define HAVE_PW_GECOS 1
14575 EOF
14576
14577 fi
14578
14579 # test for pw_passwd in struct passwd
14580 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14581 echo "configure:14582: checking struct passwd for pw_passwd" >&5
14582 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14583   echo $ac_n "(cached) $ac_c" 1>&6
14584 else
14585   
14586         cat > conftest.$ac_ext <<EOF
14587 #line 14588 "configure"
14588 #include "confdefs.h"
14589 #include <pwd.h>
14590 int main() {
14591
14592         struct passwd pwd;
14593         pwd.pw_passwd = pwd.pw_name;
14594
14595 ; return 0; }
14596 EOF
14597 if { (eval echo configure:14598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14598   rm -rf conftest*
14599   ol_cv_struct_passwd_pw_passwd=yes
14600 else
14601   echo "configure: failed program was:" >&5
14602   cat conftest.$ac_ext >&5
14603   rm -rf conftest*
14604   ol_cv_struct_passwd_pw_passwd=no
14605 fi
14606 rm -f conftest*
14607 fi
14608
14609 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14610 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14611         cat >> confdefs.h <<\EOF
14612 #define HAVE_PW_PASSWD 1
14613 EOF
14614
14615 fi
14616
14617
14618 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14619 echo "configure:14620: checking if toupper() requires islower()" >&5
14620 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14621   echo $ac_n "(cached) $ac_c" 1>&6
14622 else
14623   
14624         if test "$cross_compiling" = yes; then
14625   ol_cv_c_upper_lower=safe
14626 else
14627   cat > conftest.$ac_ext <<EOF
14628 #line 14629 "configure"
14629 #include "confdefs.h"
14630
14631 #include <ctype.h>
14632 main()
14633 {
14634         if ('C' == toupper('C'))
14635                 exit(0);
14636         else
14637                 exit(1);
14638 }
14639 EOF
14640 if { (eval echo configure:14641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14641 then
14642   ol_cv_c_upper_lower=no
14643 else
14644   echo "configure: failed program was:" >&5
14645   cat conftest.$ac_ext >&5
14646   rm -fr conftest*
14647   ol_cv_c_upper_lower=yes
14648 fi
14649 rm -fr conftest*
14650 fi
14651
14652 fi
14653
14654 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14655 if test $ol_cv_c_upper_lower != no ; then
14656         cat >> confdefs.h <<\EOF
14657 #define C_UPPER_LOWER 1
14658 EOF
14659
14660 fi
14661
14662 echo $ac_n "checking for working const""... $ac_c" 1>&6
14663 echo "configure:14664: checking for working const" >&5
14664 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14665   echo $ac_n "(cached) $ac_c" 1>&6
14666 else
14667   cat > conftest.$ac_ext <<EOF
14668 #line 14669 "configure"
14669 #include "confdefs.h"
14670
14671 int main() {
14672
14673 /* Ultrix mips cc rejects this.  */
14674 typedef int charset[2]; const charset x;
14675 /* SunOS 4.1.1 cc rejects this.  */
14676 char const *const *ccp;
14677 char **p;
14678 /* NEC SVR4.0.2 mips cc rejects this.  */
14679 struct point {int x, y;};
14680 static struct point const zero = {0,0};
14681 /* AIX XL C 1.02.0.0 rejects this.
14682    It does not let you subtract one const X* pointer from another in an arm
14683    of an if-expression whose if-part is not a constant expression */
14684 const char *g = "string";
14685 ccp = &g + (g ? g-g : 0);
14686 /* HPUX 7.0 cc rejects these. */
14687 ++ccp;
14688 p = (char**) ccp;
14689 ccp = (char const *const *) p;
14690 { /* SCO 3.2v4 cc rejects this.  */
14691   char *t;
14692   char const *s = 0 ? (char *) 0 : (char const *) 0;
14693
14694   *t++ = 0;
14695 }
14696 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14697   int x[] = {25, 17};
14698   const int *foo = &x[0];
14699   ++foo;
14700 }
14701 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14702   typedef const int *iptr;
14703   iptr p = 0;
14704   ++p;
14705 }
14706 { /* AIX XL C 1.02.0.0 rejects this saying
14707      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14708   struct s { int j; const int *ap[3]; };
14709   struct s *b; b->j = 5;
14710 }
14711 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14712   const int foo = 10;
14713 }
14714
14715 ; return 0; }
14716 EOF
14717 if { (eval echo configure:14718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14718   rm -rf conftest*
14719   ac_cv_c_const=yes
14720 else
14721   echo "configure: failed program was:" >&5
14722   cat conftest.$ac_ext >&5
14723   rm -rf conftest*
14724   ac_cv_c_const=no
14725 fi
14726 rm -f conftest*
14727 fi
14728
14729 echo "$ac_t""$ac_cv_c_const" 1>&6
14730 if test $ac_cv_c_const = no; then
14731   cat >> confdefs.h <<\EOF
14732 #define const 
14733 EOF
14734
14735 fi
14736
14737 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14738 echo "configure:14739: checking if compiler understands volatile" >&5
14739 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14740   echo $ac_n "(cached) $ac_c" 1>&6
14741 else
14742   cat > conftest.$ac_ext <<EOF
14743 #line 14744 "configure"
14744 #include "confdefs.h"
14745 int x, y, z;
14746 int main() {
14747 volatile int a; int * volatile b = x ? &y : &z;
14748       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14749       *b = 0;
14750 ; return 0; }
14751 EOF
14752 if { (eval echo configure:14753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14753   rm -rf conftest*
14754   ol_cv_c_volatile=yes
14755 else
14756   echo "configure: failed program was:" >&5
14757   cat conftest.$ac_ext >&5
14758   rm -rf conftest*
14759   ol_cv_c_volatile=no
14760 fi
14761 rm -f conftest*
14762 fi
14763
14764 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14765   if test $ol_cv_c_volatile = yes; then
14766     : 
14767   else
14768     cat >> confdefs.h <<\EOF
14769 #define volatile 
14770 EOF
14771
14772   fi
14773  
14774
14775 if test $cross_compiling = yes ; then
14776         cat >> confdefs.h <<\EOF
14777 #define CROSS_COMPILING 1
14778 EOF
14779
14780 else
14781         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14782 echo "configure:14783: checking whether byte ordering is bigendian" >&5
14783 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14784   echo $ac_n "(cached) $ac_c" 1>&6
14785 else
14786   ac_cv_c_bigendian=unknown
14787 # See if sys/param.h defines the BYTE_ORDER macro.
14788 cat > conftest.$ac_ext <<EOF
14789 #line 14790 "configure"
14790 #include "confdefs.h"
14791 #include <sys/types.h>
14792 #include <sys/param.h>
14793 int main() {
14794
14795 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14796  bogus endian macros
14797 #endif
14798 ; return 0; }
14799 EOF
14800 if { (eval echo configure:14801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14801   rm -rf conftest*
14802   # It does; now see whether it defined to BIG_ENDIAN or not.
14803 cat > conftest.$ac_ext <<EOF
14804 #line 14805 "configure"
14805 #include "confdefs.h"
14806 #include <sys/types.h>
14807 #include <sys/param.h>
14808 int main() {
14809
14810 #if BYTE_ORDER != BIG_ENDIAN
14811  not big endian
14812 #endif
14813 ; return 0; }
14814 EOF
14815 if { (eval echo configure:14816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14816   rm -rf conftest*
14817   ac_cv_c_bigendian=yes
14818 else
14819   echo "configure: failed program was:" >&5
14820   cat conftest.$ac_ext >&5
14821   rm -rf conftest*
14822   ac_cv_c_bigendian=no
14823 fi
14824 rm -f conftest*
14825 else
14826   echo "configure: failed program was:" >&5
14827   cat conftest.$ac_ext >&5
14828 fi
14829 rm -f conftest*
14830 if test $ac_cv_c_bigendian = unknown; then
14831 if test "$cross_compiling" = yes; then
14832     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14833 else
14834   cat > conftest.$ac_ext <<EOF
14835 #line 14836 "configure"
14836 #include "confdefs.h"
14837 main () {
14838   /* Are we little or big endian?  From Harbison&Steele.  */
14839   union
14840   {
14841     long l;
14842     char c[sizeof (long)];
14843   } u;
14844   u.l = 1;
14845   exit (u.c[sizeof (long) - 1] == 1);
14846 }
14847 EOF
14848 if { (eval echo configure:14849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14849 then
14850   ac_cv_c_bigendian=no
14851 else
14852   echo "configure: failed program was:" >&5
14853   cat conftest.$ac_ext >&5
14854   rm -fr conftest*
14855   ac_cv_c_bigendian=yes
14856 fi
14857 rm -fr conftest*
14858 fi
14859
14860 fi
14861 fi
14862
14863 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14864 if test $ac_cv_c_bigendian = yes; then
14865   cat >> confdefs.h <<\EOF
14866 #define WORDS_BIGENDIAN 1
14867 EOF
14868
14869 fi
14870
14871 fi
14872
14873 echo $ac_n "checking size of short""... $ac_c" 1>&6
14874 echo "configure:14875: checking size of short" >&5 
14875 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14876   echo $ac_n "(cached) $ac_c" 1>&6
14877 else
14878   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14879   cat > conftest.$ac_ext <<EOF
14880 #line 14881 "configure"
14881 #include "confdefs.h"
14882 #include "confdefs.h" 
14883 #include <sys/types.h> 
14884  
14885
14886 int main() {
14887 switch (0) case 0: case (sizeof (short) == $ac_size):;
14888 ; return 0; }
14889 EOF
14890 if { (eval echo configure:14891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14891   rm -rf conftest*
14892   ac_cv_sizeof_short=$ac_size
14893 else
14894   echo "configure: failed program was:" >&5
14895   cat conftest.$ac_ext >&5
14896 fi
14897 rm -f conftest* 
14898   if test x$ac_cv_sizeof_short != x ; then break; fi 
14899 done 
14900
14901 fi
14902  
14903 if test x$ac_cv_sizeof_short = x ; then 
14904   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14905 fi 
14906 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14907 cat >> confdefs.h <<EOF
14908 #define SIZEOF_SHORT $ac_cv_sizeof_short
14909 EOF
14910  
14911  
14912 echo $ac_n "checking size of int""... $ac_c" 1>&6
14913 echo "configure:14914: checking size of int" >&5 
14914 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14915   echo $ac_n "(cached) $ac_c" 1>&6
14916 else
14917   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14918   cat > conftest.$ac_ext <<EOF
14919 #line 14920 "configure"
14920 #include "confdefs.h"
14921 #include "confdefs.h" 
14922 #include <sys/types.h> 
14923  
14924
14925 int main() {
14926 switch (0) case 0: case (sizeof (int) == $ac_size):;
14927 ; return 0; }
14928 EOF
14929 if { (eval echo configure:14930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14930   rm -rf conftest*
14931   ac_cv_sizeof_int=$ac_size
14932 else
14933   echo "configure: failed program was:" >&5
14934   cat conftest.$ac_ext >&5
14935 fi
14936 rm -f conftest* 
14937   if test x$ac_cv_sizeof_int != x ; then break; fi 
14938 done 
14939
14940 fi
14941  
14942 if test x$ac_cv_sizeof_int = x ; then 
14943   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14944 fi 
14945 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14946 cat >> confdefs.h <<EOF
14947 #define SIZEOF_INT $ac_cv_sizeof_int
14948 EOF
14949  
14950  
14951 echo $ac_n "checking size of long""... $ac_c" 1>&6
14952 echo "configure:14953: checking size of long" >&5 
14953 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14954   echo $ac_n "(cached) $ac_c" 1>&6
14955 else
14956   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14957   cat > conftest.$ac_ext <<EOF
14958 #line 14959 "configure"
14959 #include "confdefs.h"
14960 #include "confdefs.h" 
14961 #include <sys/types.h> 
14962  
14963
14964 int main() {
14965 switch (0) case 0: case (sizeof (long) == $ac_size):;
14966 ; return 0; }
14967 EOF
14968 if { (eval echo configure:14969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14969   rm -rf conftest*
14970   ac_cv_sizeof_long=$ac_size
14971 else
14972   echo "configure: failed program was:" >&5
14973   cat conftest.$ac_ext >&5
14974 fi
14975 rm -f conftest* 
14976   if test x$ac_cv_sizeof_long != x ; then break; fi 
14977 done 
14978
14979 fi
14980  
14981 if test x$ac_cv_sizeof_long = x ; then 
14982   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14983 fi 
14984 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14985 cat >> confdefs.h <<EOF
14986 #define SIZEOF_LONG $ac_cv_sizeof_long
14987 EOF
14988  
14989
14990
14991 if test "$ac_cv_sizeof_int" -lt 4 ; then
14992         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14993
14994         cat >> confdefs.h <<\EOF
14995 #define LBER_INT_T long
14996 EOF
14997
14998 else
14999         cat >> confdefs.h <<\EOF
15000 #define LBER_INT_T int
15001 EOF
15002
15003 fi
15004
15005 cat >> confdefs.h <<\EOF
15006 #define LBER_LEN_T long
15007 EOF
15008
15009 cat >> confdefs.h <<\EOF
15010 #define LBER_SOCKET_T int
15011 EOF
15012
15013 cat >> confdefs.h <<\EOF
15014 #define LBER_TAG_T long
15015 EOF
15016
15017
15018 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15019 echo "configure:15020: checking for 8-bit clean memcmp" >&5
15020 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15021   echo $ac_n "(cached) $ac_c" 1>&6
15022 else
15023   if test "$cross_compiling" = yes; then
15024   ac_cv_func_memcmp_clean=no
15025 else
15026   cat > conftest.$ac_ext <<EOF
15027 #line 15028 "configure"
15028 #include "confdefs.h"
15029
15030 main()
15031 {
15032   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15033   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15034 }
15035
15036 EOF
15037 if { (eval echo configure:15038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15038 then
15039   ac_cv_func_memcmp_clean=yes
15040 else
15041   echo "configure: failed program was:" >&5
15042   cat conftest.$ac_ext >&5
15043   rm -fr conftest*
15044   ac_cv_func_memcmp_clean=no
15045 fi
15046 rm -fr conftest*
15047 fi
15048
15049 fi
15050
15051 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15052 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15053
15054 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15055 echo "configure:15056: checking for strftime" >&5
15056 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15057   echo $ac_n "(cached) $ac_c" 1>&6
15058 else
15059   cat > conftest.$ac_ext <<EOF
15060 #line 15061 "configure"
15061 #include "confdefs.h"
15062 /* System header to define __stub macros and hopefully few prototypes,
15063     which can conflict with char strftime(); below.  */
15064 #include <assert.h>
15065 /* Override any gcc2 internal prototype to avoid an error.  */
15066 /* We use char because int might match the return type of a gcc2
15067     builtin and then its argument prototype would still apply.  */
15068 char strftime();
15069 char (*f)();
15070
15071 int main() {
15072
15073 /* The GNU C library defines this for functions which it implements
15074     to always fail with ENOSYS.  Some functions are actually named
15075     something starting with __ and the normal name is an alias.  */
15076 #if defined (__stub_strftime) || defined (__stub___strftime)
15077 choke me
15078 #else
15079 f = strftime;
15080 #endif
15081
15082 ; return 0; }
15083 EOF
15084 if { (eval echo configure:15085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15085   rm -rf conftest*
15086   eval "ac_cv_func_strftime=yes"
15087 else
15088   echo "configure: failed program was:" >&5
15089   cat conftest.$ac_ext >&5
15090   rm -rf conftest*
15091   eval "ac_cv_func_strftime=no"
15092 fi
15093 rm -f conftest*
15094 fi
15095
15096 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15097   echo "$ac_t""yes" 1>&6
15098   cat >> confdefs.h <<\EOF
15099 #define HAVE_STRFTIME 1
15100 EOF
15101
15102 else
15103   echo "$ac_t""no" 1>&6
15104 # strftime is in -lintl on SCO UNIX.
15105 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15106 echo "configure:15107: checking for strftime in -lintl" >&5
15107 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15108 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15109   echo $ac_n "(cached) $ac_c" 1>&6
15110 else
15111   ac_save_LIBS="$LIBS"
15112 LIBS="-lintl  $LIBS"
15113 cat > conftest.$ac_ext <<EOF
15114 #line 15115 "configure"
15115 #include "confdefs.h"
15116 /* Override any gcc2 internal prototype to avoid an error.  */
15117 /* We use char because int might match the return type of a gcc2
15118     builtin and then its argument prototype would still apply.  */
15119 char strftime();
15120
15121 int main() {
15122 strftime()
15123 ; return 0; }
15124 EOF
15125 if { (eval echo configure:15126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15126   rm -rf conftest*
15127   eval "ac_cv_lib_$ac_lib_var=yes"
15128 else
15129   echo "configure: failed program was:" >&5
15130   cat conftest.$ac_ext >&5
15131   rm -rf conftest*
15132   eval "ac_cv_lib_$ac_lib_var=no"
15133 fi
15134 rm -f conftest*
15135 LIBS="$ac_save_LIBS"
15136
15137 fi
15138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15139   echo "$ac_t""yes" 1>&6
15140   cat >> confdefs.h <<\EOF
15141 #define HAVE_STRFTIME 1
15142 EOF
15143
15144 LIBS="-lintl $LIBS"
15145 else
15146   echo "$ac_t""no" 1>&6
15147 fi
15148
15149 fi
15150
15151
15152 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15153 echo "configure:15154: checking for inet_aton()" >&5
15154 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15155   echo $ac_n "(cached) $ac_c" 1>&6
15156 else
15157   cat > conftest.$ac_ext <<EOF
15158 #line 15159 "configure"
15159 #include "confdefs.h"
15160
15161 #ifdef HAVE_SYS_TYPES_H
15162 #       include <sys/types.h>
15163 #endif
15164 #ifdef HAVE_SYS_SOCKET_H
15165 #       include <sys/socket.h>
15166 #       ifdef HAVE_SYS_SELECT_H
15167 #               include <sys/select.h>
15168 #       endif
15169 #       include <netinet/in.h>
15170 #       ifdef HAVE_ARPA_INET_H
15171 #               include <arpa/inet.h>
15172 #       endif
15173 #endif
15174
15175 int main() {
15176 struct in_addr in;
15177 int rc = inet_aton( "255.255.255.255", &in );
15178 ; return 0; }
15179 EOF
15180 if { (eval echo configure:15181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15181   rm -rf conftest*
15182   ol_cv_func_inet_aton=yes
15183 else
15184   echo "configure: failed program was:" >&5
15185   cat conftest.$ac_ext >&5
15186   rm -rf conftest*
15187   ol_cv_func_inet_aton=no
15188 fi
15189 rm -f conftest*
15190 fi
15191
15192 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15193   if test $ol_cv_func_inet_aton != no; then
15194     cat >> confdefs.h <<\EOF
15195 #define HAVE_INET_ATON 1
15196 EOF
15197
15198   fi
15199  
15200
15201 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15202 echo "configure:15203: checking for _spawnlp" >&5
15203 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15204   echo $ac_n "(cached) $ac_c" 1>&6
15205 else
15206   cat > conftest.$ac_ext <<EOF
15207 #line 15208 "configure"
15208 #include "confdefs.h"
15209 /* System header to define __stub macros and hopefully few prototypes,
15210     which can conflict with char _spawnlp(); below.  */
15211 #include <assert.h>
15212 /* Override any gcc2 internal prototype to avoid an error.  */
15213 /* We use char because int might match the return type of a gcc2
15214     builtin and then its argument prototype would still apply.  */
15215 char _spawnlp();
15216 char (*f)();
15217
15218 int main() {
15219
15220 /* The GNU C library defines this for functions which it implements
15221     to always fail with ENOSYS.  Some functions are actually named
15222     something starting with __ and the normal name is an alias.  */
15223 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15224 choke me
15225 #else
15226 f = _spawnlp;
15227 #endif
15228
15229 ; return 0; }
15230 EOF
15231 if { (eval echo configure:15232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15232   rm -rf conftest*
15233   eval "ac_cv_func__spawnlp=yes"
15234 else
15235   echo "configure: failed program was:" >&5
15236   cat conftest.$ac_ext >&5
15237   rm -rf conftest*
15238   eval "ac_cv_func__spawnlp=no"
15239 fi
15240 rm -f conftest*
15241 fi
15242
15243 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15244   echo "$ac_t""yes" 1>&6
15245   cat >> confdefs.h <<\EOF
15246 #define HAVE_SPAWNLP 1
15247 EOF
15248
15249 else
15250   echo "$ac_t""no" 1>&6
15251 fi
15252
15253
15254 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15255 echo "configure:15256: checking for _snprintf" >&5
15256 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15257   echo $ac_n "(cached) $ac_c" 1>&6
15258 else
15259   cat > conftest.$ac_ext <<EOF
15260 #line 15261 "configure"
15261 #include "confdefs.h"
15262 /* System header to define __stub macros and hopefully few prototypes,
15263     which can conflict with char _snprintf(); below.  */
15264 #include <assert.h>
15265 /* Override any gcc2 internal prototype to avoid an error.  */
15266 /* We use char because int might match the return type of a gcc2
15267     builtin and then its argument prototype would still apply.  */
15268 char _snprintf();
15269 char (*f)();
15270
15271 int main() {
15272
15273 /* The GNU C library defines this for functions which it implements
15274     to always fail with ENOSYS.  Some functions are actually named
15275     something starting with __ and the normal name is an alias.  */
15276 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15277 choke me
15278 #else
15279 f = _snprintf;
15280 #endif
15281
15282 ; return 0; }
15283 EOF
15284 if { (eval echo configure:15285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15285   rm -rf conftest*
15286   eval "ac_cv_func__snprintf=yes"
15287 else
15288   echo "configure: failed program was:" >&5
15289   cat conftest.$ac_ext >&5
15290   rm -rf conftest*
15291   eval "ac_cv_func__snprintf=no"
15292 fi
15293 rm -f conftest*
15294 fi
15295
15296 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15297   echo "$ac_t""yes" 1>&6
15298   ac_cv_func_snprintf=yes
15299         cat >> confdefs.h <<\EOF
15300 #define snprintf _snprintf
15301 EOF
15302
15303
15304 else
15305   echo "$ac_t""no" 1>&6
15306 fi
15307
15308
15309 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15310 echo "configure:15311: checking for _vsnprintf" >&5
15311 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15312   echo $ac_n "(cached) $ac_c" 1>&6
15313 else
15314   cat > conftest.$ac_ext <<EOF
15315 #line 15316 "configure"
15316 #include "confdefs.h"
15317 /* System header to define __stub macros and hopefully few prototypes,
15318     which can conflict with char _vsnprintf(); below.  */
15319 #include <assert.h>
15320 /* Override any gcc2 internal prototype to avoid an error.  */
15321 /* We use char because int might match the return type of a gcc2
15322     builtin and then its argument prototype would still apply.  */
15323 char _vsnprintf();
15324 char (*f)();
15325
15326 int main() {
15327
15328 /* The GNU C library defines this for functions which it implements
15329     to always fail with ENOSYS.  Some functions are actually named
15330     something starting with __ and the normal name is an alias.  */
15331 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15332 choke me
15333 #else
15334 f = _vsnprintf;
15335 #endif
15336
15337 ; return 0; }
15338 EOF
15339 if { (eval echo configure:15340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15340   rm -rf conftest*
15341   eval "ac_cv_func__vsnprintf=yes"
15342 else
15343   echo "configure: failed program was:" >&5
15344   cat conftest.$ac_ext >&5
15345   rm -rf conftest*
15346   eval "ac_cv_func__vsnprintf=no"
15347 fi
15348 rm -f conftest*
15349 fi
15350
15351 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15352   echo "$ac_t""yes" 1>&6
15353   ac_cv_func_vsnprintf=yes
15354         cat >> confdefs.h <<\EOF
15355 #define vsnprintf _vsnprintf
15356 EOF
15357
15358
15359 else
15360   echo "$ac_t""no" 1>&6
15361 fi
15362
15363
15364 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15365 echo "configure:15366: checking for vprintf" >&5
15366 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15367   echo $ac_n "(cached) $ac_c" 1>&6
15368 else
15369   cat > conftest.$ac_ext <<EOF
15370 #line 15371 "configure"
15371 #include "confdefs.h"
15372 /* System header to define __stub macros and hopefully few prototypes,
15373     which can conflict with char vprintf(); below.  */
15374 #include <assert.h>
15375 /* Override any gcc2 internal prototype to avoid an error.  */
15376 /* We use char because int might match the return type of a gcc2
15377     builtin and then its argument prototype would still apply.  */
15378 char vprintf();
15379 char (*f)();
15380
15381 int main() {
15382
15383 /* The GNU C library defines this for functions which it implements
15384     to always fail with ENOSYS.  Some functions are actually named
15385     something starting with __ and the normal name is an alias.  */
15386 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15387 choke me
15388 #else
15389 f = vprintf;
15390 #endif
15391
15392 ; return 0; }
15393 EOF
15394 if { (eval echo configure:15395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15395   rm -rf conftest*
15396   eval "ac_cv_func_vprintf=yes"
15397 else
15398   echo "configure: failed program was:" >&5
15399   cat conftest.$ac_ext >&5
15400   rm -rf conftest*
15401   eval "ac_cv_func_vprintf=no"
15402 fi
15403 rm -f conftest*
15404 fi
15405
15406 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15407   echo "$ac_t""yes" 1>&6
15408   cat >> confdefs.h <<\EOF
15409 #define HAVE_VPRINTF 1
15410 EOF
15411
15412 else
15413   echo "$ac_t""no" 1>&6
15414 fi
15415
15416 if test "$ac_cv_func_vprintf" != yes; then
15417 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15418 echo "configure:15419: checking for _doprnt" >&5
15419 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15420   echo $ac_n "(cached) $ac_c" 1>&6
15421 else
15422   cat > conftest.$ac_ext <<EOF
15423 #line 15424 "configure"
15424 #include "confdefs.h"
15425 /* System header to define __stub macros and hopefully few prototypes,
15426     which can conflict with char _doprnt(); below.  */
15427 #include <assert.h>
15428 /* Override any gcc2 internal prototype to avoid an error.  */
15429 /* We use char because int might match the return type of a gcc2
15430     builtin and then its argument prototype would still apply.  */
15431 char _doprnt();
15432 char (*f)();
15433
15434 int main() {
15435
15436 /* The GNU C library defines this for functions which it implements
15437     to always fail with ENOSYS.  Some functions are actually named
15438     something starting with __ and the normal name is an alias.  */
15439 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15440 choke me
15441 #else
15442 f = _doprnt;
15443 #endif
15444
15445 ; return 0; }
15446 EOF
15447 if { (eval echo configure:15448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15448   rm -rf conftest*
15449   eval "ac_cv_func__doprnt=yes"
15450 else
15451   echo "configure: failed program was:" >&5
15452   cat conftest.$ac_ext >&5
15453   rm -rf conftest*
15454   eval "ac_cv_func__doprnt=no"
15455 fi
15456 rm -f conftest*
15457 fi
15458
15459 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15460   echo "$ac_t""yes" 1>&6
15461   cat >> confdefs.h <<\EOF
15462 #define HAVE_DOPRNT 1
15463 EOF
15464
15465 else
15466   echo "$ac_t""no" 1>&6
15467 fi
15468
15469 fi
15470
15471
15472 if test $ac_cv_func_vprintf = yes ; then
15473                 for ac_func in vsnprintf vsprintf
15474 do
15475 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15476 echo "configure:15477: checking for $ac_func" >&5
15477 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15478   echo $ac_n "(cached) $ac_c" 1>&6
15479 else
15480   cat > conftest.$ac_ext <<EOF
15481 #line 15482 "configure"
15482 #include "confdefs.h"
15483 /* System header to define __stub macros and hopefully few prototypes,
15484     which can conflict with char $ac_func(); below.  */
15485 #include <assert.h>
15486 /* Override any gcc2 internal prototype to avoid an error.  */
15487 /* We use char because int might match the return type of a gcc2
15488     builtin and then its argument prototype would still apply.  */
15489 char $ac_func();
15490 char (*f)();
15491
15492 int main() {
15493
15494 /* The GNU C library defines this for functions which it implements
15495     to always fail with ENOSYS.  Some functions are actually named
15496     something starting with __ and the normal name is an alias.  */
15497 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15498 choke me
15499 #else
15500 f = $ac_func;
15501 #endif
15502
15503 ; return 0; }
15504 EOF
15505 if { (eval echo configure:15506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15506   rm -rf conftest*
15507   eval "ac_cv_func_$ac_func=yes"
15508 else
15509   echo "configure: failed program was:" >&5
15510   cat conftest.$ac_ext >&5
15511   rm -rf conftest*
15512   eval "ac_cv_func_$ac_func=no"
15513 fi
15514 rm -f conftest*
15515 fi
15516
15517 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15518   echo "$ac_t""yes" 1>&6
15519     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15520   cat >> confdefs.h <<EOF
15521 #define $ac_tr_func 1
15522 EOF
15523  
15524 else
15525   echo "$ac_t""no" 1>&6
15526 fi
15527 done
15528
15529 fi
15530
15531 for ac_func in \
15532         bcopy                   \
15533         closesocket             \
15534         chroot                  \
15535         endgrent                \
15536         endpwent                \
15537         flock                   \
15538         getdtablesize   \
15539         getgrgid                \
15540         gethostname             \
15541         getpass                 \
15542         getpassphrase   \
15543         getpwuid                \
15544         getpwnam                \
15545         getspnam                \
15546         gettimeofday    \
15547         initgroups              \
15548         lockf                   \
15549         memcpy                  \
15550         memmove                 \
15551         mkstemp                 \
15552         pipe                    \
15553         read                    \
15554         recv                    \
15555         recvfrom                \
15556         setpwfile               \
15557         setgid                  \
15558         setegid                 \
15559         setsid                  \
15560         setuid                  \
15561         seteuid                 \
15562         sigaction               \
15563         signal                  \
15564         sigset                  \
15565         snprintf                \
15566         strdup                  \
15567         strerror                \
15568         strpbrk                 \
15569         strrchr                 \
15570         strsep                  \
15571         strstr                  \
15572         strtol                  \
15573         strtoul                 \
15574         strspn                  \
15575         sysconf                 \
15576         waitpid                 \
15577         wait4                   \
15578         write                   \
15579         send                    \
15580         sendto                  \
15581
15582 do
15583 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15584 echo "configure:15585: checking for $ac_func" >&5
15585 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15586   echo $ac_n "(cached) $ac_c" 1>&6
15587 else
15588   cat > conftest.$ac_ext <<EOF
15589 #line 15590 "configure"
15590 #include "confdefs.h"
15591 /* System header to define __stub macros and hopefully few prototypes,
15592     which can conflict with char $ac_func(); below.  */
15593 #include <assert.h>
15594 /* Override any gcc2 internal prototype to avoid an error.  */
15595 /* We use char because int might match the return type of a gcc2
15596     builtin and then its argument prototype would still apply.  */
15597 char $ac_func();
15598 char (*f)();
15599
15600 int main() {
15601
15602 /* The GNU C library defines this for functions which it implements
15603     to always fail with ENOSYS.  Some functions are actually named
15604     something starting with __ and the normal name is an alias.  */
15605 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15606 choke me
15607 #else
15608 f = $ac_func;
15609 #endif
15610
15611 ; return 0; }
15612 EOF
15613 if { (eval echo configure:15614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15614   rm -rf conftest*
15615   eval "ac_cv_func_$ac_func=yes"
15616 else
15617   echo "configure: failed program was:" >&5
15618   cat conftest.$ac_ext >&5
15619   rm -rf conftest*
15620   eval "ac_cv_func_$ac_func=no"
15621 fi
15622 rm -f conftest*
15623 fi
15624
15625 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15626   echo "$ac_t""yes" 1>&6
15627     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15628   cat >> confdefs.h <<EOF
15629 #define $ac_tr_func 1
15630 EOF
15631  
15632 else
15633   echo "$ac_t""no" 1>&6
15634 fi
15635 done
15636
15637
15638 for ac_func in getopt tempnam
15639 do
15640 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15641 echo "configure:15642: checking for $ac_func" >&5
15642 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15643   echo $ac_n "(cached) $ac_c" 1>&6
15644 else
15645   cat > conftest.$ac_ext <<EOF
15646 #line 15647 "configure"
15647 #include "confdefs.h"
15648 /* System header to define __stub macros and hopefully few prototypes,
15649     which can conflict with char $ac_func(); below.  */
15650 #include <assert.h>
15651 /* Override any gcc2 internal prototype to avoid an error.  */
15652 /* We use char because int might match the return type of a gcc2
15653     builtin and then its argument prototype would still apply.  */
15654 char $ac_func();
15655 char (*f)();
15656
15657 int main() {
15658
15659 /* The GNU C library defines this for functions which it implements
15660     to always fail with ENOSYS.  Some functions are actually named
15661     something starting with __ and the normal name is an alias.  */
15662 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15663 choke me
15664 #else
15665 f = $ac_func;
15666 #endif
15667
15668 ; return 0; }
15669 EOF
15670 if { (eval echo configure:15671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15671   rm -rf conftest*
15672   eval "ac_cv_func_$ac_func=yes"
15673 else
15674   echo "configure: failed program was:" >&5
15675   cat conftest.$ac_ext >&5
15676   rm -rf conftest*
15677   eval "ac_cv_func_$ac_func=no"
15678 fi
15679 rm -f conftest*
15680 fi
15681
15682 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15683   echo "$ac_t""yes" 1>&6
15684     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15685   cat >> confdefs.h <<EOF
15686 #define $ac_tr_func 1
15687 EOF
15688  
15689 else
15690   echo "$ac_t""no" 1>&6
15691 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15692 fi
15693 done
15694
15695
15696
15697 if test "$ac_cv_func_getopt" != yes; then
15698     LIBSRCS="$LIBSRCS getopt.c"
15699 fi
15700
15701 if test "$ac_cv_func_tempnam" != yes; then
15702     LIBSRCS="$LIBSRCS tempnam.c"
15703 fi
15704
15705 # Check Configuration
15706 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15707 echo "configure:15708: checking declaration of sys_errlist" >&5
15708 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15709   echo $ac_n "(cached) $ac_c" 1>&6
15710 else
15711   
15712         cat > conftest.$ac_ext <<EOF
15713 #line 15714 "configure"
15714 #include "confdefs.h"
15715
15716 #include <stdio.h>
15717 #include <sys/types.h>
15718 #include <errno.h>
15719 #ifdef WINNT
15720 #include <stdlib.h>
15721 #endif 
15722 int main() {
15723 char *c = (char *) *sys_errlist
15724 ; return 0; }
15725 EOF
15726 if { (eval echo configure:15727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15727   rm -rf conftest*
15728   ol_cv_dcl_sys_errlist=yes
15729         ol_cv_have_sys_errlist=yes
15730 else
15731   echo "configure: failed program was:" >&5
15732   cat conftest.$ac_ext >&5
15733   rm -rf conftest*
15734   ol_cv_dcl_sys_errlist=no
15735 fi
15736 rm -f conftest*
15737 fi
15738
15739 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15740 #
15741 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15742 if test $ol_cv_dcl_sys_errlist = no ; then
15743         cat >> confdefs.h <<\EOF
15744 #define DECL_SYS_ERRLIST 1
15745 EOF
15746
15747
15748         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15749 echo "configure:15750: checking existence of sys_errlist" >&5
15750 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15751   echo $ac_n "(cached) $ac_c" 1>&6
15752 else
15753   
15754                 cat > conftest.$ac_ext <<EOF
15755 #line 15756 "configure"
15756 #include "confdefs.h"
15757 #include <errno.h>
15758 int main() {
15759 char *c = (char *) *sys_errlist
15760 ; return 0; }
15761 EOF
15762 if { (eval echo configure:15763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15763   rm -rf conftest*
15764   ol_cv_have_sys_errlist=yes
15765 else
15766   echo "configure: failed program was:" >&5
15767   cat conftest.$ac_ext >&5
15768   rm -rf conftest*
15769   ol_cv_have_sys_errlist=no
15770 fi
15771 rm -f conftest*
15772 fi
15773
15774 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15775 fi
15776 if test $ol_cv_have_sys_errlist = yes ; then
15777         cat >> confdefs.h <<\EOF
15778 #define HAVE_SYS_ERRLIST 1
15779 EOF
15780
15781 fi
15782
15783
15784
15785 if test "$ol_enable_debug" != no ; then
15786         cat >> confdefs.h <<\EOF
15787 #define LDAP_DEBUG 1
15788 EOF
15789
15790 fi
15791 if test "$ol_enable_syslog" = yes ; then
15792         cat >> confdefs.h <<\EOF
15793 #define LDAP_SYSLOG 1
15794 EOF
15795
15796 fi
15797 if test "$ol_enable_libui" = yes ; then
15798         cat >> confdefs.h <<\EOF
15799 #define LDAP_LIBUI 1
15800 EOF
15801
15802 fi
15803 if test "$ol_enable_cache" = no ; then
15804         cat >> confdefs.h <<\EOF
15805 #define LDAP_NOCACHE 1
15806 EOF
15807
15808 fi
15809 if test "$ol_link_kbind" != no ; then
15810         cat >> confdefs.h <<\EOF
15811 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15812 EOF
15813
15814 fi
15815 if test "$ol_enable_dns" != no ; then
15816         cat >> confdefs.h <<\EOF
15817 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
15818 EOF
15819
15820 fi
15821 if test "$ol_enable_proctitle" != no ; then
15822         cat >> confdefs.h <<\EOF
15823 #define LDAP_PROCTITLE 1
15824 EOF
15825
15826 fi
15827 if test "$ol_enable_referrals" != no ; then
15828         cat >> confdefs.h <<\EOF
15829 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15830 EOF
15831
15832 fi
15833 if test "$ol_enable_cldap" != no ; then
15834         cat >> confdefs.h <<\EOF
15835 #define LDAP_CONNECTIONLESS 1
15836 EOF
15837
15838 fi
15839 if test "$ol_enable_ldapi" != no; then
15840         cat >> confdefs.h <<\EOF
15841 #define USE_PF_LOCAL 1
15842 EOF
15843
15844 fi
15845
15846 if test "$ol_enable_cleartext" != no ; then
15847         cat >> confdefs.h <<\EOF
15848 #define SLAPD_CLEARTEXT 1
15849 EOF
15850
15851 fi
15852 if test "$ol_enable_crypt" != no ; then
15853         cat >> confdefs.h <<\EOF
15854 #define SLAPD_CRYPT 1
15855 EOF
15856
15857 fi
15858 if test "$ol_link_kpasswd" != no ; then
15859         cat >> confdefs.h <<\EOF
15860 #define SLAPD_KPASSWD 1
15861 EOF
15862
15863 fi
15864 if test "$ol_link_spasswd" != no ; then
15865         cat >> confdefs.h <<\EOF
15866 #define SLAPD_SPASSWD 1
15867 EOF
15868
15869 fi
15870 if test "$ol_enable_multimaster" != no ; then
15871         cat >> confdefs.h <<\EOF
15872 #define SLAPD_MULTIMASTER 1
15873 EOF
15874
15875 fi
15876 if test "$ol_enable_phonetic" != no ; then
15877         cat >> confdefs.h <<\EOF
15878 #define SLAPD_PHONETIC 1
15879 EOF
15880
15881 fi
15882 if test "$ol_enable_rlookups" != no ; then
15883         cat >> confdefs.h <<\EOF
15884 #define SLAPD_RLOOKUPS 1
15885 EOF
15886
15887 fi
15888 if test "$ol_enable_aci" != no ; then
15889         cat >> confdefs.h <<\EOF
15890 #define SLAPD_ACI_ENABLED 1
15891 EOF
15892
15893 fi
15894
15895 if test "$ol_link_modules" != no ; then
15896         cat >> confdefs.h <<\EOF
15897 #define SLAPD_MODULES 1
15898 EOF
15899
15900         BUILD_SLAPD=yes
15901         SLAPD_MODULES_LDFLAGS="-dlopen self"
15902 fi
15903
15904 if test "$ol_link_bdb2" != no ; then
15905         cat >> confdefs.h <<\EOF
15906 #define SLAPD_BDB2 1
15907 EOF
15908
15909         BUILD_SLAPD=yes
15910         BUILD_BDB2=yes
15911         if test "$ol_with_bdb2_module" != static ; then
15912                 cat >> confdefs.h <<\EOF
15913 #define SLAPD_BDB2_DYNAMIC 1
15914 EOF
15915
15916                 BUILD_BDB2=mod
15917                 BUILD_BDB2_DYNAMIC=shared
15918                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15919         fi
15920 fi
15921
15922 if test "$ol_enable_dnssrv" != no ; then
15923         cat >> confdefs.h <<\EOF
15924 #define SLAPD_DNSSRV 1
15925 EOF
15926
15927         BUILD_SLAPD=yes
15928         BUILD_DNSSRV=yes
15929         if test "$ol_with_dnssrv_module" != static ; then
15930                 cat >> confdefs.h <<\EOF
15931 #define SLAPD_DNSSRV_DYNAMIC 1
15932 EOF
15933
15934                 BUILD_DNSSRV=mod
15935                 BUILD_DNSSRV_DYNAMIC=shared
15936                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15937         fi
15938 fi
15939
15940 if test "$ol_enable_ldap" != no ; then
15941         cat >> confdefs.h <<\EOF
15942 #define SLAPD_LDAP 1
15943 EOF
15944
15945         BUILD_SLAPD=yes
15946         BUILD_LDAP=yes
15947         if test "$ol_with_ldap_module" != static ; then
15948                 cat >> confdefs.h <<\EOF
15949 #define SLAPD_LDAP_DYNAMIC 1
15950 EOF
15951
15952                 BUILD_LDAP=mod
15953                 BUILD_LDAP_DYNAMIC=shared
15954                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15955         fi
15956 fi
15957
15958 if test "$ol_link_ldbm" != no ; then
15959         cat >> confdefs.h <<\EOF
15960 #define SLAPD_LDBM 1
15961 EOF
15962
15963         BUILD_SLAPD=yes
15964         BUILD_LDBM=yes
15965         if test "$ol_with_ldbm_module" != static ; then
15966                 cat >> confdefs.h <<\EOF
15967 #define SLAPD_LDBM_DYNAMIC 1
15968 EOF
15969
15970                 BUILD_LDBM=mod
15971                 BUILD_LDBM_DYNAMIC=shared
15972                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15973         fi
15974 fi
15975
15976 if test "$ol_enable_passwd" != no ; then
15977         cat >> confdefs.h <<\EOF
15978 #define SLAPD_PASSWD 1
15979 EOF
15980
15981         BUILD_SLAPD=yes
15982         BUILD_PASSWD=yes
15983         if test "$ol_with_passwd_module" != static ; then
15984                 cat >> confdefs.h <<\EOF
15985 #define SLAPD_PASSWD_DYNAMIC 1
15986 EOF
15987
15988                 BUILD_PASSWD=mod
15989                 BUILD_PASSWD_DYNAMIC=shared
15990                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15991         fi
15992 fi
15993
15994 if test "$ol_link_perl" != no ; then
15995         cat >> confdefs.h <<\EOF
15996 #define SLAPD_PERL 1
15997 EOF
15998
15999         BUILD_SLAPD=yes
16000         BUILD_PERL=yes
16001         if test "$ol_with_perl_module" != static ; then
16002                 cat >> confdefs.h <<\EOF
16003 #define SLAPD_PERL_DYNAMIC 1
16004 EOF
16005
16006                 BUILD_PERL=mod
16007                 BUILD_PERL_DYNAMIC=shared
16008                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16009         fi
16010 fi
16011
16012 if test "$ol_enable_shell" != no ; then
16013         cat >> confdefs.h <<\EOF
16014 #define SLAPD_SHELL 1
16015 EOF
16016
16017         BUILD_SLAPD=yes
16018         BUILD_SHELL=yes
16019         if test "$ol_with_shell_module" != static ; then
16020                 cat >> confdefs.h <<\EOF
16021 #define SLAPD_SHELL_DYNAMIC 1
16022 EOF
16023
16024                 BUILD_SHELL=mod
16025                 BUILD_SHELL_DYNAMIC=shared
16026                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16027         fi
16028 fi
16029
16030 if test "$ol_enable_tcl" != no ; then
16031         cat >> confdefs.h <<\EOF
16032 #define SLAPD_TCL 1
16033 EOF
16034
16035         BUILD_SLAPD=yes
16036         BUILD_TCL=yes
16037         if test "$ol_with_tcl_module" != static; then
16038                 cat >> confdefs.h <<\EOF
16039 #define SLAPD_TCL_DYNAMIC 1
16040 EOF
16041
16042                 BUILD_TCL=mod
16043                 BUILD_TCL_DYNAMIC=shared
16044                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16045         fi
16046 fi
16047
16048 if test "$ol_enable_sql" != no ; then
16049         cat >> confdefs.h <<\EOF
16050 #define SLAPD_SQL 1
16051 EOF
16052
16053         BUILD_SLAPD=yes
16054         BUILD_SQL=yes
16055         SLAPD_SQL_LIBS=-liodbc
16056         if test "$ol_with_sql_module" != static; then
16057                 cat >> confdefs.h <<\EOF
16058 #define SLAPD_SQL_DYNAMIC 1
16059 EOF
16060
16061                 BUILD_SQL=mod
16062                 BUILD_SQL_DYNAMIC=shared
16063                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16064         fi
16065 fi
16066
16067 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16068         $BUILD_SLAPD = yes ; then
16069         BUILD_SLURPD=yes
16070 fi
16071
16072 if test "$ol_link_isode" != no ; then
16073         BUILD_LDAPD=yes
16074 fi
16075
16076
16077 if test "$LINK_BINS_DYNAMIC" = yes; then
16078     LIB_LINKAGE=DYN
16079     LT_LIB_LINKAGE=shared
16080 else
16081     LIB_LINKAGE=STAT
16082     LT_LIB_LINKAGE=static
16083 fi
16084
16085 if test "$ac_cv_mingw32" = yes ; then
16086     PLAT=NT
16087     DYN_EXT=dll
16088 else
16089     PLAT=UNIX
16090     DYN_EXT=so
16091 fi
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
16154
16155
16156
16157 trap '' 1 2 15
16158
16159 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16160
16161 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16162 # Let make expand exec_prefix.
16163 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16164
16165 # Any assignment to VPATH causes Sun make to only execute
16166 # the first set of double-colon rules, so remove it if not needed.
16167 # If there is a colon in the path, we need to keep it.
16168 if test "x$srcdir" = x.; then
16169   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16170 fi
16171
16172 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16173
16174 DEFS=-DHAVE_CONFIG_H
16175
16176 # Without the "./", some shells look in PATH for config.status.
16177 : ${CONFIG_STATUS=./config.status}
16178
16179 echo creating $CONFIG_STATUS
16180 rm -f $CONFIG_STATUS
16181 cat > $CONFIG_STATUS <<EOF
16182 #! /bin/sh
16183 # Generated automatically by configure.
16184 # Run this file to recreate the current configuration.
16185 # This directory was configured as follows,
16186 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16187 #
16188 # $0 $ac_configure_args
16189 #
16190 # Compiler output produced by configure, useful for debugging
16191 # configure, is in ./config.log if it exists.
16192
16193 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16194 for ac_option
16195 do
16196   case "\$ac_option" in
16197   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16198     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16199     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16200   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16201     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16202     exit 0 ;;
16203   -help | --help | --hel | --he | --h)
16204     echo "\$ac_cs_usage"; exit 0 ;;
16205   *) echo "\$ac_cs_usage"; exit 1 ;;
16206   esac
16207 done
16208
16209 ac_given_srcdir=$srcdir
16210 ac_given_INSTALL="$INSTALL"
16211
16212 trap 'rm -fr `echo "\
16213 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16214 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16215 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16216 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16217 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16218 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16219 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16220 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16221 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16222 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16223 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16224 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16225 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16226 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16227 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16228 include/Makefile:build/top.mk:include/Makefile.in \
16229 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16230 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16231 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16232 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16233 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16234 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16235 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16236 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16237 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16238 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16239 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
16240 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16241 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16242 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16243 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16244 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16245 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16246 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16247 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16248 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16249 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16250 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16251 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16252 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16253 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16254 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16255 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16256 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16257 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16258  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16259 EOF
16260 cat >> $CONFIG_STATUS <<EOF
16261
16262 # Protect against being on the right side of a sed subst in config.status.
16263 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16264  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16265 $ac_vpsub
16266 $extrasub
16267 s%@SHELL@%$SHELL%g
16268 s%@CFLAGS@%$CFLAGS%g
16269 s%@CPPFLAGS@%$CPPFLAGS%g
16270 s%@CXXFLAGS@%$CXXFLAGS%g
16271 s%@FFLAGS@%$FFLAGS%g
16272 s%@DEFS@%$DEFS%g
16273 s%@LDFLAGS@%$LDFLAGS%g
16274 s%@LIBS@%$LIBS%g
16275 s%@exec_prefix@%$exec_prefix%g
16276 s%@prefix@%$prefix%g
16277 s%@program_transform_name@%$program_transform_name%g
16278 s%@bindir@%$bindir%g
16279 s%@sbindir@%$sbindir%g
16280 s%@libexecdir@%$libexecdir%g
16281 s%@datadir@%$datadir%g
16282 s%@sysconfdir@%$sysconfdir%g
16283 s%@sharedstatedir@%$sharedstatedir%g
16284 s%@localstatedir@%$localstatedir%g
16285 s%@libdir@%$libdir%g
16286 s%@includedir@%$includedir%g
16287 s%@oldincludedir@%$oldincludedir%g
16288 s%@infodir@%$infodir%g
16289 s%@mandir@%$mandir%g
16290 s%@host@%$host%g
16291 s%@host_alias@%$host_alias%g
16292 s%@host_cpu@%$host_cpu%g
16293 s%@host_vendor@%$host_vendor%g
16294 s%@host_os@%$host_os%g
16295 s%@target@%$target%g
16296 s%@target_alias@%$target_alias%g
16297 s%@target_cpu@%$target_cpu%g
16298 s%@target_vendor@%$target_vendor%g
16299 s%@target_os@%$target_os%g
16300 s%@build@%$build%g
16301 s%@build_alias@%$build_alias%g
16302 s%@build_cpu@%$build_cpu%g
16303 s%@build_vendor@%$build_vendor%g
16304 s%@build_os@%$build_os%g
16305 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16306 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16307 s%@INSTALL_DATA@%$INSTALL_DATA%g
16308 s%@PACKAGE@%$PACKAGE%g
16309 s%@VERSION@%$VERSION%g
16310 s%@ACLOCAL@%$ACLOCAL%g
16311 s%@AUTOCONF@%$AUTOCONF%g
16312 s%@AUTOMAKE@%$AUTOMAKE%g
16313 s%@AUTOHEADER@%$AUTOHEADER%g
16314 s%@MAKEINFO@%$MAKEINFO%g
16315 s%@install_sh@%$install_sh%g
16316 s%@AMTAR@%$AMTAR%g
16317 s%@AWK@%$AWK%g
16318 s%@AMTARFLAGS@%$AMTARFLAGS%g
16319 s%@SET_MAKE@%$SET_MAKE%g
16320 s%@top_builddir@%$top_builddir%g
16321 s%@ldap_subdir@%$ldap_subdir%g
16322 s%@CC@%$CC%g
16323 s%@RANLIB@%$RANLIB%g
16324 s%@LN_S@%$LN_S%g
16325 s%@DLLTOOL@%$DLLTOOL%g
16326 s%@AS@%$AS%g
16327 s%@OBJDUMP@%$OBJDUMP%g
16328 s%@LIBTOOL@%$LIBTOOL%g
16329 s%@LN_H@%$LN_H%g
16330 s%@SENDMAIL@%$SENDMAIL%g
16331 s%@EDITOR@%$EDITOR%g
16332 s%@FINGER@%$FINGER%g
16333 s%@PERLBIN@%$PERLBIN%g
16334 s%@CPP@%$CPP%g
16335 s%@EXEEXT@%$EXEEXT%g
16336 s%@OBJEXT@%$OBJEXT%g
16337 s%@OL_MKDEP@%$OL_MKDEP%g
16338 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16339 s%@PEPSY@%$PEPSY%g
16340 s%@LIBOBJS@%$LIBOBJS%g
16341 s%@LIBSRCS@%$LIBSRCS%g
16342 s%@PLAT@%$PLAT%g
16343 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16344 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16345 s%@DYN_EXT@%$DYN_EXT%g
16346 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
16347 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16348 s%@BUILD_BDB2@%$BUILD_BDB2%g
16349 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16350 s%@BUILD_LDAP@%$BUILD_LDAP%g
16351 s%@BUILD_LDBM@%$BUILD_LDBM%g
16352 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16353 s%@BUILD_PERL@%$BUILD_PERL%g
16354 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16355 s%@BUILD_SHELL@%$BUILD_SHELL%g
16356 s%@BUILD_SQL@%$BUILD_SQL%g
16357 s%@BUILD_TCL@%$BUILD_TCL%g
16358 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
16359 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16360 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16361 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16362 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16363 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16364 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16365 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16366 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16367 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16368 s%@LDAP_LIBS@%$LDAP_LIBS%g
16369 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
16370 s%@LDIF_LIBS@%$LDIF_LIBS%g
16371 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16372 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16373 s%@LDBM_LIBS@%$LDBM_LIBS%g
16374 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16375 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16376 s%@WRAP_LIBS@%$WRAP_LIBS%g
16377 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16378 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16379 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16380 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16381 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16382 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16383 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16384 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16385 s%@KRB4_LIBS@%$KRB4_LIBS%g
16386 s%@KRB5_LIBS@%$KRB5_LIBS%g
16387 s%@READLINE_LIBS@%$READLINE_LIBS%g
16388 s%@SASL_LIBS@%$SASL_LIBS%g
16389 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16390 s%@TLS_LIBS@%$TLS_LIBS%g
16391 s%@MODULES_LIBS@%$MODULES_LIBS%g
16392 s%@AUTH_LIBS@%$AUTH_LIBS%g
16393 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16394 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16395 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16396
16397 CEOF
16398 EOF
16399
16400 cat >> $CONFIG_STATUS <<\EOF
16401
16402 # Split the substitutions into bite-sized pieces for seds with
16403 # small command number limits, like on Digital OSF/1 and HP-UX.
16404 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16405 ac_file=1 # Number of current file.
16406 ac_beg=1 # First line for current file.
16407 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16408 ac_more_lines=:
16409 ac_sed_cmds=""
16410 while $ac_more_lines; do
16411   if test $ac_beg -gt 1; then
16412     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16413   else
16414     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16415   fi
16416   if test ! -s conftest.s$ac_file; then
16417     ac_more_lines=false
16418     rm -f conftest.s$ac_file
16419   else
16420     if test -z "$ac_sed_cmds"; then
16421       ac_sed_cmds="sed -f conftest.s$ac_file"
16422     else
16423       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16424     fi
16425     ac_file=`expr $ac_file + 1`
16426     ac_beg=$ac_end
16427     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16428   fi
16429 done
16430 if test -z "$ac_sed_cmds"; then
16431   ac_sed_cmds=cat
16432 fi
16433 EOF
16434
16435 cat >> $CONFIG_STATUS <<EOF
16436
16437 CONFIG_FILES=\${CONFIG_FILES-"\
16438 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16439 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16440 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16441 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16442 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16443 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16444 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16445 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16446 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16447 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16448 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16449 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16450 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16451 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16452 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16453 include/Makefile:build/top.mk:include/Makefile.in \
16454 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16455 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16456 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16457 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16458 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16459 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16460 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16461 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16462 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16463 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16464 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
16465 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16466 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16467 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16468 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16469 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16470 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16471 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16472 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16473 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16474 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16475 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16476 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16477 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16478 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16479 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16480 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16481 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16482 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16483 "}
16484 EOF
16485 cat >> $CONFIG_STATUS <<\EOF
16486 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16487   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16488   case "$ac_file" in
16489   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16490        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16491   *) ac_file_in="${ac_file}.in" ;;
16492   esac
16493
16494   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16495
16496   # Remove last slash and all that follows it.  Not all systems have dirname.
16497   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16498   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16499     # The file is in a subdirectory.
16500     test ! -d "$ac_dir" && mkdir "$ac_dir"
16501     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16502     # A "../" for each directory in $ac_dir_suffix.
16503     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16504   else
16505     ac_dir_suffix= ac_dots=
16506   fi
16507
16508   case "$ac_given_srcdir" in
16509   .)  srcdir=.
16510       if test -z "$ac_dots"; then top_srcdir=.
16511       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16512   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16513   *) # Relative path.
16514     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16515     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16516   esac
16517
16518   case "$ac_given_INSTALL" in
16519   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16520   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16521   esac
16522
16523   echo creating "$ac_file"
16524   rm -f "$ac_file"
16525   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16526   case "$ac_file" in
16527   *[Mm]akefile*) ac_comsub="1i\\
16528 # $configure_input" ;;
16529   *) ac_comsub= ;;
16530   esac
16531
16532   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16533   sed -e "$ac_comsub
16534 s%@configure_input@%$configure_input%g
16535 s%@srcdir@%$srcdir%g
16536 s%@top_srcdir@%$top_srcdir%g
16537 s%@INSTALL@%$INSTALL%g
16538 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16539 fi; done
16540 rm -f conftest.s*
16541
16542 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16543 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16544 #
16545 # ac_d sets the value in "#define NAME VALUE" lines.
16546 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16547 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16548 ac_dC='\3'
16549 ac_dD='%g'
16550 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16551 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16552 ac_uB='\([      ]\)%\1#\2define\3'
16553 ac_uC=' '
16554 ac_uD='\4%g'
16555 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16556 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16557 ac_eB='$%\1#\2define\3'
16558 ac_eC=' '
16559 ac_eD='%g'
16560
16561 if test "${CONFIG_HEADERS+set}" != set; then
16562 EOF
16563 cat >> $CONFIG_STATUS <<EOF
16564   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16565 EOF
16566 cat >> $CONFIG_STATUS <<\EOF
16567 fi
16568 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16569   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16570   case "$ac_file" in
16571   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16572        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16573   *) ac_file_in="${ac_file}.in" ;;
16574   esac
16575
16576   echo creating $ac_file
16577
16578   rm -f conftest.frag conftest.in conftest.out
16579   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16580   cat $ac_file_inputs > conftest.in
16581
16582 EOF
16583
16584 # Transform confdefs.h into a sed script conftest.vals that substitutes
16585 # the proper values into config.h.in to produce config.h.  And first:
16586 # Protect against being on the right side of a sed subst in config.status.
16587 # Protect against being in an unquoted here document in config.status.
16588 rm -f conftest.vals
16589 cat > conftest.hdr <<\EOF
16590 s/[\\&%]/\\&/g
16591 s%[\\$`]%\\&%g
16592 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16593 s%ac_d%ac_u%gp
16594 s%ac_u%ac_e%gp
16595 EOF
16596 sed -n -f conftest.hdr confdefs.h > conftest.vals
16597 rm -f conftest.hdr
16598
16599 # This sed command replaces #undef with comments.  This is necessary, for
16600 # example, in the case of _POSIX_SOURCE, which is predefined and required
16601 # on some systems where configure will not decide to define it.
16602 cat >> conftest.vals <<\EOF
16603 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16604 EOF
16605
16606 # Break up conftest.vals because some shells have a limit on
16607 # the size of here documents, and old seds have small limits too.
16608
16609 rm -f conftest.tail
16610 while :
16611 do
16612   ac_lines=`grep -c . conftest.vals`
16613   # grep -c gives empty output for an empty file on some AIX systems.
16614   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16615   # Write a limited-size here document to conftest.frag.
16616   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16617   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16618   echo 'CEOF
16619   sed -f conftest.frag conftest.in > conftest.out
16620   rm -f conftest.in
16621   mv conftest.out conftest.in
16622 ' >> $CONFIG_STATUS
16623   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16624   rm -f conftest.vals
16625   mv conftest.tail conftest.vals
16626 done
16627 rm -f conftest.vals
16628
16629 cat >> $CONFIG_STATUS <<\EOF
16630   rm -f conftest.frag conftest.h
16631   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16632   cat conftest.in >> conftest.h
16633   rm -f conftest.in
16634   if cmp -s $ac_file conftest.h 2>/dev/null; then
16635     echo "$ac_file is unchanged"
16636     rm -f conftest.h
16637   else
16638     # Remove last slash and all that follows it.  Not all systems have dirname.
16639       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16640       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16641       # The file is in a subdirectory.
16642       test ! -d "$ac_dir" && mkdir "$ac_dir"
16643     fi
16644     rm -f $ac_file
16645     mv conftest.h $ac_file
16646   fi
16647 fi; done
16648
16649 EOF
16650 cat >> $CONFIG_STATUS <<EOF
16651
16652 EOF
16653 cat >> $CONFIG_STATUS <<\EOF
16654
16655 date > stamp-h
16656 echo Please \"make depend\" to build dependencies
16657
16658 exit 0
16659 EOF
16660 chmod +x $CONFIG_STATUS
16661 rm -fr confdefs* $ac_clean_files
16662 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16663