]> git.sur5r.net Git - openldap/blob - configure
move --enable-dns (LDAP_API_FEATURE_X_OPENLDAP_V2_DNS) to Attic
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.305 2000/06/01 21:00:24 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals    enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind        enable V2 Kerberos IV bind (auto)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-ldapi        enable domain socket (PF_LOCAL) ldap (no)"
45 ac_help="$ac_help
46   --enable-x-compile    enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl     with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch          with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos       with support (auto)"
53 ac_help="$ac_help
54   --with-readline       with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads        use threads (auto)"
57 ac_help="$ac_help
58   --with-tls            with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select        with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd        enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-cleartext  enable cleartext passwords (yes)"
67 ac_help="$ac_help
68     --enable-crypt      enable crypt(3) passwords (auto)"
69 ac_help="$ac_help
70     --enable-kpasswd    enable kerberos password verification (no)"
71 ac_help="$ac_help
72     --enable-spasswd    enable (Cyrus) SASL password verification (no)"
73 ac_help="$ac_help
74     --enable-modules    enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster        enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic   enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-quipu      build quipu migration tools (no)"
81 ac_help="$ac_help
82     --enable-rlookups   enable reverse lookups (auto)"
83 ac_help="$ac_help
84     --enable-aci        enable per-object ACIs (no)"
85 ac_help="$ac_help
86     --enable-wrappers   enable tcp wrapper support (no)"
87 ac_help="$ac_help
88     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
89 ac_help="$ac_help
90     --enable-bdb2       enable bdb2 backend (no)"
91 ac_help="$ac_help
92       --with-bdb2-module        module type (static)"
93 ac_help="$ac_help
94     --enable-dnssrv     enable bdb2 backend (no)"
95 ac_help="$ac_help
96       --with-dnssrv-module      module type (static)"
97 ac_help="$ac_help
98     --enable-ldap       enable ldap backend (no)"
99 ac_help="$ac_help
100       --with-ldap-module        module type (static)"
101 ac_help="$ac_help
102     --enable-ldbm       enable ldbm backend (yes)"
103 ac_help="$ac_help
104       --with-ldbm-api   use LDBM API (auto)"
105 ac_help="$ac_help
106       --with-ldbm-module        module type (static)"
107 ac_help="$ac_help
108       --with-ldbm-type  use LDBM type (auto)"
109 ac_help="$ac_help
110     --enable-passwd     enable passwd backend (no)"
111 ac_help="$ac_help
112       --with-passwd-module      module type (static)"
113 ac_help="$ac_help
114     --enable-perl       enable perl backend (no)"
115 ac_help="$ac_help
116       --with-perl-module        module type (static)"
117 ac_help="$ac_help
118     --enable-shell      enable shell backend (no)"
119 ac_help="$ac_help
120       --with-shell-module       module type (static)"
121 ac_help="$ac_help
122     --enable-sql        enable sql backend (no)"
123 ac_help="$ac_help
124       --with-sql-module module type (static)"
125 ac_help="$ac_help
126     --enable-tcl        enable tcl backend (no)"
127 ac_help="$ac_help
128       --with-tcl-module module type (static)"
129 ac_help="$ac_help
130 SLURPD (Replication Daemon) Options:"
131 ac_help="$ac_help
132   --enable-slurpd       enable building slurpd (auto)"
133 ac_help="$ac_help
134 Library Generation & Linking Options"
135 ac_help="$ac_help
136   --enable-static[=PKGS]  build static libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-shared[=PKGS]  build shared libraries [default=yes]"
139 ac_help="$ac_help
140   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
141 ac_help="$ac_help
142   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
143 ac_help="$ac_help
144   --disable-libtool-lock  avoid locking (might break parallel builds)"
145
146 # Initialize some variables set by options.
147 # The variables have the same names as the options, with
148 # dashes changed to underlines.
149 build=NONE
150 cache_file=./config.cache
151 exec_prefix=NONE
152 host=NONE
153 no_create=
154 nonopt=NONE
155 no_recursion=
156 prefix=NONE
157 program_prefix=NONE
158 program_suffix=NONE
159 program_transform_name=s,x,x,
160 silent=
161 site=
162 srcdir=
163 target=NONE
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167 bindir='${exec_prefix}/bin'
168 sbindir='${exec_prefix}/sbin'
169 libexecdir='${exec_prefix}/libexec'
170 datadir='${prefix}/share'
171 sysconfdir='${prefix}/etc'
172 sharedstatedir='${prefix}/com'
173 localstatedir='${prefix}/var'
174 libdir='${exec_prefix}/lib'
175 includedir='${prefix}/include'
176 oldincludedir='/usr/include'
177 infodir='${prefix}/info'
178 mandir='${prefix}/man'
179
180 # Initialize some other variables.
181 subdirs=
182 MFLAGS= MAKEFLAGS=
183 SHELL=${CONFIG_SHELL-/bin/sh}
184 # Maximum number of lines to put in a shell here document.
185 ac_max_here_lines=12
186
187 ac_prev=
188 for ac_option
189 do
190
191   # If the previous option needs an argument, assign it.
192   if test -n "$ac_prev"; then
193     eval "$ac_prev=\$ac_option"
194     ac_prev=
195     continue
196   fi
197
198   case "$ac_option" in
199   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
200   *) ac_optarg= ;;
201   esac
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case "$ac_option" in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir="$ac_optarg" ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build="$ac_optarg" ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file="$ac_optarg" ;;
223
224   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
225     ac_prev=datadir ;;
226   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
227   | --da=*)
228     datadir="$ac_optarg" ;;
229
230   -disable-* | --disable-*)
231     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
232     # Reject names that are not valid shell variable names.
233     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
234       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
235     fi
236     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
237     eval "enable_${ac_feature}=no" ;;
238
239   -enable-* | --enable-*)
240     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
241     # Reject names that are not valid shell variable names.
242     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
243       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
244     fi
245     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
246     case "$ac_option" in
247       *=*) ;;
248       *) ac_optarg=yes ;;
249     esac
250     eval "enable_${ac_feature}='$ac_optarg'" ;;
251
252   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
253   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
254   | --exec | --exe | --ex)
255     ac_prev=exec_prefix ;;
256   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
257   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
258   | --exec=* | --exe=* | --ex=*)
259     exec_prefix="$ac_optarg" ;;
260
261   -gas | --gas | --ga | --g)
262     # Obsolete; use --with-gas.
263     with_gas=yes ;;
264
265   -help | --help | --hel | --he)
266     # Omit some internal or obsolete options to make the list less imposing.
267     # This message is too long to be a string in the A/UX 3.1 sh.
268     cat << EOF
269 Usage: configure [options] [host]
270 Options: [defaults in brackets after descriptions]
271 Configuration:
272   --cache-file=FILE       cache test results in FILE
273   --help                  print this message
274   --no-create             do not create output files
275   --quiet, --silent       do not print \`checking...' messages
276   --version               print the version of autoconf that created configure
277 Directory and file names:
278   --prefix=PREFIX         install architecture-independent files in PREFIX
279                           [$ac_default_prefix]
280   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
281                           [same as prefix]
282   --bindir=DIR            user executables in DIR [EPREFIX/bin]
283   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
284   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
285   --datadir=DIR           read-only architecture-independent data in DIR
286                           [PREFIX/share]
287   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
288   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
289                           [PREFIX/com]
290   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
291   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
292   --includedir=DIR        C header files in DIR [PREFIX/include]
293   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
294   --infodir=DIR           info documentation in DIR [PREFIX/info]
295   --mandir=DIR            man documentation in DIR [PREFIX/man]
296   --srcdir=DIR            find the sources in DIR [configure dir or ..]
297   --program-prefix=PREFIX prepend PREFIX to installed program names
298   --program-suffix=SUFFIX append SUFFIX to installed program names
299   --program-transform-name=PROGRAM
300                           run sed PROGRAM on installed program names
301 EOF
302     cat << EOF
303 Host type:
304   --build=BUILD           configure for building on BUILD [BUILD=HOST]
305   --host=HOST             configure for HOST [guessed]
306   --target=TARGET         configure for TARGET [TARGET=HOST]
307 Features and packages:
308   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
309   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
310   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
311   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
312   --x-includes=DIR        X include files are in DIR
313   --x-libraries=DIR       X library files are in DIR
314 EOF
315     if test -n "$ac_help"; then
316       echo "--enable and --with options recognized:$ac_help"
317     fi
318     exit 0 ;;
319
320   -host | --host | --hos | --ho)
321     ac_prev=host ;;
322   -host=* | --host=* | --hos=* | --ho=*)
323     host="$ac_optarg" ;;
324
325   -includedir | --includedir | --includedi | --included | --include \
326   | --includ | --inclu | --incl | --inc)
327     ac_prev=includedir ;;
328   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
329   | --includ=* | --inclu=* | --incl=* | --inc=*)
330     includedir="$ac_optarg" ;;
331
332   -infodir | --infodir | --infodi | --infod | --info | --inf)
333     ac_prev=infodir ;;
334   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
335     infodir="$ac_optarg" ;;
336
337   -libdir | --libdir | --libdi | --libd)
338     ac_prev=libdir ;;
339   -libdir=* | --libdir=* | --libdi=* | --libd=*)
340     libdir="$ac_optarg" ;;
341
342   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
343   | --libexe | --libex | --libe)
344     ac_prev=libexecdir ;;
345   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
346   | --libexe=* | --libex=* | --libe=*)
347     libexecdir="$ac_optarg" ;;
348
349   -localstatedir | --localstatedir | --localstatedi | --localstated \
350   | --localstate | --localstat | --localsta | --localst \
351   | --locals | --local | --loca | --loc | --lo)
352     ac_prev=localstatedir ;;
353   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
354   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
355   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
356     localstatedir="$ac_optarg" ;;
357
358   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
359     ac_prev=mandir ;;
360   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
361     mandir="$ac_optarg" ;;
362
363   -nfp | --nfp | --nf)
364     # Obsolete; use --without-fp.
365     with_fp=no ;;
366
367   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
368   | --no-cr | --no-c)
369     no_create=yes ;;
370
371   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
372   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
373     no_recursion=yes ;;
374
375   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
376   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
377   | --oldin | --oldi | --old | --ol | --o)
378     ac_prev=oldincludedir ;;
379   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
380   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
381   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
382     oldincludedir="$ac_optarg" ;;
383
384   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
385     ac_prev=prefix ;;
386   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
387     prefix="$ac_optarg" ;;
388
389   -program-prefix | --program-prefix | --program-prefi | --program-pref \
390   | --program-pre | --program-pr | --program-p)
391     ac_prev=program_prefix ;;
392   -program-prefix=* | --program-prefix=* | --program-prefi=* \
393   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
394     program_prefix="$ac_optarg" ;;
395
396   -program-suffix | --program-suffix | --program-suffi | --program-suff \
397   | --program-suf | --program-su | --program-s)
398     ac_prev=program_suffix ;;
399   -program-suffix=* | --program-suffix=* | --program-suffi=* \
400   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
401     program_suffix="$ac_optarg" ;;
402
403   -program-transform-name | --program-transform-name \
404   | --program-transform-nam | --program-transform-na \
405   | --program-transform-n | --program-transform- \
406   | --program-transform | --program-transfor \
407   | --program-transfo | --program-transf \
408   | --program-trans | --program-tran \
409   | --progr-tra | --program-tr | --program-t)
410     ac_prev=program_transform_name ;;
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     program_transform_name="$ac_optarg" ;;
419
420   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
421   | -silent | --silent | --silen | --sile | --sil)
422     silent=yes ;;
423
424   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
425     ac_prev=sbindir ;;
426   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
427   | --sbi=* | --sb=*)
428     sbindir="$ac_optarg" ;;
429
430   -sharedstatedir | --sharedstatedir | --sharedstatedi \
431   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
432   | --sharedst | --shareds | --shared | --share | --shar \
433   | --sha | --sh)
434     ac_prev=sharedstatedir ;;
435   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
436   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
437   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
438   | --sha=* | --sh=*)
439     sharedstatedir="$ac_optarg" ;;
440
441   -site | --site | --sit)
442     ac_prev=site ;;
443   -site=* | --site=* | --sit=*)
444     site="$ac_optarg" ;;
445
446   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
447     ac_prev=srcdir ;;
448   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
449     srcdir="$ac_optarg" ;;
450
451   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
452   | --syscon | --sysco | --sysc | --sys | --sy)
453     ac_prev=sysconfdir ;;
454   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
455   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
456     sysconfdir="$ac_optarg" ;;
457
458   -target | --target | --targe | --targ | --tar | --ta | --t)
459     ac_prev=target ;;
460   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
461     target="$ac_optarg" ;;
462
463   -v | -verbose | --verbose | --verbos | --verbo | --verb)
464     verbose=yes ;;
465
466   -version | --version | --versio | --versi | --vers)
467     echo "configure generated by autoconf version 2.13.1"
468     exit 0 ;;
469
470   -with-* | --with-*)
471     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
472     # Reject names that are not valid shell variable names.
473     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
474       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
475     fi
476     ac_package=`echo $ac_package| sed 's/-/_/g'`
477     case "$ac_option" in
478       *=*) ;;
479       *) ac_optarg=yes ;;
480     esac
481     eval "with_${ac_package}='$ac_optarg'" ;;
482
483   -without-* | --without-*)
484     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
485     # Reject names that are not valid shell variable names.
486     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
487       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
488     fi
489     ac_package=`echo $ac_package| sed 's/-/_/g'`
490     eval "with_${ac_package}=no" ;;
491
492   --x)
493     # Obsolete; use --with-x.
494     with_x=yes ;;
495
496   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
497   | --x-incl | --x-inc | --x-in | --x-i)
498     ac_prev=x_includes ;;
499   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
500   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
501     x_includes="$ac_optarg" ;;
502
503   -x-libraries | --x-libraries | --x-librarie | --x-librari \
504   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
505     ac_prev=x_libraries ;;
506   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
507   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
508     x_libraries="$ac_optarg" ;;
509
510   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
511     ;;
512
513   *)
514     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
515       echo "configure: warning: $ac_option: invalid host type" 1>&2
516     fi
517     if test "x$nonopt" != xNONE; then
518       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
519     fi
520     nonopt="$ac_option"
521     ;;
522
523   esac
524 done
525
526 if test -n "$ac_prev"; then
527   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
528 fi
529
530 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
531
532 # File descriptor usage:
533 # 0 standard input
534 # 1 file creation
535 # 2 errors and warnings
536 # 3 some systems may open it to /dev/tty
537 # 4 used on the Kubota Titan
538 # 6 checking for... messages and results
539 # 5 compiler messages saved in config.log
540 if test "$silent" = yes; then
541   exec 6>/dev/null
542 else
543   exec 6>&1
544 fi
545 exec 5>./config.log
546
547 echo "\
548 This file contains any messages produced by compilers while
549 running configure, to aid debugging if configure makes a mistake.
550 " 1>&5
551
552 # Strip out --no-create and --no-recursion so they do not pile up.
553 # Also quote any args containing shell metacharacters.
554 ac_configure_args=
555 for ac_arg
556 do
557   case "$ac_arg" in
558   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
559   | --no-cr | --no-c) ;;
560   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
561   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
562   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
563   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
564   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
565   esac
566 done
567
568 # NLS nuisances.
569 # Only set these to C if already set.  These must not be set unconditionally
570 # because not all systems understand e.g. LANG=C (notably SCO).
571 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
572 # Non-C LC_CTYPE values break the ctype check.
573 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
574 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
575 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
576 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
577
578 # confdefs.h avoids OS command line length limits that DEFS can exceed.
579 rm -rf conftest* confdefs.h
580 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
581 echo > confdefs.h
582
583 # A filename unique to this package, relative to the directory that
584 # configure is in, which we can look for to find out if srcdir is correct.
585 ac_unique_file=build/version
586
587 # Find the source files, if location was not specified.
588 if test -z "$srcdir"; then
589   ac_srcdir_defaulted=yes
590   # Try the directory containing this script, then its parent.
591   ac_prog=$0
592   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
593   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
594   srcdir=$ac_confdir
595   if test ! -r $srcdir/$ac_unique_file; then
596     srcdir=..
597   fi
598 else
599   ac_srcdir_defaulted=no
600 fi
601 if test ! -r $srcdir/$ac_unique_file; then
602   if test "$ac_srcdir_defaulted" = yes; then
603     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
604   else
605     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
606   fi
607 fi
608 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
609
610 # Prefer explicitly selected file to automatically selected ones.
611 if test -z "$CONFIG_SITE"; then
612   if test "x$prefix" != xNONE; then
613     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
614   else
615     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
616   fi
617 fi
618 for ac_site_file in $CONFIG_SITE; do
619   if test -r "$ac_site_file"; then
620     echo "loading site script $ac_site_file"
621     . "$ac_site_file"
622   fi
623 done
624
625
626 ac_ext=c
627 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
628 ac_cpp='$CPP $CPPFLAGS'
629 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
630 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
631 cross_compiling=$ac_cv_prog_cc_cross
632
633 ac_exeext=
634 ac_objext=o
635 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
636   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
637   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
638     ac_n= ac_c='
639 ' ac_t='        '
640   else
641     ac_n=-n ac_c= ac_t=
642   fi
643 else
644   ac_n= ac_c='\c' ac_t=
645 fi
646
647 ac_aux_dir=
648 for ac_dir in build $srcdir/build; do
649   if test -f $ac_dir/install-sh; then
650     ac_aux_dir=$ac_dir
651     ac_install_sh="$ac_aux_dir/install-sh -c"
652     break
653   elif test -f $ac_dir/install.sh; then
654     ac_aux_dir=$ac_dir
655     ac_install_sh="$ac_aux_dir/install.sh -c"
656     break
657   elif test -f $ac_dir/shtool; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/shtool install -c"
660     break
661   fi
662 done
663 if test -z "$ac_aux_dir"; then
664   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
665 fi
666 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
667 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
668 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
669
670 OL_VERSION=`cat $ac_aux_dir/version`
671 if test -z "$OL_VERSION"; then
672         { echo "configure: error: could not determine version" 1>&2; exit 1; }
673 fi
674
675 echo "Configuring OpenLDAP $OL_VERSION ..."
676
677
678 echo $ac_n "checking host system type""... $ac_c" 1>&6
679 echo "configure:680: checking host system type" >&5
680 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
681
682 # Make sure we can run config.sub.
683   if $ac_config_sub sun4 >/dev/null 2>&1; then :
684     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
685   fi
686
687   ac_cv_host_alias=$host
688   case "$ac_cv_host_alias" in
689   NONE)
690     case $nonopt in
691     NONE)
692       if ac_cv_host_alias=`$ac_config_guess`; then :
693       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
694       fi ;;
695     *) ac_cv_host_alias=$nonopt ;;
696     esac ;;
697   esac
698
699   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
700   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
701   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
702   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
703 else
704   echo $ac_n "(cached) $ac_c" 1>&6
705 fi
706
707 echo "$ac_t""$ac_cv_host" 1>&6
708
709 host=$ac_cv_host
710 host_alias=$ac_cv_host_alias
711 host_cpu=$ac_cv_host_cpu
712 host_vendor=$ac_cv_host_vendor
713 host_os=$ac_cv_host_os
714
715
716
717
718
719 echo $ac_n "checking target system type""... $ac_c" 1>&6
720 echo "configure:721: checking target system type" >&5
721 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
722
723 # Make sure we can run config.sub.
724   if $ac_config_sub sun4 >/dev/null 2>&1; then :
725     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
726   fi
727
728   ac_cv_target_alias=$target
729   case "$ac_cv_target_alias" in
730   NONE)
731     case $nonopt in
732     NONE)
733       ac_cv_target_alias=$host_alias ;;
734
735     *) ac_cv_target_alias=$nonopt ;;
736     esac ;;
737   esac
738
739   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
740   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
741   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
742   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
743 else
744   echo $ac_n "(cached) $ac_c" 1>&6
745 fi
746
747 echo "$ac_t""$ac_cv_target" 1>&6
748
749 target=$ac_cv_target
750 target_alias=$ac_cv_target_alias
751 target_cpu=$ac_cv_target_cpu
752 target_vendor=$ac_cv_target_vendor
753 target_os=$ac_cv_target_os
754
755
756
757
758
759 echo $ac_n "checking build system type""... $ac_c" 1>&6
760 echo "configure:761: checking build system type" >&5
761 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
762
763 # Make sure we can run config.sub.
764   if $ac_config_sub sun4 >/dev/null 2>&1; then :
765     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
766   fi
767
768   ac_cv_build_alias=$build
769   case "$ac_cv_build_alias" in
770   NONE)
771     case $nonopt in
772     NONE)
773       ac_cv_build_alias=$host_alias ;;
774
775     *) ac_cv_build_alias=$nonopt ;;
776     esac ;;
777   esac
778
779   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
780   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
781   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
782   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
783 else
784   echo $ac_n "(cached) $ac_c" 1>&6
785 fi
786
787 echo "$ac_t""$ac_cv_build" 1>&6
788
789 build=$ac_cv_build
790 build_alias=$ac_cv_build_alias
791 build_cpu=$ac_cv_build_cpu
792 build_vendor=$ac_cv_build_vendor
793 build_os=$ac_cv_build_os
794
795
796
797
798
799 # Do some error checking and defaulting for the host and target type.
800 # The inputs are:
801 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
802 #
803 # The rules are:
804 # 1. You are not allowed to specify --host, --target, and nonopt at the
805 #    same time.
806 # 2. Host defaults to nonopt.
807 # 3. If nonopt is not specified, then host defaults to the current host,
808 #    as determined by config.guess.
809 # 4. Target and build default to nonopt.
810 # 5. If nonopt is not specified, then target and build default to host.
811
812 # The aliases save the names the user supplied, while $host etc.
813 # will get canonicalized.
814 case $host---$target---$nonopt in
815 NONE---*---* | *---NONE---* | *---*---NONE) ;;
816 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
817 esac
818
819 test "$host_alias" != "$target_alias" &&
820   test "$program_prefix$program_suffix$program_transform_name" = \
821     NONENONEs,x,x, &&
822   program_prefix=${target_alias}-
823
824
825 # Find a good install program.  We prefer a C program (faster),
826 # so one script is as good as another.  But avoid the broken or
827 # incompatible versions:
828 # SysV /etc/install, /usr/sbin/install
829 # SunOS /usr/etc/install
830 # IRIX /sbin/install
831 # AIX /bin/install
832 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
833 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
834 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
835 # ./install, which can be erroneously created by make from ./install.sh.
836 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
837 echo "configure:838: checking for a BSD compatible install" >&5
838 if test -z "$INSTALL"; then
839 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
840   echo $ac_n "(cached) $ac_c" 1>&6
841 else
842     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
843   for ac_dir in $PATH; do
844     # Account for people who put trailing slashes in PATH elements.
845     case "$ac_dir/" in
846     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
847     *)
848       # OSF1 and SCO ODT 3.0 have their own names for install.
849       # Don't use installbsd from OSF since it installs stuff as root
850       # by default.
851       for ac_prog in ginstall scoinst install; do
852         if test -f $ac_dir/$ac_prog; then
853           if test $ac_prog = install &&
854             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
855             # AIX install.  It has an incompatible calling convention.
856             :
857           elif test $ac_prog = install &&
858             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
859             # program-specific install script used by HP pwplus--don't use.
860             :
861           else
862             ac_cv_path_install="$ac_dir/$ac_prog -c"
863             break 2
864           fi
865         fi
866       done
867       ;;
868     esac
869   done
870   IFS="$ac_save_IFS"
871
872 fi
873   if test "${ac_cv_path_install+set}" = set; then
874     INSTALL="$ac_cv_path_install"
875   else
876     # As a last resort, use the slow shell script.  We don't cache a
877     # path for INSTALL within a source directory, because that will
878     # break other packages using the cache if that directory is
879     # removed, or if the path is relative.
880     INSTALL="$ac_install_sh"
881   fi
882 fi
883 echo "$ac_t""$INSTALL" 1>&6
884
885 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
886 # It thinks the first close brace ends the variable substitution.
887 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
888
889 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
890
891 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
892
893 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
894 echo "configure:895: checking whether build environment is sane" >&5
895 # Just in case
896 sleep 1
897 echo timestamp > conftestfile
898 # Do `set' in a subshell so we don't clobber the current shell's
899 # arguments.  Must try -L first in case configure is actually a
900 # symlink; some systems play weird games with the mod time of symlinks
901 # (eg FreeBSD returns the mod time of the symlink's containing
902 # directory).
903 if (
904    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
905    if test "$*" = "X"; then
906       # -L didn't work.
907       set X `ls -t $srcdir/configure conftestfile`
908    fi
909    if test "$*" != "X $srcdir/configure conftestfile" \
910       && test "$*" != "X conftestfile $srcdir/configure"; then
911
912       # If neither matched, then we have a broken ls.  This can happen
913       # if, for instance, CONFIG_SHELL is bash and it inherits a
914       # broken ls alias from the environment.  This has actually
915       # happened.  Such a system could not be considered "sane".
916       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
917 alias in your environment" 1>&2; exit 1; }
918    fi
919
920    test "$2" = conftestfile
921    )
922 then
923    # Ok.
924    :
925 else
926    { echo "configure: error: newly created file is older than distributed files!
927 Check your system clock" 1>&2; exit 1; }
928 fi
929 rm -f conftest*
930 echo "$ac_t""yes" 1>&6
931 if test "$program_transform_name" = s,x,x,; then
932   program_transform_name=
933 else
934   # Double any \ or $.  echo might interpret backslashes.
935   cat <<\EOF_SED > conftestsed
936 s,\\,\\\\,g; s,\$,$$,g
937 EOF_SED
938   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
939   rm -f conftestsed
940 fi
941 test "$program_prefix" != NONE &&
942   program_transform_name="s,^,${program_prefix},;$program_transform_name"
943 # Use a double $ so make ignores it.
944 test "$program_suffix" != NONE &&
945   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
946
947 # sed with no file args requires a program.
948 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
949
950 for ac_prog in mawk gawk nawk awk
951 do
952 # Extract the first word of "$ac_prog", so it can be a program name with args.
953 set dummy $ac_prog; ac_word=$2
954 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
955 echo "configure:956: checking for $ac_word" >&5
956 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
957   echo $ac_n "(cached) $ac_c" 1>&6
958 else
959   if test -n "$AWK"; then
960   ac_cv_prog_AWK="$AWK" # Let the user override the test.
961 else
962   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
963   ac_dummy="$PATH"
964   for ac_dir in $ac_dummy; do
965     test -z "$ac_dir" && ac_dir=.
966     if test -f $ac_dir/$ac_word; then
967       ac_cv_prog_AWK="$ac_prog"
968       break
969     fi
970   done
971   IFS="$ac_save_ifs"
972 fi
973 fi
974 AWK="$ac_cv_prog_AWK"
975 if test -n "$AWK"; then
976   echo "$ac_t""$AWK" 1>&6
977 else
978   echo "$ac_t""no" 1>&6
979 fi
980
981 test -n "$AWK" && break
982 done
983
984 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
985 echo "configure:986: checking whether ${MAKE-make} sets \${MAKE}" >&5
986 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
987 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
988   echo $ac_n "(cached) $ac_c" 1>&6
989 else
990   cat > conftestmake <<\EOF
991 all:
992         @echo 'ac_maketemp="${MAKE}"'
993 EOF
994 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
995 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
996 if test -n "$ac_maketemp"; then
997   eval ac_cv_prog_make_${ac_make}_set=yes
998 else
999   eval ac_cv_prog_make_${ac_make}_set=no
1000 fi
1001 rm -f conftestmake
1002 fi
1003 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1004   echo "$ac_t""yes" 1>&6
1005   SET_MAKE=
1006 else
1007   echo "$ac_t""no" 1>&6
1008   SET_MAKE="MAKE=${MAKE-make}"
1009 fi
1010
1011
1012
1013 PACKAGE=OpenLDAP
1014
1015 VERSION=$OL_VERSION
1016
1017 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1018   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1019 fi
1020
1021
1022
1023 missing_dir=`cd $ac_aux_dir && pwd`
1024 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1025 echo "configure:1026: checking for working aclocal" >&5
1026 # Run test in a subshell; some versions of sh will print an error if
1027 # an executable is not found, even if stderr is redirected.
1028 # Redirect stdin to placate older versions of autoconf.  Sigh.
1029 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1030    ACLOCAL=aclocal
1031    echo "$ac_t""found" 1>&6
1032 else
1033    ACLOCAL="$missing_dir/missing aclocal"
1034    echo "$ac_t""missing" 1>&6
1035 fi
1036
1037 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1038 echo "configure:1039: checking for working autoconf" >&5
1039 # Run test in a subshell; some versions of sh will print an error if
1040 # an executable is not found, even if stderr is redirected.
1041 # Redirect stdin to placate older versions of autoconf.  Sigh.
1042 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1043    AUTOCONF=autoconf
1044    echo "$ac_t""found" 1>&6
1045 else
1046    AUTOCONF="$missing_dir/missing autoconf"
1047    echo "$ac_t""missing" 1>&6
1048 fi
1049
1050 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1051 echo "configure:1052: checking for working automake" >&5
1052 # Run test in a subshell; some versions of sh will print an error if
1053 # an executable is not found, even if stderr is redirected.
1054 # Redirect stdin to placate older versions of autoconf.  Sigh.
1055 if (automake --version) < /dev/null > /dev/null 2>&1; then
1056    AUTOMAKE=automake
1057    echo "$ac_t""found" 1>&6
1058 else
1059    AUTOMAKE="$missing_dir/missing automake"
1060    echo "$ac_t""missing" 1>&6
1061 fi
1062
1063 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1064 echo "configure:1065: checking for working autoheader" >&5
1065 # Run test in a subshell; some versions of sh will print an error if
1066 # an executable is not found, even if stderr is redirected.
1067 # Redirect stdin to placate older versions of autoconf.  Sigh.
1068 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1069    AUTOHEADER=autoheader
1070    echo "$ac_t""found" 1>&6
1071 else
1072    AUTOHEADER="$missing_dir/missing autoheader"
1073    echo "$ac_t""missing" 1>&6
1074 fi
1075
1076 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1077 echo "configure:1078: checking for working makeinfo" >&5
1078 # Run test in a subshell; some versions of sh will print an error if
1079 # an executable is not found, even if stderr is redirected.
1080 # Redirect stdin to placate older versions of autoconf.  Sigh.
1081 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1082    MAKEINFO=makeinfo
1083    echo "$ac_t""found" 1>&6
1084 else
1085    MAKEINFO="$missing_dir/missing makeinfo"
1086    echo "$ac_t""missing" 1>&6
1087 fi
1088
1089 install_sh="$missing_dir/install-sh"
1090 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1091
1092 for ac_prog in gnutar gtar tar
1093 do
1094 # Extract the first word of "$ac_prog", so it can be a program name with args.
1095 set dummy $ac_prog; ac_word=$2
1096 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1097 echo "configure:1098: checking for $ac_word" >&5
1098 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1099   echo $ac_n "(cached) $ac_c" 1>&6
1100 else
1101   if test -n "$AMTAR"; then
1102   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1103 else
1104   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1105   ac_dummy="$PATH"
1106   for ac_dir in $ac_dummy; do
1107     test -z "$ac_dir" && ac_dir=.
1108     if test -f $ac_dir/$ac_word; then
1109       ac_cv_prog_AMTAR="$ac_prog"
1110       break
1111     fi
1112   done
1113   IFS="$ac_save_ifs"
1114 fi
1115 fi
1116 AMTAR="$ac_cv_prog_AMTAR"
1117 if test -n "$AMTAR"; then
1118   echo "$ac_t""$AMTAR" 1>&6
1119 else
1120   echo "$ac_t""no" 1>&6
1121 fi
1122
1123 test -n "$AMTAR" && break
1124 done
1125
1126
1127 AMTARFLAGS=
1128 if test -n "$AMTAR"; then
1129   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1130         AMTARFLAGS=o
1131   fi
1132 fi
1133
1134
1135
1136 cat >> confdefs.h <<EOF
1137 #define OPENLDAP_PACKAGE "$PACKAGE"
1138 EOF
1139
1140 cat >> confdefs.h <<EOF
1141 #define OPENLDAP_VERSION "$VERSION"
1142 EOF
1143
1144
1145
1146
1147 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1148 echo "configure:1149: checking configure arguments" >&5
1149
1150
1151 top_builddir=`pwd`
1152
1153 ldap_subdir="/openldap"
1154
1155 # Check whether --with-subdir or --without-subdir was given.
1156 if test "${with_subdir+set}" = set; then
1157   withval="$with_subdir"
1158   case "$withval" in
1159         no) ldap_subdir=""
1160                 ;;
1161         yes)
1162                 ;;
1163         /*|\\*)
1164                 ldap_subdir="$withval"
1165                 ;;
1166         *)
1167                 ldap_subdir="/$withval"
1168                 ;;
1169 esac
1170
1171 fi
1172
1173
1174 # OpenLDAP --enable-debug
1175         # Check whether --enable-debug or --disable-debug was given.
1176 if test "${enable_debug+set}" = set; then
1177   enableval="$enable_debug"
1178   
1179         ol_arg=invalid
1180         for ol_val in auto yes no ; do
1181                 if test "$enableval" = "$ol_val" ; then
1182                         ol_arg="$ol_val"
1183                 fi
1184         done
1185         if test "$ol_arg" = "invalid" ; then
1186                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1187         fi
1188         ol_enable_debug="$ol_arg"
1189
1190 else
1191         ol_enable_debug="yes"
1192 fi
1193 # end --enable-debug
1194 # OpenLDAP --enable-syslog
1195         # Check whether --enable-syslog or --disable-syslog was given.
1196 if test "${enable_syslog+set}" = set; then
1197   enableval="$enable_syslog"
1198   
1199         ol_arg=invalid
1200         for ol_val in auto yes no ; do
1201                 if test "$enableval" = "$ol_val" ; then
1202                         ol_arg="$ol_val"
1203                 fi
1204         done
1205         if test "$ol_arg" = "invalid" ; then
1206                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1207         fi
1208         ol_enable_syslog="$ol_arg"
1209
1210 else
1211         ol_enable_syslog="auto"
1212 fi
1213 # end --enable-syslog
1214 # OpenLDAP --enable-proctitle
1215         # Check whether --enable-proctitle or --disable-proctitle was given.
1216 if test "${enable_proctitle+set}" = set; then
1217   enableval="$enable_proctitle"
1218   
1219         ol_arg=invalid
1220         for ol_val in auto yes no ; do
1221                 if test "$enableval" = "$ol_val" ; then
1222                         ol_arg="$ol_val"
1223                 fi
1224         done
1225         if test "$ol_arg" = "invalid" ; then
1226                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1227         fi
1228         ol_enable_proctitle="$ol_arg"
1229
1230 else
1231         ol_enable_proctitle="yes"
1232 fi
1233 # end --enable-proctitle
1234 # OpenLDAP --enable-cache
1235         # Check whether --enable-cache or --disable-cache was given.
1236 if test "${enable_cache+set}" = set; then
1237   enableval="$enable_cache"
1238   
1239         ol_arg=invalid
1240         for ol_val in auto yes no ; do
1241                 if test "$enableval" = "$ol_val" ; then
1242                         ol_arg="$ol_val"
1243                 fi
1244         done
1245         if test "$ol_arg" = "invalid" ; then
1246                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1247         fi
1248         ol_enable_cache="$ol_arg"
1249
1250 else
1251         ol_enable_cache="yes"
1252 fi
1253 # end --enable-cache
1254 # OpenLDAP --enable-referrals
1255         # Check whether --enable-referrals or --disable-referrals was given.
1256 if test "${enable_referrals+set}" = set; then
1257   enableval="$enable_referrals"
1258   
1259         ol_arg=invalid
1260         for ol_val in auto yes no ; do
1261                 if test "$enableval" = "$ol_val" ; then
1262                         ol_arg="$ol_val"
1263                 fi
1264         done
1265         if test "$ol_arg" = "invalid" ; then
1266                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1267         fi
1268         ol_enable_referrals="$ol_arg"
1269
1270 else
1271         ol_enable_referrals="yes"
1272 fi
1273 # end --enable-referrals
1274 # OpenLDAP --enable-kbind
1275         # Check whether --enable-kbind or --disable-kbind was given.
1276 if test "${enable_kbind+set}" = set; then
1277   enableval="$enable_kbind"
1278   
1279         ol_arg=invalid
1280         for ol_val in auto yes no ; do
1281                 if test "$enableval" = "$ol_val" ; then
1282                         ol_arg="$ol_val"
1283                 fi
1284         done
1285         if test "$ol_arg" = "invalid" ; then
1286                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1287         fi
1288         ol_enable_kbind="$ol_arg"
1289
1290 else
1291         ol_enable_kbind="auto"
1292 fi
1293 # end --enable-kbind
1294 # OpenLDAP --enable-cldap
1295         # Check whether --enable-cldap or --disable-cldap was given.
1296 if test "${enable_cldap+set}" = set; then
1297   enableval="$enable_cldap"
1298   
1299         ol_arg=invalid
1300         for ol_val in auto yes no ; do
1301                 if test "$enableval" = "$ol_val" ; then
1302                         ol_arg="$ol_val"
1303                 fi
1304         done
1305         if test "$ol_arg" = "invalid" ; then
1306                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1307         fi
1308         ol_enable_cldap="$ol_arg"
1309
1310 else
1311         ol_enable_cldap="no"
1312 fi
1313 # end --enable-cldap
1314 # OpenLDAP --enable-ldapi
1315         # Check whether --enable-ldapi or --disable-ldapi was given.
1316 if test "${enable_ldapi+set}" = set; then
1317   enableval="$enable_ldapi"
1318   
1319         ol_arg=invalid
1320         for ol_val in auto yes no ; do
1321                 if test "$enableval" = "$ol_val" ; then
1322                         ol_arg="$ol_val"
1323                 fi
1324         done
1325         if test "$ol_arg" = "invalid" ; then
1326                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1327         fi
1328         ol_enable_ldapi="$ol_arg"
1329
1330 else
1331         ol_enable_ldapi="no"
1332 fi
1333 # end --enable-ldapi
1334 # OpenLDAP --enable-x_compile
1335         # Check whether --enable-x_compile or --disable-x_compile was given.
1336 if test "${enable_x_compile+set}" = set; then
1337   enableval="$enable_x_compile"
1338   
1339         ol_arg=invalid
1340         for ol_val in yes no ; do
1341                 if test "$enableval" = "$ol_val" ; then
1342                         ol_arg="$ol_val"
1343                 fi
1344         done
1345         if test "$ol_arg" = "invalid" ; then
1346                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1347         fi
1348         ol_enable_x_compile="$ol_arg"
1349
1350 else
1351         ol_enable_x_compile="no"
1352 fi
1353 # end --enable-x_compile
1354
1355
1356 # OpenLDAP --with-cyrus_sasl
1357         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1358 if test "${with_cyrus_sasl+set}" = set; then
1359   withval="$with_cyrus_sasl"
1360   
1361         ol_arg=invalid
1362         for ol_val in auto yes no  ; do
1363                 if test "$withval" = "$ol_val" ; then
1364                         ol_arg="$ol_val"
1365                 fi
1366         done
1367         if test "$ol_arg" = "invalid" ; then
1368                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1369         fi
1370         ol_with_cyrus_sasl="$ol_arg"
1371
1372 else
1373         ol_with_cyrus_sasl="auto"
1374 fi
1375 # end --with-cyrus_sasl
1376
1377 # OpenLDAP --with-fetch
1378         # Check whether --with-fetch or --without-fetch was given.
1379 if test "${with_fetch+set}" = set; then
1380   withval="$with_fetch"
1381   
1382         ol_arg=invalid
1383         for ol_val in auto yes no  ; do
1384                 if test "$withval" = "$ol_val" ; then
1385                         ol_arg="$ol_val"
1386                 fi
1387         done
1388         if test "$ol_arg" = "invalid" ; then
1389                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1390         fi
1391         ol_with_fetch="$ol_arg"
1392
1393 else
1394         ol_with_fetch="auto"
1395 fi
1396 # end --with-fetch
1397
1398 # OpenLDAP --with-kerberos
1399         # Check whether --with-kerberos or --without-kerberos was given.
1400 if test "${with_kerberos+set}" = set; then
1401   withval="$with_kerberos"
1402   
1403         ol_arg=invalid
1404         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1405                 if test "$withval" = "$ol_val" ; then
1406                         ol_arg="$ol_val"
1407                 fi
1408         done
1409         if test "$ol_arg" = "invalid" ; then
1410                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1411         fi
1412         ol_with_kerberos="$ol_arg"
1413
1414 else
1415         ol_with_kerberos="auto"
1416 fi
1417 # end --with-kerberos
1418
1419 # OpenLDAP --with-readline
1420         # Check whether --with-readline or --without-readline was given.
1421 if test "${with_readline+set}" = set; then
1422   withval="$with_readline"
1423   
1424         ol_arg=invalid
1425         for ol_val in auto yes no  ; do
1426                 if test "$withval" = "$ol_val" ; then
1427                         ol_arg="$ol_val"
1428                 fi
1429         done
1430         if test "$ol_arg" = "invalid" ; then
1431                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1432         fi
1433         ol_with_readline="$ol_arg"
1434
1435 else
1436         ol_with_readline="auto"
1437 fi
1438 # end --with-readline
1439
1440 # OpenLDAP --with-threads
1441         # Check whether --with-threads or --without-threads was given.
1442 if test "${with_threads+set}" = set; then
1443   withval="$with_threads"
1444   
1445         ol_arg=invalid
1446         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1447                 if test "$withval" = "$ol_val" ; then
1448                         ol_arg="$ol_val"
1449                 fi
1450         done
1451         if test "$ol_arg" = "invalid" ; then
1452                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1453         fi
1454         ol_with_threads="$ol_arg"
1455
1456 else
1457         ol_with_threads="auto"
1458 fi
1459 # end --with-threads
1460
1461 # OpenLDAP --with-tls
1462         # Check whether --with-tls or --without-tls was given.
1463 if test "${with_tls+set}" = set; then
1464   withval="$with_tls"
1465   
1466         ol_arg=invalid
1467         for ol_val in auto ssleay openssl yes no  ; do
1468                 if test "$withval" = "$ol_val" ; then
1469                         ol_arg="$ol_val"
1470                 fi
1471         done
1472         if test "$ol_arg" = "invalid" ; then
1473                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1474         fi
1475         ol_with_tls="$ol_arg"
1476
1477 else
1478         ol_with_tls="auto"
1479 fi
1480 # end --with-tls
1481
1482 # OpenLDAP --with-yielding_select
1483         # Check whether --with-yielding_select or --without-yielding_select was given.
1484 if test "${with_yielding_select+set}" = set; then
1485   withval="$with_yielding_select"
1486   
1487         ol_arg=invalid
1488         for ol_val in auto yes no manual  ; do
1489                 if test "$withval" = "$ol_val" ; then
1490                         ol_arg="$ol_val"
1491                 fi
1492         done
1493         if test "$ol_arg" = "invalid" ; then
1494                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1495         fi
1496         ol_with_yielding_select="$ol_arg"
1497
1498 else
1499         ol_with_yielding_select="auto"
1500 fi
1501 # end --with-yielding_select
1502
1503
1504
1505 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1506 if test "${with_xxslapdoptions+set}" = set; then
1507   withval="$with_xxslapdoptions"
1508   :
1509 fi
1510
1511 # OpenLDAP --enable-slapd
1512         # Check whether --enable-slapd or --disable-slapd was given.
1513 if test "${enable_slapd+set}" = set; then
1514   enableval="$enable_slapd"
1515   
1516         ol_arg=invalid
1517         for ol_val in auto yes no ; do
1518                 if test "$enableval" = "$ol_val" ; then
1519                         ol_arg="$ol_val"
1520                 fi
1521         done
1522         if test "$ol_arg" = "invalid" ; then
1523                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1524         fi
1525         ol_enable_slapd="$ol_arg"
1526
1527 else
1528         ol_enable_slapd="yes"
1529 fi
1530 # end --enable-slapd
1531 # OpenLDAP --enable-cleartext
1532         # Check whether --enable-cleartext or --disable-cleartext was given.
1533 if test "${enable_cleartext+set}" = set; then
1534   enableval="$enable_cleartext"
1535   
1536         ol_arg=invalid
1537         for ol_val in auto yes no ; do
1538                 if test "$enableval" = "$ol_val" ; then
1539                         ol_arg="$ol_val"
1540                 fi
1541         done
1542         if test "$ol_arg" = "invalid" ; then
1543                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1544         fi
1545         ol_enable_cleartext="$ol_arg"
1546
1547 else
1548         ol_enable_cleartext="yes"
1549 fi
1550 # end --enable-cleartext
1551 # OpenLDAP --enable-crypt
1552         # Check whether --enable-crypt or --disable-crypt was given.
1553 if test "${enable_crypt+set}" = set; then
1554   enableval="$enable_crypt"
1555   
1556         ol_arg=invalid
1557         for ol_val in auto yes no ; do
1558                 if test "$enableval" = "$ol_val" ; then
1559                         ol_arg="$ol_val"
1560                 fi
1561         done
1562         if test "$ol_arg" = "invalid" ; then
1563                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1564         fi
1565         ol_enable_crypt="$ol_arg"
1566
1567 else
1568         ol_enable_crypt="auto"
1569 fi
1570 # end --enable-crypt
1571 # OpenLDAP --enable-kpasswd
1572         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1573 if test "${enable_kpasswd+set}" = set; then
1574   enableval="$enable_kpasswd"
1575   
1576         ol_arg=invalid
1577         for ol_val in auto yes no ; do
1578                 if test "$enableval" = "$ol_val" ; then
1579                         ol_arg="$ol_val"
1580                 fi
1581         done
1582         if test "$ol_arg" = "invalid" ; then
1583                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1584         fi
1585         ol_enable_kpasswd="$ol_arg"
1586
1587 else
1588         ol_enable_kpasswd="no"
1589 fi
1590 # end --enable-kpasswd
1591 # OpenLDAP --enable-spasswd
1592         # Check whether --enable-spasswd or --disable-spasswd was given.
1593 if test "${enable_spasswd+set}" = set; then
1594   enableval="$enable_spasswd"
1595   
1596         ol_arg=invalid
1597         for ol_val in auto yes no ; do
1598                 if test "$enableval" = "$ol_val" ; then
1599                         ol_arg="$ol_val"
1600                 fi
1601         done
1602         if test "$ol_arg" = "invalid" ; then
1603                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1604         fi
1605         ol_enable_spasswd="$ol_arg"
1606
1607 else
1608         ol_enable_spasswd="no"
1609 fi
1610 # end --enable-spasswd
1611 # OpenLDAP --enable-modules
1612         # Check whether --enable-modules or --disable-modules was given.
1613 if test "${enable_modules+set}" = set; then
1614   enableval="$enable_modules"
1615   
1616         ol_arg=invalid
1617         for ol_val in auto yes no ; do
1618                 if test "$enableval" = "$ol_val" ; then
1619                         ol_arg="$ol_val"
1620                 fi
1621         done
1622         if test "$ol_arg" = "invalid" ; then
1623                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1624         fi
1625         ol_enable_modules="$ol_arg"
1626
1627 else
1628         ol_enable_modules="no"
1629 fi
1630 # end --enable-modules
1631 # OpenLDAP --enable-multimaster
1632         # Check whether --enable-multimaster or --disable-multimaster was given.
1633 if test "${enable_multimaster+set}" = set; then
1634   enableval="$enable_multimaster"
1635   
1636         ol_arg=invalid
1637         for ol_val in auto yes no ; do
1638                 if test "$enableval" = "$ol_val" ; then
1639                         ol_arg="$ol_val"
1640                 fi
1641         done
1642         if test "$ol_arg" = "invalid" ; then
1643                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1644         fi
1645         ol_enable_multimaster="$ol_arg"
1646
1647 else
1648         ol_enable_multimaster="no"
1649 fi
1650 # end --enable-multimaster
1651 # OpenLDAP --enable-phonetic
1652         # Check whether --enable-phonetic or --disable-phonetic was given.
1653 if test "${enable_phonetic+set}" = set; then
1654   enableval="$enable_phonetic"
1655   
1656         ol_arg=invalid
1657         for ol_val in auto yes no ; do
1658                 if test "$enableval" = "$ol_val" ; then
1659                         ol_arg="$ol_val"
1660                 fi
1661         done
1662         if test "$ol_arg" = "invalid" ; then
1663                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1664         fi
1665         ol_enable_phonetic="$ol_arg"
1666
1667 else
1668         ol_enable_phonetic="no"
1669 fi
1670 # end --enable-phonetic
1671 # OpenLDAP --enable-quipu
1672         # Check whether --enable-quipu or --disable-quipu was given.
1673 if test "${enable_quipu+set}" = set; then
1674   enableval="$enable_quipu"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1684         fi
1685         ol_enable_quipu="$ol_arg"
1686
1687 else
1688         ol_enable_quipu="no"
1689 fi
1690 # end --enable-quipu
1691 # OpenLDAP --enable-rlookups
1692         # Check whether --enable-rlookups or --disable-rlookups was given.
1693 if test "${enable_rlookups+set}" = set; then
1694   enableval="$enable_rlookups"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1704         fi
1705         ol_enable_rlookups="$ol_arg"
1706
1707 else
1708         ol_enable_rlookups="auto"
1709 fi
1710 # end --enable-rlookups
1711 # OpenLDAP --enable-aci
1712         # Check whether --enable-aci or --disable-aci was given.
1713 if test "${enable_aci+set}" = set; then
1714   enableval="$enable_aci"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1724         fi
1725         ol_enable_aci="$ol_arg"
1726
1727 else
1728         ol_enable_aci="no"
1729 fi
1730 # end --enable-aci
1731 # OpenLDAP --enable-wrappers
1732         # Check whether --enable-wrappers or --disable-wrappers was given.
1733 if test "${enable_wrappers+set}" = set; then
1734   enableval="$enable_wrappers"
1735   
1736         ol_arg=invalid
1737         for ol_val in auto yes no ; do
1738                 if test "$enableval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1744         fi
1745         ol_enable_wrappers="$ol_arg"
1746
1747 else
1748         ol_enable_wrappers="no"
1749 fi
1750 # end --enable-wrappers
1751 # OpenLDAP --enable-dynamic
1752         # Check whether --enable-dynamic or --disable-dynamic was given.
1753 if test "${enable_dynamic+set}" = set; then
1754   enableval="$enable_dynamic"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1764         fi
1765         ol_enable_dynamic="$ol_arg"
1766
1767 else
1768         ol_enable_dynamic="no"
1769 fi
1770 # end --enable-dynamic
1771
1772 # OpenLDAP --enable-bdb2
1773         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1774 if test "${enable_bdb2+set}" = set; then
1775   enableval="$enable_bdb2"
1776   
1777         ol_arg=invalid
1778         for ol_val in auto yes no ; do
1779                 if test "$enableval" = "$ol_val" ; then
1780                         ol_arg="$ol_val"
1781                 fi
1782         done
1783         if test "$ol_arg" = "invalid" ; then
1784                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1785         fi
1786         ol_enable_bdb2="$ol_arg"
1787
1788 else
1789         ol_enable_bdb2="no"
1790 fi
1791 # end --enable-bdb2
1792 # OpenLDAP --with-bdb2_module
1793         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1794 if test "${with_bdb2_module+set}" = set; then
1795   withval="$with_bdb2_module"
1796   
1797         ol_arg=invalid
1798         for ol_val in static dynamic ; do
1799                 if test "$withval" = "$ol_val" ; then
1800                         ol_arg="$ol_val"
1801                 fi
1802         done
1803         if test "$ol_arg" = "invalid" ; then
1804                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1805         fi
1806         ol_with_bdb2_module="$ol_arg"
1807
1808 else
1809         ol_with_bdb2_module="static"
1810 fi
1811 # end --with-bdb2_module
1812
1813 # OpenLDAP --enable-dnssrv
1814         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1815 if test "${enable_dnssrv+set}" = set; then
1816   enableval="$enable_dnssrv"
1817   
1818         ol_arg=invalid
1819         for ol_val in auto yes no ; do
1820                 if test "$enableval" = "$ol_val" ; then
1821                         ol_arg="$ol_val"
1822                 fi
1823         done
1824         if test "$ol_arg" = "invalid" ; then
1825                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1826         fi
1827         ol_enable_dnssrv="$ol_arg"
1828
1829 else
1830         ol_enable_dnssrv="no"
1831 fi
1832 # end --enable-dnssrv
1833 # OpenLDAP --with-dnssrv_module
1834         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1835 if test "${with_dnssrv_module+set}" = set; then
1836   withval="$with_dnssrv_module"
1837   
1838         ol_arg=invalid
1839         for ol_val in static dynamic ; do
1840                 if test "$withval" = "$ol_val" ; then
1841                         ol_arg="$ol_val"
1842                 fi
1843         done
1844         if test "$ol_arg" = "invalid" ; then
1845                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1846         fi
1847         ol_with_dnssrv_module="$ol_arg"
1848
1849 else
1850         ol_with_dnssrv_module="static"
1851 fi
1852 # end --with-dnssrv_module
1853
1854 # OpenLDAP --enable-ldap
1855         # Check whether --enable-ldap or --disable-ldap was given.
1856 if test "${enable_ldap+set}" = set; then
1857   enableval="$enable_ldap"
1858   
1859         ol_arg=invalid
1860         for ol_val in auto yes no ; do
1861                 if test "$enableval" = "$ol_val" ; then
1862                         ol_arg="$ol_val"
1863                 fi
1864         done
1865         if test "$ol_arg" = "invalid" ; then
1866                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1867         fi
1868         ol_enable_ldap="$ol_arg"
1869
1870 else
1871         ol_enable_ldap="no"
1872 fi
1873 # end --enable-ldap
1874 # OpenLDAP --with-ldap_module
1875         # Check whether --with-ldap_module or --without-ldap_module was given.
1876 if test "${with_ldap_module+set}" = set; then
1877   withval="$with_ldap_module"
1878   
1879         ol_arg=invalid
1880         for ol_val in static dynamic ; do
1881                 if test "$withval" = "$ol_val" ; then
1882                         ol_arg="$ol_val"
1883                 fi
1884         done
1885         if test "$ol_arg" = "invalid" ; then
1886                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1887         fi
1888         ol_with_ldap_module="$ol_arg"
1889
1890 else
1891         ol_with_ldap_module="static"
1892 fi
1893 # end --with-ldap_module
1894
1895 # OpenLDAP --enable-ldbm
1896         # Check whether --enable-ldbm or --disable-ldbm was given.
1897 if test "${enable_ldbm+set}" = set; then
1898   enableval="$enable_ldbm"
1899   
1900         ol_arg=invalid
1901         for ol_val in auto yes no ; do
1902                 if test "$enableval" = "$ol_val" ; then
1903                         ol_arg="$ol_val"
1904                 fi
1905         done
1906         if test "$ol_arg" = "invalid" ; then
1907                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1908         fi
1909         ol_enable_ldbm="$ol_arg"
1910
1911 else
1912         ol_enable_ldbm="yes"
1913 fi
1914 # end --enable-ldbm
1915 # OpenLDAP --with-ldbm_api
1916         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1917 if test "${with_ldbm_api+set}" = set; then
1918   withval="$with_ldbm_api"
1919   
1920         ol_arg=invalid
1921         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1922                 if test "$withval" = "$ol_val" ; then
1923                         ol_arg="$ol_val"
1924                 fi
1925         done
1926         if test "$ol_arg" = "invalid" ; then
1927                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1928         fi
1929         ol_with_ldbm_api="$ol_arg"
1930
1931 else
1932         ol_with_ldbm_api="auto"
1933 fi
1934 # end --with-ldbm_api
1935
1936 # OpenLDAP --with-ldbm_module
1937         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1938 if test "${with_ldbm_module+set}" = set; then
1939   withval="$with_ldbm_module"
1940   
1941         ol_arg=invalid
1942         for ol_val in static dynamic ; do
1943                 if test "$withval" = "$ol_val" ; then
1944                         ol_arg="$ol_val"
1945                 fi
1946         done
1947         if test "$ol_arg" = "invalid" ; then
1948                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1949         fi
1950         ol_with_ldbm_module="$ol_arg"
1951
1952 else
1953         ol_with_ldbm_module="static"
1954 fi
1955 # end --with-ldbm_module
1956
1957 # OpenLDAP --with-ldbm_type
1958         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1959 if test "${with_ldbm_type+set}" = set; then
1960   withval="$with_ldbm_type"
1961   
1962         ol_arg=invalid
1963         for ol_val in auto btree hash ; do
1964                 if test "$withval" = "$ol_val" ; then
1965                         ol_arg="$ol_val"
1966                 fi
1967         done
1968         if test "$ol_arg" = "invalid" ; then
1969                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1970         fi
1971         ol_with_ldbm_type="$ol_arg"
1972
1973 else
1974         ol_with_ldbm_type="auto"
1975 fi
1976 # end --with-ldbm_type
1977
1978 # OpenLDAP --enable-passwd
1979         # Check whether --enable-passwd or --disable-passwd was given.
1980 if test "${enable_passwd+set}" = set; then
1981   enableval="$enable_passwd"
1982   
1983         ol_arg=invalid
1984         for ol_val in auto yes no ; do
1985                 if test "$enableval" = "$ol_val" ; then
1986                         ol_arg="$ol_val"
1987                 fi
1988         done
1989         if test "$ol_arg" = "invalid" ; then
1990                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1991         fi
1992         ol_enable_passwd="$ol_arg"
1993
1994 else
1995         ol_enable_passwd="no"
1996 fi
1997 # end --enable-passwd
1998 # OpenLDAP --with-passwd_module
1999         # Check whether --with-passwd_module or --without-passwd_module was given.
2000 if test "${with_passwd_module+set}" = set; then
2001   withval="$with_passwd_module"
2002   
2003         ol_arg=invalid
2004         for ol_val in static dynamic ; do
2005                 if test "$withval" = "$ol_val" ; then
2006                         ol_arg="$ol_val"
2007                 fi
2008         done
2009         if test "$ol_arg" = "invalid" ; then
2010                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2011         fi
2012         ol_with_passwd_module="$ol_arg"
2013
2014 else
2015         ol_with_passwd_module="static"
2016 fi
2017 # end --with-passwd_module
2018
2019 # OpenLDAP --enable-perl
2020         # Check whether --enable-perl or --disable-perl was given.
2021 if test "${enable_perl+set}" = set; then
2022   enableval="$enable_perl"
2023   
2024         ol_arg=invalid
2025         for ol_val in auto yes no ; do
2026                 if test "$enableval" = "$ol_val" ; then
2027                         ol_arg="$ol_val"
2028                 fi
2029         done
2030         if test "$ol_arg" = "invalid" ; then
2031                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2032         fi
2033         ol_enable_perl="$ol_arg"
2034
2035 else
2036         ol_enable_perl="no"
2037 fi
2038 # end --enable-perl
2039 # OpenLDAP --with-perl_module
2040         # Check whether --with-perl_module or --without-perl_module was given.
2041 if test "${with_perl_module+set}" = set; then
2042   withval="$with_perl_module"
2043   
2044         ol_arg=invalid
2045         for ol_val in static dynamic ; do
2046                 if test "$withval" = "$ol_val" ; then
2047                         ol_arg="$ol_val"
2048                 fi
2049         done
2050         if test "$ol_arg" = "invalid" ; then
2051                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2052         fi
2053         ol_with_perl_module="$ol_arg"
2054
2055 else
2056         ol_with_perl_module="static"
2057 fi
2058 # end --with-perl_module
2059
2060 # OpenLDAP --enable-shell
2061         # Check whether --enable-shell or --disable-shell was given.
2062 if test "${enable_shell+set}" = set; then
2063   enableval="$enable_shell"
2064   
2065         ol_arg=invalid
2066         for ol_val in auto yes no ; do
2067                 if test "$enableval" = "$ol_val" ; then
2068                         ol_arg="$ol_val"
2069                 fi
2070         done
2071         if test "$ol_arg" = "invalid" ; then
2072                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2073         fi
2074         ol_enable_shell="$ol_arg"
2075
2076 else
2077         ol_enable_shell="no"
2078 fi
2079 # end --enable-shell
2080 # OpenLDAP --with-shell_module
2081         # Check whether --with-shell_module or --without-shell_module was given.
2082 if test "${with_shell_module+set}" = set; then
2083   withval="$with_shell_module"
2084   
2085         ol_arg=invalid
2086         for ol_val in static dynamic ; do
2087                 if test "$withval" = "$ol_val" ; then
2088                         ol_arg="$ol_val"
2089                 fi
2090         done
2091         if test "$ol_arg" = "invalid" ; then
2092                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2093         fi
2094         ol_with_shell_module="$ol_arg"
2095
2096 else
2097         ol_with_shell_module="static"
2098 fi
2099 # end --with-shell_module
2100
2101 # OpenLDAP --enable-sql
2102         # Check whether --enable-sql or --disable-sql was given.
2103 if test "${enable_sql+set}" = set; then
2104   enableval="$enable_sql"
2105   
2106         ol_arg=invalid
2107         for ol_val in auto yes no ; do
2108                 if test "$enableval" = "$ol_val" ; then
2109                         ol_arg="$ol_val"
2110                 fi
2111         done
2112         if test "$ol_arg" = "invalid" ; then
2113                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2114         fi
2115         ol_enable_sql="$ol_arg"
2116
2117 else
2118         ol_enable_sql="no"
2119 fi
2120 # end --enable-sql
2121 # OpenLDAP --with-sql_module
2122         # Check whether --with-sql_module or --without-sql_module was given.
2123 if test "${with_sql_module+set}" = set; then
2124   withval="$with_sql_module"
2125   
2126         ol_arg=invalid
2127         for ol_val in static dynamic ; do
2128                 if test "$withval" = "$ol_val" ; then
2129                         ol_arg="$ol_val"
2130                 fi
2131         done
2132         if test "$ol_arg" = "invalid" ; then
2133                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2134         fi
2135         ol_with_sql_module="$ol_arg"
2136
2137 else
2138         ol_with_sql_module="static"
2139 fi
2140 # end --with-sql_module
2141
2142 # OpenLDAP --enable-tcl
2143         # Check whether --enable-tcl or --disable-tcl was given.
2144 if test "${enable_tcl+set}" = set; then
2145   enableval="$enable_tcl"
2146   
2147         ol_arg=invalid
2148         for ol_val in auto yes no ; do
2149                 if test "$enableval" = "$ol_val" ; then
2150                         ol_arg="$ol_val"
2151                 fi
2152         done
2153         if test "$ol_arg" = "invalid" ; then
2154                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2155         fi
2156         ol_enable_tcl="$ol_arg"
2157
2158 else
2159         ol_enable_tcl="no"
2160 fi
2161 # end --enable-tcl
2162 # OpenLDAP --with-tcl_module
2163         # Check whether --with-tcl_module or --without-tcl_module was given.
2164 if test "${with_tcl_module+set}" = set; then
2165   withval="$with_tcl_module"
2166   
2167         ol_arg=invalid
2168         for ol_val in static dynamic ; do
2169                 if test "$withval" = "$ol_val" ; then
2170                         ol_arg="$ol_val"
2171                 fi
2172         done
2173         if test "$ol_arg" = "invalid" ; then
2174                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2175         fi
2176         ol_with_tcl_module="$ol_arg"
2177
2178 else
2179         ol_with_tcl_module="static"
2180 fi
2181 # end --with-tcl_module
2182
2183
2184 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2185 if test "${with_xxslurpdoptions+set}" = set; then
2186   withval="$with_xxslurpdoptions"
2187   :
2188 fi
2189
2190 # OpenLDAP --enable-slurpd
2191         # Check whether --enable-slurpd or --disable-slurpd was given.
2192 if test "${enable_slurpd+set}" = set; then
2193   enableval="$enable_slurpd"
2194   
2195         ol_arg=invalid
2196         for ol_val in auto yes no ; do
2197                 if test "$enableval" = "$ol_val" ; then
2198                         ol_arg="$ol_val"
2199                 fi
2200         done
2201         if test "$ol_arg" = "invalid" ; then
2202                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2203         fi
2204         ol_enable_slurpd="$ol_arg"
2205
2206 else
2207         ol_enable_slurpd="auto"
2208 fi
2209 # end --enable-slurpd
2210
2211 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2212 if test "${with_xxliboptions+set}" = set; then
2213   withval="$with_xxliboptions"
2214   :
2215 fi
2216
2217 # Check whether --enable-static or --disable-static was given.
2218 if test "${enable_static+set}" = set; then
2219   enableval="$enable_static"
2220   p=${PACKAGE-default}
2221 case "$enableval" in
2222 yes) enable_static=yes ;;
2223 no) enable_static=no ;;
2224 *)
2225   enable_static=no
2226   # Look at the argument we got.  We use all the common list separators.
2227   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2228   for pkg in $enableval; do
2229     if test "X$pkg" = "X$p"; then
2230       enable_static=yes
2231     fi
2232   done
2233   IFS="$ac_save_ifs"
2234   ;;
2235 esac
2236 else
2237   enable_static=yes
2238 fi
2239
2240 # Check whether --enable-shared or --disable-shared was given.
2241 if test "${enable_shared+set}" = set; then
2242   enableval="$enable_shared"
2243   p=${PACKAGE-default}
2244 case "$enableval" in
2245 yes) enable_shared=yes ;;
2246 no) enable_shared=no ;;
2247 *)
2248   enable_shared=no
2249   # Look at the argument we got.  We use all the common list separators.
2250   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2251   for pkg in $enableval; do
2252     if test "X$pkg" = "X$p"; then
2253       enable_shared=yes
2254     fi
2255   done
2256   IFS="$ac_save_ifs"
2257   ;;
2258 esac
2259 else
2260   enable_shared=yes
2261 fi
2262
2263
2264
2265 # validate options
2266 if test $ol_enable_slapd = no ; then
2267                 if test $ol_enable_bdb2 = yes ; then
2268                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2269         fi
2270         if test $ol_enable_dnssrv = yes ; then
2271                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2272         fi
2273         if test $ol_enable_ldap = yes ; then
2274                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2275         fi
2276         if test $ol_enable_ldbm = yes ; then
2277                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2278         fi
2279         if test $ol_enable_passwd = yes ; then
2280                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2281         fi
2282         if test $ol_enable_perl = yes ; then
2283                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2284         fi
2285         if test $ol_enable_shell = yes ; then
2286                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2287         fi
2288         if test $ol_enable_tcl = yes ; then
2289                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2290         fi
2291         if test $ol_enable_sql = yes ; then
2292                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2293         fi
2294         if test $ol_enable_modules = yes ; then
2295                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2296         fi
2297         if test $ol_enable_multimaster = yes ; then
2298                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2299         fi
2300         if test $ol_enable_wrappers = yes ; then
2301                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2302         fi
2303         if test $ol_enable_phonetic = yes ; then
2304                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2305         fi
2306         if test $ol_enable_quipu = yes ; then
2307                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2308         fi
2309         if test $ol_enable_rlookups = yes ; then
2310                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2311         fi
2312         if test $ol_enable_aci = yes ; then
2313                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2314         fi
2315         if test $ol_with_ldbm_api != auto ; then
2316                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2317         fi
2318         if test $ol_with_ldbm_type != auto ; then
2319                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2320         fi
2321         if test $ol_with_bdb2_module != static ; then
2322                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2323         fi
2324         if test $ol_with_dnssrv_module != static ; then
2325                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2326         fi
2327         if test $ol_with_ldap_module != static ; then
2328                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2329         fi
2330         if test $ol_with_ldbm_module != static ; then
2331                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2332         fi
2333         if test $ol_with_passwd_module != static ; then
2334                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2335         fi
2336         if test $ol_with_perl_module != static ; then
2337                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2338         fi
2339         if test $ol_with_shell_module != static ; then
2340                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2341         fi
2342         if test $ol_with_tcl_module != static ; then
2343                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2344         fi
2345         if test $ol_with_sql_module != static ; then
2346                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2347         fi
2348         if test $ol_enable_slurpd = yes ; then
2349                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2350         fi
2351
2352         # force settings to no
2353         ol_enable_bdb2=no
2354         ol_enable_dnssrv=no
2355         ol_enable_ldap=no
2356         ol_enable_ldbm=no
2357         ol_enable_passwd=no
2358         ol_enable_perl=no
2359         ol_enable_shell=no
2360         ol_enable_tcl=no
2361         ol_enable_sql=no
2362
2363         ol_enable_modules=no
2364         ol_enable_multimaster=no
2365         ol_enable_phonetic=no
2366         ol_enable_quipu=no
2367         ol_enable_rlookups=no
2368         ol_enable_aci=no
2369         ol_enable_wrappers=no
2370         ol_enable_dynamic=no
2371
2372         ol_with_ldbm_api=no
2373         ol_with_ldbm_type=no
2374
2375         ol_with_bdb2_module=static
2376         ol_with_dnssrv_module=static
2377         ol_with_ldap_module=static
2378         ol_with_ldbm_module=static
2379         ol_with_passwd_module=static
2380         ol_with_perl_module=static
2381         ol_with_shell_module=static
2382         ol_with_tcl_module=static
2383         ol_with_sql_module=static
2384
2385         ol_enable_slurpd=no
2386
2387 elif test $ol_enable_ldbm = no ; then
2388         
2389         if test $ol_with_ldbm_api != auto ; then
2390                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2391         fi
2392
2393         if test $ol_with_ldbm_type != auto ; then
2394                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2395         fi
2396
2397         if test $ol_with_ldbm_module != static ; then
2398                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2399         fi
2400
2401         if test $ol_enable_bdb2 = yes ; then
2402                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2403         fi
2404
2405         if test $ol_enable_modules != yes -a \
2406                 $ol_enable_dnssrv = no -a \
2407                 $ol_enable_ldap = no -a \
2408                 $ol_enable_passwd = no -a \
2409                 $ol_enable_perl = no -a \
2410                 $ol_enable_shell = no -a \
2411                 $ol_enable_sql = no -a \
2412                 $ol_enable_tcl = no ; then
2413                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2414         fi
2415
2416         ol_with_ldbm_api=no
2417         ol_with_ldbm_type=no
2418         ol_with_ldbm_module=static
2419
2420 elif test $ol_enable_bdb2 = yes ; then
2421         
2422         if test $ol_with_ldbm_api != auto -a \
2423                 $ol_with_ldbm_api != berkeley ; then
2424                 { echo "configure: error: BDB2 requires LDBM API berkeley or auto" 1>&2; exit 1; }
2425         fi
2426
2427         ol_with_ldbm_api=db2
2428
2429 else
2430         
2431         if test $ol_enable_bdb2 != no ; then
2432                 if test $ol_with_ldbm_api != auto -a \
2433                         $ol_with_ldbm_api != berkeley ; then
2434                         echo "configure: warning: BDB2 requires LDBM api berkeley or auto" 1>&2
2435                         ol_enable_bdb2=no
2436                 fi
2437         fi
2438
2439         if test $ol_with_ldbm_api = gdbm -a \
2440                 $ol_with_ldbm_type = btree ; then
2441                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2442         fi
2443         if test $ol_with_ldbm_api = mdbm -a \
2444                 $ol_with_ldbm_type = btree ; then
2445                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2446         fi
2447         if test $ol_with_ldbm_api = ndbm -a \
2448                 $ol_with_ldbm_type = btree ; then
2449                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2450         fi
2451 fi
2452
2453 if test $ol_enable_slurpd = yes ; then
2454                 if test $ol_with_threads = no ; then
2455                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2456         fi
2457 fi
2458
2459 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2460         if test $ol_with_kerberos = no ; then
2461                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2462         fi
2463 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2464         if test $ol_with_kerberos != auto ; then
2465                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2466         else
2467                 ol_with_kerberos=no
2468         fi
2469 fi
2470
2471 if test $ol_enable_spasswd = yes ; then
2472         if test $ol_with_cyrus_sasl = no ; then
2473                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2474         fi
2475         ol_link_spasswd=yes
2476 fi
2477
2478 echo "$ac_t""done" 1>&6
2479
2480 LDAP_LIBS=
2481 LDIF_LIBS=
2482 LDBM_LIBS=
2483 LTHREAD_LIBS=
2484 LUTIL_LIBS=
2485
2486 QUIPU_LIBS=
2487 SLAPD_LIBS=
2488 SLURPD_LIBS=
2489
2490 BUILD_SLAPD=no
2491 BUILD_SLURPD=no
2492
2493 BUILD_QUIPU=no
2494 BUILD_THREAD=no
2495
2496 BUILD_BDB2=no
2497 BUILD_DNSSRV=no
2498 BUILD_LDAP=no
2499 BUILD_LDBM=no
2500 BUILD_PASSWD=no
2501 BUILD_PERL=no
2502 BUILD_SHELL=no
2503 BUILD_SQL=no
2504 BUILD_TCL=no
2505
2506 BUILD_BDB2_DYNAMIC=static
2507 BUILD_DNSSRV_DYNAMIC=static
2508 BUILD_LDAP_DYNAMIC=static
2509 BUILD_LDBM_DYNAMIC=static
2510 BUILD_PASSWD_DYNAMIC=static
2511 BUILD_PERL_DYNAMIC=static
2512 BUILD_SHELL_DYNAMIC=static
2513 BUILD_TCL_DYNAMIC=static
2514 BUILD_SQL_DYNAMIC=static
2515
2516 SLAPD_MODULES_LDFLAGS=
2517 SLAPD_MODULES_CPPFLAGS=
2518 SLAPD_MODULES_LIST=
2519
2520 SLAPD_PERL_LDFLAGS=
2521 MOD_PERL_LDFLAGS=
2522 PERL_CPPFLAGS=
2523
2524 SLAPD_SQL_LDFLAGS=
2525 SLAPD_SQL_LIBS=
2526 SLAPD_SQL_INCLUDES=
2527
2528 MOD_TCL_LIB=
2529 KRB4_LIBS=
2530 KRB5_LIBS=
2531 READLINE_LIBS=
2532 SASL_LIBS=
2533 TERMCAP_LIBS=
2534 TLS_LIBS=
2535 MODULES_LIBS=
2536 AUTH_LIBS=
2537
2538
2539
2540 cat >> confdefs.h <<\EOF
2541 #define HAVE_MKVERSION 1
2542 EOF
2543
2544
2545
2546
2547 ol_aix_threads=no
2548 case "$target" in
2549 *-*-aix*)       if test -z "$CC" ; then
2550                 case "$ol_with_threads" in
2551                 auto | yes |  posix) ol_aix_threads=yes ;;
2552                 esac
2553         fi
2554 ;;
2555 esac
2556
2557 if test $ol_aix_threads = yes ; then
2558         if test -z "${CC}" ; then
2559                 for ac_prog in cc_r xlc_r cc
2560 do
2561 # Extract the first word of "$ac_prog", so it can be a program name with args.
2562 set dummy $ac_prog; ac_word=$2
2563 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2564 echo "configure:2565: checking for $ac_word" >&5
2565 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2566   echo $ac_n "(cached) $ac_c" 1>&6
2567 else
2568   if test -n "$CC"; then
2569   ac_cv_prog_CC="$CC" # Let the user override the test.
2570 else
2571   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2572   ac_dummy="$PATH"
2573   for ac_dir in $ac_dummy; do
2574     test -z "$ac_dir" && ac_dir=.
2575     if test -f $ac_dir/$ac_word; then
2576       ac_cv_prog_CC="$ac_prog"
2577       break
2578     fi
2579   done
2580   IFS="$ac_save_ifs"
2581 fi
2582 fi
2583 CC="$ac_cv_prog_CC"
2584 if test -n "$CC"; then
2585   echo "$ac_t""$CC" 1>&6
2586 else
2587   echo "$ac_t""no" 1>&6
2588 fi
2589
2590 test -n "$CC" && break
2591 done
2592
2593
2594                 if test "$CC" = cc ; then
2595                                                 if test $ol_with_threads != auto ; then
2596                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2597                         else
2598                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2599                         fi
2600                         ol_with_threads=no
2601                 fi
2602         fi
2603
2604         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2605                 ol_with_threads=posix
2606                 ol_cv_pthread_create=yes
2607         fi
2608 fi
2609
2610 if test -z "${CC}"; then
2611         for ac_prog in cc
2612 do
2613 # Extract the first word of "$ac_prog", so it can be a program name with args.
2614 set dummy $ac_prog; ac_word=$2
2615 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2616 echo "configure:2617: checking for $ac_word" >&5
2617 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2618   echo $ac_n "(cached) $ac_c" 1>&6
2619 else
2620   if test -n "$CC"; then
2621   ac_cv_prog_CC="$CC" # Let the user override the test.
2622 else
2623   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2624   ac_dummy="$PATH"
2625   for ac_dir in $ac_dummy; do
2626     test -z "$ac_dir" && ac_dir=.
2627     if test -f $ac_dir/$ac_word; then
2628       ac_cv_prog_CC="$ac_prog"
2629       break
2630     fi
2631   done
2632   IFS="$ac_save_ifs"
2633 fi
2634 fi
2635 CC="$ac_cv_prog_CC"
2636 if test -n "$CC"; then
2637   echo "$ac_t""$CC" 1>&6
2638 else
2639   echo "$ac_t""no" 1>&6
2640 fi
2641
2642 test -n "$CC" && break
2643 done
2644
2645 fi
2646
2647
2648
2649
2650 # Check whether --enable-fast-install or --disable-fast-install was given.
2651 if test "${enable_fast_install+set}" = set; then
2652   enableval="$enable_fast_install"
2653   p=${PACKAGE-default}
2654 case "$enableval" in
2655 yes) enable_fast_install=yes ;;
2656 no) enable_fast_install=no ;;
2657 *)
2658   enable_fast_install=no
2659   # Look at the argument we got.  We use all the common list separators.
2660   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2661   for pkg in $enableval; do
2662     if test "X$pkg" = "X$p"; then
2663       enable_fast_install=yes
2664     fi
2665   done
2666   IFS="$ac_save_ifs"
2667   ;;
2668 esac
2669 else
2670   enable_fast_install=yes
2671 fi
2672
2673 # Extract the first word of "ranlib", so it can be a program name with args.
2674 set dummy ranlib; ac_word=$2
2675 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2676 echo "configure:2677: checking for $ac_word" >&5
2677 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2678   echo $ac_n "(cached) $ac_c" 1>&6
2679 else
2680   if test -n "$RANLIB"; then
2681   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2682 else
2683   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2684   ac_dummy="$PATH"
2685   for ac_dir in $ac_dummy; do
2686     test -z "$ac_dir" && ac_dir=.
2687     if test -f $ac_dir/$ac_word; then
2688       ac_cv_prog_RANLIB="ranlib"
2689       break
2690     fi
2691   done
2692   IFS="$ac_save_ifs"
2693   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2694 fi
2695 fi
2696 RANLIB="$ac_cv_prog_RANLIB"
2697 if test -n "$RANLIB"; then
2698   echo "$ac_t""$RANLIB" 1>&6
2699 else
2700   echo "$ac_t""no" 1>&6
2701 fi
2702
2703 # Extract the first word of "gcc", so it can be a program name with args.
2704 set dummy gcc; ac_word=$2
2705 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2706 echo "configure:2707: checking for $ac_word" >&5
2707 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2708   echo $ac_n "(cached) $ac_c" 1>&6
2709 else
2710   if test -n "$CC"; then
2711   ac_cv_prog_CC="$CC" # Let the user override the test.
2712 else
2713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2714   ac_dummy="$PATH"
2715   for ac_dir in $ac_dummy; do
2716     test -z "$ac_dir" && ac_dir=.
2717     if test -f $ac_dir/$ac_word; then
2718       ac_cv_prog_CC="gcc"
2719       break
2720     fi
2721   done
2722   IFS="$ac_save_ifs"
2723 fi
2724 fi
2725 CC="$ac_cv_prog_CC"
2726 if test -n "$CC"; then
2727   echo "$ac_t""$CC" 1>&6
2728 else
2729   echo "$ac_t""no" 1>&6
2730 fi
2731
2732 if test -z "$CC"; then
2733   # Extract the first word of "cc", so it can be a program name with args.
2734 set dummy cc; ac_word=$2
2735 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2736 echo "configure:2737: checking for $ac_word" >&5
2737 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2738   echo $ac_n "(cached) $ac_c" 1>&6
2739 else
2740   if test -n "$CC"; then
2741   ac_cv_prog_CC="$CC" # Let the user override the test.
2742 else
2743   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2744   ac_prog_rejected=no
2745   ac_dummy="$PATH"
2746   for ac_dir in $ac_dummy; do
2747     test -z "$ac_dir" && ac_dir=.
2748     if test -f $ac_dir/$ac_word; then
2749       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2750         ac_prog_rejected=yes
2751         continue
2752       fi
2753       ac_cv_prog_CC="cc"
2754       break
2755     fi
2756   done
2757   IFS="$ac_save_ifs"
2758 if test $ac_prog_rejected = yes; then
2759   # We found a bogon in the path, so make sure we never use it.
2760   set dummy $ac_cv_prog_CC
2761   shift
2762   if test $# -gt 0; then
2763     # We chose a different compiler from the bogus one.
2764     # However, it has the same basename, so the bogon will be chosen
2765     # first if we set CC to just the basename; use the full file name.
2766     shift
2767     set dummy "$ac_dir/$ac_word" "$@"
2768     shift
2769     ac_cv_prog_CC="$@"
2770   fi
2771 fi
2772 fi
2773 fi
2774 CC="$ac_cv_prog_CC"
2775 if test -n "$CC"; then
2776   echo "$ac_t""$CC" 1>&6
2777 else
2778   echo "$ac_t""no" 1>&6
2779 fi
2780
2781   if test -z "$CC"; then
2782     case "`uname -s`" in
2783     *win32* | *WIN32* | *CYGWIN*)
2784       # Extract the first word of "cl", so it can be a program name with args.
2785 set dummy cl; ac_word=$2
2786 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2787 echo "configure:2788: checking for $ac_word" >&5
2788 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2789   echo $ac_n "(cached) $ac_c" 1>&6
2790 else
2791   if test -n "$CC"; then
2792   ac_cv_prog_CC="$CC" # Let the user override the test.
2793 else
2794   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2795   ac_dummy="$PATH"
2796   for ac_dir in $ac_dummy; do
2797     test -z "$ac_dir" && ac_dir=.
2798     if test -f $ac_dir/$ac_word; then
2799       ac_cv_prog_CC="cl"
2800       break
2801     fi
2802   done
2803   IFS="$ac_save_ifs"
2804 fi
2805 fi
2806 CC="$ac_cv_prog_CC"
2807 if test -n "$CC"; then
2808   echo "$ac_t""$CC" 1>&6
2809 else
2810   echo "$ac_t""no" 1>&6
2811 fi
2812  ;;
2813     esac
2814   fi
2815   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2816 fi
2817
2818 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2819 echo "configure:2820: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2820
2821 ac_ext=c
2822 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2823 ac_cpp='$CPP $CPPFLAGS'
2824 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2825 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2826 cross_compiling=$ac_cv_prog_cc_cross
2827
2828 cat > conftest.$ac_ext << EOF
2829
2830 #line 2831 "configure"
2831 #include "confdefs.h"
2832
2833 main(){return(0);}
2834 EOF
2835 if { (eval echo configure:2836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2836   ac_cv_prog_cc_works=yes
2837   # If we can't run a trivial program, we are probably using a cross compiler.
2838   if (./conftest; exit) 2>/dev/null; then
2839     ac_cv_prog_cc_cross=no
2840   else
2841     ac_cv_prog_cc_cross=yes
2842   fi
2843 else
2844   echo "configure: failed program was:" >&5
2845   cat conftest.$ac_ext >&5
2846   ac_cv_prog_cc_works=no
2847 fi
2848 rm -fr conftest*
2849 ac_ext=c
2850 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2851 ac_cpp='$CPP $CPPFLAGS'
2852 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2853 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2854 cross_compiling=$ac_cv_prog_cc_cross
2855
2856 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2857 if test $ac_cv_prog_cc_works = no; then
2858   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2859 fi
2860 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2861 echo "configure:2862: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2862 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2863 cross_compiling=$ac_cv_prog_cc_cross
2864
2865 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2866 echo "configure:2867: checking whether we are using GNU C" >&5
2867 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2868   echo $ac_n "(cached) $ac_c" 1>&6
2869 else
2870   cat > conftest.c <<EOF
2871 #ifdef __GNUC__
2872   yes;
2873 #endif
2874 EOF
2875 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2876   ac_cv_prog_gcc=yes
2877 else
2878   ac_cv_prog_gcc=no
2879 fi
2880 fi
2881
2882 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2883
2884 if test $ac_cv_prog_gcc = yes; then
2885   GCC=yes
2886 else
2887   GCC=
2888 fi
2889
2890 ac_test_CFLAGS="${CFLAGS+set}"
2891 ac_save_CFLAGS="$CFLAGS"
2892 CFLAGS=
2893 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2894 echo "configure:2895: checking whether ${CC-cc} accepts -g" >&5
2895 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2896   echo $ac_n "(cached) $ac_c" 1>&6
2897 else
2898   echo 'void f(){}' > conftest.c
2899 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2900   ac_cv_prog_cc_g=yes
2901 else
2902   ac_cv_prog_cc_g=no
2903 fi
2904 rm -f conftest*
2905
2906 fi
2907
2908 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2909 if test "$ac_test_CFLAGS" = set; then
2910   CFLAGS="$ac_save_CFLAGS"
2911 elif test $ac_cv_prog_cc_g = yes; then
2912   if test "$GCC" = yes; then
2913     CFLAGS="-g -O2"
2914   else
2915     CFLAGS="-g"
2916   fi
2917 else
2918   if test "$GCC" = yes; then
2919     CFLAGS="-O2"
2920   else
2921     CFLAGS=
2922   fi
2923 fi
2924
2925 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2926 if test "${with_gnu_ld+set}" = set; then
2927   withval="$with_gnu_ld"
2928   test "$withval" = no || with_gnu_ld=yes
2929 else
2930   with_gnu_ld=no
2931 fi
2932
2933 ac_prog=ld
2934 if test "$ac_cv_prog_gcc" = yes; then
2935   # Check if gcc -print-prog-name=ld gives a path.
2936   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2937 echo "configure:2938: checking for ld used by GCC" >&5
2938   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2939   case "$ac_prog" in
2940     # Accept absolute paths.
2941     [\\/]* | [A-Za-z]:[\\/]*)
2942       re_direlt='/[^/][^/]*/\.\./'
2943       # Canonicalize the path of ld
2944       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2945       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2946         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2947       done
2948       test -z "$LD" && LD="$ac_prog"
2949       ;;
2950   "")
2951     # If it fails, then pretend we aren't using GCC.
2952     ac_prog=ld
2953     ;;
2954   *)
2955     # If it is relative, then search for the first ld in PATH.
2956     with_gnu_ld=unknown
2957     ;;
2958   esac
2959 elif test "$with_gnu_ld" = yes; then
2960   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2961 echo "configure:2962: checking for GNU ld" >&5
2962 else
2963   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2964 echo "configure:2965: checking for non-GNU ld" >&5
2965 fi
2966 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2967   echo $ac_n "(cached) $ac_c" 1>&6
2968 else
2969   if test -z "$LD"; then
2970   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2971   for ac_dir in $PATH; do
2972     test -z "$ac_dir" && ac_dir=.
2973     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2974       ac_cv_path_LD="$ac_dir/$ac_prog"
2975       # Check to see if the program is GNU ld.  I'd rather use --version,
2976       # but apparently some GNU ld's only accept -v.
2977       # Break only if it was the GNU/non-GNU ld that we prefer.
2978       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2979         test "$with_gnu_ld" != no && break
2980       else
2981         test "$with_gnu_ld" != yes && break
2982       fi
2983     fi
2984   done
2985   IFS="$ac_save_ifs"
2986 else
2987   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2988 fi
2989 fi
2990
2991 LD="$ac_cv_path_LD"
2992 if test -n "$LD"; then
2993   echo "$ac_t""$LD" 1>&6
2994 else
2995   echo "$ac_t""no" 1>&6
2996 fi
2997 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2998 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2999 echo "configure:3000: checking if the linker ($LD) is GNU ld" >&5
3000 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3001   echo $ac_n "(cached) $ac_c" 1>&6
3002 else
3003   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3004 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3005   ac_cv_prog_gnu_ld=yes
3006 else
3007   ac_cv_prog_gnu_ld=no
3008 fi
3009 fi
3010
3011 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3012
3013
3014 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3015 echo "configure:3016: checking for BSD-compatible nm" >&5
3016 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3017   echo $ac_n "(cached) $ac_c" 1>&6
3018 else
3019   if test -n "$NM"; then
3020   # Let the user override the test.
3021   ac_cv_path_NM="$NM"
3022 else
3023   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3024   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3025     test -z "$ac_dir" && ac_dir=.
3026     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3027       # Check to see if the nm accepts a BSD-compat flag.
3028       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3029       #   nm: unknown option "B" ignored
3030       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3031         ac_cv_path_NM="$ac_dir/nm -B"
3032         break
3033       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3034         ac_cv_path_NM="$ac_dir/nm -p"
3035         break
3036       else
3037         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3038         continue # so that we can try to find one that supports BSD flags
3039       fi
3040     fi
3041   done
3042   IFS="$ac_save_ifs"
3043   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3044 fi
3045 fi
3046
3047 NM="$ac_cv_path_NM"
3048 echo "$ac_t""$NM" 1>&6
3049
3050 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3051 echo "configure:3052: checking whether ln -s works" >&5
3052 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3053   echo $ac_n "(cached) $ac_c" 1>&6
3054 else
3055   rm -f conftestdata
3056 if ln -s X conftestdata 2>/dev/null
3057 then
3058   rm -f conftestdata
3059   ac_cv_prog_LN_S="ln -s"
3060 else
3061   ac_cv_prog_LN_S=ln
3062 fi
3063 fi
3064 LN_S="$ac_cv_prog_LN_S"
3065 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3066   echo "$ac_t""yes" 1>&6
3067 else
3068   echo "$ac_t""no" 1>&6
3069 fi
3070
3071 if test $host != $build; then
3072   ac_tool_prefix=${host_alias}-
3073 else
3074   ac_tool_prefix=
3075 fi
3076
3077
3078 case "$target" in
3079 NONE) lt_target="$host" ;;
3080 *) lt_target="$target" ;;
3081 esac
3082
3083 # Check for any special flags to pass to ltconfig.
3084 libtool_flags="--cache-file=$cache_file"
3085 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3086 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3087 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3088 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3089 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3090 libtool_flags="$libtool_flags --enable-dlopen"
3091 libtool_flags="$libtool_flags --enable-win32-dll"
3092 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3093 if test "${enable_libtool_lock+set}" = set; then
3094   enableval="$enable_libtool_lock"
3095   :
3096 fi
3097
3098 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3099 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3100
3101 # Some flags need to be propagated to the compiler or linker for good
3102 # libtool support.
3103 case "$lt_target" in
3104 *-*-irix6*)
3105   # Find out which ABI we are using.
3106   echo '#line 3107 "configure"' > conftest.$ac_ext
3107   if { (eval echo configure:3108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3108     case "`/usr/bin/file conftest.o`" in
3109     *32-bit*)
3110       LD="${LD-ld} -32"
3111       ;;
3112     *N32*)
3113       LD="${LD-ld} -n32"
3114       ;;
3115     *64-bit*)
3116       LD="${LD-ld} -64"
3117       ;;
3118     esac
3119   fi
3120   rm -rf conftest*
3121   ;;
3122
3123 *-*-sco3.2v5*)
3124   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3125   SAVE_CFLAGS="$CFLAGS"
3126   CFLAGS="$CFLAGS -belf"
3127   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3128 echo "configure:3129: checking whether the C compiler needs -belf" >&5
3129 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3130   echo $ac_n "(cached) $ac_c" 1>&6
3131 else
3132   cat > conftest.$ac_ext <<EOF
3133 #line 3134 "configure"
3134 #include "confdefs.h"
3135
3136 int main() {
3137
3138 ; return 0; }
3139 EOF
3140 if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3141   rm -rf conftest*
3142   lt_cv_cc_needs_belf=yes
3143 else
3144   echo "configure: failed program was:" >&5
3145   cat conftest.$ac_ext >&5
3146   rm -rf conftest*
3147   lt_cv_cc_needs_belf=no
3148 fi
3149 rm -f conftest*
3150 fi
3151
3152 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3153   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3154     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3155     CFLAGS="$SAVE_CFLAGS"
3156   fi
3157   ;;
3158
3159 *-*-cygwin* | *-*-mingw*)
3160   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3161 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3162 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3163 echo "configure:3164: checking for $ac_word" >&5
3164 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3165   echo $ac_n "(cached) $ac_c" 1>&6
3166 else
3167   if test -n "$DLLTOOL"; then
3168   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3169 else
3170   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3171   ac_dummy="$PATH"
3172   for ac_dir in $ac_dummy; do
3173     test -z "$ac_dir" && ac_dir=.
3174     if test -f $ac_dir/$ac_word; then
3175       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3176       break
3177     fi
3178   done
3179   IFS="$ac_save_ifs"
3180 fi
3181 fi
3182 DLLTOOL="$ac_cv_prog_DLLTOOL"
3183 if test -n "$DLLTOOL"; then
3184   echo "$ac_t""$DLLTOOL" 1>&6
3185 else
3186   echo "$ac_t""no" 1>&6
3187 fi
3188
3189
3190 if test -z "$ac_cv_prog_DLLTOOL"; then
3191 if test -n "$ac_tool_prefix"; then
3192   # Extract the first word of "dlltool", so it can be a program name with args.
3193 set dummy dlltool; ac_word=$2
3194 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3195 echo "configure:3196: checking for $ac_word" >&5
3196 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3197   echo $ac_n "(cached) $ac_c" 1>&6
3198 else
3199   if test -n "$DLLTOOL"; then
3200   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3201 else
3202   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3203   ac_dummy="$PATH"
3204   for ac_dir in $ac_dummy; do
3205     test -z "$ac_dir" && ac_dir=.
3206     if test -f $ac_dir/$ac_word; then
3207       ac_cv_prog_DLLTOOL="dlltool"
3208       break
3209     fi
3210   done
3211   IFS="$ac_save_ifs"
3212   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3213 fi
3214 fi
3215 DLLTOOL="$ac_cv_prog_DLLTOOL"
3216 if test -n "$DLLTOOL"; then
3217   echo "$ac_t""$DLLTOOL" 1>&6
3218 else
3219   echo "$ac_t""no" 1>&6
3220 fi
3221
3222 else
3223   DLLTOOL="false"
3224 fi
3225 fi
3226
3227   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3228 set dummy ${ac_tool_prefix}as; ac_word=$2
3229 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3230 echo "configure:3231: checking for $ac_word" >&5
3231 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3232   echo $ac_n "(cached) $ac_c" 1>&6
3233 else
3234   if test -n "$AS"; then
3235   ac_cv_prog_AS="$AS" # Let the user override the test.
3236 else
3237   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3238   ac_dummy="$PATH"
3239   for ac_dir in $ac_dummy; do
3240     test -z "$ac_dir" && ac_dir=.
3241     if test -f $ac_dir/$ac_word; then
3242       ac_cv_prog_AS="${ac_tool_prefix}as"
3243       break
3244     fi
3245   done
3246   IFS="$ac_save_ifs"
3247 fi
3248 fi
3249 AS="$ac_cv_prog_AS"
3250 if test -n "$AS"; then
3251   echo "$ac_t""$AS" 1>&6
3252 else
3253   echo "$ac_t""no" 1>&6
3254 fi
3255
3256
3257 if test -z "$ac_cv_prog_AS"; then
3258 if test -n "$ac_tool_prefix"; then
3259   # Extract the first word of "as", so it can be a program name with args.
3260 set dummy as; ac_word=$2
3261 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3262 echo "configure:3263: checking for $ac_word" >&5
3263 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3264   echo $ac_n "(cached) $ac_c" 1>&6
3265 else
3266   if test -n "$AS"; then
3267   ac_cv_prog_AS="$AS" # Let the user override the test.
3268 else
3269   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3270   ac_dummy="$PATH"
3271   for ac_dir in $ac_dummy; do
3272     test -z "$ac_dir" && ac_dir=.
3273     if test -f $ac_dir/$ac_word; then
3274       ac_cv_prog_AS="as"
3275       break
3276     fi
3277   done
3278   IFS="$ac_save_ifs"
3279   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3280 fi
3281 fi
3282 AS="$ac_cv_prog_AS"
3283 if test -n "$AS"; then
3284   echo "$ac_t""$AS" 1>&6
3285 else
3286   echo "$ac_t""no" 1>&6
3287 fi
3288
3289 else
3290   AS="false"
3291 fi
3292 fi
3293
3294   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3295 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3296 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3297 echo "configure:3298: checking for $ac_word" >&5
3298 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3299   echo $ac_n "(cached) $ac_c" 1>&6
3300 else
3301   if test -n "$OBJDUMP"; then
3302   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3303 else
3304   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3305   ac_dummy="$PATH"
3306   for ac_dir in $ac_dummy; do
3307     test -z "$ac_dir" && ac_dir=.
3308     if test -f $ac_dir/$ac_word; then
3309       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3310       break
3311     fi
3312   done
3313   IFS="$ac_save_ifs"
3314 fi
3315 fi
3316 OBJDUMP="$ac_cv_prog_OBJDUMP"
3317 if test -n "$OBJDUMP"; then
3318   echo "$ac_t""$OBJDUMP" 1>&6
3319 else
3320   echo "$ac_t""no" 1>&6
3321 fi
3322
3323
3324 if test -z "$ac_cv_prog_OBJDUMP"; then
3325 if test -n "$ac_tool_prefix"; then
3326   # Extract the first word of "objdump", so it can be a program name with args.
3327 set dummy objdump; ac_word=$2
3328 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3329 echo "configure:3330: checking for $ac_word" >&5
3330 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3331   echo $ac_n "(cached) $ac_c" 1>&6
3332 else
3333   if test -n "$OBJDUMP"; then
3334   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3335 else
3336   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3337   ac_dummy="$PATH"
3338   for ac_dir in $ac_dummy; do
3339     test -z "$ac_dir" && ac_dir=.
3340     if test -f $ac_dir/$ac_word; then
3341       ac_cv_prog_OBJDUMP="objdump"
3342       break
3343     fi
3344   done
3345   IFS="$ac_save_ifs"
3346   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3347 fi
3348 fi
3349 OBJDUMP="$ac_cv_prog_OBJDUMP"
3350 if test -n "$OBJDUMP"; then
3351   echo "$ac_t""$OBJDUMP" 1>&6
3352 else
3353   echo "$ac_t""no" 1>&6
3354 fi
3355
3356 else
3357   OBJDUMP="false"
3358 fi
3359 fi
3360
3361   ;;
3362
3363 esac
3364
3365
3366 # Save cache, so that ltconfig can load it
3367
3368
3369 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3370 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3371 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3372 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3373 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3374 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3375 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3376 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3377
3378 # Reload cache, that may have been modified by ltconfig
3379
3380
3381 # This can be used to rebuild libtool when needed
3382 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3383
3384 # Always use our own libtool.
3385 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3386
3387 # Redirect the config.log output again, so that the ltconfig log is not
3388 # clobbered by the next message.
3389 exec 5>>./config.log
3390
3391
3392 for ac_prog in mawk gawk nawk awk
3393 do
3394 # Extract the first word of "$ac_prog", so it can be a program name with args.
3395 set dummy $ac_prog; ac_word=$2
3396 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3397 echo "configure:3398: checking for $ac_word" >&5
3398 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3399   echo $ac_n "(cached) $ac_c" 1>&6
3400 else
3401   if test -n "$AWK"; then
3402   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3403 else
3404   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3405   ac_dummy="$PATH"
3406   for ac_dir in $ac_dummy; do
3407     test -z "$ac_dir" && ac_dir=.
3408     if test -f $ac_dir/$ac_word; then
3409       ac_cv_prog_AWK="$ac_prog"
3410       break
3411     fi
3412   done
3413   IFS="$ac_save_ifs"
3414 fi
3415 fi
3416 AWK="$ac_cv_prog_AWK"
3417 if test -n "$AWK"; then
3418   echo "$ac_t""$AWK" 1>&6
3419 else
3420   echo "$ac_t""no" 1>&6
3421 fi
3422
3423 test -n "$AWK" && break
3424 done
3425
3426 # test for ln hardlink support
3427 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3428 echo "configure:3429: checking whether ln works" >&5
3429 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3430   echo $ac_n "(cached) $ac_c" 1>&6
3431 else
3432   rm -f conftest.src conftest.dst
3433 echo "conftest" > conftest.src
3434 if ln conftest.src conftest.dst 2>/dev/null
3435 then
3436   ol_cv_prog_LN_H="ln"
3437 else
3438   ol_cv_prog_LN_H="cp"
3439 fi
3440 rm -f conftest.src conftest.dst
3441
3442 fi
3443 LN_H="$ol_cv_prog_LN_H"
3444 if test "$ol_cv_prog_LN_H" = "ln"; then
3445         echo "$ac_t""yes" 1>&6
3446 else
3447         echo "$ac_t""no" 1>&6
3448 fi
3449
3450 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3451 echo "configure:3452: checking whether ln -s works" >&5
3452 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3453   echo $ac_n "(cached) $ac_c" 1>&6
3454 else
3455   rm -f conftestdata
3456 if ln -s X conftestdata 2>/dev/null
3457 then
3458   rm -f conftestdata
3459   ac_cv_prog_LN_S="ln -s"
3460 else
3461   ac_cv_prog_LN_S=ln
3462 fi
3463 fi
3464 LN_S="$ac_cv_prog_LN_S"
3465 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3466   echo "$ac_t""yes" 1>&6
3467 else
3468   echo "$ac_t""no" 1>&6
3469 fi
3470
3471
3472 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3473         LN_S="$LN_H"
3474 fi
3475
3476 # Extract the first word of "sendmail", so it can be a program name with args.
3477 set dummy sendmail; ac_word=$2
3478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3479 echo "configure:3480: checking for $ac_word" >&5
3480 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3481   echo $ac_n "(cached) $ac_c" 1>&6
3482 else
3483   case "$SENDMAIL" in
3484   /*)
3485   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3486   ;;
3487   ?:/*)
3488   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3489   ;;
3490   *)
3491   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3492   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3493   for ac_dir in $ac_dummy; do 
3494     test -z "$ac_dir" && ac_dir=.
3495     if test -f $ac_dir/$ac_word; then
3496       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3497       break
3498     fi
3499   done
3500   IFS="$ac_save_ifs"
3501   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3502   ;;
3503 esac
3504 fi
3505 SENDMAIL="$ac_cv_path_SENDMAIL"
3506 if test -n "$SENDMAIL"; then
3507   echo "$ac_t""$SENDMAIL" 1>&6
3508 else
3509   echo "$ac_t""no" 1>&6
3510 fi
3511
3512 # Extract the first word of "vi", so it can be a program name with args.
3513 set dummy vi; ac_word=$2
3514 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3515 echo "configure:3516: checking for $ac_word" >&5
3516 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3517   echo $ac_n "(cached) $ac_c" 1>&6
3518 else
3519   case "$EDITOR" in
3520   /*)
3521   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3522   ;;
3523   ?:/*)
3524   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3525   ;;
3526   *)
3527   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3528   ac_dummy="$PATH:/usr/ucb"
3529   for ac_dir in $ac_dummy; do 
3530     test -z "$ac_dir" && ac_dir=.
3531     if test -f $ac_dir/$ac_word; then
3532       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3533       break
3534     fi
3535   done
3536   IFS="$ac_save_ifs"
3537   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3538   ;;
3539 esac
3540 fi
3541 EDITOR="$ac_cv_path_EDITOR"
3542 if test -n "$EDITOR"; then
3543   echo "$ac_t""$EDITOR" 1>&6
3544 else
3545   echo "$ac_t""no" 1>&6
3546 fi
3547
3548 # Extract the first word of "finger", so it can be a program name with args.
3549 set dummy finger; ac_word=$2
3550 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3551 echo "configure:3552: checking for $ac_word" >&5
3552 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3553   echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555   case "$FINGER" in
3556   /*)
3557   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3558   ;;
3559   ?:/*)
3560   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3561   ;;
3562   *)
3563   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3564   ac_dummy="$PATH:/usr/ucb"
3565   for ac_dir in $ac_dummy; do 
3566     test -z "$ac_dir" && ac_dir=.
3567     if test -f $ac_dir/$ac_word; then
3568       ac_cv_path_FINGER="$ac_dir/$ac_word"
3569       break
3570     fi
3571   done
3572   IFS="$ac_save_ifs"
3573   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3574   ;;
3575 esac
3576 fi
3577 FINGER="$ac_cv_path_FINGER"
3578 if test -n "$FINGER"; then
3579   echo "$ac_t""$FINGER" 1>&6
3580 else
3581   echo "$ac_t""no" 1>&6
3582 fi
3583
3584
3585 ol_link_perl=no
3586 if test $ol_enable_perl != no ; then
3587         # Extract the first word of "perl", so it can be a program name with args.
3588 set dummy perl; ac_word=$2
3589 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3590 echo "configure:3591: checking for $ac_word" >&5
3591 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3592   echo $ac_n "(cached) $ac_c" 1>&6
3593 else
3594   case "$PERLBIN" in
3595   /*)
3596   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3597   ;;
3598   ?:/*)
3599   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3600   ;;
3601   *)
3602   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3603   ac_dummy="$PATH"
3604   for ac_dir in $ac_dummy; do 
3605     test -z "$ac_dir" && ac_dir=.
3606     if test -f $ac_dir/$ac_word; then
3607       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3608       break
3609     fi
3610   done
3611   IFS="$ac_save_ifs"
3612   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3613   ;;
3614 esac
3615 fi
3616 PERLBIN="$ac_cv_path_PERLBIN"
3617 if test -n "$PERLBIN"; then
3618   echo "$ac_t""$PERLBIN" 1>&6
3619 else
3620   echo "$ac_t""no" 1>&6
3621 fi
3622
3623
3624         if test "no$PERLBIN" = "no" ; then
3625                 if test $ol_enable_perl = yes ; then
3626                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3627                 fi
3628
3629         else
3630                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3631                 if test x"$ol_with_perl_module" = "xstatic" ; then
3632                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3633                 else
3634                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3635                 fi
3636                                 ol_link_perl=yes
3637         fi
3638 fi
3639
3640 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3641 echo "configure:3642: checking how to run the C preprocessor" >&5
3642 # On Suns, sometimes $CPP names a directory.
3643 if test -n "$CPP" && test -d "$CPP"; then
3644   CPP=
3645 fi
3646 if test -z "$CPP"; then
3647 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3648   echo $ac_n "(cached) $ac_c" 1>&6
3649 else
3650     # This must be in double quotes, not single quotes, because CPP may get
3651   # substituted into the Makefile and "${CC-cc}" will confuse make.
3652   CPP="${CC-cc} -E"
3653   # On the NeXT, cc -E runs the code through the compiler's parser,
3654   # not just through cpp.
3655   cat > conftest.$ac_ext <<EOF
3656 #line 3657 "configure"
3657 #include "confdefs.h"
3658 #include <assert.h>
3659 Syntax Error
3660 EOF
3661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3662 { (eval echo configure:3663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3664 if test -z "$ac_err"; then
3665   :
3666 else
3667   echo "$ac_err" >&5
3668   echo "configure: failed program was:" >&5
3669   cat conftest.$ac_ext >&5
3670   rm -rf conftest*
3671   CPP="${CC-cc} -E -traditional-cpp"
3672   cat > conftest.$ac_ext <<EOF
3673 #line 3674 "configure"
3674 #include "confdefs.h"
3675 #include <assert.h>
3676 Syntax Error
3677 EOF
3678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3679 { (eval echo configure:3680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3681 if test -z "$ac_err"; then
3682   :
3683 else
3684   echo "$ac_err" >&5
3685   echo "configure: failed program was:" >&5
3686   cat conftest.$ac_ext >&5
3687   rm -rf conftest*
3688   CPP="${CC-cc} -nologo -E"
3689   cat > conftest.$ac_ext <<EOF
3690 #line 3691 "configure"
3691 #include "confdefs.h"
3692 #include <assert.h>
3693 Syntax Error
3694 EOF
3695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3696 { (eval echo configure:3697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3698 if test -z "$ac_err"; then
3699   :
3700 else
3701   echo "$ac_err" >&5
3702   echo "configure: failed program was:" >&5
3703   cat conftest.$ac_ext >&5
3704   rm -rf conftest*
3705   CPP=/lib/cpp
3706 fi
3707 rm -f conftest*
3708 fi
3709 rm -f conftest*
3710 fi
3711 rm -f conftest*
3712   ac_cv_prog_CPP="$CPP"
3713 fi
3714   CPP="$ac_cv_prog_CPP"
3715 else
3716   ac_cv_prog_CPP="$CPP"
3717 fi
3718 echo "$ac_t""$CPP" 1>&6
3719
3720
3721 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3722         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3723
3724 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3725         echo "configure: warning: programs compiled here do run here..." 1>&2
3726         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3727
3728 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3729         echo "configure: warning: programs compiled here do not run here..." 1>&2
3730         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3731 fi
3732
3733 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3734 echo "configure:3735: checking for AIX" >&5
3735 cat > conftest.$ac_ext <<EOF
3736 #line 3737 "configure"
3737 #include "confdefs.h"
3738 #ifdef _AIX
3739   yes
3740 #endif
3741
3742 EOF
3743 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3744   egrep "yes" >/dev/null 2>&1; then
3745   rm -rf conftest*
3746   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3747 #define _ALL_SOURCE 1
3748 EOF
3749
3750 else
3751   rm -rf conftest*
3752   echo "$ac_t""no" 1>&6
3753 fi
3754 rm -f conftest*
3755
3756
3757 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3758 echo "configure:3759: checking for POSIXized ISC" >&5
3759 if test -d /etc/conf/kconfig.d &&
3760   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3761 then
3762   echo "$ac_t""yes" 1>&6
3763   ISC=yes # If later tests want to check for ISC.
3764   cat >> confdefs.h <<\EOF
3765 #define _POSIX_SOURCE 1
3766 EOF
3767
3768   if test "$GCC" = yes; then
3769     CC="$CC -posix"
3770   else
3771     CC="$CC -Xp"
3772   fi
3773 else
3774   echo "$ac_t""no" 1>&6
3775   ISC=
3776 fi
3777
3778 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3779 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3780 echo "configure:3781: checking for minix/config.h" >&5
3781 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3782   echo $ac_n "(cached) $ac_c" 1>&6
3783 else
3784   cat > conftest.$ac_ext <<EOF
3785 #line 3786 "configure"
3786 #include "confdefs.h"
3787 #include <minix/config.h>
3788 EOF
3789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3790 { (eval echo configure:3791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3792 if test -z "$ac_err"; then
3793   rm -rf conftest*
3794   eval "ac_cv_header_$ac_safe=yes"
3795 else
3796   echo "$ac_err" >&5
3797   echo "configure: failed program was:" >&5
3798   cat conftest.$ac_ext >&5
3799   rm -rf conftest*
3800   eval "ac_cv_header_$ac_safe=no"
3801 fi
3802 rm -f conftest*
3803 fi
3804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3805   echo "$ac_t""yes" 1>&6
3806   MINIX=yes
3807 else
3808   echo "$ac_t""no" 1>&6
3809 MINIX=
3810 fi
3811
3812 if test "$MINIX" = yes; then
3813   cat >> confdefs.h <<\EOF
3814 #define _POSIX_SOURCE 1
3815 EOF
3816
3817   cat >> confdefs.h <<\EOF
3818 #define _POSIX_1_SOURCE 2
3819 EOF
3820
3821   cat >> confdefs.h <<\EOF
3822 #define _MINIX 1
3823 EOF
3824
3825 fi
3826
3827
3828 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3829 echo "configure:3830: checking for Cygwin environment" >&5
3830 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3831   echo $ac_n "(cached) $ac_c" 1>&6
3832 else
3833   cat > conftest.$ac_ext <<EOF
3834 #line 3835 "configure"
3835 #include "confdefs.h"
3836
3837 int main() {
3838
3839 #ifndef __CYGWIN__
3840 #define __CYGWIN__ __CYGWIN32__
3841 #endif
3842 return __CYGWIN__;
3843 ; return 0; }
3844 EOF
3845 if { (eval echo configure:3846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3846   rm -rf conftest*
3847   ac_cv_cygwin=yes
3848 else
3849   echo "configure: failed program was:" >&5
3850   cat conftest.$ac_ext >&5
3851   rm -rf conftest*
3852   ac_cv_cygwin=no
3853 fi
3854 rm -f conftest*
3855 fi
3856
3857 echo "$ac_t""$ac_cv_cygwin" 1>&6
3858 CYGWIN=
3859 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3860 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3861 echo "configure:3862: checking for mingw32 environment" >&5
3862 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3863   echo $ac_n "(cached) $ac_c" 1>&6
3864 else
3865   cat > conftest.$ac_ext <<EOF
3866 #line 3867 "configure"
3867 #include "confdefs.h"
3868
3869 int main() {
3870 return __MINGW32__;
3871 ; return 0; }
3872 EOF
3873 if { (eval echo configure:3874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3874   rm -rf conftest*
3875   ac_cv_mingw32=yes
3876 else
3877   echo "configure: failed program was:" >&5
3878   cat conftest.$ac_ext >&5
3879   rm -rf conftest*
3880   ac_cv_mingw32=no
3881 fi
3882 rm -f conftest*
3883 fi
3884
3885 echo "$ac_t""$ac_cv_mingw32" 1>&6
3886 MINGW32=
3887 test "$ac_cv_mingw32" = yes && MINGW32=yes
3888 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3889 echo "configure:3890: checking for EMX OS/2 environment" >&5
3890 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3891   echo $ac_n "(cached) $ac_c" 1>&6
3892 else
3893   cat > conftest.$ac_ext <<EOF
3894 #line 3895 "configure"
3895 #include "confdefs.h"
3896
3897 int main() {
3898 return __EMX__;
3899 ; return 0; }
3900 EOF
3901 if { (eval echo configure:3902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3902   rm -rf conftest*
3903   ac_cv_emxos2=yes
3904 else
3905   echo "configure: failed program was:" >&5
3906   cat conftest.$ac_ext >&5
3907   rm -rf conftest*
3908   ac_cv_emxos2=no
3909 fi
3910 rm -f conftest*
3911 fi
3912
3913 echo "$ac_t""$ac_cv_emxos2" 1>&6
3914 EMXOS2=
3915 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3916
3917
3918
3919 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3920 echo "configure:3921: checking for executable suffix" >&5
3921 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3922   echo $ac_n "(cached) $ac_c" 1>&6
3923 else
3924   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3925   ac_cv_exeext=.exe
3926 else
3927   rm -f conftest*
3928   echo 'int main () { return 0; }' > conftest.$ac_ext
3929   ac_cv_exeext=
3930   if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3931     for file in conftest.*; do
3932       case $file in
3933       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3934       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3935       esac
3936     done
3937   else
3938     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3939   fi
3940   rm -f conftest*
3941   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3942 fi
3943 fi
3944
3945 EXEEXT=""
3946 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3947 echo "$ac_t""${ac_cv_exeext}" 1>&6
3948 ac_exeext=$EXEEXT
3949
3950 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3951 echo "configure:3952: checking for object suffix" >&5
3952 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3953   echo $ac_n "(cached) $ac_c" 1>&6
3954 else
3955   rm -f conftest*
3956 echo 'int i = 1;' > conftest.$ac_ext
3957 if { (eval echo configure:3958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3958   for ac_file in conftest.*; do
3959     case $ac_file in
3960     *.c) ;;
3961     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3962     esac
3963   done
3964 else
3965   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3966 fi
3967 rm -f conftest*
3968 fi
3969
3970 echo "$ac_t""$ac_cv_objext" 1>&6
3971 OBJEXT=$ac_cv_objext
3972 ac_objext=$ac_cv_objext
3973
3974
3975 cat >> confdefs.h <<EOF
3976 #define EXEEXT "${EXEEXT}"
3977 EOF
3978
3979
3980 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3981 echo "configure:3982: checking for be_app in -lbe" >&5
3982 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3984   echo $ac_n "(cached) $ac_c" 1>&6
3985 else
3986   ac_save_LIBS="$LIBS"
3987 LIBS="-lbe -lroot -lnet $LIBS"
3988 cat > conftest.$ac_ext <<EOF
3989 #line 3990 "configure"
3990 #include "confdefs.h"
3991 /* Override any gcc2 internal prototype to avoid an error.  */
3992 /* We use char because int might match the return type of a gcc2
3993     builtin and then its argument prototype would still apply.  */
3994 char be_app();
3995
3996 int main() {
3997 be_app()
3998 ; return 0; }
3999 EOF
4000 if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4001   rm -rf conftest*
4002   eval "ac_cv_lib_$ac_lib_var=yes"
4003 else
4004   echo "configure: failed program was:" >&5
4005   cat conftest.$ac_ext >&5
4006   rm -rf conftest*
4007   eval "ac_cv_lib_$ac_lib_var=no"
4008 fi
4009 rm -f conftest*
4010 LIBS="$ac_save_LIBS"
4011
4012 fi
4013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4014   echo "$ac_t""yes" 1>&6
4015   LIBS="$LIBS -lbe -lroot -lnet"
4016 else
4017   echo "$ac_t""no" 1>&6
4018 :
4019 fi
4020
4021
4022
4023
4024
4025 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4026 echo "configure:4027: checking for ${CC-cc} option to accept ANSI C" >&5
4027 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4028   echo $ac_n "(cached) $ac_c" 1>&6
4029 else
4030   am_cv_prog_cc_stdc=no
4031 ac_save_CC="$CC"
4032 # Don't try gcc -ansi; that turns off useful extensions and
4033 # breaks some systems' header files.
4034 # AIX                   -qlanglvl=ansi
4035 # Ultrix and OSF/1      -std1
4036 # HP-UX 10.20 and later -Ae
4037 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4038 # SVR4                  -Xc -D__EXTENSIONS__
4039 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4040 do
4041   CC="$ac_save_CC $ac_arg"
4042   cat > conftest.$ac_ext <<EOF
4043 #line 4044 "configure"
4044 #include "confdefs.h"
4045 #include <stdarg.h>
4046 #include <stdio.h>
4047 #include <sys/types.h>
4048 #include <sys/stat.h>
4049 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4050 struct buf { int x; };
4051 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4052 static char *e (p, i)
4053      char **p;
4054      int i;
4055 {
4056   return p[i];
4057 }
4058 static char *f (char * (*g) (char **, int), char **p, ...)
4059 {
4060   char *s;
4061   va_list v;
4062   va_start (v,p);
4063   s = g (p, va_arg (v,int));
4064   va_end (v);
4065   return s;
4066 }
4067 int test (int i, double x);
4068 struct s1 {int (*f) (int a);};
4069 struct s2 {int (*f) (double a);};
4070 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4071 int argc;
4072 char **argv;
4073
4074 int main() {
4075
4076 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4077
4078 ; return 0; }
4079 EOF
4080 if { (eval echo configure:4081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4081   rm -rf conftest*
4082   am_cv_prog_cc_stdc="$ac_arg"; break
4083 else
4084   echo "configure: failed program was:" >&5
4085   cat conftest.$ac_ext >&5
4086 fi
4087 rm -f conftest*
4088 done
4089 CC="$ac_save_CC"
4090
4091 fi
4092
4093 if test -z "$am_cv_prog_cc_stdc"; then
4094   echo "$ac_t""none needed" 1>&6
4095 else
4096   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4097 fi
4098 case "x$am_cv_prog_cc_stdc" in
4099   x|xno) ;;
4100   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4101 esac
4102
4103 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4104         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4105 fi
4106
4107 # test for make depend flag
4108 OL_MKDEP=
4109 OL_MKDEP_FLAGS=
4110 if test -z "${MKDEP}"; then
4111         OL_MKDEP="${CC-cc}"
4112         if test -z "${MKDEP_FLAGS}"; then
4113                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4114 echo "configure:4115: checking for ${OL_MKDEP} depend flag" >&5
4115 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4116   echo $ac_n "(cached) $ac_c" 1>&6
4117 else
4118   
4119                         ol_cv_mkdep=no
4120                         for flag in "-M" "-xM"; do
4121                                 cat > conftest.c <<EOF
4122  noCode;
4123 EOF
4124                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4125                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4126                                 then
4127                                         if test ! -f conftest."${ac_object}" ; then
4128                                                 ol_cv_mkdep=$flag
4129                                                 OL_MKDEP_FLAGS="$flag"
4130                                                 break
4131                                         fi
4132                                 fi
4133                         done
4134                         rm -f conftest*
4135                 
4136 fi
4137
4138 echo "$ac_t""$ol_cv_mkdep" 1>&6
4139         else
4140                 cc_cv_mkdep=yes
4141                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4142         fi
4143 else
4144         cc_cv_mkdep=yes
4145         OL_MKDEP="${MKDEP}"
4146         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4147 fi
4148
4149
4150
4151 if test "${ol_cv_mkdep}" = no ; then
4152         # this will soon become an error
4153         echo "configure: warning: do not know how to generate dependencies" 1>&2
4154 fi
4155
4156 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4157 echo "configure:4158: checking for afopen in -ls" >&5
4158 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4159 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4160   echo $ac_n "(cached) $ac_c" 1>&6
4161 else
4162   ac_save_LIBS="$LIBS"
4163 LIBS="-ls  $LIBS"
4164 cat > conftest.$ac_ext <<EOF
4165 #line 4166 "configure"
4166 #include "confdefs.h"
4167 /* Override any gcc2 internal prototype to avoid an error.  */
4168 /* We use char because int might match the return type of a gcc2
4169     builtin and then its argument prototype would still apply.  */
4170 char afopen();
4171
4172 int main() {
4173 afopen()
4174 ; return 0; }
4175 EOF
4176 if { (eval echo configure:4177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4177   rm -rf conftest*
4178   eval "ac_cv_lib_$ac_lib_var=yes"
4179 else
4180   echo "configure: failed program was:" >&5
4181   cat conftest.$ac_ext >&5
4182   rm -rf conftest*
4183   eval "ac_cv_lib_$ac_lib_var=no"
4184 fi
4185 rm -f conftest*
4186 LIBS="$ac_save_LIBS"
4187
4188 fi
4189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4190   echo "$ac_t""yes" 1>&6
4191   
4192         AUTH_LIBS=-ls
4193         cat >> confdefs.h <<\EOF
4194 #define HAVE_AIX_SECURITY 1
4195 EOF
4196
4197
4198 else
4199   echo "$ac_t""no" 1>&6
4200 fi
4201
4202
4203 ol_link_modules=no
4204 if test $ol_enable_modules != no ; then
4205         for ac_hdr in ltdl.h
4206 do
4207 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4208 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4209 echo "configure:4210: checking for $ac_hdr" >&5
4210 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4211   echo $ac_n "(cached) $ac_c" 1>&6
4212 else
4213   cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216 #include <$ac_hdr>
4217 EOF
4218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4219 { (eval echo configure:4220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4221 if test -z "$ac_err"; then
4222   rm -rf conftest*
4223   eval "ac_cv_header_$ac_safe=yes"
4224 else
4225   echo "$ac_err" >&5
4226   echo "configure: failed program was:" >&5
4227   cat conftest.$ac_ext >&5
4228   rm -rf conftest*
4229   eval "ac_cv_header_$ac_safe=no"
4230 fi
4231 rm -f conftest*
4232 fi
4233 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4234   echo "$ac_t""yes" 1>&6
4235     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4236   cat >> confdefs.h <<EOF
4237 #define $ac_tr_hdr 1
4238 EOF
4239  
4240 else
4241   echo "$ac_t""no" 1>&6
4242 fi
4243 done
4244
4245
4246         if test $ac_cv_header_ltdl_h = no ; then
4247                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4248         fi
4249
4250         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4251 echo "configure:4252: checking for lt_dlinit in -lltdl" >&5
4252 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4253 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4254   echo $ac_n "(cached) $ac_c" 1>&6
4255 else
4256   ac_save_LIBS="$LIBS"
4257 LIBS="-lltdl  $LIBS"
4258 cat > conftest.$ac_ext <<EOF
4259 #line 4260 "configure"
4260 #include "confdefs.h"
4261 /* Override any gcc2 internal prototype to avoid an error.  */
4262 /* We use char because int might match the return type of a gcc2
4263     builtin and then its argument prototype would still apply.  */
4264 char lt_dlinit();
4265
4266 int main() {
4267 lt_dlinit()
4268 ; return 0; }
4269 EOF
4270 if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4271   rm -rf conftest*
4272   eval "ac_cv_lib_$ac_lib_var=yes"
4273 else
4274   echo "configure: failed program was:" >&5
4275   cat conftest.$ac_ext >&5
4276   rm -rf conftest*
4277   eval "ac_cv_lib_$ac_lib_var=no"
4278 fi
4279 rm -f conftest*
4280 LIBS="$ac_save_LIBS"
4281
4282 fi
4283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4284   echo "$ac_t""yes" 1>&6
4285   
4286             MODULES_LIBS=-lltdl
4287             cat >> confdefs.h <<\EOF
4288 #define HAVE_LIBLTDL 1
4289 EOF
4290
4291         
4292 else
4293   echo "$ac_t""no" 1>&6
4294 fi
4295
4296
4297         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4298                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4299         fi
4300         ol_link_modules=yes
4301 else
4302         ol_with_bdb2_module=static
4303         ol_with_dnssrv_module=static
4304         ol_with_ldap_module=static
4305         ol_with_ldbm_module=static
4306         ol_with_passwd_module=static
4307         ol_with_perl_module=static
4308         ol_with_shell_module=static
4309         ol_with_tcl_module=static
4310         ol_with_sql_module=static
4311 fi
4312
4313 # test for EBCDIC
4314 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4315 echo "configure:4316: checking for EBCDIC" >&5
4316 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4317   echo $ac_n "(cached) $ac_c" 1>&6
4318 else
4319   
4320         cat > conftest.$ac_ext <<EOF
4321 #line 4322 "configure"
4322 #include "confdefs.h"
4323
4324 #if !('M' == 0xd4)
4325 #include <__ASCII__/generate_error.h>
4326 #endif
4327
4328 EOF
4329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4330 { (eval echo configure:4331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4332 if test -z "$ac_err"; then
4333   rm -rf conftest*
4334   ol_cv_cpp_ebcdic=yes
4335 else
4336   echo "$ac_err" >&5
4337   echo "configure: failed program was:" >&5
4338   cat conftest.$ac_ext >&5
4339   rm -rf conftest*
4340   ol_cv_cpp_ebcdic=no
4341 fi
4342 rm -f conftest*
4343 fi
4344
4345 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4346 if test $ol_cv_cpp_ebcdic = yes ; then
4347         cat >> confdefs.h <<\EOF
4348 #define HAVE_EBCDIC 1
4349 EOF
4350
4351 fi
4352
4353 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4354 echo "configure:4355: checking for ANSI C header files" >&5
4355 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4356   echo $ac_n "(cached) $ac_c" 1>&6
4357 else
4358   cat > conftest.$ac_ext <<EOF
4359 #line 4360 "configure"
4360 #include "confdefs.h"
4361 #include <stdlib.h>
4362 #include <stdarg.h>
4363 #include <string.h>
4364 #include <float.h>
4365 EOF
4366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4367 { (eval echo configure:4368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4369 if test -z "$ac_err"; then
4370   rm -rf conftest*
4371   ol_cv_header_stdc=yes
4372 else
4373   echo "$ac_err" >&5
4374   echo "configure: failed program was:" >&5
4375   cat conftest.$ac_ext >&5
4376   rm -rf conftest*
4377   ol_cv_header_stdc=no
4378 fi
4379 rm -f conftest*
4380
4381 if test $ol_cv_header_stdc = yes; then
4382   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4383 cat > conftest.$ac_ext <<EOF
4384 #line 4385 "configure"
4385 #include "confdefs.h"
4386 #include <string.h>
4387 EOF
4388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4389   egrep "memchr" >/dev/null 2>&1; then
4390   :
4391 else
4392   rm -rf conftest*
4393   ol_cv_header_stdc=no
4394 fi
4395 rm -f conftest*
4396
4397 fi
4398
4399 if test $ol_cv_header_stdc = yes; then
4400   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4401 cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404 #include <stdlib.h>
4405 EOF
4406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4407   egrep "free" >/dev/null 2>&1; then
4408   :
4409 else
4410   rm -rf conftest*
4411   ol_cv_header_stdc=no
4412 fi
4413 rm -f conftest*
4414
4415 fi
4416
4417 if test $ol_cv_header_stdc = yes; then
4418   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4419 if test "$cross_compiling" = yes; then
4420   :
4421 else
4422   cat > conftest.$ac_ext <<EOF
4423 #line 4424 "configure"
4424 #include "confdefs.h"
4425 #include <ctype.h>
4426 #ifndef HAVE_EBCDIC
4427 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4428 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4429 #else
4430 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4431                 || ('j' <= (c) && (c) <= 'r') \
4432                 || ('s' <= (c) && (c) <= 'z'))
4433 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4434 #endif
4435 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4436 int main () { int i; for (i = 0; i < 256; i++)
4437 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4438 exit (0); }
4439
4440 EOF
4441 if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4442 then
4443   :
4444 else
4445   echo "configure: failed program was:" >&5
4446   cat conftest.$ac_ext >&5
4447   rm -fr conftest*
4448   ol_cv_header_stdc=no
4449 fi
4450 rm -fr conftest*
4451 fi
4452
4453 fi
4454 fi
4455
4456 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4457 if test $ol_cv_header_stdc = yes; then
4458   cat >> confdefs.h <<\EOF
4459 #define STDC_HEADERS 1
4460 EOF
4461
4462 fi
4463 ac_cv_header_stdc=disable
4464
4465
4466 if test $ol_cv_header_stdc != yes; then
4467         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4468 fi
4469
4470 ac_header_dirent=no
4471 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4472 do
4473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4474 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4475 echo "configure:4476: checking for $ac_hdr that defines DIR" >&5
4476 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4477   echo $ac_n "(cached) $ac_c" 1>&6
4478 else
4479   cat > conftest.$ac_ext <<EOF
4480 #line 4481 "configure"
4481 #include "confdefs.h"
4482 #include <sys/types.h>
4483 #include <$ac_hdr>
4484 int main() {
4485 DIR *dirp = 0;
4486 ; return 0; }
4487 EOF
4488 if { (eval echo configure:4489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4489   rm -rf conftest*
4490   eval "ac_cv_header_dirent_$ac_safe=yes"
4491 else
4492   echo "configure: failed program was:" >&5
4493   cat conftest.$ac_ext >&5
4494   rm -rf conftest*
4495   eval "ac_cv_header_dirent_$ac_safe=no"
4496 fi
4497 rm -f conftest*
4498 fi
4499 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4500   echo "$ac_t""yes" 1>&6
4501     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4502   cat >> confdefs.h <<EOF
4503 #define $ac_tr_hdr 1
4504 EOF
4505  ac_header_dirent=$ac_hdr; break
4506 else
4507   echo "$ac_t""no" 1>&6
4508 fi
4509 done
4510 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4511 if test $ac_header_dirent = dirent.h; then
4512 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4513 echo "configure:4514: checking for opendir in -ldir" >&5
4514 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4515 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4516   echo $ac_n "(cached) $ac_c" 1>&6
4517 else
4518   ac_save_LIBS="$LIBS"
4519 LIBS="-ldir  $LIBS"
4520 cat > conftest.$ac_ext <<EOF
4521 #line 4522 "configure"
4522 #include "confdefs.h"
4523 /* Override any gcc2 internal prototype to avoid an error.  */
4524 /* We use char because int might match the return type of a gcc2
4525     builtin and then its argument prototype would still apply.  */
4526 char opendir();
4527
4528 int main() {
4529 opendir()
4530 ; return 0; }
4531 EOF
4532 if { (eval echo configure:4533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4533   rm -rf conftest*
4534   eval "ac_cv_lib_$ac_lib_var=yes"
4535 else
4536   echo "configure: failed program was:" >&5
4537   cat conftest.$ac_ext >&5
4538   rm -rf conftest*
4539   eval "ac_cv_lib_$ac_lib_var=no"
4540 fi
4541 rm -f conftest*
4542 LIBS="$ac_save_LIBS"
4543
4544 fi
4545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4546   echo "$ac_t""yes" 1>&6
4547   LIBS="$LIBS -ldir"
4548 else
4549   echo "$ac_t""no" 1>&6
4550 fi
4551
4552 else
4553 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4554 echo "configure:4555: checking for opendir in -lx" >&5
4555 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4556 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4557   echo $ac_n "(cached) $ac_c" 1>&6
4558 else
4559   ac_save_LIBS="$LIBS"
4560 LIBS="-lx  $LIBS"
4561 cat > conftest.$ac_ext <<EOF
4562 #line 4563 "configure"
4563 #include "confdefs.h"
4564 /* Override any gcc2 internal prototype to avoid an error.  */
4565 /* We use char because int might match the return type of a gcc2
4566     builtin and then its argument prototype would still apply.  */
4567 char opendir();
4568
4569 int main() {
4570 opendir()
4571 ; return 0; }
4572 EOF
4573 if { (eval echo configure:4574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4574   rm -rf conftest*
4575   eval "ac_cv_lib_$ac_lib_var=yes"
4576 else
4577   echo "configure: failed program was:" >&5
4578   cat conftest.$ac_ext >&5
4579   rm -rf conftest*
4580   eval "ac_cv_lib_$ac_lib_var=no"
4581 fi
4582 rm -f conftest*
4583 LIBS="$ac_save_LIBS"
4584
4585 fi
4586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4587   echo "$ac_t""yes" 1>&6
4588   LIBS="$LIBS -lx"
4589 else
4590   echo "$ac_t""no" 1>&6
4591 fi
4592
4593 fi
4594
4595 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4596 echo "configure:4597: checking for sys/wait.h that is POSIX.1 compatible" >&5
4597 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4598   echo $ac_n "(cached) $ac_c" 1>&6
4599 else
4600   cat > conftest.$ac_ext <<EOF
4601 #line 4602 "configure"
4602 #include "confdefs.h"
4603 #include <sys/types.h>
4604 #include <sys/wait.h>
4605 #ifndef WEXITSTATUS
4606 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4607 #endif
4608 #ifndef WIFEXITED
4609 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4610 #endif
4611 int main() {
4612 int s;
4613 wait (&s);
4614 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4615 ; return 0; }
4616 EOF
4617 if { (eval echo configure:4618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4618   rm -rf conftest*
4619   ac_cv_header_sys_wait_h=yes
4620 else
4621   echo "configure: failed program was:" >&5
4622   cat conftest.$ac_ext >&5
4623   rm -rf conftest*
4624   ac_cv_header_sys_wait_h=no
4625 fi
4626 rm -f conftest*
4627 fi
4628
4629 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4630 if test $ac_cv_header_sys_wait_h = yes; then
4631   cat >> confdefs.h <<\EOF
4632 #define HAVE_SYS_WAIT_H 1
4633 EOF
4634
4635 fi
4636
4637 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4638 echo "configure:4639: checking POSIX termios" >&5
4639 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4640   echo $ac_n "(cached) $ac_c" 1>&6
4641 else
4642   cat > conftest.$ac_ext <<EOF
4643 #line 4644 "configure"
4644 #include "confdefs.h"
4645 #include <sys/types.h>
4646 #include <unistd.h>
4647 #include <termios.h>
4648 int main() {
4649 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4650    tcgetattr(0, 0);
4651 ; return 0; }
4652 EOF
4653 if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4654   rm -rf conftest*
4655   am_cv_sys_posix_termios=yes
4656 else
4657   echo "configure: failed program was:" >&5
4658   cat conftest.$ac_ext >&5
4659   rm -rf conftest*
4660   am_cv_sys_posix_termios=no
4661 fi
4662 rm -f conftest*
4663 fi
4664
4665 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4666
4667
4668  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4669 echo "configure:4670: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4670 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4671   echo $ac_n "(cached) $ac_c" 1>&6
4672 else
4673   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4674
4675   gwinsz_in_termios_h=no
4676   if test $am_cv_sys_posix_termios = yes; then
4677     cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 #include <sys/types.h>
4681 #     include <termios.h>
4682 #     ifdef TIOCGWINSZ
4683         yes
4684 #     endif
4685     
4686 EOF
4687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4688   egrep "yes" >/dev/null 2>&1; then
4689   rm -rf conftest*
4690   gwinsz_in_termios_h=yes
4691 fi
4692 rm -f conftest*
4693
4694   fi
4695
4696   if test $gwinsz_in_termios_h = no; then
4697     cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 #include <sys/types.h>
4701 #     include <sys/ioctl.h>
4702 #     ifdef TIOCGWINSZ
4703         yes
4704 #     endif
4705     
4706 EOF
4707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4708   egrep "yes" >/dev/null 2>&1; then
4709   rm -rf conftest*
4710   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4711 fi
4712 rm -f conftest*
4713
4714   fi
4715   
4716 fi
4717
4718 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4719   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4720     cat >> confdefs.h <<\EOF
4721 #define GWINSZ_IN_SYS_IOCTL 1
4722 EOF
4723
4724   fi
4725
4726 if test $am_cv_sys_posix_termios = yes ; then
4727         cat >> confdefs.h <<\EOF
4728 #define HAVE_POSIX_TERMIOS 1
4729 EOF
4730
4731 fi
4732
4733 for ac_hdr in \
4734         arpa/inet.h             \
4735         arpa/nameser.h  \
4736         assert.h                \
4737         conio.h                 \
4738         crypt.h                 \
4739         direct.h                \
4740         errno.h                 \
4741         fcntl.h                 \
4742         filio.h                 \
4743         getopt.h                \
4744         grp.h                   \
4745         io.h                    \
4746         libutil.h               \
4747         limits.h                \
4748         locale.h                \
4749         netinet/tcp.h   \
4750         malloc.h                \
4751         memory.h                \
4752         psap.h                  \
4753         pwd.h                   \
4754         process.h               \
4755         resolv.h                \
4756         sgtty.h                 \
4757         shadow.h                \
4758         stddef.h                \
4759         string.h                \
4760         strings.h               \
4761         sysexits.h              \
4762         sys/file.h              \
4763         sys/filio.h             \
4764         sys/errno.h             \
4765         sys/ioctl.h             \
4766         sys/param.h             \
4767         sys/resource.h  \
4768         sys/select.h    \
4769         sys/socket.h    \
4770         sys/syslog.h    \
4771         sys/time.h              \
4772         sys/types.h             \
4773         syslog.h                \
4774         termios.h               \
4775         unistd.h                \
4776         winsock.h               \
4777
4778 do
4779 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4780 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4781 echo "configure:4782: checking for $ac_hdr" >&5
4782 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788 #include <$ac_hdr>
4789 EOF
4790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4791 { (eval echo configure:4792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4793 if test -z "$ac_err"; then
4794   rm -rf conftest*
4795   eval "ac_cv_header_$ac_safe=yes"
4796 else
4797   echo "$ac_err" >&5
4798   echo "configure: failed program was:" >&5
4799   cat conftest.$ac_ext >&5
4800   rm -rf conftest*
4801   eval "ac_cv_header_$ac_safe=no"
4802 fi
4803 rm -f conftest*
4804 fi
4805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4806   echo "$ac_t""yes" 1>&6
4807     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4808   cat >> confdefs.h <<EOF
4809 #define $ac_tr_hdr 1
4810 EOF
4811  
4812 else
4813   echo "$ac_t""no" 1>&6
4814 fi
4815 done
4816
4817
4818
4819
4820 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4821 echo "configure:4822: checking for sigset in -lV3" >&5
4822 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4823 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4824   echo $ac_n "(cached) $ac_c" 1>&6
4825 else
4826   ac_save_LIBS="$LIBS"
4827 LIBS="-lV3  $LIBS"
4828 cat > conftest.$ac_ext <<EOF
4829 #line 4830 "configure"
4830 #include "confdefs.h"
4831 /* Override any gcc2 internal prototype to avoid an error.  */
4832 /* We use char because int might match the return type of a gcc2
4833     builtin and then its argument prototype would still apply.  */
4834 char sigset();
4835
4836 int main() {
4837 sigset()
4838 ; return 0; }
4839 EOF
4840 if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4841   rm -rf conftest*
4842   eval "ac_cv_lib_$ac_lib_var=yes"
4843 else
4844   echo "configure: failed program was:" >&5
4845   cat conftest.$ac_ext >&5
4846   rm -rf conftest*
4847   eval "ac_cv_lib_$ac_lib_var=no"
4848 fi
4849 rm -f conftest*
4850 LIBS="$ac_save_LIBS"
4851
4852 fi
4853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4854   echo "$ac_t""yes" 1>&6
4855     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4856     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4857   cat >> confdefs.h <<EOF
4858 #define $ac_tr_lib 1
4859 EOF
4860
4861   LIBS="-lV3 $LIBS"
4862
4863 else
4864   echo "$ac_t""no" 1>&6
4865 fi
4866
4867
4868 if test $ac_cv_header_winsock_h = yes; then
4869         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4870 echo "configure:4871: checking for winsock" >&5
4871 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4872   echo $ac_n "(cached) $ac_c" 1>&6
4873 else
4874   cat > conftest.$ac_ext <<EOF
4875 #line 4876 "configure"
4876 #include "confdefs.h"
4877 #include <winsock.h>
4878 int main() {
4879
4880                         socket(0,0,0);
4881                         select(0,NULL,NULL,NULL,NULL);
4882                         closesocket(0);
4883                         gethostname(NULL,0);
4884         
4885 ; return 0; }
4886 EOF
4887 if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4888   rm -rf conftest*
4889   ol_cv_winsock=yes
4890 else
4891   echo "configure: failed program was:" >&5
4892   cat conftest.$ac_ext >&5
4893   rm -rf conftest*
4894   ol_cv_winsock=no
4895 fi
4896 rm -f conftest*]
4897 fi
4898
4899 echo "$ac_t""$ol_cv_winsock" 1>&6
4900
4901         if test $ol_cv_winsock = yes ; then
4902                 cat >> confdefs.h <<\EOF
4903 #define HAVE_WINSOCK 1
4904 EOF
4905
4906                 ac_cv_func_socket=yes
4907                 ac_cv_func_select=yes
4908                 ac_cv_func_closesocket=yes
4909                 ac_cv_func_gethostname=yes
4910         fi
4911 fi
4912
4913
4914 echo $ac_n "checking for socket""... $ac_c" 1>&6
4915 echo "configure:4916: checking for socket" >&5
4916 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4917   echo $ac_n "(cached) $ac_c" 1>&6
4918 else
4919   cat > conftest.$ac_ext <<EOF
4920 #line 4921 "configure"
4921 #include "confdefs.h"
4922 /* System header to define __stub macros and hopefully few prototypes,
4923     which can conflict with char socket(); below.  */
4924 #include <assert.h>
4925 /* Override any gcc2 internal prototype to avoid an error.  */
4926 /* We use char because int might match the return type of a gcc2
4927     builtin and then its argument prototype would still apply.  */
4928 char socket();
4929 char (*f)();
4930
4931 int main() {
4932
4933 /* The GNU C library defines this for functions which it implements
4934     to always fail with ENOSYS.  Some functions are actually named
4935     something starting with __ and the normal name is an alias.  */
4936 #if defined (__stub_socket) || defined (__stub___socket)
4937 choke me
4938 #else
4939 f = socket;
4940 #endif
4941
4942 ; return 0; }
4943 EOF
4944 if { (eval echo configure:4945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4945   rm -rf conftest*
4946   eval "ac_cv_func_socket=yes"
4947 else
4948   echo "configure: failed program was:" >&5
4949   cat conftest.$ac_ext >&5
4950   rm -rf conftest*
4951   eval "ac_cv_func_socket=no"
4952 fi
4953 rm -f conftest*
4954 fi
4955
4956 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4957   echo "$ac_t""yes" 1>&6
4958   :
4959 else
4960   echo "$ac_t""no" 1>&6
4961         
4962         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4963 echo "configure:4964: checking for main in -lsocket" >&5
4964 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4965 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4966   echo $ac_n "(cached) $ac_c" 1>&6
4967 else
4968   ac_save_LIBS="$LIBS"
4969 LIBS="-lsocket  $LIBS"
4970 cat > conftest.$ac_ext <<EOF
4971 #line 4972 "configure"
4972 #include "confdefs.h"
4973
4974 int main() {
4975 main()
4976 ; return 0; }
4977 EOF
4978 if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4979   rm -rf conftest*
4980   eval "ac_cv_lib_$ac_lib_var=yes"
4981 else
4982   echo "configure: failed program was:" >&5
4983   cat conftest.$ac_ext >&5
4984   rm -rf conftest*
4985   eval "ac_cv_lib_$ac_lib_var=no"
4986 fi
4987 rm -f conftest*
4988 LIBS="$ac_save_LIBS"
4989
4990 fi
4991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4992   echo "$ac_t""yes" 1>&6
4993     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4994     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4995   cat >> confdefs.h <<EOF
4996 #define $ac_tr_lib 1
4997 EOF
4998
4999   LIBS="-lsocket $LIBS"
5000
5001 else
5002   echo "$ac_t""no" 1>&6
5003 fi
5004
5005         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5006 echo "configure:5007: checking for main in -lnet" >&5
5007 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5008 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5009   echo $ac_n "(cached) $ac_c" 1>&6
5010 else
5011   ac_save_LIBS="$LIBS"
5012 LIBS="-lnet  $LIBS"
5013 cat > conftest.$ac_ext <<EOF
5014 #line 5015 "configure"
5015 #include "confdefs.h"
5016
5017 int main() {
5018 main()
5019 ; return 0; }
5020 EOF
5021 if { (eval echo configure:5022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5022   rm -rf conftest*
5023   eval "ac_cv_lib_$ac_lib_var=yes"
5024 else
5025   echo "configure: failed program was:" >&5
5026   cat conftest.$ac_ext >&5
5027   rm -rf conftest*
5028   eval "ac_cv_lib_$ac_lib_var=no"
5029 fi
5030 rm -f conftest*
5031 LIBS="$ac_save_LIBS"
5032
5033 fi
5034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5035   echo "$ac_t""yes" 1>&6
5036     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5037     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5038   cat >> confdefs.h <<EOF
5039 #define $ac_tr_lib 1
5040 EOF
5041
5042   LIBS="-lnet $LIBS"
5043
5044 else
5045   echo "$ac_t""no" 1>&6
5046 fi
5047
5048         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5049 echo "configure:5050: checking for main in -lnsl_s" >&5
5050 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5051 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5052   echo $ac_n "(cached) $ac_c" 1>&6
5053 else
5054   ac_save_LIBS="$LIBS"
5055 LIBS="-lnsl_s  $LIBS"
5056 cat > conftest.$ac_ext <<EOF
5057 #line 5058 "configure"
5058 #include "confdefs.h"
5059
5060 int main() {
5061 main()
5062 ; return 0; }
5063 EOF
5064 if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5065   rm -rf conftest*
5066   eval "ac_cv_lib_$ac_lib_var=yes"
5067 else
5068   echo "configure: failed program was:" >&5
5069   cat conftest.$ac_ext >&5
5070   rm -rf conftest*
5071   eval "ac_cv_lib_$ac_lib_var=no"
5072 fi
5073 rm -f conftest*
5074 LIBS="$ac_save_LIBS"
5075
5076 fi
5077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5078   echo "$ac_t""yes" 1>&6
5079     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5080     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5081   cat >> confdefs.h <<EOF
5082 #define $ac_tr_lib 1
5083 EOF
5084
5085   LIBS="-lnsl_s $LIBS"
5086
5087 else
5088   echo "$ac_t""no" 1>&6
5089 fi
5090
5091         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5092 echo "configure:5093: checking for main in -lnsl" >&5
5093 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5094 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5095   echo $ac_n "(cached) $ac_c" 1>&6
5096 else
5097   ac_save_LIBS="$LIBS"
5098 LIBS="-lnsl  $LIBS"
5099 cat > conftest.$ac_ext <<EOF
5100 #line 5101 "configure"
5101 #include "confdefs.h"
5102
5103 int main() {
5104 main()
5105 ; return 0; }
5106 EOF
5107 if { (eval echo configure:5108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5108   rm -rf conftest*
5109   eval "ac_cv_lib_$ac_lib_var=yes"
5110 else
5111   echo "configure: failed program was:" >&5
5112   cat conftest.$ac_ext >&5
5113   rm -rf conftest*
5114   eval "ac_cv_lib_$ac_lib_var=no"
5115 fi
5116 rm -f conftest*
5117 LIBS="$ac_save_LIBS"
5118
5119 fi
5120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5121   echo "$ac_t""yes" 1>&6
5122     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5123     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5124   cat >> confdefs.h <<EOF
5125 #define $ac_tr_lib 1
5126 EOF
5127
5128   LIBS="-lnsl $LIBS"
5129
5130 else
5131   echo "$ac_t""no" 1>&6
5132 fi
5133
5134         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5135 echo "configure:5136: checking for socket in -linet" >&5
5136 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5138   echo $ac_n "(cached) $ac_c" 1>&6
5139 else
5140   ac_save_LIBS="$LIBS"
5141 LIBS="-linet  $LIBS"
5142 cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145 /* Override any gcc2 internal prototype to avoid an error.  */
5146 /* We use char because int might match the return type of a gcc2
5147     builtin and then its argument prototype would still apply.  */
5148 char socket();
5149
5150 int main() {
5151 socket()
5152 ; return 0; }
5153 EOF
5154 if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5155   rm -rf conftest*
5156   eval "ac_cv_lib_$ac_lib_var=yes"
5157 else
5158   echo "configure: failed program was:" >&5
5159   cat conftest.$ac_ext >&5
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=no"
5162 fi
5163 rm -f conftest*
5164 LIBS="$ac_save_LIBS"
5165
5166 fi
5167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5168   echo "$ac_t""yes" 1>&6
5169     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5171   cat >> confdefs.h <<EOF
5172 #define $ac_tr_lib 1
5173 EOF
5174
5175   LIBS="-linet $LIBS"
5176
5177 else
5178   echo "$ac_t""no" 1>&6
5179 fi
5180
5181         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5182 echo "configure:5183: checking for main in -lgen" >&5
5183 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5184 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5185   echo $ac_n "(cached) $ac_c" 1>&6
5186 else
5187   ac_save_LIBS="$LIBS"
5188 LIBS="-lgen  $LIBS"
5189 cat > conftest.$ac_ext <<EOF
5190 #line 5191 "configure"
5191 #include "confdefs.h"
5192
5193 int main() {
5194 main()
5195 ; return 0; }
5196 EOF
5197 if { (eval echo configure:5198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5198   rm -rf conftest*
5199   eval "ac_cv_lib_$ac_lib_var=yes"
5200 else
5201   echo "configure: failed program was:" >&5
5202   cat conftest.$ac_ext >&5
5203   rm -rf conftest*
5204   eval "ac_cv_lib_$ac_lib_var=no"
5205 fi
5206 rm -f conftest*
5207 LIBS="$ac_save_LIBS"
5208
5209 fi
5210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5211   echo "$ac_t""yes" 1>&6
5212     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5213     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5214   cat >> confdefs.h <<EOF
5215 #define $ac_tr_lib 1
5216 EOF
5217
5218   LIBS="-lgen $LIBS"
5219
5220 else
5221   echo "$ac_t""no" 1>&6
5222 fi
5223
5224
5225 fi
5226
5227
5228 echo $ac_n "checking for select""... $ac_c" 1>&6
5229 echo "configure:5230: checking for select" >&5
5230 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5231   echo $ac_n "(cached) $ac_c" 1>&6
5232 else
5233   cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236 /* System header to define __stub macros and hopefully few prototypes,
5237     which can conflict with char select(); below.  */
5238 #include <assert.h>
5239 /* Override any gcc2 internal prototype to avoid an error.  */
5240 /* We use char because int might match the return type of a gcc2
5241     builtin and then its argument prototype would still apply.  */
5242 char select();
5243 char (*f)();
5244
5245 int main() {
5246
5247 /* The GNU C library defines this for functions which it implements
5248     to always fail with ENOSYS.  Some functions are actually named
5249     something starting with __ and the normal name is an alias.  */
5250 #if defined (__stub_select) || defined (__stub___select)
5251 choke me
5252 #else
5253 f = select;
5254 #endif
5255
5256 ; return 0; }
5257 EOF
5258 if { (eval echo configure:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5259   rm -rf conftest*
5260   eval "ac_cv_func_select=yes"
5261 else
5262   echo "configure: failed program was:" >&5
5263   cat conftest.$ac_ext >&5
5264   rm -rf conftest*
5265   eval "ac_cv_func_select=no"
5266 fi
5267 rm -f conftest*
5268 fi
5269
5270 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5271   echo "$ac_t""yes" 1>&6
5272   :
5273 else
5274   echo "$ac_t""no" 1>&6
5275 { echo "configure: error: select() required." 1>&2; exit 1; }
5276 fi
5277
5278
5279 if test "${ac_cv_header_winsock_h}" != yes; then
5280                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5281 echo "configure:5282: checking types of arguments for select()" >&5
5282  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5283   echo $ac_n "(cached) $ac_c" 1>&6
5284 else
5285    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5286   echo $ac_n "(cached) $ac_c" 1>&6
5287 else
5288     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5289   echo $ac_n "(cached) $ac_c" 1>&6
5290 else
5291      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5292      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5293       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5294        cat > conftest.$ac_ext <<EOF
5295 #line 5296 "configure"
5296 #include "confdefs.h"
5297 #ifdef HAVE_SYS_TYPES_H
5298 #include <sys/types.h>
5299 #endif
5300 #ifdef HAVE_SYS_TIME_H
5301 #include <sys/time.h>
5302 #endif
5303 #ifdef HAVE_SYS_SELECT_H
5304 #include <sys/select.h>
5305 #endif
5306 #ifdef HAVE_SYS_SOCKET_H
5307 #include <sys/socket.h>
5308 #endif
5309 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);
5310 int main() {
5311
5312 ; return 0; }
5313 EOF
5314 if { (eval echo configure:5315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5315   rm -rf conftest*
5316           ac_not_found=no ; break 3
5317 else
5318   echo "configure: failed program was:" >&5
5319   cat conftest.$ac_ext >&5
5320   rm -rf conftest*
5321   ac_not_found=yes
5322 fi
5323 rm -f conftest*
5324       done
5325      done
5326     done
5327    
5328 fi
5329   
5330 fi
5331  
5332 fi
5333  if test "$ac_not_found" = yes; then
5334   ac_cv_func_select_arg1=int 
5335   ac_cv_func_select_arg234='int *' 
5336   ac_cv_func_select_arg5='struct timeval *'
5337  fi
5338  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5339  cat >> confdefs.h <<EOF
5340 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5341 EOF
5342
5343  cat >> confdefs.h <<EOF
5344 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5345 EOF
5346
5347  cat >> confdefs.h <<EOF
5348 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5349 EOF
5350
5351
5352 fi
5353
5354
5355 for ac_hdr in regex.h 
5356 do
5357 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5358 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5359 echo "configure:5360: checking for $ac_hdr" >&5
5360 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5361   echo $ac_n "(cached) $ac_c" 1>&6
5362 else
5363   cat > conftest.$ac_ext <<EOF
5364 #line 5365 "configure"
5365 #include "confdefs.h"
5366 #include <$ac_hdr>
5367 EOF
5368 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5369 { (eval echo configure:5370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5370 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5371 if test -z "$ac_err"; then
5372   rm -rf conftest*
5373   eval "ac_cv_header_$ac_safe=yes"
5374 else
5375   echo "$ac_err" >&5
5376   echo "configure: failed program was:" >&5
5377   cat conftest.$ac_ext >&5
5378   rm -rf conftest*
5379   eval "ac_cv_header_$ac_safe=no"
5380 fi
5381 rm -f conftest*
5382 fi
5383 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5384   echo "$ac_t""yes" 1>&6
5385     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5386   cat >> confdefs.h <<EOF
5387 #define $ac_tr_hdr 1
5388 EOF
5389  
5390 else
5391   echo "$ac_t""no" 1>&6
5392 fi
5393 done
5394
5395 if test "$ac_cv_header_regex_h" != yes ; then
5396         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5397 fi
5398 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5399 echo "configure:5400: checking for regfree" >&5
5400 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5401   echo $ac_n "(cached) $ac_c" 1>&6
5402 else
5403   cat > conftest.$ac_ext <<EOF
5404 #line 5405 "configure"
5405 #include "confdefs.h"
5406 /* System header to define __stub macros and hopefully few prototypes,
5407     which can conflict with char regfree(); below.  */
5408 #include <assert.h>
5409 /* Override any gcc2 internal prototype to avoid an error.  */
5410 /* We use char because int might match the return type of a gcc2
5411     builtin and then its argument prototype would still apply.  */
5412 char regfree();
5413 char (*f)();
5414
5415 int main() {
5416
5417 /* The GNU C library defines this for functions which it implements
5418     to always fail with ENOSYS.  Some functions are actually named
5419     something starting with __ and the normal name is an alias.  */
5420 #if defined (__stub_regfree) || defined (__stub___regfree)
5421 choke me
5422 #else
5423 f = regfree;
5424 #endif
5425
5426 ; return 0; }
5427 EOF
5428 if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5429   rm -rf conftest*
5430   eval "ac_cv_func_regfree=yes"
5431 else
5432   echo "configure: failed program was:" >&5
5433   cat conftest.$ac_ext >&5
5434   rm -rf conftest*
5435   eval "ac_cv_func_regfree=no"
5436 fi
5437 rm -f conftest*
5438 fi
5439
5440 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5441   echo "$ac_t""yes" 1>&6
5442   :
5443 else
5444   echo "$ac_t""no" 1>&6
5445 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5446 fi
5447
5448
5449
5450 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5451 echo "configure:5452: checking for compatible POSIX regex" >&5
5452 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5453   echo $ac_n "(cached) $ac_c" 1>&6
5454 else
5455   
5456         if test "$cross_compiling" = yes; then
5457   ol_cv_c_posix_regex=cross
5458 else
5459   cat > conftest.$ac_ext <<EOF
5460 #line 5461 "configure"
5461 #include "confdefs.h"
5462
5463 #include <sys/types.h>
5464 #include <regex.h>
5465 static char *pattern, *string;
5466 main()
5467 {
5468         int rc;
5469         regex_t re;
5470
5471         pattern = "^A";
5472
5473         if(regcomp(&re, pattern, 0)) {
5474                 return -1;
5475         }
5476         
5477         string = "ALL MATCH";
5478         
5479         rc = regexec(&re, string, 0, (void*)0, 0);
5480
5481         regfree(&re);
5482
5483         return rc;
5484 }
5485 EOF
5486 if { (eval echo configure:5487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5487 then
5488   ol_cv_c_posix_regex=yes
5489 else
5490   echo "configure: failed program was:" >&5
5491   cat conftest.$ac_ext >&5
5492   rm -fr conftest*
5493   ol_cv_c_posix_regex=no
5494 fi
5495 rm -fr conftest*
5496 fi
5497
5498 fi
5499
5500 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5501
5502 if test "$ol_cv_c_posix_regex" = no ; then
5503         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5504 fi
5505
5506 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5507 echo "configure:5508: checking for res_search" >&5
5508 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5509   echo $ac_n "(cached) $ac_c" 1>&6
5510 else
5511   cat > conftest.$ac_ext <<EOF
5512 #line 5513 "configure"
5513 #include "confdefs.h"
5514 /* System header to define __stub macros and hopefully few prototypes,
5515     which can conflict with char res_search(); below.  */
5516 #include <assert.h>
5517 /* Override any gcc2 internal prototype to avoid an error.  */
5518 /* We use char because int might match the return type of a gcc2
5519     builtin and then its argument prototype would still apply.  */
5520 char res_search();
5521 char (*f)();
5522
5523 int main() {
5524
5525 /* The GNU C library defines this for functions which it implements
5526     to always fail with ENOSYS.  Some functions are actually named
5527     something starting with __ and the normal name is an alias.  */
5528 #if defined (__stub_res_search) || defined (__stub___res_search)
5529 choke me
5530 #else
5531 f = res_search;
5532 #endif
5533
5534 ; return 0; }
5535 EOF
5536 if { (eval echo configure:5537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5537   rm -rf conftest*
5538   eval "ac_cv_func_res_search=yes"
5539 else
5540   echo "configure: failed program was:" >&5
5541   cat conftest.$ac_ext >&5
5542   rm -rf conftest*
5543   eval "ac_cv_func_res_search=no"
5544 fi
5545 rm -f conftest*
5546 fi
5547
5548 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5549   echo "$ac_t""yes" 1>&6
5550   :
5551 else
5552   echo "$ac_t""no" 1>&6
5553 fi
5554
5555 if test $ac_cv_func_res_search = no ; then 
5556         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5557 echo "configure:5558: checking for res_search in -lbind" >&5
5558 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5559 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5560   echo $ac_n "(cached) $ac_c" 1>&6
5561 else
5562   ac_save_LIBS="$LIBS"
5563 LIBS="-lbind  $LIBS"
5564 cat > conftest.$ac_ext <<EOF
5565 #line 5566 "configure"
5566 #include "confdefs.h"
5567 /* Override any gcc2 internal prototype to avoid an error.  */
5568 /* We use char because int might match the return type of a gcc2
5569     builtin and then its argument prototype would still apply.  */
5570 char res_search();
5571
5572 int main() {
5573 res_search()
5574 ; return 0; }
5575 EOF
5576 if { (eval echo configure:5577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5577   rm -rf conftest*
5578   eval "ac_cv_lib_$ac_lib_var=yes"
5579 else
5580   echo "configure: failed program was:" >&5
5581   cat conftest.$ac_ext >&5
5582   rm -rf conftest*
5583   eval "ac_cv_lib_$ac_lib_var=no"
5584 fi
5585 rm -f conftest*
5586 LIBS="$ac_save_LIBS"
5587
5588 fi
5589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5590   echo "$ac_t""yes" 1>&6
5591     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5592     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5593   cat >> confdefs.h <<EOF
5594 #define $ac_tr_lib 1
5595 EOF
5596
5597   LIBS="-lbind $LIBS"
5598
5599 else
5600   echo "$ac_t""no" 1>&6
5601 fi
5602
5603         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5604 fi
5605
5606 if test $ac_cv_func_res_search = no ; then 
5607         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5608 echo "configure:5609: checking for __res_search in -lbind" >&5
5609 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5610 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5611   echo $ac_n "(cached) $ac_c" 1>&6
5612 else
5613   ac_save_LIBS="$LIBS"
5614 LIBS="-lbind  $LIBS"
5615 cat > conftest.$ac_ext <<EOF
5616 #line 5617 "configure"
5617 #include "confdefs.h"
5618 /* Override any gcc2 internal prototype to avoid an error.  */
5619 /* We use char because int might match the return type of a gcc2
5620     builtin and then its argument prototype would still apply.  */
5621 char __res_search();
5622
5623 int main() {
5624 __res_search()
5625 ; return 0; }
5626 EOF
5627 if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5628   rm -rf conftest*
5629   eval "ac_cv_lib_$ac_lib_var=yes"
5630 else
5631   echo "configure: failed program was:" >&5
5632   cat conftest.$ac_ext >&5
5633   rm -rf conftest*
5634   eval "ac_cv_lib_$ac_lib_var=no"
5635 fi
5636 rm -f conftest*
5637 LIBS="$ac_save_LIBS"
5638
5639 fi
5640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5641   echo "$ac_t""yes" 1>&6
5642     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5643     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5644   cat >> confdefs.h <<EOF
5645 #define $ac_tr_lib 1
5646 EOF
5647
5648   LIBS="-lbind $LIBS"
5649
5650 else
5651   echo "$ac_t""no" 1>&6
5652 fi
5653
5654         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5655 fi
5656
5657 if test $ac_cv_func_res_search = no ; then 
5658         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5659 echo "configure:5660: checking for res_search in -lresolv" >&5
5660 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5661 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5662   echo $ac_n "(cached) $ac_c" 1>&6
5663 else
5664   ac_save_LIBS="$LIBS"
5665 LIBS="-lresolv  $LIBS"
5666 cat > conftest.$ac_ext <<EOF
5667 #line 5668 "configure"
5668 #include "confdefs.h"
5669 /* Override any gcc2 internal prototype to avoid an error.  */
5670 /* We use char because int might match the return type of a gcc2
5671     builtin and then its argument prototype would still apply.  */
5672 char res_search();
5673
5674 int main() {
5675 res_search()
5676 ; return 0; }
5677 EOF
5678 if { (eval echo configure:5679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5679   rm -rf conftest*
5680   eval "ac_cv_lib_$ac_lib_var=yes"
5681 else
5682   echo "configure: failed program was:" >&5
5683   cat conftest.$ac_ext >&5
5684   rm -rf conftest*
5685   eval "ac_cv_lib_$ac_lib_var=no"
5686 fi
5687 rm -f conftest*
5688 LIBS="$ac_save_LIBS"
5689
5690 fi
5691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5692   echo "$ac_t""yes" 1>&6
5693     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5694     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5695   cat >> confdefs.h <<EOF
5696 #define $ac_tr_lib 1
5697 EOF
5698
5699   LIBS="-lresolv $LIBS"
5700
5701 else
5702   echo "$ac_t""no" 1>&6
5703 fi
5704
5705         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5706 fi
5707
5708 if test "$ac_cv_func_res_search" = yes ; then
5709         cat >> confdefs.h <<\EOF
5710 #define HAVE_RES_SEARCH 1
5711 EOF
5712
5713 fi
5714
5715
5716 if test $ol_enable_quipu != no ; then
5717         for ac_hdr in quipu/commonarg.h
5718 do
5719 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5720 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5721 echo "configure:5722: checking for $ac_hdr" >&5
5722 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5723   echo $ac_n "(cached) $ac_c" 1>&6
5724 else
5725   cat > conftest.$ac_ext <<EOF
5726 #line 5727 "configure"
5727 #include "confdefs.h"
5728 #include <$ac_hdr>
5729 EOF
5730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5731 { (eval echo configure:5732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5733 if test -z "$ac_err"; then
5734   rm -rf conftest*
5735   eval "ac_cv_header_$ac_safe=yes"
5736 else
5737   echo "$ac_err" >&5
5738   echo "configure: failed program was:" >&5
5739   cat conftest.$ac_ext >&5
5740   rm -rf conftest*
5741   eval "ac_cv_header_$ac_safe=no"
5742 fi
5743 rm -f conftest*
5744 fi
5745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5746   echo "$ac_t""yes" 1>&6
5747     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5748   cat >> confdefs.h <<EOF
5749 #define $ac_tr_hdr 1
5750 EOF
5751  
5752 else
5753   echo "$ac_t""no" 1>&6
5754 fi
5755 done
5756
5757
5758         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5759                 BUILD_QUIPU=yes
5760         elif test $ol_enable_quipu = auto ; then
5761                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5762         else
5763                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5764         fi
5765 fi
5766
5767 ol_link_kbind=no
5768 ol_link_kpasswd=no
5769 ol_link_krb5=no
5770 ol_link_krb4=no
5771
5772 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5773         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5774
5775         for ac_hdr in krb5.h
5776 do
5777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5779 echo "configure:5780: checking for $ac_hdr" >&5
5780 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5781   echo $ac_n "(cached) $ac_c" 1>&6
5782 else
5783   cat > conftest.$ac_ext <<EOF
5784 #line 5785 "configure"
5785 #include "confdefs.h"
5786 #include <$ac_hdr>
5787 EOF
5788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5789 { (eval echo configure:5790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5791 if test -z "$ac_err"; then
5792   rm -rf conftest*
5793   eval "ac_cv_header_$ac_safe=yes"
5794 else
5795   echo "$ac_err" >&5
5796   echo "configure: failed program was:" >&5
5797   cat conftest.$ac_ext >&5
5798   rm -rf conftest*
5799   eval "ac_cv_header_$ac_safe=no"
5800 fi
5801 rm -f conftest*
5802 fi
5803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5804   echo "$ac_t""yes" 1>&6
5805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5806   cat >> confdefs.h <<EOF
5807 #define $ac_tr_hdr 1
5808 EOF
5809  
5810 else
5811   echo "$ac_t""no" 1>&6
5812 fi
5813 done
5814
5815
5816         if test $ac_cv_header_krb5_h = yes ; then
5817                                 for ac_hdr in heim_err.h
5818 do
5819 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5820 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5821 echo "configure:5822: checking for $ac_hdr" >&5
5822 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5823   echo $ac_n "(cached) $ac_c" 1>&6
5824 else
5825   cat > conftest.$ac_ext <<EOF
5826 #line 5827 "configure"
5827 #include "confdefs.h"
5828 #include <$ac_hdr>
5829 EOF
5830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5831 { (eval echo configure:5832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5833 if test -z "$ac_err"; then
5834   rm -rf conftest*
5835   eval "ac_cv_header_$ac_safe=yes"
5836 else
5837   echo "$ac_err" >&5
5838   echo "configure: failed program was:" >&5
5839   cat conftest.$ac_ext >&5
5840   rm -rf conftest*
5841   eval "ac_cv_header_$ac_safe=no"
5842 fi
5843 rm -f conftest*
5844 fi
5845 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5846   echo "$ac_t""yes" 1>&6
5847     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5848   cat >> confdefs.h <<EOF
5849 #define $ac_tr_hdr 1
5850 EOF
5851  
5852 else
5853   echo "$ac_t""no" 1>&6
5854 fi
5855 done
5856
5857                 if test $ac_cv_header_heim_err_h = yes ; then
5858                         krb5_impl=heimdal
5859                 else
5860                         krb5_impl=mit
5861                 fi
5862
5863                 if test $krb5_impl = mit; then
5864                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5865 echo "configure:5866: checking for main in -lkrb5" >&5
5866 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5867 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5868   echo $ac_n "(cached) $ac_c" 1>&6
5869 else
5870   ac_save_LIBS="$LIBS"
5871 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5872 cat > conftest.$ac_ext <<EOF
5873 #line 5874 "configure"
5874 #include "confdefs.h"
5875
5876 int main() {
5877 main()
5878 ; return 0; }
5879 EOF
5880 if { (eval echo configure:5881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5881   rm -rf conftest*
5882   eval "ac_cv_lib_$ac_lib_var=yes"
5883 else
5884   echo "configure: failed program was:" >&5
5885   cat conftest.$ac_ext >&5
5886   rm -rf conftest*
5887   eval "ac_cv_lib_$ac_lib_var=no"
5888 fi
5889 rm -f conftest*
5890 LIBS="$ac_save_LIBS"
5891
5892 fi
5893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5894   echo "$ac_t""yes" 1>&6
5895   have_krb5=yes
5896                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5897 else
5898   echo "$ac_t""no" 1>&6
5899 have_krb5=no
5900 fi
5901
5902
5903                 elif test $krb5_impl = heimdal; then
5904                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5905 echo "configure:5906: checking for main in -lkrb5" >&5
5906 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5907 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5908   echo $ac_n "(cached) $ac_c" 1>&6
5909 else
5910   ac_save_LIBS="$LIBS"
5911 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5912 cat > conftest.$ac_ext <<EOF
5913 #line 5914 "configure"
5914 #include "confdefs.h"
5915
5916 int main() {
5917 main()
5918 ; return 0; }
5919 EOF
5920 if { (eval echo configure:5921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5921   rm -rf conftest*
5922   eval "ac_cv_lib_$ac_lib_var=yes"
5923 else
5924   echo "configure: failed program was:" >&5
5925   cat conftest.$ac_ext >&5
5926   rm -rf conftest*
5927   eval "ac_cv_lib_$ac_lib_var=no"
5928 fi
5929 rm -f conftest*
5930 LIBS="$ac_save_LIBS"
5931
5932 fi
5933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5934   echo "$ac_t""yes" 1>&6
5935   have_krb5=yes
5936                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5937 else
5938   echo "$ac_t""no" 1>&6
5939 have_krb5=no
5940 fi
5941
5942
5943                         cat >> confdefs.h <<\EOF
5944 #define HAVE_HEIMDAL_KERBEROS 1
5945 EOF
5946
5947                 else
5948                         have_krb5=no
5949                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5950                 fi
5951
5952                 if test $have_krb5 = yes ; then
5953                         ol_link_krb5=yes
5954
5955                         cat >> confdefs.h <<\EOF
5956 #define HAVE_KRB5 1
5957 EOF
5958
5959
5960                         if test $ol_enable_kpasswd != no ; then
5961                                 ol_link_kpasswd=yes;
5962                         fi
5963
5964                         if test $ol_with_kerberos = k5only ; then
5965                                 ol_with_kerberos=found
5966                         fi
5967
5968                 elif test $ol_with_kerberos != auto ; then
5969                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5970                 fi
5971
5972         fi
5973 fi
5974
5975 if test $ol_link_krb5 = yes -a \
5976         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5977
5978         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5979 do
5980 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5981 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5982 echo "configure:5983: checking for $ac_hdr" >&5
5983 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5984   echo $ac_n "(cached) $ac_c" 1>&6
5985 else
5986   cat > conftest.$ac_ext <<EOF
5987 #line 5988 "configure"
5988 #include "confdefs.h"
5989 #include <$ac_hdr>
5990 EOF
5991 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5992 { (eval echo configure:5993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5993 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5994 if test -z "$ac_err"; then
5995   rm -rf conftest*
5996   eval "ac_cv_header_$ac_safe=yes"
5997 else
5998   echo "$ac_err" >&5
5999   echo "configure: failed program was:" >&5
6000   cat conftest.$ac_ext >&5
6001   rm -rf conftest*
6002   eval "ac_cv_header_$ac_safe=no"
6003 fi
6004 rm -f conftest*
6005 fi
6006 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6007   echo "$ac_t""yes" 1>&6
6008     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6009   cat >> confdefs.h <<EOF
6010 #define $ac_tr_hdr 1
6011 EOF
6012  
6013 else
6014   echo "$ac_t""no" 1>&6
6015 fi
6016 done
6017
6018
6019         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6020                 if test $krb5_impl = mit; then
6021                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6022 echo "configure:6023: checking for main in -lkrb4" >&5
6023 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6025   echo $ac_n "(cached) $ac_c" 1>&6
6026 else
6027   ac_save_LIBS="$LIBS"
6028 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6029 cat > conftest.$ac_ext <<EOF
6030 #line 6031 "configure"
6031 #include "confdefs.h"
6032
6033 int main() {
6034 main()
6035 ; return 0; }
6036 EOF
6037 if { (eval echo configure:6038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6038   rm -rf conftest*
6039   eval "ac_cv_lib_$ac_lib_var=yes"
6040 else
6041   echo "configure: failed program was:" >&5
6042   cat conftest.$ac_ext >&5
6043   rm -rf conftest*
6044   eval "ac_cv_lib_$ac_lib_var=no"
6045 fi
6046 rm -f conftest*
6047 LIBS="$ac_save_LIBS"
6048
6049 fi
6050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6051   echo "$ac_t""yes" 1>&6
6052   have_k425=yes
6053                                 KRB4_LIBS="-lkrb4 -ldes425"
6054 else
6055   echo "$ac_t""no" 1>&6
6056 have_k425=no
6057 fi
6058
6059
6060                 elif test $krb5_impl = heimdal; then
6061                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6062 echo "configure:6063: checking for main in -lkrb4" >&5
6063 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6065   echo $ac_n "(cached) $ac_c" 1>&6
6066 else
6067   ac_save_LIBS="$LIBS"
6068 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6069 cat > conftest.$ac_ext <<EOF
6070 #line 6071 "configure"
6071 #include "confdefs.h"
6072
6073 int main() {
6074 main()
6075 ; return 0; }
6076 EOF
6077 if { (eval echo configure:6078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6078   rm -rf conftest*
6079   eval "ac_cv_lib_$ac_lib_var=yes"
6080 else
6081   echo "configure: failed program was:" >&5
6082   cat conftest.$ac_ext >&5
6083   rm -rf conftest*
6084   eval "ac_cv_lib_$ac_lib_var=no"
6085 fi
6086 rm -f conftest*
6087 LIBS="$ac_save_LIBS"
6088
6089 fi
6090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6091   echo "$ac_t""yes" 1>&6
6092   have_k425=yes
6093                                 KRB4_LIBS="-lkrb4"
6094 else
6095   echo "$ac_t""no" 1>&6
6096 have_k425=no
6097 fi
6098
6099
6100                 else
6101                         have_425=no
6102                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6103                 fi
6104
6105                 if test $have_k425 = yes ; then
6106                         ol_with_kerberos=found
6107                         ol_link_krb4=yes
6108
6109                         cat >> confdefs.h <<\EOF
6110 #define HAVE_KRB425 1
6111 EOF
6112
6113                         cat >> confdefs.h <<\EOF
6114 #define HAVE_KRB4 1
6115 EOF
6116
6117
6118                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6119 echo "configure:6120: checking for des_debug in Kerberos libraries" >&5
6120 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6121   echo $ac_n "(cached) $ac_c" 1>&6
6122 else
6123   
6124                                                                 save_LIBS="$LIBS"
6125                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6126                                 cat > conftest.$ac_ext <<EOF
6127 #line 6128 "configure"
6128 #include "confdefs.h"
6129
6130 #include <kerberosIV/krb.h>
6131 #include <kerberosIV/des.h>
6132 extern int des_debug;
6133
6134 int main() {
6135
6136 des_debug = 1;
6137
6138 ; return 0; }
6139 EOF
6140 if { (eval echo configure:6141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6141   rm -rf conftest*
6142   ol_cv_var_des_debug=yes
6143 else
6144   echo "configure: failed program was:" >&5
6145   cat conftest.$ac_ext >&5
6146   rm -rf conftest*
6147   ol_cv_var_des_debug=no
6148 fi
6149 rm -f conftest*
6150                                                                 LIBS="$save_LIBS"
6151                         
6152 fi
6153
6154 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6155
6156                         if test $ol_cv_var_des_debug = yes ; then
6157                                 cat >> confdefs.h <<\EOF
6158 #define HAVE_DES_DEBUG 1
6159 EOF
6160
6161                         fi
6162
6163                         LIBS="$save_LIBS"
6164                 fi
6165         fi
6166 fi
6167
6168 if test $ol_link_krb5 = yes ; then
6169         ol_with_kerberos=found
6170 fi
6171
6172 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6173         -o $ol_with_kerberos = kth ; then
6174
6175         for ac_hdr in krb.h des.h krb-archaeology.h 
6176 do
6177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6179 echo "configure:6180: checking for $ac_hdr" >&5
6180 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6181   echo $ac_n "(cached) $ac_c" 1>&6
6182 else
6183   cat > conftest.$ac_ext <<EOF
6184 #line 6185 "configure"
6185 #include "confdefs.h"
6186 #include <$ac_hdr>
6187 EOF
6188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6189 { (eval echo configure:6190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6191 if test -z "$ac_err"; then
6192   rm -rf conftest*
6193   eval "ac_cv_header_$ac_safe=yes"
6194 else
6195   echo "$ac_err" >&5
6196   echo "configure: failed program was:" >&5
6197   cat conftest.$ac_ext >&5
6198   rm -rf conftest*
6199   eval "ac_cv_header_$ac_safe=no"
6200 fi
6201 rm -f conftest*
6202 fi
6203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6204   echo "$ac_t""yes" 1>&6
6205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6206   cat >> confdefs.h <<EOF
6207 #define $ac_tr_hdr 1
6208 EOF
6209  
6210 else
6211   echo "$ac_t""no" 1>&6
6212 fi
6213 done
6214
6215
6216         if test $ac_cv_header_krb_h = yes ; then
6217                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6218 echo "configure:6219: checking for main in -lkrb" >&5
6219 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6220 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6221   echo $ac_n "(cached) $ac_c" 1>&6
6222 else
6223   ac_save_LIBS="$LIBS"
6224 LIBS="-lkrb -ldes $LIBS"
6225 cat > conftest.$ac_ext <<EOF
6226 #line 6227 "configure"
6227 #include "confdefs.h"
6228
6229 int main() {
6230 main()
6231 ; return 0; }
6232 EOF
6233 if { (eval echo configure:6234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6234   rm -rf conftest*
6235   eval "ac_cv_lib_$ac_lib_var=yes"
6236 else
6237   echo "configure: failed program was:" >&5
6238   cat conftest.$ac_ext >&5
6239   rm -rf conftest*
6240   eval "ac_cv_lib_$ac_lib_var=no"
6241 fi
6242 rm -f conftest*
6243 LIBS="$ac_save_LIBS"
6244
6245 fi
6246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6247   echo "$ac_t""yes" 1>&6
6248   have_k4=yes
6249 else
6250   echo "$ac_t""no" 1>&6
6251 have_k4=no
6252 fi
6253
6254
6255                 if test $have_k4 = yes ; then
6256                         ol_with_kerberos=found
6257                         ol_link_krb4=yes
6258
6259                         cat >> confdefs.h <<\EOF
6260 #define HAVE_KRB4 1
6261 EOF
6262
6263
6264                         KRB4_LIBS="-lkrb -ldes"
6265
6266                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6267                                 cat >> confdefs.h <<\EOF
6268 #define HAVE_KTH_KERBEROS 1
6269 EOF
6270
6271                         fi
6272                 fi
6273         fi
6274 fi
6275
6276 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6277         ol_link_kpasswd=yes;
6278 fi
6279
6280 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6281         cat >> confdefs.h <<\EOF
6282 #define HAVE_KERBEROS 1
6283 EOF
6284
6285
6286 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6287         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6288 fi
6289
6290 ol_link_tls=no
6291 if test $ol_with_tls != no ; then
6292         
6293         for ac_hdr in openssl/ssl.h ssl.h
6294 do
6295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6297 echo "configure:6298: checking for $ac_hdr" >&5
6298 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6299   echo $ac_n "(cached) $ac_c" 1>&6
6300 else
6301   cat > conftest.$ac_ext <<EOF
6302 #line 6303 "configure"
6303 #include "confdefs.h"
6304 #include <$ac_hdr>
6305 EOF
6306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6307 { (eval echo configure:6308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6309 if test -z "$ac_err"; then
6310   rm -rf conftest*
6311   eval "ac_cv_header_$ac_safe=yes"
6312 else
6313   echo "$ac_err" >&5
6314   echo "configure: failed program was:" >&5
6315   cat conftest.$ac_ext >&5
6316   rm -rf conftest*
6317   eval "ac_cv_header_$ac_safe=no"
6318 fi
6319 rm -f conftest*
6320 fi
6321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6322   echo "$ac_t""yes" 1>&6
6323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6324   cat >> confdefs.h <<EOF
6325 #define $ac_tr_hdr 1
6326 EOF
6327  
6328 else
6329   echo "$ac_t""no" 1>&6
6330 fi
6331 done
6332
6333         
6334         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6335                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6336 echo "configure:6337: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6337 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6338 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6339   echo $ac_n "(cached) $ac_c" 1>&6
6340 else
6341   ac_save_LIBS="$LIBS"
6342 LIBS="-lssl -lcrypto $LIBS"
6343 cat > conftest.$ac_ext <<EOF
6344 #line 6345 "configure"
6345 #include "confdefs.h"
6346 /* Override any gcc2 internal prototype to avoid an error.  */
6347 /* We use char because int might match the return type of a gcc2
6348     builtin and then its argument prototype would still apply.  */
6349 char SSLeay_add_ssl_algorithms();
6350
6351 int main() {
6352 SSLeay_add_ssl_algorithms()
6353 ; return 0; }
6354 EOF
6355 if { (eval echo configure:6356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6356   rm -rf conftest*
6357   eval "ac_cv_lib_$ac_lib_var=yes"
6358 else
6359   echo "configure: failed program was:" >&5
6360   cat conftest.$ac_ext >&5
6361   rm -rf conftest*
6362   eval "ac_cv_lib_$ac_lib_var=no"
6363 fi
6364 rm -f conftest*
6365 LIBS="$ac_save_LIBS"
6366
6367 fi
6368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6369   echo "$ac_t""yes" 1>&6
6370   have_ssleay=yes
6371                         need_rsaref=no
6372 else
6373   echo "$ac_t""no" 1>&6
6374 have_ssleay=no
6375 fi
6376
6377                         
6378                 if test $have_ssleay = no ; then
6379                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6380 echo "configure:6381: checking for SSL_library_init in -lssl" >&5
6381 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6382 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6383   echo $ac_n "(cached) $ac_c" 1>&6
6384 else
6385   ac_save_LIBS="$LIBS"
6386 LIBS="-lssl -lcrypto $LIBS"
6387 cat > conftest.$ac_ext <<EOF
6388 #line 6389 "configure"
6389 #include "confdefs.h"
6390 /* Override any gcc2 internal prototype to avoid an error.  */
6391 /* We use char because int might match the return type of a gcc2
6392     builtin and then its argument prototype would still apply.  */
6393 char SSL_library_init();
6394
6395 int main() {
6396 SSL_library_init()
6397 ; return 0; }
6398 EOF
6399 if { (eval echo configure:6400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6400   rm -rf conftest*
6401   eval "ac_cv_lib_$ac_lib_var=yes"
6402 else
6403   echo "configure: failed program was:" >&5
6404   cat conftest.$ac_ext >&5
6405   rm -rf conftest*
6406   eval "ac_cv_lib_$ac_lib_var=no"
6407 fi
6408 rm -f conftest*
6409 LIBS="$ac_save_LIBS"
6410
6411 fi
6412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6413   echo "$ac_t""yes" 1>&6
6414   have_ssleay=yes
6415                                 need_rsaref=no
6416 else
6417   echo "$ac_t""no" 1>&6
6418 have_ssleay=no
6419 fi
6420
6421                 fi
6422
6423                 if test $have_ssleay = no ; then
6424                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6425 echo "configure:6426: checking for ssl3_accept in -lssl" >&5
6426 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6427 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6428   echo $ac_n "(cached) $ac_c" 1>&6
6429 else
6430   ac_save_LIBS="$LIBS"
6431 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6432 cat > conftest.$ac_ext <<EOF
6433 #line 6434 "configure"
6434 #include "confdefs.h"
6435 /* Override any gcc2 internal prototype to avoid an error.  */
6436 /* We use char because int might match the return type of a gcc2
6437     builtin and then its argument prototype would still apply.  */
6438 char ssl3_accept();
6439
6440 int main() {
6441 ssl3_accept()
6442 ; return 0; }
6443 EOF
6444 if { (eval echo configure:6445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6445   rm -rf conftest*
6446   eval "ac_cv_lib_$ac_lib_var=yes"
6447 else
6448   echo "configure: failed program was:" >&5
6449   cat conftest.$ac_ext >&5
6450   rm -rf conftest*
6451   eval "ac_cv_lib_$ac_lib_var=no"
6452 fi
6453 rm -f conftest*
6454 LIBS="$ac_save_LIBS"
6455
6456 fi
6457 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6458   echo "$ac_t""yes" 1>&6
6459   have_ssleay=yes
6460                                 need_rsaref=yes
6461 else
6462   echo "$ac_t""no" 1>&6
6463 have_ssleay=no
6464 fi
6465
6466                 fi
6467
6468                 if test $have_ssleay = yes ; then
6469                         ol_with_tls=found
6470                         ol_link_tls=yes
6471
6472                         cat >> confdefs.h <<\EOF
6473 #define HAVE_SSLEAY 1
6474 EOF
6475
6476
6477                         if test $need_rsaref = yes; then
6478                                 cat >> confdefs.h <<\EOF
6479 #define HAVE_RSAREF 1
6480 EOF
6481
6482
6483                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6484                         else
6485                                 TLS_LIBS="-lssl -lcrypto"
6486                         fi
6487                 fi
6488         fi
6489 fi
6490
6491 if test $ol_link_tls = yes ; then
6492         cat >> confdefs.h <<\EOF
6493 #define HAVE_TLS 1
6494 EOF
6495
6496 fi      
6497
6498 for ac_func in \
6499         ctime_r                 \
6500         gethostbyname_r gethostbyaddr_r \
6501
6502 do
6503 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6504 echo "configure:6505: checking for $ac_func" >&5
6505 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6506   echo $ac_n "(cached) $ac_c" 1>&6
6507 else
6508   cat > conftest.$ac_ext <<EOF
6509 #line 6510 "configure"
6510 #include "confdefs.h"
6511 /* System header to define __stub macros and hopefully few prototypes,
6512     which can conflict with char $ac_func(); below.  */
6513 #include <assert.h>
6514 /* Override any gcc2 internal prototype to avoid an error.  */
6515 /* We use char because int might match the return type of a gcc2
6516     builtin and then its argument prototype would still apply.  */
6517 char $ac_func();
6518 char (*f)();
6519
6520 int main() {
6521
6522 /* The GNU C library defines this for functions which it implements
6523     to always fail with ENOSYS.  Some functions are actually named
6524     something starting with __ and the normal name is an alias.  */
6525 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6526 choke me
6527 #else
6528 f = $ac_func;
6529 #endif
6530
6531 ; return 0; }
6532 EOF
6533 if { (eval echo configure:6534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6534   rm -rf conftest*
6535   eval "ac_cv_func_$ac_func=yes"
6536 else
6537   echo "configure: failed program was:" >&5
6538   cat conftest.$ac_ext >&5
6539   rm -rf conftest*
6540   eval "ac_cv_func_$ac_func=no"
6541 fi
6542 rm -f conftest*
6543 fi
6544
6545 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6546   echo "$ac_t""yes" 1>&6
6547     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6548   cat >> confdefs.h <<EOF
6549 #define $ac_tr_func 1
6550 EOF
6551  
6552 else
6553   echo "$ac_t""no" 1>&6
6554 fi
6555 done
6556
6557
6558 if test "$ac_cv_func_ctime_r" = no ; then
6559         ol_cv_func_ctime_r_nargs=0
6560 else
6561         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6562 echo "configure:6563: checking number of arguments of ctime_r" >&5
6563 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6564   echo $ac_n "(cached) $ac_c" 1>&6
6565 else
6566   cat > conftest.$ac_ext <<EOF
6567 #line 6568 "configure"
6568 #include "confdefs.h"
6569 #include <time.h>
6570 int main() {
6571 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6572 ; return 0; }
6573 EOF
6574 if { (eval echo configure:6575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6575   rm -rf conftest*
6576   ol_cv_func_ctime_r_nargs3=yes
6577 else
6578   echo "configure: failed program was:" >&5
6579   cat conftest.$ac_ext >&5
6580   rm -rf conftest*
6581   ol_cv_func_ctime_r_nargs3=no
6582 fi
6583 rm -f conftest*
6584
6585         cat > conftest.$ac_ext <<EOF
6586 #line 6587 "configure"
6587 #include "confdefs.h"
6588 #include <time.h>
6589 int main() {
6590 time_t ti; char *buffer; ctime_r(&ti,buffer);
6591 ; return 0; }
6592 EOF
6593 if { (eval echo configure:6594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6594   rm -rf conftest*
6595   ol_cv_func_ctime_r_nargs2=yes
6596 else
6597   echo "configure: failed program was:" >&5
6598   cat conftest.$ac_ext >&5
6599   rm -rf conftest*
6600   ol_cv_func_ctime_r_nargs2=no
6601 fi
6602 rm -f conftest*
6603
6604         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6605                 $ol_cv_func_ctime_r_nargs2 = no ; then
6606
6607                 ol_cv_func_ctime_r_nargs=3
6608
6609         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6610                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6611
6612                 ol_cv_func_ctime_r_nargs=2
6613
6614         else
6615                 ol_cv_func_ctime_r_nargs=0
6616         fi
6617   
6618 fi
6619
6620 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6621
6622   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6623         cat >> confdefs.h <<EOF
6624 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6625 EOF
6626
6627   fi
6628
6629 fi
6630
6631 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6632         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6633 echo "configure:6634: checking number of arguments of gethostbyname_r" >&5
6634 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6635   echo $ac_n "(cached) $ac_c" 1>&6
6636 else
6637   cat > conftest.$ac_ext <<EOF
6638 #line 6639 "configure"
6639 #include "confdefs.h"
6640 #include <sys/types.h>
6641 #include <sys/socket.h>
6642 #include <netinet/in.h>
6643 #include <netdb.h>
6644 #define BUFSIZE (sizeof(struct hostent)+10)
6645 int main() {
6646 struct hostent hent; char buffer[BUFSIZE];
6647                 int bufsize=BUFSIZE;int h_errno;
6648                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6649                         buffer, bufsize, &h_errno);
6650 ; return 0; }
6651 EOF
6652 if { (eval echo configure:6653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6653   rm -rf conftest*
6654   ol_cv_func_gethostbyname_r_nargs5=yes
6655 else
6656   echo "configure: failed program was:" >&5
6657   cat conftest.$ac_ext >&5
6658   rm -rf conftest*
6659   ol_cv_func_gethostbyname_r_nargs5=no
6660 fi
6661 rm -f conftest*
6662
6663         cat > conftest.$ac_ext <<EOF
6664 #line 6665 "configure"
6665 #include "confdefs.h"
6666 #include <sys/types.h>
6667 #include <sys/socket.h>
6668 #include <netinet/in.h>
6669 #include <netdb.h>
6670 #define BUFSIZE (sizeof(struct hostent)+10)
6671 int main() {
6672 struct hostent hent;struct hostent *rhent;
6673                 char buffer[BUFSIZE];
6674                 int bufsize=BUFSIZE;int h_errno;
6675                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6676                         &rhent, &h_errno);
6677 ; return 0; }
6678 EOF
6679 if { (eval echo configure:6680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6680   rm -rf conftest*
6681   ol_cv_func_gethostbyname_r_nargs6=yes
6682 else
6683   echo "configure: failed program was:" >&5
6684   cat conftest.$ac_ext >&5
6685   rm -rf conftest*
6686   ol_cv_func_gethostbyname_r_nargs6=no
6687 fi
6688 rm -f conftest*
6689
6690         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6691                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6692
6693                 ol_cv_func_gethostbyname_r_nargs=5
6694
6695         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6696                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6697
6698                 ol_cv_func_gethostbyname_r_nargs=6
6699
6700         else
6701                 ol_cv_func_gethostbyname_r_nargs=0
6702         fi
6703   
6704 fi
6705
6706 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6707   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6708         cat >> confdefs.h <<EOF
6709 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6710 EOF
6711
6712   fi
6713
6714 else
6715         ol_cv_func_gethostbyname_r_nargs=0
6716 fi
6717  
6718 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6719         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6720 echo "configure:6721: checking number of arguments of gethostbyaddr_r" >&5
6721 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6722   echo $ac_n "(cached) $ac_c" 1>&6
6723 else
6724   cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 #include <sys/types.h>
6728 #include <sys/socket.h>
6729 #include <netinet/in.h>
6730 #include <netdb.h>
6731 #define BUFSIZE (sizeof(struct hostent)+10)
6732 int main() {
6733 struct hostent hent; char buffer[BUFSIZE]; 
6734             struct in_addr add;
6735             size_t alen=sizeof(struct in_addr);
6736             int bufsize=BUFSIZE;int h_errno;
6737                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6738                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6739 ; return 0; }
6740 EOF
6741 if { (eval echo configure:6742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6742   rm -rf conftest*
6743   ol_cv_func_gethostbyaddr_r_nargs7=yes
6744 else
6745   echo "configure: failed program was:" >&5
6746   cat conftest.$ac_ext >&5
6747   rm -rf conftest*
6748   ol_cv_func_gethostbyaddr_r_nargs7=no
6749 fi
6750 rm -f conftest*
6751
6752         cat > conftest.$ac_ext <<EOF
6753 #line 6754 "configure"
6754 #include "confdefs.h"
6755 #include <sys/types.h>
6756 #include <sys/socket.h>
6757 #include <netinet/in.h>
6758 #include <netdb.h>
6759 #define BUFSIZE (sizeof(struct hostent)+10)
6760 int main() {
6761 struct hostent hent;
6762                 struct hostent *rhent; char buffer[BUFSIZE]; 
6763                 struct in_addr add;
6764                 size_t alen=sizeof(struct in_addr);
6765                 int bufsize=BUFSIZE;int h_errno;
6766                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6767                         alen, AF_INET, &hent, buffer, bufsize, 
6768                         &rhent, &h_errno);
6769 ; return 0; }
6770 EOF
6771 if { (eval echo configure:6772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6772   rm -rf conftest*
6773   ol_cv_func_gethostbyaddr_r_nargs8=yes
6774 else
6775   echo "configure: failed program was:" >&5
6776   cat conftest.$ac_ext >&5
6777   rm -rf conftest*
6778   ol_cv_func_gethostbyaddr_r_nargs8=no
6779 fi
6780 rm -f conftest*
6781
6782         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6783                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6784
6785                 ol_cv_func_gethostbyaddr_r_nargs=7
6786
6787         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6788                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6789
6790                 ol_cv_func_gethostbyaddr_r_nargs=8
6791
6792         else
6793                 ol_cv_func_gethostbyaddr_r_nargs=0
6794         fi
6795   
6796 fi
6797
6798 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6799   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6800     cat >> confdefs.h <<EOF
6801 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6802 EOF
6803
6804   fi
6805
6806 else
6807         ol_cv_func_gethostbyaddr_r_nargs=0
6808 fi
6809
6810 if test "$ac_cv_func_ctime_r" = yes \
6811         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6812         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6813         -a "$ac_cv_func_gethostbyname_r" = yes \
6814         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6815         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6816         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6817         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6818         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6819         ; then
6820  
6821         cat >> confdefs.h <<\EOF
6822 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6823 EOF
6824
6825 fi
6826
6827 ol_link_threads=no
6828
6829 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6830         -o $ol_with_threads = nt ; then
6831
6832         
6833         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6834 echo "configure:6835: checking for NT Threads" >&5
6835 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6836   echo $ac_n "(cached) $ac_c" 1>&6
6837 else
6838   
6839                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6840 echo "configure:6841: checking for _beginthread" >&5
6841 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6842   echo $ac_n "(cached) $ac_c" 1>&6
6843 else
6844   cat > conftest.$ac_ext <<EOF
6845 #line 6846 "configure"
6846 #include "confdefs.h"
6847 /* System header to define __stub macros and hopefully few prototypes,
6848     which can conflict with char _beginthread(); below.  */
6849 #include <assert.h>
6850 /* Override any gcc2 internal prototype to avoid an error.  */
6851 /* We use char because int might match the return type of a gcc2
6852     builtin and then its argument prototype would still apply.  */
6853 char _beginthread();
6854 char (*f)();
6855
6856 int main() {
6857
6858 /* The GNU C library defines this for functions which it implements
6859     to always fail with ENOSYS.  Some functions are actually named
6860     something starting with __ and the normal name is an alias.  */
6861 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6862 choke me
6863 #else
6864 f = _beginthread;
6865 #endif
6866
6867 ; return 0; }
6868 EOF
6869 if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6870   rm -rf conftest*
6871   eval "ac_cv_func__beginthread=yes"
6872 else
6873   echo "configure: failed program was:" >&5
6874   cat conftest.$ac_ext >&5
6875   rm -rf conftest*
6876   eval "ac_cv_func__beginthread=no"
6877 fi
6878 rm -f conftest*
6879 fi
6880
6881 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6882   echo "$ac_t""yes" 1>&6
6883   ol_cv_nt_threads=yes
6884 else
6885   echo "$ac_t""no" 1>&6
6886 ol_cv_nt_threads=no
6887 fi
6888
6889         
6890 fi
6891
6892 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6893
6894         if test $ol_cv_nt_threads = yes ; then
6895                 cat >> confdefs.h <<\EOF
6896 #define HAVE_NT_THREADS 1
6897 EOF
6898
6899         fi
6900
6901
6902         if test "$ol_cv_nt_threads" = yes ; then
6903         ol_link_threads=nt
6904         ol_with_threads=found
6905         ol_with_yielding_select=yes
6906
6907                 cat >> confdefs.h <<\EOF
6908 #define HAVE_NT_SERVICE_MANAGER 1
6909 EOF
6910
6911                 cat >> confdefs.h <<\EOF
6912 #define HAVE_NT_EVENT_LOG 1
6913 EOF
6914
6915         fi
6916
6917         if test $ol_with_threads = nt ; then
6918                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6919         fi
6920 fi
6921
6922 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6923         -o $ol_with_threads = posix ; then
6924
6925         for ac_hdr in pthread.h
6926 do
6927 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6928 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6929 echo "configure:6930: checking for $ac_hdr" >&5
6930 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6931   echo $ac_n "(cached) $ac_c" 1>&6
6932 else
6933   cat > conftest.$ac_ext <<EOF
6934 #line 6935 "configure"
6935 #include "confdefs.h"
6936 #include <$ac_hdr>
6937 EOF
6938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6939 { (eval echo configure:6940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6940 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6941 if test -z "$ac_err"; then
6942   rm -rf conftest*
6943   eval "ac_cv_header_$ac_safe=yes"
6944 else
6945   echo "$ac_err" >&5
6946   echo "configure: failed program was:" >&5
6947   cat conftest.$ac_ext >&5
6948   rm -rf conftest*
6949   eval "ac_cv_header_$ac_safe=no"
6950 fi
6951 rm -f conftest*
6952 fi
6953 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6954   echo "$ac_t""yes" 1>&6
6955     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6956   cat >> confdefs.h <<EOF
6957 #define $ac_tr_hdr 1
6958 EOF
6959  
6960 else
6961   echo "$ac_t""no" 1>&6
6962 fi
6963 done
6964
6965
6966         if test $ac_cv_header_pthread_h = yes ; then
6967                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6968 echo "configure:6969: checking POSIX thread version" >&5
6969 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6970   echo $ac_n "(cached) $ac_c" 1>&6
6971 else
6972   
6973         cat > conftest.$ac_ext <<EOF
6974 #line 6975 "configure"
6975 #include "confdefs.h"
6976
6977 #               include <pthread.h>
6978                 /* this check could be improved */
6979 #               ifdef PTHREAD_ONCE_INIT
6980                         pthread_version_final;
6981 #               endif
6982         
6983 EOF
6984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6985   egrep "pthread_version_final" >/dev/null 2>&1; then
6986   rm -rf conftest*
6987   ol_pthread_final=yes
6988 else
6989   rm -rf conftest*
6990   ol_pthread_final=no
6991 fi
6992 rm -f conftest*
6993
6994
6995         cat > conftest.$ac_ext <<EOF
6996 #line 6997 "configure"
6997 #include "confdefs.h"
6998
6999 #               include <pthread.h>
7000                 /* this check could be improved */
7001 #               ifdef pthread_once_init
7002                         pthread_version_draft4;
7003 #               endif
7004         
7005 EOF
7006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7007   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7008   rm -rf conftest*
7009   ol_pthread_draft4=yes
7010 else
7011   rm -rf conftest*
7012   ol_pthread_draft4=no
7013 fi
7014 rm -f conftest*
7015
7016
7017         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7018                 ol_cv_pthread_version=final
7019         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7020                 ol_cv_pthread_version=draft4
7021         else
7022                 ol_cv_pthread_version=unknown
7023         fi
7024
7025 fi
7026
7027 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7028
7029
7030                 if test $ol_cv_pthread_version = final ; then
7031                         cat >> confdefs.h <<\EOF
7032 #define HAVE_PTHREADS_FINAL 1
7033 EOF
7034
7035                 elif test $ol_cv_pthread_version = draft4 ; then
7036                         cat >> confdefs.h <<\EOF
7037 #define HAVE_PTHREADS_D4 1
7038 EOF
7039
7040                 else
7041                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7042                 fi
7043
7044                 # consider threads found
7045                 ol_with_threads=found
7046
7047                 
7048         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7049 echo "configure:7050: checking for LinuxThreads pthread.h" >&5
7050 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7051   echo $ac_n "(cached) $ac_c" 1>&6
7052 else
7053   cat > conftest.$ac_ext <<EOF
7054 #line 7055 "configure"
7055 #include "confdefs.h"
7056 #include <pthread.h>
7057 EOF
7058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7059   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7060   rm -rf conftest*
7061   ol_cv_header_linux_threads=yes
7062 else
7063   rm -rf conftest*
7064   ol_cv_header_linux_threads=no
7065 fi
7066 rm -f conftest*
7067
7068                 
7069 fi
7070
7071 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7072         if test $ol_cv_header_linux_threads = yes; then
7073                 cat >> confdefs.h <<\EOF
7074 #define HAVE_LINUX_THREADS 1
7075 EOF
7076
7077         fi
7078
7079                 
7080         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7081 echo "configure:7082: checking for GNU Pth pthread.h" >&5
7082 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7083   echo $ac_n "(cached) $ac_c" 1>&6
7084 else
7085   cat > conftest.$ac_ext <<EOF
7086 #line 7087 "configure"
7087 #include "confdefs.h"
7088 #include <pthread.h>
7089 #ifdef _POSIX_THREAD_IS_GNU_PTH
7090         __gnu_pth__;
7091 #endif
7092
7093 EOF
7094 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7095   egrep "__gnu_pth__" >/dev/null 2>&1; then
7096   rm -rf conftest*
7097   ol_cv_header_gnu_pth_pthread_h=yes
7098 else
7099   rm -rf conftest*
7100   ol_cv_header_gnu_pth_pthread_h=no
7101 fi
7102 rm -f conftest*
7103
7104                 
7105 fi
7106
7107 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7108
7109
7110                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7111                         for ac_hdr in sched.h
7112 do
7113 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7114 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7115 echo "configure:7116: checking for $ac_hdr" >&5
7116 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7117   echo $ac_n "(cached) $ac_c" 1>&6
7118 else
7119   cat > conftest.$ac_ext <<EOF
7120 #line 7121 "configure"
7121 #include "confdefs.h"
7122 #include <$ac_hdr>
7123 EOF
7124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7125 { (eval echo configure:7126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7127 if test -z "$ac_err"; then
7128   rm -rf conftest*
7129   eval "ac_cv_header_$ac_safe=yes"
7130 else
7131   echo "$ac_err" >&5
7132   echo "configure: failed program was:" >&5
7133   cat conftest.$ac_ext >&5
7134   rm -rf conftest*
7135   eval "ac_cv_header_$ac_safe=no"
7136 fi
7137 rm -f conftest*
7138 fi
7139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7140   echo "$ac_t""yes" 1>&6
7141     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7142   cat >> confdefs.h <<EOF
7143 #define $ac_tr_hdr 1
7144 EOF
7145  
7146 else
7147   echo "$ac_t""no" 1>&6
7148 fi
7149 done
7150
7151                 fi
7152
7153                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7154                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7155 echo "configure:7156: checking for pthread_create in default libraries" >&5
7156 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7157   echo $ac_n "(cached) $ac_c" 1>&6
7158 else
7159   
7160                 if test "$cross_compiling" = yes; then
7161   cat > conftest.$ac_ext <<EOF
7162 #line 7163 "configure"
7163 #include "confdefs.h"
7164 /* pthread test headers */
7165 #include <pthread.h>
7166 #ifndef NULL
7167 #define NULL (void*)0
7168 #endif
7169
7170 static void *task(p)
7171         void *p;
7172 {
7173         return (void *) (p == NULL);
7174 }
7175
7176 int main() {
7177
7178         /* pthread test function */
7179         pthread_t t;
7180         int status;
7181 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7182         /* This system (e.g. AIX) defaults detached; must override */
7183         pthread_attr_t attr;
7184
7185         status = pthread_attr_init(&attr);
7186         if( status ) exit( status );
7187
7188         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7189         if( status ) exit( status );
7190
7191 #define ATTR    &attr
7192 #else
7193 #if HAVE_PTHREADS_D4
7194 #define ATTR    pthread_attr_default
7195 #else
7196 #define ATTR    NULL
7197 #endif
7198 #endif
7199         /* make sure pthread_create() isn't just a stub */
7200         status = pthread_create(&t, ATTR, task, NULL);
7201         if( status ) exit( status );
7202
7203         /* make sure pthread_detach() isn't just a stub */
7204 #if HAVE_PTHREADS_D4
7205         status = pthread_detach( &t );
7206 #else
7207         status = pthread_detach( t );
7208 #endif
7209
7210 #ifdef HAVE_LINUX_THREADS
7211         pthread_kill_other_threads_np();
7212 #endif
7213
7214         exit( status );
7215
7216 ; return 0; }
7217 EOF
7218 if { (eval echo configure:7219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7219   rm -rf conftest*
7220   ol_cv_pthread_create=yes
7221 else
7222   echo "configure: failed program was:" >&5
7223   cat conftest.$ac_ext >&5
7224   rm -rf conftest*
7225   ol_cv_pthread_create=no
7226 fi
7227 rm -f conftest*
7228 else
7229   cat > conftest.$ac_ext <<EOF
7230 #line 7231 "configure"
7231 #include "confdefs.h"
7232 /* pthread test headers */
7233 #include <pthread.h>
7234 #ifndef NULL
7235 #define NULL (void*)0
7236 #endif
7237
7238 static void *task(p)
7239         void *p;
7240 {
7241         return (void *) (p == NULL);
7242 }
7243
7244
7245 int main(argc, argv)
7246         int argc;
7247         char **argv;
7248 {
7249
7250         /* pthread test function */
7251         pthread_t t;
7252         int status;
7253 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7254         /* This system (e.g. AIX) defaults detached; must override */
7255         pthread_attr_t attr;
7256
7257         status = pthread_attr_init(&attr);
7258         if( status ) exit( status );
7259
7260         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7261         if( status ) exit( status );
7262
7263 #define ATTR    &attr
7264 #else
7265 #if HAVE_PTHREADS_D4
7266 #define ATTR    pthread_attr_default
7267 #else
7268 #define ATTR    NULL
7269 #endif
7270 #endif
7271         /* make sure pthread_create() isn't just a stub */
7272         status = pthread_create(&t, ATTR, task, NULL);
7273         if( status ) exit( status );
7274
7275         /* make sure pthread_detach() isn't just a stub */
7276 #if HAVE_PTHREADS_D4
7277         status = pthread_detach( &t );
7278 #else
7279         status = pthread_detach( t );
7280 #endif
7281
7282 #ifdef HAVE_LINUX_THREADS
7283         pthread_kill_other_threads_np();
7284 #endif
7285
7286         exit( status );
7287
7288 }
7289
7290 EOF
7291 if { (eval echo configure:7292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7292 then
7293   ol_cv_pthread_create=yes
7294 else
7295   echo "configure: failed program was:" >&5
7296   cat conftest.$ac_ext >&5
7297   rm -fr conftest*
7298   ol_cv_pthread_create=no
7299 fi
7300 rm -fr conftest*
7301 fi
7302
7303 fi
7304
7305 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7306
7307                 if test $ol_cv_pthread_create != no ; then
7308                         ol_link_threads=posix
7309                         ol_link_pthreads=""
7310                 fi
7311                 
7312                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7313 if test "$ol_link_threads" = no ; then
7314         # try -kthread
7315         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7316 echo "configure:7317: checking for pthread link with -kthread" >&5
7317 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7318   echo $ac_n "(cached) $ac_c" 1>&6
7319 else
7320   
7321                 # save the flags
7322                 ol_LIBS="$LIBS"
7323                 LIBS="-kthread $LIBS"
7324
7325                 if test "$cross_compiling" = yes; then
7326   cat > conftest.$ac_ext <<EOF
7327 #line 7328 "configure"
7328 #include "confdefs.h"
7329 /* pthread test headers */
7330 #include <pthread.h>
7331 #ifndef NULL
7332 #define NULL (void*)0
7333 #endif
7334
7335 static void *task(p)
7336         void *p;
7337 {
7338         return (void *) (p == NULL);
7339 }
7340
7341 int main() {
7342
7343         /* pthread test function */
7344         pthread_t t;
7345         int status;
7346 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7347         /* This system (e.g. AIX) defaults detached; must override */
7348         pthread_attr_t attr;
7349
7350         status = pthread_attr_init(&attr);
7351         if( status ) exit( status );
7352
7353         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7354         if( status ) exit( status );
7355
7356 #define ATTR    &attr
7357 #else
7358 #if HAVE_PTHREADS_D4
7359 #define ATTR    pthread_attr_default
7360 #else
7361 #define ATTR    NULL
7362 #endif
7363 #endif
7364         /* make sure pthread_create() isn't just a stub */
7365         status = pthread_create(&t, ATTR, task, NULL);
7366         if( status ) exit( status );
7367
7368         /* make sure pthread_detach() isn't just a stub */
7369 #if HAVE_PTHREADS_D4
7370         status = pthread_detach( &t );
7371 #else
7372         status = pthread_detach( t );
7373 #endif
7374
7375 #ifdef HAVE_LINUX_THREADS
7376         pthread_kill_other_threads_np();
7377 #endif
7378
7379         exit( status );
7380
7381 ; return 0; }
7382 EOF
7383 if { (eval echo configure:7384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7384   rm -rf conftest*
7385   ol_cv_pthread_kthread=yes
7386 else
7387   echo "configure: failed program was:" >&5
7388   cat conftest.$ac_ext >&5
7389   rm -rf conftest*
7390   ol_cv_pthread_kthread=no
7391 fi
7392 rm -f conftest*
7393 else
7394   cat > conftest.$ac_ext <<EOF
7395 #line 7396 "configure"
7396 #include "confdefs.h"
7397 /* pthread test headers */
7398 #include <pthread.h>
7399 #ifndef NULL
7400 #define NULL (void*)0
7401 #endif
7402
7403 static void *task(p)
7404         void *p;
7405 {
7406         return (void *) (p == NULL);
7407 }
7408
7409
7410 int main(argc, argv)
7411         int argc;
7412         char **argv;
7413 {
7414
7415         /* pthread test function */
7416         pthread_t t;
7417         int status;
7418 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7419         /* This system (e.g. AIX) defaults detached; must override */
7420         pthread_attr_t attr;
7421
7422         status = pthread_attr_init(&attr);
7423         if( status ) exit( status );
7424
7425         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7426         if( status ) exit( status );
7427
7428 #define ATTR    &attr
7429 #else
7430 #if HAVE_PTHREADS_D4
7431 #define ATTR    pthread_attr_default
7432 #else
7433 #define ATTR    NULL
7434 #endif
7435 #endif
7436         /* make sure pthread_create() isn't just a stub */
7437         status = pthread_create(&t, ATTR, task, NULL);
7438         if( status ) exit( status );
7439
7440         /* make sure pthread_detach() isn't just a stub */
7441 #if HAVE_PTHREADS_D4
7442         status = pthread_detach( &t );
7443 #else
7444         status = pthread_detach( t );
7445 #endif
7446
7447 #ifdef HAVE_LINUX_THREADS
7448         pthread_kill_other_threads_np();
7449 #endif
7450
7451         exit( status );
7452
7453 }
7454
7455 EOF
7456 if { (eval echo configure:7457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7457 then
7458   ol_cv_pthread_kthread=yes
7459 else
7460   echo "configure: failed program was:" >&5
7461   cat conftest.$ac_ext >&5
7462   rm -fr conftest*
7463   ol_cv_pthread_kthread=no
7464 fi
7465 rm -fr conftest*
7466 fi
7467
7468
7469                 # restore the LIBS
7470                 LIBS="$ol_LIBS"
7471         
7472 fi
7473
7474 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7475
7476         if test $ol_cv_pthread_kthread = yes ; then
7477                 ol_link_pthreads="-kthread"
7478                 ol_link_threads=posix
7479         fi
7480 fi
7481
7482                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7483 if test "$ol_link_threads" = no ; then
7484         # try -pthread
7485         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7486 echo "configure:7487: checking for pthread link with -pthread" >&5
7487 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7488   echo $ac_n "(cached) $ac_c" 1>&6
7489 else
7490   
7491                 # save the flags
7492                 ol_LIBS="$LIBS"
7493                 LIBS="-pthread $LIBS"
7494
7495                 if test "$cross_compiling" = yes; then
7496   cat > conftest.$ac_ext <<EOF
7497 #line 7498 "configure"
7498 #include "confdefs.h"
7499 /* pthread test headers */
7500 #include <pthread.h>
7501 #ifndef NULL
7502 #define NULL (void*)0
7503 #endif
7504
7505 static void *task(p)
7506         void *p;
7507 {
7508         return (void *) (p == NULL);
7509 }
7510
7511 int main() {
7512
7513         /* pthread test function */
7514         pthread_t t;
7515         int status;
7516 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7517         /* This system (e.g. AIX) defaults detached; must override */
7518         pthread_attr_t attr;
7519
7520         status = pthread_attr_init(&attr);
7521         if( status ) exit( status );
7522
7523         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7524         if( status ) exit( status );
7525
7526 #define ATTR    &attr
7527 #else
7528 #if HAVE_PTHREADS_D4
7529 #define ATTR    pthread_attr_default
7530 #else
7531 #define ATTR    NULL
7532 #endif
7533 #endif
7534         /* make sure pthread_create() isn't just a stub */
7535         status = pthread_create(&t, ATTR, task, NULL);
7536         if( status ) exit( status );
7537
7538         /* make sure pthread_detach() isn't just a stub */
7539 #if HAVE_PTHREADS_D4
7540         status = pthread_detach( &t );
7541 #else
7542         status = pthread_detach( t );
7543 #endif
7544
7545 #ifdef HAVE_LINUX_THREADS
7546         pthread_kill_other_threads_np();
7547 #endif
7548
7549         exit( status );
7550
7551 ; return 0; }
7552 EOF
7553 if { (eval echo configure:7554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7554   rm -rf conftest*
7555   ol_cv_pthread_pthread=yes
7556 else
7557   echo "configure: failed program was:" >&5
7558   cat conftest.$ac_ext >&5
7559   rm -rf conftest*
7560   ol_cv_pthread_pthread=no
7561 fi
7562 rm -f conftest*
7563 else
7564   cat > conftest.$ac_ext <<EOF
7565 #line 7566 "configure"
7566 #include "confdefs.h"
7567 /* pthread test headers */
7568 #include <pthread.h>
7569 #ifndef NULL
7570 #define NULL (void*)0
7571 #endif
7572
7573 static void *task(p)
7574         void *p;
7575 {
7576         return (void *) (p == NULL);
7577 }
7578
7579
7580 int main(argc, argv)
7581         int argc;
7582         char **argv;
7583 {
7584
7585         /* pthread test function */
7586         pthread_t t;
7587         int status;
7588 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7589         /* This system (e.g. AIX) defaults detached; must override */
7590         pthread_attr_t attr;
7591
7592         status = pthread_attr_init(&attr);
7593         if( status ) exit( status );
7594
7595         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7596         if( status ) exit( status );
7597
7598 #define ATTR    &attr
7599 #else
7600 #if HAVE_PTHREADS_D4
7601 #define ATTR    pthread_attr_default
7602 #else
7603 #define ATTR    NULL
7604 #endif
7605 #endif
7606         /* make sure pthread_create() isn't just a stub */
7607         status = pthread_create(&t, ATTR, task, NULL);
7608         if( status ) exit( status );
7609
7610         /* make sure pthread_detach() isn't just a stub */
7611 #if HAVE_PTHREADS_D4
7612         status = pthread_detach( &t );
7613 #else
7614         status = pthread_detach( t );
7615 #endif
7616
7617 #ifdef HAVE_LINUX_THREADS
7618         pthread_kill_other_threads_np();
7619 #endif
7620
7621         exit( status );
7622
7623 }
7624
7625 EOF
7626 if { (eval echo configure:7627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7627 then
7628   ol_cv_pthread_pthread=yes
7629 else
7630   echo "configure: failed program was:" >&5
7631   cat conftest.$ac_ext >&5
7632   rm -fr conftest*
7633   ol_cv_pthread_pthread=no
7634 fi
7635 rm -fr conftest*
7636 fi
7637
7638
7639                 # restore the LIBS
7640                 LIBS="$ol_LIBS"
7641         
7642 fi
7643
7644 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7645
7646         if test $ol_cv_pthread_pthread = yes ; then
7647                 ol_link_pthreads="-pthread"
7648                 ol_link_threads=posix
7649         fi
7650 fi
7651
7652                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7653 if test "$ol_link_threads" = no ; then
7654         # try -pthreads
7655         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7656 echo "configure:7657: checking for pthread link with -pthreads" >&5
7657 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7658   echo $ac_n "(cached) $ac_c" 1>&6
7659 else
7660   
7661                 # save the flags
7662                 ol_LIBS="$LIBS"
7663                 LIBS="-pthreads $LIBS"
7664
7665                 if test "$cross_compiling" = yes; then
7666   cat > conftest.$ac_ext <<EOF
7667 #line 7668 "configure"
7668 #include "confdefs.h"
7669 /* pthread test headers */
7670 #include <pthread.h>
7671 #ifndef NULL
7672 #define NULL (void*)0
7673 #endif
7674
7675 static void *task(p)
7676         void *p;
7677 {
7678         return (void *) (p == NULL);
7679 }
7680
7681 int main() {
7682
7683         /* pthread test function */
7684         pthread_t t;
7685         int status;
7686 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7687         /* This system (e.g. AIX) defaults detached; must override */
7688         pthread_attr_t attr;
7689
7690         status = pthread_attr_init(&attr);
7691         if( status ) exit( status );
7692
7693         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7694         if( status ) exit( status );
7695
7696 #define ATTR    &attr
7697 #else
7698 #if HAVE_PTHREADS_D4
7699 #define ATTR    pthread_attr_default
7700 #else
7701 #define ATTR    NULL
7702 #endif
7703 #endif
7704         /* make sure pthread_create() isn't just a stub */
7705         status = pthread_create(&t, ATTR, task, NULL);
7706         if( status ) exit( status );
7707
7708         /* make sure pthread_detach() isn't just a stub */
7709 #if HAVE_PTHREADS_D4
7710         status = pthread_detach( &t );
7711 #else
7712         status = pthread_detach( t );
7713 #endif
7714
7715 #ifdef HAVE_LINUX_THREADS
7716         pthread_kill_other_threads_np();
7717 #endif
7718
7719         exit( status );
7720
7721 ; return 0; }
7722 EOF
7723 if { (eval echo configure:7724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7724   rm -rf conftest*
7725   ol_cv_pthread_pthreads=yes
7726 else
7727   echo "configure: failed program was:" >&5
7728   cat conftest.$ac_ext >&5
7729   rm -rf conftest*
7730   ol_cv_pthread_pthreads=no
7731 fi
7732 rm -f conftest*
7733 else
7734   cat > conftest.$ac_ext <<EOF
7735 #line 7736 "configure"
7736 #include "confdefs.h"
7737 /* pthread test headers */
7738 #include <pthread.h>
7739 #ifndef NULL
7740 #define NULL (void*)0
7741 #endif
7742
7743 static void *task(p)
7744         void *p;
7745 {
7746         return (void *) (p == NULL);
7747 }
7748
7749
7750 int main(argc, argv)
7751         int argc;
7752         char **argv;
7753 {
7754
7755         /* pthread test function */
7756         pthread_t t;
7757         int status;
7758 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7759         /* This system (e.g. AIX) defaults detached; must override */
7760         pthread_attr_t attr;
7761
7762         status = pthread_attr_init(&attr);
7763         if( status ) exit( status );
7764
7765         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7766         if( status ) exit( status );
7767
7768 #define ATTR    &attr
7769 #else
7770 #if HAVE_PTHREADS_D4
7771 #define ATTR    pthread_attr_default
7772 #else
7773 #define ATTR    NULL
7774 #endif
7775 #endif
7776         /* make sure pthread_create() isn't just a stub */
7777         status = pthread_create(&t, ATTR, task, NULL);
7778         if( status ) exit( status );
7779
7780         /* make sure pthread_detach() isn't just a stub */
7781 #if HAVE_PTHREADS_D4
7782         status = pthread_detach( &t );
7783 #else
7784         status = pthread_detach( t );
7785 #endif
7786
7787 #ifdef HAVE_LINUX_THREADS
7788         pthread_kill_other_threads_np();
7789 #endif
7790
7791         exit( status );
7792
7793 }
7794
7795 EOF
7796 if { (eval echo configure:7797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7797 then
7798   ol_cv_pthread_pthreads=yes
7799 else
7800   echo "configure: failed program was:" >&5
7801   cat conftest.$ac_ext >&5
7802   rm -fr conftest*
7803   ol_cv_pthread_pthreads=no
7804 fi
7805 rm -fr conftest*
7806 fi
7807
7808
7809                 # restore the LIBS
7810                 LIBS="$ol_LIBS"
7811         
7812 fi
7813
7814 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7815
7816         if test $ol_cv_pthread_pthreads = yes ; then
7817                 ol_link_pthreads="-pthreads"
7818                 ol_link_threads=posix
7819         fi
7820 fi
7821
7822                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7823 if test "$ol_link_threads" = no ; then
7824         # try -mthreads
7825         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7826 echo "configure:7827: checking for pthread link with -mthreads" >&5
7827 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7828   echo $ac_n "(cached) $ac_c" 1>&6
7829 else
7830   
7831                 # save the flags
7832                 ol_LIBS="$LIBS"
7833                 LIBS="-mthreads $LIBS"
7834
7835                 if test "$cross_compiling" = yes; then
7836   cat > conftest.$ac_ext <<EOF
7837 #line 7838 "configure"
7838 #include "confdefs.h"
7839 /* pthread test headers */
7840 #include <pthread.h>
7841 #ifndef NULL
7842 #define NULL (void*)0
7843 #endif
7844
7845 static void *task(p)
7846         void *p;
7847 {
7848         return (void *) (p == NULL);
7849 }
7850
7851 int main() {
7852
7853         /* pthread test function */
7854         pthread_t t;
7855         int status;
7856 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7857         /* This system (e.g. AIX) defaults detached; must override */
7858         pthread_attr_t attr;
7859
7860         status = pthread_attr_init(&attr);
7861         if( status ) exit( status );
7862
7863         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7864         if( status ) exit( status );
7865
7866 #define ATTR    &attr
7867 #else
7868 #if HAVE_PTHREADS_D4
7869 #define ATTR    pthread_attr_default
7870 #else
7871 #define ATTR    NULL
7872 #endif
7873 #endif
7874         /* make sure pthread_create() isn't just a stub */
7875         status = pthread_create(&t, ATTR, task, NULL);
7876         if( status ) exit( status );
7877
7878         /* make sure pthread_detach() isn't just a stub */
7879 #if HAVE_PTHREADS_D4
7880         status = pthread_detach( &t );
7881 #else
7882         status = pthread_detach( t );
7883 #endif
7884
7885 #ifdef HAVE_LINUX_THREADS
7886         pthread_kill_other_threads_np();
7887 #endif
7888
7889         exit( status );
7890
7891 ; return 0; }
7892 EOF
7893 if { (eval echo configure:7894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7894   rm -rf conftest*
7895   ol_cv_pthread_mthreads=yes
7896 else
7897   echo "configure: failed program was:" >&5
7898   cat conftest.$ac_ext >&5
7899   rm -rf conftest*
7900   ol_cv_pthread_mthreads=no
7901 fi
7902 rm -f conftest*
7903 else
7904   cat > conftest.$ac_ext <<EOF
7905 #line 7906 "configure"
7906 #include "confdefs.h"
7907 /* pthread test headers */
7908 #include <pthread.h>
7909 #ifndef NULL
7910 #define NULL (void*)0
7911 #endif
7912
7913 static void *task(p)
7914         void *p;
7915 {
7916         return (void *) (p == NULL);
7917 }
7918
7919
7920 int main(argc, argv)
7921         int argc;
7922         char **argv;
7923 {
7924
7925         /* pthread test function */
7926         pthread_t t;
7927         int status;
7928 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7929         /* This system (e.g. AIX) defaults detached; must override */
7930         pthread_attr_t attr;
7931
7932         status = pthread_attr_init(&attr);
7933         if( status ) exit( status );
7934
7935         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7936         if( status ) exit( status );
7937
7938 #define ATTR    &attr
7939 #else
7940 #if HAVE_PTHREADS_D4
7941 #define ATTR    pthread_attr_default
7942 #else
7943 #define ATTR    NULL
7944 #endif
7945 #endif
7946         /* make sure pthread_create() isn't just a stub */
7947         status = pthread_create(&t, ATTR, task, NULL);
7948         if( status ) exit( status );
7949
7950         /* make sure pthread_detach() isn't just a stub */
7951 #if HAVE_PTHREADS_D4
7952         status = pthread_detach( &t );
7953 #else
7954         status = pthread_detach( t );
7955 #endif
7956
7957 #ifdef HAVE_LINUX_THREADS
7958         pthread_kill_other_threads_np();
7959 #endif
7960
7961         exit( status );
7962
7963 }
7964
7965 EOF
7966 if { (eval echo configure:7967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7967 then
7968   ol_cv_pthread_mthreads=yes
7969 else
7970   echo "configure: failed program was:" >&5
7971   cat conftest.$ac_ext >&5
7972   rm -fr conftest*
7973   ol_cv_pthread_mthreads=no
7974 fi
7975 rm -fr conftest*
7976 fi
7977
7978
7979                 # restore the LIBS
7980                 LIBS="$ol_LIBS"
7981         
7982 fi
7983
7984 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7985
7986         if test $ol_cv_pthread_mthreads = yes ; then
7987                 ol_link_pthreads="-mthreads"
7988                 ol_link_threads=posix
7989         fi
7990 fi
7991
7992                 # Pthread try link: -thread (ol_cv_pthread_thread)
7993 if test "$ol_link_threads" = no ; then
7994         # try -thread
7995         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7996 echo "configure:7997: checking for pthread link with -thread" >&5
7997 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7998   echo $ac_n "(cached) $ac_c" 1>&6
7999 else
8000   
8001                 # save the flags
8002                 ol_LIBS="$LIBS"
8003                 LIBS="-thread $LIBS"
8004
8005                 if test "$cross_compiling" = yes; then
8006   cat > conftest.$ac_ext <<EOF
8007 #line 8008 "configure"
8008 #include "confdefs.h"
8009 /* pthread test headers */
8010 #include <pthread.h>
8011 #ifndef NULL
8012 #define NULL (void*)0
8013 #endif
8014
8015 static void *task(p)
8016         void *p;
8017 {
8018         return (void *) (p == NULL);
8019 }
8020
8021 int main() {
8022
8023         /* pthread test function */
8024         pthread_t t;
8025         int status;
8026 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8027         /* This system (e.g. AIX) defaults detached; must override */
8028         pthread_attr_t attr;
8029
8030         status = pthread_attr_init(&attr);
8031         if( status ) exit( status );
8032
8033         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8034         if( status ) exit( status );
8035
8036 #define ATTR    &attr
8037 #else
8038 #if HAVE_PTHREADS_D4
8039 #define ATTR    pthread_attr_default
8040 #else
8041 #define ATTR    NULL
8042 #endif
8043 #endif
8044         /* make sure pthread_create() isn't just a stub */
8045         status = pthread_create(&t, ATTR, task, NULL);
8046         if( status ) exit( status );
8047
8048         /* make sure pthread_detach() isn't just a stub */
8049 #if HAVE_PTHREADS_D4
8050         status = pthread_detach( &t );
8051 #else
8052         status = pthread_detach( t );
8053 #endif
8054
8055 #ifdef HAVE_LINUX_THREADS
8056         pthread_kill_other_threads_np();
8057 #endif
8058
8059         exit( status );
8060
8061 ; return 0; }
8062 EOF
8063 if { (eval echo configure:8064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8064   rm -rf conftest*
8065   ol_cv_pthread_thread=yes
8066 else
8067   echo "configure: failed program was:" >&5
8068   cat conftest.$ac_ext >&5
8069   rm -rf conftest*
8070   ol_cv_pthread_thread=no
8071 fi
8072 rm -f conftest*
8073 else
8074   cat > conftest.$ac_ext <<EOF
8075 #line 8076 "configure"
8076 #include "confdefs.h"
8077 /* pthread test headers */
8078 #include <pthread.h>
8079 #ifndef NULL
8080 #define NULL (void*)0
8081 #endif
8082
8083 static void *task(p)
8084         void *p;
8085 {
8086         return (void *) (p == NULL);
8087 }
8088
8089
8090 int main(argc, argv)
8091         int argc;
8092         char **argv;
8093 {
8094
8095         /* pthread test function */
8096         pthread_t t;
8097         int status;
8098 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8099         /* This system (e.g. AIX) defaults detached; must override */
8100         pthread_attr_t attr;
8101
8102         status = pthread_attr_init(&attr);
8103         if( status ) exit( status );
8104
8105         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8106         if( status ) exit( status );
8107
8108 #define ATTR    &attr
8109 #else
8110 #if HAVE_PTHREADS_D4
8111 #define ATTR    pthread_attr_default
8112 #else
8113 #define ATTR    NULL
8114 #endif
8115 #endif
8116         /* make sure pthread_create() isn't just a stub */
8117         status = pthread_create(&t, ATTR, task, NULL);
8118         if( status ) exit( status );
8119
8120         /* make sure pthread_detach() isn't just a stub */
8121 #if HAVE_PTHREADS_D4
8122         status = pthread_detach( &t );
8123 #else
8124         status = pthread_detach( t );
8125 #endif
8126
8127 #ifdef HAVE_LINUX_THREADS
8128         pthread_kill_other_threads_np();
8129 #endif
8130
8131         exit( status );
8132
8133 }
8134
8135 EOF
8136 if { (eval echo configure:8137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8137 then
8138   ol_cv_pthread_thread=yes
8139 else
8140   echo "configure: failed program was:" >&5
8141   cat conftest.$ac_ext >&5
8142   rm -fr conftest*
8143   ol_cv_pthread_thread=no
8144 fi
8145 rm -fr conftest*
8146 fi
8147
8148
8149                 # restore the LIBS
8150                 LIBS="$ol_LIBS"
8151         
8152 fi
8153
8154 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8155
8156         if test $ol_cv_pthread_thread = yes ; then
8157                 ol_link_pthreads="-thread"
8158                 ol_link_threads=posix
8159         fi
8160 fi
8161
8162
8163                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8164 if test "$ol_link_threads" = no ; then
8165         # try -lpthread -lmach -lexc -lc_r
8166         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8167 echo "configure:8168: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8168 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8169   echo $ac_n "(cached) $ac_c" 1>&6
8170 else
8171   
8172                 # save the flags
8173                 ol_LIBS="$LIBS"
8174                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8175
8176                 if test "$cross_compiling" = yes; then
8177   cat > conftest.$ac_ext <<EOF
8178 #line 8179 "configure"
8179 #include "confdefs.h"
8180 /* pthread test headers */
8181 #include <pthread.h>
8182 #ifndef NULL
8183 #define NULL (void*)0
8184 #endif
8185
8186 static void *task(p)
8187         void *p;
8188 {
8189         return (void *) (p == NULL);
8190 }
8191
8192 int main() {
8193
8194         /* pthread test function */
8195         pthread_t t;
8196         int status;
8197 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8198         /* This system (e.g. AIX) defaults detached; must override */
8199         pthread_attr_t attr;
8200
8201         status = pthread_attr_init(&attr);
8202         if( status ) exit( status );
8203
8204         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8205         if( status ) exit( status );
8206
8207 #define ATTR    &attr
8208 #else
8209 #if HAVE_PTHREADS_D4
8210 #define ATTR    pthread_attr_default
8211 #else
8212 #define ATTR    NULL
8213 #endif
8214 #endif
8215         /* make sure pthread_create() isn't just a stub */
8216         status = pthread_create(&t, ATTR, task, NULL);
8217         if( status ) exit( status );
8218
8219         /* make sure pthread_detach() isn't just a stub */
8220 #if HAVE_PTHREADS_D4
8221         status = pthread_detach( &t );
8222 #else
8223         status = pthread_detach( t );
8224 #endif
8225
8226 #ifdef HAVE_LINUX_THREADS
8227         pthread_kill_other_threads_np();
8228 #endif
8229
8230         exit( status );
8231
8232 ; return 0; }
8233 EOF
8234 if { (eval echo configure:8235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8235   rm -rf conftest*
8236   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8237 else
8238   echo "configure: failed program was:" >&5
8239   cat conftest.$ac_ext >&5
8240   rm -rf conftest*
8241   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8242 fi
8243 rm -f conftest*
8244 else
8245   cat > conftest.$ac_ext <<EOF
8246 #line 8247 "configure"
8247 #include "confdefs.h"
8248 /* pthread test headers */
8249 #include <pthread.h>
8250 #ifndef NULL
8251 #define NULL (void*)0
8252 #endif
8253
8254 static void *task(p)
8255         void *p;
8256 {
8257         return (void *) (p == NULL);
8258 }
8259
8260
8261 int main(argc, argv)
8262         int argc;
8263         char **argv;
8264 {
8265
8266         /* pthread test function */
8267         pthread_t t;
8268         int status;
8269 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8270         /* This system (e.g. AIX) defaults detached; must override */
8271         pthread_attr_t attr;
8272
8273         status = pthread_attr_init(&attr);
8274         if( status ) exit( status );
8275
8276         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8277         if( status ) exit( status );
8278
8279 #define ATTR    &attr
8280 #else
8281 #if HAVE_PTHREADS_D4
8282 #define ATTR    pthread_attr_default
8283 #else
8284 #define ATTR    NULL
8285 #endif
8286 #endif
8287         /* make sure pthread_create() isn't just a stub */
8288         status = pthread_create(&t, ATTR, task, NULL);
8289         if( status ) exit( status );
8290
8291         /* make sure pthread_detach() isn't just a stub */
8292 #if HAVE_PTHREADS_D4
8293         status = pthread_detach( &t );
8294 #else
8295         status = pthread_detach( t );
8296 #endif
8297
8298 #ifdef HAVE_LINUX_THREADS
8299         pthread_kill_other_threads_np();
8300 #endif
8301
8302         exit( status );
8303
8304 }
8305
8306 EOF
8307 if { (eval echo configure:8308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8308 then
8309   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8310 else
8311   echo "configure: failed program was:" >&5
8312   cat conftest.$ac_ext >&5
8313   rm -fr conftest*
8314   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8315 fi
8316 rm -fr conftest*
8317 fi
8318
8319
8320                 # restore the LIBS
8321                 LIBS="$ol_LIBS"
8322         
8323 fi
8324
8325 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8326
8327         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8328                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8329                 ol_link_threads=posix
8330         fi
8331 fi
8332
8333                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8334 if test "$ol_link_threads" = no ; then
8335         # try -lpthread -lmach -lexc
8336         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8337 echo "configure:8338: checking for pthread link with -lpthread -lmach -lexc" >&5
8338 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8339   echo $ac_n "(cached) $ac_c" 1>&6
8340 else
8341   
8342                 # save the flags
8343                 ol_LIBS="$LIBS"
8344                 LIBS="-lpthread -lmach -lexc $LIBS"
8345
8346                 if test "$cross_compiling" = yes; then
8347   cat > conftest.$ac_ext <<EOF
8348 #line 8349 "configure"
8349 #include "confdefs.h"
8350 /* pthread test headers */
8351 #include <pthread.h>
8352 #ifndef NULL
8353 #define NULL (void*)0
8354 #endif
8355
8356 static void *task(p)
8357         void *p;
8358 {
8359         return (void *) (p == NULL);
8360 }
8361
8362 int main() {
8363
8364         /* pthread test function */
8365         pthread_t t;
8366         int status;
8367 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8368         /* This system (e.g. AIX) defaults detached; must override */
8369         pthread_attr_t attr;
8370
8371         status = pthread_attr_init(&attr);
8372         if( status ) exit( status );
8373
8374         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8375         if( status ) exit( status );
8376
8377 #define ATTR    &attr
8378 #else
8379 #if HAVE_PTHREADS_D4
8380 #define ATTR    pthread_attr_default
8381 #else
8382 #define ATTR    NULL
8383 #endif
8384 #endif
8385         /* make sure pthread_create() isn't just a stub */
8386         status = pthread_create(&t, ATTR, task, NULL);
8387         if( status ) exit( status );
8388
8389         /* make sure pthread_detach() isn't just a stub */
8390 #if HAVE_PTHREADS_D4
8391         status = pthread_detach( &t );
8392 #else
8393         status = pthread_detach( t );
8394 #endif
8395
8396 #ifdef HAVE_LINUX_THREADS
8397         pthread_kill_other_threads_np();
8398 #endif
8399
8400         exit( status );
8401
8402 ; return 0; }
8403 EOF
8404 if { (eval echo configure:8405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8405   rm -rf conftest*
8406   ol_cv_pthread_lpthread_lmach_lexc=yes
8407 else
8408   echo "configure: failed program was:" >&5
8409   cat conftest.$ac_ext >&5
8410   rm -rf conftest*
8411   ol_cv_pthread_lpthread_lmach_lexc=no
8412 fi
8413 rm -f conftest*
8414 else
8415   cat > conftest.$ac_ext <<EOF
8416 #line 8417 "configure"
8417 #include "confdefs.h"
8418 /* pthread test headers */
8419 #include <pthread.h>
8420 #ifndef NULL
8421 #define NULL (void*)0
8422 #endif
8423
8424 static void *task(p)
8425         void *p;
8426 {
8427         return (void *) (p == NULL);
8428 }
8429
8430
8431 int main(argc, argv)
8432         int argc;
8433         char **argv;
8434 {
8435
8436         /* pthread test function */
8437         pthread_t t;
8438         int status;
8439 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8440         /* This system (e.g. AIX) defaults detached; must override */
8441         pthread_attr_t attr;
8442
8443         status = pthread_attr_init(&attr);
8444         if( status ) exit( status );
8445
8446         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8447         if( status ) exit( status );
8448
8449 #define ATTR    &attr
8450 #else
8451 #if HAVE_PTHREADS_D4
8452 #define ATTR    pthread_attr_default
8453 #else
8454 #define ATTR    NULL
8455 #endif
8456 #endif
8457         /* make sure pthread_create() isn't just a stub */
8458         status = pthread_create(&t, ATTR, task, NULL);
8459         if( status ) exit( status );
8460
8461         /* make sure pthread_detach() isn't just a stub */
8462 #if HAVE_PTHREADS_D4
8463         status = pthread_detach( &t );
8464 #else
8465         status = pthread_detach( t );
8466 #endif
8467
8468 #ifdef HAVE_LINUX_THREADS
8469         pthread_kill_other_threads_np();
8470 #endif
8471
8472         exit( status );
8473
8474 }
8475
8476 EOF
8477 if { (eval echo configure:8478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8478 then
8479   ol_cv_pthread_lpthread_lmach_lexc=yes
8480 else
8481   echo "configure: failed program was:" >&5
8482   cat conftest.$ac_ext >&5
8483   rm -fr conftest*
8484   ol_cv_pthread_lpthread_lmach_lexc=no
8485 fi
8486 rm -fr conftest*
8487 fi
8488
8489
8490                 # restore the LIBS
8491                 LIBS="$ol_LIBS"
8492         
8493 fi
8494
8495 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8496
8497         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8498                 ol_link_pthreads="-lpthread -lmach -lexc"
8499                 ol_link_threads=posix
8500         fi
8501 fi
8502
8503
8504                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8505 if test "$ol_link_threads" = no ; then
8506         # try -lpthread -Wl,-woff,85
8507         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8508 echo "configure:8509: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8509 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8510   echo $ac_n "(cached) $ac_c" 1>&6
8511 else
8512   
8513                 # save the flags
8514                 ol_LIBS="$LIBS"
8515                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8516
8517                 if test "$cross_compiling" = yes; then
8518   cat > conftest.$ac_ext <<EOF
8519 #line 8520 "configure"
8520 #include "confdefs.h"
8521 /* pthread test headers */
8522 #include <pthread.h>
8523 #ifndef NULL
8524 #define NULL (void*)0
8525 #endif
8526
8527 static void *task(p)
8528         void *p;
8529 {
8530         return (void *) (p == NULL);
8531 }
8532
8533 int main() {
8534
8535         /* pthread test function */
8536         pthread_t t;
8537         int status;
8538 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8539         /* This system (e.g. AIX) defaults detached; must override */
8540         pthread_attr_t attr;
8541
8542         status = pthread_attr_init(&attr);
8543         if( status ) exit( status );
8544
8545         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8546         if( status ) exit( status );
8547
8548 #define ATTR    &attr
8549 #else
8550 #if HAVE_PTHREADS_D4
8551 #define ATTR    pthread_attr_default
8552 #else
8553 #define ATTR    NULL
8554 #endif
8555 #endif
8556         /* make sure pthread_create() isn't just a stub */
8557         status = pthread_create(&t, ATTR, task, NULL);
8558         if( status ) exit( status );
8559
8560         /* make sure pthread_detach() isn't just a stub */
8561 #if HAVE_PTHREADS_D4
8562         status = pthread_detach( &t );
8563 #else
8564         status = pthread_detach( t );
8565 #endif
8566
8567 #ifdef HAVE_LINUX_THREADS
8568         pthread_kill_other_threads_np();
8569 #endif
8570
8571         exit( status );
8572
8573 ; return 0; }
8574 EOF
8575 if { (eval echo configure:8576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8576   rm -rf conftest*
8577   ol_cv_pthread_lib_lpthread_woff=yes
8578 else
8579   echo "configure: failed program was:" >&5
8580   cat conftest.$ac_ext >&5
8581   rm -rf conftest*
8582   ol_cv_pthread_lib_lpthread_woff=no
8583 fi
8584 rm -f conftest*
8585 else
8586   cat > conftest.$ac_ext <<EOF
8587 #line 8588 "configure"
8588 #include "confdefs.h"
8589 /* pthread test headers */
8590 #include <pthread.h>
8591 #ifndef NULL
8592 #define NULL (void*)0
8593 #endif
8594
8595 static void *task(p)
8596         void *p;
8597 {
8598         return (void *) (p == NULL);
8599 }
8600
8601
8602 int main(argc, argv)
8603         int argc;
8604         char **argv;
8605 {
8606
8607         /* pthread test function */
8608         pthread_t t;
8609         int status;
8610 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8611         /* This system (e.g. AIX) defaults detached; must override */
8612         pthread_attr_t attr;
8613
8614         status = pthread_attr_init(&attr);
8615         if( status ) exit( status );
8616
8617         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8618         if( status ) exit( status );
8619
8620 #define ATTR    &attr
8621 #else
8622 #if HAVE_PTHREADS_D4
8623 #define ATTR    pthread_attr_default
8624 #else
8625 #define ATTR    NULL
8626 #endif
8627 #endif
8628         /* make sure pthread_create() isn't just a stub */
8629         status = pthread_create(&t, ATTR, task, NULL);
8630         if( status ) exit( status );
8631
8632         /* make sure pthread_detach() isn't just a stub */
8633 #if HAVE_PTHREADS_D4
8634         status = pthread_detach( &t );
8635 #else
8636         status = pthread_detach( t );
8637 #endif
8638
8639 #ifdef HAVE_LINUX_THREADS
8640         pthread_kill_other_threads_np();
8641 #endif
8642
8643         exit( status );
8644
8645 }
8646
8647 EOF
8648 if { (eval echo configure:8649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8649 then
8650   ol_cv_pthread_lib_lpthread_woff=yes
8651 else
8652   echo "configure: failed program was:" >&5
8653   cat conftest.$ac_ext >&5
8654   rm -fr conftest*
8655   ol_cv_pthread_lib_lpthread_woff=no
8656 fi
8657 rm -fr conftest*
8658 fi
8659
8660
8661                 # restore the LIBS
8662                 LIBS="$ol_LIBS"
8663         
8664 fi
8665
8666 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8667
8668         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8669                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8670                 ol_link_threads=posix
8671         fi
8672 fi
8673
8674
8675                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8676 if test "$ol_link_threads" = no ; then
8677         # try -lpthread
8678         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8679 echo "configure:8680: checking for pthread link with -lpthread" >&5
8680 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8681   echo $ac_n "(cached) $ac_c" 1>&6
8682 else
8683   
8684                 # save the flags
8685                 ol_LIBS="$LIBS"
8686                 LIBS="-lpthread $LIBS"
8687
8688                 if test "$cross_compiling" = yes; then
8689   cat > conftest.$ac_ext <<EOF
8690 #line 8691 "configure"
8691 #include "confdefs.h"
8692 /* pthread test headers */
8693 #include <pthread.h>
8694 #ifndef NULL
8695 #define NULL (void*)0
8696 #endif
8697
8698 static void *task(p)
8699         void *p;
8700 {
8701         return (void *) (p == NULL);
8702 }
8703
8704 int main() {
8705
8706         /* pthread test function */
8707         pthread_t t;
8708         int status;
8709 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8710         /* This system (e.g. AIX) defaults detached; must override */
8711         pthread_attr_t attr;
8712
8713         status = pthread_attr_init(&attr);
8714         if( status ) exit( status );
8715
8716         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8717         if( status ) exit( status );
8718
8719 #define ATTR    &attr
8720 #else
8721 #if HAVE_PTHREADS_D4
8722 #define ATTR    pthread_attr_default
8723 #else
8724 #define ATTR    NULL
8725 #endif
8726 #endif
8727         /* make sure pthread_create() isn't just a stub */
8728         status = pthread_create(&t, ATTR, task, NULL);
8729         if( status ) exit( status );
8730
8731         /* make sure pthread_detach() isn't just a stub */
8732 #if HAVE_PTHREADS_D4
8733         status = pthread_detach( &t );
8734 #else
8735         status = pthread_detach( t );
8736 #endif
8737
8738 #ifdef HAVE_LINUX_THREADS
8739         pthread_kill_other_threads_np();
8740 #endif
8741
8742         exit( status );
8743
8744 ; return 0; }
8745 EOF
8746 if { (eval echo configure:8747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8747   rm -rf conftest*
8748   ol_cv_pthread_lpthread=yes
8749 else
8750   echo "configure: failed program was:" >&5
8751   cat conftest.$ac_ext >&5
8752   rm -rf conftest*
8753   ol_cv_pthread_lpthread=no
8754 fi
8755 rm -f conftest*
8756 else
8757   cat > conftest.$ac_ext <<EOF
8758 #line 8759 "configure"
8759 #include "confdefs.h"
8760 /* pthread test headers */
8761 #include <pthread.h>
8762 #ifndef NULL
8763 #define NULL (void*)0
8764 #endif
8765
8766 static void *task(p)
8767         void *p;
8768 {
8769         return (void *) (p == NULL);
8770 }
8771
8772
8773 int main(argc, argv)
8774         int argc;
8775         char **argv;
8776 {
8777
8778         /* pthread test function */
8779         pthread_t t;
8780         int status;
8781 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8782         /* This system (e.g. AIX) defaults detached; must override */
8783         pthread_attr_t attr;
8784
8785         status = pthread_attr_init(&attr);
8786         if( status ) exit( status );
8787
8788         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8789         if( status ) exit( status );
8790
8791 #define ATTR    &attr
8792 #else
8793 #if HAVE_PTHREADS_D4
8794 #define ATTR    pthread_attr_default
8795 #else
8796 #define ATTR    NULL
8797 #endif
8798 #endif
8799         /* make sure pthread_create() isn't just a stub */
8800         status = pthread_create(&t, ATTR, task, NULL);
8801         if( status ) exit( status );
8802
8803         /* make sure pthread_detach() isn't just a stub */
8804 #if HAVE_PTHREADS_D4
8805         status = pthread_detach( &t );
8806 #else
8807         status = pthread_detach( t );
8808 #endif
8809
8810 #ifdef HAVE_LINUX_THREADS
8811         pthread_kill_other_threads_np();
8812 #endif
8813
8814         exit( status );
8815
8816 }
8817
8818 EOF
8819 if { (eval echo configure:8820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8820 then
8821   ol_cv_pthread_lpthread=yes
8822 else
8823   echo "configure: failed program was:" >&5
8824   cat conftest.$ac_ext >&5
8825   rm -fr conftest*
8826   ol_cv_pthread_lpthread=no
8827 fi
8828 rm -fr conftest*
8829 fi
8830
8831
8832                 # restore the LIBS
8833                 LIBS="$ol_LIBS"
8834         
8835 fi
8836
8837 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8838
8839         if test $ol_cv_pthread_lpthread = yes ; then
8840                 ol_link_pthreads="-lpthread"
8841                 ol_link_threads=posix
8842         fi
8843 fi
8844
8845                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8846 if test "$ol_link_threads" = no ; then
8847         # try -lc_r
8848         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8849 echo "configure:8850: checking for pthread link with -lc_r" >&5
8850 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8851   echo $ac_n "(cached) $ac_c" 1>&6
8852 else
8853   
8854                 # save the flags
8855                 ol_LIBS="$LIBS"
8856                 LIBS="-lc_r $LIBS"
8857
8858                 if test "$cross_compiling" = yes; then
8859   cat > conftest.$ac_ext <<EOF
8860 #line 8861 "configure"
8861 #include "confdefs.h"
8862 /* pthread test headers */
8863 #include <pthread.h>
8864 #ifndef NULL
8865 #define NULL (void*)0
8866 #endif
8867
8868 static void *task(p)
8869         void *p;
8870 {
8871         return (void *) (p == NULL);
8872 }
8873
8874 int main() {
8875
8876         /* pthread test function */
8877         pthread_t t;
8878         int status;
8879 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8880         /* This system (e.g. AIX) defaults detached; must override */
8881         pthread_attr_t attr;
8882
8883         status = pthread_attr_init(&attr);
8884         if( status ) exit( status );
8885
8886         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8887         if( status ) exit( status );
8888
8889 #define ATTR    &attr
8890 #else
8891 #if HAVE_PTHREADS_D4
8892 #define ATTR    pthread_attr_default
8893 #else
8894 #define ATTR    NULL
8895 #endif
8896 #endif
8897         /* make sure pthread_create() isn't just a stub */
8898         status = pthread_create(&t, ATTR, task, NULL);
8899         if( status ) exit( status );
8900
8901         /* make sure pthread_detach() isn't just a stub */
8902 #if HAVE_PTHREADS_D4
8903         status = pthread_detach( &t );
8904 #else
8905         status = pthread_detach( t );
8906 #endif
8907
8908 #ifdef HAVE_LINUX_THREADS
8909         pthread_kill_other_threads_np();
8910 #endif
8911
8912         exit( status );
8913
8914 ; return 0; }
8915 EOF
8916 if { (eval echo configure:8917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8917   rm -rf conftest*
8918   ol_cv_pthread_lc_r=yes
8919 else
8920   echo "configure: failed program was:" >&5
8921   cat conftest.$ac_ext >&5
8922   rm -rf conftest*
8923   ol_cv_pthread_lc_r=no
8924 fi
8925 rm -f conftest*
8926 else
8927   cat > conftest.$ac_ext <<EOF
8928 #line 8929 "configure"
8929 #include "confdefs.h"
8930 /* pthread test headers */
8931 #include <pthread.h>
8932 #ifndef NULL
8933 #define NULL (void*)0
8934 #endif
8935
8936 static void *task(p)
8937         void *p;
8938 {
8939         return (void *) (p == NULL);
8940 }
8941
8942
8943 int main(argc, argv)
8944         int argc;
8945         char **argv;
8946 {
8947
8948         /* pthread test function */
8949         pthread_t t;
8950         int status;
8951 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8952         /* This system (e.g. AIX) defaults detached; must override */
8953         pthread_attr_t attr;
8954
8955         status = pthread_attr_init(&attr);
8956         if( status ) exit( status );
8957
8958         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8959         if( status ) exit( status );
8960
8961 #define ATTR    &attr
8962 #else
8963 #if HAVE_PTHREADS_D4
8964 #define ATTR    pthread_attr_default
8965 #else
8966 #define ATTR    NULL
8967 #endif
8968 #endif
8969         /* make sure pthread_create() isn't just a stub */
8970         status = pthread_create(&t, ATTR, task, NULL);
8971         if( status ) exit( status );
8972
8973         /* make sure pthread_detach() isn't just a stub */
8974 #if HAVE_PTHREADS_D4
8975         status = pthread_detach( &t );
8976 #else
8977         status = pthread_detach( t );
8978 #endif
8979
8980 #ifdef HAVE_LINUX_THREADS
8981         pthread_kill_other_threads_np();
8982 #endif
8983
8984         exit( status );
8985
8986 }
8987
8988 EOF
8989 if { (eval echo configure:8990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8990 then
8991   ol_cv_pthread_lc_r=yes
8992 else
8993   echo "configure: failed program was:" >&5
8994   cat conftest.$ac_ext >&5
8995   rm -fr conftest*
8996   ol_cv_pthread_lc_r=no
8997 fi
8998 rm -fr conftest*
8999 fi
9000
9001
9002                 # restore the LIBS
9003                 LIBS="$ol_LIBS"
9004         
9005 fi
9006
9007 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9008
9009         if test $ol_cv_pthread_lc_r = yes ; then
9010                 ol_link_pthreads="-lc_r"
9011                 ol_link_threads=posix
9012         fi
9013 fi
9014
9015
9016                 # Pthread try link: -threads (ol_cv_pthread_threads)
9017 if test "$ol_link_threads" = no ; then
9018         # try -threads
9019         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9020 echo "configure:9021: checking for pthread link with -threads" >&5
9021 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9022   echo $ac_n "(cached) $ac_c" 1>&6
9023 else
9024   
9025                 # save the flags
9026                 ol_LIBS="$LIBS"
9027                 LIBS="-threads $LIBS"
9028
9029                 if test "$cross_compiling" = yes; then
9030   cat > conftest.$ac_ext <<EOF
9031 #line 9032 "configure"
9032 #include "confdefs.h"
9033 /* pthread test headers */
9034 #include <pthread.h>
9035 #ifndef NULL
9036 #define NULL (void*)0
9037 #endif
9038
9039 static void *task(p)
9040         void *p;
9041 {
9042         return (void *) (p == NULL);
9043 }
9044
9045 int main() {
9046
9047         /* pthread test function */
9048         pthread_t t;
9049         int status;
9050 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9051         /* This system (e.g. AIX) defaults detached; must override */
9052         pthread_attr_t attr;
9053
9054         status = pthread_attr_init(&attr);
9055         if( status ) exit( status );
9056
9057         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9058         if( status ) exit( status );
9059
9060 #define ATTR    &attr
9061 #else
9062 #if HAVE_PTHREADS_D4
9063 #define ATTR    pthread_attr_default
9064 #else
9065 #define ATTR    NULL
9066 #endif
9067 #endif
9068         /* make sure pthread_create() isn't just a stub */
9069         status = pthread_create(&t, ATTR, task, NULL);
9070         if( status ) exit( status );
9071
9072         /* make sure pthread_detach() isn't just a stub */
9073 #if HAVE_PTHREADS_D4
9074         status = pthread_detach( &t );
9075 #else
9076         status = pthread_detach( t );
9077 #endif
9078
9079 #ifdef HAVE_LINUX_THREADS
9080         pthread_kill_other_threads_np();
9081 #endif
9082
9083         exit( status );
9084
9085 ; return 0; }
9086 EOF
9087 if { (eval echo configure:9088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9088   rm -rf conftest*
9089   ol_cv_pthread_threads=yes
9090 else
9091   echo "configure: failed program was:" >&5
9092   cat conftest.$ac_ext >&5
9093   rm -rf conftest*
9094   ol_cv_pthread_threads=no
9095 fi
9096 rm -f conftest*
9097 else
9098   cat > conftest.$ac_ext <<EOF
9099 #line 9100 "configure"
9100 #include "confdefs.h"
9101 /* pthread test headers */
9102 #include <pthread.h>
9103 #ifndef NULL
9104 #define NULL (void*)0
9105 #endif
9106
9107 static void *task(p)
9108         void *p;
9109 {
9110         return (void *) (p == NULL);
9111 }
9112
9113
9114 int main(argc, argv)
9115         int argc;
9116         char **argv;
9117 {
9118
9119         /* pthread test function */
9120         pthread_t t;
9121         int status;
9122 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9123         /* This system (e.g. AIX) defaults detached; must override */
9124         pthread_attr_t attr;
9125
9126         status = pthread_attr_init(&attr);
9127         if( status ) exit( status );
9128
9129         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9130         if( status ) exit( status );
9131
9132 #define ATTR    &attr
9133 #else
9134 #if HAVE_PTHREADS_D4
9135 #define ATTR    pthread_attr_default
9136 #else
9137 #define ATTR    NULL
9138 #endif
9139 #endif
9140         /* make sure pthread_create() isn't just a stub */
9141         status = pthread_create(&t, ATTR, task, NULL);
9142         if( status ) exit( status );
9143
9144         /* make sure pthread_detach() isn't just a stub */
9145 #if HAVE_PTHREADS_D4
9146         status = pthread_detach( &t );
9147 #else
9148         status = pthread_detach( t );
9149 #endif
9150
9151 #ifdef HAVE_LINUX_THREADS
9152         pthread_kill_other_threads_np();
9153 #endif
9154
9155         exit( status );
9156
9157 }
9158
9159 EOF
9160 if { (eval echo configure:9161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9161 then
9162   ol_cv_pthread_threads=yes
9163 else
9164   echo "configure: failed program was:" >&5
9165   cat conftest.$ac_ext >&5
9166   rm -fr conftest*
9167   ol_cv_pthread_threads=no
9168 fi
9169 rm -fr conftest*
9170 fi
9171
9172
9173                 # restore the LIBS
9174                 LIBS="$ol_LIBS"
9175         
9176 fi
9177
9178 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9179
9180         if test $ol_cv_pthread_threads = yes ; then
9181                 ol_link_pthreads="-threads"
9182                 ol_link_threads=posix
9183         fi
9184 fi
9185
9186
9187                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9188 if test "$ol_link_threads" = no ; then
9189         # try -lpthreads -lmach -lexc -lc_r
9190         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9191 echo "configure:9192: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9192 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9193   echo $ac_n "(cached) $ac_c" 1>&6
9194 else
9195   
9196                 # save the flags
9197                 ol_LIBS="$LIBS"
9198                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9199
9200                 if test "$cross_compiling" = yes; then
9201   cat > conftest.$ac_ext <<EOF
9202 #line 9203 "configure"
9203 #include "confdefs.h"
9204 /* pthread test headers */
9205 #include <pthread.h>
9206 #ifndef NULL
9207 #define NULL (void*)0
9208 #endif
9209
9210 static void *task(p)
9211         void *p;
9212 {
9213         return (void *) (p == NULL);
9214 }
9215
9216 int main() {
9217
9218         /* pthread test function */
9219         pthread_t t;
9220         int status;
9221 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9222         /* This system (e.g. AIX) defaults detached; must override */
9223         pthread_attr_t attr;
9224
9225         status = pthread_attr_init(&attr);
9226         if( status ) exit( status );
9227
9228         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9229         if( status ) exit( status );
9230
9231 #define ATTR    &attr
9232 #else
9233 #if HAVE_PTHREADS_D4
9234 #define ATTR    pthread_attr_default
9235 #else
9236 #define ATTR    NULL
9237 #endif
9238 #endif
9239         /* make sure pthread_create() isn't just a stub */
9240         status = pthread_create(&t, ATTR, task, NULL);
9241         if( status ) exit( status );
9242
9243         /* make sure pthread_detach() isn't just a stub */
9244 #if HAVE_PTHREADS_D4
9245         status = pthread_detach( &t );
9246 #else
9247         status = pthread_detach( t );
9248 #endif
9249
9250 #ifdef HAVE_LINUX_THREADS
9251         pthread_kill_other_threads_np();
9252 #endif
9253
9254         exit( status );
9255
9256 ; return 0; }
9257 EOF
9258 if { (eval echo configure:9259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9259   rm -rf conftest*
9260   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9261 else
9262   echo "configure: failed program was:" >&5
9263   cat conftest.$ac_ext >&5
9264   rm -rf conftest*
9265   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9266 fi
9267 rm -f conftest*
9268 else
9269   cat > conftest.$ac_ext <<EOF
9270 #line 9271 "configure"
9271 #include "confdefs.h"
9272 /* pthread test headers */
9273 #include <pthread.h>
9274 #ifndef NULL
9275 #define NULL (void*)0
9276 #endif
9277
9278 static void *task(p)
9279         void *p;
9280 {
9281         return (void *) (p == NULL);
9282 }
9283
9284
9285 int main(argc, argv)
9286         int argc;
9287         char **argv;
9288 {
9289
9290         /* pthread test function */
9291         pthread_t t;
9292         int status;
9293 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9294         /* This system (e.g. AIX) defaults detached; must override */
9295         pthread_attr_t attr;
9296
9297         status = pthread_attr_init(&attr);
9298         if( status ) exit( status );
9299
9300         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9301         if( status ) exit( status );
9302
9303 #define ATTR    &attr
9304 #else
9305 #if HAVE_PTHREADS_D4
9306 #define ATTR    pthread_attr_default
9307 #else
9308 #define ATTR    NULL
9309 #endif
9310 #endif
9311         /* make sure pthread_create() isn't just a stub */
9312         status = pthread_create(&t, ATTR, task, NULL);
9313         if( status ) exit( status );
9314
9315         /* make sure pthread_detach() isn't just a stub */
9316 #if HAVE_PTHREADS_D4
9317         status = pthread_detach( &t );
9318 #else
9319         status = pthread_detach( t );
9320 #endif
9321
9322 #ifdef HAVE_LINUX_THREADS
9323         pthread_kill_other_threads_np();
9324 #endif
9325
9326         exit( status );
9327
9328 }
9329
9330 EOF
9331 if { (eval echo configure:9332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9332 then
9333   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9334 else
9335   echo "configure: failed program was:" >&5
9336   cat conftest.$ac_ext >&5
9337   rm -fr conftest*
9338   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9339 fi
9340 rm -fr conftest*
9341 fi
9342
9343
9344                 # restore the LIBS
9345                 LIBS="$ol_LIBS"
9346         
9347 fi
9348
9349 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9350
9351         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9352                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9353                 ol_link_threads=posix
9354         fi
9355 fi
9356
9357                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9358 if test "$ol_link_threads" = no ; then
9359         # try -lpthreads -lmach -lexc
9360         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9361 echo "configure:9362: checking for pthread link with -lpthreads -lmach -lexc" >&5
9362 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9363   echo $ac_n "(cached) $ac_c" 1>&6
9364 else
9365   
9366                 # save the flags
9367                 ol_LIBS="$LIBS"
9368                 LIBS="-lpthreads -lmach -lexc $LIBS"
9369
9370                 if test "$cross_compiling" = yes; then
9371   cat > conftest.$ac_ext <<EOF
9372 #line 9373 "configure"
9373 #include "confdefs.h"
9374 /* pthread test headers */
9375 #include <pthread.h>
9376 #ifndef NULL
9377 #define NULL (void*)0
9378 #endif
9379
9380 static void *task(p)
9381         void *p;
9382 {
9383         return (void *) (p == NULL);
9384 }
9385
9386 int main() {
9387
9388         /* pthread test function */
9389         pthread_t t;
9390         int status;
9391 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9392         /* This system (e.g. AIX) defaults detached; must override */
9393         pthread_attr_t attr;
9394
9395         status = pthread_attr_init(&attr);
9396         if( status ) exit( status );
9397
9398         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9399         if( status ) exit( status );
9400
9401 #define ATTR    &attr
9402 #else
9403 #if HAVE_PTHREADS_D4
9404 #define ATTR    pthread_attr_default
9405 #else
9406 #define ATTR    NULL
9407 #endif
9408 #endif
9409         /* make sure pthread_create() isn't just a stub */
9410         status = pthread_create(&t, ATTR, task, NULL);
9411         if( status ) exit( status );
9412
9413         /* make sure pthread_detach() isn't just a stub */
9414 #if HAVE_PTHREADS_D4
9415         status = pthread_detach( &t );
9416 #else
9417         status = pthread_detach( t );
9418 #endif
9419
9420 #ifdef HAVE_LINUX_THREADS
9421         pthread_kill_other_threads_np();
9422 #endif
9423
9424         exit( status );
9425
9426 ; return 0; }
9427 EOF
9428 if { (eval echo configure:9429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9429   rm -rf conftest*
9430   ol_cv_pthread_lpthreads_lmach_lexc=yes
9431 else
9432   echo "configure: failed program was:" >&5
9433   cat conftest.$ac_ext >&5
9434   rm -rf conftest*
9435   ol_cv_pthread_lpthreads_lmach_lexc=no
9436 fi
9437 rm -f conftest*
9438 else
9439   cat > conftest.$ac_ext <<EOF
9440 #line 9441 "configure"
9441 #include "confdefs.h"
9442 /* pthread test headers */
9443 #include <pthread.h>
9444 #ifndef NULL
9445 #define NULL (void*)0
9446 #endif
9447
9448 static void *task(p)
9449         void *p;
9450 {
9451         return (void *) (p == NULL);
9452 }
9453
9454
9455 int main(argc, argv)
9456         int argc;
9457         char **argv;
9458 {
9459
9460         /* pthread test function */
9461         pthread_t t;
9462         int status;
9463 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9464         /* This system (e.g. AIX) defaults detached; must override */
9465         pthread_attr_t attr;
9466
9467         status = pthread_attr_init(&attr);
9468         if( status ) exit( status );
9469
9470         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9471         if( status ) exit( status );
9472
9473 #define ATTR    &attr
9474 #else
9475 #if HAVE_PTHREADS_D4
9476 #define ATTR    pthread_attr_default
9477 #else
9478 #define ATTR    NULL
9479 #endif
9480 #endif
9481         /* make sure pthread_create() isn't just a stub */
9482         status = pthread_create(&t, ATTR, task, NULL);
9483         if( status ) exit( status );
9484
9485         /* make sure pthread_detach() isn't just a stub */
9486 #if HAVE_PTHREADS_D4
9487         status = pthread_detach( &t );
9488 #else
9489         status = pthread_detach( t );
9490 #endif
9491
9492 #ifdef HAVE_LINUX_THREADS
9493         pthread_kill_other_threads_np();
9494 #endif
9495
9496         exit( status );
9497
9498 }
9499
9500 EOF
9501 if { (eval echo configure:9502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9502 then
9503   ol_cv_pthread_lpthreads_lmach_lexc=yes
9504 else
9505   echo "configure: failed program was:" >&5
9506   cat conftest.$ac_ext >&5
9507   rm -fr conftest*
9508   ol_cv_pthread_lpthreads_lmach_lexc=no
9509 fi
9510 rm -fr conftest*
9511 fi
9512
9513
9514                 # restore the LIBS
9515                 LIBS="$ol_LIBS"
9516         
9517 fi
9518
9519 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9520
9521         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9522                 ol_link_pthreads="-lpthreads -lmach -lexc"
9523                 ol_link_threads=posix
9524         fi
9525 fi
9526
9527                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9528 if test "$ol_link_threads" = no ; then
9529         # try -lpthreads -lexc
9530         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9531 echo "configure:9532: checking for pthread link with -lpthreads -lexc" >&5
9532 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9533   echo $ac_n "(cached) $ac_c" 1>&6
9534 else
9535   
9536                 # save the flags
9537                 ol_LIBS="$LIBS"
9538                 LIBS="-lpthreads -lexc $LIBS"
9539
9540                 if test "$cross_compiling" = yes; then
9541   cat > conftest.$ac_ext <<EOF
9542 #line 9543 "configure"
9543 #include "confdefs.h"
9544 /* pthread test headers */
9545 #include <pthread.h>
9546 #ifndef NULL
9547 #define NULL (void*)0
9548 #endif
9549
9550 static void *task(p)
9551         void *p;
9552 {
9553         return (void *) (p == NULL);
9554 }
9555
9556 int main() {
9557
9558         /* pthread test function */
9559         pthread_t t;
9560         int status;
9561 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9562         /* This system (e.g. AIX) defaults detached; must override */
9563         pthread_attr_t attr;
9564
9565         status = pthread_attr_init(&attr);
9566         if( status ) exit( status );
9567
9568         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9569         if( status ) exit( status );
9570
9571 #define ATTR    &attr
9572 #else
9573 #if HAVE_PTHREADS_D4
9574 #define ATTR    pthread_attr_default
9575 #else
9576 #define ATTR    NULL
9577 #endif
9578 #endif
9579         /* make sure pthread_create() isn't just a stub */
9580         status = pthread_create(&t, ATTR, task, NULL);
9581         if( status ) exit( status );
9582
9583         /* make sure pthread_detach() isn't just a stub */
9584 #if HAVE_PTHREADS_D4
9585         status = pthread_detach( &t );
9586 #else
9587         status = pthread_detach( t );
9588 #endif
9589
9590 #ifdef HAVE_LINUX_THREADS
9591         pthread_kill_other_threads_np();
9592 #endif
9593
9594         exit( status );
9595
9596 ; return 0; }
9597 EOF
9598 if { (eval echo configure:9599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9599   rm -rf conftest*
9600   ol_cv_pthread_lpthreads_lexc=yes
9601 else
9602   echo "configure: failed program was:" >&5
9603   cat conftest.$ac_ext >&5
9604   rm -rf conftest*
9605   ol_cv_pthread_lpthreads_lexc=no
9606 fi
9607 rm -f conftest*
9608 else
9609   cat > conftest.$ac_ext <<EOF
9610 #line 9611 "configure"
9611 #include "confdefs.h"
9612 /* pthread test headers */
9613 #include <pthread.h>
9614 #ifndef NULL
9615 #define NULL (void*)0
9616 #endif
9617
9618 static void *task(p)
9619         void *p;
9620 {
9621         return (void *) (p == NULL);
9622 }
9623
9624
9625 int main(argc, argv)
9626         int argc;
9627         char **argv;
9628 {
9629
9630         /* pthread test function */
9631         pthread_t t;
9632         int status;
9633 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9634         /* This system (e.g. AIX) defaults detached; must override */
9635         pthread_attr_t attr;
9636
9637         status = pthread_attr_init(&attr);
9638         if( status ) exit( status );
9639
9640         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9641         if( status ) exit( status );
9642
9643 #define ATTR    &attr
9644 #else
9645 #if HAVE_PTHREADS_D4
9646 #define ATTR    pthread_attr_default
9647 #else
9648 #define ATTR    NULL
9649 #endif
9650 #endif
9651         /* make sure pthread_create() isn't just a stub */
9652         status = pthread_create(&t, ATTR, task, NULL);
9653         if( status ) exit( status );
9654
9655         /* make sure pthread_detach() isn't just a stub */
9656 #if HAVE_PTHREADS_D4
9657         status = pthread_detach( &t );
9658 #else
9659         status = pthread_detach( t );
9660 #endif
9661
9662 #ifdef HAVE_LINUX_THREADS
9663         pthread_kill_other_threads_np();
9664 #endif
9665
9666         exit( status );
9667
9668 }
9669
9670 EOF
9671 if { (eval echo configure:9672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9672 then
9673   ol_cv_pthread_lpthreads_lexc=yes
9674 else
9675   echo "configure: failed program was:" >&5
9676   cat conftest.$ac_ext >&5
9677   rm -fr conftest*
9678   ol_cv_pthread_lpthreads_lexc=no
9679 fi
9680 rm -fr conftest*
9681 fi
9682
9683
9684                 # restore the LIBS
9685                 LIBS="$ol_LIBS"
9686         
9687 fi
9688
9689 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9690
9691         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9692                 ol_link_pthreads="-lpthreads -lexc"
9693                 ol_link_threads=posix
9694         fi
9695 fi
9696
9697
9698                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9699 if test "$ol_link_threads" = no ; then
9700         # try -lpthreads
9701         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9702 echo "configure:9703: checking for pthread link with -lpthreads" >&5
9703 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9704   echo $ac_n "(cached) $ac_c" 1>&6
9705 else
9706   
9707                 # save the flags
9708                 ol_LIBS="$LIBS"
9709                 LIBS="-lpthreads $LIBS"
9710
9711                 if test "$cross_compiling" = yes; then
9712   cat > conftest.$ac_ext <<EOF
9713 #line 9714 "configure"
9714 #include "confdefs.h"
9715 /* pthread test headers */
9716 #include <pthread.h>
9717 #ifndef NULL
9718 #define NULL (void*)0
9719 #endif
9720
9721 static void *task(p)
9722         void *p;
9723 {
9724         return (void *) (p == NULL);
9725 }
9726
9727 int main() {
9728
9729         /* pthread test function */
9730         pthread_t t;
9731         int status;
9732 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9733         /* This system (e.g. AIX) defaults detached; must override */
9734         pthread_attr_t attr;
9735
9736         status = pthread_attr_init(&attr);
9737         if( status ) exit( status );
9738
9739         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9740         if( status ) exit( status );
9741
9742 #define ATTR    &attr
9743 #else
9744 #if HAVE_PTHREADS_D4
9745 #define ATTR    pthread_attr_default
9746 #else
9747 #define ATTR    NULL
9748 #endif
9749 #endif
9750         /* make sure pthread_create() isn't just a stub */
9751         status = pthread_create(&t, ATTR, task, NULL);
9752         if( status ) exit( status );
9753
9754         /* make sure pthread_detach() isn't just a stub */
9755 #if HAVE_PTHREADS_D4
9756         status = pthread_detach( &t );
9757 #else
9758         status = pthread_detach( t );
9759 #endif
9760
9761 #ifdef HAVE_LINUX_THREADS
9762         pthread_kill_other_threads_np();
9763 #endif
9764
9765         exit( status );
9766
9767 ; return 0; }
9768 EOF
9769 if { (eval echo configure:9770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9770   rm -rf conftest*
9771   ol_cv_pthread_lib_lpthreads=yes
9772 else
9773   echo "configure: failed program was:" >&5
9774   cat conftest.$ac_ext >&5
9775   rm -rf conftest*
9776   ol_cv_pthread_lib_lpthreads=no
9777 fi
9778 rm -f conftest*
9779 else
9780   cat > conftest.$ac_ext <<EOF
9781 #line 9782 "configure"
9782 #include "confdefs.h"
9783 /* pthread test headers */
9784 #include <pthread.h>
9785 #ifndef NULL
9786 #define NULL (void*)0
9787 #endif
9788
9789 static void *task(p)
9790         void *p;
9791 {
9792         return (void *) (p == NULL);
9793 }
9794
9795
9796 int main(argc, argv)
9797         int argc;
9798         char **argv;
9799 {
9800
9801         /* pthread test function */
9802         pthread_t t;
9803         int status;
9804 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9805         /* This system (e.g. AIX) defaults detached; must override */
9806         pthread_attr_t attr;
9807
9808         status = pthread_attr_init(&attr);
9809         if( status ) exit( status );
9810
9811         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9812         if( status ) exit( status );
9813
9814 #define ATTR    &attr
9815 #else
9816 #if HAVE_PTHREADS_D4
9817 #define ATTR    pthread_attr_default
9818 #else
9819 #define ATTR    NULL
9820 #endif
9821 #endif
9822         /* make sure pthread_create() isn't just a stub */
9823         status = pthread_create(&t, ATTR, task, NULL);
9824         if( status ) exit( status );
9825
9826         /* make sure pthread_detach() isn't just a stub */
9827 #if HAVE_PTHREADS_D4
9828         status = pthread_detach( &t );
9829 #else
9830         status = pthread_detach( t );
9831 #endif
9832
9833 #ifdef HAVE_LINUX_THREADS
9834         pthread_kill_other_threads_np();
9835 #endif
9836
9837         exit( status );
9838
9839 }
9840
9841 EOF
9842 if { (eval echo configure:9843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9843 then
9844   ol_cv_pthread_lib_lpthreads=yes
9845 else
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848   rm -fr conftest*
9849   ol_cv_pthread_lib_lpthreads=no
9850 fi
9851 rm -fr conftest*
9852 fi
9853
9854
9855                 # restore the LIBS
9856                 LIBS="$ol_LIBS"
9857         
9858 fi
9859
9860 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9861
9862         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9863                 ol_link_pthreads="-lpthreads"
9864                 ol_link_threads=posix
9865         fi
9866 fi
9867
9868
9869                 if test $ol_link_threads != no ; then
9870                         cat >> confdefs.h <<\EOF
9871 #define HAVE_PTHREADS 1
9872 EOF
9873
9874
9875                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9876
9877                                                 save_CPPFLAGS="$CPPFLAGS"
9878                         save_LIBS="$LIBS"
9879                         LIBS="$LTHREAD_LIBS $LIBS"
9880
9881                                                                                                 for ac_func in sched_yield pthread_yield
9882 do
9883 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9884 echo "configure:9885: checking for $ac_func" >&5
9885 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9886   echo $ac_n "(cached) $ac_c" 1>&6
9887 else
9888   cat > conftest.$ac_ext <<EOF
9889 #line 9890 "configure"
9890 #include "confdefs.h"
9891 /* System header to define __stub macros and hopefully few prototypes,
9892     which can conflict with char $ac_func(); below.  */
9893 #include <assert.h>
9894 /* Override any gcc2 internal prototype to avoid an error.  */
9895 /* We use char because int might match the return type of a gcc2
9896     builtin and then its argument prototype would still apply.  */
9897 char $ac_func();
9898 char (*f)();
9899
9900 int main() {
9901
9902 /* The GNU C library defines this for functions which it implements
9903     to always fail with ENOSYS.  Some functions are actually named
9904     something starting with __ and the normal name is an alias.  */
9905 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9906 choke me
9907 #else
9908 f = $ac_func;
9909 #endif
9910
9911 ; return 0; }
9912 EOF
9913 if { (eval echo configure:9914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9914   rm -rf conftest*
9915   eval "ac_cv_func_$ac_func=yes"
9916 else
9917   echo "configure: failed program was:" >&5
9918   cat conftest.$ac_ext >&5
9919   rm -rf conftest*
9920   eval "ac_cv_func_$ac_func=no"
9921 fi
9922 rm -f conftest*
9923 fi
9924
9925 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9926   echo "$ac_t""yes" 1>&6
9927     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9928   cat >> confdefs.h <<EOF
9929 #define $ac_tr_func 1
9930 EOF
9931  
9932 else
9933   echo "$ac_t""no" 1>&6
9934 fi
9935 done
9936
9937
9938                         if test $ac_cv_func_sched_yield = no -a \
9939                                 $ac_cv_func_pthread_yield = no ; then
9940                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9941 echo "configure:9942: checking for sched_yield in -lrt" >&5
9942 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9943 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9944   echo $ac_n "(cached) $ac_c" 1>&6
9945 else
9946   ac_save_LIBS="$LIBS"
9947 LIBS="-lrt  $LIBS"
9948 cat > conftest.$ac_ext <<EOF
9949 #line 9950 "configure"
9950 #include "confdefs.h"
9951 /* Override any gcc2 internal prototype to avoid an error.  */
9952 /* We use char because int might match the return type of a gcc2
9953     builtin and then its argument prototype would still apply.  */
9954 char sched_yield();
9955
9956 int main() {
9957 sched_yield()
9958 ; return 0; }
9959 EOF
9960 if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9961   rm -rf conftest*
9962   eval "ac_cv_lib_$ac_lib_var=yes"
9963 else
9964   echo "configure: failed program was:" >&5
9965   cat conftest.$ac_ext >&5
9966   rm -rf conftest*
9967   eval "ac_cv_lib_$ac_lib_var=no"
9968 fi
9969 rm -f conftest*
9970 LIBS="$ac_save_LIBS"
9971
9972 fi
9973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9974   echo "$ac_t""yes" 1>&6
9975   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9976                                         cat >> confdefs.h <<\EOF
9977 #define HAVE_SCHED_YIELD 1
9978 EOF
9979
9980                                         ac_cv_func_sched_yield=yes
9981 else
9982   echo "$ac_t""no" 1>&6
9983 ac_cv_func_sched_yield=no
9984 fi
9985
9986                         fi
9987                         if test $ac_cv_func_sched_yield = no -a \
9988                                 $ac_cv_func_pthread_yield = no ; then
9989                                                                                                 for ac_func in thr_yield
9990 do
9991 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9992 echo "configure:9993: checking for $ac_func" >&5
9993 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9994   echo $ac_n "(cached) $ac_c" 1>&6
9995 else
9996   cat > conftest.$ac_ext <<EOF
9997 #line 9998 "configure"
9998 #include "confdefs.h"
9999 /* System header to define __stub macros and hopefully few prototypes,
10000     which can conflict with char $ac_func(); below.  */
10001 #include <assert.h>
10002 /* Override any gcc2 internal prototype to avoid an error.  */
10003 /* We use char because int might match the return type of a gcc2
10004     builtin and then its argument prototype would still apply.  */
10005 char $ac_func();
10006 char (*f)();
10007
10008 int main() {
10009
10010 /* The GNU C library defines this for functions which it implements
10011     to always fail with ENOSYS.  Some functions are actually named
10012     something starting with __ and the normal name is an alias.  */
10013 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10014 choke me
10015 #else
10016 f = $ac_func;
10017 #endif
10018
10019 ; return 0; }
10020 EOF
10021 if { (eval echo configure:10022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10022   rm -rf conftest*
10023   eval "ac_cv_func_$ac_func=yes"
10024 else
10025   echo "configure: failed program was:" >&5
10026   cat conftest.$ac_ext >&5
10027   rm -rf conftest*
10028   eval "ac_cv_func_$ac_func=no"
10029 fi
10030 rm -f conftest*
10031 fi
10032
10033 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10034   echo "$ac_t""yes" 1>&6
10035     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10036   cat >> confdefs.h <<EOF
10037 #define $ac_tr_func 1
10038 EOF
10039  
10040 else
10041   echo "$ac_t""no" 1>&6
10042 fi
10043 done
10044
10045                         fi
10046                         if test $ac_cv_func_sched_yield = no -a \
10047                                 $ac_cv_func_pthread_yield = no -a \
10048                                 "$ac_cv_func_thr_yield" = no ; then
10049                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10050                         fi
10051
10052                                                 for ac_func in pthread_kill
10053 do
10054 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10055 echo "configure:10056: checking for $ac_func" >&5
10056 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10057   echo $ac_n "(cached) $ac_c" 1>&6
10058 else
10059   cat > conftest.$ac_ext <<EOF
10060 #line 10061 "configure"
10061 #include "confdefs.h"
10062 /* System header to define __stub macros and hopefully few prototypes,
10063     which can conflict with char $ac_func(); below.  */
10064 #include <assert.h>
10065 /* Override any gcc2 internal prototype to avoid an error.  */
10066 /* We use char because int might match the return type of a gcc2
10067     builtin and then its argument prototype would still apply.  */
10068 char $ac_func();
10069 char (*f)();
10070
10071 int main() {
10072
10073 /* The GNU C library defines this for functions which it implements
10074     to always fail with ENOSYS.  Some functions are actually named
10075     something starting with __ and the normal name is an alias.  */
10076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10077 choke me
10078 #else
10079 f = $ac_func;
10080 #endif
10081
10082 ; return 0; }
10083 EOF
10084 if { (eval echo configure:10085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10085   rm -rf conftest*
10086   eval "ac_cv_func_$ac_func=yes"
10087 else
10088   echo "configure: failed program was:" >&5
10089   cat conftest.$ac_ext >&5
10090   rm -rf conftest*
10091   eval "ac_cv_func_$ac_func=no"
10092 fi
10093 rm -f conftest*
10094 fi
10095
10096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10097   echo "$ac_t""yes" 1>&6
10098     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10099   cat >> confdefs.h <<EOF
10100 #define $ac_tr_func 1
10101 EOF
10102  
10103 else
10104   echo "$ac_t""no" 1>&6
10105 fi
10106 done
10107
10108
10109                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10110 echo "configure:10111: checking for pthread_detach with <pthread.h>" >&5
10111 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10112   echo $ac_n "(cached) $ac_c" 1>&6
10113 else
10114   
10115                                                                 cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118
10119 #include <pthread.h>
10120 #ifndef NULL
10121 #define NULL (void*)0
10122 #endif
10123
10124 int main() {
10125 pthread_detach(NULL);
10126 ; return 0; }
10127 EOF
10128 if { (eval echo configure:10129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10129   rm -rf conftest*
10130   ol_cv_func_pthread_detach=yes
10131 else
10132   echo "configure: failed program was:" >&5
10133   cat conftest.$ac_ext >&5
10134   rm -rf conftest*
10135   ol_cv_func_pthread_detach=no
10136 fi
10137 rm -f conftest*
10138                         
10139 fi
10140
10141 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10142
10143                         if test $ol_cv_func_pthread_detach = no ; then
10144                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10145                         fi
10146
10147                         cat >> confdefs.h <<\EOF
10148 #define HAVE_PTHREAD_DETACH 1
10149 EOF
10150
10151
10152                                                 for ac_func in \
10153                                 pthread_setconcurrency \
10154                                 pthread_getconcurrency \
10155                                 thr_setconcurrency \
10156                                 thr_getconcurrency \
10157                         
10158 do
10159 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10160 echo "configure:10161: checking for $ac_func" >&5
10161 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10162   echo $ac_n "(cached) $ac_c" 1>&6
10163 else
10164   cat > conftest.$ac_ext <<EOF
10165 #line 10166 "configure"
10166 #include "confdefs.h"
10167 /* System header to define __stub macros and hopefully few prototypes,
10168     which can conflict with char $ac_func(); below.  */
10169 #include <assert.h>
10170 /* Override any gcc2 internal prototype to avoid an error.  */
10171 /* We use char because int might match the return type of a gcc2
10172     builtin and then its argument prototype would still apply.  */
10173 char $ac_func();
10174 char (*f)();
10175
10176 int main() {
10177
10178 /* The GNU C library defines this for functions which it implements
10179     to always fail with ENOSYS.  Some functions are actually named
10180     something starting with __ and the normal name is an alias.  */
10181 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10182 choke me
10183 #else
10184 f = $ac_func;
10185 #endif
10186
10187 ; return 0; }
10188 EOF
10189 if { (eval echo configure:10190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10190   rm -rf conftest*
10191   eval "ac_cv_func_$ac_func=yes"
10192 else
10193   echo "configure: failed program was:" >&5
10194   cat conftest.$ac_ext >&5
10195   rm -rf conftest*
10196   eval "ac_cv_func_$ac_func=no"
10197 fi
10198 rm -f conftest*
10199 fi
10200
10201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10202   echo "$ac_t""yes" 1>&6
10203     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10204   cat >> confdefs.h <<EOF
10205 #define $ac_tr_func 1
10206 EOF
10207  
10208 else
10209   echo "$ac_t""no" 1>&6
10210 fi
10211 done
10212
10213
10214                         
10215         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10216 echo "configure:10217: checking for pthread_kill_other_threads_np" >&5
10217 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10218   echo $ac_n "(cached) $ac_c" 1>&6
10219 else
10220   cat > conftest.$ac_ext <<EOF
10221 #line 10222 "configure"
10222 #include "confdefs.h"
10223 /* System header to define __stub macros and hopefully few prototypes,
10224     which can conflict with char pthread_kill_other_threads_np(); below.  */
10225 #include <assert.h>
10226 /* Override any gcc2 internal prototype to avoid an error.  */
10227 /* We use char because int might match the return type of a gcc2
10228     builtin and then its argument prototype would still apply.  */
10229 char pthread_kill_other_threads_np();
10230 char (*f)();
10231
10232 int main() {
10233
10234 /* The GNU C library defines this for functions which it implements
10235     to always fail with ENOSYS.  Some functions are actually named
10236     something starting with __ and the normal name is an alias.  */
10237 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10238 choke me
10239 #else
10240 f = pthread_kill_other_threads_np;
10241 #endif
10242
10243 ; return 0; }
10244 EOF
10245 if { (eval echo configure:10246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10246   rm -rf conftest*
10247   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10248 else
10249   echo "configure: failed program was:" >&5
10250   cat conftest.$ac_ext >&5
10251   rm -rf conftest*
10252   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10253 fi
10254 rm -f conftest*
10255 fi
10256
10257 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10258   echo "$ac_t""yes" 1>&6
10259   :
10260 else
10261   echo "$ac_t""no" 1>&6
10262 fi
10263
10264         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10265 echo "configure:10266: checking for LinuxThreads implementation" >&5
10266 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10267   echo $ac_n "(cached) $ac_c" 1>&6
10268 else
10269   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10270 fi
10271
10272 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10273
10274                         
10275         
10276         
10277         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10278 echo "configure:10279: checking for LinuxThreads consistency" >&5
10279 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10280   echo $ac_n "(cached) $ac_c" 1>&6
10281 else
10282   
10283                 if test $ol_cv_header_linux_threads = yes -a \
10284                         $ol_cv_sys_linux_threads = yes; then
10285                         ol_cv_linux_threads=yes
10286                 elif test $ol_cv_header_linux_threads = no -a \
10287                         $ol_cv_sys_linux_threads = no; then
10288                         ol_cv_linux_threads=no
10289                 else
10290                         ol_cv_linux_threads=error
10291                 fi
10292         
10293 fi
10294
10295 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10296
10297
10298                         if test $ol_cv_linux_threads = error; then
10299                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10300                         fi
10301
10302                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10303 echo "configure:10304: checking if pthread_create() works" >&5
10304 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10305   echo $ac_n "(cached) $ac_c" 1>&6
10306 else
10307   
10308                         if test "$cross_compiling" = yes; then
10309                                 ol_cv_pthread_create_works=yes
10310 else
10311   cat > conftest.$ac_ext <<EOF
10312 #line 10313 "configure"
10313 #include "confdefs.h"
10314 /* pthread test headers */
10315 #include <pthread.h>
10316 #ifndef NULL
10317 #define NULL (void*)0
10318 #endif
10319
10320 static void *task(p)
10321         void *p;
10322 {
10323         return (void *) (p == NULL);
10324 }
10325
10326
10327 int main(argc, argv)
10328         int argc;
10329         char **argv;
10330 {
10331
10332         /* pthread test function */
10333         pthread_t t;
10334         int status;
10335 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10336         /* This system (e.g. AIX) defaults detached; must override */
10337         pthread_attr_t attr;
10338
10339         status = pthread_attr_init(&attr);
10340         if( status ) exit( status );
10341
10342         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10343         if( status ) exit( status );
10344
10345 #define ATTR    &attr
10346 #else
10347 #if HAVE_PTHREADS_D4
10348 #define ATTR    pthread_attr_default
10349 #else
10350 #define ATTR    NULL
10351 #endif
10352 #endif
10353         /* make sure pthread_create() isn't just a stub */
10354         status = pthread_create(&t, ATTR, task, NULL);
10355         if( status ) exit( status );
10356
10357         /* make sure pthread_detach() isn't just a stub */
10358 #if HAVE_PTHREADS_D4
10359         status = pthread_detach( &t );
10360 #else
10361         status = pthread_detach( t );
10362 #endif
10363
10364 #ifdef HAVE_LINUX_THREADS
10365         pthread_kill_other_threads_np();
10366 #endif
10367
10368         exit( status );
10369
10370 }
10371
10372 EOF
10373 if { (eval echo configure:10374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10374 then
10375   ol_cv_pthread_create_works=yes
10376 else
10377   echo "configure: failed program was:" >&5
10378   cat conftest.$ac_ext >&5
10379   rm -fr conftest*
10380   ol_cv_pthread_create_works=no
10381 fi
10382 rm -fr conftest*
10383 fi
10384
10385 fi
10386
10387 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10388
10389                         if test $ol_cv_pthread_create_works = no ; then
10390                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10391                         fi
10392
10393                                                 if test $ol_with_yielding_select = auto ; then
10394                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10395 echo "configure:10396: checking if select yields when using pthreads" >&5
10396 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10397   echo $ac_n "(cached) $ac_c" 1>&6
10398 else
10399   
10400                                 if test "$cross_compiling" = yes; then
10401   ol_cv_pthread_select_yields=cross
10402 else
10403   cat > conftest.$ac_ext <<EOF
10404 #line 10405 "configure"
10405 #include "confdefs.h"
10406
10407 #include <sys/types.h>
10408 #include <sys/time.h>
10409 #include <unistd.h>
10410 #include <pthread.h>
10411 #ifndef NULL
10412 #define NULL (void*) 0
10413 #endif
10414
10415 static int fildes[2];
10416
10417 static void *task(p)
10418         void *p;
10419 {
10420         int i;
10421         struct timeval tv;
10422
10423         fd_set rfds;
10424
10425         tv.tv_sec=10;
10426         tv.tv_usec=0;
10427
10428         FD_ZERO(&rfds);
10429         FD_SET(fildes[0], &rfds);
10430
10431         /* we're not interested in any fds */
10432         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10433
10434         if(i < 0) {
10435                 perror("select");
10436                 exit(10);
10437         }
10438
10439         exit(0); /* if we exit here, the select blocked the whole process */
10440 }
10441
10442 int main(argc, argv)
10443         int argc;
10444         char **argv;
10445 {
10446         pthread_t t;
10447
10448         /* create a pipe to select */
10449         if(pipe(&fildes[0])) {
10450                 perror("select");
10451                 exit(1);
10452         }
10453
10454 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10455         (void) pthread_setconcurrency(2);
10456 #else
10457 #ifdef HAVE_THR_SETCONCURRENCY
10458         /* Set Solaris LWP concurrency to 2 */
10459         thr_setconcurrency(2);
10460 #endif
10461 #endif
10462
10463 #if HAVE_PTHREADS_D4
10464         pthread_create(&t, pthread_attr_default, task, NULL);
10465 #else
10466         pthread_create(&t, NULL, task, NULL);
10467 #endif
10468
10469 #if HAVE_SCHED_YIELD
10470         sched_yield();  /* make sure task runs first */
10471 #else
10472 #ifdef HAVE_PTHREAD_YIELD
10473         pthread_yield();        /* make sure task runs first */
10474 #endif
10475 #endif
10476
10477         exit(2);
10478 }
10479 EOF
10480 if { (eval echo configure:10481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10481 then
10482   ol_cv_pthread_select_yields=no
10483 else
10484   echo "configure: failed program was:" >&5
10485   cat conftest.$ac_ext >&5
10486   rm -fr conftest*
10487   ol_cv_pthread_select_yields=yes
10488 fi
10489 rm -fr conftest*
10490 fi
10491
10492 fi
10493
10494 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10495
10496                                 if test $ol_cv_pthread_select_yields = cross ; then
10497                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10498                                 fi
10499
10500                                 if test $ol_cv_pthread_select_yields = yes ; then
10501                                         ol_with_yielding_select=yes
10502                                 fi
10503                         fi
10504
10505                                                 CPPFLAGS="$save_CPPFLAGS"
10506                         LIBS="$save_LIBS"
10507                 else
10508                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10509                 fi
10510         fi
10511
10512         if test $ol_with_threads = posix ; then
10513                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10514         fi
10515 fi
10516
10517 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10518         -o $ol_with_threads = mach ; then
10519
10520                 for ac_hdr in mach/cthreads.h
10521 do
10522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10524 echo "configure:10525: checking for $ac_hdr" >&5
10525 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10526   echo $ac_n "(cached) $ac_c" 1>&6
10527 else
10528   cat > conftest.$ac_ext <<EOF
10529 #line 10530 "configure"
10530 #include "confdefs.h"
10531 #include <$ac_hdr>
10532 EOF
10533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10534 { (eval echo configure:10535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10536 if test -z "$ac_err"; then
10537   rm -rf conftest*
10538   eval "ac_cv_header_$ac_safe=yes"
10539 else
10540   echo "$ac_err" >&5
10541   echo "configure: failed program was:" >&5
10542   cat conftest.$ac_ext >&5
10543   rm -rf conftest*
10544   eval "ac_cv_header_$ac_safe=no"
10545 fi
10546 rm -f conftest*
10547 fi
10548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10549   echo "$ac_t""yes" 1>&6
10550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10551   cat >> confdefs.h <<EOF
10552 #define $ac_tr_hdr 1
10553 EOF
10554  
10555 else
10556   echo "$ac_t""no" 1>&6
10557 fi
10558 done
10559
10560         if test $ac_cv_header_mach_cthreads_h = yes ; then
10561                 ol_with_threads=found
10562
10563                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10564 echo "configure:10565: checking for cthread_fork" >&5
10565 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10566   echo $ac_n "(cached) $ac_c" 1>&6
10567 else
10568   cat > conftest.$ac_ext <<EOF
10569 #line 10570 "configure"
10570 #include "confdefs.h"
10571 /* System header to define __stub macros and hopefully few prototypes,
10572     which can conflict with char cthread_fork(); below.  */
10573 #include <assert.h>
10574 /* Override any gcc2 internal prototype to avoid an error.  */
10575 /* We use char because int might match the return type of a gcc2
10576     builtin and then its argument prototype would still apply.  */
10577 char cthread_fork();
10578 char (*f)();
10579
10580 int main() {
10581
10582 /* The GNU C library defines this for functions which it implements
10583     to always fail with ENOSYS.  Some functions are actually named
10584     something starting with __ and the normal name is an alias.  */
10585 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10586 choke me
10587 #else
10588 f = cthread_fork;
10589 #endif
10590
10591 ; return 0; }
10592 EOF
10593 if { (eval echo configure:10594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10594   rm -rf conftest*
10595   eval "ac_cv_func_cthread_fork=yes"
10596 else
10597   echo "configure: failed program was:" >&5
10598   cat conftest.$ac_ext >&5
10599   rm -rf conftest*
10600   eval "ac_cv_func_cthread_fork=no"
10601 fi
10602 rm -f conftest*
10603 fi
10604
10605 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10606   echo "$ac_t""yes" 1>&6
10607   ol_link_threads=yes
10608 else
10609   echo "$ac_t""no" 1>&6
10610 fi
10611
10612
10613                 if test $ol_link_threads = no ; then
10614                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10615 echo "configure:10616: checking for cthread_fork with -all_load" >&5
10616 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10617   echo $ac_n "(cached) $ac_c" 1>&6
10618 else
10619   
10620                                                                 save_LIBS="$LIBS"
10621                                 LIBS="-all_load $LIBS"
10622                                 cat > conftest.$ac_ext <<EOF
10623 #line 10624 "configure"
10624 #include "confdefs.h"
10625 #include <mach/cthreads.h>
10626 int main() {
10627
10628                                         cthread_fork((void *)0, (void *)0);
10629                                         
10630 ; return 0; }
10631 EOF
10632 if { (eval echo configure:10633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10633   rm -rf conftest*
10634   ol_cv_cthread_all_load=yes
10635 else
10636   echo "configure: failed program was:" >&5
10637   cat conftest.$ac_ext >&5
10638   rm -rf conftest*
10639   ol_cv_cthread_all_load=no
10640 fi
10641 rm -f conftest*
10642                                                                 LIBS="$save_LIBS"
10643                         
10644 fi
10645
10646 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10647
10648                         if test $ol_cv_cthread_all_load = yes ; then
10649                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10650                                 ol_link_threads=mach
10651                         fi
10652                 fi
10653
10654                 if test $ol_link_threads != no ; then
10655                         : check for cthread specific functionality here
10656                         cat >> confdefs.h <<\EOF
10657 #define HAVE_MACH_CTHREADS 1
10658 EOF
10659
10660                 else
10661                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10662                 fi
10663         fi
10664
10665         if test $ol_with_threads = mach ; then
10666                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10667         fi
10668 fi
10669
10670 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10671         -o $ol_with_threads = pth ; then
10672
10673         for ac_hdr in pth.h
10674 do
10675 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10676 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10677 echo "configure:10678: checking for $ac_hdr" >&5
10678 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10679   echo $ac_n "(cached) $ac_c" 1>&6
10680 else
10681   cat > conftest.$ac_ext <<EOF
10682 #line 10683 "configure"
10683 #include "confdefs.h"
10684 #include <$ac_hdr>
10685 EOF
10686 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10687 { (eval echo configure:10688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10688 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10689 if test -z "$ac_err"; then
10690   rm -rf conftest*
10691   eval "ac_cv_header_$ac_safe=yes"
10692 else
10693   echo "$ac_err" >&5
10694   echo "configure: failed program was:" >&5
10695   cat conftest.$ac_ext >&5
10696   rm -rf conftest*
10697   eval "ac_cv_header_$ac_safe=no"
10698 fi
10699 rm -f conftest*
10700 fi
10701 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10702   echo "$ac_t""yes" 1>&6
10703     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10704   cat >> confdefs.h <<EOF
10705 #define $ac_tr_hdr 1
10706 EOF
10707  
10708 else
10709   echo "$ac_t""no" 1>&6
10710 fi
10711 done
10712
10713
10714         if test $ac_cv_header_pth_h = yes ; then
10715                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10716 echo "configure:10717: checking for pth_version in -lpth" >&5
10717 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10718 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10719   echo $ac_n "(cached) $ac_c" 1>&6
10720 else
10721   ac_save_LIBS="$LIBS"
10722 LIBS="-lpth  $LIBS"
10723 cat > conftest.$ac_ext <<EOF
10724 #line 10725 "configure"
10725 #include "confdefs.h"
10726 /* Override any gcc2 internal prototype to avoid an error.  */
10727 /* We use char because int might match the return type of a gcc2
10728     builtin and then its argument prototype would still apply.  */
10729 char pth_version();
10730
10731 int main() {
10732 pth_version()
10733 ; return 0; }
10734 EOF
10735 if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10736   rm -rf conftest*
10737   eval "ac_cv_lib_$ac_lib_var=yes"
10738 else
10739   echo "configure: failed program was:" >&5
10740   cat conftest.$ac_ext >&5
10741   rm -rf conftest*
10742   eval "ac_cv_lib_$ac_lib_var=no"
10743 fi
10744 rm -f conftest*
10745 LIBS="$ac_save_LIBS"
10746
10747 fi
10748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10749   echo "$ac_t""yes" 1>&6
10750   have_pth=yes
10751 else
10752   echo "$ac_t""no" 1>&6
10753 have_pth=no
10754 fi
10755
10756
10757                 if test $have_pth = yes ; then
10758                         cat >> confdefs.h <<\EOF
10759 #define HAVE_GNU_PTH 1
10760 EOF
10761
10762                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10763                         ol_link_threads=pth
10764
10765                         if test $ol_with_yielding_select = auto ; then
10766                                 ol_with_yielding_select=yes
10767                         fi
10768                 fi
10769         fi
10770 fi
10771
10772 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10773         -o $ol_with_threads = lwp ; then
10774
10775                 for ac_hdr in thread.h synch.h
10776 do
10777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10779 echo "configure:10780: checking for $ac_hdr" >&5
10780 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10781   echo $ac_n "(cached) $ac_c" 1>&6
10782 else
10783   cat > conftest.$ac_ext <<EOF
10784 #line 10785 "configure"
10785 #include "confdefs.h"
10786 #include <$ac_hdr>
10787 EOF
10788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10789 { (eval echo configure:10790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10791 if test -z "$ac_err"; then
10792   rm -rf conftest*
10793   eval "ac_cv_header_$ac_safe=yes"
10794 else
10795   echo "$ac_err" >&5
10796   echo "configure: failed program was:" >&5
10797   cat conftest.$ac_ext >&5
10798   rm -rf conftest*
10799   eval "ac_cv_header_$ac_safe=no"
10800 fi
10801 rm -f conftest*
10802 fi
10803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10804   echo "$ac_t""yes" 1>&6
10805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10806   cat >> confdefs.h <<EOF
10807 #define $ac_tr_hdr 1
10808 EOF
10809  
10810 else
10811   echo "$ac_t""no" 1>&6
10812 fi
10813 done
10814
10815         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10816                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10817 echo "configure:10818: checking for thr_create in -lthread" >&5
10818 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10819 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10820   echo $ac_n "(cached) $ac_c" 1>&6
10821 else
10822   ac_save_LIBS="$LIBS"
10823 LIBS="-lthread  $LIBS"
10824 cat > conftest.$ac_ext <<EOF
10825 #line 10826 "configure"
10826 #include "confdefs.h"
10827 /* Override any gcc2 internal prototype to avoid an error.  */
10828 /* We use char because int might match the return type of a gcc2
10829     builtin and then its argument prototype would still apply.  */
10830 char thr_create();
10831
10832 int main() {
10833 thr_create()
10834 ; return 0; }
10835 EOF
10836 if { (eval echo configure:10837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10837   rm -rf conftest*
10838   eval "ac_cv_lib_$ac_lib_var=yes"
10839 else
10840   echo "configure: failed program was:" >&5
10841   cat conftest.$ac_ext >&5
10842   rm -rf conftest*
10843   eval "ac_cv_lib_$ac_lib_var=no"
10844 fi
10845 rm -f conftest*
10846 LIBS="$ac_save_LIBS"
10847
10848 fi
10849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10850   echo "$ac_t""yes" 1>&6
10851   have_thr=yes
10852 else
10853   echo "$ac_t""no" 1>&6
10854 have_thr=no
10855 fi
10856
10857
10858                 if test $have_thr = yes ; then
10859                         cat >> confdefs.h <<\EOF
10860 #define HAVE_THR 1
10861 EOF
10862
10863                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10864                         ol_link_threads=thr
10865
10866                         if test $ol_with_yielding_select = auto ; then
10867                                 ol_with_yielding_select=yes
10868                         fi
10869
10870                                                 for ac_func in \
10871                                 thr_setconcurrency \
10872                                 thr_getconcurrency \
10873                         
10874 do
10875 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10876 echo "configure:10877: checking for $ac_func" >&5
10877 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10878   echo $ac_n "(cached) $ac_c" 1>&6
10879 else
10880   cat > conftest.$ac_ext <<EOF
10881 #line 10882 "configure"
10882 #include "confdefs.h"
10883 /* System header to define __stub macros and hopefully few prototypes,
10884     which can conflict with char $ac_func(); below.  */
10885 #include <assert.h>
10886 /* Override any gcc2 internal prototype to avoid an error.  */
10887 /* We use char because int might match the return type of a gcc2
10888     builtin and then its argument prototype would still apply.  */
10889 char $ac_func();
10890 char (*f)();
10891
10892 int main() {
10893
10894 /* The GNU C library defines this for functions which it implements
10895     to always fail with ENOSYS.  Some functions are actually named
10896     something starting with __ and the normal name is an alias.  */
10897 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10898 choke me
10899 #else
10900 f = $ac_func;
10901 #endif
10902
10903 ; return 0; }
10904 EOF
10905 if { (eval echo configure:10906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10906   rm -rf conftest*
10907   eval "ac_cv_func_$ac_func=yes"
10908 else
10909   echo "configure: failed program was:" >&5
10910   cat conftest.$ac_ext >&5
10911   rm -rf conftest*
10912   eval "ac_cv_func_$ac_func=no"
10913 fi
10914 rm -f conftest*
10915 fi
10916
10917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10918   echo "$ac_t""yes" 1>&6
10919     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10920   cat >> confdefs.h <<EOF
10921 #define $ac_tr_func 1
10922 EOF
10923  
10924 else
10925   echo "$ac_t""no" 1>&6
10926 fi
10927 done
10928
10929                 fi
10930         fi
10931
10932                 for ac_hdr in lwp/lwp.h
10933 do
10934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10936 echo "configure:10937: checking for $ac_hdr" >&5
10937 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10938   echo $ac_n "(cached) $ac_c" 1>&6
10939 else
10940   cat > conftest.$ac_ext <<EOF
10941 #line 10942 "configure"
10942 #include "confdefs.h"
10943 #include <$ac_hdr>
10944 EOF
10945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10946 { (eval echo configure:10947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10948 if test -z "$ac_err"; then
10949   rm -rf conftest*
10950   eval "ac_cv_header_$ac_safe=yes"
10951 else
10952   echo "$ac_err" >&5
10953   echo "configure: failed program was:" >&5
10954   cat conftest.$ac_ext >&5
10955   rm -rf conftest*
10956   eval "ac_cv_header_$ac_safe=no"
10957 fi
10958 rm -f conftest*
10959 fi
10960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10961   echo "$ac_t""yes" 1>&6
10962     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10963   cat >> confdefs.h <<EOF
10964 #define $ac_tr_hdr 1
10965 EOF
10966  
10967 else
10968   echo "$ac_t""no" 1>&6
10969 fi
10970 done
10971
10972         if test $ac_cv_header_lwp_lwp_h = yes ; then
10973                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10974 echo "configure:10975: checking for lwp_create in -llwp" >&5
10975 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10976 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10977   echo $ac_n "(cached) $ac_c" 1>&6
10978 else
10979   ac_save_LIBS="$LIBS"
10980 LIBS="-llwp  $LIBS"
10981 cat > conftest.$ac_ext <<EOF
10982 #line 10983 "configure"
10983 #include "confdefs.h"
10984 /* Override any gcc2 internal prototype to avoid an error.  */
10985 /* We use char because int might match the return type of a gcc2
10986     builtin and then its argument prototype would still apply.  */
10987 char lwp_create();
10988
10989 int main() {
10990 lwp_create()
10991 ; return 0; }
10992 EOF
10993 if { (eval echo configure:10994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10994   rm -rf conftest*
10995   eval "ac_cv_lib_$ac_lib_var=yes"
10996 else
10997   echo "configure: failed program was:" >&5
10998   cat conftest.$ac_ext >&5
10999   rm -rf conftest*
11000   eval "ac_cv_lib_$ac_lib_var=no"
11001 fi
11002 rm -f conftest*
11003 LIBS="$ac_save_LIBS"
11004
11005 fi
11006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11007   echo "$ac_t""yes" 1>&6
11008   have_lwp=yes
11009 else
11010   echo "$ac_t""no" 1>&6
11011 have_lwp=no
11012 fi
11013
11014
11015                 if test $have_lwp = yes ; then
11016                         cat >> confdefs.h <<\EOF
11017 #define HAVE_LWP 1
11018 EOF
11019
11020                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11021                         ol_link_threads=lwp
11022
11023                         if test $ol_with_yielding_select = auto ; then
11024                                 ol_with_yielding_select=no
11025                         fi
11026                 fi
11027         fi
11028 fi
11029
11030 if test $ol_with_yielding_select = yes ; then
11031         cat >> confdefs.h <<\EOF
11032 #define HAVE_YIELDING_SELECT 1
11033 EOF
11034
11035 fi
11036
11037 if test $ol_with_threads = manual ; then
11038                 ol_link_threads=yes
11039
11040         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11041
11042         for ac_hdr in pthread.h sched.h
11043 do
11044 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11045 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11046 echo "configure:11047: checking for $ac_hdr" >&5
11047 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11048   echo $ac_n "(cached) $ac_c" 1>&6
11049 else
11050   cat > conftest.$ac_ext <<EOF
11051 #line 11052 "configure"
11052 #include "confdefs.h"
11053 #include <$ac_hdr>
11054 EOF
11055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11056 { (eval echo configure:11057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11058 if test -z "$ac_err"; then
11059   rm -rf conftest*
11060   eval "ac_cv_header_$ac_safe=yes"
11061 else
11062   echo "$ac_err" >&5
11063   echo "configure: failed program was:" >&5
11064   cat conftest.$ac_ext >&5
11065   rm -rf conftest*
11066   eval "ac_cv_header_$ac_safe=no"
11067 fi
11068 rm -f conftest*
11069 fi
11070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11071   echo "$ac_t""yes" 1>&6
11072     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11073   cat >> confdefs.h <<EOF
11074 #define $ac_tr_hdr 1
11075 EOF
11076  
11077 else
11078   echo "$ac_t""no" 1>&6
11079 fi
11080 done
11081
11082         for ac_func in sched_yield pthread_yield
11083 do
11084 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11085 echo "configure:11086: checking for $ac_func" >&5
11086 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11087   echo $ac_n "(cached) $ac_c" 1>&6
11088 else
11089   cat > conftest.$ac_ext <<EOF
11090 #line 11091 "configure"
11091 #include "confdefs.h"
11092 /* System header to define __stub macros and hopefully few prototypes,
11093     which can conflict with char $ac_func(); below.  */
11094 #include <assert.h>
11095 /* Override any gcc2 internal prototype to avoid an error.  */
11096 /* We use char because int might match the return type of a gcc2
11097     builtin and then its argument prototype would still apply.  */
11098 char $ac_func();
11099 char (*f)();
11100
11101 int main() {
11102
11103 /* The GNU C library defines this for functions which it implements
11104     to always fail with ENOSYS.  Some functions are actually named
11105     something starting with __ and the normal name is an alias.  */
11106 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11107 choke me
11108 #else
11109 f = $ac_func;
11110 #endif
11111
11112 ; return 0; }
11113 EOF
11114 if { (eval echo configure:11115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11115   rm -rf conftest*
11116   eval "ac_cv_func_$ac_func=yes"
11117 else
11118   echo "configure: failed program was:" >&5
11119   cat conftest.$ac_ext >&5
11120   rm -rf conftest*
11121   eval "ac_cv_func_$ac_func=no"
11122 fi
11123 rm -f conftest*
11124 fi
11125
11126 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11127   echo "$ac_t""yes" 1>&6
11128     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11129   cat >> confdefs.h <<EOF
11130 #define $ac_tr_func 1
11131 EOF
11132  
11133 else
11134   echo "$ac_t""no" 1>&6
11135 fi
11136 done
11137
11138         
11139         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11140 echo "configure:11141: checking for LinuxThreads pthread.h" >&5
11141 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11142   echo $ac_n "(cached) $ac_c" 1>&6
11143 else
11144   cat > conftest.$ac_ext <<EOF
11145 #line 11146 "configure"
11146 #include "confdefs.h"
11147 #include <pthread.h>
11148 EOF
11149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11150   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11151   rm -rf conftest*
11152   ol_cv_header_linux_threads=yes
11153 else
11154   rm -rf conftest*
11155   ol_cv_header_linux_threads=no
11156 fi
11157 rm -f conftest*
11158
11159                 
11160 fi
11161
11162 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11163         if test $ol_cv_header_linux_threads = yes; then
11164                 cat >> confdefs.h <<\EOF
11165 #define HAVE_LINUX_THREADS 1
11166 EOF
11167
11168         fi
11169
11170
11171         for ac_hdr in mach/cthreads.h
11172 do
11173 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11174 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11175 echo "configure:11176: checking for $ac_hdr" >&5
11176 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11177   echo $ac_n "(cached) $ac_c" 1>&6
11178 else
11179   cat > conftest.$ac_ext <<EOF
11180 #line 11181 "configure"
11181 #include "confdefs.h"
11182 #include <$ac_hdr>
11183 EOF
11184 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11185 { (eval echo configure:11186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11186 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11187 if test -z "$ac_err"; then
11188   rm -rf conftest*
11189   eval "ac_cv_header_$ac_safe=yes"
11190 else
11191   echo "$ac_err" >&5
11192   echo "configure: failed program was:" >&5
11193   cat conftest.$ac_ext >&5
11194   rm -rf conftest*
11195   eval "ac_cv_header_$ac_safe=no"
11196 fi
11197 rm -f conftest*
11198 fi
11199 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11200   echo "$ac_t""yes" 1>&6
11201     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11202   cat >> confdefs.h <<EOF
11203 #define $ac_tr_hdr 1
11204 EOF
11205  
11206 else
11207   echo "$ac_t""no" 1>&6
11208 fi
11209 done
11210
11211         for ac_hdr in lwp/lwp.h
11212 do
11213 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11214 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11215 echo "configure:11216: checking for $ac_hdr" >&5
11216 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11217   echo $ac_n "(cached) $ac_c" 1>&6
11218 else
11219   cat > conftest.$ac_ext <<EOF
11220 #line 11221 "configure"
11221 #include "confdefs.h"
11222 #include <$ac_hdr>
11223 EOF
11224 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11225 { (eval echo configure:11226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11226 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11227 if test -z "$ac_err"; then
11228   rm -rf conftest*
11229   eval "ac_cv_header_$ac_safe=yes"
11230 else
11231   echo "$ac_err" >&5
11232   echo "configure: failed program was:" >&5
11233   cat conftest.$ac_ext >&5
11234   rm -rf conftest*
11235   eval "ac_cv_header_$ac_safe=no"
11236 fi
11237 rm -f conftest*
11238 fi
11239 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11240   echo "$ac_t""yes" 1>&6
11241     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11242   cat >> confdefs.h <<EOF
11243 #define $ac_tr_hdr 1
11244 EOF
11245  
11246 else
11247   echo "$ac_t""no" 1>&6
11248 fi
11249 done
11250
11251         for ac_hdr in thread.h synch.h
11252 do
11253 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11254 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11255 echo "configure:11256: checking for $ac_hdr" >&5
11256 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11257   echo $ac_n "(cached) $ac_c" 1>&6
11258 else
11259   cat > conftest.$ac_ext <<EOF
11260 #line 11261 "configure"
11261 #include "confdefs.h"
11262 #include <$ac_hdr>
11263 EOF
11264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11265 { (eval echo configure:11266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11267 if test -z "$ac_err"; then
11268   rm -rf conftest*
11269   eval "ac_cv_header_$ac_safe=yes"
11270 else
11271   echo "$ac_err" >&5
11272   echo "configure: failed program was:" >&5
11273   cat conftest.$ac_ext >&5
11274   rm -rf conftest*
11275   eval "ac_cv_header_$ac_safe=no"
11276 fi
11277 rm -f conftest*
11278 fi
11279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11280   echo "$ac_t""yes" 1>&6
11281     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11282   cat >> confdefs.h <<EOF
11283 #define $ac_tr_hdr 1
11284 EOF
11285  
11286 else
11287   echo "$ac_t""no" 1>&6
11288 fi
11289 done
11290
11291 fi
11292
11293 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11294                         cat >> confdefs.h <<\EOF
11295 #define REENTRANT 1
11296 EOF
11297
11298         cat >> confdefs.h <<\EOF
11299 #define _REENTRANT 1
11300 EOF
11301
11302         cat >> confdefs.h <<\EOF
11303 #define THREAD_SAFE 1
11304 EOF
11305
11306         cat >> confdefs.h <<\EOF
11307 #define _THREAD_SAFE 1
11308 EOF
11309
11310         cat >> confdefs.h <<\EOF
11311 #define THREADSAFE 1
11312 EOF
11313
11314         cat >> confdefs.h <<\EOF
11315 #define _THREADSAFE 1
11316 EOF
11317
11318         cat >> confdefs.h <<\EOF
11319 #define _SGI_MP_SOURCE 1
11320 EOF
11321
11322
11323                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11324 echo "configure:11325: checking for thread specific errno" >&5
11325 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11326   echo $ac_n "(cached) $ac_c" 1>&6
11327 else
11328   
11329                 cat > conftest.$ac_ext <<EOF
11330 #line 11331 "configure"
11331 #include "confdefs.h"
11332 #include <errno.h>
11333 int main() {
11334 errno = 0;
11335 ; return 0; }
11336 EOF
11337 if { (eval echo configure:11338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11338   rm -rf conftest*
11339   ol_cv_errno_thread_specific=yes
11340 else
11341   echo "configure: failed program was:" >&5
11342   cat conftest.$ac_ext >&5
11343   rm -rf conftest*
11344   ol_cv_errno_thread_specific=no
11345 fi
11346 rm -f conftest*
11347         
11348 fi
11349
11350 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11351
11352                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11353 echo "configure:11354: checking for thread specific h_errno" >&5
11354 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11355   echo $ac_n "(cached) $ac_c" 1>&6
11356 else
11357   
11358                 cat > conftest.$ac_ext <<EOF
11359 #line 11360 "configure"
11360 #include "confdefs.h"
11361 #include <netdb.h>
11362 int main() {
11363 h_errno = 0;
11364 ; return 0; }
11365 EOF
11366 if { (eval echo configure:11367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11367   rm -rf conftest*
11368   ol_cv_h_errno_thread_specific=yes
11369 else
11370   echo "configure: failed program was:" >&5
11371   cat conftest.$ac_ext >&5
11372   rm -rf conftest*
11373   ol_cv_h_errno_thread_specific=no
11374 fi
11375 rm -f conftest*
11376         
11377 fi
11378
11379 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11380
11381         if test $ol_cv_errno_thread_specific != yes \
11382                 -o $ol_cv_h_errno_thread_specific != yes ; then
11383                 LIBS="$LTHREAD_LIBS $LIBS"
11384                 LTHREAD_LIBS=""
11385         fi
11386
11387 fi  
11388
11389 if test $ol_link_threads = no ; then
11390         if test $ol_with_threads = yes ; then
11391                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11392         fi
11393
11394         if test $ol_with_threads = auto ; then
11395                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11396                 ol_with_threads=no
11397         fi
11398
11399         cat >> confdefs.h <<\EOF
11400 #define NO_THREADS 1
11401 EOF
11402
11403         LTHREAD_LIBS=""
11404 fi
11405
11406 if test $ol_link_threads != no ; then
11407         cat >> confdefs.h <<\EOF
11408 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11409 EOF
11410
11411 fi
11412
11413 ol_link_ldbm=no 
11414
11415 if test $ol_with_ldbm_api = auto \
11416         -o $ol_with_ldbm_api = berkeley \
11417         -o $ol_with_ldbm_api = bcompat ; then
11418
11419         if test $ol_with_ldbm_api = bcompat; then \
11420                 ol_cv_berkeley_db=no
11421 for ac_hdr in db_185.h db.h
11422 do
11423 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11424 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11425 echo "configure:11426: checking for $ac_hdr" >&5
11426 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11427   echo $ac_n "(cached) $ac_c" 1>&6
11428 else
11429   cat > conftest.$ac_ext <<EOF
11430 #line 11431 "configure"
11431 #include "confdefs.h"
11432 #include <$ac_hdr>
11433 EOF
11434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11435 { (eval echo configure:11436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11437 if test -z "$ac_err"; then
11438   rm -rf conftest*
11439   eval "ac_cv_header_$ac_safe=yes"
11440 else
11441   echo "$ac_err" >&5
11442   echo "configure: failed program was:" >&5
11443   cat conftest.$ac_ext >&5
11444   rm -rf conftest*
11445   eval "ac_cv_header_$ac_safe=no"
11446 fi
11447 rm -f conftest*
11448 fi
11449 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11450   echo "$ac_t""yes" 1>&6
11451     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11452   cat >> confdefs.h <<EOF
11453 #define $ac_tr_hdr 1
11454 EOF
11455  
11456 else
11457   echo "$ac_t""no" 1>&6
11458 fi
11459 done
11460
11461 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11462         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11463 echo "configure:11464: checking if Berkeley DB header compatibility" >&5
11464 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11465   echo $ac_n "(cached) $ac_c" 1>&6
11466 else
11467   
11468                 cat > conftest.$ac_ext <<EOF
11469 #line 11470 "configure"
11470 #include "confdefs.h"
11471
11472 #if HAVE_DB_185_H
11473 #       include <db_185.h>
11474 #else
11475 #       include <db.h>
11476 #endif
11477
11478  /* this check could be improved */
11479 #ifndef DB_VERSION_MAJOR
11480 #       define DB_VERSION_MAJOR 1
11481 #endif
11482
11483 #if DB_VERSION_MAJOR == 1 
11484         __db_version_1
11485 #endif
11486
11487 EOF
11488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11489   egrep "__db_version_1" >/dev/null 2>&1; then
11490   rm -rf conftest*
11491   ol_cv_header_db1=yes
11492 else
11493   rm -rf conftest*
11494   ol_cv_header_db1=no
11495 fi
11496 rm -f conftest*
11497
11498 fi
11499
11500 echo "$ac_t""$ol_cv_header_db1" 1>&6
11501
11502         if test ol_cv_header_db1=yes ; then
11503                 ol_cv_lib_db=no
11504 if test $ol_cv_lib_db = no ; then
11505         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11506 echo "configure:11507: checking for Berkeley DB link (default)" >&5
11507 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11508   echo $ac_n "(cached) $ac_c" 1>&6
11509 else
11510   
11511         ol_DB_LIB=
11512         ol_LIBS=$LIBS
11513         LIBS="$ol_DB_LIB $LIBS"
11514
11515         cat > conftest.$ac_ext <<EOF
11516 #line 11517 "configure"
11517 #include "confdefs.h"
11518
11519 #ifdef HAVE_DB_185_H
11520 # include <db_185.h>
11521 #else
11522 # include <db.h>
11523 #endif
11524
11525 #ifndef DB_VERSION_MAJOR
11526 # define DB_VERSION_MAJOR 1
11527 #endif
11528
11529 #ifndef NULL
11530 #define NULL ((void*)0)
11531 #endif
11532
11533 int main() {
11534
11535 #if DB_VERSION_MAJOR > 2
11536         db_env_create( NULL, 0 );
11537 #elif DB_VERSION_MAJOR > 1
11538         db_appexit( NULL );
11539 #else
11540         (void) dbopen( NULL, 0, 0, 0, NULL);
11541 #endif
11542
11543 ; return 0; }
11544 EOF
11545 if { (eval echo configure:11546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11546   rm -rf conftest*
11547   ol_cv_db_none=yes
11548 else
11549   echo "configure: failed program was:" >&5
11550   cat conftest.$ac_ext >&5
11551   rm -rf conftest*
11552   ol_cv_db_none=no
11553 fi
11554 rm -f conftest*
11555
11556         LIBS="$ol_LIBS"
11557
11558 fi
11559
11560 echo "$ac_t""$ol_cv_db_none" 1>&6
11561
11562         if test $ol_cv_db_none = yes ; then
11563                 ol_cv_lib_db=yes
11564         fi
11565 fi
11566
11567 if test $ol_cv_lib_db = no ; then
11568         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11569 echo "configure:11570: checking for Berkeley DB link (-ldb)" >&5
11570 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11571   echo $ac_n "(cached) $ac_c" 1>&6
11572 else
11573   
11574         ol_DB_LIB=-ldb
11575         ol_LIBS=$LIBS
11576         LIBS="$ol_DB_LIB $LIBS"
11577
11578         cat > conftest.$ac_ext <<EOF
11579 #line 11580 "configure"
11580 #include "confdefs.h"
11581
11582 #ifdef HAVE_DB_185_H
11583 # include <db_185.h>
11584 #else
11585 # include <db.h>
11586 #endif
11587
11588 #ifndef DB_VERSION_MAJOR
11589 # define DB_VERSION_MAJOR 1
11590 #endif
11591
11592 #ifndef NULL
11593 #define NULL ((void*)0)
11594 #endif
11595
11596 int main() {
11597
11598 #if DB_VERSION_MAJOR > 2
11599         db_env_create( NULL, 0 );
11600 #elif DB_VERSION_MAJOR > 1
11601         db_appexit( NULL );
11602 #else
11603         (void) dbopen( NULL, 0, 0, 0, NULL);
11604 #endif
11605
11606 ; return 0; }
11607 EOF
11608 if { (eval echo configure:11609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11609   rm -rf conftest*
11610   ol_cv_db_db=yes
11611 else
11612   echo "configure: failed program was:" >&5
11613   cat conftest.$ac_ext >&5
11614   rm -rf conftest*
11615   ol_cv_db_db=no
11616 fi
11617 rm -f conftest*
11618
11619         LIBS="$ol_LIBS"
11620
11621 fi
11622
11623 echo "$ac_t""$ol_cv_db_db" 1>&6
11624
11625         if test $ol_cv_db_db = yes ; then
11626                 ol_cv_lib_db=-ldb
11627         fi
11628 fi
11629
11630 if test $ol_cv_lib_db = no ; then
11631         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11632 echo "configure:11633: checking for Berkeley DB link (-ldb3)" >&5
11633 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11634   echo $ac_n "(cached) $ac_c" 1>&6
11635 else
11636   
11637         ol_DB_LIB=-ldb3
11638         ol_LIBS=$LIBS
11639         LIBS="$ol_DB_LIB $LIBS"
11640
11641         cat > conftest.$ac_ext <<EOF
11642 #line 11643 "configure"
11643 #include "confdefs.h"
11644
11645 #ifdef HAVE_DB_185_H
11646 # include <db_185.h>
11647 #else
11648 # include <db.h>
11649 #endif
11650
11651 #ifndef DB_VERSION_MAJOR
11652 # define DB_VERSION_MAJOR 1
11653 #endif
11654
11655 #ifndef NULL
11656 #define NULL ((void*)0)
11657 #endif
11658
11659 int main() {
11660
11661 #if DB_VERSION_MAJOR > 2
11662         db_env_create( NULL, 0 );
11663 #elif DB_VERSION_MAJOR > 1
11664         db_appexit( NULL );
11665 #else
11666         (void) dbopen( NULL, 0, 0, 0, NULL);
11667 #endif
11668
11669 ; return 0; }
11670 EOF
11671 if { (eval echo configure:11672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11672   rm -rf conftest*
11673   ol_cv_db_db3=yes
11674 else
11675   echo "configure: failed program was:" >&5
11676   cat conftest.$ac_ext >&5
11677   rm -rf conftest*
11678   ol_cv_db_db3=no
11679 fi
11680 rm -f conftest*
11681
11682         LIBS="$ol_LIBS"
11683
11684 fi
11685
11686 echo "$ac_t""$ol_cv_db_db3" 1>&6
11687
11688         if test $ol_cv_db_db3 = yes ; then
11689                 ol_cv_lib_db=-ldb3
11690         fi
11691 fi
11692
11693 if test $ol_cv_lib_db = no ; then
11694         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11695 echo "configure:11696: checking for Berkeley DB link (-ldb2)" >&5
11696 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11697   echo $ac_n "(cached) $ac_c" 1>&6
11698 else
11699   
11700         ol_DB_LIB=-ldb2
11701         ol_LIBS=$LIBS
11702         LIBS="$ol_DB_LIB $LIBS"
11703
11704         cat > conftest.$ac_ext <<EOF
11705 #line 11706 "configure"
11706 #include "confdefs.h"
11707
11708 #ifdef HAVE_DB_185_H
11709 # include <db_185.h>
11710 #else
11711 # include <db.h>
11712 #endif
11713
11714 #ifndef DB_VERSION_MAJOR
11715 # define DB_VERSION_MAJOR 1
11716 #endif
11717
11718 #ifndef NULL
11719 #define NULL ((void*)0)
11720 #endif
11721
11722 int main() {
11723
11724 #if DB_VERSION_MAJOR > 2
11725         db_env_create( NULL, 0 );
11726 #elif DB_VERSION_MAJOR > 1
11727         db_appexit( NULL );
11728 #else
11729         (void) dbopen( NULL, 0, 0, 0, NULL);
11730 #endif
11731
11732 ; return 0; }
11733 EOF
11734 if { (eval echo configure:11735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11735   rm -rf conftest*
11736   ol_cv_db_db2=yes
11737 else
11738   echo "configure: failed program was:" >&5
11739   cat conftest.$ac_ext >&5
11740   rm -rf conftest*
11741   ol_cv_db_db2=no
11742 fi
11743 rm -f conftest*
11744
11745         LIBS="$ol_LIBS"
11746
11747 fi
11748
11749 echo "$ac_t""$ol_cv_db_db2" 1>&6
11750
11751         if test $ol_cv_db_db2 = yes ; then
11752                 ol_cv_lib_db=-ldb2
11753         fi
11754 fi
11755
11756 if test $ol_cv_lib_db = no ; then
11757         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11758 echo "configure:11759: checking for Berkeley DB link (-ldb1)" >&5
11759 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11760   echo $ac_n "(cached) $ac_c" 1>&6
11761 else
11762   
11763         ol_DB_LIB=-ldb1
11764         ol_LIBS=$LIBS
11765         LIBS="$ol_DB_LIB $LIBS"
11766
11767         cat > conftest.$ac_ext <<EOF
11768 #line 11769 "configure"
11769 #include "confdefs.h"
11770
11771 #ifdef HAVE_DB_185_H
11772 # include <db_185.h>
11773 #else
11774 # include <db.h>
11775 #endif
11776
11777 #ifndef DB_VERSION_MAJOR
11778 # define DB_VERSION_MAJOR 1
11779 #endif
11780
11781 #ifndef NULL
11782 #define NULL ((void*)0)
11783 #endif
11784
11785 int main() {
11786
11787 #if DB_VERSION_MAJOR > 2
11788         db_env_create( NULL, 0 );
11789 #elif DB_VERSION_MAJOR > 1
11790         db_appexit( NULL );
11791 #else
11792         (void) dbopen( NULL, 0, 0, 0, NULL);
11793 #endif
11794
11795 ; return 0; }
11796 EOF
11797 if { (eval echo configure:11798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11798   rm -rf conftest*
11799   ol_cv_db_db1=yes
11800 else
11801   echo "configure: failed program was:" >&5
11802   cat conftest.$ac_ext >&5
11803   rm -rf conftest*
11804   ol_cv_db_db1=no
11805 fi
11806 rm -f conftest*
11807
11808         LIBS="$ol_LIBS"
11809
11810 fi
11811
11812 echo "$ac_t""$ol_cv_db_db1" 1>&6
11813
11814         if test $ol_cv_db_db1 = yes ; then
11815                 ol_cv_lib_db=-ldb1
11816         fi
11817 fi
11818
11819
11820                 if test "$ol_cv_lib_db" != no ; then
11821                         ol_cv_berkeley_db=yes
11822                 fi
11823         fi
11824 fi
11825
11826         else
11827                 ol_cv_berkeley_db=no
11828 for ac_hdr in db.h
11829 do
11830 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11831 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11832 echo "configure:11833: checking for $ac_hdr" >&5
11833 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11834   echo $ac_n "(cached) $ac_c" 1>&6
11835 else
11836   cat > conftest.$ac_ext <<EOF
11837 #line 11838 "configure"
11838 #include "confdefs.h"
11839 #include <$ac_hdr>
11840 EOF
11841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11842 { (eval echo configure:11843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11844 if test -z "$ac_err"; then
11845   rm -rf conftest*
11846   eval "ac_cv_header_$ac_safe=yes"
11847 else
11848   echo "$ac_err" >&5
11849   echo "configure: failed program was:" >&5
11850   cat conftest.$ac_ext >&5
11851   rm -rf conftest*
11852   eval "ac_cv_header_$ac_safe=no"
11853 fi
11854 rm -f conftest*
11855 fi
11856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11857   echo "$ac_t""yes" 1>&6
11858     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11859   cat >> confdefs.h <<EOF
11860 #define $ac_tr_hdr 1
11861 EOF
11862  
11863 else
11864   echo "$ac_t""no" 1>&6
11865 fi
11866 done
11867
11868 if test $ac_cv_header_db_h = yes; then
11869         ol_cv_lib_db=no
11870 if test $ol_cv_lib_db = no ; then
11871         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11872 echo "configure:11873: checking for Berkeley DB link (default)" >&5
11873 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11874   echo $ac_n "(cached) $ac_c" 1>&6
11875 else
11876   
11877         ol_DB_LIB=
11878         ol_LIBS=$LIBS
11879         LIBS="$ol_DB_LIB $LIBS"
11880
11881         cat > conftest.$ac_ext <<EOF
11882 #line 11883 "configure"
11883 #include "confdefs.h"
11884
11885 #ifdef HAVE_DB_185_H
11886 # include <db_185.h>
11887 #else
11888 # include <db.h>
11889 #endif
11890
11891 #ifndef DB_VERSION_MAJOR
11892 # define DB_VERSION_MAJOR 1
11893 #endif
11894
11895 #ifndef NULL
11896 #define NULL ((void*)0)
11897 #endif
11898
11899 int main() {
11900
11901 #if DB_VERSION_MAJOR > 2
11902         db_env_create( NULL, 0 );
11903 #elif DB_VERSION_MAJOR > 1
11904         db_appexit( NULL );
11905 #else
11906         (void) dbopen( NULL, 0, 0, 0, NULL);
11907 #endif
11908
11909 ; return 0; }
11910 EOF
11911 if { (eval echo configure:11912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11912   rm -rf conftest*
11913   ol_cv_db_none=yes
11914 else
11915   echo "configure: failed program was:" >&5
11916   cat conftest.$ac_ext >&5
11917   rm -rf conftest*
11918   ol_cv_db_none=no
11919 fi
11920 rm -f conftest*
11921
11922         LIBS="$ol_LIBS"
11923
11924 fi
11925
11926 echo "$ac_t""$ol_cv_db_none" 1>&6
11927
11928         if test $ol_cv_db_none = yes ; then
11929                 ol_cv_lib_db=yes
11930         fi
11931 fi
11932
11933 if test $ol_cv_lib_db = no ; then
11934         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11935 echo "configure:11936: checking for Berkeley DB link (-ldb)" >&5
11936 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11937   echo $ac_n "(cached) $ac_c" 1>&6
11938 else
11939   
11940         ol_DB_LIB=-ldb
11941         ol_LIBS=$LIBS
11942         LIBS="$ol_DB_LIB $LIBS"
11943
11944         cat > conftest.$ac_ext <<EOF
11945 #line 11946 "configure"
11946 #include "confdefs.h"
11947
11948 #ifdef HAVE_DB_185_H
11949 # include <db_185.h>
11950 #else
11951 # include <db.h>
11952 #endif
11953
11954 #ifndef DB_VERSION_MAJOR
11955 # define DB_VERSION_MAJOR 1
11956 #endif
11957
11958 #ifndef NULL
11959 #define NULL ((void*)0)
11960 #endif
11961
11962 int main() {
11963
11964 #if DB_VERSION_MAJOR > 2
11965         db_env_create( NULL, 0 );
11966 #elif DB_VERSION_MAJOR > 1
11967         db_appexit( NULL );
11968 #else
11969         (void) dbopen( NULL, 0, 0, 0, NULL);
11970 #endif
11971
11972 ; return 0; }
11973 EOF
11974 if { (eval echo configure:11975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11975   rm -rf conftest*
11976   ol_cv_db_db=yes
11977 else
11978   echo "configure: failed program was:" >&5
11979   cat conftest.$ac_ext >&5
11980   rm -rf conftest*
11981   ol_cv_db_db=no
11982 fi
11983 rm -f conftest*
11984
11985         LIBS="$ol_LIBS"
11986
11987 fi
11988
11989 echo "$ac_t""$ol_cv_db_db" 1>&6
11990
11991         if test $ol_cv_db_db = yes ; then
11992                 ol_cv_lib_db=-ldb
11993         fi
11994 fi
11995
11996 if test $ol_cv_lib_db = no ; then
11997         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11998 echo "configure:11999: checking for Berkeley DB link (-ldb3)" >&5
11999 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12000   echo $ac_n "(cached) $ac_c" 1>&6
12001 else
12002   
12003         ol_DB_LIB=-ldb3
12004         ol_LIBS=$LIBS
12005         LIBS="$ol_DB_LIB $LIBS"
12006
12007         cat > conftest.$ac_ext <<EOF
12008 #line 12009 "configure"
12009 #include "confdefs.h"
12010
12011 #ifdef HAVE_DB_185_H
12012 # include <db_185.h>
12013 #else
12014 # include <db.h>
12015 #endif
12016
12017 #ifndef DB_VERSION_MAJOR
12018 # define DB_VERSION_MAJOR 1
12019 #endif
12020
12021 #ifndef NULL
12022 #define NULL ((void*)0)
12023 #endif
12024
12025 int main() {
12026
12027 #if DB_VERSION_MAJOR > 2
12028         db_env_create( NULL, 0 );
12029 #elif DB_VERSION_MAJOR > 1
12030         db_appexit( NULL );
12031 #else
12032         (void) dbopen( NULL, 0, 0, 0, NULL);
12033 #endif
12034
12035 ; return 0; }
12036 EOF
12037 if { (eval echo configure:12038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12038   rm -rf conftest*
12039   ol_cv_db_db3=yes
12040 else
12041   echo "configure: failed program was:" >&5
12042   cat conftest.$ac_ext >&5
12043   rm -rf conftest*
12044   ol_cv_db_db3=no
12045 fi
12046 rm -f conftest*
12047
12048         LIBS="$ol_LIBS"
12049
12050 fi
12051
12052 echo "$ac_t""$ol_cv_db_db3" 1>&6
12053
12054         if test $ol_cv_db_db3 = yes ; then
12055                 ol_cv_lib_db=-ldb3
12056         fi
12057 fi
12058
12059 if test $ol_cv_lib_db = no ; then
12060         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12061 echo "configure:12062: checking for Berkeley DB link (-ldb2)" >&5
12062 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12063   echo $ac_n "(cached) $ac_c" 1>&6
12064 else
12065   
12066         ol_DB_LIB=-ldb2
12067         ol_LIBS=$LIBS
12068         LIBS="$ol_DB_LIB $LIBS"
12069
12070         cat > conftest.$ac_ext <<EOF
12071 #line 12072 "configure"
12072 #include "confdefs.h"
12073
12074 #ifdef HAVE_DB_185_H
12075 # include <db_185.h>
12076 #else
12077 # include <db.h>
12078 #endif
12079
12080 #ifndef DB_VERSION_MAJOR
12081 # define DB_VERSION_MAJOR 1
12082 #endif
12083
12084 #ifndef NULL
12085 #define NULL ((void*)0)
12086 #endif
12087
12088 int main() {
12089
12090 #if DB_VERSION_MAJOR > 2
12091         db_env_create( NULL, 0 );
12092 #elif DB_VERSION_MAJOR > 1
12093         db_appexit( NULL );
12094 #else
12095         (void) dbopen( NULL, 0, 0, 0, NULL);
12096 #endif
12097
12098 ; return 0; }
12099 EOF
12100 if { (eval echo configure:12101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12101   rm -rf conftest*
12102   ol_cv_db_db2=yes
12103 else
12104   echo "configure: failed program was:" >&5
12105   cat conftest.$ac_ext >&5
12106   rm -rf conftest*
12107   ol_cv_db_db2=no
12108 fi
12109 rm -f conftest*
12110
12111         LIBS="$ol_LIBS"
12112
12113 fi
12114
12115 echo "$ac_t""$ol_cv_db_db2" 1>&6
12116
12117         if test $ol_cv_db_db2 = yes ; then
12118                 ol_cv_lib_db=-ldb2
12119         fi
12120 fi
12121
12122 if test $ol_cv_lib_db = no ; then
12123         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12124 echo "configure:12125: checking for Berkeley DB link (-ldb1)" >&5
12125 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12126   echo $ac_n "(cached) $ac_c" 1>&6
12127 else
12128   
12129         ol_DB_LIB=-ldb1
12130         ol_LIBS=$LIBS
12131         LIBS="$ol_DB_LIB $LIBS"
12132
12133         cat > conftest.$ac_ext <<EOF
12134 #line 12135 "configure"
12135 #include "confdefs.h"
12136
12137 #ifdef HAVE_DB_185_H
12138 # include <db_185.h>
12139 #else
12140 # include <db.h>
12141 #endif
12142
12143 #ifndef DB_VERSION_MAJOR
12144 # define DB_VERSION_MAJOR 1
12145 #endif
12146
12147 #ifndef NULL
12148 #define NULL ((void*)0)
12149 #endif
12150
12151 int main() {
12152
12153 #if DB_VERSION_MAJOR > 2
12154         db_env_create( NULL, 0 );
12155 #elif DB_VERSION_MAJOR > 1
12156         db_appexit( NULL );
12157 #else
12158         (void) dbopen( NULL, 0, 0, 0, NULL);
12159 #endif
12160
12161 ; return 0; }
12162 EOF
12163 if { (eval echo configure:12164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12164   rm -rf conftest*
12165   ol_cv_db_db1=yes
12166 else
12167   echo "configure: failed program was:" >&5
12168   cat conftest.$ac_ext >&5
12169   rm -rf conftest*
12170   ol_cv_db_db1=no
12171 fi
12172 rm -f conftest*
12173
12174         LIBS="$ol_LIBS"
12175
12176 fi
12177
12178 echo "$ac_t""$ol_cv_db_db1" 1>&6
12179
12180         if test $ol_cv_db_db1 = yes ; then
12181                 ol_cv_lib_db=-ldb1
12182         fi
12183 fi
12184
12185
12186         if test "$ol_cv_lib_db" != no ; then
12187                 ol_cv_berkeley_db=yes
12188                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12189 echo "configure:12190: checking for Berkeley DB thread support" >&5
12190 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12191   echo $ac_n "(cached) $ac_c" 1>&6
12192 else
12193   
12194         ol_LIBS="$LIBS"
12195         if test $ol_cv_lib_db != yes ; then
12196                 LIBS="$ol_cv_lib_db"
12197         fi
12198
12199         if test "$cross_compiling" = yes; then
12200   ol_cv_berkeley_db_thread=cross
12201 else
12202   cat > conftest.$ac_ext <<EOF
12203 #line 12204 "configure"
12204 #include "confdefs.h"
12205
12206 #ifdef HAVE_DB_185_H
12207         choke me;
12208 #else
12209 #include <db.h>
12210 #endif
12211 #ifndef NULL
12212 #define NULL ((void *)0)
12213 #endif
12214 main()
12215 {
12216         int rc;
12217         u_int32_t flags = DB_CREATE | DB_THREAD;
12218
12219
12220 #if DB_VERSION_MAJOR > 2
12221         DB_ENV *env = NULL;
12222
12223         rc = db_env_create( &env, 0 );
12224
12225         if( rc == 0 ) {
12226                 rc = env->open( env, NULL, NULL, flags, 0 );
12227         }
12228
12229 #else
12230         DB_ENV env;
12231         memset( &env, '\0', sizeof(env) );
12232
12233         rc = db_appinit( NULL, NULL, &env, flags );
12234
12235         if( rc == 0 ) {
12236                 db_appexit( &env );
12237         }
12238 #endif
12239
12240         return rc;
12241 }
12242 EOF
12243 if { (eval echo configure:12244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12244 then
12245   ol_cv_berkeley_db_thread=yes
12246 else
12247   echo "configure: failed program was:" >&5
12248   cat conftest.$ac_ext >&5
12249   rm -fr conftest*
12250   ol_cv_berkeley_db_thread=no
12251 fi
12252 rm -fr conftest*
12253 fi
12254
12255
12256         LIBS="$ol_LIBS"
12257
12258         if test $ol_cv_berkeley_db_thread != no ; then
12259                 cat >> confdefs.h <<\EOF
12260 #define HAVE_BERKELEY_DB_THREAD 1
12261 EOF
12262
12263         fi
12264
12265 fi
12266
12267 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12268         fi
12269 fi
12270
12271         fi
12272
12273         if test $ol_cv_berkeley_db != no ; then
12274                 cat >> confdefs.h <<\EOF
12275 #define HAVE_BERKELEY_DB 1
12276 EOF
12277
12278
12279                 ol_link_ldbm=berkeley
12280                 ol_with_ldbm_api=db
12281
12282                 if test $ol_with_ldbm_type = hash ; then
12283                         cat >> confdefs.h <<\EOF
12284 #define LDBM_USE_DBHASH 1
12285 EOF
12286
12287                 else
12288                         cat >> confdefs.h <<\EOF
12289 #define LDBM_USE_DBBTREE 1
12290 EOF
12291
12292                 fi
12293
12294                                                 if test $ol_cv_lib_db != yes ; then
12295                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12296                 fi
12297         fi
12298 fi
12299
12300 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12301         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12302         ol_with_ldbm_api=none
12303 fi
12304
12305 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12306         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12307 echo "configure:12308: checking for MDBM library" >&5
12308 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12309   echo $ac_n "(cached) $ac_c" 1>&6
12310 else
12311         ol_LIBS="$LIBS"
12312         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12313 echo "configure:12314: checking for mdbm_set_chain" >&5
12314 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12315   echo $ac_n "(cached) $ac_c" 1>&6
12316 else
12317   cat > conftest.$ac_ext <<EOF
12318 #line 12319 "configure"
12319 #include "confdefs.h"
12320 /* System header to define __stub macros and hopefully few prototypes,
12321     which can conflict with char mdbm_set_chain(); below.  */
12322 #include <assert.h>
12323 /* Override any gcc2 internal prototype to avoid an error.  */
12324 /* We use char because int might match the return type of a gcc2
12325     builtin and then its argument prototype would still apply.  */
12326 char mdbm_set_chain();
12327 char (*f)();
12328
12329 int main() {
12330
12331 /* The GNU C library defines this for functions which it implements
12332     to always fail with ENOSYS.  Some functions are actually named
12333     something starting with __ and the normal name is an alias.  */
12334 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12335 choke me
12336 #else
12337 f = mdbm_set_chain;
12338 #endif
12339
12340 ; return 0; }
12341 EOF
12342 if { (eval echo configure:12343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12343   rm -rf conftest*
12344   eval "ac_cv_func_mdbm_set_chain=yes"
12345 else
12346   echo "configure: failed program was:" >&5
12347   cat conftest.$ac_ext >&5
12348   rm -rf conftest*
12349   eval "ac_cv_func_mdbm_set_chain=no"
12350 fi
12351 rm -f conftest*
12352 fi
12353
12354 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12355   echo "$ac_t""yes" 1>&6
12356   ol_cv_lib_mdbm=yes
12357 else
12358   echo "$ac_t""no" 1>&6
12359
12360                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12361 echo "configure:12362: checking for mdbm_set_chain in -lmdbm" >&5
12362 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12363 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12364   echo $ac_n "(cached) $ac_c" 1>&6
12365 else
12366   ac_save_LIBS="$LIBS"
12367 LIBS="-lmdbm  $LIBS"
12368 cat > conftest.$ac_ext <<EOF
12369 #line 12370 "configure"
12370 #include "confdefs.h"
12371 /* Override any gcc2 internal prototype to avoid an error.  */
12372 /* We use char because int might match the return type of a gcc2
12373     builtin and then its argument prototype would still apply.  */
12374 char mdbm_set_chain();
12375
12376 int main() {
12377 mdbm_set_chain()
12378 ; return 0; }
12379 EOF
12380 if { (eval echo configure:12381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12381   rm -rf conftest*
12382   eval "ac_cv_lib_$ac_lib_var=yes"
12383 else
12384   echo "configure: failed program was:" >&5
12385   cat conftest.$ac_ext >&5
12386   rm -rf conftest*
12387   eval "ac_cv_lib_$ac_lib_var=no"
12388 fi
12389 rm -f conftest*
12390 LIBS="$ac_save_LIBS"
12391
12392 fi
12393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12394   echo "$ac_t""yes" 1>&6
12395   ol_cv_lib_mdbm=-lmdbm
12396 else
12397   echo "$ac_t""no" 1>&6
12398 ol_cv_lib_mdbm=no
12399 fi
12400
12401         
12402 fi
12403
12404         LIBS="$ol_LIBS"
12405
12406 fi
12407
12408 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12409
12410
12411  for ac_hdr in mdbm.h
12412 do
12413 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12414 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12415 echo "configure:12416: checking for $ac_hdr" >&5
12416 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12417   echo $ac_n "(cached) $ac_c" 1>&6
12418 else
12419   cat > conftest.$ac_ext <<EOF
12420 #line 12421 "configure"
12421 #include "confdefs.h"
12422 #include <$ac_hdr>
12423 EOF
12424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12425 { (eval echo configure:12426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12427 if test -z "$ac_err"; then
12428   rm -rf conftest*
12429   eval "ac_cv_header_$ac_safe=yes"
12430 else
12431   echo "$ac_err" >&5
12432   echo "configure: failed program was:" >&5
12433   cat conftest.$ac_ext >&5
12434   rm -rf conftest*
12435   eval "ac_cv_header_$ac_safe=no"
12436 fi
12437 rm -f conftest*
12438 fi
12439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12440   echo "$ac_t""yes" 1>&6
12441     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12442   cat >> confdefs.h <<EOF
12443 #define $ac_tr_hdr 1
12444 EOF
12445  
12446 else
12447   echo "$ac_t""no" 1>&6
12448 fi
12449 done
12450
12451  echo $ac_n "checking for db""... $ac_c" 1>&6
12452 echo "configure:12453: checking for db" >&5
12453 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12454   echo $ac_n "(cached) $ac_c" 1>&6
12455 else
12456   
12457         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12458                 ol_cv_mdbm=no
12459         else
12460                 ol_cv_mdbm=yes
12461         fi
12462
12463 fi
12464
12465 echo "$ac_t""$ol_cv_mdbm" 1>&6
12466  if test $ol_cv_mdbm = yes ; then
12467         cat >> confdefs.h <<\EOF
12468 #define HAVE_MDBM 1
12469 EOF
12470
12471  fi
12472
12473
12474         if test $ol_cv_mdbm = yes ; then
12475                 ol_link_ldbm=mdbm
12476                 ol_with_ldbm_api=mdbm
12477                 if test $ol_cv_lib_mdbm != yes ; then
12478                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12479                 fi
12480         fi
12481 fi
12482
12483 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12484         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12485 echo "configure:12486: checking for GDBM library" >&5
12486 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12487   echo $ac_n "(cached) $ac_c" 1>&6
12488 else
12489         ol_LIBS="$LIBS"
12490         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12491 echo "configure:12492: checking for gdbm_open" >&5
12492 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12493   echo $ac_n "(cached) $ac_c" 1>&6
12494 else
12495   cat > conftest.$ac_ext <<EOF
12496 #line 12497 "configure"
12497 #include "confdefs.h"
12498 /* System header to define __stub macros and hopefully few prototypes,
12499     which can conflict with char gdbm_open(); below.  */
12500 #include <assert.h>
12501 /* Override any gcc2 internal prototype to avoid an error.  */
12502 /* We use char because int might match the return type of a gcc2
12503     builtin and then its argument prototype would still apply.  */
12504 char gdbm_open();
12505 char (*f)();
12506
12507 int main() {
12508
12509 /* The GNU C library defines this for functions which it implements
12510     to always fail with ENOSYS.  Some functions are actually named
12511     something starting with __ and the normal name is an alias.  */
12512 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12513 choke me
12514 #else
12515 f = gdbm_open;
12516 #endif
12517
12518 ; return 0; }
12519 EOF
12520 if { (eval echo configure:12521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12521   rm -rf conftest*
12522   eval "ac_cv_func_gdbm_open=yes"
12523 else
12524   echo "configure: failed program was:" >&5
12525   cat conftest.$ac_ext >&5
12526   rm -rf conftest*
12527   eval "ac_cv_func_gdbm_open=no"
12528 fi
12529 rm -f conftest*
12530 fi
12531
12532 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12533   echo "$ac_t""yes" 1>&6
12534   ol_cv_lib_gdbm=yes
12535 else
12536   echo "$ac_t""no" 1>&6
12537
12538                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12539 echo "configure:12540: checking for gdbm_open in -lgdbm" >&5
12540 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12541 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12542   echo $ac_n "(cached) $ac_c" 1>&6
12543 else
12544   ac_save_LIBS="$LIBS"
12545 LIBS="-lgdbm  $LIBS"
12546 cat > conftest.$ac_ext <<EOF
12547 #line 12548 "configure"
12548 #include "confdefs.h"
12549 /* Override any gcc2 internal prototype to avoid an error.  */
12550 /* We use char because int might match the return type of a gcc2
12551     builtin and then its argument prototype would still apply.  */
12552 char gdbm_open();
12553
12554 int main() {
12555 gdbm_open()
12556 ; return 0; }
12557 EOF
12558 if { (eval echo configure:12559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12559   rm -rf conftest*
12560   eval "ac_cv_lib_$ac_lib_var=yes"
12561 else
12562   echo "configure: failed program was:" >&5
12563   cat conftest.$ac_ext >&5
12564   rm -rf conftest*
12565   eval "ac_cv_lib_$ac_lib_var=no"
12566 fi
12567 rm -f conftest*
12568 LIBS="$ac_save_LIBS"
12569
12570 fi
12571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12572   echo "$ac_t""yes" 1>&6
12573   ol_cv_lib_gdbm=-lgdbm
12574 else
12575   echo "$ac_t""no" 1>&6
12576 ol_cv_lib_gdbm=no
12577 fi
12578
12579         
12580 fi
12581
12582         LIBS="$ol_LIBS"
12583
12584 fi
12585
12586 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12587
12588
12589  for ac_hdr in gdbm.h
12590 do
12591 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12592 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12593 echo "configure:12594: checking for $ac_hdr" >&5
12594 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12595   echo $ac_n "(cached) $ac_c" 1>&6
12596 else
12597   cat > conftest.$ac_ext <<EOF
12598 #line 12599 "configure"
12599 #include "confdefs.h"
12600 #include <$ac_hdr>
12601 EOF
12602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12603 { (eval echo configure:12604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12605 if test -z "$ac_err"; then
12606   rm -rf conftest*
12607   eval "ac_cv_header_$ac_safe=yes"
12608 else
12609   echo "$ac_err" >&5
12610   echo "configure: failed program was:" >&5
12611   cat conftest.$ac_ext >&5
12612   rm -rf conftest*
12613   eval "ac_cv_header_$ac_safe=no"
12614 fi
12615 rm -f conftest*
12616 fi
12617 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12618   echo "$ac_t""yes" 1>&6
12619     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12620   cat >> confdefs.h <<EOF
12621 #define $ac_tr_hdr 1
12622 EOF
12623  
12624 else
12625   echo "$ac_t""no" 1>&6
12626 fi
12627 done
12628
12629  echo $ac_n "checking for db""... $ac_c" 1>&6
12630 echo "configure:12631: checking for db" >&5
12631 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12632   echo $ac_n "(cached) $ac_c" 1>&6
12633 else
12634   
12635         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12636                 ol_cv_gdbm=no
12637         else
12638                 ol_cv_gdbm=yes
12639         fi
12640
12641 fi
12642
12643 echo "$ac_t""$ol_cv_gdbm" 1>&6
12644  if test $ol_cv_gdbm = yes ; then
12645         cat >> confdefs.h <<\EOF
12646 #define HAVE_GDBM 1
12647 EOF
12648
12649  fi
12650
12651
12652         if test $ol_cv_gdbm = yes ; then
12653                 ol_link_ldbm=gdbm
12654                 ol_with_ldbm_api=gdbm
12655
12656                 if test $ol_cv_lib_gdbm != yes ; then
12657                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12658                 fi
12659         fi
12660 fi
12661
12662 if test $ol_with_ldbm_api = ndbm ; then
12663         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12664 echo "configure:12665: checking for NDBM library" >&5
12665 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12666   echo $ac_n "(cached) $ac_c" 1>&6
12667 else
12668         ol_LIBS="$LIBS"
12669         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12670 echo "configure:12671: checking for dbm_open" >&5
12671 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12672   echo $ac_n "(cached) $ac_c" 1>&6
12673 else
12674   cat > conftest.$ac_ext <<EOF
12675 #line 12676 "configure"
12676 #include "confdefs.h"
12677 /* System header to define __stub macros and hopefully few prototypes,
12678     which can conflict with char dbm_open(); below.  */
12679 #include <assert.h>
12680 /* Override any gcc2 internal prototype to avoid an error.  */
12681 /* We use char because int might match the return type of a gcc2
12682     builtin and then its argument prototype would still apply.  */
12683 char dbm_open();
12684 char (*f)();
12685
12686 int main() {
12687
12688 /* The GNU C library defines this for functions which it implements
12689     to always fail with ENOSYS.  Some functions are actually named
12690     something starting with __ and the normal name is an alias.  */
12691 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12692 choke me
12693 #else
12694 f = dbm_open;
12695 #endif
12696
12697 ; return 0; }
12698 EOF
12699 if { (eval echo configure:12700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12700   rm -rf conftest*
12701   eval "ac_cv_func_dbm_open=yes"
12702 else
12703   echo "configure: failed program was:" >&5
12704   cat conftest.$ac_ext >&5
12705   rm -rf conftest*
12706   eval "ac_cv_func_dbm_open=no"
12707 fi
12708 rm -f conftest*
12709 fi
12710
12711 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12712   echo "$ac_t""yes" 1>&6
12713   ol_cv_lib_ndbm=yes
12714 else
12715   echo "$ac_t""no" 1>&6
12716
12717                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12718 echo "configure:12719: checking for dbm_open in -lndbm" >&5
12719 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12720 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12721   echo $ac_n "(cached) $ac_c" 1>&6
12722 else
12723   ac_save_LIBS="$LIBS"
12724 LIBS="-lndbm  $LIBS"
12725 cat > conftest.$ac_ext <<EOF
12726 #line 12727 "configure"
12727 #include "confdefs.h"
12728 /* Override any gcc2 internal prototype to avoid an error.  */
12729 /* We use char because int might match the return type of a gcc2
12730     builtin and then its argument prototype would still apply.  */
12731 char dbm_open();
12732
12733 int main() {
12734 dbm_open()
12735 ; return 0; }
12736 EOF
12737 if { (eval echo configure:12738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12738   rm -rf conftest*
12739   eval "ac_cv_lib_$ac_lib_var=yes"
12740 else
12741   echo "configure: failed program was:" >&5
12742   cat conftest.$ac_ext >&5
12743   rm -rf conftest*
12744   eval "ac_cv_lib_$ac_lib_var=no"
12745 fi
12746 rm -f conftest*
12747 LIBS="$ac_save_LIBS"
12748
12749 fi
12750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12751   echo "$ac_t""yes" 1>&6
12752   ol_cv_lib_ndbm=-lndbm
12753 else
12754   echo "$ac_t""no" 1>&6
12755
12756                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12757 echo "configure:12758: checking for dbm_open in -ldbm" >&5
12758 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12759 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12760   echo $ac_n "(cached) $ac_c" 1>&6
12761 else
12762   ac_save_LIBS="$LIBS"
12763 LIBS="-ldbm  $LIBS"
12764 cat > conftest.$ac_ext <<EOF
12765 #line 12766 "configure"
12766 #include "confdefs.h"
12767 /* Override any gcc2 internal prototype to avoid an error.  */
12768 /* We use char because int might match the return type of a gcc2
12769     builtin and then its argument prototype would still apply.  */
12770 char dbm_open();
12771
12772 int main() {
12773 dbm_open()
12774 ; return 0; }
12775 EOF
12776 if { (eval echo configure:12777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12777   rm -rf conftest*
12778   eval "ac_cv_lib_$ac_lib_var=yes"
12779 else
12780   echo "configure: failed program was:" >&5
12781   cat conftest.$ac_ext >&5
12782   rm -rf conftest*
12783   eval "ac_cv_lib_$ac_lib_var=no"
12784 fi
12785 rm -f conftest*
12786 LIBS="$ac_save_LIBS"
12787
12788 fi
12789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12790   echo "$ac_t""yes" 1>&6
12791   ol_cv_lib_ndbm=-ldbm
12792 else
12793   echo "$ac_t""no" 1>&6
12794 ol_cv_lib_ndbm=no
12795 fi
12796                 
12797 fi
12798
12799         
12800 fi
12801
12802         LIBS="$ol_LIBS"
12803
12804 fi
12805
12806 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12807
12808
12809  for ac_hdr in ndbm.h
12810 do
12811 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12812 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12813 echo "configure:12814: checking for $ac_hdr" >&5
12814 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12815   echo $ac_n "(cached) $ac_c" 1>&6
12816 else
12817   cat > conftest.$ac_ext <<EOF
12818 #line 12819 "configure"
12819 #include "confdefs.h"
12820 #include <$ac_hdr>
12821 EOF
12822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12823 { (eval echo configure:12824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12825 if test -z "$ac_err"; then
12826   rm -rf conftest*
12827   eval "ac_cv_header_$ac_safe=yes"
12828 else
12829   echo "$ac_err" >&5
12830   echo "configure: failed program was:" >&5
12831   cat conftest.$ac_ext >&5
12832   rm -rf conftest*
12833   eval "ac_cv_header_$ac_safe=no"
12834 fi
12835 rm -f conftest*
12836 fi
12837 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12838   echo "$ac_t""yes" 1>&6
12839     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12840   cat >> confdefs.h <<EOF
12841 #define $ac_tr_hdr 1
12842 EOF
12843  
12844 else
12845   echo "$ac_t""no" 1>&6
12846 fi
12847 done
12848
12849  echo $ac_n "checking for db""... $ac_c" 1>&6
12850 echo "configure:12851: checking for db" >&5
12851 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12852   echo $ac_n "(cached) $ac_c" 1>&6
12853 else
12854   
12855         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12856                 ol_cv_ndbm=no
12857         else
12858                 ol_cv_ndbm=yes
12859         fi
12860
12861 fi
12862
12863 echo "$ac_t""$ol_cv_ndbm" 1>&6
12864  if test $ol_cv_ndbm = yes ; then
12865         cat >> confdefs.h <<\EOF
12866 #define HAVE_NDBM 1
12867 EOF
12868
12869  fi
12870
12871
12872         if test $ol_cv_ndbm = yes ; then
12873                 ol_link_ldbm=ndbm
12874                 ol_with_ldbm_api=ndbm
12875
12876                 if test $ol_cv_lib_ndbm != yes ; then
12877                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12878                 fi
12879         fi
12880 fi
12881
12882 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12883         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12884         if test $ol_enable_ldbm = yes ; then
12885                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12886         fi
12887
12888         echo "configure: warning: disabling LDBM" 1>&2
12889         ol_enable_ldbm=no
12890 fi
12891
12892 ol_link_bdb2=no
12893 if test $ol_enable_bdb2 != no ; then
12894         if test $ol_enable_bdb2 = yes -a $ol_link_ldbm != berkeley ; then
12895                 { echo "configure: error: BDB2 requires LDBM BerkeleyDB 2" 1>&2; exit 1; }
12896         elif test $ol_link_ldbm = berkeley ; then
12897                 ol_link_bdb2=$ol_link_ldbm
12898         fi
12899 fi
12900
12901 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12902         LINK_BINS_DYNAMIC="yes"
12903 else
12904         LINK_BINS_DYNAMIC="no"
12905 fi
12906
12907 if test $ol_enable_wrappers != no ; then
12908         for ac_hdr in tcpd.h
12909 do
12910 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12911 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12912 echo "configure:12913: checking for $ac_hdr" >&5
12913 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12914   echo $ac_n "(cached) $ac_c" 1>&6
12915 else
12916   cat > conftest.$ac_ext <<EOF
12917 #line 12918 "configure"
12918 #include "confdefs.h"
12919 #include <$ac_hdr>
12920 EOF
12921 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12922 { (eval echo configure:12923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12923 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12924 if test -z "$ac_err"; then
12925   rm -rf conftest*
12926   eval "ac_cv_header_$ac_safe=yes"
12927 else
12928   echo "$ac_err" >&5
12929   echo "configure: failed program was:" >&5
12930   cat conftest.$ac_ext >&5
12931   rm -rf conftest*
12932   eval "ac_cv_header_$ac_safe=no"
12933 fi
12934 rm -f conftest*
12935 fi
12936 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12937   echo "$ac_t""yes" 1>&6
12938     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12939   cat >> confdefs.h <<EOF
12940 #define $ac_tr_hdr 1
12941 EOF
12942  
12943 else
12944   echo "$ac_t""no" 1>&6
12945 fi
12946 done
12947
12948
12949         if test $ac_cv_header_tcpd_h != yes ; then
12950                 have_wrappers=no
12951         else
12952                 cat > conftest.$ac_ext <<EOF
12953 #line 12954 "configure"
12954 #include "confdefs.h"
12955
12956 int allow_severity = 0;
12957 int deny_severity  = 0;
12958                 
12959 int main() {
12960 hosts_access()
12961 ; return 0; }
12962 EOF
12963 if { (eval echo configure:12964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12964   rm -rf conftest*
12965   have_wrappers=yes
12966 else
12967   echo "configure: failed program was:" >&5
12968   cat conftest.$ac_ext >&5
12969   rm -rf conftest*
12970   have_wrappers=no
12971 fi
12972 rm -f conftest*
12973         fi
12974
12975         if test $have_wrappers = yes ; then
12976                 cat >> confdefs.h <<\EOF
12977 #define HAVE_TCPD 1
12978 EOF
12979
12980                 WRAP_LIBS="-lwrap"
12981
12982                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12983 echo "configure:12984: checking for main in -lnsl" >&5
12984 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12985 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12986   echo $ac_n "(cached) $ac_c" 1>&6
12987 else
12988   ac_save_LIBS="$LIBS"
12989 LIBS="-lnsl  $LIBS"
12990 cat > conftest.$ac_ext <<EOF
12991 #line 12992 "configure"
12992 #include "confdefs.h"
12993
12994 int main() {
12995 main()
12996 ; return 0; }
12997 EOF
12998 if { (eval echo configure:12999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12999   rm -rf conftest*
13000   eval "ac_cv_lib_$ac_lib_var=yes"
13001 else
13002   echo "configure: failed program was:" >&5
13003   cat conftest.$ac_ext >&5
13004   rm -rf conftest*
13005   eval "ac_cv_lib_$ac_lib_var=no"
13006 fi
13007 rm -f conftest*
13008 LIBS="$ac_save_LIBS"
13009
13010 fi
13011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13012   echo "$ac_t""yes" 1>&6
13013     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13014     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13015   cat >> confdefs.h <<EOF
13016 #define $ac_tr_lib 1
13017 EOF
13018
13019   LIBS="-lnsl $LIBS"
13020
13021 else
13022   echo "$ac_t""no" 1>&6
13023 fi
13024
13025         else
13026                 echo "configure: warning: could not find -lwrap" 1>&2
13027                 if test $ol_enable_wrappers = yes ; then
13028                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13029                 fi
13030
13031                 echo "configure: warning: disabling wrappers support" 1>&2
13032                 ol_enable_wrappers=no
13033                 WRAP_LIBS=""
13034         fi
13035 fi
13036
13037 if test $ol_enable_syslog != no ; then
13038         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13039 echo "configure:13040: checking for openlog" >&5
13040 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13041   echo $ac_n "(cached) $ac_c" 1>&6
13042 else
13043   cat > conftest.$ac_ext <<EOF
13044 #line 13045 "configure"
13045 #include "confdefs.h"
13046 /* System header to define __stub macros and hopefully few prototypes,
13047     which can conflict with char openlog(); below.  */
13048 #include <assert.h>
13049 /* Override any gcc2 internal prototype to avoid an error.  */
13050 /* We use char because int might match the return type of a gcc2
13051     builtin and then its argument prototype would still apply.  */
13052 char openlog();
13053 char (*f)();
13054
13055 int main() {
13056
13057 /* The GNU C library defines this for functions which it implements
13058     to always fail with ENOSYS.  Some functions are actually named
13059     something starting with __ and the normal name is an alias.  */
13060 #if defined (__stub_openlog) || defined (__stub___openlog)
13061 choke me
13062 #else
13063 f = openlog;
13064 #endif
13065
13066 ; return 0; }
13067 EOF
13068 if { (eval echo configure:13069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13069   rm -rf conftest*
13070   eval "ac_cv_func_openlog=yes"
13071 else
13072   echo "configure: failed program was:" >&5
13073   cat conftest.$ac_ext >&5
13074   rm -rf conftest*
13075   eval "ac_cv_func_openlog=no"
13076 fi
13077 rm -f conftest*
13078 fi
13079
13080 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13081   echo "$ac_t""yes" 1>&6
13082   :
13083 else
13084   echo "$ac_t""no" 1>&6
13085 fi
13086
13087         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13088                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13089         fi
13090         ol_enable_syslog=$ac_cv_func_openlog
13091 fi
13092
13093 if test $ol_enable_tcl != no ; then
13094         for ac_hdr in tcl.h
13095 do
13096 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13097 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13098 echo "configure:13099: checking for $ac_hdr" >&5
13099 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13100   echo $ac_n "(cached) $ac_c" 1>&6
13101 else
13102   cat > conftest.$ac_ext <<EOF
13103 #line 13104 "configure"
13104 #include "confdefs.h"
13105 #include <$ac_hdr>
13106 EOF
13107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13108 { (eval echo configure:13109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13109 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13110 if test -z "$ac_err"; then
13111   rm -rf conftest*
13112   eval "ac_cv_header_$ac_safe=yes"
13113 else
13114   echo "$ac_err" >&5
13115   echo "configure: failed program was:" >&5
13116   cat conftest.$ac_ext >&5
13117   rm -rf conftest*
13118   eval "ac_cv_header_$ac_safe=no"
13119 fi
13120 rm -f conftest*
13121 fi
13122 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13123   echo "$ac_t""yes" 1>&6
13124     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13125   cat >> confdefs.h <<EOF
13126 #define $ac_tr_hdr 1
13127 EOF
13128  
13129 else
13130   echo "$ac_t""no" 1>&6
13131 fi
13132 done
13133
13134
13135         if test $ac_cv_header_tcl_h != yes ; then
13136                 have_tcl=no
13137         else
13138                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13139                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13140 echo "configure:13141: checking for main in -l$lib" >&5
13141 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13142 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13143   echo $ac_n "(cached) $ac_c" 1>&6
13144 else
13145   ac_save_LIBS="$LIBS"
13146 LIBS="-l$lib  $LIBS"
13147 cat > conftest.$ac_ext <<EOF
13148 #line 13149 "configure"
13149 #include "confdefs.h"
13150
13151 int main() {
13152 main()
13153 ; return 0; }
13154 EOF
13155 if { (eval echo configure:13156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13156   rm -rf conftest*
13157   eval "ac_cv_lib_$ac_lib_var=yes"
13158 else
13159   echo "configure: failed program was:" >&5
13160   cat conftest.$ac_ext >&5
13161   rm -rf conftest*
13162   eval "ac_cv_lib_$ac_lib_var=no"
13163 fi
13164 rm -f conftest*
13165 LIBS="$ac_save_LIBS"
13166
13167 fi
13168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13169   echo "$ac_t""yes" 1>&6
13170   have_tcl=yes
13171                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13172                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13173                            else
13174                                MOD_TCL_LIB="-l${lib}"
13175                            fi;break
13176 else
13177   echo "$ac_t""no" 1>&6
13178 have_tcl=no
13179 fi
13180
13181                 done
13182         fi
13183
13184         if test $have_tcl != yes ; then
13185                 echo "configure: warning: could not find -ltcl" 1>&2
13186                 if test $ol_enable_tcl = yes ; then
13187                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13188                 fi
13189
13190                 ol_enable_tcl=no
13191         fi
13192 fi
13193
13194 ol_link_termcap=no
13195 for ac_hdr in termcap.h ncurses.h
13196 do
13197 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13198 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13199 echo "configure:13200: checking for $ac_hdr" >&5
13200 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13201   echo $ac_n "(cached) $ac_c" 1>&6
13202 else
13203   cat > conftest.$ac_ext <<EOF
13204 #line 13205 "configure"
13205 #include "confdefs.h"
13206 #include <$ac_hdr>
13207 EOF
13208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13209 { (eval echo configure:13210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13211 if test -z "$ac_err"; then
13212   rm -rf conftest*
13213   eval "ac_cv_header_$ac_safe=yes"
13214 else
13215   echo "$ac_err" >&5
13216   echo "configure: failed program was:" >&5
13217   cat conftest.$ac_ext >&5
13218   rm -rf conftest*
13219   eval "ac_cv_header_$ac_safe=no"
13220 fi
13221 rm -f conftest*
13222 fi
13223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13224   echo "$ac_t""yes" 1>&6
13225     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13226   cat >> confdefs.h <<EOF
13227 #define $ac_tr_hdr 1
13228 EOF
13229  
13230 else
13231   echo "$ac_t""no" 1>&6
13232 fi
13233 done
13234
13235
13236 if test $ol_link_termcap = no ; then
13237         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13238 echo "configure:13239: checking for tputs in -ltermcap" >&5
13239 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13240 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13241   echo $ac_n "(cached) $ac_c" 1>&6
13242 else
13243   ac_save_LIBS="$LIBS"
13244 LIBS="-ltermcap  $LIBS"
13245 cat > conftest.$ac_ext <<EOF
13246 #line 13247 "configure"
13247 #include "confdefs.h"
13248 /* Override any gcc2 internal prototype to avoid an error.  */
13249 /* We use char because int might match the return type of a gcc2
13250     builtin and then its argument prototype would still apply.  */
13251 char tputs();
13252
13253 int main() {
13254 tputs()
13255 ; return 0; }
13256 EOF
13257 if { (eval echo configure:13258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13258   rm -rf conftest*
13259   eval "ac_cv_lib_$ac_lib_var=yes"
13260 else
13261   echo "configure: failed program was:" >&5
13262   cat conftest.$ac_ext >&5
13263   rm -rf conftest*
13264   eval "ac_cv_lib_$ac_lib_var=no"
13265 fi
13266 rm -f conftest*
13267 LIBS="$ac_save_LIBS"
13268
13269 fi
13270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13271   echo "$ac_t""yes" 1>&6
13272   have_termcap=yes
13273 else
13274   echo "$ac_t""no" 1>&6
13275 have_termcap=no
13276 fi
13277
13278         if test $have_termcap = yes ; then
13279                 cat >> confdefs.h <<\EOF
13280 #define HAVE_TERMCAP 1
13281 EOF
13282
13283                 ol_link_termcap=yes
13284                 TERMCAP_LIBS=-ltermcap
13285         fi
13286 fi
13287
13288 if test $ol_link_termcap = no ; then
13289         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13290 echo "configure:13291: checking for initscr in -lncurses" >&5
13291 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13292 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13293   echo $ac_n "(cached) $ac_c" 1>&6
13294 else
13295   ac_save_LIBS="$LIBS"
13296 LIBS="-lncurses  $LIBS"
13297 cat > conftest.$ac_ext <<EOF
13298 #line 13299 "configure"
13299 #include "confdefs.h"
13300 /* Override any gcc2 internal prototype to avoid an error.  */
13301 /* We use char because int might match the return type of a gcc2
13302     builtin and then its argument prototype would still apply.  */
13303 char initscr();
13304
13305 int main() {
13306 initscr()
13307 ; return 0; }
13308 EOF
13309 if { (eval echo configure:13310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13310   rm -rf conftest*
13311   eval "ac_cv_lib_$ac_lib_var=yes"
13312 else
13313   echo "configure: failed program was:" >&5
13314   cat conftest.$ac_ext >&5
13315   rm -rf conftest*
13316   eval "ac_cv_lib_$ac_lib_var=no"
13317 fi
13318 rm -f conftest*
13319 LIBS="$ac_save_LIBS"
13320
13321 fi
13322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13323   echo "$ac_t""yes" 1>&6
13324   have_ncurses=yes
13325 else
13326   echo "$ac_t""no" 1>&6
13327 have_ncurses=no
13328 fi
13329
13330         if test $have_ncurses = yes ; then
13331                 cat >> confdefs.h <<\EOF
13332 #define HAVE_NCURSES 1
13333 EOF
13334
13335                 ol_link_termcap=yes
13336                 TERMCAP_LIBS=-lncurses
13337         fi
13338 fi
13339
13340 if test $ol_link_termcap = no ; then
13341         cat >> confdefs.h <<\EOF
13342 #define NO_TERMCAP 1
13343 EOF
13344
13345         TERMCAP_LIBS=
13346 fi
13347
13348 ol_link_sasl=no
13349 ol_link_spasswd=no
13350 if test $ol_with_cyrus_sasl != no ; then
13351         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13352 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13353 echo "configure:13354: checking for sasl.h" >&5
13354 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13355   echo $ac_n "(cached) $ac_c" 1>&6
13356 else
13357   cat > conftest.$ac_ext <<EOF
13358 #line 13359 "configure"
13359 #include "confdefs.h"
13360 #include <sasl.h>
13361 EOF
13362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13363 { (eval echo configure:13364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13364 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13365 if test -z "$ac_err"; then
13366   rm -rf conftest*
13367   eval "ac_cv_header_$ac_safe=yes"
13368 else
13369   echo "$ac_err" >&5
13370   echo "configure: failed program was:" >&5
13371   cat conftest.$ac_ext >&5
13372   rm -rf conftest*
13373   eval "ac_cv_header_$ac_safe=no"
13374 fi
13375 rm -f conftest*
13376 fi
13377 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13378   echo "$ac_t""yes" 1>&6
13379   :
13380 else
13381   echo "$ac_t""no" 1>&6
13382 fi
13383
13384
13385         if test $ac_cv_header_sasl_h = yes ; then
13386                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13387 echo "configure:13388: checking for sasl_client_init in -lsasl" >&5
13388 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13389 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13390   echo $ac_n "(cached) $ac_c" 1>&6
13391 else
13392   ac_save_LIBS="$LIBS"
13393 LIBS="-lsasl  $LIBS"
13394 cat > conftest.$ac_ext <<EOF
13395 #line 13396 "configure"
13396 #include "confdefs.h"
13397 /* Override any gcc2 internal prototype to avoid an error.  */
13398 /* We use char because int might match the return type of a gcc2
13399     builtin and then its argument prototype would still apply.  */
13400 char sasl_client_init();
13401
13402 int main() {
13403 sasl_client_init()
13404 ; return 0; }
13405 EOF
13406 if { (eval echo configure:13407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13407   rm -rf conftest*
13408   eval "ac_cv_lib_$ac_lib_var=yes"
13409 else
13410   echo "configure: failed program was:" >&5
13411   cat conftest.$ac_ext >&5
13412   rm -rf conftest*
13413   eval "ac_cv_lib_$ac_lib_var=no"
13414 fi
13415 rm -f conftest*
13416 LIBS="$ac_save_LIBS"
13417
13418 fi
13419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13420   echo "$ac_t""yes" 1>&6
13421   have_cyrus_sasl=yes
13422 else
13423   echo "$ac_t""no" 1>&6
13424 have_cyrus_sasl=no
13425 fi
13426
13427
13428                 if test $have_cyrus_sasl != no ; then
13429                         SASL_LIBS="-lsasl"
13430                         cat >> confdefs.h <<\EOF
13431 #define HAVE_CYRUS_SASL 1
13432 EOF
13433
13434                         ol_link_sasl=yes
13435                 fi
13436         fi
13437
13438         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13439                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13440         fi
13441 fi
13442
13443 if test $cross_compiling != yes ; then
13444         dev=no
13445         if test -r /dev/urandom ; then
13446                 dev="/dev/urandom";
13447         elif test -r /idev/urandom ; then
13448                 dev="/idev/urandom";
13449         elif test -r /dev/srandom ; then
13450                 dev="/dev/srandom";
13451         elif test -r /dev/random ; then
13452                 dev="/dev/random";
13453         elif test -r /idev/random ; then
13454                 dev="/idev/random";
13455         fi
13456
13457         if test $dev != no ; then
13458                 cat >> confdefs.h <<EOF
13459 #define URANDOM_DEVICE "$dev"
13460 EOF
13461
13462         fi
13463 fi
13464
13465 ol_link_fetch=no
13466 if test $ol_with_fetch != no ; then
13467         ol_LIBS=$LIBS
13468 LIBS="-lfetch -lcom_err $LIBS"
13469 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13470 echo "configure:13471: checking fetch(3) library" >&5
13471 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13472   echo $ac_n "(cached) $ac_c" 1>&6
13473 else
13474   
13475         cat > conftest.$ac_ext <<EOF
13476 #line 13477 "configure"
13477 #include "confdefs.h"
13478
13479 #include <sys/param.h>
13480 #include <stdio.h>
13481 #include <fetch.h>
13482 int main() {
13483 struct url *u = fetchParseURL("file:///"); 
13484 ; return 0; }
13485 EOF
13486 if { (eval echo configure:13487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13487   rm -rf conftest*
13488   ol_cv_lib_fetch=yes
13489 else
13490   echo "configure: failed program was:" >&5
13491   cat conftest.$ac_ext >&5
13492   rm -rf conftest*
13493   ol_cv_lib_fetch=no
13494 fi
13495 rm -f conftest*
13496 fi
13497
13498 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13499 LIBS=$ol_LIBS
13500 if test $ol_cv_lib_fetch != no ; then
13501         ol_link_fetch="-lfetch -lcom_err"
13502         cat >> confdefs.h <<\EOF
13503 #define HAVE_FETCH 1
13504 EOF
13505
13506 fi
13507
13508
13509         if test $ol_cv_lib_fetch != no ; then
13510                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13511                 ol_link_fetch=freebsd
13512
13513         elif test $ol_with_fetch != auto ; then
13514                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13515         fi 
13516 fi
13517
13518 ol_link_readline=no
13519 if test $ol_with_readline != no ; then
13520         for ac_hdr in readline/readline.h readline/history.h
13521 do
13522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13524 echo "configure:13525: checking for $ac_hdr" >&5
13525 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13526   echo $ac_n "(cached) $ac_c" 1>&6
13527 else
13528   cat > conftest.$ac_ext <<EOF
13529 #line 13530 "configure"
13530 #include "confdefs.h"
13531 #include <$ac_hdr>
13532 EOF
13533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13534 { (eval echo configure:13535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13536 if test -z "$ac_err"; then
13537   rm -rf conftest*
13538   eval "ac_cv_header_$ac_safe=yes"
13539 else
13540   echo "$ac_err" >&5
13541   echo "configure: failed program was:" >&5
13542   cat conftest.$ac_ext >&5
13543   rm -rf conftest*
13544   eval "ac_cv_header_$ac_safe=no"
13545 fi
13546 rm -f conftest*
13547 fi
13548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13549   echo "$ac_t""yes" 1>&6
13550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13551   cat >> confdefs.h <<EOF
13552 #define $ac_tr_hdr 1
13553 EOF
13554  
13555 else
13556   echo "$ac_t""no" 1>&6
13557 fi
13558 done
13559
13560
13561         if test $ac_cv_header_readline_readline_h = yes ; then
13562                 save_LIBS="$LIBS"
13563                 LIBS="$TERMCAP_LIBS $LIBS"
13564                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13565 echo "configure:13566: checking for readline in -lreadline" >&5
13566 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13567 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13568   echo $ac_n "(cached) $ac_c" 1>&6
13569 else
13570   ac_save_LIBS="$LIBS"
13571 LIBS="-lreadline  $LIBS"
13572 cat > conftest.$ac_ext <<EOF
13573 #line 13574 "configure"
13574 #include "confdefs.h"
13575 /* Override any gcc2 internal prototype to avoid an error.  */
13576 /* We use char because int might match the return type of a gcc2
13577     builtin and then its argument prototype would still apply.  */
13578 char readline();
13579
13580 int main() {
13581 readline()
13582 ; return 0; }
13583 EOF
13584 if { (eval echo configure:13585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13585   rm -rf conftest*
13586   eval "ac_cv_lib_$ac_lib_var=yes"
13587 else
13588   echo "configure: failed program was:" >&5
13589   cat conftest.$ac_ext >&5
13590   rm -rf conftest*
13591   eval "ac_cv_lib_$ac_lib_var=no"
13592 fi
13593 rm -f conftest*
13594 LIBS="$ac_save_LIBS"
13595
13596 fi
13597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13598   echo "$ac_t""yes" 1>&6
13599   have_readline=yes
13600 else
13601   echo "$ac_t""no" 1>&6
13602 have_readline=no
13603 fi
13604
13605                 LIBS="$save_LIBS"
13606                         
13607                 if test $have_readline = yes ; then
13608                         ol_with_readline=found
13609                         ol_link_readline=yes
13610
13611                         READLINE_LIBS="-lreadline"
13612                 fi
13613         fi
13614 fi
13615
13616 if test $ol_link_readline = yes ; then
13617         cat >> confdefs.h <<\EOF
13618 #define HAVE_READLINE 1
13619 EOF
13620
13621 fi
13622
13623
13624 if test $ol_enable_crypt != no ; then
13625         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13626 echo "configure:13627: checking for crypt" >&5
13627 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13628   echo $ac_n "(cached) $ac_c" 1>&6
13629 else
13630   cat > conftest.$ac_ext <<EOF
13631 #line 13632 "configure"
13632 #include "confdefs.h"
13633 /* System header to define __stub macros and hopefully few prototypes,
13634     which can conflict with char crypt(); below.  */
13635 #include <assert.h>
13636 /* Override any gcc2 internal prototype to avoid an error.  */
13637 /* We use char because int might match the return type of a gcc2
13638     builtin and then its argument prototype would still apply.  */
13639 char crypt();
13640 char (*f)();
13641
13642 int main() {
13643
13644 /* The GNU C library defines this for functions which it implements
13645     to always fail with ENOSYS.  Some functions are actually named
13646     something starting with __ and the normal name is an alias.  */
13647 #if defined (__stub_crypt) || defined (__stub___crypt)
13648 choke me
13649 #else
13650 f = crypt;
13651 #endif
13652
13653 ; return 0; }
13654 EOF
13655 if { (eval echo configure:13656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13656   rm -rf conftest*
13657   eval "ac_cv_func_crypt=yes"
13658 else
13659   echo "configure: failed program was:" >&5
13660   cat conftest.$ac_ext >&5
13661   rm -rf conftest*
13662   eval "ac_cv_func_crypt=no"
13663 fi
13664 rm -f conftest*
13665 fi
13666
13667 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13668   echo "$ac_t""yes" 1>&6
13669   have_crypt=yes
13670 else
13671   echo "$ac_t""no" 1>&6
13672
13673                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13674 echo "configure:13675: checking for crypt in -lcrypt" >&5
13675 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13676 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13677   echo $ac_n "(cached) $ac_c" 1>&6
13678 else
13679   ac_save_LIBS="$LIBS"
13680 LIBS="-lcrypt  $LIBS"
13681 cat > conftest.$ac_ext <<EOF
13682 #line 13683 "configure"
13683 #include "confdefs.h"
13684 /* Override any gcc2 internal prototype to avoid an error.  */
13685 /* We use char because int might match the return type of a gcc2
13686     builtin and then its argument prototype would still apply.  */
13687 char crypt();
13688
13689 int main() {
13690 crypt()
13691 ; return 0; }
13692 EOF
13693 if { (eval echo configure:13694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13694   rm -rf conftest*
13695   eval "ac_cv_lib_$ac_lib_var=yes"
13696 else
13697   echo "configure: failed program was:" >&5
13698   cat conftest.$ac_ext >&5
13699   rm -rf conftest*
13700   eval "ac_cv_lib_$ac_lib_var=no"
13701 fi
13702 rm -f conftest*
13703 LIBS="$ac_save_LIBS"
13704
13705 fi
13706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13707   echo "$ac_t""yes" 1>&6
13708   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13709                         have_crypt=yes
13710 else
13711   echo "$ac_t""no" 1>&6
13712 have_crypt=no
13713 fi
13714
13715 fi
13716
13717
13718         if test $have_crypt = yes ; then
13719                 cat >> confdefs.h <<\EOF
13720 #define HAVE_CRYPT 1
13721 EOF
13722
13723         else
13724                 echo "configure: warning: could not find crypt" 1>&2
13725                 if test $ol_enable_crypt = yes ; then
13726                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13727                 fi
13728
13729                 echo "configure: warning: disabling crypt support" 1>&2
13730                 ol_enable_crypt=no
13731         fi
13732 fi
13733
13734 if test $ol_enable_proctitle != no ; then
13735         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13736 echo "configure:13737: checking for setproctitle" >&5
13737 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13738   echo $ac_n "(cached) $ac_c" 1>&6
13739 else
13740   cat > conftest.$ac_ext <<EOF
13741 #line 13742 "configure"
13742 #include "confdefs.h"
13743 /* System header to define __stub macros and hopefully few prototypes,
13744     which can conflict with char setproctitle(); below.  */
13745 #include <assert.h>
13746 /* Override any gcc2 internal prototype to avoid an error.  */
13747 /* We use char because int might match the return type of a gcc2
13748     builtin and then its argument prototype would still apply.  */
13749 char setproctitle();
13750 char (*f)();
13751
13752 int main() {
13753
13754 /* The GNU C library defines this for functions which it implements
13755     to always fail with ENOSYS.  Some functions are actually named
13756     something starting with __ and the normal name is an alias.  */
13757 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13758 choke me
13759 #else
13760 f = setproctitle;
13761 #endif
13762
13763 ; return 0; }
13764 EOF
13765 if { (eval echo configure:13766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13766   rm -rf conftest*
13767   eval "ac_cv_func_setproctitle=yes"
13768 else
13769   echo "configure: failed program was:" >&5
13770   cat conftest.$ac_ext >&5
13771   rm -rf conftest*
13772   eval "ac_cv_func_setproctitle=no"
13773 fi
13774 rm -f conftest*
13775 fi
13776
13777 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13778   echo "$ac_t""yes" 1>&6
13779   have_setproctitle=yes
13780 else
13781   echo "$ac_t""no" 1>&6
13782
13783                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13784 echo "configure:13785: checking for setproctitle in -lutil" >&5
13785 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13786 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13787   echo $ac_n "(cached) $ac_c" 1>&6
13788 else
13789   ac_save_LIBS="$LIBS"
13790 LIBS="-lutil  $LIBS"
13791 cat > conftest.$ac_ext <<EOF
13792 #line 13793 "configure"
13793 #include "confdefs.h"
13794 /* Override any gcc2 internal prototype to avoid an error.  */
13795 /* We use char because int might match the return type of a gcc2
13796     builtin and then its argument prototype would still apply.  */
13797 char setproctitle();
13798
13799 int main() {
13800 setproctitle()
13801 ; return 0; }
13802 EOF
13803 if { (eval echo configure:13804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13804   rm -rf conftest*
13805   eval "ac_cv_lib_$ac_lib_var=yes"
13806 else
13807   echo "configure: failed program was:" >&5
13808   cat conftest.$ac_ext >&5
13809   rm -rf conftest*
13810   eval "ac_cv_lib_$ac_lib_var=no"
13811 fi
13812 rm -f conftest*
13813 LIBS="$ac_save_LIBS"
13814
13815 fi
13816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13817   echo "$ac_t""yes" 1>&6
13818   have_setproctitle=yes
13819                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13820 else
13821   echo "$ac_t""no" 1>&6
13822 have_setproctitle=no
13823                         LIBOBJS="$LIBOBJS setproctitle.o"
13824                         LIBSRCS="$LIBSRCS setproctitle.c"
13825 fi
13826
13827 fi
13828
13829
13830         if test $have_setproctitle = yes ; then
13831                 cat >> confdefs.h <<\EOF
13832 #define HAVE_SETPROCTITLE 1
13833 EOF
13834
13835         fi
13836 fi
13837
13838 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13839 echo "configure:13840: checking for ANSI C header files" >&5
13840 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13841   echo $ac_n "(cached) $ac_c" 1>&6
13842 else
13843   cat > conftest.$ac_ext <<EOF
13844 #line 13845 "configure"
13845 #include "confdefs.h"
13846 #include <stdlib.h>
13847 #include <stdarg.h>
13848 #include <string.h>
13849 #include <float.h>
13850 EOF
13851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13852 { (eval echo configure:13853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13854 if test -z "$ac_err"; then
13855   rm -rf conftest*
13856   ac_cv_header_stdc=yes
13857 else
13858   echo "$ac_err" >&5
13859   echo "configure: failed program was:" >&5
13860   cat conftest.$ac_ext >&5
13861   rm -rf conftest*
13862   ac_cv_header_stdc=no
13863 fi
13864 rm -f conftest*
13865
13866 if test $ac_cv_header_stdc = yes; then
13867   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13868 cat > conftest.$ac_ext <<EOF
13869 #line 13870 "configure"
13870 #include "confdefs.h"
13871 #include <string.h>
13872 EOF
13873 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13874   egrep "memchr" >/dev/null 2>&1; then
13875   :
13876 else
13877   rm -rf conftest*
13878   ac_cv_header_stdc=no
13879 fi
13880 rm -f conftest*
13881
13882 fi
13883
13884 if test $ac_cv_header_stdc = yes; then
13885   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13886 cat > conftest.$ac_ext <<EOF
13887 #line 13888 "configure"
13888 #include "confdefs.h"
13889 #include <stdlib.h>
13890 EOF
13891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13892   egrep "free" >/dev/null 2>&1; then
13893   :
13894 else
13895   rm -rf conftest*
13896   ac_cv_header_stdc=no
13897 fi
13898 rm -f conftest*
13899
13900 fi
13901
13902 if test $ac_cv_header_stdc = yes; then
13903   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13904 if test "$cross_compiling" = yes; then
13905   :
13906 else
13907   cat > conftest.$ac_ext <<EOF
13908 #line 13909 "configure"
13909 #include "confdefs.h"
13910 #include <ctype.h>
13911 #if ((' ' & 0x0FF) == 0x020)
13912 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13913 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13914 #else
13915 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13916  || ('j' <= (c) && (c) <= 'r') \
13917  || ('s' <= (c) && (c) <= 'z'))
13918 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13919 #endif
13920 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13921 int main () { int i; for (i = 0; i < 256; i++)
13922 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13923 exit (0); }
13924
13925 EOF
13926 if { (eval echo configure:13927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13927 then
13928   :
13929 else
13930   echo "configure: failed program was:" >&5
13931   cat conftest.$ac_ext >&5
13932   rm -fr conftest*
13933   ac_cv_header_stdc=no
13934 fi
13935 rm -fr conftest*
13936 fi
13937
13938 fi
13939 fi
13940
13941 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13942 if test $ac_cv_header_stdc = yes; then
13943   cat >> confdefs.h <<\EOF
13944 #define STDC_HEADERS 1
13945 EOF
13946
13947 fi
13948
13949 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13950 echo "configure:13951: checking for mode_t" >&5
13951 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13952   echo $ac_n "(cached) $ac_c" 1>&6
13953 else
13954   cat > conftest.$ac_ext <<EOF
13955 #line 13956 "configure"
13956 #include "confdefs.h"
13957 #include <sys/types.h>
13958 #if STDC_HEADERS
13959 #include <stdlib.h>
13960 #include <stddef.h>
13961 #endif
13962
13963 EOF
13964 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13965   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13966   rm -rf conftest*
13967   eval "ac_cv_type_mode_t=yes"
13968 else
13969   rm -rf conftest*
13970   eval "ac_cv_type_mode_t=no"
13971 fi
13972 rm -f conftest*
13973
13974 fi
13975 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13976   echo "$ac_t""yes" 1>&6
13977 else
13978   echo "$ac_t""no" 1>&6
13979   cat >> confdefs.h <<EOF
13980 #define mode_t int
13981 EOF
13982
13983 fi
13984
13985 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13986 echo "configure:13987: checking for off_t" >&5
13987 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13988   echo $ac_n "(cached) $ac_c" 1>&6
13989 else
13990   cat > conftest.$ac_ext <<EOF
13991 #line 13992 "configure"
13992 #include "confdefs.h"
13993 #include <sys/types.h>
13994 #if STDC_HEADERS
13995 #include <stdlib.h>
13996 #include <stddef.h>
13997 #endif
13998
13999 EOF
14000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14001   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14002   rm -rf conftest*
14003   eval "ac_cv_type_off_t=yes"
14004 else
14005   rm -rf conftest*
14006   eval "ac_cv_type_off_t=no"
14007 fi
14008 rm -f conftest*
14009
14010 fi
14011 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14012   echo "$ac_t""yes" 1>&6
14013 else
14014   echo "$ac_t""no" 1>&6
14015   cat >> confdefs.h <<EOF
14016 #define off_t long
14017 EOF
14018
14019 fi
14020
14021 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14022 echo "configure:14023: checking for pid_t" >&5
14023 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14024   echo $ac_n "(cached) $ac_c" 1>&6
14025 else
14026   cat > conftest.$ac_ext <<EOF
14027 #line 14028 "configure"
14028 #include "confdefs.h"
14029 #include <sys/types.h>
14030 #if STDC_HEADERS
14031 #include <stdlib.h>
14032 #include <stddef.h>
14033 #endif
14034
14035 EOF
14036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14037   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14038   rm -rf conftest*
14039   eval "ac_cv_type_pid_t=yes"
14040 else
14041   rm -rf conftest*
14042   eval "ac_cv_type_pid_t=no"
14043 fi
14044 rm -f conftest*
14045
14046 fi
14047 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14048   echo "$ac_t""yes" 1>&6
14049 else
14050   echo "$ac_t""no" 1>&6
14051   cat >> confdefs.h <<EOF
14052 #define pid_t int
14053 EOF
14054
14055 fi
14056
14057 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14058 echo "configure:14059: checking for ptrdiff_t" >&5
14059 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14060   echo $ac_n "(cached) $ac_c" 1>&6
14061 else
14062   cat > conftest.$ac_ext <<EOF
14063 #line 14064 "configure"
14064 #include "confdefs.h"
14065 #include <stddef.h>
14066 int main() {
14067 ptrdiff_t p
14068 ; return 0; }
14069 EOF
14070 if { (eval echo configure:14071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14071   rm -rf conftest*
14072   am_cv_type_ptrdiff_t=yes
14073 else
14074   echo "configure: failed program was:" >&5
14075   cat conftest.$ac_ext >&5
14076   rm -rf conftest*
14077   am_cv_type_ptrdiff_t=no
14078 fi
14079 rm -f conftest*
14080 fi
14081
14082 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14083    if test $am_cv_type_ptrdiff_t = yes; then
14084      cat >> confdefs.h <<\EOF
14085 #define HAVE_PTRDIFF_T 1
14086 EOF
14087
14088    fi
14089
14090 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14091 echo "configure:14092: checking return type of signal handlers" >&5
14092 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14093   echo $ac_n "(cached) $ac_c" 1>&6
14094 else
14095   cat > conftest.$ac_ext <<EOF
14096 #line 14097 "configure"
14097 #include "confdefs.h"
14098 #include <sys/types.h>
14099 #include <signal.h>
14100 #ifdef signal
14101 #undef signal
14102 #endif
14103 #ifdef __cplusplus
14104 extern "C" void (*signal (int, void (*)(int)))(int);
14105 #else
14106 void (*signal ()) ();
14107 #endif
14108
14109 int main() {
14110 int i;
14111 ; return 0; }
14112 EOF
14113 if { (eval echo configure:14114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14114   rm -rf conftest*
14115   ac_cv_type_signal=void
14116 else
14117   echo "configure: failed program was:" >&5
14118   cat conftest.$ac_ext >&5
14119   rm -rf conftest*
14120   ac_cv_type_signal=int
14121 fi
14122 rm -f conftest*
14123 fi
14124
14125 echo "$ac_t""$ac_cv_type_signal" 1>&6
14126 cat >> confdefs.h <<EOF
14127 #define RETSIGTYPE $ac_cv_type_signal
14128 EOF
14129
14130
14131 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14132 echo "configure:14133: checking for size_t" >&5
14133 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14134   echo $ac_n "(cached) $ac_c" 1>&6
14135 else
14136   cat > conftest.$ac_ext <<EOF
14137 #line 14138 "configure"
14138 #include "confdefs.h"
14139 #include <sys/types.h>
14140 #if STDC_HEADERS
14141 #include <stdlib.h>
14142 #include <stddef.h>
14143 #endif
14144
14145 EOF
14146 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14147   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14148   rm -rf conftest*
14149   eval "ac_cv_type_size_t=yes"
14150 else
14151   rm -rf conftest*
14152   eval "ac_cv_type_size_t=no"
14153 fi
14154 rm -f conftest*
14155
14156 fi
14157 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14158   echo "$ac_t""yes" 1>&6
14159 else
14160   echo "$ac_t""no" 1>&6
14161   cat >> confdefs.h <<EOF
14162 #define size_t unsigned
14163 EOF
14164
14165 fi
14166
14167
14168 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14169 echo "configure:14170: checking for ssize_t" >&5
14170 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14171   echo $ac_n "(cached) $ac_c" 1>&6
14172 else
14173   cat > conftest.$ac_ext <<EOF
14174 #line 14175 "configure"
14175 #include "confdefs.h"
14176 #include <sys/types.h>
14177 #if STDC_HEADERS
14178 #include <stdlib.h>
14179 #include <stddef.h>
14180 #endif
14181
14182 EOF
14183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14184   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14185   rm -rf conftest*
14186   eval "ac_cv_type_ssize_t=yes"
14187 else
14188   rm -rf conftest*
14189   eval "ac_cv_type_ssize_t=no"
14190 fi
14191 rm -f conftest*
14192
14193 fi
14194 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14195   echo "$ac_t""yes" 1>&6
14196 else
14197   echo "$ac_t""no" 1>&6
14198   cat >> confdefs.h <<EOF
14199 #define ssize_t signed int
14200 EOF
14201
14202 fi
14203
14204 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14205 echo "configure:14206: checking for caddr_t" >&5
14206 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14207   echo $ac_n "(cached) $ac_c" 1>&6
14208 else
14209   cat > conftest.$ac_ext <<EOF
14210 #line 14211 "configure"
14211 #include "confdefs.h"
14212 #include <sys/types.h>
14213 #if STDC_HEADERS
14214 #include <stdlib.h>
14215 #include <stddef.h>
14216 #endif
14217
14218 EOF
14219 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14220   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14221   rm -rf conftest*
14222   eval "ac_cv_type_caddr_t=yes"
14223 else
14224   rm -rf conftest*
14225   eval "ac_cv_type_caddr_t=no"
14226 fi
14227 rm -f conftest*
14228
14229 fi
14230 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14231   echo "$ac_t""yes" 1>&6
14232 else
14233   echo "$ac_t""no" 1>&6
14234   cat >> confdefs.h <<EOF
14235 #define caddr_t char *
14236 EOF
14237
14238 fi
14239
14240
14241 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14242 echo "configure:14243: checking for socklen_t" >&5
14243 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14244   echo $ac_n "(cached) $ac_c" 1>&6
14245 else
14246   cat > conftest.$ac_ext <<EOF
14247 #line 14248 "configure"
14248 #include "confdefs.h"
14249
14250 #ifdef HAVE_SYS_TYPES_H
14251 #include <sys/types.h>
14252 #endif
14253 #ifdef HAVE_SYS_SOCKET_H
14254 #include <sys/socket.h>
14255 #endif
14256
14257 int main() {
14258 socklen_t len;
14259 ; return 0; }
14260 EOF
14261 if { (eval echo configure:14262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14262   rm -rf conftest*
14263   ol_cv_type_socklen_t=yes
14264 else
14265   echo "configure: failed program was:" >&5
14266   cat conftest.$ac_ext >&5
14267   rm -rf conftest*
14268   ol_cv_type_socklen_t=no
14269 fi
14270 rm -f conftest*
14271 fi
14272
14273 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14274   if test $ol_cv_type_socklen_t = no; then
14275     cat >> confdefs.h <<\EOF
14276 #define socklen_t int
14277 EOF
14278
14279   fi
14280  
14281 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14282 echo "configure:14283: checking for member st_blksize in aggregate type struct stat" >&5
14283 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14284   echo $ac_n "(cached) $ac_c" 1>&6
14285 else
14286   cat > conftest.$ac_ext <<EOF
14287 #line 14288 "configure"
14288 #include "confdefs.h"
14289 #include <sys/types.h>
14290 #include <sys/stat.h>
14291 int main() {
14292 struct stat foo; foo.st_blksize;
14293 ; return 0; }
14294 EOF
14295 if { (eval echo configure:14296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14296   rm -rf conftest*
14297   ac_cv_c_struct_member_st_blksize=yes
14298 else
14299   echo "configure: failed program was:" >&5
14300   cat conftest.$ac_ext >&5
14301   rm -rf conftest*
14302   ac_cv_c_struct_member_st_blksize=no
14303 fi
14304 rm -f conftest*
14305 fi
14306
14307 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14308 st_blksize="$ac_cv_c_struct_member_st_blksize"
14309 if test $ac_cv_c_struct_member_st_blksize = yes; then
14310   cat >> confdefs.h <<\EOF
14311 #define HAVE_ST_BLKSIZE 1
14312 EOF
14313
14314 fi
14315
14316 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14317 echo "configure:14318: checking whether time.h and sys/time.h may both be included" >&5
14318 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14319   echo $ac_n "(cached) $ac_c" 1>&6
14320 else
14321   cat > conftest.$ac_ext <<EOF
14322 #line 14323 "configure"
14323 #include "confdefs.h"
14324 #include <sys/types.h>
14325 #include <sys/time.h>
14326 #include <time.h>
14327 int main() {
14328 struct tm *tp;
14329 ; return 0; }
14330 EOF
14331 if { (eval echo configure:14332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14332   rm -rf conftest*
14333   ac_cv_header_time=yes
14334 else
14335   echo "configure: failed program was:" >&5
14336   cat conftest.$ac_ext >&5
14337   rm -rf conftest*
14338   ac_cv_header_time=no
14339 fi
14340 rm -f conftest*
14341 fi
14342
14343 echo "$ac_t""$ac_cv_header_time" 1>&6
14344 if test $ac_cv_header_time = yes; then
14345   cat >> confdefs.h <<\EOF
14346 #define TIME_WITH_SYS_TIME 1
14347 EOF
14348
14349 fi
14350
14351 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14352 echo "configure:14353: checking whether struct tm is in sys/time.h or time.h" >&5
14353 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14354   echo $ac_n "(cached) $ac_c" 1>&6
14355 else
14356   cat > conftest.$ac_ext <<EOF
14357 #line 14358 "configure"
14358 #include "confdefs.h"
14359 #include <sys/types.h>
14360 #include <time.h>
14361 int main() {
14362 struct tm *tp; tp->tm_sec;
14363 ; return 0; }
14364 EOF
14365 if { (eval echo configure:14366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14366   rm -rf conftest*
14367   ac_cv_struct_tm=time.h
14368 else
14369   echo "configure: failed program was:" >&5
14370   cat conftest.$ac_ext >&5
14371   rm -rf conftest*
14372   ac_cv_struct_tm=sys/time.h
14373 fi
14374 rm -f conftest*
14375 fi
14376
14377 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14378 if test $ac_cv_struct_tm = sys/time.h; then
14379   cat >> confdefs.h <<\EOF
14380 #define TM_IN_SYS_TIME 1
14381 EOF
14382
14383 fi
14384
14385 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14386 echo "configure:14387: checking for uid_t in sys/types.h" >&5
14387 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14388   echo $ac_n "(cached) $ac_c" 1>&6
14389 else
14390   cat > conftest.$ac_ext <<EOF
14391 #line 14392 "configure"
14392 #include "confdefs.h"
14393 #include <sys/types.h>
14394 EOF
14395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14396   egrep "uid_t" >/dev/null 2>&1; then
14397   rm -rf conftest*
14398   ac_cv_type_uid_t=yes
14399 else
14400   rm -rf conftest*
14401   ac_cv_type_uid_t=no
14402 fi
14403 rm -f conftest*
14404
14405 fi
14406
14407 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14408 if test $ac_cv_type_uid_t = no; then
14409   cat >> confdefs.h <<\EOF
14410 #define uid_t int
14411 EOF
14412
14413   cat >> confdefs.h <<\EOF
14414 #define gid_t int
14415 EOF
14416
14417 fi
14418
14419 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14420 echo "configure:14421: checking for sig_atomic_t" >&5
14421 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14422   echo $ac_n "(cached) $ac_c" 1>&6
14423 else
14424   cat > conftest.$ac_ext <<EOF
14425 #line 14426 "configure"
14426 #include "confdefs.h"
14427 #include <signal.h>
14428 int main() {
14429 sig_atomic_t atomic;
14430 ; return 0; }
14431 EOF
14432 if { (eval echo configure:14433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14433   rm -rf conftest*
14434   ol_cv_type_sig_atomic_t=yes
14435 else
14436   echo "configure: failed program was:" >&5
14437   cat conftest.$ac_ext >&5
14438   rm -rf conftest*
14439   ol_cv_type_sig_atomic_t=no
14440 fi
14441 rm -f conftest*
14442 fi
14443
14444 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14445   if test $ol_cv_type_sig_atomic_t = no; then
14446     cat >> confdefs.h <<\EOF
14447 #define sig_atomic_t int
14448 EOF
14449
14450   fi
14451  
14452
14453
14454 # test for pw_gecos in struct passwd
14455 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14456 echo "configure:14457: checking struct passwd for pw_gecos" >&5
14457 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14458   echo $ac_n "(cached) $ac_c" 1>&6
14459 else
14460   
14461         cat > conftest.$ac_ext <<EOF
14462 #line 14463 "configure"
14463 #include "confdefs.h"
14464 #include <pwd.h>
14465 int main() {
14466
14467         struct passwd pwd;
14468         pwd.pw_gecos = pwd.pw_name;
14469
14470 ; return 0; }
14471 EOF
14472 if { (eval echo configure:14473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14473   rm -rf conftest*
14474   ol_cv_struct_passwd_pw_gecos=yes
14475 else
14476   echo "configure: failed program was:" >&5
14477   cat conftest.$ac_ext >&5
14478   rm -rf conftest*
14479   ol_cv_struct_passwd_pw_gecos=no
14480 fi
14481 rm -f conftest*
14482 fi
14483
14484 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14485 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14486         cat >> confdefs.h <<\EOF
14487 #define HAVE_PW_GECOS 1
14488 EOF
14489
14490 fi
14491
14492 # test for pw_passwd in struct passwd
14493 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14494 echo "configure:14495: checking struct passwd for pw_passwd" >&5
14495 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14496   echo $ac_n "(cached) $ac_c" 1>&6
14497 else
14498   
14499         cat > conftest.$ac_ext <<EOF
14500 #line 14501 "configure"
14501 #include "confdefs.h"
14502 #include <pwd.h>
14503 int main() {
14504
14505         struct passwd pwd;
14506         pwd.pw_passwd = pwd.pw_name;
14507
14508 ; return 0; }
14509 EOF
14510 if { (eval echo configure:14511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14511   rm -rf conftest*
14512   ol_cv_struct_passwd_pw_passwd=yes
14513 else
14514   echo "configure: failed program was:" >&5
14515   cat conftest.$ac_ext >&5
14516   rm -rf conftest*
14517   ol_cv_struct_passwd_pw_passwd=no
14518 fi
14519 rm -f conftest*
14520 fi
14521
14522 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14523 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14524         cat >> confdefs.h <<\EOF
14525 #define HAVE_PW_PASSWD 1
14526 EOF
14527
14528 fi
14529
14530
14531 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14532 echo "configure:14533: checking if toupper() requires islower()" >&5
14533 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14534   echo $ac_n "(cached) $ac_c" 1>&6
14535 else
14536   
14537         if test "$cross_compiling" = yes; then
14538   ol_cv_c_upper_lower=safe
14539 else
14540   cat > conftest.$ac_ext <<EOF
14541 #line 14542 "configure"
14542 #include "confdefs.h"
14543
14544 #include <ctype.h>
14545 main()
14546 {
14547         if ('C' == toupper('C'))
14548                 exit(0);
14549         else
14550                 exit(1);
14551 }
14552 EOF
14553 if { (eval echo configure:14554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14554 then
14555   ol_cv_c_upper_lower=no
14556 else
14557   echo "configure: failed program was:" >&5
14558   cat conftest.$ac_ext >&5
14559   rm -fr conftest*
14560   ol_cv_c_upper_lower=yes
14561 fi
14562 rm -fr conftest*
14563 fi
14564
14565 fi
14566
14567 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14568 if test $ol_cv_c_upper_lower != no ; then
14569         cat >> confdefs.h <<\EOF
14570 #define C_UPPER_LOWER 1
14571 EOF
14572
14573 fi
14574
14575 echo $ac_n "checking for working const""... $ac_c" 1>&6
14576 echo "configure:14577: checking for working const" >&5
14577 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14578   echo $ac_n "(cached) $ac_c" 1>&6
14579 else
14580   cat > conftest.$ac_ext <<EOF
14581 #line 14582 "configure"
14582 #include "confdefs.h"
14583
14584 int main() {
14585
14586 /* Ultrix mips cc rejects this.  */
14587 typedef int charset[2]; const charset x;
14588 /* SunOS 4.1.1 cc rejects this.  */
14589 char const *const *ccp;
14590 char **p;
14591 /* NEC SVR4.0.2 mips cc rejects this.  */
14592 struct point {int x, y;};
14593 static struct point const zero = {0,0};
14594 /* AIX XL C 1.02.0.0 rejects this.
14595    It does not let you subtract one const X* pointer from another in an arm
14596    of an if-expression whose if-part is not a constant expression */
14597 const char *g = "string";
14598 ccp = &g + (g ? g-g : 0);
14599 /* HPUX 7.0 cc rejects these. */
14600 ++ccp;
14601 p = (char**) ccp;
14602 ccp = (char const *const *) p;
14603 { /* SCO 3.2v4 cc rejects this.  */
14604   char *t;
14605   char const *s = 0 ? (char *) 0 : (char const *) 0;
14606
14607   *t++ = 0;
14608 }
14609 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14610   int x[] = {25, 17};
14611   const int *foo = &x[0];
14612   ++foo;
14613 }
14614 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14615   typedef const int *iptr;
14616   iptr p = 0;
14617   ++p;
14618 }
14619 { /* AIX XL C 1.02.0.0 rejects this saying
14620      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14621   struct s { int j; const int *ap[3]; };
14622   struct s *b; b->j = 5;
14623 }
14624 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14625   const int foo = 10;
14626 }
14627
14628 ; return 0; }
14629 EOF
14630 if { (eval echo configure:14631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14631   rm -rf conftest*
14632   ac_cv_c_const=yes
14633 else
14634   echo "configure: failed program was:" >&5
14635   cat conftest.$ac_ext >&5
14636   rm -rf conftest*
14637   ac_cv_c_const=no
14638 fi
14639 rm -f conftest*
14640 fi
14641
14642 echo "$ac_t""$ac_cv_c_const" 1>&6
14643 if test $ac_cv_c_const = no; then
14644   cat >> confdefs.h <<\EOF
14645 #define const 
14646 EOF
14647
14648 fi
14649
14650 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14651 echo "configure:14652: checking if compiler understands volatile" >&5
14652 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14653   echo $ac_n "(cached) $ac_c" 1>&6
14654 else
14655   cat > conftest.$ac_ext <<EOF
14656 #line 14657 "configure"
14657 #include "confdefs.h"
14658 int x, y, z;
14659 int main() {
14660 volatile int a; int * volatile b = x ? &y : &z;
14661       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14662       *b = 0;
14663 ; return 0; }
14664 EOF
14665 if { (eval echo configure:14666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14666   rm -rf conftest*
14667   ol_cv_c_volatile=yes
14668 else
14669   echo "configure: failed program was:" >&5
14670   cat conftest.$ac_ext >&5
14671   rm -rf conftest*
14672   ol_cv_c_volatile=no
14673 fi
14674 rm -f conftest*
14675 fi
14676
14677 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14678   if test $ol_cv_c_volatile = yes; then
14679     : 
14680   else
14681     cat >> confdefs.h <<\EOF
14682 #define volatile 
14683 EOF
14684
14685   fi
14686  
14687
14688 if test $cross_compiling = yes ; then
14689         cat >> confdefs.h <<\EOF
14690 #define CROSS_COMPILING 1
14691 EOF
14692
14693 else
14694         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14695 echo "configure:14696: checking whether byte ordering is bigendian" >&5
14696 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14697   echo $ac_n "(cached) $ac_c" 1>&6
14698 else
14699   ac_cv_c_bigendian=unknown
14700 # See if sys/param.h defines the BYTE_ORDER macro.
14701 cat > conftest.$ac_ext <<EOF
14702 #line 14703 "configure"
14703 #include "confdefs.h"
14704 #include <sys/types.h>
14705 #include <sys/param.h>
14706 int main() {
14707
14708 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14709  bogus endian macros
14710 #endif
14711 ; return 0; }
14712 EOF
14713 if { (eval echo configure:14714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14714   rm -rf conftest*
14715   # It does; now see whether it defined to BIG_ENDIAN or not.
14716 cat > conftest.$ac_ext <<EOF
14717 #line 14718 "configure"
14718 #include "confdefs.h"
14719 #include <sys/types.h>
14720 #include <sys/param.h>
14721 int main() {
14722
14723 #if BYTE_ORDER != BIG_ENDIAN
14724  not big endian
14725 #endif
14726 ; return 0; }
14727 EOF
14728 if { (eval echo configure:14729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14729   rm -rf conftest*
14730   ac_cv_c_bigendian=yes
14731 else
14732   echo "configure: failed program was:" >&5
14733   cat conftest.$ac_ext >&5
14734   rm -rf conftest*
14735   ac_cv_c_bigendian=no
14736 fi
14737 rm -f conftest*
14738 else
14739   echo "configure: failed program was:" >&5
14740   cat conftest.$ac_ext >&5
14741 fi
14742 rm -f conftest*
14743 if test $ac_cv_c_bigendian = unknown; then
14744 if test "$cross_compiling" = yes; then
14745     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14746 else
14747   cat > conftest.$ac_ext <<EOF
14748 #line 14749 "configure"
14749 #include "confdefs.h"
14750 main () {
14751   /* Are we little or big endian?  From Harbison&Steele.  */
14752   union
14753   {
14754     long l;
14755     char c[sizeof (long)];
14756   } u;
14757   u.l = 1;
14758   exit (u.c[sizeof (long) - 1] == 1);
14759 }
14760 EOF
14761 if { (eval echo configure:14762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14762 then
14763   ac_cv_c_bigendian=no
14764 else
14765   echo "configure: failed program was:" >&5
14766   cat conftest.$ac_ext >&5
14767   rm -fr conftest*
14768   ac_cv_c_bigendian=yes
14769 fi
14770 rm -fr conftest*
14771 fi
14772
14773 fi
14774 fi
14775
14776 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14777 if test $ac_cv_c_bigendian = yes; then
14778   cat >> confdefs.h <<\EOF
14779 #define WORDS_BIGENDIAN 1
14780 EOF
14781
14782 fi
14783
14784 fi
14785
14786 echo $ac_n "checking size of short""... $ac_c" 1>&6
14787 echo "configure:14788: checking size of short" >&5 
14788 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14789   echo $ac_n "(cached) $ac_c" 1>&6
14790 else
14791   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14792   cat > conftest.$ac_ext <<EOF
14793 #line 14794 "configure"
14794 #include "confdefs.h"
14795 #include "confdefs.h" 
14796 #include <sys/types.h> 
14797  
14798
14799 int main() {
14800 switch (0) case 0: case (sizeof (short) == $ac_size):;
14801 ; return 0; }
14802 EOF
14803 if { (eval echo configure:14804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14804   rm -rf conftest*
14805   ac_cv_sizeof_short=$ac_size
14806 else
14807   echo "configure: failed program was:" >&5
14808   cat conftest.$ac_ext >&5
14809 fi
14810 rm -f conftest* 
14811   if test x$ac_cv_sizeof_short != x ; then break; fi 
14812 done 
14813
14814 fi
14815  
14816 if test x$ac_cv_sizeof_short = x ; then 
14817   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14818 fi 
14819 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14820 cat >> confdefs.h <<EOF
14821 #define SIZEOF_SHORT $ac_cv_sizeof_short
14822 EOF
14823  
14824  
14825 echo $ac_n "checking size of int""... $ac_c" 1>&6
14826 echo "configure:14827: checking size of int" >&5 
14827 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14828   echo $ac_n "(cached) $ac_c" 1>&6
14829 else
14830   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14831   cat > conftest.$ac_ext <<EOF
14832 #line 14833 "configure"
14833 #include "confdefs.h"
14834 #include "confdefs.h" 
14835 #include <sys/types.h> 
14836  
14837
14838 int main() {
14839 switch (0) case 0: case (sizeof (int) == $ac_size):;
14840 ; return 0; }
14841 EOF
14842 if { (eval echo configure:14843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14843   rm -rf conftest*
14844   ac_cv_sizeof_int=$ac_size
14845 else
14846   echo "configure: failed program was:" >&5
14847   cat conftest.$ac_ext >&5
14848 fi
14849 rm -f conftest* 
14850   if test x$ac_cv_sizeof_int != x ; then break; fi 
14851 done 
14852
14853 fi
14854  
14855 if test x$ac_cv_sizeof_int = x ; then 
14856   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14857 fi 
14858 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14859 cat >> confdefs.h <<EOF
14860 #define SIZEOF_INT $ac_cv_sizeof_int
14861 EOF
14862  
14863  
14864 echo $ac_n "checking size of long""... $ac_c" 1>&6
14865 echo "configure:14866: checking size of long" >&5 
14866 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14867   echo $ac_n "(cached) $ac_c" 1>&6
14868 else
14869   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14870   cat > conftest.$ac_ext <<EOF
14871 #line 14872 "configure"
14872 #include "confdefs.h"
14873 #include "confdefs.h" 
14874 #include <sys/types.h> 
14875  
14876
14877 int main() {
14878 switch (0) case 0: case (sizeof (long) == $ac_size):;
14879 ; return 0; }
14880 EOF
14881 if { (eval echo configure:14882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14882   rm -rf conftest*
14883   ac_cv_sizeof_long=$ac_size
14884 else
14885   echo "configure: failed program was:" >&5
14886   cat conftest.$ac_ext >&5
14887 fi
14888 rm -f conftest* 
14889   if test x$ac_cv_sizeof_long != x ; then break; fi 
14890 done 
14891
14892 fi
14893  
14894 if test x$ac_cv_sizeof_long = x ; then 
14895   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14896 fi 
14897 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14898 cat >> confdefs.h <<EOF
14899 #define SIZEOF_LONG $ac_cv_sizeof_long
14900 EOF
14901  
14902
14903
14904 if test "$ac_cv_sizeof_int" -lt 4 ; then
14905         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14906
14907         cat >> confdefs.h <<\EOF
14908 #define LBER_INT_T long
14909 EOF
14910
14911 else
14912         cat >> confdefs.h <<\EOF
14913 #define LBER_INT_T int
14914 EOF
14915
14916 fi
14917
14918 cat >> confdefs.h <<\EOF
14919 #define LBER_LEN_T long
14920 EOF
14921
14922 cat >> confdefs.h <<\EOF
14923 #define LBER_SOCKET_T int
14924 EOF
14925
14926 cat >> confdefs.h <<\EOF
14927 #define LBER_TAG_T long
14928 EOF
14929
14930
14931 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14932 echo "configure:14933: checking for 8-bit clean memcmp" >&5
14933 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14934   echo $ac_n "(cached) $ac_c" 1>&6
14935 else
14936   if test "$cross_compiling" = yes; then
14937   ac_cv_func_memcmp_clean=no
14938 else
14939   cat > conftest.$ac_ext <<EOF
14940 #line 14941 "configure"
14941 #include "confdefs.h"
14942
14943 main()
14944 {
14945   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14946   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14947 }
14948
14949 EOF
14950 if { (eval echo configure:14951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14951 then
14952   ac_cv_func_memcmp_clean=yes
14953 else
14954   echo "configure: failed program was:" >&5
14955   cat conftest.$ac_ext >&5
14956   rm -fr conftest*
14957   ac_cv_func_memcmp_clean=no
14958 fi
14959 rm -fr conftest*
14960 fi
14961
14962 fi
14963
14964 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14965 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14966
14967 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14968 echo "configure:14969: checking for strftime" >&5
14969 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14970   echo $ac_n "(cached) $ac_c" 1>&6
14971 else
14972   cat > conftest.$ac_ext <<EOF
14973 #line 14974 "configure"
14974 #include "confdefs.h"
14975 /* System header to define __stub macros and hopefully few prototypes,
14976     which can conflict with char strftime(); below.  */
14977 #include <assert.h>
14978 /* Override any gcc2 internal prototype to avoid an error.  */
14979 /* We use char because int might match the return type of a gcc2
14980     builtin and then its argument prototype would still apply.  */
14981 char strftime();
14982 char (*f)();
14983
14984 int main() {
14985
14986 /* The GNU C library defines this for functions which it implements
14987     to always fail with ENOSYS.  Some functions are actually named
14988     something starting with __ and the normal name is an alias.  */
14989 #if defined (__stub_strftime) || defined (__stub___strftime)
14990 choke me
14991 #else
14992 f = strftime;
14993 #endif
14994
14995 ; return 0; }
14996 EOF
14997 if { (eval echo configure:14998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14998   rm -rf conftest*
14999   eval "ac_cv_func_strftime=yes"
15000 else
15001   echo "configure: failed program was:" >&5
15002   cat conftest.$ac_ext >&5
15003   rm -rf conftest*
15004   eval "ac_cv_func_strftime=no"
15005 fi
15006 rm -f conftest*
15007 fi
15008
15009 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15010   echo "$ac_t""yes" 1>&6
15011   cat >> confdefs.h <<\EOF
15012 #define HAVE_STRFTIME 1
15013 EOF
15014
15015 else
15016   echo "$ac_t""no" 1>&6
15017 # strftime is in -lintl on SCO UNIX.
15018 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15019 echo "configure:15020: checking for strftime in -lintl" >&5
15020 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15022   echo $ac_n "(cached) $ac_c" 1>&6
15023 else
15024   ac_save_LIBS="$LIBS"
15025 LIBS="-lintl  $LIBS"
15026 cat > conftest.$ac_ext <<EOF
15027 #line 15028 "configure"
15028 #include "confdefs.h"
15029 /* Override any gcc2 internal prototype to avoid an error.  */
15030 /* We use char because int might match the return type of a gcc2
15031     builtin and then its argument prototype would still apply.  */
15032 char strftime();
15033
15034 int main() {
15035 strftime()
15036 ; return 0; }
15037 EOF
15038 if { (eval echo configure:15039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15039   rm -rf conftest*
15040   eval "ac_cv_lib_$ac_lib_var=yes"
15041 else
15042   echo "configure: failed program was:" >&5
15043   cat conftest.$ac_ext >&5
15044   rm -rf conftest*
15045   eval "ac_cv_lib_$ac_lib_var=no"
15046 fi
15047 rm -f conftest*
15048 LIBS="$ac_save_LIBS"
15049
15050 fi
15051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15052   echo "$ac_t""yes" 1>&6
15053   cat >> confdefs.h <<\EOF
15054 #define HAVE_STRFTIME 1
15055 EOF
15056
15057 LIBS="-lintl $LIBS"
15058 else
15059   echo "$ac_t""no" 1>&6
15060 fi
15061
15062 fi
15063
15064
15065 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15066 echo "configure:15067: checking for inet_aton()" >&5
15067 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15068   echo $ac_n "(cached) $ac_c" 1>&6
15069 else
15070   cat > conftest.$ac_ext <<EOF
15071 #line 15072 "configure"
15072 #include "confdefs.h"
15073
15074 #ifdef HAVE_SYS_TYPES_H
15075 #       include <sys/types.h>
15076 #endif
15077 #ifdef HAVE_SYS_SOCKET_H
15078 #       include <sys/socket.h>
15079 #       ifdef HAVE_SYS_SELECT_H
15080 #               include <sys/select.h>
15081 #       endif
15082 #       include <netinet/in.h>
15083 #       ifdef HAVE_ARPA_INET_H
15084 #               include <arpa/inet.h>
15085 #       endif
15086 #endif
15087
15088 int main() {
15089 struct in_addr in;
15090 int rc = inet_aton( "255.255.255.255", &in );
15091 ; return 0; }
15092 EOF
15093 if { (eval echo configure:15094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15094   rm -rf conftest*
15095   ol_cv_func_inet_aton=yes
15096 else
15097   echo "configure: failed program was:" >&5
15098   cat conftest.$ac_ext >&5
15099   rm -rf conftest*
15100   ol_cv_func_inet_aton=no
15101 fi
15102 rm -f conftest*
15103 fi
15104
15105 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15106   if test $ol_cv_func_inet_aton != no; then
15107     cat >> confdefs.h <<\EOF
15108 #define HAVE_INET_ATON 1
15109 EOF
15110
15111   fi
15112  
15113
15114 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15115 echo "configure:15116: checking for _spawnlp" >&5
15116 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15117   echo $ac_n "(cached) $ac_c" 1>&6
15118 else
15119   cat > conftest.$ac_ext <<EOF
15120 #line 15121 "configure"
15121 #include "confdefs.h"
15122 /* System header to define __stub macros and hopefully few prototypes,
15123     which can conflict with char _spawnlp(); below.  */
15124 #include <assert.h>
15125 /* Override any gcc2 internal prototype to avoid an error.  */
15126 /* We use char because int might match the return type of a gcc2
15127     builtin and then its argument prototype would still apply.  */
15128 char _spawnlp();
15129 char (*f)();
15130
15131 int main() {
15132
15133 /* The GNU C library defines this for functions which it implements
15134     to always fail with ENOSYS.  Some functions are actually named
15135     something starting with __ and the normal name is an alias.  */
15136 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15137 choke me
15138 #else
15139 f = _spawnlp;
15140 #endif
15141
15142 ; return 0; }
15143 EOF
15144 if { (eval echo configure:15145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15145   rm -rf conftest*
15146   eval "ac_cv_func__spawnlp=yes"
15147 else
15148   echo "configure: failed program was:" >&5
15149   cat conftest.$ac_ext >&5
15150   rm -rf conftest*
15151   eval "ac_cv_func__spawnlp=no"
15152 fi
15153 rm -f conftest*
15154 fi
15155
15156 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15157   echo "$ac_t""yes" 1>&6
15158   cat >> confdefs.h <<\EOF
15159 #define HAVE_SPAWNLP 1
15160 EOF
15161
15162 else
15163   echo "$ac_t""no" 1>&6
15164 fi
15165
15166
15167 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15168 echo "configure:15169: checking for _snprintf" >&5
15169 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15170   echo $ac_n "(cached) $ac_c" 1>&6
15171 else
15172   cat > conftest.$ac_ext <<EOF
15173 #line 15174 "configure"
15174 #include "confdefs.h"
15175 /* System header to define __stub macros and hopefully few prototypes,
15176     which can conflict with char _snprintf(); below.  */
15177 #include <assert.h>
15178 /* Override any gcc2 internal prototype to avoid an error.  */
15179 /* We use char because int might match the return type of a gcc2
15180     builtin and then its argument prototype would still apply.  */
15181 char _snprintf();
15182 char (*f)();
15183
15184 int main() {
15185
15186 /* The GNU C library defines this for functions which it implements
15187     to always fail with ENOSYS.  Some functions are actually named
15188     something starting with __ and the normal name is an alias.  */
15189 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15190 choke me
15191 #else
15192 f = _snprintf;
15193 #endif
15194
15195 ; return 0; }
15196 EOF
15197 if { (eval echo configure:15198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15198   rm -rf conftest*
15199   eval "ac_cv_func__snprintf=yes"
15200 else
15201   echo "configure: failed program was:" >&5
15202   cat conftest.$ac_ext >&5
15203   rm -rf conftest*
15204   eval "ac_cv_func__snprintf=no"
15205 fi
15206 rm -f conftest*
15207 fi
15208
15209 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15210   echo "$ac_t""yes" 1>&6
15211   ac_cv_func_snprintf=yes
15212         cat >> confdefs.h <<\EOF
15213 #define snprintf _snprintf
15214 EOF
15215
15216
15217 else
15218   echo "$ac_t""no" 1>&6
15219 fi
15220
15221
15222 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15223 echo "configure:15224: checking for _vsnprintf" >&5
15224 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15225   echo $ac_n "(cached) $ac_c" 1>&6
15226 else
15227   cat > conftest.$ac_ext <<EOF
15228 #line 15229 "configure"
15229 #include "confdefs.h"
15230 /* System header to define __stub macros and hopefully few prototypes,
15231     which can conflict with char _vsnprintf(); below.  */
15232 #include <assert.h>
15233 /* Override any gcc2 internal prototype to avoid an error.  */
15234 /* We use char because int might match the return type of a gcc2
15235     builtin and then its argument prototype would still apply.  */
15236 char _vsnprintf();
15237 char (*f)();
15238
15239 int main() {
15240
15241 /* The GNU C library defines this for functions which it implements
15242     to always fail with ENOSYS.  Some functions are actually named
15243     something starting with __ and the normal name is an alias.  */
15244 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15245 choke me
15246 #else
15247 f = _vsnprintf;
15248 #endif
15249
15250 ; return 0; }
15251 EOF
15252 if { (eval echo configure:15253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15253   rm -rf conftest*
15254   eval "ac_cv_func__vsnprintf=yes"
15255 else
15256   echo "configure: failed program was:" >&5
15257   cat conftest.$ac_ext >&5
15258   rm -rf conftest*
15259   eval "ac_cv_func__vsnprintf=no"
15260 fi
15261 rm -f conftest*
15262 fi
15263
15264 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15265   echo "$ac_t""yes" 1>&6
15266   ac_cv_func_vsnprintf=yes
15267         cat >> confdefs.h <<\EOF
15268 #define vsnprintf _vsnprintf
15269 EOF
15270
15271
15272 else
15273   echo "$ac_t""no" 1>&6
15274 fi
15275
15276
15277 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15278 echo "configure:15279: checking for vprintf" >&5
15279 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15280   echo $ac_n "(cached) $ac_c" 1>&6
15281 else
15282   cat > conftest.$ac_ext <<EOF
15283 #line 15284 "configure"
15284 #include "confdefs.h"
15285 /* System header to define __stub macros and hopefully few prototypes,
15286     which can conflict with char vprintf(); below.  */
15287 #include <assert.h>
15288 /* Override any gcc2 internal prototype to avoid an error.  */
15289 /* We use char because int might match the return type of a gcc2
15290     builtin and then its argument prototype would still apply.  */
15291 char vprintf();
15292 char (*f)();
15293
15294 int main() {
15295
15296 /* The GNU C library defines this for functions which it implements
15297     to always fail with ENOSYS.  Some functions are actually named
15298     something starting with __ and the normal name is an alias.  */
15299 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15300 choke me
15301 #else
15302 f = vprintf;
15303 #endif
15304
15305 ; return 0; }
15306 EOF
15307 if { (eval echo configure:15308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15308   rm -rf conftest*
15309   eval "ac_cv_func_vprintf=yes"
15310 else
15311   echo "configure: failed program was:" >&5
15312   cat conftest.$ac_ext >&5
15313   rm -rf conftest*
15314   eval "ac_cv_func_vprintf=no"
15315 fi
15316 rm -f conftest*
15317 fi
15318
15319 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15320   echo "$ac_t""yes" 1>&6
15321   cat >> confdefs.h <<\EOF
15322 #define HAVE_VPRINTF 1
15323 EOF
15324
15325 else
15326   echo "$ac_t""no" 1>&6
15327 fi
15328
15329 if test "$ac_cv_func_vprintf" != yes; then
15330 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15331 echo "configure:15332: checking for _doprnt" >&5
15332 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15333   echo $ac_n "(cached) $ac_c" 1>&6
15334 else
15335   cat > conftest.$ac_ext <<EOF
15336 #line 15337 "configure"
15337 #include "confdefs.h"
15338 /* System header to define __stub macros and hopefully few prototypes,
15339     which can conflict with char _doprnt(); below.  */
15340 #include <assert.h>
15341 /* Override any gcc2 internal prototype to avoid an error.  */
15342 /* We use char because int might match the return type of a gcc2
15343     builtin and then its argument prototype would still apply.  */
15344 char _doprnt();
15345 char (*f)();
15346
15347 int main() {
15348
15349 /* The GNU C library defines this for functions which it implements
15350     to always fail with ENOSYS.  Some functions are actually named
15351     something starting with __ and the normal name is an alias.  */
15352 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15353 choke me
15354 #else
15355 f = _doprnt;
15356 #endif
15357
15358 ; return 0; }
15359 EOF
15360 if { (eval echo configure:15361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15361   rm -rf conftest*
15362   eval "ac_cv_func__doprnt=yes"
15363 else
15364   echo "configure: failed program was:" >&5
15365   cat conftest.$ac_ext >&5
15366   rm -rf conftest*
15367   eval "ac_cv_func__doprnt=no"
15368 fi
15369 rm -f conftest*
15370 fi
15371
15372 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15373   echo "$ac_t""yes" 1>&6
15374   cat >> confdefs.h <<\EOF
15375 #define HAVE_DOPRNT 1
15376 EOF
15377
15378 else
15379   echo "$ac_t""no" 1>&6
15380 fi
15381
15382 fi
15383
15384
15385 if test $ac_cv_func_vprintf = yes ; then
15386                 for ac_func in vsnprintf vsprintf
15387 do
15388 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15389 echo "configure:15390: checking for $ac_func" >&5
15390 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15391   echo $ac_n "(cached) $ac_c" 1>&6
15392 else
15393   cat > conftest.$ac_ext <<EOF
15394 #line 15395 "configure"
15395 #include "confdefs.h"
15396 /* System header to define __stub macros and hopefully few prototypes,
15397     which can conflict with char $ac_func(); below.  */
15398 #include <assert.h>
15399 /* Override any gcc2 internal prototype to avoid an error.  */
15400 /* We use char because int might match the return type of a gcc2
15401     builtin and then its argument prototype would still apply.  */
15402 char $ac_func();
15403 char (*f)();
15404
15405 int main() {
15406
15407 /* The GNU C library defines this for functions which it implements
15408     to always fail with ENOSYS.  Some functions are actually named
15409     something starting with __ and the normal name is an alias.  */
15410 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15411 choke me
15412 #else
15413 f = $ac_func;
15414 #endif
15415
15416 ; return 0; }
15417 EOF
15418 if { (eval echo configure:15419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15419   rm -rf conftest*
15420   eval "ac_cv_func_$ac_func=yes"
15421 else
15422   echo "configure: failed program was:" >&5
15423   cat conftest.$ac_ext >&5
15424   rm -rf conftest*
15425   eval "ac_cv_func_$ac_func=no"
15426 fi
15427 rm -f conftest*
15428 fi
15429
15430 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15431   echo "$ac_t""yes" 1>&6
15432     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15433   cat >> confdefs.h <<EOF
15434 #define $ac_tr_func 1
15435 EOF
15436  
15437 else
15438   echo "$ac_t""no" 1>&6
15439 fi
15440 done
15441
15442 fi
15443
15444 for ac_func in \
15445         bcopy                   \
15446         closesocket             \
15447         chroot                  \
15448         endgrent                \
15449         endpwent                \
15450         flock                   \
15451         getdtablesize   \
15452         getgrgid                \
15453         gethostname             \
15454         getpass                 \
15455         getpassphrase   \
15456         getpwuid                \
15457         getpwnam                \
15458         getspnam                \
15459         gettimeofday    \
15460         initgroups              \
15461         lockf                   \
15462         memcpy                  \
15463         memmove                 \
15464         mkstemp                 \
15465         pipe                    \
15466         read                    \
15467         recv                    \
15468         recvfrom                \
15469         setpwfile               \
15470         setgid                  \
15471         setegid                 \
15472         setsid                  \
15473         setuid                  \
15474         seteuid                 \
15475         sigaction               \
15476         signal                  \
15477         sigset                  \
15478         snprintf                \
15479         strdup                  \
15480         strerror                \
15481         strpbrk                 \
15482         strrchr                 \
15483         strsep                  \
15484         strstr                  \
15485         strtol                  \
15486         strtoul                 \
15487         strspn                  \
15488         sysconf                 \
15489         waitpid                 \
15490         wait4                   \
15491         write                   \
15492         send                    \
15493         sendto                  \
15494
15495 do
15496 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15497 echo "configure:15498: checking for $ac_func" >&5
15498 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15499   echo $ac_n "(cached) $ac_c" 1>&6
15500 else
15501   cat > conftest.$ac_ext <<EOF
15502 #line 15503 "configure"
15503 #include "confdefs.h"
15504 /* System header to define __stub macros and hopefully few prototypes,
15505     which can conflict with char $ac_func(); below.  */
15506 #include <assert.h>
15507 /* Override any gcc2 internal prototype to avoid an error.  */
15508 /* We use char because int might match the return type of a gcc2
15509     builtin and then its argument prototype would still apply.  */
15510 char $ac_func();
15511 char (*f)();
15512
15513 int main() {
15514
15515 /* The GNU C library defines this for functions which it implements
15516     to always fail with ENOSYS.  Some functions are actually named
15517     something starting with __ and the normal name is an alias.  */
15518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15519 choke me
15520 #else
15521 f = $ac_func;
15522 #endif
15523
15524 ; return 0; }
15525 EOF
15526 if { (eval echo configure:15527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15527   rm -rf conftest*
15528   eval "ac_cv_func_$ac_func=yes"
15529 else
15530   echo "configure: failed program was:" >&5
15531   cat conftest.$ac_ext >&5
15532   rm -rf conftest*
15533   eval "ac_cv_func_$ac_func=no"
15534 fi
15535 rm -f conftest*
15536 fi
15537
15538 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15539   echo "$ac_t""yes" 1>&6
15540     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15541   cat >> confdefs.h <<EOF
15542 #define $ac_tr_func 1
15543 EOF
15544  
15545 else
15546   echo "$ac_t""no" 1>&6
15547 fi
15548 done
15549
15550
15551 for ac_func in getopt tempnam
15552 do
15553 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15554 echo "configure:15555: checking for $ac_func" >&5
15555 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15556   echo $ac_n "(cached) $ac_c" 1>&6
15557 else
15558   cat > conftest.$ac_ext <<EOF
15559 #line 15560 "configure"
15560 #include "confdefs.h"
15561 /* System header to define __stub macros and hopefully few prototypes,
15562     which can conflict with char $ac_func(); below.  */
15563 #include <assert.h>
15564 /* Override any gcc2 internal prototype to avoid an error.  */
15565 /* We use char because int might match the return type of a gcc2
15566     builtin and then its argument prototype would still apply.  */
15567 char $ac_func();
15568 char (*f)();
15569
15570 int main() {
15571
15572 /* The GNU C library defines this for functions which it implements
15573     to always fail with ENOSYS.  Some functions are actually named
15574     something starting with __ and the normal name is an alias.  */
15575 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15576 choke me
15577 #else
15578 f = $ac_func;
15579 #endif
15580
15581 ; return 0; }
15582 EOF
15583 if { (eval echo configure:15584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15584   rm -rf conftest*
15585   eval "ac_cv_func_$ac_func=yes"
15586 else
15587   echo "configure: failed program was:" >&5
15588   cat conftest.$ac_ext >&5
15589   rm -rf conftest*
15590   eval "ac_cv_func_$ac_func=no"
15591 fi
15592 rm -f conftest*
15593 fi
15594
15595 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15596   echo "$ac_t""yes" 1>&6
15597     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15598   cat >> confdefs.h <<EOF
15599 #define $ac_tr_func 1
15600 EOF
15601  
15602 else
15603   echo "$ac_t""no" 1>&6
15604 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15605 fi
15606 done
15607
15608
15609
15610 if test "$ac_cv_func_getopt" != yes; then
15611     LIBSRCS="$LIBSRCS getopt.c"
15612 fi
15613
15614 if test "$ac_cv_func_tempnam" != yes; then
15615     LIBSRCS="$LIBSRCS tempnam.c"
15616 fi
15617
15618 # Check Configuration
15619 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15620 echo "configure:15621: checking declaration of sys_errlist" >&5
15621 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15622   echo $ac_n "(cached) $ac_c" 1>&6
15623 else
15624   
15625         cat > conftest.$ac_ext <<EOF
15626 #line 15627 "configure"
15627 #include "confdefs.h"
15628
15629 #include <stdio.h>
15630 #include <sys/types.h>
15631 #include <errno.h>
15632 #ifdef WINNT
15633 #include <stdlib.h>
15634 #endif 
15635 int main() {
15636 char *c = (char *) *sys_errlist
15637 ; return 0; }
15638 EOF
15639 if { (eval echo configure:15640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15640   rm -rf conftest*
15641   ol_cv_dcl_sys_errlist=yes
15642         ol_cv_have_sys_errlist=yes
15643 else
15644   echo "configure: failed program was:" >&5
15645   cat conftest.$ac_ext >&5
15646   rm -rf conftest*
15647   ol_cv_dcl_sys_errlist=no
15648 fi
15649 rm -f conftest*
15650 fi
15651
15652 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15653 #
15654 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15655 if test $ol_cv_dcl_sys_errlist = no ; then
15656         cat >> confdefs.h <<\EOF
15657 #define DECL_SYS_ERRLIST 1
15658 EOF
15659
15660
15661         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15662 echo "configure:15663: checking existence of sys_errlist" >&5
15663 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15664   echo $ac_n "(cached) $ac_c" 1>&6
15665 else
15666   
15667                 cat > conftest.$ac_ext <<EOF
15668 #line 15669 "configure"
15669 #include "confdefs.h"
15670 #include <errno.h>
15671 int main() {
15672 char *c = (char *) *sys_errlist
15673 ; return 0; }
15674 EOF
15675 if { (eval echo configure:15676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15676   rm -rf conftest*
15677   ol_cv_have_sys_errlist=yes
15678 else
15679   echo "configure: failed program was:" >&5
15680   cat conftest.$ac_ext >&5
15681   rm -rf conftest*
15682   ol_cv_have_sys_errlist=no
15683 fi
15684 rm -f conftest*
15685 fi
15686
15687 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15688 fi
15689 if test $ol_cv_have_sys_errlist = yes ; then
15690         cat >> confdefs.h <<\EOF
15691 #define HAVE_SYS_ERRLIST 1
15692 EOF
15693
15694 fi
15695
15696
15697
15698 if test "$ol_enable_debug" != no ; then
15699         cat >> confdefs.h <<\EOF
15700 #define LDAP_DEBUG 1
15701 EOF
15702
15703 fi
15704 if test "$ol_enable_syslog" = yes ; then
15705         cat >> confdefs.h <<\EOF
15706 #define LDAP_SYSLOG 1
15707 EOF
15708
15709 fi
15710 if test "$ol_enable_libui" = yes ; then
15711         cat >> confdefs.h <<\EOF
15712 #define LDAP_LIBUI 1
15713 EOF
15714
15715 fi
15716 if test "$ol_enable_cache" = no ; then
15717         cat >> confdefs.h <<\EOF
15718 #define LDAP_NOCACHE 1
15719 EOF
15720
15721 fi
15722 if test "$ol_link_kbind" != no ; then
15723         cat >> confdefs.h <<\EOF
15724 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15725 EOF
15726
15727 fi
15728 if test "$ol_enable_proctitle" != no ; then
15729         cat >> confdefs.h <<\EOF
15730 #define LDAP_PROCTITLE 1
15731 EOF
15732
15733 fi
15734 if test "$ol_enable_referrals" != no ; then
15735         cat >> confdefs.h <<\EOF
15736 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15737 EOF
15738
15739 fi
15740 if test "$ol_enable_cldap" != no ; then
15741         cat >> confdefs.h <<\EOF
15742 #define LDAP_CONNECTIONLESS 1
15743 EOF
15744
15745 fi
15746 if test "$ol_enable_ldapi" != no; then
15747         cat >> confdefs.h <<\EOF
15748 #define USE_PF_LOCAL 1
15749 EOF
15750
15751 fi
15752
15753 if test "$ol_enable_cleartext" != no ; then
15754         cat >> confdefs.h <<\EOF
15755 #define SLAPD_CLEARTEXT 1
15756 EOF
15757
15758 fi
15759 if test "$ol_enable_crypt" != no ; then
15760         cat >> confdefs.h <<\EOF
15761 #define SLAPD_CRYPT 1
15762 EOF
15763
15764 fi
15765 if test "$ol_link_kpasswd" != no ; then
15766         cat >> confdefs.h <<\EOF
15767 #define SLAPD_KPASSWD 1
15768 EOF
15769
15770 fi
15771 if test "$ol_link_spasswd" != no ; then
15772         cat >> confdefs.h <<\EOF
15773 #define SLAPD_SPASSWD 1
15774 EOF
15775
15776 fi
15777 if test "$ol_enable_multimaster" != no ; then
15778         cat >> confdefs.h <<\EOF
15779 #define SLAPD_MULTIMASTER 1
15780 EOF
15781
15782 fi
15783 if test "$ol_enable_phonetic" != no ; then
15784         cat >> confdefs.h <<\EOF
15785 #define SLAPD_PHONETIC 1
15786 EOF
15787
15788 fi
15789 if test "$ol_enable_rlookups" != no ; then
15790         cat >> confdefs.h <<\EOF
15791 #define SLAPD_RLOOKUPS 1
15792 EOF
15793
15794 fi
15795 if test "$ol_enable_aci" != no ; then
15796         cat >> confdefs.h <<\EOF
15797 #define SLAPD_ACI_ENABLED 1
15798 EOF
15799
15800 fi
15801
15802 if test "$ol_link_modules" != no ; then
15803         cat >> confdefs.h <<\EOF
15804 #define SLAPD_MODULES 1
15805 EOF
15806
15807         BUILD_SLAPD=yes
15808         SLAPD_MODULES_LDFLAGS="-dlopen self"
15809 fi
15810
15811 if test "$ol_link_bdb2" != no ; then
15812         cat >> confdefs.h <<\EOF
15813 #define SLAPD_BDB2 1
15814 EOF
15815
15816         BUILD_SLAPD=yes
15817         BUILD_BDB2=yes
15818         if test "$ol_with_bdb2_module" != static ; then
15819                 cat >> confdefs.h <<\EOF
15820 #define SLAPD_BDB2_DYNAMIC 1
15821 EOF
15822
15823                 BUILD_BDB2=mod
15824                 BUILD_BDB2_DYNAMIC=shared
15825                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15826         fi
15827 fi
15828
15829 if test "$ol_enable_dnssrv" != no ; then
15830         cat >> confdefs.h <<\EOF
15831 #define SLAPD_DNSSRV 1
15832 EOF
15833
15834         BUILD_SLAPD=yes
15835         BUILD_DNSSRV=yes
15836         if test "$ol_with_dnssrv_module" != static ; then
15837                 cat >> confdefs.h <<\EOF
15838 #define SLAPD_DNSSRV_DYNAMIC 1
15839 EOF
15840
15841                 BUILD_DNSSRV=mod
15842                 BUILD_DNSSRV_DYNAMIC=shared
15843                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15844         fi
15845 fi
15846
15847 if test "$ol_enable_ldap" != no ; then
15848         cat >> confdefs.h <<\EOF
15849 #define SLAPD_LDAP 1
15850 EOF
15851
15852         BUILD_SLAPD=yes
15853         BUILD_LDAP=yes
15854         if test "$ol_with_ldap_module" != static ; then
15855                 cat >> confdefs.h <<\EOF
15856 #define SLAPD_LDAP_DYNAMIC 1
15857 EOF
15858
15859                 BUILD_LDAP=mod
15860                 BUILD_LDAP_DYNAMIC=shared
15861                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15862         fi
15863 fi
15864
15865 if test "$ol_link_ldbm" != no ; then
15866         cat >> confdefs.h <<\EOF
15867 #define SLAPD_LDBM 1
15868 EOF
15869
15870         BUILD_SLAPD=yes
15871         BUILD_LDBM=yes
15872         if test "$ol_with_ldbm_module" != static ; then
15873                 cat >> confdefs.h <<\EOF
15874 #define SLAPD_LDBM_DYNAMIC 1
15875 EOF
15876
15877                 BUILD_LDBM=mod
15878                 BUILD_LDBM_DYNAMIC=shared
15879                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15880         fi
15881 fi
15882
15883 if test "$ol_enable_passwd" != no ; then
15884         cat >> confdefs.h <<\EOF
15885 #define SLAPD_PASSWD 1
15886 EOF
15887
15888         BUILD_SLAPD=yes
15889         BUILD_PASSWD=yes
15890         if test "$ol_with_passwd_module" != static ; then
15891                 cat >> confdefs.h <<\EOF
15892 #define SLAPD_PASSWD_DYNAMIC 1
15893 EOF
15894
15895                 BUILD_PASSWD=mod
15896                 BUILD_PASSWD_DYNAMIC=shared
15897                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15898         fi
15899 fi
15900
15901 if test "$ol_link_perl" != no ; then
15902         cat >> confdefs.h <<\EOF
15903 #define SLAPD_PERL 1
15904 EOF
15905
15906         BUILD_SLAPD=yes
15907         BUILD_PERL=yes
15908         if test "$ol_with_perl_module" != static ; then
15909                 cat >> confdefs.h <<\EOF
15910 #define SLAPD_PERL_DYNAMIC 1
15911 EOF
15912
15913                 BUILD_PERL=mod
15914                 BUILD_PERL_DYNAMIC=shared
15915                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15916         fi
15917 fi
15918
15919 if test "$ol_enable_shell" != no ; then
15920         cat >> confdefs.h <<\EOF
15921 #define SLAPD_SHELL 1
15922 EOF
15923
15924         BUILD_SLAPD=yes
15925         BUILD_SHELL=yes
15926         if test "$ol_with_shell_module" != static ; then
15927                 cat >> confdefs.h <<\EOF
15928 #define SLAPD_SHELL_DYNAMIC 1
15929 EOF
15930
15931                 BUILD_SHELL=mod
15932                 BUILD_SHELL_DYNAMIC=shared
15933                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15934         fi
15935 fi
15936
15937 if test "$ol_enable_tcl" != no ; then
15938         cat >> confdefs.h <<\EOF
15939 #define SLAPD_TCL 1
15940 EOF
15941
15942         BUILD_SLAPD=yes
15943         BUILD_TCL=yes
15944         if test "$ol_with_tcl_module" != static; then
15945                 cat >> confdefs.h <<\EOF
15946 #define SLAPD_TCL_DYNAMIC 1
15947 EOF
15948
15949                 BUILD_TCL=mod
15950                 BUILD_TCL_DYNAMIC=shared
15951                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15952         fi
15953 fi
15954
15955 if test "$ol_enable_sql" != no ; then
15956         cat >> confdefs.h <<\EOF
15957 #define SLAPD_SQL 1
15958 EOF
15959
15960         BUILD_SLAPD=yes
15961         BUILD_SQL=yes
15962         SLAPD_SQL_LIBS=-liodbc
15963         if test "$ol_with_sql_module" != static; then
15964                 cat >> confdefs.h <<\EOF
15965 #define SLAPD_SQL_DYNAMIC 1
15966 EOF
15967
15968                 BUILD_SQL=mod
15969                 BUILD_SQL_DYNAMIC=shared
15970                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15971         fi
15972 fi
15973
15974 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15975         $BUILD_SLAPD = yes ; then
15976         BUILD_SLURPD=yes
15977 fi
15978
15979
15980 if test "$LINK_BINS_DYNAMIC" = yes; then
15981     LIB_LINKAGE=DYN
15982     LT_LIB_LINKAGE=shared
15983 else
15984     LIB_LINKAGE=STAT
15985     LT_LIB_LINKAGE=static
15986 fi
15987
15988 if test "$ac_cv_mingw32" = yes ; then
15989     PLAT=NT
15990     DYN_EXT=dll
15991 else
15992     PLAT=UNIX
15993     DYN_EXT=so
15994 fi
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004   
16005   
16006   
16007   
16008   
16009   
16010   
16011   
16012   
16013   
16014   
16015   
16016   
16017   
16018   
16019   
16020   
16021   
16022   
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059 trap '' 1 2 15
16060
16061 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16062
16063 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16064 # Let make expand exec_prefix.
16065 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16066
16067 # Any assignment to VPATH causes Sun make to only execute
16068 # the first set of double-colon rules, so remove it if not needed.
16069 # If there is a colon in the path, we need to keep it.
16070 if test "x$srcdir" = x.; then
16071   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16072 fi
16073
16074 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16075
16076 DEFS=-DHAVE_CONFIG_H
16077
16078 # Without the "./", some shells look in PATH for config.status.
16079 : ${CONFIG_STATUS=./config.status}
16080
16081 echo creating $CONFIG_STATUS
16082 rm -f $CONFIG_STATUS
16083 cat > $CONFIG_STATUS <<EOF
16084 #! /bin/sh
16085 # Generated automatically by configure.
16086 # Run this file to recreate the current configuration.
16087 # This directory was configured as follows,
16088 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16089 #
16090 # $0 $ac_configure_args
16091 #
16092 # Compiler output produced by configure, useful for debugging
16093 # configure, is in ./config.log if it exists.
16094
16095 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16096 for ac_option
16097 do
16098   case "\$ac_option" in
16099   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16100     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16101     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16102   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16103     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16104     exit 0 ;;
16105   -help | --help | --hel | --he | --h)
16106     echo "\$ac_cs_usage"; exit 0 ;;
16107   *) echo "\$ac_cs_usage"; exit 1 ;;
16108   esac
16109 done
16110
16111 ac_given_srcdir=$srcdir
16112 ac_given_INSTALL="$INSTALL"
16113
16114 trap 'rm -fr `echo "\
16115 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16116 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16117 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16118 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16119 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16120 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16121 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16122 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16123 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16124 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16125 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16126 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16127 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16128 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16129 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16130 include/Makefile:build/top.mk:include/Makefile.in \
16131 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16132 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16133 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16134 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16135 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16136 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16137 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16138 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16139 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16140 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16141 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16142 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16143 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16144 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16145 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16146 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16147 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16148 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16149 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16150 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16151 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16152 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16153 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16154 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16155 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16156 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16157 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16158 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16159  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16160 EOF
16161 cat >> $CONFIG_STATUS <<EOF
16162
16163 # Protect against being on the right side of a sed subst in config.status.
16164 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16165  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16166 $ac_vpsub
16167 $extrasub
16168 s%@SHELL@%$SHELL%g
16169 s%@CFLAGS@%$CFLAGS%g
16170 s%@CPPFLAGS@%$CPPFLAGS%g
16171 s%@CXXFLAGS@%$CXXFLAGS%g
16172 s%@FFLAGS@%$FFLAGS%g
16173 s%@DEFS@%$DEFS%g
16174 s%@LDFLAGS@%$LDFLAGS%g
16175 s%@LIBS@%$LIBS%g
16176 s%@exec_prefix@%$exec_prefix%g
16177 s%@prefix@%$prefix%g
16178 s%@program_transform_name@%$program_transform_name%g
16179 s%@bindir@%$bindir%g
16180 s%@sbindir@%$sbindir%g
16181 s%@libexecdir@%$libexecdir%g
16182 s%@datadir@%$datadir%g
16183 s%@sysconfdir@%$sysconfdir%g
16184 s%@sharedstatedir@%$sharedstatedir%g
16185 s%@localstatedir@%$localstatedir%g
16186 s%@libdir@%$libdir%g
16187 s%@includedir@%$includedir%g
16188 s%@oldincludedir@%$oldincludedir%g
16189 s%@infodir@%$infodir%g
16190 s%@mandir@%$mandir%g
16191 s%@host@%$host%g
16192 s%@host_alias@%$host_alias%g
16193 s%@host_cpu@%$host_cpu%g
16194 s%@host_vendor@%$host_vendor%g
16195 s%@host_os@%$host_os%g
16196 s%@target@%$target%g
16197 s%@target_alias@%$target_alias%g
16198 s%@target_cpu@%$target_cpu%g
16199 s%@target_vendor@%$target_vendor%g
16200 s%@target_os@%$target_os%g
16201 s%@build@%$build%g
16202 s%@build_alias@%$build_alias%g
16203 s%@build_cpu@%$build_cpu%g
16204 s%@build_vendor@%$build_vendor%g
16205 s%@build_os@%$build_os%g
16206 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16207 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16208 s%@INSTALL_DATA@%$INSTALL_DATA%g
16209 s%@PACKAGE@%$PACKAGE%g
16210 s%@VERSION@%$VERSION%g
16211 s%@ACLOCAL@%$ACLOCAL%g
16212 s%@AUTOCONF@%$AUTOCONF%g
16213 s%@AUTOMAKE@%$AUTOMAKE%g
16214 s%@AUTOHEADER@%$AUTOHEADER%g
16215 s%@MAKEINFO@%$MAKEINFO%g
16216 s%@install_sh@%$install_sh%g
16217 s%@AMTAR@%$AMTAR%g
16218 s%@AWK@%$AWK%g
16219 s%@AMTARFLAGS@%$AMTARFLAGS%g
16220 s%@SET_MAKE@%$SET_MAKE%g
16221 s%@top_builddir@%$top_builddir%g
16222 s%@ldap_subdir@%$ldap_subdir%g
16223 s%@CC@%$CC%g
16224 s%@RANLIB@%$RANLIB%g
16225 s%@LN_S@%$LN_S%g
16226 s%@DLLTOOL@%$DLLTOOL%g
16227 s%@AS@%$AS%g
16228 s%@OBJDUMP@%$OBJDUMP%g
16229 s%@LIBTOOL@%$LIBTOOL%g
16230 s%@LN_H@%$LN_H%g
16231 s%@SENDMAIL@%$SENDMAIL%g
16232 s%@EDITOR@%$EDITOR%g
16233 s%@FINGER@%$FINGER%g
16234 s%@PERLBIN@%$PERLBIN%g
16235 s%@CPP@%$CPP%g
16236 s%@EXEEXT@%$EXEEXT%g
16237 s%@OBJEXT@%$OBJEXT%g
16238 s%@OL_MKDEP@%$OL_MKDEP%g
16239 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16240 s%@LIBOBJS@%$LIBOBJS%g
16241 s%@LIBSRCS@%$LIBSRCS%g
16242 s%@PLAT@%$PLAT%g
16243 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16244 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16245 s%@DYN_EXT@%$DYN_EXT%g
16246 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16247 s%@BUILD_BDB2@%$BUILD_BDB2%g
16248 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16249 s%@BUILD_LDAP@%$BUILD_LDAP%g
16250 s%@BUILD_LDBM@%$BUILD_LDBM%g
16251 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16252 s%@BUILD_PERL@%$BUILD_PERL%g
16253 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16254 s%@BUILD_SHELL@%$BUILD_SHELL%g
16255 s%@BUILD_SQL@%$BUILD_SQL%g
16256 s%@BUILD_TCL@%$BUILD_TCL%g
16257 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
16258 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16259 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16260 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16261 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16262 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16263 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16264 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16265 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16266 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16267 s%@LDAP_LIBS@%$LDAP_LIBS%g
16268 s%@LDIF_LIBS@%$LDIF_LIBS%g
16269 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16270 s%@QUIPU_LIBS@%$QUIPU_LIBS%g
16271 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16272 s%@LDBM_LIBS@%$LDBM_LIBS%g
16273 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16274 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16275 s%@WRAP_LIBS@%$WRAP_LIBS%g
16276 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16277 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16278 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16279 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16280 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16281 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16282 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16283 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16284 s%@KRB4_LIBS@%$KRB4_LIBS%g
16285 s%@KRB5_LIBS@%$KRB5_LIBS%g
16286 s%@READLINE_LIBS@%$READLINE_LIBS%g
16287 s%@SASL_LIBS@%$SASL_LIBS%g
16288 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16289 s%@TLS_LIBS@%$TLS_LIBS%g
16290 s%@MODULES_LIBS@%$MODULES_LIBS%g
16291 s%@AUTH_LIBS@%$AUTH_LIBS%g
16292 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16293 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16294 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16295
16296 CEOF
16297 EOF
16298
16299 cat >> $CONFIG_STATUS <<\EOF
16300
16301 # Split the substitutions into bite-sized pieces for seds with
16302 # small command number limits, like on Digital OSF/1 and HP-UX.
16303 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16304 ac_file=1 # Number of current file.
16305 ac_beg=1 # First line for current file.
16306 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16307 ac_more_lines=:
16308 ac_sed_cmds=""
16309 while $ac_more_lines; do
16310   if test $ac_beg -gt 1; then
16311     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16312   else
16313     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16314   fi
16315   if test ! -s conftest.s$ac_file; then
16316     ac_more_lines=false
16317     rm -f conftest.s$ac_file
16318   else
16319     if test -z "$ac_sed_cmds"; then
16320       ac_sed_cmds="sed -f conftest.s$ac_file"
16321     else
16322       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16323     fi
16324     ac_file=`expr $ac_file + 1`
16325     ac_beg=$ac_end
16326     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16327   fi
16328 done
16329 if test -z "$ac_sed_cmds"; then
16330   ac_sed_cmds=cat
16331 fi
16332 EOF
16333
16334 cat >> $CONFIG_STATUS <<EOF
16335
16336 CONFIG_FILES=\${CONFIG_FILES-"\
16337 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16338 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16339 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16340 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16341 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16342 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16343 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16344 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16345 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16346 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16347 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16348 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16349 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16350 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16351 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16352 include/Makefile:build/top.mk:include/Makefile.in \
16353 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16354 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16355 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16356 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16357 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16358 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16359 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16360 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16361 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16362 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16363 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16364 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
16365 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16366 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16367 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16368 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16369 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16370 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16371 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16372 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16373 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16374 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16375 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16376 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16377 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16378 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16379 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16380 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16381 "}
16382 EOF
16383 cat >> $CONFIG_STATUS <<\EOF
16384 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16385   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16386   case "$ac_file" in
16387   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16388        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16389   *) ac_file_in="${ac_file}.in" ;;
16390   esac
16391
16392   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16393
16394   # Remove last slash and all that follows it.  Not all systems have dirname.
16395   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16396   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16397     # The file is in a subdirectory.
16398     test ! -d "$ac_dir" && mkdir "$ac_dir"
16399     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16400     # A "../" for each directory in $ac_dir_suffix.
16401     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16402   else
16403     ac_dir_suffix= ac_dots=
16404   fi
16405
16406   case "$ac_given_srcdir" in
16407   .)  srcdir=.
16408       if test -z "$ac_dots"; then top_srcdir=.
16409       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16410   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16411   *) # Relative path.
16412     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16413     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16414   esac
16415
16416   case "$ac_given_INSTALL" in
16417   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16418   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16419   esac
16420
16421   echo creating "$ac_file"
16422   rm -f "$ac_file"
16423   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16424   case "$ac_file" in
16425   *[Mm]akefile*) ac_comsub="1i\\
16426 # $configure_input" ;;
16427   *) ac_comsub= ;;
16428   esac
16429
16430   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16431   sed -e "$ac_comsub
16432 s%@configure_input@%$configure_input%g
16433 s%@srcdir@%$srcdir%g
16434 s%@top_srcdir@%$top_srcdir%g
16435 s%@INSTALL@%$INSTALL%g
16436 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16437 fi; done
16438 rm -f conftest.s*
16439
16440 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16441 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16442 #
16443 # ac_d sets the value in "#define NAME VALUE" lines.
16444 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16445 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16446 ac_dC='\3'
16447 ac_dD='%g'
16448 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16449 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16450 ac_uB='\([      ]\)%\1#\2define\3'
16451 ac_uC=' '
16452 ac_uD='\4%g'
16453 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16454 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16455 ac_eB='$%\1#\2define\3'
16456 ac_eC=' '
16457 ac_eD='%g'
16458
16459 if test "${CONFIG_HEADERS+set}" != set; then
16460 EOF
16461 cat >> $CONFIG_STATUS <<EOF
16462   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16463 EOF
16464 cat >> $CONFIG_STATUS <<\EOF
16465 fi
16466 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16467   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16468   case "$ac_file" in
16469   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16470        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16471   *) ac_file_in="${ac_file}.in" ;;
16472   esac
16473
16474   echo creating $ac_file
16475
16476   rm -f conftest.frag conftest.in conftest.out
16477   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16478   cat $ac_file_inputs > conftest.in
16479
16480 EOF
16481
16482 # Transform confdefs.h into a sed script conftest.vals that substitutes
16483 # the proper values into config.h.in to produce config.h.  And first:
16484 # Protect against being on the right side of a sed subst in config.status.
16485 # Protect against being in an unquoted here document in config.status.
16486 rm -f conftest.vals
16487 cat > conftest.hdr <<\EOF
16488 s/[\\&%]/\\&/g
16489 s%[\\$`]%\\&%g
16490 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16491 s%ac_d%ac_u%gp
16492 s%ac_u%ac_e%gp
16493 EOF
16494 sed -n -f conftest.hdr confdefs.h > conftest.vals
16495 rm -f conftest.hdr
16496
16497 # This sed command replaces #undef with comments.  This is necessary, for
16498 # example, in the case of _POSIX_SOURCE, which is predefined and required
16499 # on some systems where configure will not decide to define it.
16500 cat >> conftest.vals <<\EOF
16501 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16502 EOF
16503
16504 # Break up conftest.vals because some shells have a limit on
16505 # the size of here documents, and old seds have small limits too.
16506
16507 rm -f conftest.tail
16508 while :
16509 do
16510   ac_lines=`grep -c . conftest.vals`
16511   # grep -c gives empty output for an empty file on some AIX systems.
16512   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16513   # Write a limited-size here document to conftest.frag.
16514   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16515   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16516   echo 'CEOF
16517   sed -f conftest.frag conftest.in > conftest.out
16518   rm -f conftest.in
16519   mv conftest.out conftest.in
16520 ' >> $CONFIG_STATUS
16521   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16522   rm -f conftest.vals
16523   mv conftest.tail conftest.vals
16524 done
16525 rm -f conftest.vals
16526
16527 cat >> $CONFIG_STATUS <<\EOF
16528   rm -f conftest.frag conftest.h
16529   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16530   cat conftest.in >> conftest.h
16531   rm -f conftest.in
16532   if cmp -s $ac_file conftest.h 2>/dev/null; then
16533     echo "$ac_file is unchanged"
16534     rm -f conftest.h
16535   else
16536     # Remove last slash and all that follows it.  Not all systems have dirname.
16537       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16538       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16539       # The file is in a subdirectory.
16540       test ! -d "$ac_dir" && mkdir "$ac_dir"
16541     fi
16542     rm -f $ac_file
16543     mv conftest.h $ac_file
16544   fi
16545 fi; done
16546
16547 EOF
16548 cat >> $CONFIG_STATUS <<EOF
16549
16550 EOF
16551 cat >> $CONFIG_STATUS <<\EOF
16552
16553 date > stamp-h
16554 echo Please \"make depend\" to build dependencies
16555
16556 exit 0
16557 EOF
16558 chmod +x $CONFIG_STATUS
16559 rm -fr confdefs* $ac_clean_files
16560 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16561