]> git.sur5r.net Git - openldap/blob - configure
b2eed4f73460a2b1ce6f30395812774f2f50eff9
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.338 2000/09/24 23:21:22 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 "Restrictions apply, see COPYRIGHT and LICENSE files."
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 (no)"
41 ac_help="$ac_help
42   --enable-ipv6           enable IPv6 support (auto)"
43 ac_help="$ac_help
44   --enable-local          enable AF_LOCAL (AF_UNIX) socket support (auto)"
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          with 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-rlookups     enable reverse lookups (auto)"
81 ac_help="$ac_help
82     --enable-aci          enable per-object ACIs (no)"
83 ac_help="$ac_help
84     --enable-wrappers     enable tcp wrapper support (no)"
85 ac_help="$ac_help
86     --enable-dynamic      enable linking built binaries with dynamic libs (no)"
87 ac_help="$ac_help
88     --enable-bdb          enable Berkeley DB backend (no)"
89 ac_help="$ac_help
90     --with-bdb-module  module type (static)"
91 ac_help="$ac_help
92     --enable-dnssrv       enable dnssrv backend (no)"
93 ac_help="$ac_help
94     --with-dnssrv-module  module type (static)"
95 ac_help="$ac_help
96     --enable-ldap         enable ldap backend (no)"
97 ac_help="$ac_help
98     --with-ldap-module    module type (static)"
99 ac_help="$ac_help
100     --enable-ldbm         enable ldbm backend (yes)"
101 ac_help="$ac_help
102     --with-ldbm-api       with LDBM API (auto)"
103 ac_help="$ac_help
104     --with-ldbm-module    module type (static)"
105 ac_help="$ac_help
106     --with-ldbm-type      use LDBM type (auto)"
107 ac_help="$ac_help
108     --enable-passwd       enable passwd backend (no)"
109 ac_help="$ac_help
110     --with-passwd-module  module type (static)"
111 ac_help="$ac_help
112     --enable-perl         enable perl backend (no)"
113 ac_help="$ac_help
114     --with-perl-module    module type (static)"
115 ac_help="$ac_help
116     --enable-shell        enable shell backend (no)"
117 ac_help="$ac_help
118     --with-shell-module   module type (static)"
119 ac_help="$ac_help
120     --enable-sql          enable sql backend (no)"
121 ac_help="$ac_help
122     --with-sql-module     module type (static)"
123 ac_help="$ac_help
124     --enable-tcl          enable tcl backend (no)"
125 ac_help="$ac_help
126     --with-tcl-module     module type (static)"
127 ac_help="$ac_help
128 SLURPD (Replication Daemon) Options:"
129 ac_help="$ac_help
130   --enable-slurpd         enable building slurpd (auto)"
131 ac_help="$ac_help
132 Library Generation & Linking Options"
133 ac_help="$ac_help
134   --enable-static[=PKGS]  build static libraries [default=yes]"
135 ac_help="$ac_help
136   --enable-shared[=PKGS]  build shared libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
139 ac_help="$ac_help
140   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
141 ac_help="$ac_help
142   --disable-libtool-lock  avoid locking (might break parallel builds)"
143
144 # Initialize some variables set by options.
145 # The variables have the same names as the options, with
146 # dashes changed to underlines.
147 build=NONE
148 cache_file=./config.cache
149 exec_prefix=NONE
150 host=NONE
151 no_create=
152 nonopt=NONE
153 no_recursion=
154 prefix=NONE
155 program_prefix=NONE
156 program_suffix=NONE
157 program_transform_name=s,x,x,
158 silent=
159 site=
160 srcdir=
161 target=NONE
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165 bindir='${exec_prefix}/bin'
166 sbindir='${exec_prefix}/sbin'
167 libexecdir='${exec_prefix}/libexec'
168 datadir='${prefix}/share'
169 sysconfdir='${prefix}/etc'
170 sharedstatedir='${prefix}/com'
171 localstatedir='${prefix}/var'
172 libdir='${exec_prefix}/lib'
173 includedir='${prefix}/include'
174 oldincludedir='/usr/include'
175 infodir='${prefix}/info'
176 mandir='${prefix}/man'
177
178 # Initialize some other variables.
179 subdirs=
180 MFLAGS= MAKEFLAGS=
181 SHELL=${CONFIG_SHELL-/bin/sh}
182 # Maximum number of lines to put in a shell here document.
183 ac_max_here_lines=12
184
185 ac_prev=
186 for ac_option
187 do
188
189   # If the previous option needs an argument, assign it.
190   if test -n "$ac_prev"; then
191     eval "$ac_prev=\$ac_option"
192     ac_prev=
193     continue
194   fi
195
196   case "$ac_option" in
197   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
198   *) ac_optarg= ;;
199   esac
200
201   # Accept the important Cygnus configure options, so we can diagnose typos.
202
203   case "$ac_option" in
204
205   -bindir | --bindir | --bindi | --bind | --bin | --bi)
206     ac_prev=bindir ;;
207   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
208     bindir="$ac_optarg" ;;
209
210   -build | --build | --buil | --bui | --bu)
211     ac_prev=build ;;
212   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
213     build="$ac_optarg" ;;
214
215   -cache-file | --cache-file | --cache-fil | --cache-fi \
216   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
217     ac_prev=cache_file ;;
218   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
219   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
220     cache_file="$ac_optarg" ;;
221
222   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
223     ac_prev=datadir ;;
224   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
225   | --da=*)
226     datadir="$ac_optarg" ;;
227
228   -disable-* | --disable-*)
229     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
230     # Reject names that are not valid shell variable names.
231     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
232       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
233     fi
234     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
235     eval "enable_${ac_feature}=no" ;;
236
237   -enable-* | --enable-*)
238     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
239     # Reject names that are not valid shell variable names.
240     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
241       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
242     fi
243     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
244     case "$ac_option" in
245       *=*) ;;
246       *) ac_optarg=yes ;;
247     esac
248     eval "enable_${ac_feature}='$ac_optarg'" ;;
249
250   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
251   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
252   | --exec | --exe | --ex)
253     ac_prev=exec_prefix ;;
254   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
255   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
256   | --exec=* | --exe=* | --ex=*)
257     exec_prefix="$ac_optarg" ;;
258
259   -gas | --gas | --ga | --g)
260     # Obsolete; use --with-gas.
261     with_gas=yes ;;
262
263   -help | --help | --hel | --he)
264     # Omit some internal or obsolete options to make the list less imposing.
265     # This message is too long to be a string in the A/UX 3.1 sh.
266     cat << EOF
267 Usage: configure [options] [host]
268 Options: [defaults in brackets after descriptions]
269 Configuration:
270   --cache-file=FILE       cache test results in FILE
271   --help                  print this message
272   --no-create             do not create output files
273   --quiet, --silent       do not print \`checking...' messages
274   --version               print the version of autoconf that created configure
275 Directory and file names:
276   --prefix=PREFIX         install architecture-independent files in PREFIX
277                           [$ac_default_prefix]
278   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
279                           [same as prefix]
280   --bindir=DIR            user executables in DIR [EPREFIX/bin]
281   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
282   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
283   --datadir=DIR           read-only architecture-independent data in DIR
284                           [PREFIX/share]
285   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
286   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
287                           [PREFIX/com]
288   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
289   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
290   --includedir=DIR        C header files in DIR [PREFIX/include]
291   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
292   --infodir=DIR           info documentation in DIR [PREFIX/info]
293   --mandir=DIR            man documentation in DIR [PREFIX/man]
294   --srcdir=DIR            find the sources in DIR [configure dir or ..]
295   --program-prefix=PREFIX prepend PREFIX to installed program names
296   --program-suffix=SUFFIX append SUFFIX to installed program names
297   --program-transform-name=PROGRAM
298                           run sed PROGRAM on installed program names
299 EOF
300     cat << EOF
301 Host type:
302   --build=BUILD           configure for building on BUILD [BUILD=HOST]
303   --host=HOST             configure for HOST [guessed]
304   --target=TARGET         configure for TARGET [TARGET=HOST]
305 Features and packages:
306   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
307   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
308   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
309   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
310   --x-includes=DIR        X include files are in DIR
311   --x-libraries=DIR       X library files are in DIR
312 EOF
313     if test -n "$ac_help"; then
314       echo "--enable and --with options recognized:$ac_help"
315     fi
316     exit 0 ;;
317
318   -host | --host | --hos | --ho)
319     ac_prev=host ;;
320   -host=* | --host=* | --hos=* | --ho=*)
321     host="$ac_optarg" ;;
322
323   -includedir | --includedir | --includedi | --included | --include \
324   | --includ | --inclu | --incl | --inc)
325     ac_prev=includedir ;;
326   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
327   | --includ=* | --inclu=* | --incl=* | --inc=*)
328     includedir="$ac_optarg" ;;
329
330   -infodir | --infodir | --infodi | --infod | --info | --inf)
331     ac_prev=infodir ;;
332   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
333     infodir="$ac_optarg" ;;
334
335   -libdir | --libdir | --libdi | --libd)
336     ac_prev=libdir ;;
337   -libdir=* | --libdir=* | --libdi=* | --libd=*)
338     libdir="$ac_optarg" ;;
339
340   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
341   | --libexe | --libex | --libe)
342     ac_prev=libexecdir ;;
343   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
344   | --libexe=* | --libex=* | --libe=*)
345     libexecdir="$ac_optarg" ;;
346
347   -localstatedir | --localstatedir | --localstatedi | --localstated \
348   | --localstate | --localstat | --localsta | --localst \
349   | --locals | --local | --loca | --loc | --lo)
350     ac_prev=localstatedir ;;
351   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
352   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
353   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
354     localstatedir="$ac_optarg" ;;
355
356   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
357     ac_prev=mandir ;;
358   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
359     mandir="$ac_optarg" ;;
360
361   -nfp | --nfp | --nf)
362     # Obsolete; use --without-fp.
363     with_fp=no ;;
364
365   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
366   | --no-cr | --no-c)
367     no_create=yes ;;
368
369   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
370   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
371     no_recursion=yes ;;
372
373   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
374   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
375   | --oldin | --oldi | --old | --ol | --o)
376     ac_prev=oldincludedir ;;
377   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
378   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
379   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
380     oldincludedir="$ac_optarg" ;;
381
382   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
383     ac_prev=prefix ;;
384   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
385     prefix="$ac_optarg" ;;
386
387   -program-prefix | --program-prefix | --program-prefi | --program-pref \
388   | --program-pre | --program-pr | --program-p)
389     ac_prev=program_prefix ;;
390   -program-prefix=* | --program-prefix=* | --program-prefi=* \
391   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
392     program_prefix="$ac_optarg" ;;
393
394   -program-suffix | --program-suffix | --program-suffi | --program-suff \
395   | --program-suf | --program-su | --program-s)
396     ac_prev=program_suffix ;;
397   -program-suffix=* | --program-suffix=* | --program-suffi=* \
398   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
399     program_suffix="$ac_optarg" ;;
400
401   -program-transform-name | --program-transform-name \
402   | --program-transform-nam | --program-transform-na \
403   | --program-transform-n | --program-transform- \
404   | --program-transform | --program-transfor \
405   | --program-transfo | --program-transf \
406   | --program-trans | --program-tran \
407   | --progr-tra | --program-tr | --program-t)
408     ac_prev=program_transform_name ;;
409   -program-transform-name=* | --program-transform-name=* \
410   | --program-transform-nam=* | --program-transform-na=* \
411   | --program-transform-n=* | --program-transform-=* \
412   | --program-transform=* | --program-transfor=* \
413   | --program-transfo=* | --program-transf=* \
414   | --program-trans=* | --program-tran=* \
415   | --progr-tra=* | --program-tr=* | --program-t=*)
416     program_transform_name="$ac_optarg" ;;
417
418   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
419   | -silent | --silent | --silen | --sile | --sil)
420     silent=yes ;;
421
422   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
423     ac_prev=sbindir ;;
424   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
425   | --sbi=* | --sb=*)
426     sbindir="$ac_optarg" ;;
427
428   -sharedstatedir | --sharedstatedir | --sharedstatedi \
429   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
430   | --sharedst | --shareds | --shared | --share | --shar \
431   | --sha | --sh)
432     ac_prev=sharedstatedir ;;
433   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
434   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
435   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
436   | --sha=* | --sh=*)
437     sharedstatedir="$ac_optarg" ;;
438
439   -site | --site | --sit)
440     ac_prev=site ;;
441   -site=* | --site=* | --sit=*)
442     site="$ac_optarg" ;;
443
444   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
445     ac_prev=srcdir ;;
446   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
447     srcdir="$ac_optarg" ;;
448
449   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
450   | --syscon | --sysco | --sysc | --sys | --sy)
451     ac_prev=sysconfdir ;;
452   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
453   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
454     sysconfdir="$ac_optarg" ;;
455
456   -target | --target | --targe | --targ | --tar | --ta | --t)
457     ac_prev=target ;;
458   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
459     target="$ac_optarg" ;;
460
461   -v | -verbose | --verbose | --verbos | --verbo | --verb)
462     verbose=yes ;;
463
464   -version | --version | --versio | --versi | --vers)
465     echo "configure generated by autoconf version 2.13.1"
466     exit 0 ;;
467
468   -with-* | --with-*)
469     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
470     # Reject names that are not valid shell variable names.
471     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
472       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
473     fi
474     ac_package=`echo $ac_package| sed 's/-/_/g'`
475     case "$ac_option" in
476       *=*) ;;
477       *) ac_optarg=yes ;;
478     esac
479     eval "with_${ac_package}='$ac_optarg'" ;;
480
481   -without-* | --without-*)
482     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
483     # Reject names that are not valid shell variable names.
484     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
485       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
486     fi
487     ac_package=`echo $ac_package| sed 's/-/_/g'`
488     eval "with_${ac_package}=no" ;;
489
490   --x)
491     # Obsolete; use --with-x.
492     with_x=yes ;;
493
494   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
495   | --x-incl | --x-inc | --x-in | --x-i)
496     ac_prev=x_includes ;;
497   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
498   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
499     x_includes="$ac_optarg" ;;
500
501   -x-libraries | --x-libraries | --x-librarie | --x-librari \
502   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
503     ac_prev=x_libraries ;;
504   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
505   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
506     x_libraries="$ac_optarg" ;;
507
508   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
509     ;;
510
511   *)
512     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
513       echo "configure: warning: $ac_option: invalid host type" 1>&2
514     fi
515     if test "x$nonopt" != xNONE; then
516       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
517     fi
518     nonopt="$ac_option"
519     ;;
520
521   esac
522 done
523
524 if test -n "$ac_prev"; then
525   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
526 fi
527
528 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
529
530 # File descriptor usage:
531 # 0 standard input
532 # 1 file creation
533 # 2 errors and warnings
534 # 3 some systems may open it to /dev/tty
535 # 4 used on the Kubota Titan
536 # 6 checking for... messages and results
537 # 5 compiler messages saved in config.log
538 if test "$silent" = yes; then
539   exec 6>/dev/null
540 else
541   exec 6>&1
542 fi
543 exec 5>./config.log
544
545 echo "\
546 This file contains any messages produced by compilers while
547 running configure, to aid debugging if configure makes a mistake.
548 " 1>&5
549
550 # Strip out --no-create and --no-recursion so they do not pile up.
551 # Also quote any args containing shell metacharacters.
552 ac_configure_args=
553 for ac_arg
554 do
555   case "$ac_arg" in
556   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
557   | --no-cr | --no-c) ;;
558   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
559   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
560   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
561   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
562   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
563   esac
564 done
565
566 # NLS nuisances.
567 # Only set these to C if already set.  These must not be set unconditionally
568 # because not all systems understand e.g. LANG=C (notably SCO).
569 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
570 # Non-C LC_CTYPE values break the ctype check.
571 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
572 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
573 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
574 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
575
576 # confdefs.h avoids OS command line length limits that DEFS can exceed.
577 rm -rf conftest* confdefs.h
578 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
579 echo > confdefs.h
580
581 # A filename unique to this package, relative to the directory that
582 # configure is in, which we can look for to find out if srcdir is correct.
583 ac_unique_file=build/version.sh
584
585 # Find the source files, if location was not specified.
586 if test -z "$srcdir"; then
587   ac_srcdir_defaulted=yes
588   # Try the directory containing this script, then its parent.
589   ac_prog=$0
590   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
591   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
592   srcdir=$ac_confdir
593   if test ! -r $srcdir/$ac_unique_file; then
594     srcdir=..
595   fi
596 else
597   ac_srcdir_defaulted=no
598 fi
599 if test ! -r $srcdir/$ac_unique_file; then
600   if test "$ac_srcdir_defaulted" = yes; then
601     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
602   else
603     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
604   fi
605 fi
606 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
607
608 # Prefer explicitly selected file to automatically selected ones.
609 if test -z "$CONFIG_SITE"; then
610   if test "x$prefix" != xNONE; then
611     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
612   else
613     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
614   fi
615 fi
616 for ac_site_file in $CONFIG_SITE; do
617   if test -r "$ac_site_file"; then
618     echo "loading site script $ac_site_file"
619     . "$ac_site_file"
620   fi
621 done
622
623
624 ac_ext=c
625 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
626 ac_cpp='$CPP $CPPFLAGS'
627 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
628 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
629 cross_compiling=$ac_cv_prog_cc_cross
630
631 ac_exeext=
632 ac_objext=o
633 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
634   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
635   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
636     ac_n= ac_c='
637 ' ac_t='        '
638   else
639     ac_n=-n ac_c= ac_t=
640   fi
641 else
642   ac_n= ac_c='\c' ac_t=
643 fi
644
645
646 # set unset (borrowed from autoconf 2.14a)
647 if (unset FOO) >/dev/null 2>&1; then
648   ol_unset=unset
649 else
650   ol_unset=false
651 fi
652 # unset CDPATH
653 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
654
655 ac_aux_dir=
656 for ac_dir in build $srcdir/build; do
657   if test -f $ac_dir/install-sh; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/install-sh -c"
660     break
661   elif test -f $ac_dir/install.sh; then
662     ac_aux_dir=$ac_dir
663     ac_install_sh="$ac_aux_dir/install.sh -c"
664     break
665   elif test -f $ac_dir/shtool; then
666     ac_aux_dir=$ac_dir
667     ac_install_sh="$ac_aux_dir/shtool install -c"
668     break
669   fi
670 done
671 if test -z "$ac_aux_dir"; then
672   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
673 fi
674 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
675 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
676 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
677
678 eval `$ac_aux_dir/version.sh`
679 if test -z "$OL_STRING"; then
680         { echo "configure: error: could not determine version" 1>&2; exit 1; }
681 fi
682
683 echo "Configuring $OL_STRING ..."
684
685
686 echo $ac_n "checking host system type""... $ac_c" 1>&6
687 echo "configure:688: checking host system type" >&5
688 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
689
690 # Make sure we can run config.sub.
691   if $ac_config_sub sun4 >/dev/null 2>&1; then :
692     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
693   fi
694
695   ac_cv_host_alias=$host
696   case "$ac_cv_host_alias" in
697   NONE)
698     case $nonopt in
699     NONE)
700       if ac_cv_host_alias=`$ac_config_guess`; then :
701       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
702       fi ;;
703     *) ac_cv_host_alias=$nonopt ;;
704     esac ;;
705   esac
706
707   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
708   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 else
712   echo $ac_n "(cached) $ac_c" 1>&6
713 fi
714
715 echo "$ac_t""$ac_cv_host" 1>&6
716
717 host=$ac_cv_host
718 host_alias=$ac_cv_host_alias
719 host_cpu=$ac_cv_host_cpu
720 host_vendor=$ac_cv_host_vendor
721 host_os=$ac_cv_host_os
722
723
724
725
726
727 echo $ac_n "checking target system type""... $ac_c" 1>&6
728 echo "configure:729: checking target system type" >&5
729 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
730
731 # Make sure we can run config.sub.
732   if $ac_config_sub sun4 >/dev/null 2>&1; then :
733     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
734   fi
735
736   ac_cv_target_alias=$target
737   case "$ac_cv_target_alias" in
738   NONE)
739     case $nonopt in
740     NONE)
741       ac_cv_target_alias=$host_alias ;;
742
743     *) ac_cv_target_alias=$nonopt ;;
744     esac ;;
745   esac
746
747   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
748   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
749   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
750   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
751 else
752   echo $ac_n "(cached) $ac_c" 1>&6
753 fi
754
755 echo "$ac_t""$ac_cv_target" 1>&6
756
757 target=$ac_cv_target
758 target_alias=$ac_cv_target_alias
759 target_cpu=$ac_cv_target_cpu
760 target_vendor=$ac_cv_target_vendor
761 target_os=$ac_cv_target_os
762
763
764
765
766
767 echo $ac_n "checking build system type""... $ac_c" 1>&6
768 echo "configure:769: checking build system type" >&5
769 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
770
771 # Make sure we can run config.sub.
772   if $ac_config_sub sun4 >/dev/null 2>&1; then :
773     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
774   fi
775
776   ac_cv_build_alias=$build
777   case "$ac_cv_build_alias" in
778   NONE)
779     case $nonopt in
780     NONE)
781       ac_cv_build_alias=$host_alias ;;
782
783     *) ac_cv_build_alias=$nonopt ;;
784     esac ;;
785   esac
786
787   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
788   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
789   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
790   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
791 else
792   echo $ac_n "(cached) $ac_c" 1>&6
793 fi
794
795 echo "$ac_t""$ac_cv_build" 1>&6
796
797 build=$ac_cv_build
798 build_alias=$ac_cv_build_alias
799 build_cpu=$ac_cv_build_cpu
800 build_vendor=$ac_cv_build_vendor
801 build_os=$ac_cv_build_os
802
803
804
805
806
807 # Do some error checking and defaulting for the host and target type.
808 # The inputs are:
809 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
810 #
811 # The rules are:
812 # 1. You are not allowed to specify --host, --target, and nonopt at the
813 #    same time.
814 # 2. Host defaults to nonopt.
815 # 3. If nonopt is not specified, then host defaults to the current host,
816 #    as determined by config.guess.
817 # 4. Target and build default to nonopt.
818 # 5. If nonopt is not specified, then target and build default to host.
819
820 # The aliases save the names the user supplied, while $host etc.
821 # will get canonicalized.
822 case $host---$target---$nonopt in
823 NONE---*---* | *---NONE---* | *---*---NONE) ;;
824 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
825 esac
826
827 test "$host_alias" != "$target_alias" &&
828   test "$program_prefix$program_suffix$program_transform_name" = \
829     NONENONEs,x,x, &&
830   program_prefix=${target_alias}-
831
832
833 # Find a good install program.  We prefer a C program (faster),
834 # so one script is as good as another.  But avoid the broken or
835 # incompatible versions:
836 # SysV /etc/install, /usr/sbin/install
837 # SunOS /usr/etc/install
838 # IRIX /sbin/install
839 # AIX /bin/install
840 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
841 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
842 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
843 # ./install, which can be erroneously created by make from ./install.sh.
844 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
845 echo "configure:846: checking for a BSD compatible install" >&5
846 if test -z "$INSTALL"; then
847 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
848   echo $ac_n "(cached) $ac_c" 1>&6
849 else
850     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
851   for ac_dir in $PATH; do
852     # Account for people who put trailing slashes in PATH elements.
853     case "$ac_dir/" in
854     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
855     *)
856       # OSF1 and SCO ODT 3.0 have their own names for install.
857       # Don't use installbsd from OSF since it installs stuff as root
858       # by default.
859       for ac_prog in ginstall scoinst install; do
860         if test -f $ac_dir/$ac_prog; then
861           if test $ac_prog = install &&
862             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
863             # AIX install.  It has an incompatible calling convention.
864             :
865           elif test $ac_prog = install &&
866             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
867             # program-specific install script used by HP pwplus--don't use.
868             :
869           else
870             ac_cv_path_install="$ac_dir/$ac_prog -c"
871             break 2
872           fi
873         fi
874       done
875       ;;
876     esac
877   done
878   IFS="$ac_save_IFS"
879
880 fi
881   if test "${ac_cv_path_install+set}" = set; then
882     INSTALL="$ac_cv_path_install"
883   else
884     # As a last resort, use the slow shell script.  We don't cache a
885     # path for INSTALL within a source directory, because that will
886     # break other packages using the cache if that directory is
887     # removed, or if the path is relative.
888     INSTALL="$ac_install_sh"
889   fi
890 fi
891 echo "$ac_t""$INSTALL" 1>&6
892
893 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
894 # It thinks the first close brace ends the variable substitution.
895 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
896
897 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
898
899 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
900
901 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
902 echo "configure:903: checking whether build environment is sane" >&5
903 # Just in case
904 sleep 1
905 echo timestamp > conftestfile
906 # Do `set' in a subshell so we don't clobber the current shell's
907 # arguments.  Must try -L first in case configure is actually a
908 # symlink; some systems play weird games with the mod time of symlinks
909 # (eg FreeBSD returns the mod time of the symlink's containing
910 # directory).
911 if (
912    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
913    if test "$*" = "X"; then
914       # -L didn't work.
915       set X `ls -t $srcdir/configure conftestfile`
916    fi
917    if test "$*" != "X $srcdir/configure conftestfile" \
918       && test "$*" != "X conftestfile $srcdir/configure"; then
919
920       # If neither matched, then we have a broken ls.  This can happen
921       # if, for instance, CONFIG_SHELL is bash and it inherits a
922       # broken ls alias from the environment.  This has actually
923       # happened.  Such a system could not be considered "sane".
924       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
925 alias in your environment" 1>&2; exit 1; }
926    fi
927
928    test "$2" = conftestfile
929    )
930 then
931    # Ok.
932    :
933 else
934    { echo "configure: error: newly created file is older than distributed files!
935 Check your system clock" 1>&2; exit 1; }
936 fi
937 rm -f conftest*
938 echo "$ac_t""yes" 1>&6
939 if test "$program_transform_name" = s,x,x,; then
940   program_transform_name=
941 else
942   # Double any \ or $.  echo might interpret backslashes.
943   cat <<\EOF_SED > conftestsed
944 s,\\,\\\\,g; s,\$,$$,g
945 EOF_SED
946   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
947   rm -f conftestsed
948 fi
949 test "$program_prefix" != NONE &&
950   program_transform_name="s,^,${program_prefix},;$program_transform_name"
951 # Use a double $ so make ignores it.
952 test "$program_suffix" != NONE &&
953   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
954
955 # sed with no file args requires a program.
956 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
957
958 for ac_prog in mawk gawk nawk awk
959 do
960 # Extract the first word of "$ac_prog", so it can be a program name with args.
961 set dummy $ac_prog; ac_word=$2
962 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
963 echo "configure:964: checking for $ac_word" >&5
964 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
965   echo $ac_n "(cached) $ac_c" 1>&6
966 else
967   if test -n "$AWK"; then
968   ac_cv_prog_AWK="$AWK" # Let the user override the test.
969 else
970   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
971   ac_dummy="$PATH"
972   for ac_dir in $ac_dummy; do
973     test -z "$ac_dir" && ac_dir=.
974     if test -f $ac_dir/$ac_word; then
975       ac_cv_prog_AWK="$ac_prog"
976       break
977     fi
978   done
979   IFS="$ac_save_ifs"
980 fi
981 fi
982 AWK="$ac_cv_prog_AWK"
983 if test -n "$AWK"; then
984   echo "$ac_t""$AWK" 1>&6
985 else
986   echo "$ac_t""no" 1>&6
987 fi
988
989 test -n "$AWK" && break
990 done
991
992 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
993 echo "configure:994: checking whether ${MAKE-make} sets \${MAKE}" >&5
994 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
995 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
996   echo $ac_n "(cached) $ac_c" 1>&6
997 else
998   cat > conftestmake <<\EOF
999 all:
1000         @echo 'ac_maketemp="${MAKE}"'
1001 EOF
1002 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1003 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1004 if test -n "$ac_maketemp"; then
1005   eval ac_cv_prog_make_${ac_make}_set=yes
1006 else
1007   eval ac_cv_prog_make_${ac_make}_set=no
1008 fi
1009 rm -f conftestmake
1010 fi
1011 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1012   echo "$ac_t""yes" 1>&6
1013   SET_MAKE=
1014 else
1015   echo "$ac_t""no" 1>&6
1016   SET_MAKE="MAKE=${MAKE-make}"
1017 fi
1018
1019
1020
1021 PACKAGE=$OL_PACKAGE
1022
1023 VERSION=$OL_VERSION
1024
1025 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1026   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1027 fi
1028
1029
1030
1031 missing_dir=`cd $ac_aux_dir && pwd`
1032 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1033 echo "configure:1034: checking for working aclocal" >&5
1034 # Run test in a subshell; some versions of sh will print an error if
1035 # an executable is not found, even if stderr is redirected.
1036 # Redirect stdin to placate older versions of autoconf.  Sigh.
1037 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1038    ACLOCAL=aclocal
1039    echo "$ac_t""found" 1>&6
1040 else
1041    ACLOCAL="$missing_dir/missing aclocal"
1042    echo "$ac_t""missing" 1>&6
1043 fi
1044
1045 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1046 echo "configure:1047: checking for working autoconf" >&5
1047 # Run test in a subshell; some versions of sh will print an error if
1048 # an executable is not found, even if stderr is redirected.
1049 # Redirect stdin to placate older versions of autoconf.  Sigh.
1050 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1051    AUTOCONF=autoconf
1052    echo "$ac_t""found" 1>&6
1053 else
1054    AUTOCONF="$missing_dir/missing autoconf"
1055    echo "$ac_t""missing" 1>&6
1056 fi
1057
1058 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1059 echo "configure:1060: checking for working automake" >&5
1060 # Run test in a subshell; some versions of sh will print an error if
1061 # an executable is not found, even if stderr is redirected.
1062 # Redirect stdin to placate older versions of autoconf.  Sigh.
1063 if (automake --version) < /dev/null > /dev/null 2>&1; then
1064    AUTOMAKE=automake
1065    echo "$ac_t""found" 1>&6
1066 else
1067    AUTOMAKE="$missing_dir/missing automake"
1068    echo "$ac_t""missing" 1>&6
1069 fi
1070
1071 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1072 echo "configure:1073: checking for working autoheader" >&5
1073 # Run test in a subshell; some versions of sh will print an error if
1074 # an executable is not found, even if stderr is redirected.
1075 # Redirect stdin to placate older versions of autoconf.  Sigh.
1076 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1077    AUTOHEADER=autoheader
1078    echo "$ac_t""found" 1>&6
1079 else
1080    AUTOHEADER="$missing_dir/missing autoheader"
1081    echo "$ac_t""missing" 1>&6
1082 fi
1083
1084 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1085 echo "configure:1086: checking for working makeinfo" >&5
1086 # Run test in a subshell; some versions of sh will print an error if
1087 # an executable is not found, even if stderr is redirected.
1088 # Redirect stdin to placate older versions of autoconf.  Sigh.
1089 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1090    MAKEINFO=makeinfo
1091    echo "$ac_t""found" 1>&6
1092 else
1093    MAKEINFO="$missing_dir/missing makeinfo"
1094    echo "$ac_t""missing" 1>&6
1095 fi
1096
1097 install_sh="$missing_dir/install-sh"
1098 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1099
1100 for ac_prog in gnutar gtar tar
1101 do
1102 # Extract the first word of "$ac_prog", so it can be a program name with args.
1103 set dummy $ac_prog; ac_word=$2
1104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1105 echo "configure:1106: checking for $ac_word" >&5
1106 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1107   echo $ac_n "(cached) $ac_c" 1>&6
1108 else
1109   if test -n "$AMTAR"; then
1110   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1111 else
1112   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1113   ac_dummy="$PATH"
1114   for ac_dir in $ac_dummy; do
1115     test -z "$ac_dir" && ac_dir=.
1116     if test -f $ac_dir/$ac_word; then
1117       ac_cv_prog_AMTAR="$ac_prog"
1118       break
1119     fi
1120   done
1121   IFS="$ac_save_ifs"
1122 fi
1123 fi
1124 AMTAR="$ac_cv_prog_AMTAR"
1125 if test -n "$AMTAR"; then
1126   echo "$ac_t""$AMTAR" 1>&6
1127 else
1128   echo "$ac_t""no" 1>&6
1129 fi
1130
1131 test -n "$AMTAR" && break
1132 done
1133
1134
1135 AMTARFLAGS=
1136 if test -n "$AMTAR"; then
1137   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1138         AMTARFLAGS=o
1139   fi
1140 fi
1141
1142
1143
1144 cat >> confdefs.h <<EOF
1145 #define OPENLDAP_PACKAGE "$PACKAGE"
1146 EOF
1147
1148 cat >> confdefs.h <<EOF
1149 #define OPENLDAP_VERSION "$VERSION"
1150 EOF
1151
1152
1153 cat >> confdefs.h <<EOF
1154 #define LDAP_VENDOR_VERSION $OL_API_INC
1155 EOF
1156
1157 cat >> confdefs.h <<EOF
1158 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1159 EOF
1160
1161 cat >> confdefs.h <<EOF
1162 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1163 EOF
1164
1165 cat >> confdefs.h <<EOF
1166 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1167 EOF
1168
1169
1170 OPENLDAP_LIBVERSION=$OL_API_LIB
1171
1172
1173
1174
1175 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1176 echo "configure:1177: checking configure arguments" >&5
1177
1178
1179 top_builddir=`pwd`
1180
1181 ldap_subdir="/openldap"
1182
1183 # Check whether --with-subdir or --without-subdir was given.
1184 if test "${with_subdir+set}" = set; then
1185   withval="$with_subdir"
1186   case "$withval" in
1187         no) ldap_subdir=""
1188                 ;;
1189         yes)
1190                 ;;
1191         /*|\\*)
1192                 ldap_subdir="$withval"
1193                 ;;
1194         *)
1195                 ldap_subdir="/$withval"
1196                 ;;
1197 esac
1198
1199 fi
1200
1201
1202 # OpenLDAP --enable-debug
1203         # Check whether --enable-debug or --disable-debug was given.
1204 if test "${enable_debug+set}" = set; then
1205   enableval="$enable_debug"
1206   
1207         ol_arg=invalid
1208         for ol_val in auto yes no ; do
1209                 if test "$enableval" = "$ol_val" ; then
1210                         ol_arg="$ol_val"
1211                 fi
1212         done
1213         if test "$ol_arg" = "invalid" ; then
1214                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1215         fi
1216         ol_enable_debug="$ol_arg"
1217
1218 else
1219         ol_enable_debug="yes"
1220 fi
1221 # end --enable-debug
1222 # OpenLDAP --enable-syslog
1223         # Check whether --enable-syslog or --disable-syslog was given.
1224 if test "${enable_syslog+set}" = set; then
1225   enableval="$enable_syslog"
1226   
1227         ol_arg=invalid
1228         for ol_val in auto yes no ; do
1229                 if test "$enableval" = "$ol_val" ; then
1230                         ol_arg="$ol_val"
1231                 fi
1232         done
1233         if test "$ol_arg" = "invalid" ; then
1234                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1235         fi
1236         ol_enable_syslog="$ol_arg"
1237
1238 else
1239         ol_enable_syslog="auto"
1240 fi
1241 # end --enable-syslog
1242 # OpenLDAP --enable-proctitle
1243         # Check whether --enable-proctitle or --disable-proctitle was given.
1244 if test "${enable_proctitle+set}" = set; then
1245   enableval="$enable_proctitle"
1246   
1247         ol_arg=invalid
1248         for ol_val in auto yes no ; do
1249                 if test "$enableval" = "$ol_val" ; then
1250                         ol_arg="$ol_val"
1251                 fi
1252         done
1253         if test "$ol_arg" = "invalid" ; then
1254                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1255         fi
1256         ol_enable_proctitle="$ol_arg"
1257
1258 else
1259         ol_enable_proctitle="yes"
1260 fi
1261 # end --enable-proctitle
1262 # OpenLDAP --enable-cache
1263         # Check whether --enable-cache or --disable-cache was given.
1264 if test "${enable_cache+set}" = set; then
1265   enableval="$enable_cache"
1266   
1267         ol_arg=invalid
1268         for ol_val in auto yes no ; do
1269                 if test "$enableval" = "$ol_val" ; then
1270                         ol_arg="$ol_val"
1271                 fi
1272         done
1273         if test "$ol_arg" = "invalid" ; then
1274                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1275         fi
1276         ol_enable_cache="$ol_arg"
1277
1278 else
1279         ol_enable_cache="yes"
1280 fi
1281 # end --enable-cache
1282 # OpenLDAP --enable-referrals
1283         # Check whether --enable-referrals or --disable-referrals was given.
1284 if test "${enable_referrals+set}" = set; then
1285   enableval="$enable_referrals"
1286   
1287         ol_arg=invalid
1288         for ol_val in auto yes no ; do
1289                 if test "$enableval" = "$ol_val" ; then
1290                         ol_arg="$ol_val"
1291                 fi
1292         done
1293         if test "$ol_arg" = "invalid" ; then
1294                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1295         fi
1296         ol_enable_referrals="$ol_arg"
1297
1298 else
1299         ol_enable_referrals="yes"
1300 fi
1301 # end --enable-referrals
1302 # OpenLDAP --enable-kbind
1303         # Check whether --enable-kbind or --disable-kbind was given.
1304 if test "${enable_kbind+set}" = set; then
1305   enableval="$enable_kbind"
1306   
1307         ol_arg=invalid
1308         for ol_val in auto yes no ; do
1309                 if test "$enableval" = "$ol_val" ; then
1310                         ol_arg="$ol_val"
1311                 fi
1312         done
1313         if test "$ol_arg" = "invalid" ; then
1314                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1315         fi
1316         ol_enable_kbind="$ol_arg"
1317
1318 else
1319         ol_enable_kbind="no"
1320 fi
1321 # end --enable-kbind
1322 # OpenLDAP --enable-ipv6
1323         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1324 if test "${enable_ipv6+set}" = set; then
1325   enableval="$enable_ipv6"
1326   
1327         ol_arg=invalid
1328         for ol_val in auto yes no ; do
1329                 if test "$enableval" = "$ol_val" ; then
1330                         ol_arg="$ol_val"
1331                 fi
1332         done
1333         if test "$ol_arg" = "invalid" ; then
1334                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1335         fi
1336         ol_enable_ipv6="$ol_arg"
1337
1338 else
1339         ol_enable_ipv6="auto"
1340 fi
1341 # end --enable-ipv6
1342 # OpenLDAP --enable-local
1343         # Check whether --enable-local or --disable-local was given.
1344 if test "${enable_local+set}" = set; then
1345   enableval="$enable_local"
1346   
1347         ol_arg=invalid
1348         for ol_val in auto yes no ; do
1349                 if test "$enableval" = "$ol_val" ; then
1350                         ol_arg="$ol_val"
1351                 fi
1352         done
1353         if test "$ol_arg" = "invalid" ; then
1354                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1355         fi
1356         ol_enable_local="$ol_arg"
1357
1358 else
1359         ol_enable_local="auto"
1360 fi
1361 # end --enable-local
1362 # OpenLDAP --enable-x_compile
1363         # Check whether --enable-x_compile or --disable-x_compile was given.
1364 if test "${enable_x_compile+set}" = set; then
1365   enableval="$enable_x_compile"
1366   
1367         ol_arg=invalid
1368         for ol_val in yes no ; do
1369                 if test "$enableval" = "$ol_val" ; then
1370                         ol_arg="$ol_val"
1371                 fi
1372         done
1373         if test "$ol_arg" = "invalid" ; then
1374                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1375         fi
1376         ol_enable_x_compile="$ol_arg"
1377
1378 else
1379         ol_enable_x_compile="no"
1380 fi
1381 # end --enable-x_compile
1382
1383
1384 # OpenLDAP --with-cyrus_sasl
1385         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1386 if test "${with_cyrus_sasl+set}" = set; then
1387   withval="$with_cyrus_sasl"
1388   
1389         ol_arg=invalid
1390         for ol_val in auto yes no  ; do
1391                 if test "$withval" = "$ol_val" ; then
1392                         ol_arg="$ol_val"
1393                 fi
1394         done
1395         if test "$ol_arg" = "invalid" ; then
1396                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1397         fi
1398         ol_with_cyrus_sasl="$ol_arg"
1399
1400 else
1401         ol_with_cyrus_sasl="auto"
1402 fi
1403 # end --with-cyrus_sasl
1404
1405 # OpenLDAP --with-fetch
1406         # Check whether --with-fetch or --without-fetch was given.
1407 if test "${with_fetch+set}" = set; then
1408   withval="$with_fetch"
1409   
1410         ol_arg=invalid
1411         for ol_val in auto yes no  ; do
1412                 if test "$withval" = "$ol_val" ; then
1413                         ol_arg="$ol_val"
1414                 fi
1415         done
1416         if test "$ol_arg" = "invalid" ; then
1417                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1418         fi
1419         ol_with_fetch="$ol_arg"
1420
1421 else
1422         ol_with_fetch="auto"
1423 fi
1424 # end --with-fetch
1425
1426 # OpenLDAP --with-kerberos
1427         # Check whether --with-kerberos or --without-kerberos was given.
1428 if test "${with_kerberos+set}" = set; then
1429   withval="$with_kerberos"
1430   
1431         ol_arg=invalid
1432         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1433                 if test "$withval" = "$ol_val" ; then
1434                         ol_arg="$ol_val"
1435                 fi
1436         done
1437         if test "$ol_arg" = "invalid" ; then
1438                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1439         fi
1440         ol_with_kerberos="$ol_arg"
1441
1442 else
1443         ol_with_kerberos="auto"
1444 fi
1445 # end --with-kerberos
1446
1447 # OpenLDAP --with-readline
1448         # Check whether --with-readline or --without-readline was given.
1449 if test "${with_readline+set}" = set; then
1450   withval="$with_readline"
1451   
1452         ol_arg=invalid
1453         for ol_val in auto yes no  ; do
1454                 if test "$withval" = "$ol_val" ; then
1455                         ol_arg="$ol_val"
1456                 fi
1457         done
1458         if test "$ol_arg" = "invalid" ; then
1459                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1460         fi
1461         ol_with_readline="$ol_arg"
1462
1463 else
1464         ol_with_readline="auto"
1465 fi
1466 # end --with-readline
1467
1468 # OpenLDAP --with-threads
1469         # Check whether --with-threads or --without-threads was given.
1470 if test "${with_threads+set}" = set; then
1471   withval="$with_threads"
1472   
1473         ol_arg=invalid
1474         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1475                 if test "$withval" = "$ol_val" ; then
1476                         ol_arg="$ol_val"
1477                 fi
1478         done
1479         if test "$ol_arg" = "invalid" ; then
1480                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1481         fi
1482         ol_with_threads="$ol_arg"
1483
1484 else
1485         ol_with_threads="auto"
1486 fi
1487 # end --with-threads
1488
1489 # OpenLDAP --with-tls
1490         # Check whether --with-tls or --without-tls was given.
1491 if test "${with_tls+set}" = set; then
1492   withval="$with_tls"
1493   
1494         ol_arg=invalid
1495         for ol_val in auto ssleay openssl yes no  ; do
1496                 if test "$withval" = "$ol_val" ; then
1497                         ol_arg="$ol_val"
1498                 fi
1499         done
1500         if test "$ol_arg" = "invalid" ; then
1501                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1502         fi
1503         ol_with_tls="$ol_arg"
1504
1505 else
1506         ol_with_tls="auto"
1507 fi
1508 # end --with-tls
1509
1510 # OpenLDAP --with-yielding_select
1511         # Check whether --with-yielding_select or --without-yielding_select was given.
1512 if test "${with_yielding_select+set}" = set; then
1513   withval="$with_yielding_select"
1514   
1515         ol_arg=invalid
1516         for ol_val in auto yes no manual  ; do
1517                 if test "$withval" = "$ol_val" ; then
1518                         ol_arg="$ol_val"
1519                 fi
1520         done
1521         if test "$ol_arg" = "invalid" ; then
1522                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1523         fi
1524         ol_with_yielding_select="$ol_arg"
1525
1526 else
1527         ol_with_yielding_select="auto"
1528 fi
1529 # end --with-yielding_select
1530
1531
1532
1533 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1534 if test "${with_xxslapdoptions+set}" = set; then
1535   withval="$with_xxslapdoptions"
1536   :
1537 fi
1538
1539 # OpenLDAP --enable-slapd
1540         # Check whether --enable-slapd or --disable-slapd was given.
1541 if test "${enable_slapd+set}" = set; then
1542   enableval="$enable_slapd"
1543   
1544         ol_arg=invalid
1545         for ol_val in auto yes no ; do
1546                 if test "$enableval" = "$ol_val" ; then
1547                         ol_arg="$ol_val"
1548                 fi
1549         done
1550         if test "$ol_arg" = "invalid" ; then
1551                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1552         fi
1553         ol_enable_slapd="$ol_arg"
1554
1555 else
1556         ol_enable_slapd="yes"
1557 fi
1558 # end --enable-slapd
1559 # OpenLDAP --enable-cleartext
1560         # Check whether --enable-cleartext or --disable-cleartext was given.
1561 if test "${enable_cleartext+set}" = set; then
1562   enableval="$enable_cleartext"
1563   
1564         ol_arg=invalid
1565         for ol_val in auto yes no ; do
1566                 if test "$enableval" = "$ol_val" ; then
1567                         ol_arg="$ol_val"
1568                 fi
1569         done
1570         if test "$ol_arg" = "invalid" ; then
1571                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1572         fi
1573         ol_enable_cleartext="$ol_arg"
1574
1575 else
1576         ol_enable_cleartext="yes"
1577 fi
1578 # end --enable-cleartext
1579 # OpenLDAP --enable-crypt
1580         # Check whether --enable-crypt or --disable-crypt was given.
1581 if test "${enable_crypt+set}" = set; then
1582   enableval="$enable_crypt"
1583   
1584         ol_arg=invalid
1585         for ol_val in auto yes no ; do
1586                 if test "$enableval" = "$ol_val" ; then
1587                         ol_arg="$ol_val"
1588                 fi
1589         done
1590         if test "$ol_arg" = "invalid" ; then
1591                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1592         fi
1593         ol_enable_crypt="$ol_arg"
1594
1595 else
1596         ol_enable_crypt="auto"
1597 fi
1598 # end --enable-crypt
1599 # OpenLDAP --enable-kpasswd
1600         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1601 if test "${enable_kpasswd+set}" = set; then
1602   enableval="$enable_kpasswd"
1603   
1604         ol_arg=invalid
1605         for ol_val in auto yes no ; do
1606                 if test "$enableval" = "$ol_val" ; then
1607                         ol_arg="$ol_val"
1608                 fi
1609         done
1610         if test "$ol_arg" = "invalid" ; then
1611                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1612         fi
1613         ol_enable_kpasswd="$ol_arg"
1614
1615 else
1616         ol_enable_kpasswd="no"
1617 fi
1618 # end --enable-kpasswd
1619 # OpenLDAP --enable-spasswd
1620         # Check whether --enable-spasswd or --disable-spasswd was given.
1621 if test "${enable_spasswd+set}" = set; then
1622   enableval="$enable_spasswd"
1623   
1624         ol_arg=invalid
1625         for ol_val in auto yes no ; do
1626                 if test "$enableval" = "$ol_val" ; then
1627                         ol_arg="$ol_val"
1628                 fi
1629         done
1630         if test "$ol_arg" = "invalid" ; then
1631                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1632         fi
1633         ol_enable_spasswd="$ol_arg"
1634
1635 else
1636         ol_enable_spasswd="no"
1637 fi
1638 # end --enable-spasswd
1639 # OpenLDAP --enable-modules
1640         # Check whether --enable-modules or --disable-modules was given.
1641 if test "${enable_modules+set}" = set; then
1642   enableval="$enable_modules"
1643   
1644         ol_arg=invalid
1645         for ol_val in auto yes no ; do
1646                 if test "$enableval" = "$ol_val" ; then
1647                         ol_arg="$ol_val"
1648                 fi
1649         done
1650         if test "$ol_arg" = "invalid" ; then
1651                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1652         fi
1653         ol_enable_modules="$ol_arg"
1654
1655 else
1656         ol_enable_modules="no"
1657 fi
1658 # end --enable-modules
1659 # OpenLDAP --enable-multimaster
1660         # Check whether --enable-multimaster or --disable-multimaster was given.
1661 if test "${enable_multimaster+set}" = set; then
1662   enableval="$enable_multimaster"
1663   
1664         ol_arg=invalid
1665         for ol_val in auto yes no ; do
1666                 if test "$enableval" = "$ol_val" ; then
1667                         ol_arg="$ol_val"
1668                 fi
1669         done
1670         if test "$ol_arg" = "invalid" ; then
1671                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1672         fi
1673         ol_enable_multimaster="$ol_arg"
1674
1675 else
1676         ol_enable_multimaster="no"
1677 fi
1678 # end --enable-multimaster
1679 # OpenLDAP --enable-phonetic
1680         # Check whether --enable-phonetic or --disable-phonetic was given.
1681 if test "${enable_phonetic+set}" = set; then
1682   enableval="$enable_phonetic"
1683   
1684         ol_arg=invalid
1685         for ol_val in auto yes no ; do
1686                 if test "$enableval" = "$ol_val" ; then
1687                         ol_arg="$ol_val"
1688                 fi
1689         done
1690         if test "$ol_arg" = "invalid" ; then
1691                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1692         fi
1693         ol_enable_phonetic="$ol_arg"
1694
1695 else
1696         ol_enable_phonetic="no"
1697 fi
1698 # end --enable-phonetic
1699 # OpenLDAP --enable-rlookups
1700         # Check whether --enable-rlookups or --disable-rlookups was given.
1701 if test "${enable_rlookups+set}" = set; then
1702   enableval="$enable_rlookups"
1703   
1704         ol_arg=invalid
1705         for ol_val in auto yes no ; do
1706                 if test "$enableval" = "$ol_val" ; then
1707                         ol_arg="$ol_val"
1708                 fi
1709         done
1710         if test "$ol_arg" = "invalid" ; then
1711                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1712         fi
1713         ol_enable_rlookups="$ol_arg"
1714
1715 else
1716         ol_enable_rlookups="auto"
1717 fi
1718 # end --enable-rlookups
1719 # OpenLDAP --enable-aci
1720         # Check whether --enable-aci or --disable-aci was given.
1721 if test "${enable_aci+set}" = set; then
1722   enableval="$enable_aci"
1723   
1724         ol_arg=invalid
1725         for ol_val in auto yes no ; do
1726                 if test "$enableval" = "$ol_val" ; then
1727                         ol_arg="$ol_val"
1728                 fi
1729         done
1730         if test "$ol_arg" = "invalid" ; then
1731                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1732         fi
1733         ol_enable_aci="$ol_arg"
1734
1735 else
1736         ol_enable_aci="no"
1737 fi
1738 # end --enable-aci
1739 # OpenLDAP --enable-wrappers
1740         # Check whether --enable-wrappers or --disable-wrappers was given.
1741 if test "${enable_wrappers+set}" = set; then
1742   enableval="$enable_wrappers"
1743   
1744         ol_arg=invalid
1745         for ol_val in auto yes no ; do
1746                 if test "$enableval" = "$ol_val" ; then
1747                         ol_arg="$ol_val"
1748                 fi
1749         done
1750         if test "$ol_arg" = "invalid" ; then
1751                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1752         fi
1753         ol_enable_wrappers="$ol_arg"
1754
1755 else
1756         ol_enable_wrappers="no"
1757 fi
1758 # end --enable-wrappers
1759 # OpenLDAP --enable-dynamic
1760         # Check whether --enable-dynamic or --disable-dynamic was given.
1761 if test "${enable_dynamic+set}" = set; then
1762   enableval="$enable_dynamic"
1763   
1764         ol_arg=invalid
1765         for ol_val in auto yes no ; do
1766                 if test "$enableval" = "$ol_val" ; then
1767                         ol_arg="$ol_val"
1768                 fi
1769         done
1770         if test "$ol_arg" = "invalid" ; then
1771                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1772         fi
1773         ol_enable_dynamic="$ol_arg"
1774
1775 else
1776         ol_enable_dynamic="no"
1777 fi
1778 # end --enable-dynamic
1779
1780 # OpenLDAP --enable-bdb
1781         # Check whether --enable-bdb or --disable-bdb was given.
1782 if test "${enable_bdb+set}" = set; then
1783   enableval="$enable_bdb"
1784   
1785         ol_arg=invalid
1786         for ol_val in auto yes no ; do
1787                 if test "$enableval" = "$ol_val" ; then
1788                         ol_arg="$ol_val"
1789                 fi
1790         done
1791         if test "$ol_arg" = "invalid" ; then
1792                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1793         fi
1794         ol_enable_bdb="$ol_arg"
1795
1796 else
1797         ol_enable_bdb="no"
1798 fi
1799 # end --enable-bdb
1800 # OpenLDAP --with-bdb_module
1801         # Check whether --with-bdb_module or --without-bdb_module was given.
1802 if test "${with_bdb_module+set}" = set; then
1803   withval="$with_bdb_module"
1804   
1805         ol_arg=invalid
1806         for ol_val in static dynamic ; do
1807                 if test "$withval" = "$ol_val" ; then
1808                         ol_arg="$ol_val"
1809                 fi
1810         done
1811         if test "$ol_arg" = "invalid" ; then
1812                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1813         fi
1814         ol_with_bdb_module="$ol_arg"
1815
1816 else
1817         ol_with_bdb_module="static"
1818 fi
1819 # end --with-bdb_module
1820
1821 # OpenLDAP --enable-dnssrv
1822         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1823 if test "${enable_dnssrv+set}" = set; then
1824   enableval="$enable_dnssrv"
1825   
1826         ol_arg=invalid
1827         for ol_val in auto yes no ; do
1828                 if test "$enableval" = "$ol_val" ; then
1829                         ol_arg="$ol_val"
1830                 fi
1831         done
1832         if test "$ol_arg" = "invalid" ; then
1833                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1834         fi
1835         ol_enable_dnssrv="$ol_arg"
1836
1837 else
1838         ol_enable_dnssrv="no"
1839 fi
1840 # end --enable-dnssrv
1841 # OpenLDAP --with-dnssrv_module
1842         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1843 if test "${with_dnssrv_module+set}" = set; then
1844   withval="$with_dnssrv_module"
1845   
1846         ol_arg=invalid
1847         for ol_val in static dynamic ; do
1848                 if test "$withval" = "$ol_val" ; then
1849                         ol_arg="$ol_val"
1850                 fi
1851         done
1852         if test "$ol_arg" = "invalid" ; then
1853                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1854         fi
1855         ol_with_dnssrv_module="$ol_arg"
1856
1857 else
1858         ol_with_dnssrv_module="static"
1859 fi
1860 # end --with-dnssrv_module
1861
1862 # OpenLDAP --enable-ldap
1863         # Check whether --enable-ldap or --disable-ldap was given.
1864 if test "${enable_ldap+set}" = set; then
1865   enableval="$enable_ldap"
1866   
1867         ol_arg=invalid
1868         for ol_val in auto yes no ; do
1869                 if test "$enableval" = "$ol_val" ; then
1870                         ol_arg="$ol_val"
1871                 fi
1872         done
1873         if test "$ol_arg" = "invalid" ; then
1874                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1875         fi
1876         ol_enable_ldap="$ol_arg"
1877
1878 else
1879         ol_enable_ldap="no"
1880 fi
1881 # end --enable-ldap
1882 # OpenLDAP --with-ldap_module
1883         # Check whether --with-ldap_module or --without-ldap_module was given.
1884 if test "${with_ldap_module+set}" = set; then
1885   withval="$with_ldap_module"
1886   
1887         ol_arg=invalid
1888         for ol_val in static dynamic ; do
1889                 if test "$withval" = "$ol_val" ; then
1890                         ol_arg="$ol_val"
1891                 fi
1892         done
1893         if test "$ol_arg" = "invalid" ; then
1894                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1895         fi
1896         ol_with_ldap_module="$ol_arg"
1897
1898 else
1899         ol_with_ldap_module="static"
1900 fi
1901 # end --with-ldap_module
1902
1903 # OpenLDAP --enable-ldbm
1904         # Check whether --enable-ldbm or --disable-ldbm was given.
1905 if test "${enable_ldbm+set}" = set; then
1906   enableval="$enable_ldbm"
1907   
1908         ol_arg=invalid
1909         for ol_val in auto yes no ; do
1910                 if test "$enableval" = "$ol_val" ; then
1911                         ol_arg="$ol_val"
1912                 fi
1913         done
1914         if test "$ol_arg" = "invalid" ; then
1915                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1916         fi
1917         ol_enable_ldbm="$ol_arg"
1918
1919 else
1920         ol_enable_ldbm="yes"
1921 fi
1922 # end --enable-ldbm
1923 # OpenLDAP --with-ldbm_api
1924         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1925 if test "${with_ldbm_api+set}" = set; then
1926   withval="$with_ldbm_api"
1927   
1928         ol_arg=invalid
1929         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1930                 if test "$withval" = "$ol_val" ; then
1931                         ol_arg="$ol_val"
1932                 fi
1933         done
1934         if test "$ol_arg" = "invalid" ; then
1935                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1936         fi
1937         ol_with_ldbm_api="$ol_arg"
1938
1939 else
1940         ol_with_ldbm_api="auto"
1941 fi
1942 # end --with-ldbm_api
1943
1944 # OpenLDAP --with-ldbm_module
1945         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1946 if test "${with_ldbm_module+set}" = set; then
1947   withval="$with_ldbm_module"
1948   
1949         ol_arg=invalid
1950         for ol_val in static dynamic ; do
1951                 if test "$withval" = "$ol_val" ; then
1952                         ol_arg="$ol_val"
1953                 fi
1954         done
1955         if test "$ol_arg" = "invalid" ; then
1956                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1957         fi
1958         ol_with_ldbm_module="$ol_arg"
1959
1960 else
1961         ol_with_ldbm_module="static"
1962 fi
1963 # end --with-ldbm_module
1964
1965 # OpenLDAP --with-ldbm_type
1966         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1967 if test "${with_ldbm_type+set}" = set; then
1968   withval="$with_ldbm_type"
1969   
1970         ol_arg=invalid
1971         for ol_val in auto btree hash ; do
1972                 if test "$withval" = "$ol_val" ; then
1973                         ol_arg="$ol_val"
1974                 fi
1975         done
1976         if test "$ol_arg" = "invalid" ; then
1977                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1978         fi
1979         ol_with_ldbm_type="$ol_arg"
1980
1981 else
1982         ol_with_ldbm_type="auto"
1983 fi
1984 # end --with-ldbm_type
1985
1986 # OpenLDAP --enable-passwd
1987         # Check whether --enable-passwd or --disable-passwd was given.
1988 if test "${enable_passwd+set}" = set; then
1989   enableval="$enable_passwd"
1990   
1991         ol_arg=invalid
1992         for ol_val in auto yes no ; do
1993                 if test "$enableval" = "$ol_val" ; then
1994                         ol_arg="$ol_val"
1995                 fi
1996         done
1997         if test "$ol_arg" = "invalid" ; then
1998                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1999         fi
2000         ol_enable_passwd="$ol_arg"
2001
2002 else
2003         ol_enable_passwd="no"
2004 fi
2005 # end --enable-passwd
2006 # OpenLDAP --with-passwd_module
2007         # Check whether --with-passwd_module or --without-passwd_module was given.
2008 if test "${with_passwd_module+set}" = set; then
2009   withval="$with_passwd_module"
2010   
2011         ol_arg=invalid
2012         for ol_val in static dynamic ; do
2013                 if test "$withval" = "$ol_val" ; then
2014                         ol_arg="$ol_val"
2015                 fi
2016         done
2017         if test "$ol_arg" = "invalid" ; then
2018                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2019         fi
2020         ol_with_passwd_module="$ol_arg"
2021
2022 else
2023         ol_with_passwd_module="static"
2024 fi
2025 # end --with-passwd_module
2026
2027 # OpenLDAP --enable-perl
2028         # Check whether --enable-perl or --disable-perl was given.
2029 if test "${enable_perl+set}" = set; then
2030   enableval="$enable_perl"
2031   
2032         ol_arg=invalid
2033         for ol_val in auto yes no ; do
2034                 if test "$enableval" = "$ol_val" ; then
2035                         ol_arg="$ol_val"
2036                 fi
2037         done
2038         if test "$ol_arg" = "invalid" ; then
2039                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2040         fi
2041         ol_enable_perl="$ol_arg"
2042
2043 else
2044         ol_enable_perl="no"
2045 fi
2046 # end --enable-perl
2047 # OpenLDAP --with-perl_module
2048         # Check whether --with-perl_module or --without-perl_module was given.
2049 if test "${with_perl_module+set}" = set; then
2050   withval="$with_perl_module"
2051   
2052         ol_arg=invalid
2053         for ol_val in static dynamic ; do
2054                 if test "$withval" = "$ol_val" ; then
2055                         ol_arg="$ol_val"
2056                 fi
2057         done
2058         if test "$ol_arg" = "invalid" ; then
2059                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2060         fi
2061         ol_with_perl_module="$ol_arg"
2062
2063 else
2064         ol_with_perl_module="static"
2065 fi
2066 # end --with-perl_module
2067
2068 # OpenLDAP --enable-shell
2069         # Check whether --enable-shell or --disable-shell was given.
2070 if test "${enable_shell+set}" = set; then
2071   enableval="$enable_shell"
2072   
2073         ol_arg=invalid
2074         for ol_val in auto yes no ; do
2075                 if test "$enableval" = "$ol_val" ; then
2076                         ol_arg="$ol_val"
2077                 fi
2078         done
2079         if test "$ol_arg" = "invalid" ; then
2080                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2081         fi
2082         ol_enable_shell="$ol_arg"
2083
2084 else
2085         ol_enable_shell="no"
2086 fi
2087 # end --enable-shell
2088 # OpenLDAP --with-shell_module
2089         # Check whether --with-shell_module or --without-shell_module was given.
2090 if test "${with_shell_module+set}" = set; then
2091   withval="$with_shell_module"
2092   
2093         ol_arg=invalid
2094         for ol_val in static dynamic ; do
2095                 if test "$withval" = "$ol_val" ; then
2096                         ol_arg="$ol_val"
2097                 fi
2098         done
2099         if test "$ol_arg" = "invalid" ; then
2100                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2101         fi
2102         ol_with_shell_module="$ol_arg"
2103
2104 else
2105         ol_with_shell_module="static"
2106 fi
2107 # end --with-shell_module
2108
2109 # OpenLDAP --enable-sql
2110         # Check whether --enable-sql or --disable-sql was given.
2111 if test "${enable_sql+set}" = set; then
2112   enableval="$enable_sql"
2113   
2114         ol_arg=invalid
2115         for ol_val in auto yes no ; do
2116                 if test "$enableval" = "$ol_val" ; then
2117                         ol_arg="$ol_val"
2118                 fi
2119         done
2120         if test "$ol_arg" = "invalid" ; then
2121                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2122         fi
2123         ol_enable_sql="$ol_arg"
2124
2125 else
2126         ol_enable_sql="no"
2127 fi
2128 # end --enable-sql
2129 # OpenLDAP --with-sql_module
2130         # Check whether --with-sql_module or --without-sql_module was given.
2131 if test "${with_sql_module+set}" = set; then
2132   withval="$with_sql_module"
2133   
2134         ol_arg=invalid
2135         for ol_val in static dynamic ; do
2136                 if test "$withval" = "$ol_val" ; then
2137                         ol_arg="$ol_val"
2138                 fi
2139         done
2140         if test "$ol_arg" = "invalid" ; then
2141                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2142         fi
2143         ol_with_sql_module="$ol_arg"
2144
2145 else
2146         ol_with_sql_module="static"
2147 fi
2148 # end --with-sql_module
2149
2150 # OpenLDAP --enable-tcl
2151         # Check whether --enable-tcl or --disable-tcl was given.
2152 if test "${enable_tcl+set}" = set; then
2153   enableval="$enable_tcl"
2154   
2155         ol_arg=invalid
2156         for ol_val in auto yes no ; do
2157                 if test "$enableval" = "$ol_val" ; then
2158                         ol_arg="$ol_val"
2159                 fi
2160         done
2161         if test "$ol_arg" = "invalid" ; then
2162                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2163         fi
2164         ol_enable_tcl="$ol_arg"
2165
2166 else
2167         ol_enable_tcl="no"
2168 fi
2169 # end --enable-tcl
2170 # OpenLDAP --with-tcl_module
2171         # Check whether --with-tcl_module or --without-tcl_module was given.
2172 if test "${with_tcl_module+set}" = set; then
2173   withval="$with_tcl_module"
2174   
2175         ol_arg=invalid
2176         for ol_val in static dynamic ; do
2177                 if test "$withval" = "$ol_val" ; then
2178                         ol_arg="$ol_val"
2179                 fi
2180         done
2181         if test "$ol_arg" = "invalid" ; then
2182                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2183         fi
2184         ol_with_tcl_module="$ol_arg"
2185
2186 else
2187         ol_with_tcl_module="static"
2188 fi
2189 # end --with-tcl_module
2190
2191
2192 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2193 if test "${with_xxslurpdoptions+set}" = set; then
2194   withval="$with_xxslurpdoptions"
2195   :
2196 fi
2197
2198 # OpenLDAP --enable-slurpd
2199         # Check whether --enable-slurpd or --disable-slurpd was given.
2200 if test "${enable_slurpd+set}" = set; then
2201   enableval="$enable_slurpd"
2202   
2203         ol_arg=invalid
2204         for ol_val in auto yes no ; do
2205                 if test "$enableval" = "$ol_val" ; then
2206                         ol_arg="$ol_val"
2207                 fi
2208         done
2209         if test "$ol_arg" = "invalid" ; then
2210                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2211         fi
2212         ol_enable_slurpd="$ol_arg"
2213
2214 else
2215         ol_enable_slurpd="auto"
2216 fi
2217 # end --enable-slurpd
2218
2219 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2220 if test "${with_xxliboptions+set}" = set; then
2221   withval="$with_xxliboptions"
2222   :
2223 fi
2224
2225 # Check whether --enable-static or --disable-static was given.
2226 if test "${enable_static+set}" = set; then
2227   enableval="$enable_static"
2228   p=${PACKAGE-default}
2229 case "$enableval" in
2230 yes) enable_static=yes ;;
2231 no) enable_static=no ;;
2232 *)
2233   enable_static=no
2234   # Look at the argument we got.  We use all the common list separators.
2235   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2236   for pkg in $enableval; do
2237     if test "X$pkg" = "X$p"; then
2238       enable_static=yes
2239     fi
2240   done
2241   IFS="$ac_save_ifs"
2242   ;;
2243 esac
2244 else
2245   enable_static=yes
2246 fi
2247
2248 # Check whether --enable-shared or --disable-shared was given.
2249 if test "${enable_shared+set}" = set; then
2250   enableval="$enable_shared"
2251   p=${PACKAGE-default}
2252 case "$enableval" in
2253 yes) enable_shared=yes ;;
2254 no) enable_shared=no ;;
2255 *)
2256   enable_shared=no
2257   # Look at the argument we got.  We use all the common list separators.
2258   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2259   for pkg in $enableval; do
2260     if test "X$pkg" = "X$p"; then
2261       enable_shared=yes
2262     fi
2263   done
2264   IFS="$ac_save_ifs"
2265   ;;
2266 esac
2267 else
2268   enable_shared=yes
2269 fi
2270
2271
2272
2273 # validate options
2274 if test $ol_enable_slapd = no ; then
2275                 if test $ol_enable_bdb = yes ; then
2276                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2277         fi
2278         if test $ol_enable_dnssrv = yes ; then
2279                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2280         fi
2281         if test $ol_enable_ldap = yes ; then
2282                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2283         fi
2284         if test $ol_enable_ldbm = yes ; then
2285                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2286         fi
2287         if test $ol_enable_passwd = yes ; then
2288                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2289         fi
2290         if test $ol_enable_perl = yes ; then
2291                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2292         fi
2293         if test $ol_enable_shell = yes ; then
2294                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2295         fi
2296         if test $ol_enable_tcl = yes ; then
2297                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2298         fi
2299         if test $ol_enable_sql = yes ; then
2300                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2301         fi
2302         if test $ol_enable_modules = yes ; then
2303                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2304         fi
2305         if test $ol_enable_multimaster = yes ; then
2306                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2307         fi
2308         if test $ol_enable_wrappers = yes ; then
2309                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2310         fi
2311         if test $ol_enable_phonetic = yes ; then
2312                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2313         fi
2314         if test $ol_enable_rlookups = yes ; then
2315                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2316         fi
2317         if test $ol_enable_aci = yes ; then
2318                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2319         fi
2320         if test $ol_with_ldbm_api != auto ; then
2321                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2322         fi
2323         if test $ol_with_ldbm_type != auto ; then
2324                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2325         fi
2326         if test $ol_with_bdb_module != static ; then
2327                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2328         fi
2329         if test $ol_with_dnssrv_module != static ; then
2330                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2331         fi
2332         if test $ol_with_ldap_module != static ; then
2333                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2334         fi
2335         if test $ol_with_ldbm_module != static ; then
2336                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2337         fi
2338         if test $ol_with_passwd_module != static ; then
2339                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2340         fi
2341         if test $ol_with_perl_module != static ; then
2342                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2343         fi
2344         if test $ol_with_shell_module != static ; then
2345                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2346         fi
2347         if test $ol_with_tcl_module != static ; then
2348                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2349         fi
2350         if test $ol_with_sql_module != static ; then
2351                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2352         fi
2353         if test $ol_enable_slurpd = yes ; then
2354                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2355         fi
2356
2357         # force settings to no
2358         ol_enable_bdb=no
2359         ol_enable_dnssrv=no
2360         ol_enable_ldap=no
2361         ol_enable_ldbm=no
2362         ol_enable_passwd=no
2363         ol_enable_perl=no
2364         ol_enable_shell=no
2365         ol_enable_tcl=no
2366         ol_enable_sql=no
2367
2368         ol_enable_modules=no
2369         ol_enable_multimaster=no
2370         ol_enable_phonetic=no
2371         ol_enable_rlookups=no
2372         ol_enable_aci=no
2373         ol_enable_wrappers=no
2374         ol_enable_dynamic=no
2375
2376         ol_with_ldbm_api=no
2377         ol_with_ldbm_type=no
2378
2379         ol_with_bdb_module=static
2380         ol_with_dnssrv_module=static
2381         ol_with_ldap_module=static
2382         ol_with_ldbm_module=static
2383         ol_with_passwd_module=static
2384         ol_with_perl_module=static
2385         ol_with_shell_module=static
2386         ol_with_tcl_module=static
2387         ol_with_sql_module=static
2388
2389         ol_enable_slurpd=no
2390
2391 elif test $ol_enable_ldbm = no ; then
2392         
2393         if test $ol_with_ldbm_api != auto ; then
2394                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2395         fi
2396
2397         if test $ol_with_ldbm_type != auto ; then
2398                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2399         fi
2400
2401         if test $ol_with_ldbm_module != static ; then
2402                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2403         fi
2404
2405         if test $ol_enable_modules != yes -a \
2406                 $ol_enable_bdb = no -a \
2407                 $ol_enable_dnssrv = no -a \
2408                 $ol_enable_ldap = no -a \
2409                 $ol_enable_passwd = no -a \
2410                 $ol_enable_perl = no -a \
2411                 $ol_enable_shell = no -a \
2412                 $ol_enable_sql = no -a \
2413                 $ol_enable_tcl = no ; then
2414                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2415         fi
2416
2417         ol_with_ldbm_api=no
2418         ol_with_ldbm_type=no
2419         ol_with_ldbm_module=static
2420
2421 else
2422                 if test $ol_with_ldbm_api = gdbm -a \
2423                 $ol_with_ldbm_type = btree ; then
2424                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2425         fi
2426         if test $ol_with_ldbm_api = mdbm -a \
2427                 $ol_with_ldbm_type = btree ; then
2428                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2429         fi
2430         if test $ol_with_ldbm_api = ndbm -a \
2431                 $ol_with_ldbm_type = btree ; then
2432                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2433         fi
2434 fi
2435
2436 if test $ol_enable_slurpd = yes ; then
2437                 if test $ol_with_threads = no ; then
2438                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2439         fi
2440 fi
2441
2442 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2443         if test $ol_with_kerberos = no ; then
2444                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2445         fi
2446         ol_with_kerberos=yes
2447 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2448         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2449                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2450         fi
2451         ol_with_kerberos=no
2452 fi
2453
2454 if test $ol_enable_spasswd = yes ; then
2455         if test $ol_with_cyrus_sasl = no ; then
2456                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2457         fi
2458         ol_with_cyrus_sasl=yes
2459 fi
2460
2461 echo "$ac_t""done" 1>&6
2462
2463 LDAP_LIBS=
2464 LDIF_LIBS=
2465 LDBM_LIBS=
2466 LTHREAD_LIBS=
2467 LUTIL_LIBS=
2468
2469 SLAPD_LIBS=
2470 SLURPD_LIBS=
2471
2472 BUILD_SLAPD=no
2473 BUILD_SLURPD=no
2474
2475 BUILD_THREAD=no
2476
2477 BUILD_BDB=no
2478 BUILD_DNSSRV=no
2479 BUILD_LDAP=no
2480 BUILD_LDBM=no
2481 BUILD_PASSWD=no
2482 BUILD_PERL=no
2483 BUILD_SHELL=no
2484 BUILD_SQL=no
2485 BUILD_TCL=no
2486
2487 BUILD_BDB_DYNAMIC=static
2488 BUILD_DNSSRV_DYNAMIC=static
2489 BUILD_LDAP_DYNAMIC=static
2490 BUILD_LDBM_DYNAMIC=static
2491 BUILD_PASSWD_DYNAMIC=static
2492 BUILD_PERL_DYNAMIC=static
2493 BUILD_SHELL_DYNAMIC=static
2494 BUILD_TCL_DYNAMIC=static
2495 BUILD_SQL_DYNAMIC=static
2496
2497 SLAPD_MODULES_LDFLAGS=
2498 SLAPD_MODULES_CPPFLAGS=
2499 SLAPD_MODULES_LIST=
2500
2501 SLAPD_PERL_LDFLAGS=
2502 MOD_PERL_LDFLAGS=
2503 PERL_CPPFLAGS=
2504
2505 SLAPD_SQL_LDFLAGS=
2506 SLAPD_SQL_LIBS=
2507 SLAPD_SQL_INCLUDES=
2508
2509 MOD_TCL_LIB=
2510 KRB4_LIBS=
2511 KRB5_LIBS=
2512 READLINE_LIBS=
2513 SASL_LIBS=
2514 TERMCAP_LIBS=
2515 TLS_LIBS=
2516 MODULES_LIBS=
2517 AUTH_LIBS=
2518
2519
2520
2521 cat >> confdefs.h <<\EOF
2522 #define HAVE_MKVERSION 1
2523 EOF
2524
2525
2526
2527
2528 ol_aix_threads=no
2529 case "$target" in
2530 *-*-aix*)       if test -z "$CC" ; then
2531                 case "$ol_with_threads" in
2532                 auto | yes |  posix) ol_aix_threads=yes ;;
2533                 esac
2534         fi
2535 ;;
2536 esac
2537
2538 if test $ol_aix_threads = yes ; then
2539         if test -z "${CC}" ; then
2540                 for ac_prog in cc_r xlc_r cc
2541 do
2542 # Extract the first word of "$ac_prog", so it can be a program name with args.
2543 set dummy $ac_prog; ac_word=$2
2544 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2545 echo "configure:2546: checking for $ac_word" >&5
2546 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2547   echo $ac_n "(cached) $ac_c" 1>&6
2548 else
2549   if test -n "$CC"; then
2550   ac_cv_prog_CC="$CC" # Let the user override the test.
2551 else
2552   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2553   ac_dummy="$PATH"
2554   for ac_dir in $ac_dummy; do
2555     test -z "$ac_dir" && ac_dir=.
2556     if test -f $ac_dir/$ac_word; then
2557       ac_cv_prog_CC="$ac_prog"
2558       break
2559     fi
2560   done
2561   IFS="$ac_save_ifs"
2562 fi
2563 fi
2564 CC="$ac_cv_prog_CC"
2565 if test -n "$CC"; then
2566   echo "$ac_t""$CC" 1>&6
2567 else
2568   echo "$ac_t""no" 1>&6
2569 fi
2570
2571 test -n "$CC" && break
2572 done
2573
2574
2575                 if test "$CC" = cc ; then
2576                                                 if test $ol_with_threads != auto ; then
2577                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2578                         else
2579                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2580                         fi
2581                         ol_with_threads=no
2582                 fi
2583         fi
2584
2585         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2586                 ol_with_threads=posix
2587                 ol_cv_pthread_create=yes
2588         fi
2589 fi
2590
2591 if test -z "${CC}"; then
2592         for ac_prog in cc
2593 do
2594 # Extract the first word of "$ac_prog", so it can be a program name with args.
2595 set dummy $ac_prog; ac_word=$2
2596 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2597 echo "configure:2598: checking for $ac_word" >&5
2598 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2599   echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601   if test -n "$CC"; then
2602   ac_cv_prog_CC="$CC" # Let the user override the test.
2603 else
2604   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2605   ac_dummy="$PATH"
2606   for ac_dir in $ac_dummy; do
2607     test -z "$ac_dir" && ac_dir=.
2608     if test -f $ac_dir/$ac_word; then
2609       ac_cv_prog_CC="$ac_prog"
2610       break
2611     fi
2612   done
2613   IFS="$ac_save_ifs"
2614 fi
2615 fi
2616 CC="$ac_cv_prog_CC"
2617 if test -n "$CC"; then
2618   echo "$ac_t""$CC" 1>&6
2619 else
2620   echo "$ac_t""no" 1>&6
2621 fi
2622
2623 test -n "$CC" && break
2624 done
2625
2626 fi
2627
2628
2629
2630
2631 # Check whether --enable-fast-install or --disable-fast-install was given.
2632 if test "${enable_fast_install+set}" = set; then
2633   enableval="$enable_fast_install"
2634   p=${PACKAGE-default}
2635 case "$enableval" in
2636 yes) enable_fast_install=yes ;;
2637 no) enable_fast_install=no ;;
2638 *)
2639   enable_fast_install=no
2640   # Look at the argument we got.  We use all the common list separators.
2641   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2642   for pkg in $enableval; do
2643     if test "X$pkg" = "X$p"; then
2644       enable_fast_install=yes
2645     fi
2646   done
2647   IFS="$ac_save_ifs"
2648   ;;
2649 esac
2650 else
2651   enable_fast_install=yes
2652 fi
2653
2654 # Extract the first word of "ranlib", so it can be a program name with args.
2655 set dummy ranlib; ac_word=$2
2656 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2657 echo "configure:2658: checking for $ac_word" >&5
2658 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2659   echo $ac_n "(cached) $ac_c" 1>&6
2660 else
2661   if test -n "$RANLIB"; then
2662   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2663 else
2664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2665   ac_dummy="$PATH"
2666   for ac_dir in $ac_dummy; do
2667     test -z "$ac_dir" && ac_dir=.
2668     if test -f $ac_dir/$ac_word; then
2669       ac_cv_prog_RANLIB="ranlib"
2670       break
2671     fi
2672   done
2673   IFS="$ac_save_ifs"
2674   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2675 fi
2676 fi
2677 RANLIB="$ac_cv_prog_RANLIB"
2678 if test -n "$RANLIB"; then
2679   echo "$ac_t""$RANLIB" 1>&6
2680 else
2681   echo "$ac_t""no" 1>&6
2682 fi
2683
2684 # Extract the first word of "gcc", so it can be a program name with args.
2685 set dummy gcc; ac_word=$2
2686 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2687 echo "configure:2688: checking for $ac_word" >&5
2688 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2689   echo $ac_n "(cached) $ac_c" 1>&6
2690 else
2691   if test -n "$CC"; then
2692   ac_cv_prog_CC="$CC" # Let the user override the test.
2693 else
2694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2695   ac_dummy="$PATH"
2696   for ac_dir in $ac_dummy; do
2697     test -z "$ac_dir" && ac_dir=.
2698     if test -f $ac_dir/$ac_word; then
2699       ac_cv_prog_CC="gcc"
2700       break
2701     fi
2702   done
2703   IFS="$ac_save_ifs"
2704 fi
2705 fi
2706 CC="$ac_cv_prog_CC"
2707 if test -n "$CC"; then
2708   echo "$ac_t""$CC" 1>&6
2709 else
2710   echo "$ac_t""no" 1>&6
2711 fi
2712
2713 if test -z "$CC"; then
2714   # Extract the first word of "cc", so it can be a program name with args.
2715 set dummy cc; ac_word=$2
2716 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2717 echo "configure:2718: checking for $ac_word" >&5
2718 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2719   echo $ac_n "(cached) $ac_c" 1>&6
2720 else
2721   if test -n "$CC"; then
2722   ac_cv_prog_CC="$CC" # Let the user override the test.
2723 else
2724   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2725   ac_prog_rejected=no
2726   ac_dummy="$PATH"
2727   for ac_dir in $ac_dummy; do
2728     test -z "$ac_dir" && ac_dir=.
2729     if test -f $ac_dir/$ac_word; then
2730       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2731         ac_prog_rejected=yes
2732         continue
2733       fi
2734       ac_cv_prog_CC="cc"
2735       break
2736     fi
2737   done
2738   IFS="$ac_save_ifs"
2739 if test $ac_prog_rejected = yes; then
2740   # We found a bogon in the path, so make sure we never use it.
2741   set dummy $ac_cv_prog_CC
2742   shift
2743   if test $# -gt 0; then
2744     # We chose a different compiler from the bogus one.
2745     # However, it has the same basename, so the bogon will be chosen
2746     # first if we set CC to just the basename; use the full file name.
2747     shift
2748     set dummy "$ac_dir/$ac_word" "$@"
2749     shift
2750     ac_cv_prog_CC="$@"
2751   fi
2752 fi
2753 fi
2754 fi
2755 CC="$ac_cv_prog_CC"
2756 if test -n "$CC"; then
2757   echo "$ac_t""$CC" 1>&6
2758 else
2759   echo "$ac_t""no" 1>&6
2760 fi
2761
2762   if test -z "$CC"; then
2763     case "`uname -s`" in
2764     *win32* | *WIN32* | *CYGWIN*)
2765       # Extract the first word of "cl", so it can be a program name with args.
2766 set dummy cl; ac_word=$2
2767 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2768 echo "configure:2769: checking for $ac_word" >&5
2769 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2770   echo $ac_n "(cached) $ac_c" 1>&6
2771 else
2772   if test -n "$CC"; then
2773   ac_cv_prog_CC="$CC" # Let the user override the test.
2774 else
2775   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2776   ac_dummy="$PATH"
2777   for ac_dir in $ac_dummy; do
2778     test -z "$ac_dir" && ac_dir=.
2779     if test -f $ac_dir/$ac_word; then
2780       ac_cv_prog_CC="cl"
2781       break
2782     fi
2783   done
2784   IFS="$ac_save_ifs"
2785 fi
2786 fi
2787 CC="$ac_cv_prog_CC"
2788 if test -n "$CC"; then
2789   echo "$ac_t""$CC" 1>&6
2790 else
2791   echo "$ac_t""no" 1>&6
2792 fi
2793  ;;
2794     esac
2795   fi
2796   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2797 fi
2798
2799 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2800 echo "configure:2801: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2801
2802 ac_ext=c
2803 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2804 ac_cpp='$CPP $CPPFLAGS'
2805 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2806 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2807 cross_compiling=$ac_cv_prog_cc_cross
2808
2809 cat > conftest.$ac_ext << EOF
2810
2811 #line 2812 "configure"
2812 #include "confdefs.h"
2813
2814 main(){return(0);}
2815 EOF
2816 if { (eval echo configure:2817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2817   ac_cv_prog_cc_works=yes
2818   # If we can't run a trivial program, we are probably using a cross compiler.
2819   if (./conftest; exit) 2>/dev/null; then
2820     ac_cv_prog_cc_cross=no
2821   else
2822     ac_cv_prog_cc_cross=yes
2823   fi
2824 else
2825   echo "configure: failed program was:" >&5
2826   cat conftest.$ac_ext >&5
2827   ac_cv_prog_cc_works=no
2828 fi
2829 rm -fr conftest*
2830 ac_ext=c
2831 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2832 ac_cpp='$CPP $CPPFLAGS'
2833 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2834 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2835 cross_compiling=$ac_cv_prog_cc_cross
2836
2837 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2838 if test $ac_cv_prog_cc_works = no; then
2839   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2840 fi
2841 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2842 echo "configure:2843: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2843 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2844 cross_compiling=$ac_cv_prog_cc_cross
2845
2846 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2847 echo "configure:2848: checking whether we are using GNU C" >&5
2848 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2849   echo $ac_n "(cached) $ac_c" 1>&6
2850 else
2851   cat > conftest.c <<EOF
2852 #ifdef __GNUC__
2853   yes;
2854 #endif
2855 EOF
2856 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2857   ac_cv_prog_gcc=yes
2858 else
2859   ac_cv_prog_gcc=no
2860 fi
2861 fi
2862
2863 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2864
2865 if test $ac_cv_prog_gcc = yes; then
2866   GCC=yes
2867 else
2868   GCC=
2869 fi
2870
2871 ac_test_CFLAGS="${CFLAGS+set}"
2872 ac_save_CFLAGS="$CFLAGS"
2873 CFLAGS=
2874 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2875 echo "configure:2876: checking whether ${CC-cc} accepts -g" >&5
2876 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2877   echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879   echo 'void f(){}' > conftest.c
2880 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2881   ac_cv_prog_cc_g=yes
2882 else
2883   ac_cv_prog_cc_g=no
2884 fi
2885 rm -f conftest*
2886
2887 fi
2888
2889 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2890 if test "$ac_test_CFLAGS" = set; then
2891   CFLAGS="$ac_save_CFLAGS"
2892 elif test $ac_cv_prog_cc_g = yes; then
2893   if test "$GCC" = yes; then
2894     CFLAGS="-g -O2"
2895   else
2896     CFLAGS="-g"
2897   fi
2898 else
2899   if test "$GCC" = yes; then
2900     CFLAGS="-O2"
2901   else
2902     CFLAGS=
2903   fi
2904 fi
2905
2906 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2907 if test "${with_gnu_ld+set}" = set; then
2908   withval="$with_gnu_ld"
2909   test "$withval" = no || with_gnu_ld=yes
2910 else
2911   with_gnu_ld=no
2912 fi
2913
2914 ac_prog=ld
2915 if test "$ac_cv_prog_gcc" = yes; then
2916   # Check if gcc -print-prog-name=ld gives a path.
2917   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2918 echo "configure:2919: checking for ld used by GCC" >&5
2919   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2920   case "$ac_prog" in
2921     # Accept absolute paths.
2922     [\\/]* | [A-Za-z]:[\\/]*)
2923       re_direlt='/[^/][^/]*/\.\./'
2924       # Canonicalize the path of ld
2925       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2926       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2927         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2928       done
2929       test -z "$LD" && LD="$ac_prog"
2930       ;;
2931   "")
2932     # If it fails, then pretend we aren't using GCC.
2933     ac_prog=ld
2934     ;;
2935   *)
2936     # If it is relative, then search for the first ld in PATH.
2937     with_gnu_ld=unknown
2938     ;;
2939   esac
2940 elif test "$with_gnu_ld" = yes; then
2941   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2942 echo "configure:2943: checking for GNU ld" >&5
2943 else
2944   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2945 echo "configure:2946: checking for non-GNU ld" >&5
2946 fi
2947 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2948   echo $ac_n "(cached) $ac_c" 1>&6
2949 else
2950   if test -z "$LD"; then
2951   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2952   for ac_dir in $PATH; do
2953     test -z "$ac_dir" && ac_dir=.
2954     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2955       ac_cv_path_LD="$ac_dir/$ac_prog"
2956       # Check to see if the program is GNU ld.  I'd rather use --version,
2957       # but apparently some GNU ld's only accept -v.
2958       # Break only if it was the GNU/non-GNU ld that we prefer.
2959       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2960         test "$with_gnu_ld" != no && break
2961       else
2962         test "$with_gnu_ld" != yes && break
2963       fi
2964     fi
2965   done
2966   IFS="$ac_save_ifs"
2967 else
2968   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2969 fi
2970 fi
2971
2972 LD="$ac_cv_path_LD"
2973 if test -n "$LD"; then
2974   echo "$ac_t""$LD" 1>&6
2975 else
2976   echo "$ac_t""no" 1>&6
2977 fi
2978 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2979 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2980 echo "configure:2981: checking if the linker ($LD) is GNU ld" >&5
2981 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2982   echo $ac_n "(cached) $ac_c" 1>&6
2983 else
2984   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2985 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2986   ac_cv_prog_gnu_ld=yes
2987 else
2988   ac_cv_prog_gnu_ld=no
2989 fi
2990 fi
2991
2992 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2993
2994
2995 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2996 echo "configure:2997: checking for BSD-compatible nm" >&5
2997 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2998   echo $ac_n "(cached) $ac_c" 1>&6
2999 else
3000   if test -n "$NM"; then
3001   # Let the user override the test.
3002   ac_cv_path_NM="$NM"
3003 else
3004   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3005   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3006     test -z "$ac_dir" && ac_dir=.
3007     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3008       # Check to see if the nm accepts a BSD-compat flag.
3009       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3010       #   nm: unknown option "B" ignored
3011       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3012         ac_cv_path_NM="$ac_dir/nm -B"
3013         break
3014       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3015         ac_cv_path_NM="$ac_dir/nm -p"
3016         break
3017       else
3018         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3019         continue # so that we can try to find one that supports BSD flags
3020       fi
3021     fi
3022   done
3023   IFS="$ac_save_ifs"
3024   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3025 fi
3026 fi
3027
3028 NM="$ac_cv_path_NM"
3029 echo "$ac_t""$NM" 1>&6
3030
3031 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3032 echo "configure:3033: checking whether ln -s works" >&5
3033 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3034   echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036   rm -f conftestdata
3037 if ln -s X conftestdata 2>/dev/null
3038 then
3039   rm -f conftestdata
3040   ac_cv_prog_LN_S="ln -s"
3041 else
3042   ac_cv_prog_LN_S=ln
3043 fi
3044 fi
3045 LN_S="$ac_cv_prog_LN_S"
3046 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3047   echo "$ac_t""yes" 1>&6
3048 else
3049   echo "$ac_t""no" 1>&6
3050 fi
3051
3052 if test $host != $build; then
3053   ac_tool_prefix=${host_alias}-
3054 else
3055   ac_tool_prefix=
3056 fi
3057
3058
3059 case "$target" in
3060 NONE) lt_target="$host" ;;
3061 *) lt_target="$target" ;;
3062 esac
3063
3064 # Check for any special flags to pass to ltconfig.
3065 libtool_flags="--cache-file=$cache_file"
3066 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3067 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3068 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3069 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3070 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3071 libtool_flags="$libtool_flags --enable-dlopen"
3072 libtool_flags="$libtool_flags --enable-win32-dll"
3073 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3074 if test "${enable_libtool_lock+set}" = set; then
3075   enableval="$enable_libtool_lock"
3076   :
3077 fi
3078
3079 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3080 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3081
3082 # Some flags need to be propagated to the compiler or linker for good
3083 # libtool support.
3084 case "$lt_target" in
3085 *-*-irix6*)
3086   # Find out which ABI we are using.
3087   echo '#line 3088 "configure"' > conftest.$ac_ext
3088   if { (eval echo configure:3089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3089     case "`/usr/bin/file conftest.o`" in
3090     *32-bit*)
3091       LD="${LD-ld} -32"
3092       ;;
3093     *N32*)
3094       LD="${LD-ld} -n32"
3095       ;;
3096     *64-bit*)
3097       LD="${LD-ld} -64"
3098       ;;
3099     esac
3100   fi
3101   rm -rf conftest*
3102   ;;
3103
3104 *-*-sco3.2v5*)
3105   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3106   SAVE_CFLAGS="$CFLAGS"
3107   CFLAGS="$CFLAGS -belf"
3108   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3109 echo "configure:3110: checking whether the C compiler needs -belf" >&5
3110 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3111   echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113   cat > conftest.$ac_ext <<EOF
3114 #line 3115 "configure"
3115 #include "confdefs.h"
3116
3117 int main() {
3118
3119 ; return 0; }
3120 EOF
3121 if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3122   rm -rf conftest*
3123   lt_cv_cc_needs_belf=yes
3124 else
3125   echo "configure: failed program was:" >&5
3126   cat conftest.$ac_ext >&5
3127   rm -rf conftest*
3128   lt_cv_cc_needs_belf=no
3129 fi
3130 rm -f conftest*
3131 fi
3132
3133 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3134   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3135     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3136     CFLAGS="$SAVE_CFLAGS"
3137   fi
3138   ;;
3139
3140 *-*-cygwin* | *-*-mingw*)
3141   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3142 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3143 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3144 echo "configure:3145: checking for $ac_word" >&5
3145 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3146   echo $ac_n "(cached) $ac_c" 1>&6
3147 else
3148   if test -n "$DLLTOOL"; then
3149   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3150 else
3151   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3152   ac_dummy="$PATH"
3153   for ac_dir in $ac_dummy; do
3154     test -z "$ac_dir" && ac_dir=.
3155     if test -f $ac_dir/$ac_word; then
3156       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3157       break
3158     fi
3159   done
3160   IFS="$ac_save_ifs"
3161 fi
3162 fi
3163 DLLTOOL="$ac_cv_prog_DLLTOOL"
3164 if test -n "$DLLTOOL"; then
3165   echo "$ac_t""$DLLTOOL" 1>&6
3166 else
3167   echo "$ac_t""no" 1>&6
3168 fi
3169
3170
3171 if test -z "$ac_cv_prog_DLLTOOL"; then
3172 if test -n "$ac_tool_prefix"; then
3173   # Extract the first word of "dlltool", so it can be a program name with args.
3174 set dummy dlltool; ac_word=$2
3175 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3176 echo "configure:3177: checking for $ac_word" >&5
3177 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   if test -n "$DLLTOOL"; then
3181   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3182 else
3183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3184   ac_dummy="$PATH"
3185   for ac_dir in $ac_dummy; do
3186     test -z "$ac_dir" && ac_dir=.
3187     if test -f $ac_dir/$ac_word; then
3188       ac_cv_prog_DLLTOOL="dlltool"
3189       break
3190     fi
3191   done
3192   IFS="$ac_save_ifs"
3193   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3194 fi
3195 fi
3196 DLLTOOL="$ac_cv_prog_DLLTOOL"
3197 if test -n "$DLLTOOL"; then
3198   echo "$ac_t""$DLLTOOL" 1>&6
3199 else
3200   echo "$ac_t""no" 1>&6
3201 fi
3202
3203 else
3204   DLLTOOL="false"
3205 fi
3206 fi
3207
3208   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3209 set dummy ${ac_tool_prefix}as; ac_word=$2
3210 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3211 echo "configure:3212: checking for $ac_word" >&5
3212 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3213   echo $ac_n "(cached) $ac_c" 1>&6
3214 else
3215   if test -n "$AS"; then
3216   ac_cv_prog_AS="$AS" # Let the user override the test.
3217 else
3218   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3219   ac_dummy="$PATH"
3220   for ac_dir in $ac_dummy; do
3221     test -z "$ac_dir" && ac_dir=.
3222     if test -f $ac_dir/$ac_word; then
3223       ac_cv_prog_AS="${ac_tool_prefix}as"
3224       break
3225     fi
3226   done
3227   IFS="$ac_save_ifs"
3228 fi
3229 fi
3230 AS="$ac_cv_prog_AS"
3231 if test -n "$AS"; then
3232   echo "$ac_t""$AS" 1>&6
3233 else
3234   echo "$ac_t""no" 1>&6
3235 fi
3236
3237
3238 if test -z "$ac_cv_prog_AS"; then
3239 if test -n "$ac_tool_prefix"; then
3240   # Extract the first word of "as", so it can be a program name with args.
3241 set dummy as; ac_word=$2
3242 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3243 echo "configure:3244: checking for $ac_word" >&5
3244 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3245   echo $ac_n "(cached) $ac_c" 1>&6
3246 else
3247   if test -n "$AS"; then
3248   ac_cv_prog_AS="$AS" # Let the user override the test.
3249 else
3250   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3251   ac_dummy="$PATH"
3252   for ac_dir in $ac_dummy; do
3253     test -z "$ac_dir" && ac_dir=.
3254     if test -f $ac_dir/$ac_word; then
3255       ac_cv_prog_AS="as"
3256       break
3257     fi
3258   done
3259   IFS="$ac_save_ifs"
3260   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3261 fi
3262 fi
3263 AS="$ac_cv_prog_AS"
3264 if test -n "$AS"; then
3265   echo "$ac_t""$AS" 1>&6
3266 else
3267   echo "$ac_t""no" 1>&6
3268 fi
3269
3270 else
3271   AS="false"
3272 fi
3273 fi
3274
3275   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3276 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3277 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3278 echo "configure:3279: checking for $ac_word" >&5
3279 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3280   echo $ac_n "(cached) $ac_c" 1>&6
3281 else
3282   if test -n "$OBJDUMP"; then
3283   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3284 else
3285   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3286   ac_dummy="$PATH"
3287   for ac_dir in $ac_dummy; do
3288     test -z "$ac_dir" && ac_dir=.
3289     if test -f $ac_dir/$ac_word; then
3290       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3291       break
3292     fi
3293   done
3294   IFS="$ac_save_ifs"
3295 fi
3296 fi
3297 OBJDUMP="$ac_cv_prog_OBJDUMP"
3298 if test -n "$OBJDUMP"; then
3299   echo "$ac_t""$OBJDUMP" 1>&6
3300 else
3301   echo "$ac_t""no" 1>&6
3302 fi
3303
3304
3305 if test -z "$ac_cv_prog_OBJDUMP"; then
3306 if test -n "$ac_tool_prefix"; then
3307   # Extract the first word of "objdump", so it can be a program name with args.
3308 set dummy objdump; ac_word=$2
3309 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3310 echo "configure:3311: checking for $ac_word" >&5
3311 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3312   echo $ac_n "(cached) $ac_c" 1>&6
3313 else
3314   if test -n "$OBJDUMP"; then
3315   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3316 else
3317   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3318   ac_dummy="$PATH"
3319   for ac_dir in $ac_dummy; do
3320     test -z "$ac_dir" && ac_dir=.
3321     if test -f $ac_dir/$ac_word; then
3322       ac_cv_prog_OBJDUMP="objdump"
3323       break
3324     fi
3325   done
3326   IFS="$ac_save_ifs"
3327   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3328 fi
3329 fi
3330 OBJDUMP="$ac_cv_prog_OBJDUMP"
3331 if test -n "$OBJDUMP"; then
3332   echo "$ac_t""$OBJDUMP" 1>&6
3333 else
3334   echo "$ac_t""no" 1>&6
3335 fi
3336
3337 else
3338   OBJDUMP="false"
3339 fi
3340 fi
3341
3342   ;;
3343
3344 esac
3345
3346
3347 # Save cache, so that ltconfig can load it
3348
3349
3350 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3351 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3352 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3353 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3354 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3355 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3356 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3357 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3358
3359 # Reload cache, that may have been modified by ltconfig
3360
3361
3362 # This can be used to rebuild libtool when needed
3363 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3364
3365 # Always use our own libtool.
3366 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3367
3368 # Redirect the config.log output again, so that the ltconfig log is not
3369 # clobbered by the next message.
3370 exec 5>>./config.log
3371
3372
3373 for ac_prog in mawk gawk nawk awk
3374 do
3375 # Extract the first word of "$ac_prog", so it can be a program name with args.
3376 set dummy $ac_prog; ac_word=$2
3377 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3378 echo "configure:3379: checking for $ac_word" >&5
3379 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3380   echo $ac_n "(cached) $ac_c" 1>&6
3381 else
3382   if test -n "$AWK"; then
3383   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3384 else
3385   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3386   ac_dummy="$PATH"
3387   for ac_dir in $ac_dummy; do
3388     test -z "$ac_dir" && ac_dir=.
3389     if test -f $ac_dir/$ac_word; then
3390       ac_cv_prog_AWK="$ac_prog"
3391       break
3392     fi
3393   done
3394   IFS="$ac_save_ifs"
3395 fi
3396 fi
3397 AWK="$ac_cv_prog_AWK"
3398 if test -n "$AWK"; then
3399   echo "$ac_t""$AWK" 1>&6
3400 else
3401   echo "$ac_t""no" 1>&6
3402 fi
3403
3404 test -n "$AWK" && break
3405 done
3406
3407 # test for ln hardlink support
3408 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3409 echo "configure:3410: checking whether ln works" >&5
3410 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3411   echo $ac_n "(cached) $ac_c" 1>&6
3412 else
3413   rm -f conftest.src conftest.dst
3414 echo "conftest" > conftest.src
3415 if ln conftest.src conftest.dst 2>/dev/null
3416 then
3417   ol_cv_prog_LN_H="ln"
3418 else
3419   ol_cv_prog_LN_H="cp"
3420 fi
3421 rm -f conftest.src conftest.dst
3422
3423 fi
3424 LN_H="$ol_cv_prog_LN_H"
3425 if test "$ol_cv_prog_LN_H" = "ln"; then
3426         echo "$ac_t""yes" 1>&6
3427 else
3428         echo "$ac_t""no" 1>&6
3429 fi
3430
3431 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3432 echo "configure:3433: checking whether ln -s works" >&5
3433 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3434   echo $ac_n "(cached) $ac_c" 1>&6
3435 else
3436   rm -f conftestdata
3437 if ln -s X conftestdata 2>/dev/null
3438 then
3439   rm -f conftestdata
3440   ac_cv_prog_LN_S="ln -s"
3441 else
3442   ac_cv_prog_LN_S=ln
3443 fi
3444 fi
3445 LN_S="$ac_cv_prog_LN_S"
3446 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3447   echo "$ac_t""yes" 1>&6
3448 else
3449   echo "$ac_t""no" 1>&6
3450 fi
3451
3452
3453 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3454         LN_S="$LN_H"
3455 fi
3456
3457 # Extract the first word of "sendmail", so it can be a program name with args.
3458 set dummy sendmail; ac_word=$2
3459 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3460 echo "configure:3461: checking for $ac_word" >&5
3461 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3462   echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464   case "$SENDMAIL" in
3465   /*)
3466   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3467   ;;
3468   ?:/*)
3469   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3470   ;;
3471   *)
3472   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3473   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3474   for ac_dir in $ac_dummy; do 
3475     test -z "$ac_dir" && ac_dir=.
3476     if test -f $ac_dir/$ac_word; then
3477       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3478       break
3479     fi
3480   done
3481   IFS="$ac_save_ifs"
3482   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3483   ;;
3484 esac
3485 fi
3486 SENDMAIL="$ac_cv_path_SENDMAIL"
3487 if test -n "$SENDMAIL"; then
3488   echo "$ac_t""$SENDMAIL" 1>&6
3489 else
3490   echo "$ac_t""no" 1>&6
3491 fi
3492
3493 # Extract the first word of "vi", so it can be a program name with args.
3494 set dummy vi; ac_word=$2
3495 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3496 echo "configure:3497: checking for $ac_word" >&5
3497 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3498   echo $ac_n "(cached) $ac_c" 1>&6
3499 else
3500   case "$EDITOR" in
3501   /*)
3502   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3503   ;;
3504   ?:/*)
3505   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3506   ;;
3507   *)
3508   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3509   ac_dummy="$PATH:/usr/ucb"
3510   for ac_dir in $ac_dummy; do 
3511     test -z "$ac_dir" && ac_dir=.
3512     if test -f $ac_dir/$ac_word; then
3513       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3514       break
3515     fi
3516   done
3517   IFS="$ac_save_ifs"
3518   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3519   ;;
3520 esac
3521 fi
3522 EDITOR="$ac_cv_path_EDITOR"
3523 if test -n "$EDITOR"; then
3524   echo "$ac_t""$EDITOR" 1>&6
3525 else
3526   echo "$ac_t""no" 1>&6
3527 fi
3528
3529 # Extract the first word of "finger", so it can be a program name with args.
3530 set dummy finger; ac_word=$2
3531 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3532 echo "configure:3533: checking for $ac_word" >&5
3533 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3534   echo $ac_n "(cached) $ac_c" 1>&6
3535 else
3536   case "$FINGER" in
3537   /*)
3538   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3539   ;;
3540   ?:/*)
3541   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3542   ;;
3543   *)
3544   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3545   ac_dummy="$PATH:/usr/ucb"
3546   for ac_dir in $ac_dummy; do 
3547     test -z "$ac_dir" && ac_dir=.
3548     if test -f $ac_dir/$ac_word; then
3549       ac_cv_path_FINGER="$ac_dir/$ac_word"
3550       break
3551     fi
3552   done
3553   IFS="$ac_save_ifs"
3554   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3555   ;;
3556 esac
3557 fi
3558 FINGER="$ac_cv_path_FINGER"
3559 if test -n "$FINGER"; then
3560   echo "$ac_t""$FINGER" 1>&6
3561 else
3562   echo "$ac_t""no" 1>&6
3563 fi
3564
3565
3566 ol_link_perl=no
3567 if test $ol_enable_perl != no ; then
3568         # Extract the first word of "perl", so it can be a program name with args.
3569 set dummy perl; ac_word=$2
3570 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3571 echo "configure:3572: checking for $ac_word" >&5
3572 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3573   echo $ac_n "(cached) $ac_c" 1>&6
3574 else
3575   case "$PERLBIN" in
3576   /*)
3577   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3578   ;;
3579   ?:/*)
3580   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3581   ;;
3582   *)
3583   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3584   ac_dummy="$PATH"
3585   for ac_dir in $ac_dummy; do 
3586     test -z "$ac_dir" && ac_dir=.
3587     if test -f $ac_dir/$ac_word; then
3588       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3589       break
3590     fi
3591   done
3592   IFS="$ac_save_ifs"
3593   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3594   ;;
3595 esac
3596 fi
3597 PERLBIN="$ac_cv_path_PERLBIN"
3598 if test -n "$PERLBIN"; then
3599   echo "$ac_t""$PERLBIN" 1>&6
3600 else
3601   echo "$ac_t""no" 1>&6
3602 fi
3603
3604
3605         if test "no$PERLBIN" = "no" ; then
3606                 if test $ol_enable_perl = yes ; then
3607                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3608                 fi
3609
3610         else
3611                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3612                 if test x"$ol_with_perl_module" = "xstatic" ; then
3613                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3614                 else
3615                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3616                 fi
3617                                 ol_link_perl=yes
3618         fi
3619 fi
3620
3621 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3622 echo "configure:3623: checking how to run the C preprocessor" >&5
3623 # On Suns, sometimes $CPP names a directory.
3624 if test -n "$CPP" && test -d "$CPP"; then
3625   CPP=
3626 fi
3627 if test -z "$CPP"; then
3628 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3629   echo $ac_n "(cached) $ac_c" 1>&6
3630 else
3631     # This must be in double quotes, not single quotes, because CPP may get
3632   # substituted into the Makefile and "${CC-cc}" will confuse make.
3633   CPP="${CC-cc} -E"
3634   # On the NeXT, cc -E runs the code through the compiler's parser,
3635   # not just through cpp.
3636   cat > conftest.$ac_ext <<EOF
3637 #line 3638 "configure"
3638 #include "confdefs.h"
3639 #include <assert.h>
3640 Syntax Error
3641 EOF
3642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3643 { (eval echo configure:3644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3645 if test -z "$ac_err"; then
3646   :
3647 else
3648   echo "$ac_err" >&5
3649   echo "configure: failed program was:" >&5
3650   cat conftest.$ac_ext >&5
3651   rm -rf conftest*
3652   CPP="${CC-cc} -E -traditional-cpp"
3653   cat > conftest.$ac_ext <<EOF
3654 #line 3655 "configure"
3655 #include "confdefs.h"
3656 #include <assert.h>
3657 Syntax Error
3658 EOF
3659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3660 { (eval echo configure:3661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3662 if test -z "$ac_err"; then
3663   :
3664 else
3665   echo "$ac_err" >&5
3666   echo "configure: failed program was:" >&5
3667   cat conftest.$ac_ext >&5
3668   rm -rf conftest*
3669   CPP="${CC-cc} -nologo -E"
3670   cat > conftest.$ac_ext <<EOF
3671 #line 3672 "configure"
3672 #include "confdefs.h"
3673 #include <assert.h>
3674 Syntax Error
3675 EOF
3676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3677 { (eval echo configure:3678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3679 if test -z "$ac_err"; then
3680   :
3681 else
3682   echo "$ac_err" >&5
3683   echo "configure: failed program was:" >&5
3684   cat conftest.$ac_ext >&5
3685   rm -rf conftest*
3686   CPP=/lib/cpp
3687 fi
3688 rm -f conftest*
3689 fi
3690 rm -f conftest*
3691 fi
3692 rm -f conftest*
3693   ac_cv_prog_CPP="$CPP"
3694 fi
3695   CPP="$ac_cv_prog_CPP"
3696 else
3697   ac_cv_prog_CPP="$CPP"
3698 fi
3699 echo "$ac_t""$CPP" 1>&6
3700
3701
3702 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3703         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3704
3705 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3706         echo "configure: warning: programs compiled here do run here..." 1>&2
3707         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3708
3709 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3710         echo "configure: warning: programs compiled here do not run here..." 1>&2
3711         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3712 fi
3713
3714 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3715 echo "configure:3716: checking for AIX" >&5
3716 cat > conftest.$ac_ext <<EOF
3717 #line 3718 "configure"
3718 #include "confdefs.h"
3719 #ifdef _AIX
3720   yes
3721 #endif
3722
3723 EOF
3724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3725   egrep "yes" >/dev/null 2>&1; then
3726   rm -rf conftest*
3727   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3728 #define _ALL_SOURCE 1
3729 EOF
3730
3731 else
3732   rm -rf conftest*
3733   echo "$ac_t""no" 1>&6
3734 fi
3735 rm -f conftest*
3736
3737
3738 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3739 echo "configure:3740: checking for POSIXized ISC" >&5
3740 if test -d /etc/conf/kconfig.d &&
3741   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3742 then
3743   echo "$ac_t""yes" 1>&6
3744   ISC=yes # If later tests want to check for ISC.
3745   cat >> confdefs.h <<\EOF
3746 #define _POSIX_SOURCE 1
3747 EOF
3748
3749   if test "$GCC" = yes; then
3750     CC="$CC -posix"
3751   else
3752     CC="$CC -Xp"
3753   fi
3754 else
3755   echo "$ac_t""no" 1>&6
3756   ISC=
3757 fi
3758
3759 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3760 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3761 echo "configure:3762: checking for minix/config.h" >&5
3762 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3763   echo $ac_n "(cached) $ac_c" 1>&6
3764 else
3765   cat > conftest.$ac_ext <<EOF
3766 #line 3767 "configure"
3767 #include "confdefs.h"
3768 #include <minix/config.h>
3769 EOF
3770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3771 { (eval echo configure:3772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3773 if test -z "$ac_err"; then
3774   rm -rf conftest*
3775   eval "ac_cv_header_$ac_safe=yes"
3776 else
3777   echo "$ac_err" >&5
3778   echo "configure: failed program was:" >&5
3779   cat conftest.$ac_ext >&5
3780   rm -rf conftest*
3781   eval "ac_cv_header_$ac_safe=no"
3782 fi
3783 rm -f conftest*
3784 fi
3785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3786   echo "$ac_t""yes" 1>&6
3787   MINIX=yes
3788 else
3789   echo "$ac_t""no" 1>&6
3790 MINIX=
3791 fi
3792
3793 if test "$MINIX" = yes; then
3794   cat >> confdefs.h <<\EOF
3795 #define _POSIX_SOURCE 1
3796 EOF
3797
3798   cat >> confdefs.h <<\EOF
3799 #define _POSIX_1_SOURCE 2
3800 EOF
3801
3802   cat >> confdefs.h <<\EOF
3803 #define _MINIX 1
3804 EOF
3805
3806 fi
3807
3808
3809 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3810 echo "configure:3811: checking for Cygwin environment" >&5
3811 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3812   echo $ac_n "(cached) $ac_c" 1>&6
3813 else
3814   cat > conftest.$ac_ext <<EOF
3815 #line 3816 "configure"
3816 #include "confdefs.h"
3817
3818 int main() {
3819
3820 #ifndef __CYGWIN__
3821 #define __CYGWIN__ __CYGWIN32__
3822 #endif
3823 return __CYGWIN__;
3824 ; return 0; }
3825 EOF
3826 if { (eval echo configure:3827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3827   rm -rf conftest*
3828   ac_cv_cygwin=yes
3829 else
3830   echo "configure: failed program was:" >&5
3831   cat conftest.$ac_ext >&5
3832   rm -rf conftest*
3833   ac_cv_cygwin=no
3834 fi
3835 rm -f conftest*
3836 fi
3837
3838 echo "$ac_t""$ac_cv_cygwin" 1>&6
3839 CYGWIN=
3840 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3841 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3842 echo "configure:3843: checking for mingw32 environment" >&5
3843 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3844   echo $ac_n "(cached) $ac_c" 1>&6
3845 else
3846   cat > conftest.$ac_ext <<EOF
3847 #line 3848 "configure"
3848 #include "confdefs.h"
3849
3850 int main() {
3851 return __MINGW32__;
3852 ; return 0; }
3853 EOF
3854 if { (eval echo configure:3855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3855   rm -rf conftest*
3856   ac_cv_mingw32=yes
3857 else
3858   echo "configure: failed program was:" >&5
3859   cat conftest.$ac_ext >&5
3860   rm -rf conftest*
3861   ac_cv_mingw32=no
3862 fi
3863 rm -f conftest*
3864 fi
3865
3866 echo "$ac_t""$ac_cv_mingw32" 1>&6
3867 MINGW32=
3868 test "$ac_cv_mingw32" = yes && MINGW32=yes
3869 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3870 echo "configure:3871: checking for EMX OS/2 environment" >&5
3871 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3872   echo $ac_n "(cached) $ac_c" 1>&6
3873 else
3874   cat > conftest.$ac_ext <<EOF
3875 #line 3876 "configure"
3876 #include "confdefs.h"
3877
3878 int main() {
3879 return __EMX__;
3880 ; return 0; }
3881 EOF
3882 if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3883   rm -rf conftest*
3884   ac_cv_emxos2=yes
3885 else
3886   echo "configure: failed program was:" >&5
3887   cat conftest.$ac_ext >&5
3888   rm -rf conftest*
3889   ac_cv_emxos2=no
3890 fi
3891 rm -f conftest*
3892 fi
3893
3894 echo "$ac_t""$ac_cv_emxos2" 1>&6
3895 EMXOS2=
3896 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3897
3898
3899
3900 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3901 echo "configure:3902: checking for executable suffix" >&5
3902 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3903   echo $ac_n "(cached) $ac_c" 1>&6
3904 else
3905   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3906   ac_cv_exeext=.exe
3907 else
3908   rm -f conftest*
3909   echo 'int main () { return 0; }' > conftest.$ac_ext
3910   ac_cv_exeext=
3911   if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3912     for file in conftest.*; do
3913       case $file in
3914       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3915       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3916       esac
3917     done
3918   else
3919     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3920   fi
3921   rm -f conftest*
3922   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3923 fi
3924 fi
3925
3926 EXEEXT=""
3927 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3928 echo "$ac_t""${ac_cv_exeext}" 1>&6
3929 ac_exeext=$EXEEXT
3930
3931 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3932 echo "configure:3933: checking for object suffix" >&5
3933 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3934   echo $ac_n "(cached) $ac_c" 1>&6
3935 else
3936   rm -f conftest*
3937 echo 'int i = 1;' > conftest.$ac_ext
3938 if { (eval echo configure:3939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3939   for ac_file in conftest.*; do
3940     case $ac_file in
3941     *.c) ;;
3942     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3943     esac
3944   done
3945 else
3946   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3947 fi
3948 rm -f conftest*
3949 fi
3950
3951 echo "$ac_t""$ac_cv_objext" 1>&6
3952 OBJEXT=$ac_cv_objext
3953 ac_objext=$ac_cv_objext
3954
3955
3956 cat >> confdefs.h <<EOF
3957 #define EXEEXT "${EXEEXT}"
3958 EOF
3959
3960
3961 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3962 echo "configure:3963: checking for be_app in -lbe" >&5
3963 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3964 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3965   echo $ac_n "(cached) $ac_c" 1>&6
3966 else
3967   ac_save_LIBS="$LIBS"
3968 LIBS="-lbe -lroot -lnet $LIBS"
3969 cat > conftest.$ac_ext <<EOF
3970 #line 3971 "configure"
3971 #include "confdefs.h"
3972 /* Override any gcc2 internal prototype to avoid an error.  */
3973 /* We use char because int might match the return type of a gcc2
3974     builtin and then its argument prototype would still apply.  */
3975 char be_app();
3976
3977 int main() {
3978 be_app()
3979 ; return 0; }
3980 EOF
3981 if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3982   rm -rf conftest*
3983   eval "ac_cv_lib_$ac_lib_var=yes"
3984 else
3985   echo "configure: failed program was:" >&5
3986   cat conftest.$ac_ext >&5
3987   rm -rf conftest*
3988   eval "ac_cv_lib_$ac_lib_var=no"
3989 fi
3990 rm -f conftest*
3991 LIBS="$ac_save_LIBS"
3992
3993 fi
3994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3995   echo "$ac_t""yes" 1>&6
3996   LIBS="$LIBS -lbe -lroot -lnet"
3997 else
3998   echo "$ac_t""no" 1>&6
3999 :
4000 fi
4001
4002
4003
4004
4005
4006 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4007 echo "configure:4008: checking for ${CC-cc} option to accept ANSI C" >&5
4008 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4009   echo $ac_n "(cached) $ac_c" 1>&6
4010 else
4011   am_cv_prog_cc_stdc=no
4012 ac_save_CC="$CC"
4013 # Don't try gcc -ansi; that turns off useful extensions and
4014 # breaks some systems' header files.
4015 # AIX                   -qlanglvl=ansi
4016 # Ultrix and OSF/1      -std1
4017 # HP-UX 10.20 and later -Ae
4018 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4019 # SVR4                  -Xc -D__EXTENSIONS__
4020 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4021 do
4022   CC="$ac_save_CC $ac_arg"
4023   cat > conftest.$ac_ext <<EOF
4024 #line 4025 "configure"
4025 #include "confdefs.h"
4026 #include <stdarg.h>
4027 #include <stdio.h>
4028 #include <sys/types.h>
4029 #include <sys/stat.h>
4030 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4031 struct buf { int x; };
4032 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4033 static char *e (p, i)
4034      char **p;
4035      int i;
4036 {
4037   return p[i];
4038 }
4039 static char *f (char * (*g) (char **, int), char **p, ...)
4040 {
4041   char *s;
4042   va_list v;
4043   va_start (v,p);
4044   s = g (p, va_arg (v,int));
4045   va_end (v);
4046   return s;
4047 }
4048 int test (int i, double x);
4049 struct s1 {int (*f) (int a);};
4050 struct s2 {int (*f) (double a);};
4051 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4052 int argc;
4053 char **argv;
4054
4055 int main() {
4056
4057 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4058
4059 ; return 0; }
4060 EOF
4061 if { (eval echo configure:4062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4062   rm -rf conftest*
4063   am_cv_prog_cc_stdc="$ac_arg"; break
4064 else
4065   echo "configure: failed program was:" >&5
4066   cat conftest.$ac_ext >&5
4067 fi
4068 rm -f conftest*
4069 done
4070 CC="$ac_save_CC"
4071
4072 fi
4073
4074 if test -z "$am_cv_prog_cc_stdc"; then
4075   echo "$ac_t""none needed" 1>&6
4076 else
4077   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4078 fi
4079 case "x$am_cv_prog_cc_stdc" in
4080   x|xno) ;;
4081   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4082 esac
4083
4084 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4085         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4086 fi
4087
4088 # test for make depend flag
4089 OL_MKDEP=
4090 OL_MKDEP_FLAGS=
4091 if test -z "${MKDEP}"; then
4092         OL_MKDEP="${CC-cc}"
4093         if test -z "${MKDEP_FLAGS}"; then
4094                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4095 echo "configure:4096: checking for ${OL_MKDEP} depend flag" >&5
4096 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4097   echo $ac_n "(cached) $ac_c" 1>&6
4098 else
4099   
4100                         ol_cv_mkdep=no
4101                         for flag in "-M" "-xM"; do
4102                                 cat > conftest.c <<EOF
4103  noCode;
4104 EOF
4105                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4106                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4107                                 then
4108                                         if test ! -f conftest."${ac_object}" ; then
4109                                                 ol_cv_mkdep=$flag
4110                                                 OL_MKDEP_FLAGS="$flag"
4111                                                 break
4112                                         fi
4113                                 fi
4114                         done
4115                         rm -f conftest*
4116                 
4117 fi
4118
4119 echo "$ac_t""$ol_cv_mkdep" 1>&6
4120         else
4121                 cc_cv_mkdep=yes
4122                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4123         fi
4124 else
4125         cc_cv_mkdep=yes
4126         OL_MKDEP="${MKDEP}"
4127         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4128 fi
4129
4130
4131
4132 if test "${ol_cv_mkdep}" = no ; then
4133         # this will soon become an error
4134         echo "configure: warning: do not know how to generate dependencies" 1>&2
4135 fi
4136
4137 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4138 echo "configure:4139: checking for afopen in -ls" >&5
4139 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4140 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4141   echo $ac_n "(cached) $ac_c" 1>&6
4142 else
4143   ac_save_LIBS="$LIBS"
4144 LIBS="-ls  $LIBS"
4145 cat > conftest.$ac_ext <<EOF
4146 #line 4147 "configure"
4147 #include "confdefs.h"
4148 /* Override any gcc2 internal prototype to avoid an error.  */
4149 /* We use char because int might match the return type of a gcc2
4150     builtin and then its argument prototype would still apply.  */
4151 char afopen();
4152
4153 int main() {
4154 afopen()
4155 ; return 0; }
4156 EOF
4157 if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4158   rm -rf conftest*
4159   eval "ac_cv_lib_$ac_lib_var=yes"
4160 else
4161   echo "configure: failed program was:" >&5
4162   cat conftest.$ac_ext >&5
4163   rm -rf conftest*
4164   eval "ac_cv_lib_$ac_lib_var=no"
4165 fi
4166 rm -f conftest*
4167 LIBS="$ac_save_LIBS"
4168
4169 fi
4170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4171   echo "$ac_t""yes" 1>&6
4172   
4173         AUTH_LIBS=-ls
4174         cat >> confdefs.h <<\EOF
4175 #define HAVE_AIX_SECURITY 1
4176 EOF
4177
4178
4179 else
4180   echo "$ac_t""no" 1>&6
4181 fi
4182
4183
4184
4185 ol_link_modules=no
4186 if test $ol_enable_modules != no ; then
4187         for ac_hdr in ltdl.h
4188 do
4189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4191 echo "configure:4192: checking for $ac_hdr" >&5
4192 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4193   echo $ac_n "(cached) $ac_c" 1>&6
4194 else
4195   cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198 #include <$ac_hdr>
4199 EOF
4200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4201 { (eval echo configure:4202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4203 if test -z "$ac_err"; then
4204   rm -rf conftest*
4205   eval "ac_cv_header_$ac_safe=yes"
4206 else
4207   echo "$ac_err" >&5
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   eval "ac_cv_header_$ac_safe=no"
4212 fi
4213 rm -f conftest*
4214 fi
4215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4216   echo "$ac_t""yes" 1>&6
4217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4218   cat >> confdefs.h <<EOF
4219 #define $ac_tr_hdr 1
4220 EOF
4221  
4222 else
4223   echo "$ac_t""no" 1>&6
4224 fi
4225 done
4226
4227
4228         if test $ac_cv_header_ltdl_h = no ; then
4229                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4230         fi
4231
4232         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4233 echo "configure:4234: checking for lt_dlinit in -lltdl" >&5
4234 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4235 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4236   echo $ac_n "(cached) $ac_c" 1>&6
4237 else
4238   ac_save_LIBS="$LIBS"
4239 LIBS="-lltdl  $LIBS"
4240 cat > conftest.$ac_ext <<EOF
4241 #line 4242 "configure"
4242 #include "confdefs.h"
4243 /* Override any gcc2 internal prototype to avoid an error.  */
4244 /* We use char because int might match the return type of a gcc2
4245     builtin and then its argument prototype would still apply.  */
4246 char lt_dlinit();
4247
4248 int main() {
4249 lt_dlinit()
4250 ; return 0; }
4251 EOF
4252 if { (eval echo configure:4253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4253   rm -rf conftest*
4254   eval "ac_cv_lib_$ac_lib_var=yes"
4255 else
4256   echo "configure: failed program was:" >&5
4257   cat conftest.$ac_ext >&5
4258   rm -rf conftest*
4259   eval "ac_cv_lib_$ac_lib_var=no"
4260 fi
4261 rm -f conftest*
4262 LIBS="$ac_save_LIBS"
4263
4264 fi
4265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4266   echo "$ac_t""yes" 1>&6
4267   
4268             MODULES_LIBS=-lltdl
4269             cat >> confdefs.h <<\EOF
4270 #define HAVE_LIBLTDL 1
4271 EOF
4272
4273         
4274 else
4275   echo "$ac_t""no" 1>&6
4276 fi
4277
4278
4279         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4280                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4281         fi
4282         ol_link_modules=yes
4283 else
4284         ol_with_bdb_module=static
4285         ol_with_dnssrv_module=static
4286         ol_with_ldap_module=static
4287         ol_with_ldbm_module=static
4288         ol_with_passwd_module=static
4289         ol_with_perl_module=static
4290         ol_with_shell_module=static
4291         ol_with_tcl_module=static
4292         ol_with_sql_module=static
4293 fi
4294
4295 # test for EBCDIC
4296 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4297 echo "configure:4298: checking for EBCDIC" >&5
4298 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4299   echo $ac_n "(cached) $ac_c" 1>&6
4300 else
4301   
4302         cat > conftest.$ac_ext <<EOF
4303 #line 4304 "configure"
4304 #include "confdefs.h"
4305
4306 #if !('M' == 0xd4)
4307 #include <__ASCII__/generate_error.h>
4308 #endif
4309
4310 EOF
4311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4312 { (eval echo configure:4313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4314 if test -z "$ac_err"; then
4315   rm -rf conftest*
4316   ol_cv_cpp_ebcdic=yes
4317 else
4318   echo "$ac_err" >&5
4319   echo "configure: failed program was:" >&5
4320   cat conftest.$ac_ext >&5
4321   rm -rf conftest*
4322   ol_cv_cpp_ebcdic=no
4323 fi
4324 rm -f conftest*
4325 fi
4326
4327 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4328 if test $ol_cv_cpp_ebcdic = yes ; then
4329         cat >> confdefs.h <<\EOF
4330 #define HAVE_EBCDIC 1
4331 EOF
4332
4333 fi
4334
4335 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4336 echo "configure:4337: checking for ANSI C header files" >&5
4337 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4338   echo $ac_n "(cached) $ac_c" 1>&6
4339 else
4340   cat > conftest.$ac_ext <<EOF
4341 #line 4342 "configure"
4342 #include "confdefs.h"
4343 #include <stdlib.h>
4344 #include <stdarg.h>
4345 #include <string.h>
4346 #include <float.h>
4347 EOF
4348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4349 { (eval echo configure:4350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4351 if test -z "$ac_err"; then
4352   rm -rf conftest*
4353   ol_cv_header_stdc=yes
4354 else
4355   echo "$ac_err" >&5
4356   echo "configure: failed program was:" >&5
4357   cat conftest.$ac_ext >&5
4358   rm -rf conftest*
4359   ol_cv_header_stdc=no
4360 fi
4361 rm -f conftest*
4362
4363 if test $ol_cv_header_stdc = yes; then
4364   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4365 cat > conftest.$ac_ext <<EOF
4366 #line 4367 "configure"
4367 #include "confdefs.h"
4368 #include <string.h>
4369 EOF
4370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4371   egrep "memchr" >/dev/null 2>&1; then
4372   :
4373 else
4374   rm -rf conftest*
4375   ol_cv_header_stdc=no
4376 fi
4377 rm -f conftest*
4378
4379 fi
4380
4381 if test $ol_cv_header_stdc = yes; then
4382   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4383 cat > conftest.$ac_ext <<EOF
4384 #line 4385 "configure"
4385 #include "confdefs.h"
4386 #include <stdlib.h>
4387 EOF
4388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4389   egrep "free" >/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   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4401 if test "$cross_compiling" = yes; then
4402   :
4403 else
4404   cat > conftest.$ac_ext <<EOF
4405 #line 4406 "configure"
4406 #include "confdefs.h"
4407 #include <ctype.h>
4408 #ifndef HAVE_EBCDIC
4409 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4410 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4411 #else
4412 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4413                 || ('j' <= (c) && (c) <= 'r') \
4414                 || ('s' <= (c) && (c) <= 'z'))
4415 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4416 #endif
4417 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4418 int main () { int i; for (i = 0; i < 256; i++)
4419 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4420 exit (0); }
4421
4422 EOF
4423 if { (eval echo configure:4424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4424 then
4425   :
4426 else
4427   echo "configure: failed program was:" >&5
4428   cat conftest.$ac_ext >&5
4429   rm -fr conftest*
4430   ol_cv_header_stdc=no
4431 fi
4432 rm -fr conftest*
4433 fi
4434
4435 fi
4436 fi
4437
4438 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4439 if test $ol_cv_header_stdc = yes; then
4440   cat >> confdefs.h <<\EOF
4441 #define STDC_HEADERS 1
4442 EOF
4443
4444 fi
4445 ac_cv_header_stdc=disable
4446
4447
4448 if test $ol_cv_header_stdc != yes; then
4449         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4450 fi
4451
4452 ac_header_dirent=no
4453 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4454 do
4455 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4456 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4457 echo "configure:4458: checking for $ac_hdr that defines DIR" >&5
4458 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4459   echo $ac_n "(cached) $ac_c" 1>&6
4460 else
4461   cat > conftest.$ac_ext <<EOF
4462 #line 4463 "configure"
4463 #include "confdefs.h"
4464 #include <sys/types.h>
4465 #include <$ac_hdr>
4466 int main() {
4467 DIR *dirp = 0;
4468 ; return 0; }
4469 EOF
4470 if { (eval echo configure:4471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4471   rm -rf conftest*
4472   eval "ac_cv_header_dirent_$ac_safe=yes"
4473 else
4474   echo "configure: failed program was:" >&5
4475   cat conftest.$ac_ext >&5
4476   rm -rf conftest*
4477   eval "ac_cv_header_dirent_$ac_safe=no"
4478 fi
4479 rm -f conftest*
4480 fi
4481 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4482   echo "$ac_t""yes" 1>&6
4483     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4484   cat >> confdefs.h <<EOF
4485 #define $ac_tr_hdr 1
4486 EOF
4487  ac_header_dirent=$ac_hdr; break
4488 else
4489   echo "$ac_t""no" 1>&6
4490 fi
4491 done
4492 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4493 if test $ac_header_dirent = dirent.h; then
4494 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4495 echo "configure:4496: checking for opendir in -ldir" >&5
4496 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4497 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4498   echo $ac_n "(cached) $ac_c" 1>&6
4499 else
4500   ac_save_LIBS="$LIBS"
4501 LIBS="-ldir  $LIBS"
4502 cat > conftest.$ac_ext <<EOF
4503 #line 4504 "configure"
4504 #include "confdefs.h"
4505 /* Override any gcc2 internal prototype to avoid an error.  */
4506 /* We use char because int might match the return type of a gcc2
4507     builtin and then its argument prototype would still apply.  */
4508 char opendir();
4509
4510 int main() {
4511 opendir()
4512 ; return 0; }
4513 EOF
4514 if { (eval echo configure:4515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4515   rm -rf conftest*
4516   eval "ac_cv_lib_$ac_lib_var=yes"
4517 else
4518   echo "configure: failed program was:" >&5
4519   cat conftest.$ac_ext >&5
4520   rm -rf conftest*
4521   eval "ac_cv_lib_$ac_lib_var=no"
4522 fi
4523 rm -f conftest*
4524 LIBS="$ac_save_LIBS"
4525
4526 fi
4527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4528   echo "$ac_t""yes" 1>&6
4529   LIBS="$LIBS -ldir"
4530 else
4531   echo "$ac_t""no" 1>&6
4532 fi
4533
4534 else
4535 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4536 echo "configure:4537: checking for opendir in -lx" >&5
4537 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4538 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4539   echo $ac_n "(cached) $ac_c" 1>&6
4540 else
4541   ac_save_LIBS="$LIBS"
4542 LIBS="-lx  $LIBS"
4543 cat > conftest.$ac_ext <<EOF
4544 #line 4545 "configure"
4545 #include "confdefs.h"
4546 /* Override any gcc2 internal prototype to avoid an error.  */
4547 /* We use char because int might match the return type of a gcc2
4548     builtin and then its argument prototype would still apply.  */
4549 char opendir();
4550
4551 int main() {
4552 opendir()
4553 ; return 0; }
4554 EOF
4555 if { (eval echo configure:4556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4556   rm -rf conftest*
4557   eval "ac_cv_lib_$ac_lib_var=yes"
4558 else
4559   echo "configure: failed program was:" >&5
4560   cat conftest.$ac_ext >&5
4561   rm -rf conftest*
4562   eval "ac_cv_lib_$ac_lib_var=no"
4563 fi
4564 rm -f conftest*
4565 LIBS="$ac_save_LIBS"
4566
4567 fi
4568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4569   echo "$ac_t""yes" 1>&6
4570   LIBS="$LIBS -lx"
4571 else
4572   echo "$ac_t""no" 1>&6
4573 fi
4574
4575 fi
4576
4577 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4578 echo "configure:4579: checking for sys/wait.h that is POSIX.1 compatible" >&5
4579 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4580   echo $ac_n "(cached) $ac_c" 1>&6
4581 else
4582   cat > conftest.$ac_ext <<EOF
4583 #line 4584 "configure"
4584 #include "confdefs.h"
4585 #include <sys/types.h>
4586 #include <sys/wait.h>
4587 #ifndef WEXITSTATUS
4588 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4589 #endif
4590 #ifndef WIFEXITED
4591 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4592 #endif
4593 int main() {
4594 int s;
4595 wait (&s);
4596 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4597 ; return 0; }
4598 EOF
4599 if { (eval echo configure:4600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4600   rm -rf conftest*
4601   ac_cv_header_sys_wait_h=yes
4602 else
4603   echo "configure: failed program was:" >&5
4604   cat conftest.$ac_ext >&5
4605   rm -rf conftest*
4606   ac_cv_header_sys_wait_h=no
4607 fi
4608 rm -f conftest*
4609 fi
4610
4611 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4612 if test $ac_cv_header_sys_wait_h = yes; then
4613   cat >> confdefs.h <<\EOF
4614 #define HAVE_SYS_WAIT_H 1
4615 EOF
4616
4617 fi
4618
4619 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4620 echo "configure:4621: checking POSIX termios" >&5
4621 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   cat > conftest.$ac_ext <<EOF
4625 #line 4626 "configure"
4626 #include "confdefs.h"
4627 #include <sys/types.h>
4628 #include <unistd.h>
4629 #include <termios.h>
4630 int main() {
4631 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4632    tcgetattr(0, 0);
4633 ; return 0; }
4634 EOF
4635 if { (eval echo configure:4636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4636   rm -rf conftest*
4637   am_cv_sys_posix_termios=yes
4638 else
4639   echo "configure: failed program was:" >&5
4640   cat conftest.$ac_ext >&5
4641   rm -rf conftest*
4642   am_cv_sys_posix_termios=no
4643 fi
4644 rm -f conftest*
4645 fi
4646
4647 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4648
4649
4650  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4651 echo "configure:4652: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4652 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4653   echo $ac_n "(cached) $ac_c" 1>&6
4654 else
4655   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4656
4657   gwinsz_in_termios_h=no
4658   if test $am_cv_sys_posix_termios = yes; then
4659     cat > conftest.$ac_ext <<EOF
4660 #line 4661 "configure"
4661 #include "confdefs.h"
4662 #include <sys/types.h>
4663 #     include <termios.h>
4664 #     ifdef TIOCGWINSZ
4665         yes
4666 #     endif
4667     
4668 EOF
4669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4670   egrep "yes" >/dev/null 2>&1; then
4671   rm -rf conftest*
4672   gwinsz_in_termios_h=yes
4673 fi
4674 rm -f conftest*
4675
4676   fi
4677
4678   if test $gwinsz_in_termios_h = no; then
4679     cat > conftest.$ac_ext <<EOF
4680 #line 4681 "configure"
4681 #include "confdefs.h"
4682 #include <sys/types.h>
4683 #     include <sys/ioctl.h>
4684 #     ifdef TIOCGWINSZ
4685         yes
4686 #     endif
4687     
4688 EOF
4689 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4690   egrep "yes" >/dev/null 2>&1; then
4691   rm -rf conftest*
4692   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4693 fi
4694 rm -f conftest*
4695
4696   fi
4697   
4698 fi
4699
4700 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4701   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4702     cat >> confdefs.h <<\EOF
4703 #define GWINSZ_IN_SYS_IOCTL 1
4704 EOF
4705
4706   fi
4707
4708 if test $am_cv_sys_posix_termios = yes ; then
4709         cat >> confdefs.h <<\EOF
4710 #define HAVE_POSIX_TERMIOS 1
4711 EOF
4712
4713 fi
4714
4715 for ac_hdr in \
4716         arpa/inet.h             \
4717         arpa/nameser.h  \
4718         assert.h                \
4719         conio.h                 \
4720         crypt.h                 \
4721         direct.h                \
4722         errno.h                 \
4723         fcntl.h                 \
4724         filio.h                 \
4725         getopt.h                \
4726         grp.h                   \
4727         io.h                    \
4728         libutil.h               \
4729         limits.h                \
4730         locale.h                \
4731         netinet/tcp.h   \
4732         malloc.h                \
4733         memory.h                \
4734         psap.h                  \
4735         pwd.h                   \
4736         process.h               \
4737         resolv.h                \
4738         sgtty.h                 \
4739         shadow.h                \
4740         stddef.h                \
4741         string.h                \
4742         strings.h               \
4743         sysexits.h              \
4744         sys/file.h              \
4745         sys/filio.h             \
4746         sys/errno.h             \
4747         sys/ioctl.h             \
4748         sys/param.h             \
4749         sys/resource.h  \
4750         sys/select.h    \
4751         sys/socket.h    \
4752         sys/syslog.h    \
4753         sys/time.h              \
4754         sys/types.h             \
4755         syslog.h                \
4756         termios.h               \
4757         unistd.h                \
4758         winsock.h               \
4759
4760 do
4761 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4762 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4763 echo "configure:4764: checking for $ac_hdr" >&5
4764 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4765   echo $ac_n "(cached) $ac_c" 1>&6
4766 else
4767   cat > conftest.$ac_ext <<EOF
4768 #line 4769 "configure"
4769 #include "confdefs.h"
4770 #include <$ac_hdr>
4771 EOF
4772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4773 { (eval echo configure:4774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4775 if test -z "$ac_err"; then
4776   rm -rf conftest*
4777   eval "ac_cv_header_$ac_safe=yes"
4778 else
4779   echo "$ac_err" >&5
4780   echo "configure: failed program was:" >&5
4781   cat conftest.$ac_ext >&5
4782   rm -rf conftest*
4783   eval "ac_cv_header_$ac_safe=no"
4784 fi
4785 rm -f conftest*
4786 fi
4787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4788   echo "$ac_t""yes" 1>&6
4789     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4790   cat >> confdefs.h <<EOF
4791 #define $ac_tr_hdr 1
4792 EOF
4793  
4794 else
4795   echo "$ac_t""no" 1>&6
4796 fi
4797 done
4798
4799
4800
4801
4802 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4803 echo "configure:4804: checking for sigset in -lV3" >&5
4804 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4806   echo $ac_n "(cached) $ac_c" 1>&6
4807 else
4808   ac_save_LIBS="$LIBS"
4809 LIBS="-lV3  $LIBS"
4810 cat > conftest.$ac_ext <<EOF
4811 #line 4812 "configure"
4812 #include "confdefs.h"
4813 /* Override any gcc2 internal prototype to avoid an error.  */
4814 /* We use char because int might match the return type of a gcc2
4815     builtin and then its argument prototype would still apply.  */
4816 char sigset();
4817
4818 int main() {
4819 sigset()
4820 ; return 0; }
4821 EOF
4822 if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4823   rm -rf conftest*
4824   eval "ac_cv_lib_$ac_lib_var=yes"
4825 else
4826   echo "configure: failed program was:" >&5
4827   cat conftest.$ac_ext >&5
4828   rm -rf conftest*
4829   eval "ac_cv_lib_$ac_lib_var=no"
4830 fi
4831 rm -f conftest*
4832 LIBS="$ac_save_LIBS"
4833
4834 fi
4835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4836   echo "$ac_t""yes" 1>&6
4837     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4838     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4839   cat >> confdefs.h <<EOF
4840 #define $ac_tr_lib 1
4841 EOF
4842
4843   LIBS="-lV3 $LIBS"
4844
4845 else
4846   echo "$ac_t""no" 1>&6
4847 fi
4848
4849
4850 if test $ac_cv_header_winsock_h = yes; then
4851         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4852 echo "configure:4853: checking for winsock" >&5
4853 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4854   echo $ac_n "(cached) $ac_c" 1>&6
4855 else
4856   cat > conftest.$ac_ext <<EOF
4857 #line 4858 "configure"
4858 #include "confdefs.h"
4859 #include <winsock.h>
4860 int main() {
4861
4862                         socket(0,0,0);
4863                         select(0,NULL,NULL,NULL,NULL);
4864                         closesocket(0);
4865                         gethostname(NULL,0);
4866         
4867 ; return 0; }
4868 EOF
4869 if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4870   rm -rf conftest*
4871   ol_cv_winsock=yes
4872 else
4873   echo "configure: failed program was:" >&5
4874   cat conftest.$ac_ext >&5
4875   rm -rf conftest*
4876   ol_cv_winsock=no
4877 fi
4878 rm -f conftest*]
4879 fi
4880
4881 echo "$ac_t""$ol_cv_winsock" 1>&6
4882
4883         if test $ol_cv_winsock = yes ; then
4884                 cat >> confdefs.h <<\EOF
4885 #define HAVE_WINSOCK 1
4886 EOF
4887
4888                 ac_cv_func_socket=yes
4889                 ac_cv_func_select=yes
4890                 ac_cv_func_closesocket=yes
4891                 ac_cv_func_gethostname=yes
4892         fi
4893 fi
4894
4895
4896 echo $ac_n "checking for socket""... $ac_c" 1>&6
4897 echo "configure:4898: checking for socket" >&5
4898 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4899   echo $ac_n "(cached) $ac_c" 1>&6
4900 else
4901   cat > conftest.$ac_ext <<EOF
4902 #line 4903 "configure"
4903 #include "confdefs.h"
4904 /* System header to define __stub macros and hopefully few prototypes,
4905     which can conflict with char socket(); below.  */
4906 #include <assert.h>
4907 /* Override any gcc2 internal prototype to avoid an error.  */
4908 /* We use char because int might match the return type of a gcc2
4909     builtin and then its argument prototype would still apply.  */
4910 char socket();
4911 char (*f)();
4912
4913 int main() {
4914
4915 /* The GNU C library defines this for functions which it implements
4916     to always fail with ENOSYS.  Some functions are actually named
4917     something starting with __ and the normal name is an alias.  */
4918 #if defined (__stub_socket) || defined (__stub___socket)
4919 choke me
4920 #else
4921 f = socket;
4922 #endif
4923
4924 ; return 0; }
4925 EOF
4926 if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4927   rm -rf conftest*
4928   eval "ac_cv_func_socket=yes"
4929 else
4930   echo "configure: failed program was:" >&5
4931   cat conftest.$ac_ext >&5
4932   rm -rf conftest*
4933   eval "ac_cv_func_socket=no"
4934 fi
4935 rm -f conftest*
4936 fi
4937
4938 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4939   echo "$ac_t""yes" 1>&6
4940   :
4941 else
4942   echo "$ac_t""no" 1>&6
4943         
4944         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4945 echo "configure:4946: checking for main in -lsocket" >&5
4946 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4947 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4948   echo $ac_n "(cached) $ac_c" 1>&6
4949 else
4950   ac_save_LIBS="$LIBS"
4951 LIBS="-lsocket  $LIBS"
4952 cat > conftest.$ac_ext <<EOF
4953 #line 4954 "configure"
4954 #include "confdefs.h"
4955
4956 int main() {
4957 main()
4958 ; return 0; }
4959 EOF
4960 if { (eval echo configure:4961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4961   rm -rf conftest*
4962   eval "ac_cv_lib_$ac_lib_var=yes"
4963 else
4964   echo "configure: failed program was:" >&5
4965   cat conftest.$ac_ext >&5
4966   rm -rf conftest*
4967   eval "ac_cv_lib_$ac_lib_var=no"
4968 fi
4969 rm -f conftest*
4970 LIBS="$ac_save_LIBS"
4971
4972 fi
4973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4974   echo "$ac_t""yes" 1>&6
4975     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4976     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4977   cat >> confdefs.h <<EOF
4978 #define $ac_tr_lib 1
4979 EOF
4980
4981   LIBS="-lsocket $LIBS"
4982
4983 else
4984   echo "$ac_t""no" 1>&6
4985 fi
4986
4987         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4988 echo "configure:4989: checking for main in -lnet" >&5
4989 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4990 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4991   echo $ac_n "(cached) $ac_c" 1>&6
4992 else
4993   ac_save_LIBS="$LIBS"
4994 LIBS="-lnet  $LIBS"
4995 cat > conftest.$ac_ext <<EOF
4996 #line 4997 "configure"
4997 #include "confdefs.h"
4998
4999 int main() {
5000 main()
5001 ; return 0; }
5002 EOF
5003 if { (eval echo configure:5004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5004   rm -rf conftest*
5005   eval "ac_cv_lib_$ac_lib_var=yes"
5006 else
5007   echo "configure: failed program was:" >&5
5008   cat conftest.$ac_ext >&5
5009   rm -rf conftest*
5010   eval "ac_cv_lib_$ac_lib_var=no"
5011 fi
5012 rm -f conftest*
5013 LIBS="$ac_save_LIBS"
5014
5015 fi
5016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5017   echo "$ac_t""yes" 1>&6
5018     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5019     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5020   cat >> confdefs.h <<EOF
5021 #define $ac_tr_lib 1
5022 EOF
5023
5024   LIBS="-lnet $LIBS"
5025
5026 else
5027   echo "$ac_t""no" 1>&6
5028 fi
5029
5030         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5031 echo "configure:5032: checking for main in -lnsl_s" >&5
5032 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5034   echo $ac_n "(cached) $ac_c" 1>&6
5035 else
5036   ac_save_LIBS="$LIBS"
5037 LIBS="-lnsl_s  $LIBS"
5038 cat > conftest.$ac_ext <<EOF
5039 #line 5040 "configure"
5040 #include "confdefs.h"
5041
5042 int main() {
5043 main()
5044 ; return 0; }
5045 EOF
5046 if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5047   rm -rf conftest*
5048   eval "ac_cv_lib_$ac_lib_var=yes"
5049 else
5050   echo "configure: failed program was:" >&5
5051   cat conftest.$ac_ext >&5
5052   rm -rf conftest*
5053   eval "ac_cv_lib_$ac_lib_var=no"
5054 fi
5055 rm -f conftest*
5056 LIBS="$ac_save_LIBS"
5057
5058 fi
5059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5060   echo "$ac_t""yes" 1>&6
5061     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5062     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5063   cat >> confdefs.h <<EOF
5064 #define $ac_tr_lib 1
5065 EOF
5066
5067   LIBS="-lnsl_s $LIBS"
5068
5069 else
5070   echo "$ac_t""no" 1>&6
5071 fi
5072
5073         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5074 echo "configure:5075: checking for main in -lnsl" >&5
5075 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5076 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5077   echo $ac_n "(cached) $ac_c" 1>&6
5078 else
5079   ac_save_LIBS="$LIBS"
5080 LIBS="-lnsl  $LIBS"
5081 cat > conftest.$ac_ext <<EOF
5082 #line 5083 "configure"
5083 #include "confdefs.h"
5084
5085 int main() {
5086 main()
5087 ; return 0; }
5088 EOF
5089 if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5090   rm -rf conftest*
5091   eval "ac_cv_lib_$ac_lib_var=yes"
5092 else
5093   echo "configure: failed program was:" >&5
5094   cat conftest.$ac_ext >&5
5095   rm -rf conftest*
5096   eval "ac_cv_lib_$ac_lib_var=no"
5097 fi
5098 rm -f conftest*
5099 LIBS="$ac_save_LIBS"
5100
5101 fi
5102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5103   echo "$ac_t""yes" 1>&6
5104     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5105     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5106   cat >> confdefs.h <<EOF
5107 #define $ac_tr_lib 1
5108 EOF
5109
5110   LIBS="-lnsl $LIBS"
5111
5112 else
5113   echo "$ac_t""no" 1>&6
5114 fi
5115
5116         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5117 echo "configure:5118: checking for socket in -linet" >&5
5118 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5120   echo $ac_n "(cached) $ac_c" 1>&6
5121 else
5122   ac_save_LIBS="$LIBS"
5123 LIBS="-linet  $LIBS"
5124 cat > conftest.$ac_ext <<EOF
5125 #line 5126 "configure"
5126 #include "confdefs.h"
5127 /* Override any gcc2 internal prototype to avoid an error.  */
5128 /* We use char because int might match the return type of a gcc2
5129     builtin and then its argument prototype would still apply.  */
5130 char socket();
5131
5132 int main() {
5133 socket()
5134 ; return 0; }
5135 EOF
5136 if { (eval echo configure:5137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5137   rm -rf conftest*
5138   eval "ac_cv_lib_$ac_lib_var=yes"
5139 else
5140   echo "configure: failed program was:" >&5
5141   cat conftest.$ac_ext >&5
5142   rm -rf conftest*
5143   eval "ac_cv_lib_$ac_lib_var=no"
5144 fi
5145 rm -f conftest*
5146 LIBS="$ac_save_LIBS"
5147
5148 fi
5149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5150   echo "$ac_t""yes" 1>&6
5151     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5152     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5153   cat >> confdefs.h <<EOF
5154 #define $ac_tr_lib 1
5155 EOF
5156
5157   LIBS="-linet $LIBS"
5158
5159 else
5160   echo "$ac_t""no" 1>&6
5161 fi
5162
5163         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5164 echo "configure:5165: checking for main in -lgen" >&5
5165 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5166 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5167   echo $ac_n "(cached) $ac_c" 1>&6
5168 else
5169   ac_save_LIBS="$LIBS"
5170 LIBS="-lgen  $LIBS"
5171 cat > conftest.$ac_ext <<EOF
5172 #line 5173 "configure"
5173 #include "confdefs.h"
5174
5175 int main() {
5176 main()
5177 ; return 0; }
5178 EOF
5179 if { (eval echo configure:5180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5180   rm -rf conftest*
5181   eval "ac_cv_lib_$ac_lib_var=yes"
5182 else
5183   echo "configure: failed program was:" >&5
5184   cat conftest.$ac_ext >&5
5185   rm -rf conftest*
5186   eval "ac_cv_lib_$ac_lib_var=no"
5187 fi
5188 rm -f conftest*
5189 LIBS="$ac_save_LIBS"
5190
5191 fi
5192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5193   echo "$ac_t""yes" 1>&6
5194     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5195     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5196   cat >> confdefs.h <<EOF
5197 #define $ac_tr_lib 1
5198 EOF
5199
5200   LIBS="-lgen $LIBS"
5201
5202 else
5203   echo "$ac_t""no" 1>&6
5204 fi
5205
5206
5207 fi
5208
5209
5210 echo $ac_n "checking for select""... $ac_c" 1>&6
5211 echo "configure:5212: checking for select" >&5
5212 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5213   echo $ac_n "(cached) $ac_c" 1>&6
5214 else
5215   cat > conftest.$ac_ext <<EOF
5216 #line 5217 "configure"
5217 #include "confdefs.h"
5218 /* System header to define __stub macros and hopefully few prototypes,
5219     which can conflict with char select(); below.  */
5220 #include <assert.h>
5221 /* Override any gcc2 internal prototype to avoid an error.  */
5222 /* We use char because int might match the return type of a gcc2
5223     builtin and then its argument prototype would still apply.  */
5224 char select();
5225 char (*f)();
5226
5227 int main() {
5228
5229 /* The GNU C library defines this for functions which it implements
5230     to always fail with ENOSYS.  Some functions are actually named
5231     something starting with __ and the normal name is an alias.  */
5232 #if defined (__stub_select) || defined (__stub___select)
5233 choke me
5234 #else
5235 f = select;
5236 #endif
5237
5238 ; return 0; }
5239 EOF
5240 if { (eval echo configure:5241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5241   rm -rf conftest*
5242   eval "ac_cv_func_select=yes"
5243 else
5244   echo "configure: failed program was:" >&5
5245   cat conftest.$ac_ext >&5
5246   rm -rf conftest*
5247   eval "ac_cv_func_select=no"
5248 fi
5249 rm -f conftest*
5250 fi
5251
5252 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5253   echo "$ac_t""yes" 1>&6
5254   :
5255 else
5256   echo "$ac_t""no" 1>&6
5257 { echo "configure: error: select() required." 1>&2; exit 1; }
5258 fi
5259
5260
5261 if test "${ac_cv_header_winsock_h}" != yes; then
5262                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5263 echo "configure:5264: checking types of arguments for select()" >&5
5264  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5265   echo $ac_n "(cached) $ac_c" 1>&6
5266 else
5267    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5268   echo $ac_n "(cached) $ac_c" 1>&6
5269 else
5270     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5271   echo $ac_n "(cached) $ac_c" 1>&6
5272 else
5273      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5274      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5275       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5276        cat > conftest.$ac_ext <<EOF
5277 #line 5278 "configure"
5278 #include "confdefs.h"
5279 #ifdef HAVE_SYS_TYPES_H
5280 #include <sys/types.h>
5281 #endif
5282 #ifdef HAVE_SYS_TIME_H
5283 #include <sys/time.h>
5284 #endif
5285 #ifdef HAVE_SYS_SELECT_H
5286 #include <sys/select.h>
5287 #endif
5288 #ifdef HAVE_SYS_SOCKET_H
5289 #include <sys/socket.h>
5290 #endif
5291 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);
5292 int main() {
5293
5294 ; return 0; }
5295 EOF
5296 if { (eval echo configure:5297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5297   rm -rf conftest*
5298           ac_not_found=no ; break 3
5299 else
5300   echo "configure: failed program was:" >&5
5301   cat conftest.$ac_ext >&5
5302   rm -rf conftest*
5303   ac_not_found=yes
5304 fi
5305 rm -f conftest*
5306       done
5307      done
5308     done
5309    
5310 fi
5311   
5312 fi
5313  
5314 fi
5315  if test "$ac_not_found" = yes; then
5316   ac_cv_func_select_arg1=int 
5317   ac_cv_func_select_arg234='int *' 
5318   ac_cv_func_select_arg5='struct timeval *'
5319  fi
5320  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5321  cat >> confdefs.h <<EOF
5322 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5323 EOF
5324
5325  cat >> confdefs.h <<EOF
5326 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5327 EOF
5328
5329  cat >> confdefs.h <<EOF
5330 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5331 EOF
5332
5333
5334 fi
5335
5336
5337 for ac_hdr in regex.h 
5338 do
5339 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5340 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5341 echo "configure:5342: checking for $ac_hdr" >&5
5342 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5343   echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345   cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348 #include <$ac_hdr>
5349 EOF
5350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5351 { (eval echo configure:5352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5353 if test -z "$ac_err"; then
5354   rm -rf conftest*
5355   eval "ac_cv_header_$ac_safe=yes"
5356 else
5357   echo "$ac_err" >&5
5358   echo "configure: failed program was:" >&5
5359   cat conftest.$ac_ext >&5
5360   rm -rf conftest*
5361   eval "ac_cv_header_$ac_safe=no"
5362 fi
5363 rm -f conftest*
5364 fi
5365 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5366   echo "$ac_t""yes" 1>&6
5367     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5368   cat >> confdefs.h <<EOF
5369 #define $ac_tr_hdr 1
5370 EOF
5371  
5372 else
5373   echo "$ac_t""no" 1>&6
5374 fi
5375 done
5376
5377 if test "$ac_cv_header_regex_h" != yes ; then
5378         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5379 fi
5380 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5381 echo "configure:5382: checking for regfree" >&5
5382 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5383   echo $ac_n "(cached) $ac_c" 1>&6
5384 else
5385   cat > conftest.$ac_ext <<EOF
5386 #line 5387 "configure"
5387 #include "confdefs.h"
5388 /* System header to define __stub macros and hopefully few prototypes,
5389     which can conflict with char regfree(); below.  */
5390 #include <assert.h>
5391 /* Override any gcc2 internal prototype to avoid an error.  */
5392 /* We use char because int might match the return type of a gcc2
5393     builtin and then its argument prototype would still apply.  */
5394 char regfree();
5395 char (*f)();
5396
5397 int main() {
5398
5399 /* The GNU C library defines this for functions which it implements
5400     to always fail with ENOSYS.  Some functions are actually named
5401     something starting with __ and the normal name is an alias.  */
5402 #if defined (__stub_regfree) || defined (__stub___regfree)
5403 choke me
5404 #else
5405 f = regfree;
5406 #endif
5407
5408 ; return 0; }
5409 EOF
5410 if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5411   rm -rf conftest*
5412   eval "ac_cv_func_regfree=yes"
5413 else
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -rf conftest*
5417   eval "ac_cv_func_regfree=no"
5418 fi
5419 rm -f conftest*
5420 fi
5421
5422 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5423   echo "$ac_t""yes" 1>&6
5424   :
5425 else
5426   echo "$ac_t""no" 1>&6
5427 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5428 fi
5429
5430
5431
5432 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5433 echo "configure:5434: checking for compatible POSIX regex" >&5
5434 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5435   echo $ac_n "(cached) $ac_c" 1>&6
5436 else
5437   
5438         if test "$cross_compiling" = yes; then
5439   ol_cv_c_posix_regex=cross
5440 else
5441   cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444
5445 #include <sys/types.h>
5446 #include <regex.h>
5447 static char *pattern, *string;
5448 main()
5449 {
5450         int rc;
5451         regex_t re;
5452
5453         pattern = "^A";
5454
5455         if(regcomp(&re, pattern, 0)) {
5456                 return -1;
5457         }
5458         
5459         string = "ALL MATCH";
5460         
5461         rc = regexec(&re, string, 0, (void*)0, 0);
5462
5463         regfree(&re);
5464
5465         return rc;
5466 }
5467 EOF
5468 if { (eval echo configure:5469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5469 then
5470   ol_cv_c_posix_regex=yes
5471 else
5472   echo "configure: failed program was:" >&5
5473   cat conftest.$ac_ext >&5
5474   rm -fr conftest*
5475   ol_cv_c_posix_regex=no
5476 fi
5477 rm -fr conftest*
5478 fi
5479
5480 fi
5481
5482 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5483
5484 if test "$ol_cv_c_posix_regex" = no ; then
5485         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5486 fi
5487
5488 ol_link_dnssrv=no
5489 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5490 echo "configure:5491: checking for res_query" >&5
5491 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5492   echo $ac_n "(cached) $ac_c" 1>&6
5493 else
5494   cat > conftest.$ac_ext <<EOF
5495 #line 5496 "configure"
5496 #include "confdefs.h"
5497 /* System header to define __stub macros and hopefully few prototypes,
5498     which can conflict with char res_query(); below.  */
5499 #include <assert.h>
5500 /* Override any gcc2 internal prototype to avoid an error.  */
5501 /* We use char because int might match the return type of a gcc2
5502     builtin and then its argument prototype would still apply.  */
5503 char res_query();
5504 char (*f)();
5505
5506 int main() {
5507
5508 /* The GNU C library defines this for functions which it implements
5509     to always fail with ENOSYS.  Some functions are actually named
5510     something starting with __ and the normal name is an alias.  */
5511 #if defined (__stub_res_query) || defined (__stub___res_query)
5512 choke me
5513 #else
5514 f = res_query;
5515 #endif
5516
5517 ; return 0; }
5518 EOF
5519 if { (eval echo configure:5520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5520   rm -rf conftest*
5521   eval "ac_cv_func_res_query=yes"
5522 else
5523   echo "configure: failed program was:" >&5
5524   cat conftest.$ac_ext >&5
5525   rm -rf conftest*
5526   eval "ac_cv_func_res_query=no"
5527 fi
5528 rm -f conftest*
5529 fi
5530
5531 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5532   echo "$ac_t""yes" 1>&6
5533   :
5534 else
5535   echo "$ac_t""no" 1>&6
5536 fi
5537
5538 if test $ac_cv_func_res_query = no ; then 
5539         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5540 echo "configure:5541: checking for res_query in -lbind" >&5
5541 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5542 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5543   echo $ac_n "(cached) $ac_c" 1>&6
5544 else
5545   ac_save_LIBS="$LIBS"
5546 LIBS="-lbind  $LIBS"
5547 cat > conftest.$ac_ext <<EOF
5548 #line 5549 "configure"
5549 #include "confdefs.h"
5550 /* Override any gcc2 internal prototype to avoid an error.  */
5551 /* We use char because int might match the return type of a gcc2
5552     builtin and then its argument prototype would still apply.  */
5553 char res_query();
5554
5555 int main() {
5556 res_query()
5557 ; return 0; }
5558 EOF
5559 if { (eval echo configure:5560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5560   rm -rf conftest*
5561   eval "ac_cv_lib_$ac_lib_var=yes"
5562 else
5563   echo "configure: failed program was:" >&5
5564   cat conftest.$ac_ext >&5
5565   rm -rf conftest*
5566   eval "ac_cv_lib_$ac_lib_var=no"
5567 fi
5568 rm -f conftest*
5569 LIBS="$ac_save_LIBS"
5570
5571 fi
5572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5573   echo "$ac_t""yes" 1>&6
5574     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5575     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5576   cat >> confdefs.h <<EOF
5577 #define $ac_tr_lib 1
5578 EOF
5579
5580   LIBS="-lbind $LIBS"
5581
5582 else
5583   echo "$ac_t""no" 1>&6
5584 fi
5585
5586         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5587 fi
5588
5589 if test $ac_cv_func_res_query = no ; then 
5590         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5591 echo "configure:5592: checking for __res_query in -lbind" >&5
5592 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5594   echo $ac_n "(cached) $ac_c" 1>&6
5595 else
5596   ac_save_LIBS="$LIBS"
5597 LIBS="-lbind  $LIBS"
5598 cat > conftest.$ac_ext <<EOF
5599 #line 5600 "configure"
5600 #include "confdefs.h"
5601 /* Override any gcc2 internal prototype to avoid an error.  */
5602 /* We use char because int might match the return type of a gcc2
5603     builtin and then its argument prototype would still apply.  */
5604 char __res_query();
5605
5606 int main() {
5607 __res_query()
5608 ; return 0; }
5609 EOF
5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5611   rm -rf conftest*
5612   eval "ac_cv_lib_$ac_lib_var=yes"
5613 else
5614   echo "configure: failed program was:" >&5
5615   cat conftest.$ac_ext >&5
5616   rm -rf conftest*
5617   eval "ac_cv_lib_$ac_lib_var=no"
5618 fi
5619 rm -f conftest*
5620 LIBS="$ac_save_LIBS"
5621
5622 fi
5623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5624   echo "$ac_t""yes" 1>&6
5625     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5626     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5627   cat >> confdefs.h <<EOF
5628 #define $ac_tr_lib 1
5629 EOF
5630
5631   LIBS="-lbind $LIBS"
5632
5633 else
5634   echo "$ac_t""no" 1>&6
5635 fi
5636
5637         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5638 fi
5639
5640 if test $ac_cv_func_res_query = no ; then 
5641         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5642 echo "configure:5643: checking for res_query in -lresolv" >&5
5643 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5645   echo $ac_n "(cached) $ac_c" 1>&6
5646 else
5647   ac_save_LIBS="$LIBS"
5648 LIBS="-lresolv  $LIBS"
5649 cat > conftest.$ac_ext <<EOF
5650 #line 5651 "configure"
5651 #include "confdefs.h"
5652 /* Override any gcc2 internal prototype to avoid an error.  */
5653 /* We use char because int might match the return type of a gcc2
5654     builtin and then its argument prototype would still apply.  */
5655 char res_query();
5656
5657 int main() {
5658 res_query()
5659 ; return 0; }
5660 EOF
5661 if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5662   rm -rf conftest*
5663   eval "ac_cv_lib_$ac_lib_var=yes"
5664 else
5665   echo "configure: failed program was:" >&5
5666   cat conftest.$ac_ext >&5
5667   rm -rf conftest*
5668   eval "ac_cv_lib_$ac_lib_var=no"
5669 fi
5670 rm -f conftest*
5671 LIBS="$ac_save_LIBS"
5672
5673 fi
5674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5675   echo "$ac_t""yes" 1>&6
5676     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5677     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5678   cat >> confdefs.h <<EOF
5679 #define $ac_tr_lib 1
5680 EOF
5681
5682   LIBS="-lresolv $LIBS"
5683
5684 else
5685   echo "$ac_t""no" 1>&6
5686 fi
5687
5688         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5689 fi
5690
5691 if test "$ac_cv_func_res_query" = yes ; then
5692         cat >> confdefs.h <<\EOF
5693 #define HAVE_RES_QUERY 1
5694 EOF
5695
5696
5697         if test $ol_enable_dnssrv != no ; then
5698                 ol_link_dnssrv=yes
5699         fi
5700 fi
5701
5702 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5703         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5704 fi
5705
5706 for ac_func in getaddrinfo 
5707 do
5708 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5709 echo "configure:5710: checking for $ac_func" >&5
5710 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5711   echo $ac_n "(cached) $ac_c" 1>&6
5712 else
5713   cat > conftest.$ac_ext <<EOF
5714 #line 5715 "configure"
5715 #include "confdefs.h"
5716 /* System header to define __stub macros and hopefully few prototypes,
5717     which can conflict with char $ac_func(); below.  */
5718 #include <assert.h>
5719 /* Override any gcc2 internal prototype to avoid an error.  */
5720 /* We use char because int might match the return type of a gcc2
5721     builtin and then its argument prototype would still apply.  */
5722 char $ac_func();
5723 char (*f)();
5724
5725 int main() {
5726
5727 /* The GNU C library defines this for functions which it implements
5728     to always fail with ENOSYS.  Some functions are actually named
5729     something starting with __ and the normal name is an alias.  */
5730 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5731 choke me
5732 #else
5733 f = $ac_func;
5734 #endif
5735
5736 ; return 0; }
5737 EOF
5738 if { (eval echo configure:5739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5739   rm -rf conftest*
5740   eval "ac_cv_func_$ac_func=yes"
5741 else
5742   echo "configure: failed program was:" >&5
5743   cat conftest.$ac_ext >&5
5744   rm -rf conftest*
5745   eval "ac_cv_func_$ac_func=no"
5746 fi
5747 rm -f conftest*
5748 fi
5749
5750 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5751   echo "$ac_t""yes" 1>&6
5752     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5753   cat >> confdefs.h <<EOF
5754 #define $ac_tr_func 1
5755 EOF
5756  
5757 else
5758   echo "$ac_t""no" 1>&6
5759 fi
5760 done
5761
5762
5763 ol_link_ipv6=no
5764 if test $ac_cv_func_getaddrinfo = no ; then
5765         if test $ol_enable_ipv6 = yes ; then
5766                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
5767         fi
5768 else
5769         for ac_func in gai_strerror 
5770 do
5771 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5772 echo "configure:5773: checking for $ac_func" >&5
5773 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5774   echo $ac_n "(cached) $ac_c" 1>&6
5775 else
5776   cat > conftest.$ac_ext <<EOF
5777 #line 5778 "configure"
5778 #include "confdefs.h"
5779 /* System header to define __stub macros and hopefully few prototypes,
5780     which can conflict with char $ac_func(); below.  */
5781 #include <assert.h>
5782 /* Override any gcc2 internal prototype to avoid an error.  */
5783 /* We use char because int might match the return type of a gcc2
5784     builtin and then its argument prototype would still apply.  */
5785 char $ac_func();
5786 char (*f)();
5787
5788 int main() {
5789
5790 /* The GNU C library defines this for functions which it implements
5791     to always fail with ENOSYS.  Some functions are actually named
5792     something starting with __ and the normal name is an alias.  */
5793 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5794 choke me
5795 #else
5796 f = $ac_func;
5797 #endif
5798
5799 ; return 0; }
5800 EOF
5801 if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5802   rm -rf conftest*
5803   eval "ac_cv_func_$ac_func=yes"
5804 else
5805   echo "configure: failed program was:" >&5
5806   cat conftest.$ac_ext >&5
5807   rm -rf conftest*
5808   eval "ac_cv_func_$ac_func=no"
5809 fi
5810 rm -f conftest*
5811 fi
5812
5813 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5814   echo "$ac_t""yes" 1>&6
5815     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5816   cat >> confdefs.h <<EOF
5817 #define $ac_tr_func 1
5818 EOF
5819  
5820 else
5821   echo "$ac_t""no" 1>&6
5822 fi
5823 done
5824
5825
5826         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5827 echo "configure:5828: checking INET6_ADDRSTRLEN" >&5
5828 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5829   echo $ac_n "(cached) $ac_c" 1>&6
5830 else
5831   
5832                 cat > conftest.$ac_ext <<EOF
5833 #line 5834 "configure"
5834 #include "confdefs.h"
5835
5836 #                       include <netinet/in.h>
5837 #                       ifdef INET6_ADDRSTRLEN
5838                                 __has_inet6_addrstrlen__;
5839 #                       endif
5840                 
5841 EOF
5842 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5843   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5844   rm -rf conftest*
5845   ol_cv_inet6_addrstrlen=yes
5846 else
5847   rm -rf conftest*
5848   ol_cv_inet6_addrstrlen=no
5849 fi
5850 rm -f conftest*
5851
5852 fi
5853
5854 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5855
5856         if test $ol_cv_inet6_addrstrlen = yes ; then
5857                 ol_link_ipv6=yes
5858         elif test $ol_enable_ipv6 = yes ; then
5859                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5860         fi
5861 fi
5862
5863 if test $ol_enable_local != no ; then
5864         for ac_hdr in sys/un.h 
5865 do
5866 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5867 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5868 echo "configure:5869: checking for $ac_hdr" >&5
5869 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5870   echo $ac_n "(cached) $ac_c" 1>&6
5871 else
5872   cat > conftest.$ac_ext <<EOF
5873 #line 5874 "configure"
5874 #include "confdefs.h"
5875 #include <$ac_hdr>
5876 EOF
5877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5878 { (eval echo configure:5879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5880 if test -z "$ac_err"; then
5881   rm -rf conftest*
5882   eval "ac_cv_header_$ac_safe=yes"
5883 else
5884   echo "$ac_err" >&5
5885   echo "configure: failed program was:" >&5
5886   cat conftest.$ac_ext >&5
5887   rm -rf conftest*
5888   eval "ac_cv_header_$ac_safe=no"
5889 fi
5890 rm -f conftest*
5891 fi
5892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5893   echo "$ac_t""yes" 1>&6
5894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5895   cat >> confdefs.h <<EOF
5896 #define $ac_tr_hdr 1
5897 EOF
5898  
5899 else
5900   echo "$ac_t""no" 1>&6
5901 fi
5902 done
5903
5904
5905         if test $ol_enable_local = auto ; then
5906                 ol_enable_local=$ac_cv_header_sys_un_h
5907         elif test $ac_cv_header_sys_un_h = no ; then
5908                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5909         fi
5910 fi
5911
5912 ol_link_kbind=no
5913 ol_link_kpasswd=no
5914 ol_link_krb5=no
5915 ol_link_krb4=no
5916
5917 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5918         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5919         -o $ol_with_kerberos = k425 ; then
5920
5921         for ac_hdr in krb5.h
5922 do
5923 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5924 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5925 echo "configure:5926: checking for $ac_hdr" >&5
5926 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5927   echo $ac_n "(cached) $ac_c" 1>&6
5928 else
5929   cat > conftest.$ac_ext <<EOF
5930 #line 5931 "configure"
5931 #include "confdefs.h"
5932 #include <$ac_hdr>
5933 EOF
5934 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5935 { (eval echo configure:5936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5936 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5937 if test -z "$ac_err"; then
5938   rm -rf conftest*
5939   eval "ac_cv_header_$ac_safe=yes"
5940 else
5941   echo "$ac_err" >&5
5942   echo "configure: failed program was:" >&5
5943   cat conftest.$ac_ext >&5
5944   rm -rf conftest*
5945   eval "ac_cv_header_$ac_safe=no"
5946 fi
5947 rm -f conftest*
5948 fi
5949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5950   echo "$ac_t""yes" 1>&6
5951     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5952   cat >> confdefs.h <<EOF
5953 #define $ac_tr_hdr 1
5954 EOF
5955  
5956 else
5957   echo "$ac_t""no" 1>&6
5958 fi
5959 done
5960
5961
5962         if test $ac_cv_header_krb5_h = yes ; then
5963                                 for ac_hdr in heim_err.h
5964 do
5965 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5966 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5967 echo "configure:5968: checking for $ac_hdr" >&5
5968 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5969   echo $ac_n "(cached) $ac_c" 1>&6
5970 else
5971   cat > conftest.$ac_ext <<EOF
5972 #line 5973 "configure"
5973 #include "confdefs.h"
5974 #include <$ac_hdr>
5975 EOF
5976 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5977 { (eval echo configure:5978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5978 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5979 if test -z "$ac_err"; then
5980   rm -rf conftest*
5981   eval "ac_cv_header_$ac_safe=yes"
5982 else
5983   echo "$ac_err" >&5
5984   echo "configure: failed program was:" >&5
5985   cat conftest.$ac_ext >&5
5986   rm -rf conftest*
5987   eval "ac_cv_header_$ac_safe=no"
5988 fi
5989 rm -f conftest*
5990 fi
5991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5992   echo "$ac_t""yes" 1>&6
5993     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5994   cat >> confdefs.h <<EOF
5995 #define $ac_tr_hdr 1
5996 EOF
5997  
5998 else
5999   echo "$ac_t""no" 1>&6
6000 fi
6001 done
6002
6003                 if test $ac_cv_header_heim_err_h = yes ; then
6004                         krb5_impl=heimdal
6005                 else
6006                         krb5_impl=mit
6007                 fi
6008
6009                 if test $krb5_impl = mit; then
6010                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6011 echo "configure:6012: checking for main in -lkrb5" >&5
6012 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6014   echo $ac_n "(cached) $ac_c" 1>&6
6015 else
6016   ac_save_LIBS="$LIBS"
6017 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6018 cat > conftest.$ac_ext <<EOF
6019 #line 6020 "configure"
6020 #include "confdefs.h"
6021
6022 int main() {
6023 main()
6024 ; return 0; }
6025 EOF
6026 if { (eval echo configure:6027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6027   rm -rf conftest*
6028   eval "ac_cv_lib_$ac_lib_var=yes"
6029 else
6030   echo "configure: failed program was:" >&5
6031   cat conftest.$ac_ext >&5
6032   rm -rf conftest*
6033   eval "ac_cv_lib_$ac_lib_var=no"
6034 fi
6035 rm -f conftest*
6036 LIBS="$ac_save_LIBS"
6037
6038 fi
6039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6040   echo "$ac_t""yes" 1>&6
6041   have_krb5=yes
6042                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6043 else
6044   echo "$ac_t""no" 1>&6
6045 have_krb5=no
6046 fi
6047
6048
6049                 elif test $krb5_impl = heimdal; then
6050                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6051 echo "configure:6052: checking for main in -lkrb5" >&5
6052 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6053 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6054   echo $ac_n "(cached) $ac_c" 1>&6
6055 else
6056   ac_save_LIBS="$LIBS"
6057 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6058 cat > conftest.$ac_ext <<EOF
6059 #line 6060 "configure"
6060 #include "confdefs.h"
6061
6062 int main() {
6063 main()
6064 ; return 0; }
6065 EOF
6066 if { (eval echo configure:6067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6067   rm -rf conftest*
6068   eval "ac_cv_lib_$ac_lib_var=yes"
6069 else
6070   echo "configure: failed program was:" >&5
6071   cat conftest.$ac_ext >&5
6072   rm -rf conftest*
6073   eval "ac_cv_lib_$ac_lib_var=no"
6074 fi
6075 rm -f conftest*
6076 LIBS="$ac_save_LIBS"
6077
6078 fi
6079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6080   echo "$ac_t""yes" 1>&6
6081   have_krb5=yes
6082                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6083 else
6084   echo "$ac_t""no" 1>&6
6085 have_krb5=no
6086 fi
6087
6088
6089                         cat >> confdefs.h <<\EOF
6090 #define HAVE_HEIMDAL_KERBEROS 1
6091 EOF
6092
6093                 else
6094                         have_krb5=no
6095                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6096                 fi
6097
6098                 if test $have_krb5 = yes ; then
6099                         ol_link_krb5=yes
6100
6101                         cat >> confdefs.h <<\EOF
6102 #define HAVE_KRB5 1
6103 EOF
6104
6105
6106                         if test $ol_enable_kpasswd != no ; then
6107                                 ol_link_kpasswd=yes;
6108                         fi
6109
6110                         if test $ol_with_kerberos = k5only ; then
6111                                 ol_with_kerberos=found
6112                         fi
6113
6114                 elif test $ol_with_kerberos != auto ; then
6115                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6116                 fi
6117
6118         fi
6119 fi
6120
6121 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6122         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6123
6124         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6125 do
6126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6128 echo "configure:6129: checking for $ac_hdr" >&5
6129 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6130   echo $ac_n "(cached) $ac_c" 1>&6
6131 else
6132   cat > conftest.$ac_ext <<EOF
6133 #line 6134 "configure"
6134 #include "confdefs.h"
6135 #include <$ac_hdr>
6136 EOF
6137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6138 { (eval echo configure:6139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6140 if test -z "$ac_err"; then
6141   rm -rf conftest*
6142   eval "ac_cv_header_$ac_safe=yes"
6143 else
6144   echo "$ac_err" >&5
6145   echo "configure: failed program was:" >&5
6146   cat conftest.$ac_ext >&5
6147   rm -rf conftest*
6148   eval "ac_cv_header_$ac_safe=no"
6149 fi
6150 rm -f conftest*
6151 fi
6152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6153   echo "$ac_t""yes" 1>&6
6154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6155   cat >> confdefs.h <<EOF
6156 #define $ac_tr_hdr 1
6157 EOF
6158  
6159 else
6160   echo "$ac_t""no" 1>&6
6161 fi
6162 done
6163
6164
6165         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6166                 if test $krb5_impl = mit; then
6167                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6168 echo "configure:6169: checking for main in -lkrb4" >&5
6169 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6170 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6171   echo $ac_n "(cached) $ac_c" 1>&6
6172 else
6173   ac_save_LIBS="$LIBS"
6174 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6175 cat > conftest.$ac_ext <<EOF
6176 #line 6177 "configure"
6177 #include "confdefs.h"
6178
6179 int main() {
6180 main()
6181 ; return 0; }
6182 EOF
6183 if { (eval echo configure:6184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6184   rm -rf conftest*
6185   eval "ac_cv_lib_$ac_lib_var=yes"
6186 else
6187   echo "configure: failed program was:" >&5
6188   cat conftest.$ac_ext >&5
6189   rm -rf conftest*
6190   eval "ac_cv_lib_$ac_lib_var=no"
6191 fi
6192 rm -f conftest*
6193 LIBS="$ac_save_LIBS"
6194
6195 fi
6196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6197   echo "$ac_t""yes" 1>&6
6198   have_k425=yes
6199                                 KRB4_LIBS="-lkrb4 -ldes425"
6200 else
6201   echo "$ac_t""no" 1>&6
6202 have_k425=no
6203 fi
6204
6205
6206                 elif test $krb5_impl = heimdal; then
6207                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6208 echo "configure:6209: checking for main in -lkrb4" >&5
6209 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6210 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6211   echo $ac_n "(cached) $ac_c" 1>&6
6212 else
6213   ac_save_LIBS="$LIBS"
6214 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6215 cat > conftest.$ac_ext <<EOF
6216 #line 6217 "configure"
6217 #include "confdefs.h"
6218
6219 int main() {
6220 main()
6221 ; return 0; }
6222 EOF
6223 if { (eval echo configure:6224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6224   rm -rf conftest*
6225   eval "ac_cv_lib_$ac_lib_var=yes"
6226 else
6227   echo "configure: failed program was:" >&5
6228   cat conftest.$ac_ext >&5
6229   rm -rf conftest*
6230   eval "ac_cv_lib_$ac_lib_var=no"
6231 fi
6232 rm -f conftest*
6233 LIBS="$ac_save_LIBS"
6234
6235 fi
6236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6237   echo "$ac_t""yes" 1>&6
6238   have_k425=yes
6239                                 KRB4_LIBS="-lkrb4"
6240 else
6241   echo "$ac_t""no" 1>&6
6242 have_k425=no
6243 fi
6244
6245
6246                 else
6247                         have_425=no
6248                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6249                 fi
6250
6251                 if test $have_k425 = yes ; then
6252                         ol_with_kerberos=found
6253                         ol_link_krb4=yes
6254
6255                         cat >> confdefs.h <<\EOF
6256 #define HAVE_KRB425 1
6257 EOF
6258
6259                         cat >> confdefs.h <<\EOF
6260 #define HAVE_KRB4 1
6261 EOF
6262
6263
6264                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6265 echo "configure:6266: checking for des_debug in Kerberos libraries" >&5
6266 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6267   echo $ac_n "(cached) $ac_c" 1>&6
6268 else
6269   
6270                                                                 save_LIBS="$LIBS"
6271                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6272                                 cat > conftest.$ac_ext <<EOF
6273 #line 6274 "configure"
6274 #include "confdefs.h"
6275
6276 #include <kerberosIV/krb.h>
6277 #include <kerberosIV/des.h>
6278 extern int des_debug;
6279
6280 int main() {
6281
6282 des_debug = 1;
6283
6284 ; return 0; }
6285 EOF
6286 if { (eval echo configure:6287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6287   rm -rf conftest*
6288   ol_cv_var_des_debug=yes
6289 else
6290   echo "configure: failed program was:" >&5
6291   cat conftest.$ac_ext >&5
6292   rm -rf conftest*
6293   ol_cv_var_des_debug=no
6294 fi
6295 rm -f conftest*
6296                                                                 LIBS="$save_LIBS"
6297                         
6298 fi
6299
6300 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6301
6302                         if test $ol_cv_var_des_debug = yes ; then
6303                                 cat >> confdefs.h <<\EOF
6304 #define HAVE_DES_DEBUG 1
6305 EOF
6306
6307                         fi
6308
6309                         LIBS="$save_LIBS"
6310                 fi
6311         fi
6312 fi
6313
6314 if test $ol_link_krb5 = yes ; then
6315         ol_with_kerberos=found
6316 fi
6317
6318 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6319         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6320
6321         for ac_hdr in krb.h des.h krb-archaeology.h 
6322 do
6323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6325 echo "configure:6326: checking for $ac_hdr" >&5
6326 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6327   echo $ac_n "(cached) $ac_c" 1>&6
6328 else
6329   cat > conftest.$ac_ext <<EOF
6330 #line 6331 "configure"
6331 #include "confdefs.h"
6332 #include <$ac_hdr>
6333 EOF
6334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6335 { (eval echo configure:6336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6337 if test -z "$ac_err"; then
6338   rm -rf conftest*
6339   eval "ac_cv_header_$ac_safe=yes"
6340 else
6341   echo "$ac_err" >&5
6342   echo "configure: failed program was:" >&5
6343   cat conftest.$ac_ext >&5
6344   rm -rf conftest*
6345   eval "ac_cv_header_$ac_safe=no"
6346 fi
6347 rm -f conftest*
6348 fi
6349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6350   echo "$ac_t""yes" 1>&6
6351     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6352   cat >> confdefs.h <<EOF
6353 #define $ac_tr_hdr 1
6354 EOF
6355  
6356 else
6357   echo "$ac_t""no" 1>&6
6358 fi
6359 done
6360
6361
6362         if test $ac_cv_header_krb_h = yes ; then
6363                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6364 echo "configure:6365: checking for main in -lkrb" >&5
6365 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6366 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6367   echo $ac_n "(cached) $ac_c" 1>&6
6368 else
6369   ac_save_LIBS="$LIBS"
6370 LIBS="-lkrb -ldes $LIBS"
6371 cat > conftest.$ac_ext <<EOF
6372 #line 6373 "configure"
6373 #include "confdefs.h"
6374
6375 int main() {
6376 main()
6377 ; return 0; }
6378 EOF
6379 if { (eval echo configure:6380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6380   rm -rf conftest*
6381   eval "ac_cv_lib_$ac_lib_var=yes"
6382 else
6383   echo "configure: failed program was:" >&5
6384   cat conftest.$ac_ext >&5
6385   rm -rf conftest*
6386   eval "ac_cv_lib_$ac_lib_var=no"
6387 fi
6388 rm -f conftest*
6389 LIBS="$ac_save_LIBS"
6390
6391 fi
6392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6393   echo "$ac_t""yes" 1>&6
6394   have_k4=yes
6395 else
6396   echo "$ac_t""no" 1>&6
6397 have_k4=no
6398 fi
6399
6400
6401                 if test $have_k4 = yes ; then
6402                         ol_with_kerberos=found
6403                         ol_link_krb4=yes
6404
6405                         cat >> confdefs.h <<\EOF
6406 #define HAVE_KRB4 1
6407 EOF
6408
6409
6410                         KRB4_LIBS="-lkrb -ldes"
6411
6412                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6413                                 cat >> confdefs.h <<\EOF
6414 #define HAVE_KTH_KERBEROS 1
6415 EOF
6416
6417                         fi
6418                 fi
6419         fi
6420 fi
6421
6422 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6423         ol_link_kpasswd=yes
6424 fi
6425
6426 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6427         ol_link_kbind=yes
6428
6429 elif test $ol_enable_kbind = yes ; then
6430         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6431 fi
6432
6433 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6434         cat >> confdefs.h <<\EOF
6435 #define HAVE_KERBEROS 1
6436 EOF
6437
6438
6439 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6440         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6441 fi
6442
6443 ol_link_tls=no
6444 if test $ol_with_tls != no ; then
6445         for ac_hdr in openssl/ssl.h ssl.h
6446 do
6447 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6448 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6449 echo "configure:6450: checking for $ac_hdr" >&5
6450 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6451   echo $ac_n "(cached) $ac_c" 1>&6
6452 else
6453   cat > conftest.$ac_ext <<EOF
6454 #line 6455 "configure"
6455 #include "confdefs.h"
6456 #include <$ac_hdr>
6457 EOF
6458 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6459 { (eval echo configure:6460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6460 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6461 if test -z "$ac_err"; then
6462   rm -rf conftest*
6463   eval "ac_cv_header_$ac_safe=yes"
6464 else
6465   echo "$ac_err" >&5
6466   echo "configure: failed program was:" >&5
6467   cat conftest.$ac_ext >&5
6468   rm -rf conftest*
6469   eval "ac_cv_header_$ac_safe=no"
6470 fi
6471 rm -f conftest*
6472 fi
6473 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6474   echo "$ac_t""yes" 1>&6
6475     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6476   cat >> confdefs.h <<EOF
6477 #define $ac_tr_hdr 1
6478 EOF
6479  
6480 else
6481   echo "$ac_t""no" 1>&6
6482 fi
6483 done
6484
6485         
6486         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6487                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6488 echo "configure:6489: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6489 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6490 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6491   echo $ac_n "(cached) $ac_c" 1>&6
6492 else
6493   ac_save_LIBS="$LIBS"
6494 LIBS="-lssl -lcrypto $LIBS"
6495 cat > conftest.$ac_ext <<EOF
6496 #line 6497 "configure"
6497 #include "confdefs.h"
6498 /* Override any gcc2 internal prototype to avoid an error.  */
6499 /* We use char because int might match the return type of a gcc2
6500     builtin and then its argument prototype would still apply.  */
6501 char SSLeay_add_ssl_algorithms();
6502
6503 int main() {
6504 SSLeay_add_ssl_algorithms()
6505 ; return 0; }
6506 EOF
6507 if { (eval echo configure:6508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6508   rm -rf conftest*
6509   eval "ac_cv_lib_$ac_lib_var=yes"
6510 else
6511   echo "configure: failed program was:" >&5
6512   cat conftest.$ac_ext >&5
6513   rm -rf conftest*
6514   eval "ac_cv_lib_$ac_lib_var=no"
6515 fi
6516 rm -f conftest*
6517 LIBS="$ac_save_LIBS"
6518
6519 fi
6520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6521   echo "$ac_t""yes" 1>&6
6522   have_ssleay=yes
6523                         need_rsaref=no
6524 else
6525   echo "$ac_t""no" 1>&6
6526 have_ssleay=no
6527 fi
6528
6529                         
6530                 if test $have_ssleay = no ; then
6531                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6532 echo "configure:6533: checking for SSL_library_init in -lssl" >&5
6533 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6534 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6535   echo $ac_n "(cached) $ac_c" 1>&6
6536 else
6537   ac_save_LIBS="$LIBS"
6538 LIBS="-lssl -lcrypto $LIBS"
6539 cat > conftest.$ac_ext <<EOF
6540 #line 6541 "configure"
6541 #include "confdefs.h"
6542 /* Override any gcc2 internal prototype to avoid an error.  */
6543 /* We use char because int might match the return type of a gcc2
6544     builtin and then its argument prototype would still apply.  */
6545 char SSL_library_init();
6546
6547 int main() {
6548 SSL_library_init()
6549 ; return 0; }
6550 EOF
6551 if { (eval echo configure:6552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6552   rm -rf conftest*
6553   eval "ac_cv_lib_$ac_lib_var=yes"
6554 else
6555   echo "configure: failed program was:" >&5
6556   cat conftest.$ac_ext >&5
6557   rm -rf conftest*
6558   eval "ac_cv_lib_$ac_lib_var=no"
6559 fi
6560 rm -f conftest*
6561 LIBS="$ac_save_LIBS"
6562
6563 fi
6564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6565   echo "$ac_t""yes" 1>&6
6566   have_ssleay=yes
6567                                 need_rsaref=no
6568 else
6569   echo "$ac_t""no" 1>&6
6570 have_ssleay=no
6571 fi
6572
6573                 fi
6574
6575                 if test $have_ssleay = no ; then
6576                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6577 echo "configure:6578: checking for ssl3_accept in -lssl" >&5
6578 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6579 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6580   echo $ac_n "(cached) $ac_c" 1>&6
6581 else
6582   ac_save_LIBS="$LIBS"
6583 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6584 cat > conftest.$ac_ext <<EOF
6585 #line 6586 "configure"
6586 #include "confdefs.h"
6587 /* Override any gcc2 internal prototype to avoid an error.  */
6588 /* We use char because int might match the return type of a gcc2
6589     builtin and then its argument prototype would still apply.  */
6590 char ssl3_accept();
6591
6592 int main() {
6593 ssl3_accept()
6594 ; return 0; }
6595 EOF
6596 if { (eval echo configure:6597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6597   rm -rf conftest*
6598   eval "ac_cv_lib_$ac_lib_var=yes"
6599 else
6600   echo "configure: failed program was:" >&5
6601   cat conftest.$ac_ext >&5
6602   rm -rf conftest*
6603   eval "ac_cv_lib_$ac_lib_var=no"
6604 fi
6605 rm -f conftest*
6606 LIBS="$ac_save_LIBS"
6607
6608 fi
6609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6610   echo "$ac_t""yes" 1>&6
6611   have_ssleay=yes
6612                                 need_rsaref=yes
6613 else
6614   echo "$ac_t""no" 1>&6
6615 have_ssleay=no
6616 fi
6617
6618                 fi
6619
6620                 if test $have_ssleay = yes ; then
6621                         ol_with_tls=found
6622                         ol_link_tls=yes
6623
6624                         cat >> confdefs.h <<\EOF
6625 #define HAVE_SSLEAY 1
6626 EOF
6627
6628
6629                         if test $need_rsaref = yes; then
6630                                 cat >> confdefs.h <<\EOF
6631 #define HAVE_RSAREF 1
6632 EOF
6633
6634
6635                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6636                         else
6637                                 TLS_LIBS="-lssl -lcrypto"
6638                         fi
6639                 fi
6640         fi
6641
6642 else
6643         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6644 fi
6645
6646 if test $ol_link_tls = yes ; then
6647         cat >> confdefs.h <<\EOF
6648 #define HAVE_TLS 1
6649 EOF
6650
6651
6652 elif test $ol_with_tls = auto ; then
6653         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6654         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6655
6656 elif test $ol_with_tls != no ; then
6657         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6658 fi
6659
6660 for ac_func in \
6661         ctime_r                 \
6662         gethostbyname_r gethostbyaddr_r \
6663
6664 do
6665 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6666 echo "configure:6667: checking for $ac_func" >&5
6667 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6668   echo $ac_n "(cached) $ac_c" 1>&6
6669 else
6670   cat > conftest.$ac_ext <<EOF
6671 #line 6672 "configure"
6672 #include "confdefs.h"
6673 /* System header to define __stub macros and hopefully few prototypes,
6674     which can conflict with char $ac_func(); below.  */
6675 #include <assert.h>
6676 /* Override any gcc2 internal prototype to avoid an error.  */
6677 /* We use char because int might match the return type of a gcc2
6678     builtin and then its argument prototype would still apply.  */
6679 char $ac_func();
6680 char (*f)();
6681
6682 int main() {
6683
6684 /* The GNU C library defines this for functions which it implements
6685     to always fail with ENOSYS.  Some functions are actually named
6686     something starting with __ and the normal name is an alias.  */
6687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6688 choke me
6689 #else
6690 f = $ac_func;
6691 #endif
6692
6693 ; return 0; }
6694 EOF
6695 if { (eval echo configure:6696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6696   rm -rf conftest*
6697   eval "ac_cv_func_$ac_func=yes"
6698 else
6699   echo "configure: failed program was:" >&5
6700   cat conftest.$ac_ext >&5
6701   rm -rf conftest*
6702   eval "ac_cv_func_$ac_func=no"
6703 fi
6704 rm -f conftest*
6705 fi
6706
6707 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6708   echo "$ac_t""yes" 1>&6
6709     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6710   cat >> confdefs.h <<EOF
6711 #define $ac_tr_func 1
6712 EOF
6713  
6714 else
6715   echo "$ac_t""no" 1>&6
6716 fi
6717 done
6718
6719
6720 if test "$ac_cv_func_ctime_r" = no ; then
6721         ol_cv_func_ctime_r_nargs=0
6722 else
6723         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6724 echo "configure:6725: checking number of arguments of ctime_r" >&5
6725 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6726   echo $ac_n "(cached) $ac_c" 1>&6
6727 else
6728   cat > conftest.$ac_ext <<EOF
6729 #line 6730 "configure"
6730 #include "confdefs.h"
6731 #include <time.h>
6732 int main() {
6733 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6734 ; return 0; }
6735 EOF
6736 if { (eval echo configure:6737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6737   rm -rf conftest*
6738   ol_cv_func_ctime_r_nargs3=yes
6739 else
6740   echo "configure: failed program was:" >&5
6741   cat conftest.$ac_ext >&5
6742   rm -rf conftest*
6743   ol_cv_func_ctime_r_nargs3=no
6744 fi
6745 rm -f conftest*
6746
6747         cat > conftest.$ac_ext <<EOF
6748 #line 6749 "configure"
6749 #include "confdefs.h"
6750 #include <time.h>
6751 int main() {
6752 time_t ti; char *buffer; ctime_r(&ti,buffer);
6753 ; return 0; }
6754 EOF
6755 if { (eval echo configure:6756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6756   rm -rf conftest*
6757   ol_cv_func_ctime_r_nargs2=yes
6758 else
6759   echo "configure: failed program was:" >&5
6760   cat conftest.$ac_ext >&5
6761   rm -rf conftest*
6762   ol_cv_func_ctime_r_nargs2=no
6763 fi
6764 rm -f conftest*
6765
6766         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6767                 $ol_cv_func_ctime_r_nargs2 = no ; then
6768
6769                 ol_cv_func_ctime_r_nargs=3
6770
6771         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6772                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6773
6774                 ol_cv_func_ctime_r_nargs=2
6775
6776         else
6777                 ol_cv_func_ctime_r_nargs=0
6778         fi
6779   
6780 fi
6781
6782 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6783
6784   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6785         cat >> confdefs.h <<EOF
6786 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6787 EOF
6788
6789   fi
6790
6791 fi
6792
6793 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6794         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6795 echo "configure:6796: checking number of arguments of gethostbyname_r" >&5
6796 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6797   echo $ac_n "(cached) $ac_c" 1>&6
6798 else
6799   cat > conftest.$ac_ext <<EOF
6800 #line 6801 "configure"
6801 #include "confdefs.h"
6802 #include <sys/types.h>
6803 #include <sys/socket.h>
6804 #include <netinet/in.h>
6805 #include <netdb.h>
6806 #define BUFSIZE (sizeof(struct hostent)+10)
6807 int main() {
6808 struct hostent hent; char buffer[BUFSIZE];
6809                 int bufsize=BUFSIZE;int h_errno;
6810                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6811                         buffer, bufsize, &h_errno);
6812 ; return 0; }
6813 EOF
6814 if { (eval echo configure:6815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6815   rm -rf conftest*
6816   ol_cv_func_gethostbyname_r_nargs5=yes
6817 else
6818   echo "configure: failed program was:" >&5
6819   cat conftest.$ac_ext >&5
6820   rm -rf conftest*
6821   ol_cv_func_gethostbyname_r_nargs5=no
6822 fi
6823 rm -f conftest*
6824
6825         cat > conftest.$ac_ext <<EOF
6826 #line 6827 "configure"
6827 #include "confdefs.h"
6828 #include <sys/types.h>
6829 #include <sys/socket.h>
6830 #include <netinet/in.h>
6831 #include <netdb.h>
6832 #define BUFSIZE (sizeof(struct hostent)+10)
6833 int main() {
6834 struct hostent hent;struct hostent *rhent;
6835                 char buffer[BUFSIZE];
6836                 int bufsize=BUFSIZE;int h_errno;
6837                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6838                         &rhent, &h_errno);
6839 ; return 0; }
6840 EOF
6841 if { (eval echo configure:6842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6842   rm -rf conftest*
6843   ol_cv_func_gethostbyname_r_nargs6=yes
6844 else
6845   echo "configure: failed program was:" >&5
6846   cat conftest.$ac_ext >&5
6847   rm -rf conftest*
6848   ol_cv_func_gethostbyname_r_nargs6=no
6849 fi
6850 rm -f conftest*
6851
6852         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6853                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6854
6855                 ol_cv_func_gethostbyname_r_nargs=5
6856
6857         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6858                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6859
6860                 ol_cv_func_gethostbyname_r_nargs=6
6861
6862         else
6863                 ol_cv_func_gethostbyname_r_nargs=0
6864         fi
6865   
6866 fi
6867
6868 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6869   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6870         cat >> confdefs.h <<EOF
6871 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6872 EOF
6873
6874   fi
6875
6876 else
6877         ol_cv_func_gethostbyname_r_nargs=0
6878 fi
6879  
6880 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6881         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6882 echo "configure:6883: checking number of arguments of gethostbyaddr_r" >&5
6883 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6884   echo $ac_n "(cached) $ac_c" 1>&6
6885 else
6886   cat > conftest.$ac_ext <<EOF
6887 #line 6888 "configure"
6888 #include "confdefs.h"
6889 #include <sys/types.h>
6890 #include <sys/socket.h>
6891 #include <netinet/in.h>
6892 #include <netdb.h>
6893 #define BUFSIZE (sizeof(struct hostent)+10)
6894 int main() {
6895 struct hostent hent; char buffer[BUFSIZE]; 
6896             struct in_addr add;
6897             size_t alen=sizeof(struct in_addr);
6898             int bufsize=BUFSIZE;int h_errno;
6899                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6900                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6901 ; return 0; }
6902 EOF
6903 if { (eval echo configure:6904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6904   rm -rf conftest*
6905   ol_cv_func_gethostbyaddr_r_nargs7=yes
6906 else
6907   echo "configure: failed program was:" >&5
6908   cat conftest.$ac_ext >&5
6909   rm -rf conftest*
6910   ol_cv_func_gethostbyaddr_r_nargs7=no
6911 fi
6912 rm -f conftest*
6913
6914         cat > conftest.$ac_ext <<EOF
6915 #line 6916 "configure"
6916 #include "confdefs.h"
6917 #include <sys/types.h>
6918 #include <sys/socket.h>
6919 #include <netinet/in.h>
6920 #include <netdb.h>
6921 #define BUFSIZE (sizeof(struct hostent)+10)
6922 int main() {
6923 struct hostent hent;
6924                 struct hostent *rhent; char buffer[BUFSIZE]; 
6925                 struct in_addr add;
6926                 size_t alen=sizeof(struct in_addr);
6927                 int bufsize=BUFSIZE;int h_errno;
6928                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6929                         alen, AF_INET, &hent, buffer, bufsize, 
6930                         &rhent, &h_errno);
6931 ; return 0; }
6932 EOF
6933 if { (eval echo configure:6934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6934   rm -rf conftest*
6935   ol_cv_func_gethostbyaddr_r_nargs8=yes
6936 else
6937   echo "configure: failed program was:" >&5
6938   cat conftest.$ac_ext >&5
6939   rm -rf conftest*
6940   ol_cv_func_gethostbyaddr_r_nargs8=no
6941 fi
6942 rm -f conftest*
6943
6944         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6945                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6946
6947                 ol_cv_func_gethostbyaddr_r_nargs=7
6948
6949         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6950                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6951
6952                 ol_cv_func_gethostbyaddr_r_nargs=8
6953
6954         else
6955                 ol_cv_func_gethostbyaddr_r_nargs=0
6956         fi
6957   
6958 fi
6959
6960 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6961   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6962     cat >> confdefs.h <<EOF
6963 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6964 EOF
6965
6966   fi
6967
6968 else
6969         ol_cv_func_gethostbyaddr_r_nargs=0
6970 fi
6971
6972 if test "$ac_cv_func_ctime_r" = yes \
6973         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6974         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6975         -a "$ac_cv_func_gethostbyname_r" = yes \
6976         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6977         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6978         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6979         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6980         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6981         ; then
6982  
6983         cat >> confdefs.h <<\EOF
6984 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6985 EOF
6986
6987 fi
6988
6989 ol_link_threads=no
6990
6991 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6992         -o $ol_with_threads = nt ; then
6993
6994         
6995         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6996 echo "configure:6997: checking for NT Threads" >&5
6997 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6998   echo $ac_n "(cached) $ac_c" 1>&6
6999 else
7000   
7001                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7002 echo "configure:7003: checking for _beginthread" >&5
7003 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7004   echo $ac_n "(cached) $ac_c" 1>&6
7005 else
7006   cat > conftest.$ac_ext <<EOF
7007 #line 7008 "configure"
7008 #include "confdefs.h"
7009 /* System header to define __stub macros and hopefully few prototypes,
7010     which can conflict with char _beginthread(); below.  */
7011 #include <assert.h>
7012 /* Override any gcc2 internal prototype to avoid an error.  */
7013 /* We use char because int might match the return type of a gcc2
7014     builtin and then its argument prototype would still apply.  */
7015 char _beginthread();
7016 char (*f)();
7017
7018 int main() {
7019
7020 /* The GNU C library defines this for functions which it implements
7021     to always fail with ENOSYS.  Some functions are actually named
7022     something starting with __ and the normal name is an alias.  */
7023 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7024 choke me
7025 #else
7026 f = _beginthread;
7027 #endif
7028
7029 ; return 0; }
7030 EOF
7031 if { (eval echo configure:7032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7032   rm -rf conftest*
7033   eval "ac_cv_func__beginthread=yes"
7034 else
7035   echo "configure: failed program was:" >&5
7036   cat conftest.$ac_ext >&5
7037   rm -rf conftest*
7038   eval "ac_cv_func__beginthread=no"
7039 fi
7040 rm -f conftest*
7041 fi
7042
7043 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7044   echo "$ac_t""yes" 1>&6
7045   ol_cv_nt_threads=yes
7046 else
7047   echo "$ac_t""no" 1>&6
7048 ol_cv_nt_threads=no
7049 fi
7050
7051         
7052 fi
7053
7054 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7055
7056         if test $ol_cv_nt_threads = yes ; then
7057                 cat >> confdefs.h <<\EOF
7058 #define HAVE_NT_THREADS 1
7059 EOF
7060
7061         fi
7062
7063
7064         if test "$ol_cv_nt_threads" = yes ; then
7065         ol_link_threads=nt
7066         ol_with_threads=found
7067         ol_with_yielding_select=yes
7068
7069                 cat >> confdefs.h <<\EOF
7070 #define HAVE_NT_SERVICE_MANAGER 1
7071 EOF
7072
7073                 cat >> confdefs.h <<\EOF
7074 #define HAVE_NT_EVENT_LOG 1
7075 EOF
7076
7077         fi
7078
7079         if test $ol_with_threads = nt ; then
7080                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7081         fi
7082 fi
7083
7084 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7085         -o $ol_with_threads = posix ; then
7086
7087         for ac_hdr in pthread.h
7088 do
7089 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7090 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7091 echo "configure:7092: checking for $ac_hdr" >&5
7092 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7093   echo $ac_n "(cached) $ac_c" 1>&6
7094 else
7095   cat > conftest.$ac_ext <<EOF
7096 #line 7097 "configure"
7097 #include "confdefs.h"
7098 #include <$ac_hdr>
7099 EOF
7100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7101 { (eval echo configure:7102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7103 if test -z "$ac_err"; then
7104   rm -rf conftest*
7105   eval "ac_cv_header_$ac_safe=yes"
7106 else
7107   echo "$ac_err" >&5
7108   echo "configure: failed program was:" >&5
7109   cat conftest.$ac_ext >&5
7110   rm -rf conftest*
7111   eval "ac_cv_header_$ac_safe=no"
7112 fi
7113 rm -f conftest*
7114 fi
7115 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7116   echo "$ac_t""yes" 1>&6
7117     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7118   cat >> confdefs.h <<EOF
7119 #define $ac_tr_hdr 1
7120 EOF
7121  
7122 else
7123   echo "$ac_t""no" 1>&6
7124 fi
7125 done
7126
7127
7128         if test $ac_cv_header_pthread_h = yes ; then
7129                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7130 echo "configure:7131: checking POSIX thread version" >&5
7131 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7132   echo $ac_n "(cached) $ac_c" 1>&6
7133 else
7134   
7135         cat > conftest.$ac_ext <<EOF
7136 #line 7137 "configure"
7137 #include "confdefs.h"
7138
7139 #               include <pthread.h>
7140                 /* this check could be improved */
7141 #               ifdef PTHREAD_ONCE_INIT
7142                         pthread_version_final;
7143 #               endif
7144         
7145 EOF
7146 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7147   egrep "pthread_version_final" >/dev/null 2>&1; then
7148   rm -rf conftest*
7149   ol_pthread_final=yes
7150 else
7151   rm -rf conftest*
7152   ol_pthread_final=no
7153 fi
7154 rm -f conftest*
7155
7156
7157         cat > conftest.$ac_ext <<EOF
7158 #line 7159 "configure"
7159 #include "confdefs.h"
7160
7161 #               include <pthread.h>
7162                 /* this check could be improved */
7163 #               ifdef pthread_once_init
7164                         pthread_version_draft4;
7165 #               endif
7166         
7167 EOF
7168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7169   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7170   rm -rf conftest*
7171   ol_pthread_draft4=yes
7172 else
7173   rm -rf conftest*
7174   ol_pthread_draft4=no
7175 fi
7176 rm -f conftest*
7177
7178
7179         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7180                 ol_cv_pthread_version=final
7181         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7182                 ol_cv_pthread_version=draft4
7183         else
7184                 ol_cv_pthread_version=unknown
7185         fi
7186
7187 fi
7188
7189 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7190
7191
7192                 if test $ol_cv_pthread_version = final ; then
7193                         cat >> confdefs.h <<\EOF
7194 #define HAVE_PTHREADS_FINAL 1
7195 EOF
7196
7197                 elif test $ol_cv_pthread_version = draft4 ; then
7198                         cat >> confdefs.h <<\EOF
7199 #define HAVE_PTHREADS_D4 1
7200 EOF
7201
7202                 else
7203                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7204                 fi
7205
7206                 # consider threads found
7207                 ol_with_threads=found
7208
7209                 
7210         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7211 echo "configure:7212: checking for LinuxThreads pthread.h" >&5
7212 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7213   echo $ac_n "(cached) $ac_c" 1>&6
7214 else
7215   cat > conftest.$ac_ext <<EOF
7216 #line 7217 "configure"
7217 #include "confdefs.h"
7218 #include <pthread.h>
7219 EOF
7220 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7221   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7222   rm -rf conftest*
7223   ol_cv_header_linux_threads=yes
7224 else
7225   rm -rf conftest*
7226   ol_cv_header_linux_threads=no
7227 fi
7228 rm -f conftest*
7229
7230                 
7231 fi
7232
7233 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7234         if test $ol_cv_header_linux_threads = yes; then
7235                 cat >> confdefs.h <<\EOF
7236 #define HAVE_LINUX_THREADS 1
7237 EOF
7238
7239         fi
7240
7241                 
7242         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7243 echo "configure:7244: checking for GNU Pth pthread.h" >&5
7244 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7245   echo $ac_n "(cached) $ac_c" 1>&6
7246 else
7247   cat > conftest.$ac_ext <<EOF
7248 #line 7249 "configure"
7249 #include "confdefs.h"
7250 #include <pthread.h>
7251 #ifdef _POSIX_THREAD_IS_GNU_PTH
7252         __gnu_pth__;
7253 #endif
7254
7255 EOF
7256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7257   egrep "__gnu_pth__" >/dev/null 2>&1; then
7258   rm -rf conftest*
7259   ol_cv_header_gnu_pth_pthread_h=yes
7260 else
7261   rm -rf conftest*
7262   ol_cv_header_gnu_pth_pthread_h=no
7263 fi
7264 rm -f conftest*
7265
7266                 
7267 fi
7268
7269 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7270
7271
7272                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7273                         for ac_hdr in sched.h
7274 do
7275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7276 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7277 echo "configure:7278: checking for $ac_hdr" >&5
7278 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7279   echo $ac_n "(cached) $ac_c" 1>&6
7280 else
7281   cat > conftest.$ac_ext <<EOF
7282 #line 7283 "configure"
7283 #include "confdefs.h"
7284 #include <$ac_hdr>
7285 EOF
7286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7287 { (eval echo configure:7288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7289 if test -z "$ac_err"; then
7290   rm -rf conftest*
7291   eval "ac_cv_header_$ac_safe=yes"
7292 else
7293   echo "$ac_err" >&5
7294   echo "configure: failed program was:" >&5
7295   cat conftest.$ac_ext >&5
7296   rm -rf conftest*
7297   eval "ac_cv_header_$ac_safe=no"
7298 fi
7299 rm -f conftest*
7300 fi
7301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7302   echo "$ac_t""yes" 1>&6
7303     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7304   cat >> confdefs.h <<EOF
7305 #define $ac_tr_hdr 1
7306 EOF
7307  
7308 else
7309   echo "$ac_t""no" 1>&6
7310 fi
7311 done
7312
7313                 fi
7314
7315                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7316                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7317 echo "configure:7318: checking for pthread_create in default libraries" >&5
7318 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7319   echo $ac_n "(cached) $ac_c" 1>&6
7320 else
7321   
7322                 if test "$cross_compiling" = yes; then
7323   cat > conftest.$ac_ext <<EOF
7324 #line 7325 "configure"
7325 #include "confdefs.h"
7326 /* pthread test headers */
7327 #include <pthread.h>
7328 #ifndef NULL
7329 #define NULL (void*)0
7330 #endif
7331
7332 static void *task(p)
7333         void *p;
7334 {
7335         return (void *) (p == NULL);
7336 }
7337
7338 int main() {
7339
7340         /* pthread test function */
7341         pthread_t t;
7342         int status;
7343 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7344         /* This system (e.g. AIX) defaults detached; must override */
7345         pthread_attr_t attr;
7346
7347         status = pthread_attr_init(&attr);
7348         if( status ) exit( status );
7349
7350         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7351         if( status ) exit( status );
7352
7353 #define ATTR    &attr
7354 #else
7355 #if HAVE_PTHREADS_D4
7356 #define ATTR    pthread_attr_default
7357 #else
7358 #define ATTR    NULL
7359 #endif
7360 #endif
7361         /* make sure pthread_create() isn't just a stub */
7362         status = pthread_create(&t, ATTR, task, NULL);
7363         if( status ) exit( status );
7364
7365         /* make sure pthread_detach() isn't just a stub */
7366 #if HAVE_PTHREADS_D4
7367         status = pthread_detach( &t );
7368 #else
7369         status = pthread_detach( t );
7370 #endif
7371
7372 #ifdef HAVE_LINUX_THREADS
7373         pthread_kill_other_threads_np();
7374 #endif
7375
7376         exit( status );
7377
7378 ; return 0; }
7379 EOF
7380 if { (eval echo configure:7381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7381   rm -rf conftest*
7382   ol_cv_pthread_create=yes
7383 else
7384   echo "configure: failed program was:" >&5
7385   cat conftest.$ac_ext >&5
7386   rm -rf conftest*
7387   ol_cv_pthread_create=no
7388 fi
7389 rm -f conftest*
7390 else
7391   cat > conftest.$ac_ext <<EOF
7392 #line 7393 "configure"
7393 #include "confdefs.h"
7394 /* pthread test headers */
7395 #include <pthread.h>
7396 #ifndef NULL
7397 #define NULL (void*)0
7398 #endif
7399
7400 static void *task(p)
7401         void *p;
7402 {
7403         return (void *) (p == NULL);
7404 }
7405
7406
7407 int main(argc, argv)
7408         int argc;
7409         char **argv;
7410 {
7411
7412         /* pthread test function */
7413         pthread_t t;
7414         int status;
7415 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7416         /* This system (e.g. AIX) defaults detached; must override */
7417         pthread_attr_t attr;
7418
7419         status = pthread_attr_init(&attr);
7420         if( status ) exit( status );
7421
7422         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7423         if( status ) exit( status );
7424
7425 #define ATTR    &attr
7426 #else
7427 #if HAVE_PTHREADS_D4
7428 #define ATTR    pthread_attr_default
7429 #else
7430 #define ATTR    NULL
7431 #endif
7432 #endif
7433         /* make sure pthread_create() isn't just a stub */
7434         status = pthread_create(&t, ATTR, task, NULL);
7435         if( status ) exit( status );
7436
7437         /* make sure pthread_detach() isn't just a stub */
7438 #if HAVE_PTHREADS_D4
7439         status = pthread_detach( &t );
7440 #else
7441         status = pthread_detach( t );
7442 #endif
7443
7444 #ifdef HAVE_LINUX_THREADS
7445         pthread_kill_other_threads_np();
7446 #endif
7447
7448         exit( status );
7449
7450 }
7451
7452 EOF
7453 if { (eval echo configure:7454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7454 then
7455   ol_cv_pthread_create=yes
7456 else
7457   echo "configure: failed program was:" >&5
7458   cat conftest.$ac_ext >&5
7459   rm -fr conftest*
7460   ol_cv_pthread_create=no
7461 fi
7462 rm -fr conftest*
7463 fi
7464
7465 fi
7466
7467 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7468
7469                 if test $ol_cv_pthread_create != no ; then
7470                         ol_link_threads=posix
7471                         ol_link_pthreads=""
7472                 fi
7473                 
7474                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7475 if test "$ol_link_threads" = no ; then
7476         # try -kthread
7477         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7478 echo "configure:7479: checking for pthread link with -kthread" >&5
7479 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7480   echo $ac_n "(cached) $ac_c" 1>&6
7481 else
7482   
7483                 # save the flags
7484                 ol_LIBS="$LIBS"
7485                 LIBS="-kthread $LIBS"
7486
7487                 if test "$cross_compiling" = yes; then
7488   cat > conftest.$ac_ext <<EOF
7489 #line 7490 "configure"
7490 #include "confdefs.h"
7491 /* pthread test headers */
7492 #include <pthread.h>
7493 #ifndef NULL
7494 #define NULL (void*)0
7495 #endif
7496
7497 static void *task(p)
7498         void *p;
7499 {
7500         return (void *) (p == NULL);
7501 }
7502
7503 int main() {
7504
7505         /* pthread test function */
7506         pthread_t t;
7507         int status;
7508 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7509         /* This system (e.g. AIX) defaults detached; must override */
7510         pthread_attr_t attr;
7511
7512         status = pthread_attr_init(&attr);
7513         if( status ) exit( status );
7514
7515         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7516         if( status ) exit( status );
7517
7518 #define ATTR    &attr
7519 #else
7520 #if HAVE_PTHREADS_D4
7521 #define ATTR    pthread_attr_default
7522 #else
7523 #define ATTR    NULL
7524 #endif
7525 #endif
7526         /* make sure pthread_create() isn't just a stub */
7527         status = pthread_create(&t, ATTR, task, NULL);
7528         if( status ) exit( status );
7529
7530         /* make sure pthread_detach() isn't just a stub */
7531 #if HAVE_PTHREADS_D4
7532         status = pthread_detach( &t );
7533 #else
7534         status = pthread_detach( t );
7535 #endif
7536
7537 #ifdef HAVE_LINUX_THREADS
7538         pthread_kill_other_threads_np();
7539 #endif
7540
7541         exit( status );
7542
7543 ; return 0; }
7544 EOF
7545 if { (eval echo configure:7546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7546   rm -rf conftest*
7547   ol_cv_pthread_kthread=yes
7548 else
7549   echo "configure: failed program was:" >&5
7550   cat conftest.$ac_ext >&5
7551   rm -rf conftest*
7552   ol_cv_pthread_kthread=no
7553 fi
7554 rm -f conftest*
7555 else
7556   cat > conftest.$ac_ext <<EOF
7557 #line 7558 "configure"
7558 #include "confdefs.h"
7559 /* pthread test headers */
7560 #include <pthread.h>
7561 #ifndef NULL
7562 #define NULL (void*)0
7563 #endif
7564
7565 static void *task(p)
7566         void *p;
7567 {
7568         return (void *) (p == NULL);
7569 }
7570
7571
7572 int main(argc, argv)
7573         int argc;
7574         char **argv;
7575 {
7576
7577         /* pthread test function */
7578         pthread_t t;
7579         int status;
7580 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7581         /* This system (e.g. AIX) defaults detached; must override */
7582         pthread_attr_t attr;
7583
7584         status = pthread_attr_init(&attr);
7585         if( status ) exit( status );
7586
7587         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7588         if( status ) exit( status );
7589
7590 #define ATTR    &attr
7591 #else
7592 #if HAVE_PTHREADS_D4
7593 #define ATTR    pthread_attr_default
7594 #else
7595 #define ATTR    NULL
7596 #endif
7597 #endif
7598         /* make sure pthread_create() isn't just a stub */
7599         status = pthread_create(&t, ATTR, task, NULL);
7600         if( status ) exit( status );
7601
7602         /* make sure pthread_detach() isn't just a stub */
7603 #if HAVE_PTHREADS_D4
7604         status = pthread_detach( &t );
7605 #else
7606         status = pthread_detach( t );
7607 #endif
7608
7609 #ifdef HAVE_LINUX_THREADS
7610         pthread_kill_other_threads_np();
7611 #endif
7612
7613         exit( status );
7614
7615 }
7616
7617 EOF
7618 if { (eval echo configure:7619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7619 then
7620   ol_cv_pthread_kthread=yes
7621 else
7622   echo "configure: failed program was:" >&5
7623   cat conftest.$ac_ext >&5
7624   rm -fr conftest*
7625   ol_cv_pthread_kthread=no
7626 fi
7627 rm -fr conftest*
7628 fi
7629
7630
7631                 # restore the LIBS
7632                 LIBS="$ol_LIBS"
7633         
7634 fi
7635
7636 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7637
7638         if test $ol_cv_pthread_kthread = yes ; then
7639                 ol_link_pthreads="-kthread"
7640                 ol_link_threads=posix
7641         fi
7642 fi
7643
7644                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7645 if test "$ol_link_threads" = no ; then
7646         # try -pthread
7647         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7648 echo "configure:7649: checking for pthread link with -pthread" >&5
7649 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7650   echo $ac_n "(cached) $ac_c" 1>&6
7651 else
7652   
7653                 # save the flags
7654                 ol_LIBS="$LIBS"
7655                 LIBS="-pthread $LIBS"
7656
7657                 if test "$cross_compiling" = yes; then
7658   cat > conftest.$ac_ext <<EOF
7659 #line 7660 "configure"
7660 #include "confdefs.h"
7661 /* pthread test headers */
7662 #include <pthread.h>
7663 #ifndef NULL
7664 #define NULL (void*)0
7665 #endif
7666
7667 static void *task(p)
7668         void *p;
7669 {
7670         return (void *) (p == NULL);
7671 }
7672
7673 int main() {
7674
7675         /* pthread test function */
7676         pthread_t t;
7677         int status;
7678 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7679         /* This system (e.g. AIX) defaults detached; must override */
7680         pthread_attr_t attr;
7681
7682         status = pthread_attr_init(&attr);
7683         if( status ) exit( status );
7684
7685         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7686         if( status ) exit( status );
7687
7688 #define ATTR    &attr
7689 #else
7690 #if HAVE_PTHREADS_D4
7691 #define ATTR    pthread_attr_default
7692 #else
7693 #define ATTR    NULL
7694 #endif
7695 #endif
7696         /* make sure pthread_create() isn't just a stub */
7697         status = pthread_create(&t, ATTR, task, NULL);
7698         if( status ) exit( status );
7699
7700         /* make sure pthread_detach() isn't just a stub */
7701 #if HAVE_PTHREADS_D4
7702         status = pthread_detach( &t );
7703 #else
7704         status = pthread_detach( t );
7705 #endif
7706
7707 #ifdef HAVE_LINUX_THREADS
7708         pthread_kill_other_threads_np();
7709 #endif
7710
7711         exit( status );
7712
7713 ; return 0; }
7714 EOF
7715 if { (eval echo configure:7716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7716   rm -rf conftest*
7717   ol_cv_pthread_pthread=yes
7718 else
7719   echo "configure: failed program was:" >&5
7720   cat conftest.$ac_ext >&5
7721   rm -rf conftest*
7722   ol_cv_pthread_pthread=no
7723 fi
7724 rm -f conftest*
7725 else
7726   cat > conftest.$ac_ext <<EOF
7727 #line 7728 "configure"
7728 #include "confdefs.h"
7729 /* pthread test headers */
7730 #include <pthread.h>
7731 #ifndef NULL
7732 #define NULL (void*)0
7733 #endif
7734
7735 static void *task(p)
7736         void *p;
7737 {
7738         return (void *) (p == NULL);
7739 }
7740
7741
7742 int main(argc, argv)
7743         int argc;
7744         char **argv;
7745 {
7746
7747         /* pthread test function */
7748         pthread_t t;
7749         int status;
7750 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7751         /* This system (e.g. AIX) defaults detached; must override */
7752         pthread_attr_t attr;
7753
7754         status = pthread_attr_init(&attr);
7755         if( status ) exit( status );
7756
7757         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7758         if( status ) exit( status );
7759
7760 #define ATTR    &attr
7761 #else
7762 #if HAVE_PTHREADS_D4
7763 #define ATTR    pthread_attr_default
7764 #else
7765 #define ATTR    NULL
7766 #endif
7767 #endif
7768         /* make sure pthread_create() isn't just a stub */
7769         status = pthread_create(&t, ATTR, task, NULL);
7770         if( status ) exit( status );
7771
7772         /* make sure pthread_detach() isn't just a stub */
7773 #if HAVE_PTHREADS_D4
7774         status = pthread_detach( &t );
7775 #else
7776         status = pthread_detach( t );
7777 #endif
7778
7779 #ifdef HAVE_LINUX_THREADS
7780         pthread_kill_other_threads_np();
7781 #endif
7782
7783         exit( status );
7784
7785 }
7786
7787 EOF
7788 if { (eval echo configure:7789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7789 then
7790   ol_cv_pthread_pthread=yes
7791 else
7792   echo "configure: failed program was:" >&5
7793   cat conftest.$ac_ext >&5
7794   rm -fr conftest*
7795   ol_cv_pthread_pthread=no
7796 fi
7797 rm -fr conftest*
7798 fi
7799
7800
7801                 # restore the LIBS
7802                 LIBS="$ol_LIBS"
7803         
7804 fi
7805
7806 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7807
7808         if test $ol_cv_pthread_pthread = yes ; then
7809                 ol_link_pthreads="-pthread"
7810                 ol_link_threads=posix
7811         fi
7812 fi
7813
7814                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7815 if test "$ol_link_threads" = no ; then
7816         # try -pthreads
7817         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7818 echo "configure:7819: checking for pthread link with -pthreads" >&5
7819 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7820   echo $ac_n "(cached) $ac_c" 1>&6
7821 else
7822   
7823                 # save the flags
7824                 ol_LIBS="$LIBS"
7825                 LIBS="-pthreads $LIBS"
7826
7827                 if test "$cross_compiling" = yes; then
7828   cat > conftest.$ac_ext <<EOF
7829 #line 7830 "configure"
7830 #include "confdefs.h"
7831 /* pthread test headers */
7832 #include <pthread.h>
7833 #ifndef NULL
7834 #define NULL (void*)0
7835 #endif
7836
7837 static void *task(p)
7838         void *p;
7839 {
7840         return (void *) (p == NULL);
7841 }
7842
7843 int main() {
7844
7845         /* pthread test function */
7846         pthread_t t;
7847         int status;
7848 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7849         /* This system (e.g. AIX) defaults detached; must override */
7850         pthread_attr_t attr;
7851
7852         status = pthread_attr_init(&attr);
7853         if( status ) exit( status );
7854
7855         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7856         if( status ) exit( status );
7857
7858 #define ATTR    &attr
7859 #else
7860 #if HAVE_PTHREADS_D4
7861 #define ATTR    pthread_attr_default
7862 #else
7863 #define ATTR    NULL
7864 #endif
7865 #endif
7866         /* make sure pthread_create() isn't just a stub */
7867         status = pthread_create(&t, ATTR, task, NULL);
7868         if( status ) exit( status );
7869
7870         /* make sure pthread_detach() isn't just a stub */
7871 #if HAVE_PTHREADS_D4
7872         status = pthread_detach( &t );
7873 #else
7874         status = pthread_detach( t );
7875 #endif
7876
7877 #ifdef HAVE_LINUX_THREADS
7878         pthread_kill_other_threads_np();
7879 #endif
7880
7881         exit( status );
7882
7883 ; return 0; }
7884 EOF
7885 if { (eval echo configure:7886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7886   rm -rf conftest*
7887   ol_cv_pthread_pthreads=yes
7888 else
7889   echo "configure: failed program was:" >&5
7890   cat conftest.$ac_ext >&5
7891   rm -rf conftest*
7892   ol_cv_pthread_pthreads=no
7893 fi
7894 rm -f conftest*
7895 else
7896   cat > conftest.$ac_ext <<EOF
7897 #line 7898 "configure"
7898 #include "confdefs.h"
7899 /* pthread test headers */
7900 #include <pthread.h>
7901 #ifndef NULL
7902 #define NULL (void*)0
7903 #endif
7904
7905 static void *task(p)
7906         void *p;
7907 {
7908         return (void *) (p == NULL);
7909 }
7910
7911
7912 int main(argc, argv)
7913         int argc;
7914         char **argv;
7915 {
7916
7917         /* pthread test function */
7918         pthread_t t;
7919         int status;
7920 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7921         /* This system (e.g. AIX) defaults detached; must override */
7922         pthread_attr_t attr;
7923
7924         status = pthread_attr_init(&attr);
7925         if( status ) exit( status );
7926
7927         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7928         if( status ) exit( status );
7929
7930 #define ATTR    &attr
7931 #else
7932 #if HAVE_PTHREADS_D4
7933 #define ATTR    pthread_attr_default
7934 #else
7935 #define ATTR    NULL
7936 #endif
7937 #endif
7938         /* make sure pthread_create() isn't just a stub */
7939         status = pthread_create(&t, ATTR, task, NULL);
7940         if( status ) exit( status );
7941
7942         /* make sure pthread_detach() isn't just a stub */
7943 #if HAVE_PTHREADS_D4
7944         status = pthread_detach( &t );
7945 #else
7946         status = pthread_detach( t );
7947 #endif
7948
7949 #ifdef HAVE_LINUX_THREADS
7950         pthread_kill_other_threads_np();
7951 #endif
7952
7953         exit( status );
7954
7955 }
7956
7957 EOF
7958 if { (eval echo configure:7959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7959 then
7960   ol_cv_pthread_pthreads=yes
7961 else
7962   echo "configure: failed program was:" >&5
7963   cat conftest.$ac_ext >&5
7964   rm -fr conftest*
7965   ol_cv_pthread_pthreads=no
7966 fi
7967 rm -fr conftest*
7968 fi
7969
7970
7971                 # restore the LIBS
7972                 LIBS="$ol_LIBS"
7973         
7974 fi
7975
7976 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7977
7978         if test $ol_cv_pthread_pthreads = yes ; then
7979                 ol_link_pthreads="-pthreads"
7980                 ol_link_threads=posix
7981         fi
7982 fi
7983
7984                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7985 if test "$ol_link_threads" = no ; then
7986         # try -mthreads
7987         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7988 echo "configure:7989: checking for pthread link with -mthreads" >&5
7989 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7990   echo $ac_n "(cached) $ac_c" 1>&6
7991 else
7992   
7993                 # save the flags
7994                 ol_LIBS="$LIBS"
7995                 LIBS="-mthreads $LIBS"
7996
7997                 if test "$cross_compiling" = yes; then
7998   cat > conftest.$ac_ext <<EOF
7999 #line 8000 "configure"
8000 #include "confdefs.h"
8001 /* pthread test headers */
8002 #include <pthread.h>
8003 #ifndef NULL
8004 #define NULL (void*)0
8005 #endif
8006
8007 static void *task(p)
8008         void *p;
8009 {
8010         return (void *) (p == NULL);
8011 }
8012
8013 int main() {
8014
8015         /* pthread test function */
8016         pthread_t t;
8017         int status;
8018 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8019         /* This system (e.g. AIX) defaults detached; must override */
8020         pthread_attr_t attr;
8021
8022         status = pthread_attr_init(&attr);
8023         if( status ) exit( status );
8024
8025         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8026         if( status ) exit( status );
8027
8028 #define ATTR    &attr
8029 #else
8030 #if HAVE_PTHREADS_D4
8031 #define ATTR    pthread_attr_default
8032 #else
8033 #define ATTR    NULL
8034 #endif
8035 #endif
8036         /* make sure pthread_create() isn't just a stub */
8037         status = pthread_create(&t, ATTR, task, NULL);
8038         if( status ) exit( status );
8039
8040         /* make sure pthread_detach() isn't just a stub */
8041 #if HAVE_PTHREADS_D4
8042         status = pthread_detach( &t );
8043 #else
8044         status = pthread_detach( t );
8045 #endif
8046
8047 #ifdef HAVE_LINUX_THREADS
8048         pthread_kill_other_threads_np();
8049 #endif
8050
8051         exit( status );
8052
8053 ; return 0; }
8054 EOF
8055 if { (eval echo configure:8056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8056   rm -rf conftest*
8057   ol_cv_pthread_mthreads=yes
8058 else
8059   echo "configure: failed program was:" >&5
8060   cat conftest.$ac_ext >&5
8061   rm -rf conftest*
8062   ol_cv_pthread_mthreads=no
8063 fi
8064 rm -f conftest*
8065 else
8066   cat > conftest.$ac_ext <<EOF
8067 #line 8068 "configure"
8068 #include "confdefs.h"
8069 /* pthread test headers */
8070 #include <pthread.h>
8071 #ifndef NULL
8072 #define NULL (void*)0
8073 #endif
8074
8075 static void *task(p)
8076         void *p;
8077 {
8078         return (void *) (p == NULL);
8079 }
8080
8081
8082 int main(argc, argv)
8083         int argc;
8084         char **argv;
8085 {
8086
8087         /* pthread test function */
8088         pthread_t t;
8089         int status;
8090 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8091         /* This system (e.g. AIX) defaults detached; must override */
8092         pthread_attr_t attr;
8093
8094         status = pthread_attr_init(&attr);
8095         if( status ) exit( status );
8096
8097         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8098         if( status ) exit( status );
8099
8100 #define ATTR    &attr
8101 #else
8102 #if HAVE_PTHREADS_D4
8103 #define ATTR    pthread_attr_default
8104 #else
8105 #define ATTR    NULL
8106 #endif
8107 #endif
8108         /* make sure pthread_create() isn't just a stub */
8109         status = pthread_create(&t, ATTR, task, NULL);
8110         if( status ) exit( status );
8111
8112         /* make sure pthread_detach() isn't just a stub */
8113 #if HAVE_PTHREADS_D4
8114         status = pthread_detach( &t );
8115 #else
8116         status = pthread_detach( t );
8117 #endif
8118
8119 #ifdef HAVE_LINUX_THREADS
8120         pthread_kill_other_threads_np();
8121 #endif
8122
8123         exit( status );
8124
8125 }
8126
8127 EOF
8128 if { (eval echo configure:8129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8129 then
8130   ol_cv_pthread_mthreads=yes
8131 else
8132   echo "configure: failed program was:" >&5
8133   cat conftest.$ac_ext >&5
8134   rm -fr conftest*
8135   ol_cv_pthread_mthreads=no
8136 fi
8137 rm -fr conftest*
8138 fi
8139
8140
8141                 # restore the LIBS
8142                 LIBS="$ol_LIBS"
8143         
8144 fi
8145
8146 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8147
8148         if test $ol_cv_pthread_mthreads = yes ; then
8149                 ol_link_pthreads="-mthreads"
8150                 ol_link_threads=posix
8151         fi
8152 fi
8153
8154                 # Pthread try link: -thread (ol_cv_pthread_thread)
8155 if test "$ol_link_threads" = no ; then
8156         # try -thread
8157         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8158 echo "configure:8159: checking for pthread link with -thread" >&5
8159 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8160   echo $ac_n "(cached) $ac_c" 1>&6
8161 else
8162   
8163                 # save the flags
8164                 ol_LIBS="$LIBS"
8165                 LIBS="-thread $LIBS"
8166
8167                 if test "$cross_compiling" = yes; then
8168   cat > conftest.$ac_ext <<EOF
8169 #line 8170 "configure"
8170 #include "confdefs.h"
8171 /* pthread test headers */
8172 #include <pthread.h>
8173 #ifndef NULL
8174 #define NULL (void*)0
8175 #endif
8176
8177 static void *task(p)
8178         void *p;
8179 {
8180         return (void *) (p == NULL);
8181 }
8182
8183 int main() {
8184
8185         /* pthread test function */
8186         pthread_t t;
8187         int status;
8188 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8189         /* This system (e.g. AIX) defaults detached; must override */
8190         pthread_attr_t attr;
8191
8192         status = pthread_attr_init(&attr);
8193         if( status ) exit( status );
8194
8195         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8196         if( status ) exit( status );
8197
8198 #define ATTR    &attr
8199 #else
8200 #if HAVE_PTHREADS_D4
8201 #define ATTR    pthread_attr_default
8202 #else
8203 #define ATTR    NULL
8204 #endif
8205 #endif
8206         /* make sure pthread_create() isn't just a stub */
8207         status = pthread_create(&t, ATTR, task, NULL);
8208         if( status ) exit( status );
8209
8210         /* make sure pthread_detach() isn't just a stub */
8211 #if HAVE_PTHREADS_D4
8212         status = pthread_detach( &t );
8213 #else
8214         status = pthread_detach( t );
8215 #endif
8216
8217 #ifdef HAVE_LINUX_THREADS
8218         pthread_kill_other_threads_np();
8219 #endif
8220
8221         exit( status );
8222
8223 ; return 0; }
8224 EOF
8225 if { (eval echo configure:8226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8226   rm -rf conftest*
8227   ol_cv_pthread_thread=yes
8228 else
8229   echo "configure: failed program was:" >&5
8230   cat conftest.$ac_ext >&5
8231   rm -rf conftest*
8232   ol_cv_pthread_thread=no
8233 fi
8234 rm -f conftest*
8235 else
8236   cat > conftest.$ac_ext <<EOF
8237 #line 8238 "configure"
8238 #include "confdefs.h"
8239 /* pthread test headers */
8240 #include <pthread.h>
8241 #ifndef NULL
8242 #define NULL (void*)0
8243 #endif
8244
8245 static void *task(p)
8246         void *p;
8247 {
8248         return (void *) (p == NULL);
8249 }
8250
8251
8252 int main(argc, argv)
8253         int argc;
8254         char **argv;
8255 {
8256
8257         /* pthread test function */
8258         pthread_t t;
8259         int status;
8260 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8261         /* This system (e.g. AIX) defaults detached; must override */
8262         pthread_attr_t attr;
8263
8264         status = pthread_attr_init(&attr);
8265         if( status ) exit( status );
8266
8267         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8268         if( status ) exit( status );
8269
8270 #define ATTR    &attr
8271 #else
8272 #if HAVE_PTHREADS_D4
8273 #define ATTR    pthread_attr_default
8274 #else
8275 #define ATTR    NULL
8276 #endif
8277 #endif
8278         /* make sure pthread_create() isn't just a stub */
8279         status = pthread_create(&t, ATTR, task, NULL);
8280         if( status ) exit( status );
8281
8282         /* make sure pthread_detach() isn't just a stub */
8283 #if HAVE_PTHREADS_D4
8284         status = pthread_detach( &t );
8285 #else
8286         status = pthread_detach( t );
8287 #endif
8288
8289 #ifdef HAVE_LINUX_THREADS
8290         pthread_kill_other_threads_np();
8291 #endif
8292
8293         exit( status );
8294
8295 }
8296
8297 EOF
8298 if { (eval echo configure:8299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8299 then
8300   ol_cv_pthread_thread=yes
8301 else
8302   echo "configure: failed program was:" >&5
8303   cat conftest.$ac_ext >&5
8304   rm -fr conftest*
8305   ol_cv_pthread_thread=no
8306 fi
8307 rm -fr conftest*
8308 fi
8309
8310
8311                 # restore the LIBS
8312                 LIBS="$ol_LIBS"
8313         
8314 fi
8315
8316 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8317
8318         if test $ol_cv_pthread_thread = yes ; then
8319                 ol_link_pthreads="-thread"
8320                 ol_link_threads=posix
8321         fi
8322 fi
8323
8324
8325                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8326 if test "$ol_link_threads" = no ; then
8327         # try -lpthread -lmach -lexc -lc_r
8328         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8329 echo "configure:8330: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8330 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8331   echo $ac_n "(cached) $ac_c" 1>&6
8332 else
8333   
8334                 # save the flags
8335                 ol_LIBS="$LIBS"
8336                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8337
8338                 if test "$cross_compiling" = yes; then
8339   cat > conftest.$ac_ext <<EOF
8340 #line 8341 "configure"
8341 #include "confdefs.h"
8342 /* pthread test headers */
8343 #include <pthread.h>
8344 #ifndef NULL
8345 #define NULL (void*)0
8346 #endif
8347
8348 static void *task(p)
8349         void *p;
8350 {
8351         return (void *) (p == NULL);
8352 }
8353
8354 int main() {
8355
8356         /* pthread test function */
8357         pthread_t t;
8358         int status;
8359 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8360         /* This system (e.g. AIX) defaults detached; must override */
8361         pthread_attr_t attr;
8362
8363         status = pthread_attr_init(&attr);
8364         if( status ) exit( status );
8365
8366         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8367         if( status ) exit( status );
8368
8369 #define ATTR    &attr
8370 #else
8371 #if HAVE_PTHREADS_D4
8372 #define ATTR    pthread_attr_default
8373 #else
8374 #define ATTR    NULL
8375 #endif
8376 #endif
8377         /* make sure pthread_create() isn't just a stub */
8378         status = pthread_create(&t, ATTR, task, NULL);
8379         if( status ) exit( status );
8380
8381         /* make sure pthread_detach() isn't just a stub */
8382 #if HAVE_PTHREADS_D4
8383         status = pthread_detach( &t );
8384 #else
8385         status = pthread_detach( t );
8386 #endif
8387
8388 #ifdef HAVE_LINUX_THREADS
8389         pthread_kill_other_threads_np();
8390 #endif
8391
8392         exit( status );
8393
8394 ; return 0; }
8395 EOF
8396 if { (eval echo configure:8397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8397   rm -rf conftest*
8398   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8399 else
8400   echo "configure: failed program was:" >&5
8401   cat conftest.$ac_ext >&5
8402   rm -rf conftest*
8403   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8404 fi
8405 rm -f conftest*
8406 else
8407   cat > conftest.$ac_ext <<EOF
8408 #line 8409 "configure"
8409 #include "confdefs.h"
8410 /* pthread test headers */
8411 #include <pthread.h>
8412 #ifndef NULL
8413 #define NULL (void*)0
8414 #endif
8415
8416 static void *task(p)
8417         void *p;
8418 {
8419         return (void *) (p == NULL);
8420 }
8421
8422
8423 int main(argc, argv)
8424         int argc;
8425         char **argv;
8426 {
8427
8428         /* pthread test function */
8429         pthread_t t;
8430         int status;
8431 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8432         /* This system (e.g. AIX) defaults detached; must override */
8433         pthread_attr_t attr;
8434
8435         status = pthread_attr_init(&attr);
8436         if( status ) exit( status );
8437
8438         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8439         if( status ) exit( status );
8440
8441 #define ATTR    &attr
8442 #else
8443 #if HAVE_PTHREADS_D4
8444 #define ATTR    pthread_attr_default
8445 #else
8446 #define ATTR    NULL
8447 #endif
8448 #endif
8449         /* make sure pthread_create() isn't just a stub */
8450         status = pthread_create(&t, ATTR, task, NULL);
8451         if( status ) exit( status );
8452
8453         /* make sure pthread_detach() isn't just a stub */
8454 #if HAVE_PTHREADS_D4
8455         status = pthread_detach( &t );
8456 #else
8457         status = pthread_detach( t );
8458 #endif
8459
8460 #ifdef HAVE_LINUX_THREADS
8461         pthread_kill_other_threads_np();
8462 #endif
8463
8464         exit( status );
8465
8466 }
8467
8468 EOF
8469 if { (eval echo configure:8470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8470 then
8471   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8472 else
8473   echo "configure: failed program was:" >&5
8474   cat conftest.$ac_ext >&5
8475   rm -fr conftest*
8476   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8477 fi
8478 rm -fr conftest*
8479 fi
8480
8481
8482                 # restore the LIBS
8483                 LIBS="$ol_LIBS"
8484         
8485 fi
8486
8487 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8488
8489         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8490                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8491                 ol_link_threads=posix
8492         fi
8493 fi
8494
8495                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8496 if test "$ol_link_threads" = no ; then
8497         # try -lpthread -lmach -lexc
8498         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8499 echo "configure:8500: checking for pthread link with -lpthread -lmach -lexc" >&5
8500 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8501   echo $ac_n "(cached) $ac_c" 1>&6
8502 else
8503   
8504                 # save the flags
8505                 ol_LIBS="$LIBS"
8506                 LIBS="-lpthread -lmach -lexc $LIBS"
8507
8508                 if test "$cross_compiling" = yes; then
8509   cat > conftest.$ac_ext <<EOF
8510 #line 8511 "configure"
8511 #include "confdefs.h"
8512 /* pthread test headers */
8513 #include <pthread.h>
8514 #ifndef NULL
8515 #define NULL (void*)0
8516 #endif
8517
8518 static void *task(p)
8519         void *p;
8520 {
8521         return (void *) (p == NULL);
8522 }
8523
8524 int main() {
8525
8526         /* pthread test function */
8527         pthread_t t;
8528         int status;
8529 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8530         /* This system (e.g. AIX) defaults detached; must override */
8531         pthread_attr_t attr;
8532
8533         status = pthread_attr_init(&attr);
8534         if( status ) exit( status );
8535
8536         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8537         if( status ) exit( status );
8538
8539 #define ATTR    &attr
8540 #else
8541 #if HAVE_PTHREADS_D4
8542 #define ATTR    pthread_attr_default
8543 #else
8544 #define ATTR    NULL
8545 #endif
8546 #endif
8547         /* make sure pthread_create() isn't just a stub */
8548         status = pthread_create(&t, ATTR, task, NULL);
8549         if( status ) exit( status );
8550
8551         /* make sure pthread_detach() isn't just a stub */
8552 #if HAVE_PTHREADS_D4
8553         status = pthread_detach( &t );
8554 #else
8555         status = pthread_detach( t );
8556 #endif
8557
8558 #ifdef HAVE_LINUX_THREADS
8559         pthread_kill_other_threads_np();
8560 #endif
8561
8562         exit( status );
8563
8564 ; return 0; }
8565 EOF
8566 if { (eval echo configure:8567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8567   rm -rf conftest*
8568   ol_cv_pthread_lpthread_lmach_lexc=yes
8569 else
8570   echo "configure: failed program was:" >&5
8571   cat conftest.$ac_ext >&5
8572   rm -rf conftest*
8573   ol_cv_pthread_lpthread_lmach_lexc=no
8574 fi
8575 rm -f conftest*
8576 else
8577   cat > conftest.$ac_ext <<EOF
8578 #line 8579 "configure"
8579 #include "confdefs.h"
8580 /* pthread test headers */
8581 #include <pthread.h>
8582 #ifndef NULL
8583 #define NULL (void*)0
8584 #endif
8585
8586 static void *task(p)
8587         void *p;
8588 {
8589         return (void *) (p == NULL);
8590 }
8591
8592
8593 int main(argc, argv)
8594         int argc;
8595         char **argv;
8596 {
8597
8598         /* pthread test function */
8599         pthread_t t;
8600         int status;
8601 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8602         /* This system (e.g. AIX) defaults detached; must override */
8603         pthread_attr_t attr;
8604
8605         status = pthread_attr_init(&attr);
8606         if( status ) exit( status );
8607
8608         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8609         if( status ) exit( status );
8610
8611 #define ATTR    &attr
8612 #else
8613 #if HAVE_PTHREADS_D4
8614 #define ATTR    pthread_attr_default
8615 #else
8616 #define ATTR    NULL
8617 #endif
8618 #endif
8619         /* make sure pthread_create() isn't just a stub */
8620         status = pthread_create(&t, ATTR, task, NULL);
8621         if( status ) exit( status );
8622
8623         /* make sure pthread_detach() isn't just a stub */
8624 #if HAVE_PTHREADS_D4
8625         status = pthread_detach( &t );
8626 #else
8627         status = pthread_detach( t );
8628 #endif
8629
8630 #ifdef HAVE_LINUX_THREADS
8631         pthread_kill_other_threads_np();
8632 #endif
8633
8634         exit( status );
8635
8636 }
8637
8638 EOF
8639 if { (eval echo configure:8640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8640 then
8641   ol_cv_pthread_lpthread_lmach_lexc=yes
8642 else
8643   echo "configure: failed program was:" >&5
8644   cat conftest.$ac_ext >&5
8645   rm -fr conftest*
8646   ol_cv_pthread_lpthread_lmach_lexc=no
8647 fi
8648 rm -fr conftest*
8649 fi
8650
8651
8652                 # restore the LIBS
8653                 LIBS="$ol_LIBS"
8654         
8655 fi
8656
8657 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8658
8659         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8660                 ol_link_pthreads="-lpthread -lmach -lexc"
8661                 ol_link_threads=posix
8662         fi
8663 fi
8664
8665
8666                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8667 if test "$ol_link_threads" = no ; then
8668         # try -lpthread -Wl,-woff,85
8669         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8670 echo "configure:8671: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8671 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8672   echo $ac_n "(cached) $ac_c" 1>&6
8673 else
8674   
8675                 # save the flags
8676                 ol_LIBS="$LIBS"
8677                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8678
8679                 if test "$cross_compiling" = yes; then
8680   cat > conftest.$ac_ext <<EOF
8681 #line 8682 "configure"
8682 #include "confdefs.h"
8683 /* pthread test headers */
8684 #include <pthread.h>
8685 #ifndef NULL
8686 #define NULL (void*)0
8687 #endif
8688
8689 static void *task(p)
8690         void *p;
8691 {
8692         return (void *) (p == NULL);
8693 }
8694
8695 int main() {
8696
8697         /* pthread test function */
8698         pthread_t t;
8699         int status;
8700 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8701         /* This system (e.g. AIX) defaults detached; must override */
8702         pthread_attr_t attr;
8703
8704         status = pthread_attr_init(&attr);
8705         if( status ) exit( status );
8706
8707         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8708         if( status ) exit( status );
8709
8710 #define ATTR    &attr
8711 #else
8712 #if HAVE_PTHREADS_D4
8713 #define ATTR    pthread_attr_default
8714 #else
8715 #define ATTR    NULL
8716 #endif
8717 #endif
8718         /* make sure pthread_create() isn't just a stub */
8719         status = pthread_create(&t, ATTR, task, NULL);
8720         if( status ) exit( status );
8721
8722         /* make sure pthread_detach() isn't just a stub */
8723 #if HAVE_PTHREADS_D4
8724         status = pthread_detach( &t );
8725 #else
8726         status = pthread_detach( t );
8727 #endif
8728
8729 #ifdef HAVE_LINUX_THREADS
8730         pthread_kill_other_threads_np();
8731 #endif
8732
8733         exit( status );
8734
8735 ; return 0; }
8736 EOF
8737 if { (eval echo configure:8738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8738   rm -rf conftest*
8739   ol_cv_pthread_lib_lpthread_woff=yes
8740 else
8741   echo "configure: failed program was:" >&5
8742   cat conftest.$ac_ext >&5
8743   rm -rf conftest*
8744   ol_cv_pthread_lib_lpthread_woff=no
8745 fi
8746 rm -f conftest*
8747 else
8748   cat > conftest.$ac_ext <<EOF
8749 #line 8750 "configure"
8750 #include "confdefs.h"
8751 /* pthread test headers */
8752 #include <pthread.h>
8753 #ifndef NULL
8754 #define NULL (void*)0
8755 #endif
8756
8757 static void *task(p)
8758         void *p;
8759 {
8760         return (void *) (p == NULL);
8761 }
8762
8763
8764 int main(argc, argv)
8765         int argc;
8766         char **argv;
8767 {
8768
8769         /* pthread test function */
8770         pthread_t t;
8771         int status;
8772 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8773         /* This system (e.g. AIX) defaults detached; must override */
8774         pthread_attr_t attr;
8775
8776         status = pthread_attr_init(&attr);
8777         if( status ) exit( status );
8778
8779         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8780         if( status ) exit( status );
8781
8782 #define ATTR    &attr
8783 #else
8784 #if HAVE_PTHREADS_D4
8785 #define ATTR    pthread_attr_default
8786 #else
8787 #define ATTR    NULL
8788 #endif
8789 #endif
8790         /* make sure pthread_create() isn't just a stub */
8791         status = pthread_create(&t, ATTR, task, NULL);
8792         if( status ) exit( status );
8793
8794         /* make sure pthread_detach() isn't just a stub */
8795 #if HAVE_PTHREADS_D4
8796         status = pthread_detach( &t );
8797 #else
8798         status = pthread_detach( t );
8799 #endif
8800
8801 #ifdef HAVE_LINUX_THREADS
8802         pthread_kill_other_threads_np();
8803 #endif
8804
8805         exit( status );
8806
8807 }
8808
8809 EOF
8810 if { (eval echo configure:8811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8811 then
8812   ol_cv_pthread_lib_lpthread_woff=yes
8813 else
8814   echo "configure: failed program was:" >&5
8815   cat conftest.$ac_ext >&5
8816   rm -fr conftest*
8817   ol_cv_pthread_lib_lpthread_woff=no
8818 fi
8819 rm -fr conftest*
8820 fi
8821
8822
8823                 # restore the LIBS
8824                 LIBS="$ol_LIBS"
8825         
8826 fi
8827
8828 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8829
8830         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8831                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8832                 ol_link_threads=posix
8833         fi
8834 fi
8835
8836
8837                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8838 if test "$ol_link_threads" = no ; then
8839         # try -lpthread
8840         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8841 echo "configure:8842: checking for pthread link with -lpthread" >&5
8842 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8843   echo $ac_n "(cached) $ac_c" 1>&6
8844 else
8845   
8846                 # save the flags
8847                 ol_LIBS="$LIBS"
8848                 LIBS="-lpthread $LIBS"
8849
8850                 if test "$cross_compiling" = yes; then
8851   cat > conftest.$ac_ext <<EOF
8852 #line 8853 "configure"
8853 #include "confdefs.h"
8854 /* pthread test headers */
8855 #include <pthread.h>
8856 #ifndef NULL
8857 #define NULL (void*)0
8858 #endif
8859
8860 static void *task(p)
8861         void *p;
8862 {
8863         return (void *) (p == NULL);
8864 }
8865
8866 int main() {
8867
8868         /* pthread test function */
8869         pthread_t t;
8870         int status;
8871 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8872         /* This system (e.g. AIX) defaults detached; must override */
8873         pthread_attr_t attr;
8874
8875         status = pthread_attr_init(&attr);
8876         if( status ) exit( status );
8877
8878         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8879         if( status ) exit( status );
8880
8881 #define ATTR    &attr
8882 #else
8883 #if HAVE_PTHREADS_D4
8884 #define ATTR    pthread_attr_default
8885 #else
8886 #define ATTR    NULL
8887 #endif
8888 #endif
8889         /* make sure pthread_create() isn't just a stub */
8890         status = pthread_create(&t, ATTR, task, NULL);
8891         if( status ) exit( status );
8892
8893         /* make sure pthread_detach() isn't just a stub */
8894 #if HAVE_PTHREADS_D4
8895         status = pthread_detach( &t );
8896 #else
8897         status = pthread_detach( t );
8898 #endif
8899
8900 #ifdef HAVE_LINUX_THREADS
8901         pthread_kill_other_threads_np();
8902 #endif
8903
8904         exit( status );
8905
8906 ; return 0; }
8907 EOF
8908 if { (eval echo configure:8909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8909   rm -rf conftest*
8910   ol_cv_pthread_lpthread=yes
8911 else
8912   echo "configure: failed program was:" >&5
8913   cat conftest.$ac_ext >&5
8914   rm -rf conftest*
8915   ol_cv_pthread_lpthread=no
8916 fi
8917 rm -f conftest*
8918 else
8919   cat > conftest.$ac_ext <<EOF
8920 #line 8921 "configure"
8921 #include "confdefs.h"
8922 /* pthread test headers */
8923 #include <pthread.h>
8924 #ifndef NULL
8925 #define NULL (void*)0
8926 #endif
8927
8928 static void *task(p)
8929         void *p;
8930 {
8931         return (void *) (p == NULL);
8932 }
8933
8934
8935 int main(argc, argv)
8936         int argc;
8937         char **argv;
8938 {
8939
8940         /* pthread test function */
8941         pthread_t t;
8942         int status;
8943 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8944         /* This system (e.g. AIX) defaults detached; must override */
8945         pthread_attr_t attr;
8946
8947         status = pthread_attr_init(&attr);
8948         if( status ) exit( status );
8949
8950         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8951         if( status ) exit( status );
8952
8953 #define ATTR    &attr
8954 #else
8955 #if HAVE_PTHREADS_D4
8956 #define ATTR    pthread_attr_default
8957 #else
8958 #define ATTR    NULL
8959 #endif
8960 #endif
8961         /* make sure pthread_create() isn't just a stub */
8962         status = pthread_create(&t, ATTR, task, NULL);
8963         if( status ) exit( status );
8964
8965         /* make sure pthread_detach() isn't just a stub */
8966 #if HAVE_PTHREADS_D4
8967         status = pthread_detach( &t );
8968 #else
8969         status = pthread_detach( t );
8970 #endif
8971
8972 #ifdef HAVE_LINUX_THREADS
8973         pthread_kill_other_threads_np();
8974 #endif
8975
8976         exit( status );
8977
8978 }
8979
8980 EOF
8981 if { (eval echo configure:8982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8982 then
8983   ol_cv_pthread_lpthread=yes
8984 else
8985   echo "configure: failed program was:" >&5
8986   cat conftest.$ac_ext >&5
8987   rm -fr conftest*
8988   ol_cv_pthread_lpthread=no
8989 fi
8990 rm -fr conftest*
8991 fi
8992
8993
8994                 # restore the LIBS
8995                 LIBS="$ol_LIBS"
8996         
8997 fi
8998
8999 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9000
9001         if test $ol_cv_pthread_lpthread = yes ; then
9002                 ol_link_pthreads="-lpthread"
9003                 ol_link_threads=posix
9004         fi
9005 fi
9006
9007                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9008 if test "$ol_link_threads" = no ; then
9009         # try -lc_r
9010         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9011 echo "configure:9012: checking for pthread link with -lc_r" >&5
9012 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9013   echo $ac_n "(cached) $ac_c" 1>&6
9014 else
9015   
9016                 # save the flags
9017                 ol_LIBS="$LIBS"
9018                 LIBS="-lc_r $LIBS"
9019
9020                 if test "$cross_compiling" = yes; then
9021   cat > conftest.$ac_ext <<EOF
9022 #line 9023 "configure"
9023 #include "confdefs.h"
9024 /* pthread test headers */
9025 #include <pthread.h>
9026 #ifndef NULL
9027 #define NULL (void*)0
9028 #endif
9029
9030 static void *task(p)
9031         void *p;
9032 {
9033         return (void *) (p == NULL);
9034 }
9035
9036 int main() {
9037
9038         /* pthread test function */
9039         pthread_t t;
9040         int status;
9041 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9042         /* This system (e.g. AIX) defaults detached; must override */
9043         pthread_attr_t attr;
9044
9045         status = pthread_attr_init(&attr);
9046         if( status ) exit( status );
9047
9048         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9049         if( status ) exit( status );
9050
9051 #define ATTR    &attr
9052 #else
9053 #if HAVE_PTHREADS_D4
9054 #define ATTR    pthread_attr_default
9055 #else
9056 #define ATTR    NULL
9057 #endif
9058 #endif
9059         /* make sure pthread_create() isn't just a stub */
9060         status = pthread_create(&t, ATTR, task, NULL);
9061         if( status ) exit( status );
9062
9063         /* make sure pthread_detach() isn't just a stub */
9064 #if HAVE_PTHREADS_D4
9065         status = pthread_detach( &t );
9066 #else
9067         status = pthread_detach( t );
9068 #endif
9069
9070 #ifdef HAVE_LINUX_THREADS
9071         pthread_kill_other_threads_np();
9072 #endif
9073
9074         exit( status );
9075
9076 ; return 0; }
9077 EOF
9078 if { (eval echo configure:9079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9079   rm -rf conftest*
9080   ol_cv_pthread_lc_r=yes
9081 else
9082   echo "configure: failed program was:" >&5
9083   cat conftest.$ac_ext >&5
9084   rm -rf conftest*
9085   ol_cv_pthread_lc_r=no
9086 fi
9087 rm -f conftest*
9088 else
9089   cat > conftest.$ac_ext <<EOF
9090 #line 9091 "configure"
9091 #include "confdefs.h"
9092 /* pthread test headers */
9093 #include <pthread.h>
9094 #ifndef NULL
9095 #define NULL (void*)0
9096 #endif
9097
9098 static void *task(p)
9099         void *p;
9100 {
9101         return (void *) (p == NULL);
9102 }
9103
9104
9105 int main(argc, argv)
9106         int argc;
9107         char **argv;
9108 {
9109
9110         /* pthread test function */
9111         pthread_t t;
9112         int status;
9113 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9114         /* This system (e.g. AIX) defaults detached; must override */
9115         pthread_attr_t attr;
9116
9117         status = pthread_attr_init(&attr);
9118         if( status ) exit( status );
9119
9120         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9121         if( status ) exit( status );
9122
9123 #define ATTR    &attr
9124 #else
9125 #if HAVE_PTHREADS_D4
9126 #define ATTR    pthread_attr_default
9127 #else
9128 #define ATTR    NULL
9129 #endif
9130 #endif
9131         /* make sure pthread_create() isn't just a stub */
9132         status = pthread_create(&t, ATTR, task, NULL);
9133         if( status ) exit( status );
9134
9135         /* make sure pthread_detach() isn't just a stub */
9136 #if HAVE_PTHREADS_D4
9137         status = pthread_detach( &t );
9138 #else
9139         status = pthread_detach( t );
9140 #endif
9141
9142 #ifdef HAVE_LINUX_THREADS
9143         pthread_kill_other_threads_np();
9144 #endif
9145
9146         exit( status );
9147
9148 }
9149
9150 EOF
9151 if { (eval echo configure:9152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9152 then
9153   ol_cv_pthread_lc_r=yes
9154 else
9155   echo "configure: failed program was:" >&5
9156   cat conftest.$ac_ext >&5
9157   rm -fr conftest*
9158   ol_cv_pthread_lc_r=no
9159 fi
9160 rm -fr conftest*
9161 fi
9162
9163
9164                 # restore the LIBS
9165                 LIBS="$ol_LIBS"
9166         
9167 fi
9168
9169 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9170
9171         if test $ol_cv_pthread_lc_r = yes ; then
9172                 ol_link_pthreads="-lc_r"
9173                 ol_link_threads=posix
9174         fi
9175 fi
9176
9177
9178                 # Pthread try link: -threads (ol_cv_pthread_threads)
9179 if test "$ol_link_threads" = no ; then
9180         # try -threads
9181         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9182 echo "configure:9183: checking for pthread link with -threads" >&5
9183 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9184   echo $ac_n "(cached) $ac_c" 1>&6
9185 else
9186   
9187                 # save the flags
9188                 ol_LIBS="$LIBS"
9189                 LIBS="-threads $LIBS"
9190
9191                 if test "$cross_compiling" = yes; then
9192   cat > conftest.$ac_ext <<EOF
9193 #line 9194 "configure"
9194 #include "confdefs.h"
9195 /* pthread test headers */
9196 #include <pthread.h>
9197 #ifndef NULL
9198 #define NULL (void*)0
9199 #endif
9200
9201 static void *task(p)
9202         void *p;
9203 {
9204         return (void *) (p == NULL);
9205 }
9206
9207 int main() {
9208
9209         /* pthread test function */
9210         pthread_t t;
9211         int status;
9212 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9213         /* This system (e.g. AIX) defaults detached; must override */
9214         pthread_attr_t attr;
9215
9216         status = pthread_attr_init(&attr);
9217         if( status ) exit( status );
9218
9219         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9220         if( status ) exit( status );
9221
9222 #define ATTR    &attr
9223 #else
9224 #if HAVE_PTHREADS_D4
9225 #define ATTR    pthread_attr_default
9226 #else
9227 #define ATTR    NULL
9228 #endif
9229 #endif
9230         /* make sure pthread_create() isn't just a stub */
9231         status = pthread_create(&t, ATTR, task, NULL);
9232         if( status ) exit( status );
9233
9234         /* make sure pthread_detach() isn't just a stub */
9235 #if HAVE_PTHREADS_D4
9236         status = pthread_detach( &t );
9237 #else
9238         status = pthread_detach( t );
9239 #endif
9240
9241 #ifdef HAVE_LINUX_THREADS
9242         pthread_kill_other_threads_np();
9243 #endif
9244
9245         exit( status );
9246
9247 ; return 0; }
9248 EOF
9249 if { (eval echo configure:9250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9250   rm -rf conftest*
9251   ol_cv_pthread_threads=yes
9252 else
9253   echo "configure: failed program was:" >&5
9254   cat conftest.$ac_ext >&5
9255   rm -rf conftest*
9256   ol_cv_pthread_threads=no
9257 fi
9258 rm -f conftest*
9259 else
9260   cat > conftest.$ac_ext <<EOF
9261 #line 9262 "configure"
9262 #include "confdefs.h"
9263 /* pthread test headers */
9264 #include <pthread.h>
9265 #ifndef NULL
9266 #define NULL (void*)0
9267 #endif
9268
9269 static void *task(p)
9270         void *p;
9271 {
9272         return (void *) (p == NULL);
9273 }
9274
9275
9276 int main(argc, argv)
9277         int argc;
9278         char **argv;
9279 {
9280
9281         /* pthread test function */
9282         pthread_t t;
9283         int status;
9284 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9285         /* This system (e.g. AIX) defaults detached; must override */
9286         pthread_attr_t attr;
9287
9288         status = pthread_attr_init(&attr);
9289         if( status ) exit( status );
9290
9291         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9292         if( status ) exit( status );
9293
9294 #define ATTR    &attr
9295 #else
9296 #if HAVE_PTHREADS_D4
9297 #define ATTR    pthread_attr_default
9298 #else
9299 #define ATTR    NULL
9300 #endif
9301 #endif
9302         /* make sure pthread_create() isn't just a stub */
9303         status = pthread_create(&t, ATTR, task, NULL);
9304         if( status ) exit( status );
9305
9306         /* make sure pthread_detach() isn't just a stub */
9307 #if HAVE_PTHREADS_D4
9308         status = pthread_detach( &t );
9309 #else
9310         status = pthread_detach( t );
9311 #endif
9312
9313 #ifdef HAVE_LINUX_THREADS
9314         pthread_kill_other_threads_np();
9315 #endif
9316
9317         exit( status );
9318
9319 }
9320
9321 EOF
9322 if { (eval echo configure:9323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9323 then
9324   ol_cv_pthread_threads=yes
9325 else
9326   echo "configure: failed program was:" >&5
9327   cat conftest.$ac_ext >&5
9328   rm -fr conftest*
9329   ol_cv_pthread_threads=no
9330 fi
9331 rm -fr conftest*
9332 fi
9333
9334
9335                 # restore the LIBS
9336                 LIBS="$ol_LIBS"
9337         
9338 fi
9339
9340 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9341
9342         if test $ol_cv_pthread_threads = yes ; then
9343                 ol_link_pthreads="-threads"
9344                 ol_link_threads=posix
9345         fi
9346 fi
9347
9348
9349                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9350 if test "$ol_link_threads" = no ; then
9351         # try -lpthreads -lmach -lexc -lc_r
9352         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9353 echo "configure:9354: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9354 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9355   echo $ac_n "(cached) $ac_c" 1>&6
9356 else
9357   
9358                 # save the flags
9359                 ol_LIBS="$LIBS"
9360                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9361
9362                 if test "$cross_compiling" = yes; then
9363   cat > conftest.$ac_ext <<EOF
9364 #line 9365 "configure"
9365 #include "confdefs.h"
9366 /* pthread test headers */
9367 #include <pthread.h>
9368 #ifndef NULL
9369 #define NULL (void*)0
9370 #endif
9371
9372 static void *task(p)
9373         void *p;
9374 {
9375         return (void *) (p == NULL);
9376 }
9377
9378 int main() {
9379
9380         /* pthread test function */
9381         pthread_t t;
9382         int status;
9383 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9384         /* This system (e.g. AIX) defaults detached; must override */
9385         pthread_attr_t attr;
9386
9387         status = pthread_attr_init(&attr);
9388         if( status ) exit( status );
9389
9390         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9391         if( status ) exit( status );
9392
9393 #define ATTR    &attr
9394 #else
9395 #if HAVE_PTHREADS_D4
9396 #define ATTR    pthread_attr_default
9397 #else
9398 #define ATTR    NULL
9399 #endif
9400 #endif
9401         /* make sure pthread_create() isn't just a stub */
9402         status = pthread_create(&t, ATTR, task, NULL);
9403         if( status ) exit( status );
9404
9405         /* make sure pthread_detach() isn't just a stub */
9406 #if HAVE_PTHREADS_D4
9407         status = pthread_detach( &t );
9408 #else
9409         status = pthread_detach( t );
9410 #endif
9411
9412 #ifdef HAVE_LINUX_THREADS
9413         pthread_kill_other_threads_np();
9414 #endif
9415
9416         exit( status );
9417
9418 ; return 0; }
9419 EOF
9420 if { (eval echo configure:9421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9421   rm -rf conftest*
9422   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9423 else
9424   echo "configure: failed program was:" >&5
9425   cat conftest.$ac_ext >&5
9426   rm -rf conftest*
9427   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9428 fi
9429 rm -f conftest*
9430 else
9431   cat > conftest.$ac_ext <<EOF
9432 #line 9433 "configure"
9433 #include "confdefs.h"
9434 /* pthread test headers */
9435 #include <pthread.h>
9436 #ifndef NULL
9437 #define NULL (void*)0
9438 #endif
9439
9440 static void *task(p)
9441         void *p;
9442 {
9443         return (void *) (p == NULL);
9444 }
9445
9446
9447 int main(argc, argv)
9448         int argc;
9449         char **argv;
9450 {
9451
9452         /* pthread test function */
9453         pthread_t t;
9454         int status;
9455 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9456         /* This system (e.g. AIX) defaults detached; must override */
9457         pthread_attr_t attr;
9458
9459         status = pthread_attr_init(&attr);
9460         if( status ) exit( status );
9461
9462         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9463         if( status ) exit( status );
9464
9465 #define ATTR    &attr
9466 #else
9467 #if HAVE_PTHREADS_D4
9468 #define ATTR    pthread_attr_default
9469 #else
9470 #define ATTR    NULL
9471 #endif
9472 #endif
9473         /* make sure pthread_create() isn't just a stub */
9474         status = pthread_create(&t, ATTR, task, NULL);
9475         if( status ) exit( status );
9476
9477         /* make sure pthread_detach() isn't just a stub */
9478 #if HAVE_PTHREADS_D4
9479         status = pthread_detach( &t );
9480 #else
9481         status = pthread_detach( t );
9482 #endif
9483
9484 #ifdef HAVE_LINUX_THREADS
9485         pthread_kill_other_threads_np();
9486 #endif
9487
9488         exit( status );
9489
9490 }
9491
9492 EOF
9493 if { (eval echo configure:9494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9494 then
9495   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9496 else
9497   echo "configure: failed program was:" >&5
9498   cat conftest.$ac_ext >&5
9499   rm -fr conftest*
9500   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9501 fi
9502 rm -fr conftest*
9503 fi
9504
9505
9506                 # restore the LIBS
9507                 LIBS="$ol_LIBS"
9508         
9509 fi
9510
9511 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9512
9513         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9514                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9515                 ol_link_threads=posix
9516         fi
9517 fi
9518
9519                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9520 if test "$ol_link_threads" = no ; then
9521         # try -lpthreads -lmach -lexc
9522         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9523 echo "configure:9524: checking for pthread link with -lpthreads -lmach -lexc" >&5
9524 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9525   echo $ac_n "(cached) $ac_c" 1>&6
9526 else
9527   
9528                 # save the flags
9529                 ol_LIBS="$LIBS"
9530                 LIBS="-lpthreads -lmach -lexc $LIBS"
9531
9532                 if test "$cross_compiling" = yes; then
9533   cat > conftest.$ac_ext <<EOF
9534 #line 9535 "configure"
9535 #include "confdefs.h"
9536 /* pthread test headers */
9537 #include <pthread.h>
9538 #ifndef NULL
9539 #define NULL (void*)0
9540 #endif
9541
9542 static void *task(p)
9543         void *p;
9544 {
9545         return (void *) (p == NULL);
9546 }
9547
9548 int main() {
9549
9550         /* pthread test function */
9551         pthread_t t;
9552         int status;
9553 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9554         /* This system (e.g. AIX) defaults detached; must override */
9555         pthread_attr_t attr;
9556
9557         status = pthread_attr_init(&attr);
9558         if( status ) exit( status );
9559
9560         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9561         if( status ) exit( status );
9562
9563 #define ATTR    &attr
9564 #else
9565 #if HAVE_PTHREADS_D4
9566 #define ATTR    pthread_attr_default
9567 #else
9568 #define ATTR    NULL
9569 #endif
9570 #endif
9571         /* make sure pthread_create() isn't just a stub */
9572         status = pthread_create(&t, ATTR, task, NULL);
9573         if( status ) exit( status );
9574
9575         /* make sure pthread_detach() isn't just a stub */
9576 #if HAVE_PTHREADS_D4
9577         status = pthread_detach( &t );
9578 #else
9579         status = pthread_detach( t );
9580 #endif
9581
9582 #ifdef HAVE_LINUX_THREADS
9583         pthread_kill_other_threads_np();
9584 #endif
9585
9586         exit( status );
9587
9588 ; return 0; }
9589 EOF
9590 if { (eval echo configure:9591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9591   rm -rf conftest*
9592   ol_cv_pthread_lpthreads_lmach_lexc=yes
9593 else
9594   echo "configure: failed program was:" >&5
9595   cat conftest.$ac_ext >&5
9596   rm -rf conftest*
9597   ol_cv_pthread_lpthreads_lmach_lexc=no
9598 fi
9599 rm -f conftest*
9600 else
9601   cat > conftest.$ac_ext <<EOF
9602 #line 9603 "configure"
9603 #include "confdefs.h"
9604 /* pthread test headers */
9605 #include <pthread.h>
9606 #ifndef NULL
9607 #define NULL (void*)0
9608 #endif
9609
9610 static void *task(p)
9611         void *p;
9612 {
9613         return (void *) (p == NULL);
9614 }
9615
9616
9617 int main(argc, argv)
9618         int argc;
9619         char **argv;
9620 {
9621
9622         /* pthread test function */
9623         pthread_t t;
9624         int status;
9625 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9626         /* This system (e.g. AIX) defaults detached; must override */
9627         pthread_attr_t attr;
9628
9629         status = pthread_attr_init(&attr);
9630         if( status ) exit( status );
9631
9632         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9633         if( status ) exit( status );
9634
9635 #define ATTR    &attr
9636 #else
9637 #if HAVE_PTHREADS_D4
9638 #define ATTR    pthread_attr_default
9639 #else
9640 #define ATTR    NULL
9641 #endif
9642 #endif
9643         /* make sure pthread_create() isn't just a stub */
9644         status = pthread_create(&t, ATTR, task, NULL);
9645         if( status ) exit( status );
9646
9647         /* make sure pthread_detach() isn't just a stub */
9648 #if HAVE_PTHREADS_D4
9649         status = pthread_detach( &t );
9650 #else
9651         status = pthread_detach( t );
9652 #endif
9653
9654 #ifdef HAVE_LINUX_THREADS
9655         pthread_kill_other_threads_np();
9656 #endif
9657
9658         exit( status );
9659
9660 }
9661
9662 EOF
9663 if { (eval echo configure:9664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9664 then
9665   ol_cv_pthread_lpthreads_lmach_lexc=yes
9666 else
9667   echo "configure: failed program was:" >&5
9668   cat conftest.$ac_ext >&5
9669   rm -fr conftest*
9670   ol_cv_pthread_lpthreads_lmach_lexc=no
9671 fi
9672 rm -fr conftest*
9673 fi
9674
9675
9676                 # restore the LIBS
9677                 LIBS="$ol_LIBS"
9678         
9679 fi
9680
9681 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9682
9683         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9684                 ol_link_pthreads="-lpthreads -lmach -lexc"
9685                 ol_link_threads=posix
9686         fi
9687 fi
9688
9689                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9690 if test "$ol_link_threads" = no ; then
9691         # try -lpthreads -lexc
9692         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9693 echo "configure:9694: checking for pthread link with -lpthreads -lexc" >&5
9694 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9695   echo $ac_n "(cached) $ac_c" 1>&6
9696 else
9697   
9698                 # save the flags
9699                 ol_LIBS="$LIBS"
9700                 LIBS="-lpthreads -lexc $LIBS"
9701
9702                 if test "$cross_compiling" = yes; then
9703   cat > conftest.$ac_ext <<EOF
9704 #line 9705 "configure"
9705 #include "confdefs.h"
9706 /* pthread test headers */
9707 #include <pthread.h>
9708 #ifndef NULL
9709 #define NULL (void*)0
9710 #endif
9711
9712 static void *task(p)
9713         void *p;
9714 {
9715         return (void *) (p == NULL);
9716 }
9717
9718 int main() {
9719
9720         /* pthread test function */
9721         pthread_t t;
9722         int status;
9723 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9724         /* This system (e.g. AIX) defaults detached; must override */
9725         pthread_attr_t attr;
9726
9727         status = pthread_attr_init(&attr);
9728         if( status ) exit( status );
9729
9730         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9731         if( status ) exit( status );
9732
9733 #define ATTR    &attr
9734 #else
9735 #if HAVE_PTHREADS_D4
9736 #define ATTR    pthread_attr_default
9737 #else
9738 #define ATTR    NULL
9739 #endif
9740 #endif
9741         /* make sure pthread_create() isn't just a stub */
9742         status = pthread_create(&t, ATTR, task, NULL);
9743         if( status ) exit( status );
9744
9745         /* make sure pthread_detach() isn't just a stub */
9746 #if HAVE_PTHREADS_D4
9747         status = pthread_detach( &t );
9748 #else
9749         status = pthread_detach( t );
9750 #endif
9751
9752 #ifdef HAVE_LINUX_THREADS
9753         pthread_kill_other_threads_np();
9754 #endif
9755
9756         exit( status );
9757
9758 ; return 0; }
9759 EOF
9760 if { (eval echo configure:9761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9761   rm -rf conftest*
9762   ol_cv_pthread_lpthreads_lexc=yes
9763 else
9764   echo "configure: failed program was:" >&5
9765   cat conftest.$ac_ext >&5
9766   rm -rf conftest*
9767   ol_cv_pthread_lpthreads_lexc=no
9768 fi
9769 rm -f conftest*
9770 else
9771   cat > conftest.$ac_ext <<EOF
9772 #line 9773 "configure"
9773 #include "confdefs.h"
9774 /* pthread test headers */
9775 #include <pthread.h>
9776 #ifndef NULL
9777 #define NULL (void*)0
9778 #endif
9779
9780 static void *task(p)
9781         void *p;
9782 {
9783         return (void *) (p == NULL);
9784 }
9785
9786
9787 int main(argc, argv)
9788         int argc;
9789         char **argv;
9790 {
9791
9792         /* pthread test function */
9793         pthread_t t;
9794         int status;
9795 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9796         /* This system (e.g. AIX) defaults detached; must override */
9797         pthread_attr_t attr;
9798
9799         status = pthread_attr_init(&attr);
9800         if( status ) exit( status );
9801
9802         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9803         if( status ) exit( status );
9804
9805 #define ATTR    &attr
9806 #else
9807 #if HAVE_PTHREADS_D4
9808 #define ATTR    pthread_attr_default
9809 #else
9810 #define ATTR    NULL
9811 #endif
9812 #endif
9813         /* make sure pthread_create() isn't just a stub */
9814         status = pthread_create(&t, ATTR, task, NULL);
9815         if( status ) exit( status );
9816
9817         /* make sure pthread_detach() isn't just a stub */
9818 #if HAVE_PTHREADS_D4
9819         status = pthread_detach( &t );
9820 #else
9821         status = pthread_detach( t );
9822 #endif
9823
9824 #ifdef HAVE_LINUX_THREADS
9825         pthread_kill_other_threads_np();
9826 #endif
9827
9828         exit( status );
9829
9830 }
9831
9832 EOF
9833 if { (eval echo configure:9834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9834 then
9835   ol_cv_pthread_lpthreads_lexc=yes
9836 else
9837   echo "configure: failed program was:" >&5
9838   cat conftest.$ac_ext >&5
9839   rm -fr conftest*
9840   ol_cv_pthread_lpthreads_lexc=no
9841 fi
9842 rm -fr conftest*
9843 fi
9844
9845
9846                 # restore the LIBS
9847                 LIBS="$ol_LIBS"
9848         
9849 fi
9850
9851 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9852
9853         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9854                 ol_link_pthreads="-lpthreads -lexc"
9855                 ol_link_threads=posix
9856         fi
9857 fi
9858
9859
9860                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9861 if test "$ol_link_threads" = no ; then
9862         # try -lpthreads
9863         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9864 echo "configure:9865: checking for pthread link with -lpthreads" >&5
9865 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9866   echo $ac_n "(cached) $ac_c" 1>&6
9867 else
9868   
9869                 # save the flags
9870                 ol_LIBS="$LIBS"
9871                 LIBS="-lpthreads $LIBS"
9872
9873                 if test "$cross_compiling" = yes; then
9874   cat > conftest.$ac_ext <<EOF
9875 #line 9876 "configure"
9876 #include "confdefs.h"
9877 /* pthread test headers */
9878 #include <pthread.h>
9879 #ifndef NULL
9880 #define NULL (void*)0
9881 #endif
9882
9883 static void *task(p)
9884         void *p;
9885 {
9886         return (void *) (p == NULL);
9887 }
9888
9889 int main() {
9890
9891         /* pthread test function */
9892         pthread_t t;
9893         int status;
9894 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9895         /* This system (e.g. AIX) defaults detached; must override */
9896         pthread_attr_t attr;
9897
9898         status = pthread_attr_init(&attr);
9899         if( status ) exit( status );
9900
9901         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9902         if( status ) exit( status );
9903
9904 #define ATTR    &attr
9905 #else
9906 #if HAVE_PTHREADS_D4
9907 #define ATTR    pthread_attr_default
9908 #else
9909 #define ATTR    NULL
9910 #endif
9911 #endif
9912         /* make sure pthread_create() isn't just a stub */
9913         status = pthread_create(&t, ATTR, task, NULL);
9914         if( status ) exit( status );
9915
9916         /* make sure pthread_detach() isn't just a stub */
9917 #if HAVE_PTHREADS_D4
9918         status = pthread_detach( &t );
9919 #else
9920         status = pthread_detach( t );
9921 #endif
9922
9923 #ifdef HAVE_LINUX_THREADS
9924         pthread_kill_other_threads_np();
9925 #endif
9926
9927         exit( status );
9928
9929 ; return 0; }
9930 EOF
9931 if { (eval echo configure:9932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9932   rm -rf conftest*
9933   ol_cv_pthread_lib_lpthreads=yes
9934 else
9935   echo "configure: failed program was:" >&5
9936   cat conftest.$ac_ext >&5
9937   rm -rf conftest*
9938   ol_cv_pthread_lib_lpthreads=no
9939 fi
9940 rm -f conftest*
9941 else
9942   cat > conftest.$ac_ext <<EOF
9943 #line 9944 "configure"
9944 #include "confdefs.h"
9945 /* pthread test headers */
9946 #include <pthread.h>
9947 #ifndef NULL
9948 #define NULL (void*)0
9949 #endif
9950
9951 static void *task(p)
9952         void *p;
9953 {
9954         return (void *) (p == NULL);
9955 }
9956
9957
9958 int main(argc, argv)
9959         int argc;
9960         char **argv;
9961 {
9962
9963         /* pthread test function */
9964         pthread_t t;
9965         int status;
9966 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9967         /* This system (e.g. AIX) defaults detached; must override */
9968         pthread_attr_t attr;
9969
9970         status = pthread_attr_init(&attr);
9971         if( status ) exit( status );
9972
9973         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9974         if( status ) exit( status );
9975
9976 #define ATTR    &attr
9977 #else
9978 #if HAVE_PTHREADS_D4
9979 #define ATTR    pthread_attr_default
9980 #else
9981 #define ATTR    NULL
9982 #endif
9983 #endif
9984         /* make sure pthread_create() isn't just a stub */
9985         status = pthread_create(&t, ATTR, task, NULL);
9986         if( status ) exit( status );
9987
9988         /* make sure pthread_detach() isn't just a stub */
9989 #if HAVE_PTHREADS_D4
9990         status = pthread_detach( &t );
9991 #else
9992         status = pthread_detach( t );
9993 #endif
9994
9995 #ifdef HAVE_LINUX_THREADS
9996         pthread_kill_other_threads_np();
9997 #endif
9998
9999         exit( status );
10000
10001 }
10002
10003 EOF
10004 if { (eval echo configure:10005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10005 then
10006   ol_cv_pthread_lib_lpthreads=yes
10007 else
10008   echo "configure: failed program was:" >&5
10009   cat conftest.$ac_ext >&5
10010   rm -fr conftest*
10011   ol_cv_pthread_lib_lpthreads=no
10012 fi
10013 rm -fr conftest*
10014 fi
10015
10016
10017                 # restore the LIBS
10018                 LIBS="$ol_LIBS"
10019         
10020 fi
10021
10022 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10023
10024         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10025                 ol_link_pthreads="-lpthreads"
10026                 ol_link_threads=posix
10027         fi
10028 fi
10029
10030
10031                 if test $ol_link_threads != no ; then
10032                         cat >> confdefs.h <<\EOF
10033 #define HAVE_PTHREADS 1
10034 EOF
10035
10036
10037                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10038
10039                                                 save_CPPFLAGS="$CPPFLAGS"
10040                         save_LIBS="$LIBS"
10041                         LIBS="$LTHREAD_LIBS $LIBS"
10042
10043                                                                                                 for ac_func in sched_yield pthread_yield
10044 do
10045 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10046 echo "configure:10047: checking for $ac_func" >&5
10047 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10048   echo $ac_n "(cached) $ac_c" 1>&6
10049 else
10050   cat > conftest.$ac_ext <<EOF
10051 #line 10052 "configure"
10052 #include "confdefs.h"
10053 /* System header to define __stub macros and hopefully few prototypes,
10054     which can conflict with char $ac_func(); below.  */
10055 #include <assert.h>
10056 /* Override any gcc2 internal prototype to avoid an error.  */
10057 /* We use char because int might match the return type of a gcc2
10058     builtin and then its argument prototype would still apply.  */
10059 char $ac_func();
10060 char (*f)();
10061
10062 int main() {
10063
10064 /* The GNU C library defines this for functions which it implements
10065     to always fail with ENOSYS.  Some functions are actually named
10066     something starting with __ and the normal name is an alias.  */
10067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10068 choke me
10069 #else
10070 f = $ac_func;
10071 #endif
10072
10073 ; return 0; }
10074 EOF
10075 if { (eval echo configure:10076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10076   rm -rf conftest*
10077   eval "ac_cv_func_$ac_func=yes"
10078 else
10079   echo "configure: failed program was:" >&5
10080   cat conftest.$ac_ext >&5
10081   rm -rf conftest*
10082   eval "ac_cv_func_$ac_func=no"
10083 fi
10084 rm -f conftest*
10085 fi
10086
10087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10088   echo "$ac_t""yes" 1>&6
10089     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10090   cat >> confdefs.h <<EOF
10091 #define $ac_tr_func 1
10092 EOF
10093  
10094 else
10095   echo "$ac_t""no" 1>&6
10096 fi
10097 done
10098
10099
10100                         if test $ac_cv_func_sched_yield = no -a \
10101                                 $ac_cv_func_pthread_yield = no ; then
10102                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10103 echo "configure:10104: checking for sched_yield in -lrt" >&5
10104 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10105 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10106   echo $ac_n "(cached) $ac_c" 1>&6
10107 else
10108   ac_save_LIBS="$LIBS"
10109 LIBS="-lrt  $LIBS"
10110 cat > conftest.$ac_ext <<EOF
10111 #line 10112 "configure"
10112 #include "confdefs.h"
10113 /* Override any gcc2 internal prototype to avoid an error.  */
10114 /* We use char because int might match the return type of a gcc2
10115     builtin and then its argument prototype would still apply.  */
10116 char sched_yield();
10117
10118 int main() {
10119 sched_yield()
10120 ; return 0; }
10121 EOF
10122 if { (eval echo configure:10123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10123   rm -rf conftest*
10124   eval "ac_cv_lib_$ac_lib_var=yes"
10125 else
10126   echo "configure: failed program was:" >&5
10127   cat conftest.$ac_ext >&5
10128   rm -rf conftest*
10129   eval "ac_cv_lib_$ac_lib_var=no"
10130 fi
10131 rm -f conftest*
10132 LIBS="$ac_save_LIBS"
10133
10134 fi
10135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10136   echo "$ac_t""yes" 1>&6
10137   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10138                                         cat >> confdefs.h <<\EOF
10139 #define HAVE_SCHED_YIELD 1
10140 EOF
10141
10142                                         ac_cv_func_sched_yield=yes
10143 else
10144   echo "$ac_t""no" 1>&6
10145 ac_cv_func_sched_yield=no
10146 fi
10147
10148                         fi
10149                         if test $ac_cv_func_sched_yield = no -a \
10150                                 $ac_cv_func_pthread_yield = no ; then
10151                                                                                                 for ac_func in thr_yield
10152 do
10153 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10154 echo "configure:10155: checking for $ac_func" >&5
10155 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10156   echo $ac_n "(cached) $ac_c" 1>&6
10157 else
10158   cat > conftest.$ac_ext <<EOF
10159 #line 10160 "configure"
10160 #include "confdefs.h"
10161 /* System header to define __stub macros and hopefully few prototypes,
10162     which can conflict with char $ac_func(); below.  */
10163 #include <assert.h>
10164 /* Override any gcc2 internal prototype to avoid an error.  */
10165 /* We use char because int might match the return type of a gcc2
10166     builtin and then its argument prototype would still apply.  */
10167 char $ac_func();
10168 char (*f)();
10169
10170 int main() {
10171
10172 /* The GNU C library defines this for functions which it implements
10173     to always fail with ENOSYS.  Some functions are actually named
10174     something starting with __ and the normal name is an alias.  */
10175 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10176 choke me
10177 #else
10178 f = $ac_func;
10179 #endif
10180
10181 ; return 0; }
10182 EOF
10183 if { (eval echo configure:10184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10184   rm -rf conftest*
10185   eval "ac_cv_func_$ac_func=yes"
10186 else
10187   echo "configure: failed program was:" >&5
10188   cat conftest.$ac_ext >&5
10189   rm -rf conftest*
10190   eval "ac_cv_func_$ac_func=no"
10191 fi
10192 rm -f conftest*
10193 fi
10194
10195 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10196   echo "$ac_t""yes" 1>&6
10197     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10198   cat >> confdefs.h <<EOF
10199 #define $ac_tr_func 1
10200 EOF
10201  
10202 else
10203   echo "$ac_t""no" 1>&6
10204 fi
10205 done
10206
10207                         fi
10208                         if test $ac_cv_func_sched_yield = no -a \
10209                                 $ac_cv_func_pthread_yield = no -a \
10210                                 "$ac_cv_func_thr_yield" = no ; then
10211                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10212                         fi
10213
10214                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10215 do
10216 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10217 echo "configure:10218: checking for $ac_func" >&5
10218 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10219   echo $ac_n "(cached) $ac_c" 1>&6
10220 else
10221   cat > conftest.$ac_ext <<EOF
10222 #line 10223 "configure"
10223 #include "confdefs.h"
10224 /* System header to define __stub macros and hopefully few prototypes,
10225     which can conflict with char $ac_func(); below.  */
10226 #include <assert.h>
10227 /* Override any gcc2 internal prototype to avoid an error.  */
10228 /* We use char because int might match the return type of a gcc2
10229     builtin and then its argument prototype would still apply.  */
10230 char $ac_func();
10231 char (*f)();
10232
10233 int main() {
10234
10235 /* The GNU C library defines this for functions which it implements
10236     to always fail with ENOSYS.  Some functions are actually named
10237     something starting with __ and the normal name is an alias.  */
10238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10239 choke me
10240 #else
10241 f = $ac_func;
10242 #endif
10243
10244 ; return 0; }
10245 EOF
10246 if { (eval echo configure:10247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10247   rm -rf conftest*
10248   eval "ac_cv_func_$ac_func=yes"
10249 else
10250   echo "configure: failed program was:" >&5
10251   cat conftest.$ac_ext >&5
10252   rm -rf conftest*
10253   eval "ac_cv_func_$ac_func=no"
10254 fi
10255 rm -f conftest*
10256 fi
10257
10258 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10259   echo "$ac_t""yes" 1>&6
10260     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10261   cat >> confdefs.h <<EOF
10262 #define $ac_tr_func 1
10263 EOF
10264  
10265 else
10266   echo "$ac_t""no" 1>&6
10267 fi
10268 done
10269
10270
10271                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10272 echo "configure:10273: checking for pthread_detach with <pthread.h>" >&5
10273 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10274   echo $ac_n "(cached) $ac_c" 1>&6
10275 else
10276   
10277                                                                 cat > conftest.$ac_ext <<EOF
10278 #line 10279 "configure"
10279 #include "confdefs.h"
10280
10281 #include <pthread.h>
10282 #ifndef NULL
10283 #define NULL (void*)0
10284 #endif
10285
10286 int main() {
10287 pthread_detach(NULL);
10288 ; return 0; }
10289 EOF
10290 if { (eval echo configure:10291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10291   rm -rf conftest*
10292   ol_cv_func_pthread_detach=yes
10293 else
10294   echo "configure: failed program was:" >&5
10295   cat conftest.$ac_ext >&5
10296   rm -rf conftest*
10297   ol_cv_func_pthread_detach=no
10298 fi
10299 rm -f conftest*
10300                         
10301 fi
10302
10303 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10304
10305                         if test $ol_cv_func_pthread_detach = no ; then
10306                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10307                         fi
10308
10309                         cat >> confdefs.h <<\EOF
10310 #define HAVE_PTHREAD_DETACH 1
10311 EOF
10312
10313
10314                                                 for ac_func in \
10315                                 pthread_setconcurrency \
10316                                 pthread_getconcurrency \
10317                                 thr_setconcurrency \
10318                                 thr_getconcurrency \
10319                         
10320 do
10321 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10322 echo "configure:10323: checking for $ac_func" >&5
10323 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10324   echo $ac_n "(cached) $ac_c" 1>&6
10325 else
10326   cat > conftest.$ac_ext <<EOF
10327 #line 10328 "configure"
10328 #include "confdefs.h"
10329 /* System header to define __stub macros and hopefully few prototypes,
10330     which can conflict with char $ac_func(); below.  */
10331 #include <assert.h>
10332 /* Override any gcc2 internal prototype to avoid an error.  */
10333 /* We use char because int might match the return type of a gcc2
10334     builtin and then its argument prototype would still apply.  */
10335 char $ac_func();
10336 char (*f)();
10337
10338 int main() {
10339
10340 /* The GNU C library defines this for functions which it implements
10341     to always fail with ENOSYS.  Some functions are actually named
10342     something starting with __ and the normal name is an alias.  */
10343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10344 choke me
10345 #else
10346 f = $ac_func;
10347 #endif
10348
10349 ; return 0; }
10350 EOF
10351 if { (eval echo configure:10352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10352   rm -rf conftest*
10353   eval "ac_cv_func_$ac_func=yes"
10354 else
10355   echo "configure: failed program was:" >&5
10356   cat conftest.$ac_ext >&5
10357   rm -rf conftest*
10358   eval "ac_cv_func_$ac_func=no"
10359 fi
10360 rm -f conftest*
10361 fi
10362
10363 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10364   echo "$ac_t""yes" 1>&6
10365     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10366   cat >> confdefs.h <<EOF
10367 #define $ac_tr_func 1
10368 EOF
10369  
10370 else
10371   echo "$ac_t""no" 1>&6
10372 fi
10373 done
10374
10375
10376                         
10377         for ac_func in pthread_kill_other_threads_np
10378 do
10379 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10380 echo "configure:10381: checking for $ac_func" >&5
10381 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10382   echo $ac_n "(cached) $ac_c" 1>&6
10383 else
10384   cat > conftest.$ac_ext <<EOF
10385 #line 10386 "configure"
10386 #include "confdefs.h"
10387 /* System header to define __stub macros and hopefully few prototypes,
10388     which can conflict with char $ac_func(); below.  */
10389 #include <assert.h>
10390 /* Override any gcc2 internal prototype to avoid an error.  */
10391 /* We use char because int might match the return type of a gcc2
10392     builtin and then its argument prototype would still apply.  */
10393 char $ac_func();
10394 char (*f)();
10395
10396 int main() {
10397
10398 /* The GNU C library defines this for functions which it implements
10399     to always fail with ENOSYS.  Some functions are actually named
10400     something starting with __ and the normal name is an alias.  */
10401 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10402 choke me
10403 #else
10404 f = $ac_func;
10405 #endif
10406
10407 ; return 0; }
10408 EOF
10409 if { (eval echo configure:10410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10410   rm -rf conftest*
10411   eval "ac_cv_func_$ac_func=yes"
10412 else
10413   echo "configure: failed program was:" >&5
10414   cat conftest.$ac_ext >&5
10415   rm -rf conftest*
10416   eval "ac_cv_func_$ac_func=no"
10417 fi
10418 rm -f conftest*
10419 fi
10420
10421 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10422   echo "$ac_t""yes" 1>&6
10423     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10424   cat >> confdefs.h <<EOF
10425 #define $ac_tr_func 1
10426 EOF
10427  
10428 else
10429   echo "$ac_t""no" 1>&6
10430 fi
10431 done
10432
10433         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10434 echo "configure:10435: checking for LinuxThreads implementation" >&5
10435 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10436   echo $ac_n "(cached) $ac_c" 1>&6
10437 else
10438   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10439 fi
10440
10441 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10442
10443                         
10444         
10445         
10446         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10447 echo "configure:10448: checking for LinuxThreads consistency" >&5
10448 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10449   echo $ac_n "(cached) $ac_c" 1>&6
10450 else
10451   
10452                 if test $ol_cv_header_linux_threads = yes -a \
10453                         $ol_cv_sys_linux_threads = yes; then
10454                         ol_cv_linux_threads=yes
10455                 elif test $ol_cv_header_linux_threads = no -a \
10456                         $ol_cv_sys_linux_threads = no; then
10457                         ol_cv_linux_threads=no
10458                 else
10459                         ol_cv_linux_threads=error
10460                 fi
10461         
10462 fi
10463
10464 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10465
10466
10467                         if test $ol_cv_linux_threads = error; then
10468                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10469                         fi
10470
10471                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10472 echo "configure:10473: checking if pthread_create() works" >&5
10473 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10474   echo $ac_n "(cached) $ac_c" 1>&6
10475 else
10476   
10477                         if test "$cross_compiling" = yes; then
10478                                 ol_cv_pthread_create_works=yes
10479 else
10480   cat > conftest.$ac_ext <<EOF
10481 #line 10482 "configure"
10482 #include "confdefs.h"
10483 /* pthread test headers */
10484 #include <pthread.h>
10485 #ifndef NULL
10486 #define NULL (void*)0
10487 #endif
10488
10489 static void *task(p)
10490         void *p;
10491 {
10492         return (void *) (p == NULL);
10493 }
10494
10495
10496 int main(argc, argv)
10497         int argc;
10498         char **argv;
10499 {
10500
10501         /* pthread test function */
10502         pthread_t t;
10503         int status;
10504 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10505         /* This system (e.g. AIX) defaults detached; must override */
10506         pthread_attr_t attr;
10507
10508         status = pthread_attr_init(&attr);
10509         if( status ) exit( status );
10510
10511         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10512         if( status ) exit( status );
10513
10514 #define ATTR    &attr
10515 #else
10516 #if HAVE_PTHREADS_D4
10517 #define ATTR    pthread_attr_default
10518 #else
10519 #define ATTR    NULL
10520 #endif
10521 #endif
10522         /* make sure pthread_create() isn't just a stub */
10523         status = pthread_create(&t, ATTR, task, NULL);
10524         if( status ) exit( status );
10525
10526         /* make sure pthread_detach() isn't just a stub */
10527 #if HAVE_PTHREADS_D4
10528         status = pthread_detach( &t );
10529 #else
10530         status = pthread_detach( t );
10531 #endif
10532
10533 #ifdef HAVE_LINUX_THREADS
10534         pthread_kill_other_threads_np();
10535 #endif
10536
10537         exit( status );
10538
10539 }
10540
10541 EOF
10542 if { (eval echo configure:10543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10543 then
10544   ol_cv_pthread_create_works=yes
10545 else
10546   echo "configure: failed program was:" >&5
10547   cat conftest.$ac_ext >&5
10548   rm -fr conftest*
10549   ol_cv_pthread_create_works=no
10550 fi
10551 rm -fr conftest*
10552 fi
10553
10554 fi
10555
10556 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10557
10558                         if test $ol_cv_pthread_create_works = no ; then
10559                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10560                         fi
10561
10562                                                 if test $ol_with_yielding_select = auto ; then
10563                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10564 echo "configure:10565: checking if select yields when using pthreads" >&5
10565 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10566   echo $ac_n "(cached) $ac_c" 1>&6
10567 else
10568   
10569                                 if test "$cross_compiling" = yes; then
10570   ol_cv_pthread_select_yields=cross
10571 else
10572   cat > conftest.$ac_ext <<EOF
10573 #line 10574 "configure"
10574 #include "confdefs.h"
10575
10576 #include <sys/types.h>
10577 #include <sys/time.h>
10578 #include <unistd.h>
10579 #include <pthread.h>
10580 #ifndef NULL
10581 #define NULL (void*) 0
10582 #endif
10583
10584 static int fildes[2];
10585
10586 static void *task(p)
10587         void *p;
10588 {
10589         int i;
10590         struct timeval tv;
10591
10592         fd_set rfds;
10593
10594         tv.tv_sec=10;
10595         tv.tv_usec=0;
10596
10597         FD_ZERO(&rfds);
10598         FD_SET(fildes[0], &rfds);
10599
10600         /* we're not interested in any fds */
10601         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10602
10603         if(i < 0) {
10604                 perror("select");
10605                 exit(10);
10606         }
10607
10608         exit(0); /* if we exit here, the select blocked the whole process */
10609 }
10610
10611 int main(argc, argv)
10612         int argc;
10613         char **argv;
10614 {
10615         pthread_t t;
10616
10617         /* create a pipe to select */
10618         if(pipe(&fildes[0])) {
10619                 perror("select");
10620                 exit(1);
10621         }
10622
10623 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10624         (void) pthread_setconcurrency(2);
10625 #else
10626 #ifdef HAVE_THR_SETCONCURRENCY
10627         /* Set Solaris LWP concurrency to 2 */
10628         thr_setconcurrency(2);
10629 #endif
10630 #endif
10631
10632 #if HAVE_PTHREADS_D4
10633         pthread_create(&t, pthread_attr_default, task, NULL);
10634 #else
10635         pthread_create(&t, NULL, task, NULL);
10636 #endif
10637
10638 #if HAVE_SCHED_YIELD
10639         sched_yield();  /* make sure task runs first */
10640 #else
10641 #ifdef HAVE_PTHREAD_YIELD
10642         pthread_yield();        /* make sure task runs first */
10643 #endif
10644 #endif
10645
10646         exit(2);
10647 }
10648 EOF
10649 if { (eval echo configure:10650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10650 then
10651   ol_cv_pthread_select_yields=no
10652 else
10653   echo "configure: failed program was:" >&5
10654   cat conftest.$ac_ext >&5
10655   rm -fr conftest*
10656   ol_cv_pthread_select_yields=yes
10657 fi
10658 rm -fr conftest*
10659 fi
10660
10661 fi
10662
10663 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10664
10665                                 if test $ol_cv_pthread_select_yields = cross ; then
10666                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10667                                 fi
10668
10669                                 if test $ol_cv_pthread_select_yields = yes ; then
10670                                         ol_with_yielding_select=yes
10671                                 fi
10672                         fi
10673
10674                                                 CPPFLAGS="$save_CPPFLAGS"
10675                         LIBS="$save_LIBS"
10676                 else
10677                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10678                 fi
10679         fi
10680
10681         if test $ol_with_threads = posix ; then
10682                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10683         fi
10684 fi
10685
10686 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10687         -o $ol_with_threads = mach ; then
10688
10689                 for ac_hdr in mach/cthreads.h
10690 do
10691 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10692 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10693 echo "configure:10694: checking for $ac_hdr" >&5
10694 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10695   echo $ac_n "(cached) $ac_c" 1>&6
10696 else
10697   cat > conftest.$ac_ext <<EOF
10698 #line 10699 "configure"
10699 #include "confdefs.h"
10700 #include <$ac_hdr>
10701 EOF
10702 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10703 { (eval echo configure:10704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10704 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10705 if test -z "$ac_err"; then
10706   rm -rf conftest*
10707   eval "ac_cv_header_$ac_safe=yes"
10708 else
10709   echo "$ac_err" >&5
10710   echo "configure: failed program was:" >&5
10711   cat conftest.$ac_ext >&5
10712   rm -rf conftest*
10713   eval "ac_cv_header_$ac_safe=no"
10714 fi
10715 rm -f conftest*
10716 fi
10717 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10718   echo "$ac_t""yes" 1>&6
10719     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10720   cat >> confdefs.h <<EOF
10721 #define $ac_tr_hdr 1
10722 EOF
10723  
10724 else
10725   echo "$ac_t""no" 1>&6
10726 fi
10727 done
10728
10729         if test $ac_cv_header_mach_cthreads_h = yes ; then
10730                 ol_with_threads=found
10731
10732                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10733 echo "configure:10734: checking for cthread_fork" >&5
10734 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10735   echo $ac_n "(cached) $ac_c" 1>&6
10736 else
10737   cat > conftest.$ac_ext <<EOF
10738 #line 10739 "configure"
10739 #include "confdefs.h"
10740 /* System header to define __stub macros and hopefully few prototypes,
10741     which can conflict with char cthread_fork(); below.  */
10742 #include <assert.h>
10743 /* Override any gcc2 internal prototype to avoid an error.  */
10744 /* We use char because int might match the return type of a gcc2
10745     builtin and then its argument prototype would still apply.  */
10746 char cthread_fork();
10747 char (*f)();
10748
10749 int main() {
10750
10751 /* The GNU C library defines this for functions which it implements
10752     to always fail with ENOSYS.  Some functions are actually named
10753     something starting with __ and the normal name is an alias.  */
10754 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10755 choke me
10756 #else
10757 f = cthread_fork;
10758 #endif
10759
10760 ; return 0; }
10761 EOF
10762 if { (eval echo configure:10763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10763   rm -rf conftest*
10764   eval "ac_cv_func_cthread_fork=yes"
10765 else
10766   echo "configure: failed program was:" >&5
10767   cat conftest.$ac_ext >&5
10768   rm -rf conftest*
10769   eval "ac_cv_func_cthread_fork=no"
10770 fi
10771 rm -f conftest*
10772 fi
10773
10774 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10775   echo "$ac_t""yes" 1>&6
10776   ol_link_threads=yes
10777 else
10778   echo "$ac_t""no" 1>&6
10779 fi
10780
10781
10782                 if test $ol_link_threads = no ; then
10783                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10784 echo "configure:10785: checking for cthread_fork with -all_load" >&5
10785 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10786   echo $ac_n "(cached) $ac_c" 1>&6
10787 else
10788   
10789                                                                 save_LIBS="$LIBS"
10790                                 LIBS="-all_load $LIBS"
10791                                 cat > conftest.$ac_ext <<EOF
10792 #line 10793 "configure"
10793 #include "confdefs.h"
10794 #include <mach/cthreads.h>
10795 int main() {
10796
10797                                         cthread_fork((void *)0, (void *)0);
10798                                         
10799 ; return 0; }
10800 EOF
10801 if { (eval echo configure:10802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10802   rm -rf conftest*
10803   ol_cv_cthread_all_load=yes
10804 else
10805   echo "configure: failed program was:" >&5
10806   cat conftest.$ac_ext >&5
10807   rm -rf conftest*
10808   ol_cv_cthread_all_load=no
10809 fi
10810 rm -f conftest*
10811                                                                 LIBS="$save_LIBS"
10812                         
10813 fi
10814
10815 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10816
10817                         if test $ol_cv_cthread_all_load = yes ; then
10818                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10819                                 ol_link_threads=mach
10820                         fi
10821                 fi
10822
10823                 if test $ol_link_threads != no ; then
10824                         : check for cthread specific functionality here
10825                         cat >> confdefs.h <<\EOF
10826 #define HAVE_MACH_CTHREADS 1
10827 EOF
10828
10829                 else
10830                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10831                 fi
10832         fi
10833
10834         if test $ol_with_threads = mach ; then
10835                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10836         fi
10837 fi
10838
10839 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10840         -o $ol_with_threads = pth ; then
10841
10842         for ac_hdr in pth.h
10843 do
10844 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10845 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10846 echo "configure:10847: checking for $ac_hdr" >&5
10847 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10848   echo $ac_n "(cached) $ac_c" 1>&6
10849 else
10850   cat > conftest.$ac_ext <<EOF
10851 #line 10852 "configure"
10852 #include "confdefs.h"
10853 #include <$ac_hdr>
10854 EOF
10855 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10856 { (eval echo configure:10857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10857 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10858 if test -z "$ac_err"; then
10859   rm -rf conftest*
10860   eval "ac_cv_header_$ac_safe=yes"
10861 else
10862   echo "$ac_err" >&5
10863   echo "configure: failed program was:" >&5
10864   cat conftest.$ac_ext >&5
10865   rm -rf conftest*
10866   eval "ac_cv_header_$ac_safe=no"
10867 fi
10868 rm -f conftest*
10869 fi
10870 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10871   echo "$ac_t""yes" 1>&6
10872     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10873   cat >> confdefs.h <<EOF
10874 #define $ac_tr_hdr 1
10875 EOF
10876  
10877 else
10878   echo "$ac_t""no" 1>&6
10879 fi
10880 done
10881
10882
10883         if test $ac_cv_header_pth_h = yes ; then
10884                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10885 echo "configure:10886: checking for pth_version in -lpth" >&5
10886 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10888   echo $ac_n "(cached) $ac_c" 1>&6
10889 else
10890   ac_save_LIBS="$LIBS"
10891 LIBS="-lpth  $LIBS"
10892 cat > conftest.$ac_ext <<EOF
10893 #line 10894 "configure"
10894 #include "confdefs.h"
10895 /* Override any gcc2 internal prototype to avoid an error.  */
10896 /* We use char because int might match the return type of a gcc2
10897     builtin and then its argument prototype would still apply.  */
10898 char pth_version();
10899
10900 int main() {
10901 pth_version()
10902 ; return 0; }
10903 EOF
10904 if { (eval echo configure:10905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10905   rm -rf conftest*
10906   eval "ac_cv_lib_$ac_lib_var=yes"
10907 else
10908   echo "configure: failed program was:" >&5
10909   cat conftest.$ac_ext >&5
10910   rm -rf conftest*
10911   eval "ac_cv_lib_$ac_lib_var=no"
10912 fi
10913 rm -f conftest*
10914 LIBS="$ac_save_LIBS"
10915
10916 fi
10917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10918   echo "$ac_t""yes" 1>&6
10919   have_pth=yes
10920 else
10921   echo "$ac_t""no" 1>&6
10922 have_pth=no
10923 fi
10924
10925
10926                 if test $have_pth = yes ; then
10927                         cat >> confdefs.h <<\EOF
10928 #define HAVE_GNU_PTH 1
10929 EOF
10930
10931                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10932                         ol_link_threads=pth
10933
10934                         if test $ol_with_yielding_select = auto ; then
10935                                 ol_with_yielding_select=yes
10936                         fi
10937                 fi
10938         fi
10939 fi
10940
10941 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10942         -o $ol_with_threads = lwp ; then
10943
10944                 for ac_hdr in thread.h synch.h
10945 do
10946 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10947 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10948 echo "configure:10949: checking for $ac_hdr" >&5
10949 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10950   echo $ac_n "(cached) $ac_c" 1>&6
10951 else
10952   cat > conftest.$ac_ext <<EOF
10953 #line 10954 "configure"
10954 #include "confdefs.h"
10955 #include <$ac_hdr>
10956 EOF
10957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10958 { (eval echo configure:10959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10960 if test -z "$ac_err"; then
10961   rm -rf conftest*
10962   eval "ac_cv_header_$ac_safe=yes"
10963 else
10964   echo "$ac_err" >&5
10965   echo "configure: failed program was:" >&5
10966   cat conftest.$ac_ext >&5
10967   rm -rf conftest*
10968   eval "ac_cv_header_$ac_safe=no"
10969 fi
10970 rm -f conftest*
10971 fi
10972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10973   echo "$ac_t""yes" 1>&6
10974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10975   cat >> confdefs.h <<EOF
10976 #define $ac_tr_hdr 1
10977 EOF
10978  
10979 else
10980   echo "$ac_t""no" 1>&6
10981 fi
10982 done
10983
10984         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10985                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10986 echo "configure:10987: checking for thr_create in -lthread" >&5
10987 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10988 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10989   echo $ac_n "(cached) $ac_c" 1>&6
10990 else
10991   ac_save_LIBS="$LIBS"
10992 LIBS="-lthread  $LIBS"
10993 cat > conftest.$ac_ext <<EOF
10994 #line 10995 "configure"
10995 #include "confdefs.h"
10996 /* Override any gcc2 internal prototype to avoid an error.  */
10997 /* We use char because int might match the return type of a gcc2
10998     builtin and then its argument prototype would still apply.  */
10999 char thr_create();
11000
11001 int main() {
11002 thr_create()
11003 ; return 0; }
11004 EOF
11005 if { (eval echo configure:11006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11006   rm -rf conftest*
11007   eval "ac_cv_lib_$ac_lib_var=yes"
11008 else
11009   echo "configure: failed program was:" >&5
11010   cat conftest.$ac_ext >&5
11011   rm -rf conftest*
11012   eval "ac_cv_lib_$ac_lib_var=no"
11013 fi
11014 rm -f conftest*
11015 LIBS="$ac_save_LIBS"
11016
11017 fi
11018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11019   echo "$ac_t""yes" 1>&6
11020   have_thr=yes
11021 else
11022   echo "$ac_t""no" 1>&6
11023 have_thr=no
11024 fi
11025
11026
11027                 if test $have_thr = yes ; then
11028                         cat >> confdefs.h <<\EOF
11029 #define HAVE_THR 1
11030 EOF
11031
11032                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11033                         ol_link_threads=thr
11034
11035                         if test $ol_with_yielding_select = auto ; then
11036                                 ol_with_yielding_select=yes
11037                         fi
11038
11039                                                 for ac_func in \
11040                                 thr_setconcurrency \
11041                                 thr_getconcurrency \
11042                         
11043 do
11044 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11045 echo "configure:11046: checking for $ac_func" >&5
11046 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11047   echo $ac_n "(cached) $ac_c" 1>&6
11048 else
11049   cat > conftest.$ac_ext <<EOF
11050 #line 11051 "configure"
11051 #include "confdefs.h"
11052 /* System header to define __stub macros and hopefully few prototypes,
11053     which can conflict with char $ac_func(); below.  */
11054 #include <assert.h>
11055 /* Override any gcc2 internal prototype to avoid an error.  */
11056 /* We use char because int might match the return type of a gcc2
11057     builtin and then its argument prototype would still apply.  */
11058 char $ac_func();
11059 char (*f)();
11060
11061 int main() {
11062
11063 /* The GNU C library defines this for functions which it implements
11064     to always fail with ENOSYS.  Some functions are actually named
11065     something starting with __ and the normal name is an alias.  */
11066 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11067 choke me
11068 #else
11069 f = $ac_func;
11070 #endif
11071
11072 ; return 0; }
11073 EOF
11074 if { (eval echo configure:11075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11075   rm -rf conftest*
11076   eval "ac_cv_func_$ac_func=yes"
11077 else
11078   echo "configure: failed program was:" >&5
11079   cat conftest.$ac_ext >&5
11080   rm -rf conftest*
11081   eval "ac_cv_func_$ac_func=no"
11082 fi
11083 rm -f conftest*
11084 fi
11085
11086 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11087   echo "$ac_t""yes" 1>&6
11088     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11089   cat >> confdefs.h <<EOF
11090 #define $ac_tr_func 1
11091 EOF
11092  
11093 else
11094   echo "$ac_t""no" 1>&6
11095 fi
11096 done
11097
11098                 fi
11099         fi
11100
11101                 for ac_hdr in lwp/lwp.h
11102 do
11103 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11104 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11105 echo "configure:11106: checking for $ac_hdr" >&5
11106 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11107   echo $ac_n "(cached) $ac_c" 1>&6
11108 else
11109   cat > conftest.$ac_ext <<EOF
11110 #line 11111 "configure"
11111 #include "confdefs.h"
11112 #include <$ac_hdr>
11113 EOF
11114 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11115 { (eval echo configure:11116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11116 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11117 if test -z "$ac_err"; then
11118   rm -rf conftest*
11119   eval "ac_cv_header_$ac_safe=yes"
11120 else
11121   echo "$ac_err" >&5
11122   echo "configure: failed program was:" >&5
11123   cat conftest.$ac_ext >&5
11124   rm -rf conftest*
11125   eval "ac_cv_header_$ac_safe=no"
11126 fi
11127 rm -f conftest*
11128 fi
11129 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11130   echo "$ac_t""yes" 1>&6
11131     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11132   cat >> confdefs.h <<EOF
11133 #define $ac_tr_hdr 1
11134 EOF
11135  
11136 else
11137   echo "$ac_t""no" 1>&6
11138 fi
11139 done
11140
11141         if test $ac_cv_header_lwp_lwp_h = yes ; then
11142                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11143 echo "configure:11144: checking for lwp_create in -llwp" >&5
11144 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11145 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11146   echo $ac_n "(cached) $ac_c" 1>&6
11147 else
11148   ac_save_LIBS="$LIBS"
11149 LIBS="-llwp  $LIBS"
11150 cat > conftest.$ac_ext <<EOF
11151 #line 11152 "configure"
11152 #include "confdefs.h"
11153 /* Override any gcc2 internal prototype to avoid an error.  */
11154 /* We use char because int might match the return type of a gcc2
11155     builtin and then its argument prototype would still apply.  */
11156 char lwp_create();
11157
11158 int main() {
11159 lwp_create()
11160 ; return 0; }
11161 EOF
11162 if { (eval echo configure:11163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11163   rm -rf conftest*
11164   eval "ac_cv_lib_$ac_lib_var=yes"
11165 else
11166   echo "configure: failed program was:" >&5
11167   cat conftest.$ac_ext >&5
11168   rm -rf conftest*
11169   eval "ac_cv_lib_$ac_lib_var=no"
11170 fi
11171 rm -f conftest*
11172 LIBS="$ac_save_LIBS"
11173
11174 fi
11175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11176   echo "$ac_t""yes" 1>&6
11177   have_lwp=yes
11178 else
11179   echo "$ac_t""no" 1>&6
11180 have_lwp=no
11181 fi
11182
11183
11184                 if test $have_lwp = yes ; then
11185                         cat >> confdefs.h <<\EOF
11186 #define HAVE_LWP 1
11187 EOF
11188
11189                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11190                         ol_link_threads=lwp
11191
11192                         if test $ol_with_yielding_select = auto ; then
11193                                 ol_with_yielding_select=no
11194                         fi
11195                 fi
11196         fi
11197 fi
11198
11199 if test $ol_with_yielding_select = yes ; then
11200         cat >> confdefs.h <<\EOF
11201 #define HAVE_YIELDING_SELECT 1
11202 EOF
11203
11204 fi
11205
11206 if test $ol_with_threads = manual ; then
11207                 ol_link_threads=yes
11208
11209         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11210
11211         for ac_hdr in pthread.h sched.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_func in sched_yield pthread_yield
11252 do
11253 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11254 echo "configure:11255: checking for $ac_func" >&5
11255 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11256   echo $ac_n "(cached) $ac_c" 1>&6
11257 else
11258   cat > conftest.$ac_ext <<EOF
11259 #line 11260 "configure"
11260 #include "confdefs.h"
11261 /* System header to define __stub macros and hopefully few prototypes,
11262     which can conflict with char $ac_func(); below.  */
11263 #include <assert.h>
11264 /* Override any gcc2 internal prototype to avoid an error.  */
11265 /* We use char because int might match the return type of a gcc2
11266     builtin and then its argument prototype would still apply.  */
11267 char $ac_func();
11268 char (*f)();
11269
11270 int main() {
11271
11272 /* The GNU C library defines this for functions which it implements
11273     to always fail with ENOSYS.  Some functions are actually named
11274     something starting with __ and the normal name is an alias.  */
11275 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11276 choke me
11277 #else
11278 f = $ac_func;
11279 #endif
11280
11281 ; return 0; }
11282 EOF
11283 if { (eval echo configure:11284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11284   rm -rf conftest*
11285   eval "ac_cv_func_$ac_func=yes"
11286 else
11287   echo "configure: failed program was:" >&5
11288   cat conftest.$ac_ext >&5
11289   rm -rf conftest*
11290   eval "ac_cv_func_$ac_func=no"
11291 fi
11292 rm -f conftest*
11293 fi
11294
11295 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11296   echo "$ac_t""yes" 1>&6
11297     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11298   cat >> confdefs.h <<EOF
11299 #define $ac_tr_func 1
11300 EOF
11301  
11302 else
11303   echo "$ac_t""no" 1>&6
11304 fi
11305 done
11306
11307         
11308         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11309 echo "configure:11310: checking for LinuxThreads pthread.h" >&5
11310 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11311   echo $ac_n "(cached) $ac_c" 1>&6
11312 else
11313   cat > conftest.$ac_ext <<EOF
11314 #line 11315 "configure"
11315 #include "confdefs.h"
11316 #include <pthread.h>
11317 EOF
11318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11319   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11320   rm -rf conftest*
11321   ol_cv_header_linux_threads=yes
11322 else
11323   rm -rf conftest*
11324   ol_cv_header_linux_threads=no
11325 fi
11326 rm -f conftest*
11327
11328                 
11329 fi
11330
11331 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11332         if test $ol_cv_header_linux_threads = yes; then
11333                 cat >> confdefs.h <<\EOF
11334 #define HAVE_LINUX_THREADS 1
11335 EOF
11336
11337         fi
11338
11339
11340         for ac_hdr in mach/cthreads.h
11341 do
11342 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11343 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11344 echo "configure:11345: checking for $ac_hdr" >&5
11345 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11346   echo $ac_n "(cached) $ac_c" 1>&6
11347 else
11348   cat > conftest.$ac_ext <<EOF
11349 #line 11350 "configure"
11350 #include "confdefs.h"
11351 #include <$ac_hdr>
11352 EOF
11353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11354 { (eval echo configure:11355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11356 if test -z "$ac_err"; then
11357   rm -rf conftest*
11358   eval "ac_cv_header_$ac_safe=yes"
11359 else
11360   echo "$ac_err" >&5
11361   echo "configure: failed program was:" >&5
11362   cat conftest.$ac_ext >&5
11363   rm -rf conftest*
11364   eval "ac_cv_header_$ac_safe=no"
11365 fi
11366 rm -f conftest*
11367 fi
11368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11369   echo "$ac_t""yes" 1>&6
11370     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11371   cat >> confdefs.h <<EOF
11372 #define $ac_tr_hdr 1
11373 EOF
11374  
11375 else
11376   echo "$ac_t""no" 1>&6
11377 fi
11378 done
11379
11380         for ac_hdr in lwp/lwp.h
11381 do
11382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11384 echo "configure:11385: checking for $ac_hdr" >&5
11385 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11386   echo $ac_n "(cached) $ac_c" 1>&6
11387 else
11388   cat > conftest.$ac_ext <<EOF
11389 #line 11390 "configure"
11390 #include "confdefs.h"
11391 #include <$ac_hdr>
11392 EOF
11393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11394 { (eval echo configure:11395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11396 if test -z "$ac_err"; then
11397   rm -rf conftest*
11398   eval "ac_cv_header_$ac_safe=yes"
11399 else
11400   echo "$ac_err" >&5
11401   echo "configure: failed program was:" >&5
11402   cat conftest.$ac_ext >&5
11403   rm -rf conftest*
11404   eval "ac_cv_header_$ac_safe=no"
11405 fi
11406 rm -f conftest*
11407 fi
11408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11409   echo "$ac_t""yes" 1>&6
11410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11411   cat >> confdefs.h <<EOF
11412 #define $ac_tr_hdr 1
11413 EOF
11414  
11415 else
11416   echo "$ac_t""no" 1>&6
11417 fi
11418 done
11419
11420         for ac_hdr in thread.h synch.h
11421 do
11422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11424 echo "configure:11425: checking for $ac_hdr" >&5
11425 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11426   echo $ac_n "(cached) $ac_c" 1>&6
11427 else
11428   cat > conftest.$ac_ext <<EOF
11429 #line 11430 "configure"
11430 #include "confdefs.h"
11431 #include <$ac_hdr>
11432 EOF
11433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11434 { (eval echo configure:11435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11436 if test -z "$ac_err"; then
11437   rm -rf conftest*
11438   eval "ac_cv_header_$ac_safe=yes"
11439 else
11440   echo "$ac_err" >&5
11441   echo "configure: failed program was:" >&5
11442   cat conftest.$ac_ext >&5
11443   rm -rf conftest*
11444   eval "ac_cv_header_$ac_safe=no"
11445 fi
11446 rm -f conftest*
11447 fi
11448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11449   echo "$ac_t""yes" 1>&6
11450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11451   cat >> confdefs.h <<EOF
11452 #define $ac_tr_hdr 1
11453 EOF
11454  
11455 else
11456   echo "$ac_t""no" 1>&6
11457 fi
11458 done
11459
11460 fi
11461
11462 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11463                         cat >> confdefs.h <<\EOF
11464 #define REENTRANT 1
11465 EOF
11466
11467         cat >> confdefs.h <<\EOF
11468 #define _REENTRANT 1
11469 EOF
11470
11471         cat >> confdefs.h <<\EOF
11472 #define THREAD_SAFE 1
11473 EOF
11474
11475         cat >> confdefs.h <<\EOF
11476 #define _THREAD_SAFE 1
11477 EOF
11478
11479         cat >> confdefs.h <<\EOF
11480 #define THREADSAFE 1
11481 EOF
11482
11483         cat >> confdefs.h <<\EOF
11484 #define _THREADSAFE 1
11485 EOF
11486
11487         cat >> confdefs.h <<\EOF
11488 #define _SGI_MP_SOURCE 1
11489 EOF
11490
11491
11492                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11493 echo "configure:11494: checking for thread specific errno" >&5
11494 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11495   echo $ac_n "(cached) $ac_c" 1>&6
11496 else
11497   
11498                 cat > conftest.$ac_ext <<EOF
11499 #line 11500 "configure"
11500 #include "confdefs.h"
11501 #include <errno.h>
11502 int main() {
11503 errno = 0;
11504 ; return 0; }
11505 EOF
11506 if { (eval echo configure:11507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11507   rm -rf conftest*
11508   ol_cv_errno_thread_specific=yes
11509 else
11510   echo "configure: failed program was:" >&5
11511   cat conftest.$ac_ext >&5
11512   rm -rf conftest*
11513   ol_cv_errno_thread_specific=no
11514 fi
11515 rm -f conftest*
11516         
11517 fi
11518
11519 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11520
11521                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11522 echo "configure:11523: checking for thread specific h_errno" >&5
11523 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11524   echo $ac_n "(cached) $ac_c" 1>&6
11525 else
11526   
11527                 cat > conftest.$ac_ext <<EOF
11528 #line 11529 "configure"
11529 #include "confdefs.h"
11530 #include <netdb.h>
11531 int main() {
11532 h_errno = 0;
11533 ; return 0; }
11534 EOF
11535 if { (eval echo configure:11536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11536   rm -rf conftest*
11537   ol_cv_h_errno_thread_specific=yes
11538 else
11539   echo "configure: failed program was:" >&5
11540   cat conftest.$ac_ext >&5
11541   rm -rf conftest*
11542   ol_cv_h_errno_thread_specific=no
11543 fi
11544 rm -f conftest*
11545         
11546 fi
11547
11548 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11549
11550         if test $ol_cv_errno_thread_specific != yes \
11551                 -o $ol_cv_h_errno_thread_specific != yes ; then
11552                 LIBS="$LTHREAD_LIBS $LIBS"
11553                 LTHREAD_LIBS=""
11554         fi
11555
11556 fi  
11557
11558 if test $ol_link_threads = no ; then
11559         if test $ol_with_threads = yes ; then
11560                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11561         fi
11562
11563         if test $ol_with_threads = auto ; then
11564                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11565                 ol_with_threads=no
11566         fi
11567
11568         cat >> confdefs.h <<\EOF
11569 #define NO_THREADS 1
11570 EOF
11571
11572         LTHREAD_LIBS=""
11573 fi
11574
11575 if test $ol_link_threads != no ; then
11576         cat >> confdefs.h <<\EOF
11577 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11578 EOF
11579
11580 fi
11581
11582 ol_link_ldbm=no 
11583
11584 if test $ol_with_ldbm_api = auto \
11585         -o $ol_with_ldbm_api = berkeley \
11586         -o $ol_with_ldbm_api = bcompat ; then
11587
11588         if test $ol_with_ldbm_api = bcompat; then \
11589                 ol_cv_berkeley_db=no
11590 for ac_hdr in db_185.h db.h
11591 do
11592 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11593 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11594 echo "configure:11595: checking for $ac_hdr" >&5
11595 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11596   echo $ac_n "(cached) $ac_c" 1>&6
11597 else
11598   cat > conftest.$ac_ext <<EOF
11599 #line 11600 "configure"
11600 #include "confdefs.h"
11601 #include <$ac_hdr>
11602 EOF
11603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11604 { (eval echo configure:11605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11606 if test -z "$ac_err"; then
11607   rm -rf conftest*
11608   eval "ac_cv_header_$ac_safe=yes"
11609 else
11610   echo "$ac_err" >&5
11611   echo "configure: failed program was:" >&5
11612   cat conftest.$ac_ext >&5
11613   rm -rf conftest*
11614   eval "ac_cv_header_$ac_safe=no"
11615 fi
11616 rm -f conftest*
11617 fi
11618 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11619   echo "$ac_t""yes" 1>&6
11620     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11621   cat >> confdefs.h <<EOF
11622 #define $ac_tr_hdr 1
11623 EOF
11624  
11625 else
11626   echo "$ac_t""no" 1>&6
11627 fi
11628 done
11629
11630 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11631         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11632 echo "configure:11633: checking if Berkeley DB header compatibility" >&5
11633 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11634   echo $ac_n "(cached) $ac_c" 1>&6
11635 else
11636   
11637                 cat > conftest.$ac_ext <<EOF
11638 #line 11639 "configure"
11639 #include "confdefs.h"
11640
11641 #if HAVE_DB_185_H
11642 #       include <db_185.h>
11643 #else
11644 #       include <db.h>
11645 #endif
11646
11647  /* this check could be improved */
11648 #ifndef DB_VERSION_MAJOR
11649 #       define DB_VERSION_MAJOR 1
11650 #endif
11651
11652 #if DB_VERSION_MAJOR == 1 
11653         __db_version_1
11654 #endif
11655
11656 EOF
11657 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11658   egrep "__db_version_1" >/dev/null 2>&1; then
11659   rm -rf conftest*
11660   ol_cv_header_db1=yes
11661 else
11662   rm -rf conftest*
11663   ol_cv_header_db1=no
11664 fi
11665 rm -f conftest*
11666
11667 fi
11668
11669 echo "$ac_t""$ol_cv_header_db1" 1>&6
11670
11671         if test ol_cv_header_db1=yes ; then
11672                 ol_cv_lib_db=no
11673 if test $ol_cv_lib_db = no ; then
11674         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11675 echo "configure:11676: checking for Berkeley DB link (default)" >&5
11676 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11677   echo $ac_n "(cached) $ac_c" 1>&6
11678 else
11679   
11680         ol_DB_LIB=
11681         ol_LIBS=$LIBS
11682         LIBS="$ol_DB_LIB $LIBS"
11683
11684         cat > conftest.$ac_ext <<EOF
11685 #line 11686 "configure"
11686 #include "confdefs.h"
11687
11688 #ifdef HAVE_DB_185_H
11689 # include <db_185.h>
11690 #else
11691 # include <db.h>
11692 #endif
11693
11694 #ifndef DB_VERSION_MAJOR
11695 # define DB_VERSION_MAJOR 1
11696 #endif
11697
11698 #ifndef NULL
11699 #define NULL ((void*)0)
11700 #endif
11701
11702 int main() {
11703
11704 #if DB_VERSION_MAJOR > 2
11705         db_env_create( NULL, 0 );
11706 #elif DB_VERSION_MAJOR > 1
11707         db_appexit( NULL );
11708 #else
11709         (void) dbopen( NULL, 0, 0, 0, NULL);
11710 #endif
11711
11712 ; return 0; }
11713 EOF
11714 if { (eval echo configure:11715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11715   rm -rf conftest*
11716   ol_cv_db_none=yes
11717 else
11718   echo "configure: failed program was:" >&5
11719   cat conftest.$ac_ext >&5
11720   rm -rf conftest*
11721   ol_cv_db_none=no
11722 fi
11723 rm -f conftest*
11724
11725         LIBS="$ol_LIBS"
11726
11727 fi
11728
11729 echo "$ac_t""$ol_cv_db_none" 1>&6
11730
11731         if test $ol_cv_db_none = yes ; then
11732                 ol_cv_lib_db=yes
11733         fi
11734 fi
11735
11736 if test $ol_cv_lib_db = no ; then
11737         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11738 echo "configure:11739: checking for Berkeley DB link (-ldb)" >&5
11739 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11740   echo $ac_n "(cached) $ac_c" 1>&6
11741 else
11742   
11743         ol_DB_LIB=-ldb
11744         ol_LIBS=$LIBS
11745         LIBS="$ol_DB_LIB $LIBS"
11746
11747         cat > conftest.$ac_ext <<EOF
11748 #line 11749 "configure"
11749 #include "confdefs.h"
11750
11751 #ifdef HAVE_DB_185_H
11752 # include <db_185.h>
11753 #else
11754 # include <db.h>
11755 #endif
11756
11757 #ifndef DB_VERSION_MAJOR
11758 # define DB_VERSION_MAJOR 1
11759 #endif
11760
11761 #ifndef NULL
11762 #define NULL ((void*)0)
11763 #endif
11764
11765 int main() {
11766
11767 #if DB_VERSION_MAJOR > 2
11768         db_env_create( NULL, 0 );
11769 #elif DB_VERSION_MAJOR > 1
11770         db_appexit( NULL );
11771 #else
11772         (void) dbopen( NULL, 0, 0, 0, NULL);
11773 #endif
11774
11775 ; return 0; }
11776 EOF
11777 if { (eval echo configure:11778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11778   rm -rf conftest*
11779   ol_cv_db_db=yes
11780 else
11781   echo "configure: failed program was:" >&5
11782   cat conftest.$ac_ext >&5
11783   rm -rf conftest*
11784   ol_cv_db_db=no
11785 fi
11786 rm -f conftest*
11787
11788         LIBS="$ol_LIBS"
11789
11790 fi
11791
11792 echo "$ac_t""$ol_cv_db_db" 1>&6
11793
11794         if test $ol_cv_db_db = yes ; then
11795                 ol_cv_lib_db=-ldb
11796         fi
11797 fi
11798
11799 if test $ol_cv_lib_db = no ; then
11800         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11801 echo "configure:11802: checking for Berkeley DB link (-ldb3)" >&5
11802 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11803   echo $ac_n "(cached) $ac_c" 1>&6
11804 else
11805   
11806         ol_DB_LIB=-ldb3
11807         ol_LIBS=$LIBS
11808         LIBS="$ol_DB_LIB $LIBS"
11809
11810         cat > conftest.$ac_ext <<EOF
11811 #line 11812 "configure"
11812 #include "confdefs.h"
11813
11814 #ifdef HAVE_DB_185_H
11815 # include <db_185.h>
11816 #else
11817 # include <db.h>
11818 #endif
11819
11820 #ifndef DB_VERSION_MAJOR
11821 # define DB_VERSION_MAJOR 1
11822 #endif
11823
11824 #ifndef NULL
11825 #define NULL ((void*)0)
11826 #endif
11827
11828 int main() {
11829
11830 #if DB_VERSION_MAJOR > 2
11831         db_env_create( NULL, 0 );
11832 #elif DB_VERSION_MAJOR > 1
11833         db_appexit( NULL );
11834 #else
11835         (void) dbopen( NULL, 0, 0, 0, NULL);
11836 #endif
11837
11838 ; return 0; }
11839 EOF
11840 if { (eval echo configure:11841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11841   rm -rf conftest*
11842   ol_cv_db_db3=yes
11843 else
11844   echo "configure: failed program was:" >&5
11845   cat conftest.$ac_ext >&5
11846   rm -rf conftest*
11847   ol_cv_db_db3=no
11848 fi
11849 rm -f conftest*
11850
11851         LIBS="$ol_LIBS"
11852
11853 fi
11854
11855 echo "$ac_t""$ol_cv_db_db3" 1>&6
11856
11857         if test $ol_cv_db_db3 = yes ; then
11858                 ol_cv_lib_db=-ldb3
11859         fi
11860 fi
11861
11862 if test $ol_cv_lib_db = no ; then
11863         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11864 echo "configure:11865: checking for Berkeley DB link (-ldb2)" >&5
11865 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11866   echo $ac_n "(cached) $ac_c" 1>&6
11867 else
11868   
11869         ol_DB_LIB=-ldb2
11870         ol_LIBS=$LIBS
11871         LIBS="$ol_DB_LIB $LIBS"
11872
11873         cat > conftest.$ac_ext <<EOF
11874 #line 11875 "configure"
11875 #include "confdefs.h"
11876
11877 #ifdef HAVE_DB_185_H
11878 # include <db_185.h>
11879 #else
11880 # include <db.h>
11881 #endif
11882
11883 #ifndef DB_VERSION_MAJOR
11884 # define DB_VERSION_MAJOR 1
11885 #endif
11886
11887 #ifndef NULL
11888 #define NULL ((void*)0)
11889 #endif
11890
11891 int main() {
11892
11893 #if DB_VERSION_MAJOR > 2
11894         db_env_create( NULL, 0 );
11895 #elif DB_VERSION_MAJOR > 1
11896         db_appexit( NULL );
11897 #else
11898         (void) dbopen( NULL, 0, 0, 0, NULL);
11899 #endif
11900
11901 ; return 0; }
11902 EOF
11903 if { (eval echo configure:11904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11904   rm -rf conftest*
11905   ol_cv_db_db2=yes
11906 else
11907   echo "configure: failed program was:" >&5
11908   cat conftest.$ac_ext >&5
11909   rm -rf conftest*
11910   ol_cv_db_db2=no
11911 fi
11912 rm -f conftest*
11913
11914         LIBS="$ol_LIBS"
11915
11916 fi
11917
11918 echo "$ac_t""$ol_cv_db_db2" 1>&6
11919
11920         if test $ol_cv_db_db2 = yes ; then
11921                 ol_cv_lib_db=-ldb2
11922         fi
11923 fi
11924
11925 if test $ol_cv_lib_db = no ; then
11926         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11927 echo "configure:11928: checking for Berkeley DB link (-ldb1)" >&5
11928 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11929   echo $ac_n "(cached) $ac_c" 1>&6
11930 else
11931   
11932         ol_DB_LIB=-ldb1
11933         ol_LIBS=$LIBS
11934         LIBS="$ol_DB_LIB $LIBS"
11935
11936         cat > conftest.$ac_ext <<EOF
11937 #line 11938 "configure"
11938 #include "confdefs.h"
11939
11940 #ifdef HAVE_DB_185_H
11941 # include <db_185.h>
11942 #else
11943 # include <db.h>
11944 #endif
11945
11946 #ifndef DB_VERSION_MAJOR
11947 # define DB_VERSION_MAJOR 1
11948 #endif
11949
11950 #ifndef NULL
11951 #define NULL ((void*)0)
11952 #endif
11953
11954 int main() {
11955
11956 #if DB_VERSION_MAJOR > 2
11957         db_env_create( NULL, 0 );
11958 #elif DB_VERSION_MAJOR > 1
11959         db_appexit( NULL );
11960 #else
11961         (void) dbopen( NULL, 0, 0, 0, NULL);
11962 #endif
11963
11964 ; return 0; }
11965 EOF
11966 if { (eval echo configure:11967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11967   rm -rf conftest*
11968   ol_cv_db_db1=yes
11969 else
11970   echo "configure: failed program was:" >&5
11971   cat conftest.$ac_ext >&5
11972   rm -rf conftest*
11973   ol_cv_db_db1=no
11974 fi
11975 rm -f conftest*
11976
11977         LIBS="$ol_LIBS"
11978
11979 fi
11980
11981 echo "$ac_t""$ol_cv_db_db1" 1>&6
11982
11983         if test $ol_cv_db_db1 = yes ; then
11984                 ol_cv_lib_db=-ldb1
11985         fi
11986 fi
11987
11988
11989                 if test "$ol_cv_lib_db" != no ; then
11990                         ol_cv_berkeley_db=yes
11991                 fi
11992         fi
11993 fi
11994
11995         else
11996                 ol_cv_berkeley_db=no
11997 for ac_hdr in db.h
11998 do
11999 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12000 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12001 echo "configure:12002: checking for $ac_hdr" >&5
12002 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12003   echo $ac_n "(cached) $ac_c" 1>&6
12004 else
12005   cat > conftest.$ac_ext <<EOF
12006 #line 12007 "configure"
12007 #include "confdefs.h"
12008 #include <$ac_hdr>
12009 EOF
12010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12011 { (eval echo configure:12012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12012 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12013 if test -z "$ac_err"; then
12014   rm -rf conftest*
12015   eval "ac_cv_header_$ac_safe=yes"
12016 else
12017   echo "$ac_err" >&5
12018   echo "configure: failed program was:" >&5
12019   cat conftest.$ac_ext >&5
12020   rm -rf conftest*
12021   eval "ac_cv_header_$ac_safe=no"
12022 fi
12023 rm -f conftest*
12024 fi
12025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12026   echo "$ac_t""yes" 1>&6
12027     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12028   cat >> confdefs.h <<EOF
12029 #define $ac_tr_hdr 1
12030 EOF
12031  
12032 else
12033   echo "$ac_t""no" 1>&6
12034 fi
12035 done
12036
12037 if test $ac_cv_header_db_h = yes; then
12038         ol_cv_lib_db=no
12039 if test $ol_cv_lib_db = no ; then
12040         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12041 echo "configure:12042: checking for Berkeley DB link (default)" >&5
12042 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12043   echo $ac_n "(cached) $ac_c" 1>&6
12044 else
12045   
12046         ol_DB_LIB=
12047         ol_LIBS=$LIBS
12048         LIBS="$ol_DB_LIB $LIBS"
12049
12050         cat > conftest.$ac_ext <<EOF
12051 #line 12052 "configure"
12052 #include "confdefs.h"
12053
12054 #ifdef HAVE_DB_185_H
12055 # include <db_185.h>
12056 #else
12057 # include <db.h>
12058 #endif
12059
12060 #ifndef DB_VERSION_MAJOR
12061 # define DB_VERSION_MAJOR 1
12062 #endif
12063
12064 #ifndef NULL
12065 #define NULL ((void*)0)
12066 #endif
12067
12068 int main() {
12069
12070 #if DB_VERSION_MAJOR > 2
12071         db_env_create( NULL, 0 );
12072 #elif DB_VERSION_MAJOR > 1
12073         db_appexit( NULL );
12074 #else
12075         (void) dbopen( NULL, 0, 0, 0, NULL);
12076 #endif
12077
12078 ; return 0; }
12079 EOF
12080 if { (eval echo configure:12081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12081   rm -rf conftest*
12082   ol_cv_db_none=yes
12083 else
12084   echo "configure: failed program was:" >&5
12085   cat conftest.$ac_ext >&5
12086   rm -rf conftest*
12087   ol_cv_db_none=no
12088 fi
12089 rm -f conftest*
12090
12091         LIBS="$ol_LIBS"
12092
12093 fi
12094
12095 echo "$ac_t""$ol_cv_db_none" 1>&6
12096
12097         if test $ol_cv_db_none = yes ; then
12098                 ol_cv_lib_db=yes
12099         fi
12100 fi
12101
12102 if test $ol_cv_lib_db = no ; then
12103         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12104 echo "configure:12105: checking for Berkeley DB link (-ldb)" >&5
12105 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12106   echo $ac_n "(cached) $ac_c" 1>&6
12107 else
12108   
12109         ol_DB_LIB=-ldb
12110         ol_LIBS=$LIBS
12111         LIBS="$ol_DB_LIB $LIBS"
12112
12113         cat > conftest.$ac_ext <<EOF
12114 #line 12115 "configure"
12115 #include "confdefs.h"
12116
12117 #ifdef HAVE_DB_185_H
12118 # include <db_185.h>
12119 #else
12120 # include <db.h>
12121 #endif
12122
12123 #ifndef DB_VERSION_MAJOR
12124 # define DB_VERSION_MAJOR 1
12125 #endif
12126
12127 #ifndef NULL
12128 #define NULL ((void*)0)
12129 #endif
12130
12131 int main() {
12132
12133 #if DB_VERSION_MAJOR > 2
12134         db_env_create( NULL, 0 );
12135 #elif DB_VERSION_MAJOR > 1
12136         db_appexit( NULL );
12137 #else
12138         (void) dbopen( NULL, 0, 0, 0, NULL);
12139 #endif
12140
12141 ; return 0; }
12142 EOF
12143 if { (eval echo configure:12144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12144   rm -rf conftest*
12145   ol_cv_db_db=yes
12146 else
12147   echo "configure: failed program was:" >&5
12148   cat conftest.$ac_ext >&5
12149   rm -rf conftest*
12150   ol_cv_db_db=no
12151 fi
12152 rm -f conftest*
12153
12154         LIBS="$ol_LIBS"
12155
12156 fi
12157
12158 echo "$ac_t""$ol_cv_db_db" 1>&6
12159
12160         if test $ol_cv_db_db = yes ; then
12161                 ol_cv_lib_db=-ldb
12162         fi
12163 fi
12164
12165 if test $ol_cv_lib_db = no ; then
12166         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12167 echo "configure:12168: checking for Berkeley DB link (-ldb3)" >&5
12168 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12169   echo $ac_n "(cached) $ac_c" 1>&6
12170 else
12171   
12172         ol_DB_LIB=-ldb3
12173         ol_LIBS=$LIBS
12174         LIBS="$ol_DB_LIB $LIBS"
12175
12176         cat > conftest.$ac_ext <<EOF
12177 #line 12178 "configure"
12178 #include "confdefs.h"
12179
12180 #ifdef HAVE_DB_185_H
12181 # include <db_185.h>
12182 #else
12183 # include <db.h>
12184 #endif
12185
12186 #ifndef DB_VERSION_MAJOR
12187 # define DB_VERSION_MAJOR 1
12188 #endif
12189
12190 #ifndef NULL
12191 #define NULL ((void*)0)
12192 #endif
12193
12194 int main() {
12195
12196 #if DB_VERSION_MAJOR > 2
12197         db_env_create( NULL, 0 );
12198 #elif DB_VERSION_MAJOR > 1
12199         db_appexit( NULL );
12200 #else
12201         (void) dbopen( NULL, 0, 0, 0, NULL);
12202 #endif
12203
12204 ; return 0; }
12205 EOF
12206 if { (eval echo configure:12207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12207   rm -rf conftest*
12208   ol_cv_db_db3=yes
12209 else
12210   echo "configure: failed program was:" >&5
12211   cat conftest.$ac_ext >&5
12212   rm -rf conftest*
12213   ol_cv_db_db3=no
12214 fi
12215 rm -f conftest*
12216
12217         LIBS="$ol_LIBS"
12218
12219 fi
12220
12221 echo "$ac_t""$ol_cv_db_db3" 1>&6
12222
12223         if test $ol_cv_db_db3 = yes ; then
12224                 ol_cv_lib_db=-ldb3
12225         fi
12226 fi
12227
12228 if test $ol_cv_lib_db = no ; then
12229         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12230 echo "configure:12231: checking for Berkeley DB link (-ldb2)" >&5
12231 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12232   echo $ac_n "(cached) $ac_c" 1>&6
12233 else
12234   
12235         ol_DB_LIB=-ldb2
12236         ol_LIBS=$LIBS
12237         LIBS="$ol_DB_LIB $LIBS"
12238
12239         cat > conftest.$ac_ext <<EOF
12240 #line 12241 "configure"
12241 #include "confdefs.h"
12242
12243 #ifdef HAVE_DB_185_H
12244 # include <db_185.h>
12245 #else
12246 # include <db.h>
12247 #endif
12248
12249 #ifndef DB_VERSION_MAJOR
12250 # define DB_VERSION_MAJOR 1
12251 #endif
12252
12253 #ifndef NULL
12254 #define NULL ((void*)0)
12255 #endif
12256
12257 int main() {
12258
12259 #if DB_VERSION_MAJOR > 2
12260         db_env_create( NULL, 0 );
12261 #elif DB_VERSION_MAJOR > 1
12262         db_appexit( NULL );
12263 #else
12264         (void) dbopen( NULL, 0, 0, 0, NULL);
12265 #endif
12266
12267 ; return 0; }
12268 EOF
12269 if { (eval echo configure:12270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12270   rm -rf conftest*
12271   ol_cv_db_db2=yes
12272 else
12273   echo "configure: failed program was:" >&5
12274   cat conftest.$ac_ext >&5
12275   rm -rf conftest*
12276   ol_cv_db_db2=no
12277 fi
12278 rm -f conftest*
12279
12280         LIBS="$ol_LIBS"
12281
12282 fi
12283
12284 echo "$ac_t""$ol_cv_db_db2" 1>&6
12285
12286         if test $ol_cv_db_db2 = yes ; then
12287                 ol_cv_lib_db=-ldb2
12288         fi
12289 fi
12290
12291 if test $ol_cv_lib_db = no ; then
12292         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12293 echo "configure:12294: checking for Berkeley DB link (-ldb1)" >&5
12294 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12295   echo $ac_n "(cached) $ac_c" 1>&6
12296 else
12297   
12298         ol_DB_LIB=-ldb1
12299         ol_LIBS=$LIBS
12300         LIBS="$ol_DB_LIB $LIBS"
12301
12302         cat > conftest.$ac_ext <<EOF
12303 #line 12304 "configure"
12304 #include "confdefs.h"
12305
12306 #ifdef HAVE_DB_185_H
12307 # include <db_185.h>
12308 #else
12309 # include <db.h>
12310 #endif
12311
12312 #ifndef DB_VERSION_MAJOR
12313 # define DB_VERSION_MAJOR 1
12314 #endif
12315
12316 #ifndef NULL
12317 #define NULL ((void*)0)
12318 #endif
12319
12320 int main() {
12321
12322 #if DB_VERSION_MAJOR > 2
12323         db_env_create( NULL, 0 );
12324 #elif DB_VERSION_MAJOR > 1
12325         db_appexit( NULL );
12326 #else
12327         (void) dbopen( NULL, 0, 0, 0, NULL);
12328 #endif
12329
12330 ; return 0; }
12331 EOF
12332 if { (eval echo configure:12333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12333   rm -rf conftest*
12334   ol_cv_db_db1=yes
12335 else
12336   echo "configure: failed program was:" >&5
12337   cat conftest.$ac_ext >&5
12338   rm -rf conftest*
12339   ol_cv_db_db1=no
12340 fi
12341 rm -f conftest*
12342
12343         LIBS="$ol_LIBS"
12344
12345 fi
12346
12347 echo "$ac_t""$ol_cv_db_db1" 1>&6
12348
12349         if test $ol_cv_db_db1 = yes ; then
12350                 ol_cv_lib_db=-ldb1
12351         fi
12352 fi
12353
12354
12355         if test "$ol_cv_lib_db" != no ; then
12356                 ol_cv_berkeley_db=yes
12357                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12358 echo "configure:12359: checking for Berkeley DB thread support" >&5
12359 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12360   echo $ac_n "(cached) $ac_c" 1>&6
12361 else
12362   
12363         ol_LIBS="$LIBS"
12364         if test $ol_cv_lib_db != yes ; then
12365                 LIBS="$ol_cv_lib_db"
12366         fi
12367
12368         if test "$cross_compiling" = yes; then
12369   ol_cv_berkeley_db_thread=cross
12370 else
12371   cat > conftest.$ac_ext <<EOF
12372 #line 12373 "configure"
12373 #include "confdefs.h"
12374
12375 #ifdef HAVE_DB_185_H
12376         choke me;
12377 #else
12378 #include <db.h>
12379 #endif
12380 #ifndef NULL
12381 #define NULL ((void *)0)
12382 #endif
12383 main()
12384 {
12385         int rc;
12386         u_int32_t flags = DB_CREATE | DB_THREAD;
12387
12388 #if DB_VERSION_MAJOR > 2
12389         DB_ENV *env = NULL;
12390
12391         rc = db_env_create( &env, 0 );
12392
12393         if( rc == 0 ) {
12394 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12395                 rc = env->open( env, NULL, flags, 0 );
12396 #else
12397                 rc = env->open( env, NULL, NULL, flags, 0 );
12398 #endif
12399         }
12400
12401 #else
12402         DB_ENV env;
12403         memset( &env, '\0', sizeof(env) );
12404
12405         rc = db_appinit( NULL, NULL, &env, flags );
12406
12407         if( rc == 0 ) {
12408                 db_appexit( &env );
12409         }
12410 #endif
12411 #if DB_VERSION_MAJOR > 2
12412 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12413         env->remove( env, NULL, DB_FORCE);
12414 #else
12415         env->remove( env, NULL, NULL, DB_FORCE);
12416 #endif
12417 #endif
12418
12419         return rc;
12420 }
12421 EOF
12422 if { (eval echo configure:12423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12423 then
12424   ol_cv_berkeley_db_thread=yes
12425 else
12426   echo "configure: failed program was:" >&5
12427   cat conftest.$ac_ext >&5
12428   rm -fr conftest*
12429   ol_cv_berkeley_db_thread=no
12430 fi
12431 rm -fr conftest*
12432 fi
12433
12434
12435         LIBS="$ol_LIBS"
12436
12437         if test $ol_cv_berkeley_db_thread != no ; then
12438                 cat >> confdefs.h <<\EOF
12439 #define HAVE_BERKELEY_DB_THREAD 1
12440 EOF
12441
12442         fi
12443
12444 fi
12445
12446 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12447         fi
12448 fi
12449
12450         fi
12451
12452         if test $ol_cv_berkeley_db != no ; then
12453                 cat >> confdefs.h <<\EOF
12454 #define HAVE_BERKELEY_DB 1
12455 EOF
12456
12457
12458                 ol_link_ldbm=berkeley
12459                 ol_with_ldbm_api=db
12460
12461                 if test $ol_with_ldbm_type = hash ; then
12462                         cat >> confdefs.h <<\EOF
12463 #define LDBM_USE_DBHASH 1
12464 EOF
12465
12466                 else
12467                         cat >> confdefs.h <<\EOF
12468 #define LDBM_USE_DBBTREE 1
12469 EOF
12470
12471                 fi
12472
12473                                                 if test $ol_cv_lib_db != yes ; then
12474                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12475                 fi
12476         fi
12477 fi
12478
12479 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12480         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12481         ol_with_ldbm_api=none
12482 fi
12483
12484 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12485         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12486 echo "configure:12487: checking for MDBM library" >&5
12487 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12488   echo $ac_n "(cached) $ac_c" 1>&6
12489 else
12490         ol_LIBS="$LIBS"
12491         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12492 echo "configure:12493: checking for mdbm_set_chain" >&5
12493 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12494   echo $ac_n "(cached) $ac_c" 1>&6
12495 else
12496   cat > conftest.$ac_ext <<EOF
12497 #line 12498 "configure"
12498 #include "confdefs.h"
12499 /* System header to define __stub macros and hopefully few prototypes,
12500     which can conflict with char mdbm_set_chain(); below.  */
12501 #include <assert.h>
12502 /* Override any gcc2 internal prototype to avoid an error.  */
12503 /* We use char because int might match the return type of a gcc2
12504     builtin and then its argument prototype would still apply.  */
12505 char mdbm_set_chain();
12506 char (*f)();
12507
12508 int main() {
12509
12510 /* The GNU C library defines this for functions which it implements
12511     to always fail with ENOSYS.  Some functions are actually named
12512     something starting with __ and the normal name is an alias.  */
12513 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12514 choke me
12515 #else
12516 f = mdbm_set_chain;
12517 #endif
12518
12519 ; return 0; }
12520 EOF
12521 if { (eval echo configure:12522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12522   rm -rf conftest*
12523   eval "ac_cv_func_mdbm_set_chain=yes"
12524 else
12525   echo "configure: failed program was:" >&5
12526   cat conftest.$ac_ext >&5
12527   rm -rf conftest*
12528   eval "ac_cv_func_mdbm_set_chain=no"
12529 fi
12530 rm -f conftest*
12531 fi
12532
12533 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12534   echo "$ac_t""yes" 1>&6
12535   ol_cv_lib_mdbm=yes
12536 else
12537   echo "$ac_t""no" 1>&6
12538
12539                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12540 echo "configure:12541: checking for mdbm_set_chain in -lmdbm" >&5
12541 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12542 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12543   echo $ac_n "(cached) $ac_c" 1>&6
12544 else
12545   ac_save_LIBS="$LIBS"
12546 LIBS="-lmdbm  $LIBS"
12547 cat > conftest.$ac_ext <<EOF
12548 #line 12549 "configure"
12549 #include "confdefs.h"
12550 /* Override any gcc2 internal prototype to avoid an error.  */
12551 /* We use char because int might match the return type of a gcc2
12552     builtin and then its argument prototype would still apply.  */
12553 char mdbm_set_chain();
12554
12555 int main() {
12556 mdbm_set_chain()
12557 ; return 0; }
12558 EOF
12559 if { (eval echo configure:12560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12560   rm -rf conftest*
12561   eval "ac_cv_lib_$ac_lib_var=yes"
12562 else
12563   echo "configure: failed program was:" >&5
12564   cat conftest.$ac_ext >&5
12565   rm -rf conftest*
12566   eval "ac_cv_lib_$ac_lib_var=no"
12567 fi
12568 rm -f conftest*
12569 LIBS="$ac_save_LIBS"
12570
12571 fi
12572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12573   echo "$ac_t""yes" 1>&6
12574   ol_cv_lib_mdbm=-lmdbm
12575 else
12576   echo "$ac_t""no" 1>&6
12577 ol_cv_lib_mdbm=no
12578 fi
12579
12580         
12581 fi
12582
12583         LIBS="$ol_LIBS"
12584
12585 fi
12586
12587 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12588
12589
12590  for ac_hdr in mdbm.h
12591 do
12592 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12593 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12594 echo "configure:12595: checking for $ac_hdr" >&5
12595 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12596   echo $ac_n "(cached) $ac_c" 1>&6
12597 else
12598   cat > conftest.$ac_ext <<EOF
12599 #line 12600 "configure"
12600 #include "confdefs.h"
12601 #include <$ac_hdr>
12602 EOF
12603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12604 { (eval echo configure:12605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12606 if test -z "$ac_err"; then
12607   rm -rf conftest*
12608   eval "ac_cv_header_$ac_safe=yes"
12609 else
12610   echo "$ac_err" >&5
12611   echo "configure: failed program was:" >&5
12612   cat conftest.$ac_ext >&5
12613   rm -rf conftest*
12614   eval "ac_cv_header_$ac_safe=no"
12615 fi
12616 rm -f conftest*
12617 fi
12618 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12619   echo "$ac_t""yes" 1>&6
12620     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12621   cat >> confdefs.h <<EOF
12622 #define $ac_tr_hdr 1
12623 EOF
12624  
12625 else
12626   echo "$ac_t""no" 1>&6
12627 fi
12628 done
12629
12630  echo $ac_n "checking for db""... $ac_c" 1>&6
12631 echo "configure:12632: checking for db" >&5
12632 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12633   echo $ac_n "(cached) $ac_c" 1>&6
12634 else
12635   
12636         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12637                 ol_cv_mdbm=no
12638         else
12639                 ol_cv_mdbm=yes
12640         fi
12641
12642 fi
12643
12644 echo "$ac_t""$ol_cv_mdbm" 1>&6
12645  if test $ol_cv_mdbm = yes ; then
12646         cat >> confdefs.h <<\EOF
12647 #define HAVE_MDBM 1
12648 EOF
12649
12650  fi
12651
12652
12653         if test $ol_cv_mdbm = yes ; then
12654                 ol_link_ldbm=mdbm
12655                 ol_with_ldbm_api=mdbm
12656                 if test $ol_cv_lib_mdbm != yes ; then
12657                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12658                 fi
12659         fi
12660 fi
12661
12662 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12663         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12664 echo "configure:12665: checking for GDBM library" >&5
12665 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12666   echo $ac_n "(cached) $ac_c" 1>&6
12667 else
12668         ol_LIBS="$LIBS"
12669         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12670 echo "configure:12671: checking for gdbm_open" >&5
12671 if eval "test \"\${ac_cv_func_gdbm_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 gdbm_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 gdbm_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_gdbm_open) || defined (__stub___gdbm_open)
12692 choke me
12693 #else
12694 f = gdbm_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_gdbm_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_gdbm_open=no"
12707 fi
12708 rm -f conftest*
12709 fi
12710
12711 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12712   echo "$ac_t""yes" 1>&6
12713   ol_cv_lib_gdbm=yes
12714 else
12715   echo "$ac_t""no" 1>&6
12716
12717                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12718 echo "configure:12719: checking for gdbm_open in -lgdbm" >&5
12719 ac_lib_var=`echo gdbm'_'gdbm_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="-lgdbm  $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 gdbm_open();
12732
12733 int main() {
12734 gdbm_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_gdbm=-lgdbm
12753 else
12754   echo "$ac_t""no" 1>&6
12755 ol_cv_lib_gdbm=no
12756 fi
12757
12758         
12759 fi
12760
12761         LIBS="$ol_LIBS"
12762
12763 fi
12764
12765 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12766
12767
12768  for ac_hdr in gdbm.h
12769 do
12770 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12771 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12772 echo "configure:12773: checking for $ac_hdr" >&5
12773 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12774   echo $ac_n "(cached) $ac_c" 1>&6
12775 else
12776   cat > conftest.$ac_ext <<EOF
12777 #line 12778 "configure"
12778 #include "confdefs.h"
12779 #include <$ac_hdr>
12780 EOF
12781 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12782 { (eval echo configure:12783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12783 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12784 if test -z "$ac_err"; then
12785   rm -rf conftest*
12786   eval "ac_cv_header_$ac_safe=yes"
12787 else
12788   echo "$ac_err" >&5
12789   echo "configure: failed program was:" >&5
12790   cat conftest.$ac_ext >&5
12791   rm -rf conftest*
12792   eval "ac_cv_header_$ac_safe=no"
12793 fi
12794 rm -f conftest*
12795 fi
12796 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12797   echo "$ac_t""yes" 1>&6
12798     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12799   cat >> confdefs.h <<EOF
12800 #define $ac_tr_hdr 1
12801 EOF
12802  
12803 else
12804   echo "$ac_t""no" 1>&6
12805 fi
12806 done
12807
12808  echo $ac_n "checking for db""... $ac_c" 1>&6
12809 echo "configure:12810: checking for db" >&5
12810 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12811   echo $ac_n "(cached) $ac_c" 1>&6
12812 else
12813   
12814         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12815                 ol_cv_gdbm=no
12816         else
12817                 ol_cv_gdbm=yes
12818         fi
12819
12820 fi
12821
12822 echo "$ac_t""$ol_cv_gdbm" 1>&6
12823  if test $ol_cv_gdbm = yes ; then
12824         cat >> confdefs.h <<\EOF
12825 #define HAVE_GDBM 1
12826 EOF
12827
12828  fi
12829
12830
12831         if test $ol_cv_gdbm = yes ; then
12832                 ol_link_ldbm=gdbm
12833                 ol_with_ldbm_api=gdbm
12834
12835                 if test $ol_cv_lib_gdbm != yes ; then
12836                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12837                 fi
12838         fi
12839 fi
12840
12841 if test $ol_with_ldbm_api = ndbm ; then
12842         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12843 echo "configure:12844: checking for NDBM library" >&5
12844 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12845   echo $ac_n "(cached) $ac_c" 1>&6
12846 else
12847         ol_LIBS="$LIBS"
12848         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12849 echo "configure:12850: checking for dbm_open" >&5
12850 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12851   echo $ac_n "(cached) $ac_c" 1>&6
12852 else
12853   cat > conftest.$ac_ext <<EOF
12854 #line 12855 "configure"
12855 #include "confdefs.h"
12856 /* System header to define __stub macros and hopefully few prototypes,
12857     which can conflict with char dbm_open(); below.  */
12858 #include <assert.h>
12859 /* Override any gcc2 internal prototype to avoid an error.  */
12860 /* We use char because int might match the return type of a gcc2
12861     builtin and then its argument prototype would still apply.  */
12862 char dbm_open();
12863 char (*f)();
12864
12865 int main() {
12866
12867 /* The GNU C library defines this for functions which it implements
12868     to always fail with ENOSYS.  Some functions are actually named
12869     something starting with __ and the normal name is an alias.  */
12870 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12871 choke me
12872 #else
12873 f = dbm_open;
12874 #endif
12875
12876 ; return 0; }
12877 EOF
12878 if { (eval echo configure:12879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12879   rm -rf conftest*
12880   eval "ac_cv_func_dbm_open=yes"
12881 else
12882   echo "configure: failed program was:" >&5
12883   cat conftest.$ac_ext >&5
12884   rm -rf conftest*
12885   eval "ac_cv_func_dbm_open=no"
12886 fi
12887 rm -f conftest*
12888 fi
12889
12890 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12891   echo "$ac_t""yes" 1>&6
12892   ol_cv_lib_ndbm=yes
12893 else
12894   echo "$ac_t""no" 1>&6
12895
12896                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12897 echo "configure:12898: checking for dbm_open in -lndbm" >&5
12898 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12899 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12900   echo $ac_n "(cached) $ac_c" 1>&6
12901 else
12902   ac_save_LIBS="$LIBS"
12903 LIBS="-lndbm  $LIBS"
12904 cat > conftest.$ac_ext <<EOF
12905 #line 12906 "configure"
12906 #include "confdefs.h"
12907 /* Override any gcc2 internal prototype to avoid an error.  */
12908 /* We use char because int might match the return type of a gcc2
12909     builtin and then its argument prototype would still apply.  */
12910 char dbm_open();
12911
12912 int main() {
12913 dbm_open()
12914 ; return 0; }
12915 EOF
12916 if { (eval echo configure:12917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12917   rm -rf conftest*
12918   eval "ac_cv_lib_$ac_lib_var=yes"
12919 else
12920   echo "configure: failed program was:" >&5
12921   cat conftest.$ac_ext >&5
12922   rm -rf conftest*
12923   eval "ac_cv_lib_$ac_lib_var=no"
12924 fi
12925 rm -f conftest*
12926 LIBS="$ac_save_LIBS"
12927
12928 fi
12929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12930   echo "$ac_t""yes" 1>&6
12931   ol_cv_lib_ndbm=-lndbm
12932 else
12933   echo "$ac_t""no" 1>&6
12934
12935                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12936 echo "configure:12937: checking for dbm_open in -ldbm" >&5
12937 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12939   echo $ac_n "(cached) $ac_c" 1>&6
12940 else
12941   ac_save_LIBS="$LIBS"
12942 LIBS="-ldbm  $LIBS"
12943 cat > conftest.$ac_ext <<EOF
12944 #line 12945 "configure"
12945 #include "confdefs.h"
12946 /* Override any gcc2 internal prototype to avoid an error.  */
12947 /* We use char because int might match the return type of a gcc2
12948     builtin and then its argument prototype would still apply.  */
12949 char dbm_open();
12950
12951 int main() {
12952 dbm_open()
12953 ; return 0; }
12954 EOF
12955 if { (eval echo configure:12956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12956   rm -rf conftest*
12957   eval "ac_cv_lib_$ac_lib_var=yes"
12958 else
12959   echo "configure: failed program was:" >&5
12960   cat conftest.$ac_ext >&5
12961   rm -rf conftest*
12962   eval "ac_cv_lib_$ac_lib_var=no"
12963 fi
12964 rm -f conftest*
12965 LIBS="$ac_save_LIBS"
12966
12967 fi
12968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12969   echo "$ac_t""yes" 1>&6
12970   ol_cv_lib_ndbm=-ldbm
12971 else
12972   echo "$ac_t""no" 1>&6
12973 ol_cv_lib_ndbm=no
12974 fi
12975                 
12976 fi
12977
12978         
12979 fi
12980
12981         LIBS="$ol_LIBS"
12982
12983 fi
12984
12985 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12986
12987
12988  for ac_hdr in ndbm.h
12989 do
12990 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12991 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12992 echo "configure:12993: checking for $ac_hdr" >&5
12993 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12994   echo $ac_n "(cached) $ac_c" 1>&6
12995 else
12996   cat > conftest.$ac_ext <<EOF
12997 #line 12998 "configure"
12998 #include "confdefs.h"
12999 #include <$ac_hdr>
13000 EOF
13001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13002 { (eval echo configure:13003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13004 if test -z "$ac_err"; then
13005   rm -rf conftest*
13006   eval "ac_cv_header_$ac_safe=yes"
13007 else
13008   echo "$ac_err" >&5
13009   echo "configure: failed program was:" >&5
13010   cat conftest.$ac_ext >&5
13011   rm -rf conftest*
13012   eval "ac_cv_header_$ac_safe=no"
13013 fi
13014 rm -f conftest*
13015 fi
13016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13017   echo "$ac_t""yes" 1>&6
13018     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13019   cat >> confdefs.h <<EOF
13020 #define $ac_tr_hdr 1
13021 EOF
13022  
13023 else
13024   echo "$ac_t""no" 1>&6
13025 fi
13026 done
13027
13028  echo $ac_n "checking for db""... $ac_c" 1>&6
13029 echo "configure:13030: checking for db" >&5
13030 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13031   echo $ac_n "(cached) $ac_c" 1>&6
13032 else
13033   
13034         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13035                 ol_cv_ndbm=no
13036         else
13037                 ol_cv_ndbm=yes
13038         fi
13039
13040 fi
13041
13042 echo "$ac_t""$ol_cv_ndbm" 1>&6
13043  if test $ol_cv_ndbm = yes ; then
13044         cat >> confdefs.h <<\EOF
13045 #define HAVE_NDBM 1
13046 EOF
13047
13048  fi
13049
13050
13051         if test $ol_cv_ndbm = yes ; then
13052                 ol_link_ldbm=ndbm
13053                 ol_with_ldbm_api=ndbm
13054
13055                 if test $ol_cv_lib_ndbm != yes ; then
13056                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13057                 fi
13058         fi
13059 fi
13060
13061 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13062         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13063         if test $ol_enable_ldbm = yes ; then
13064                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13065         fi
13066
13067         echo "configure: warning: disabling LDBM" 1>&2
13068         ol_enable_ldbm=no
13069 fi
13070
13071 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13072         LINK_BINS_DYNAMIC="yes"
13073 else
13074         LINK_BINS_DYNAMIC="no"
13075 fi
13076
13077 if test $ol_enable_wrappers != no ; then
13078         for ac_hdr in tcpd.h
13079 do
13080 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13081 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13082 echo "configure:13083: checking for $ac_hdr" >&5
13083 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13084   echo $ac_n "(cached) $ac_c" 1>&6
13085 else
13086   cat > conftest.$ac_ext <<EOF
13087 #line 13088 "configure"
13088 #include "confdefs.h"
13089 #include <$ac_hdr>
13090 EOF
13091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13092 { (eval echo configure:13093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13094 if test -z "$ac_err"; then
13095   rm -rf conftest*
13096   eval "ac_cv_header_$ac_safe=yes"
13097 else
13098   echo "$ac_err" >&5
13099   echo "configure: failed program was:" >&5
13100   cat conftest.$ac_ext >&5
13101   rm -rf conftest*
13102   eval "ac_cv_header_$ac_safe=no"
13103 fi
13104 rm -f conftest*
13105 fi
13106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13107   echo "$ac_t""yes" 1>&6
13108     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13109   cat >> confdefs.h <<EOF
13110 #define $ac_tr_hdr 1
13111 EOF
13112  
13113 else
13114   echo "$ac_t""no" 1>&6
13115 fi
13116 done
13117
13118
13119         if test $ac_cv_header_tcpd_h != yes ; then
13120                 have_wrappers=no
13121         else
13122                 cat > conftest.$ac_ext <<EOF
13123 #line 13124 "configure"
13124 #include "confdefs.h"
13125
13126 int allow_severity = 0;
13127 int deny_severity  = 0;
13128                 
13129 int main() {
13130 hosts_access()
13131 ; return 0; }
13132 EOF
13133 if { (eval echo configure:13134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13134   rm -rf conftest*
13135   have_wrappers=yes
13136 else
13137   echo "configure: failed program was:" >&5
13138   cat conftest.$ac_ext >&5
13139   rm -rf conftest*
13140   have_wrappers=no
13141 fi
13142 rm -f conftest*
13143         fi
13144
13145         if test $have_wrappers = yes ; then
13146                 cat >> confdefs.h <<\EOF
13147 #define HAVE_TCPD 1
13148 EOF
13149
13150                 WRAP_LIBS="-lwrap"
13151
13152                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13153 echo "configure:13154: checking for main in -lnsl" >&5
13154 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13156   echo $ac_n "(cached) $ac_c" 1>&6
13157 else
13158   ac_save_LIBS="$LIBS"
13159 LIBS="-lnsl  $LIBS"
13160 cat > conftest.$ac_ext <<EOF
13161 #line 13162 "configure"
13162 #include "confdefs.h"
13163
13164 int main() {
13165 main()
13166 ; return 0; }
13167 EOF
13168 if { (eval echo configure:13169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13169   rm -rf conftest*
13170   eval "ac_cv_lib_$ac_lib_var=yes"
13171 else
13172   echo "configure: failed program was:" >&5
13173   cat conftest.$ac_ext >&5
13174   rm -rf conftest*
13175   eval "ac_cv_lib_$ac_lib_var=no"
13176 fi
13177 rm -f conftest*
13178 LIBS="$ac_save_LIBS"
13179
13180 fi
13181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13182   echo "$ac_t""yes" 1>&6
13183     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13184     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13185   cat >> confdefs.h <<EOF
13186 #define $ac_tr_lib 1
13187 EOF
13188
13189   LIBS="-lnsl $LIBS"
13190
13191 else
13192   echo "$ac_t""no" 1>&6
13193 fi
13194
13195         else
13196                 echo "configure: warning: could not find -lwrap" 1>&2
13197                 if test $ol_enable_wrappers = yes ; then
13198                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13199                 fi
13200
13201                 echo "configure: warning: disabling wrappers support" 1>&2
13202                 ol_enable_wrappers=no
13203                 WRAP_LIBS=""
13204         fi
13205 fi
13206
13207 if test $ol_enable_syslog != no ; then
13208         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13209 echo "configure:13210: checking for openlog" >&5
13210 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13211   echo $ac_n "(cached) $ac_c" 1>&6
13212 else
13213   cat > conftest.$ac_ext <<EOF
13214 #line 13215 "configure"
13215 #include "confdefs.h"
13216 /* System header to define __stub macros and hopefully few prototypes,
13217     which can conflict with char openlog(); below.  */
13218 #include <assert.h>
13219 /* Override any gcc2 internal prototype to avoid an error.  */
13220 /* We use char because int might match the return type of a gcc2
13221     builtin and then its argument prototype would still apply.  */
13222 char openlog();
13223 char (*f)();
13224
13225 int main() {
13226
13227 /* The GNU C library defines this for functions which it implements
13228     to always fail with ENOSYS.  Some functions are actually named
13229     something starting with __ and the normal name is an alias.  */
13230 #if defined (__stub_openlog) || defined (__stub___openlog)
13231 choke me
13232 #else
13233 f = openlog;
13234 #endif
13235
13236 ; return 0; }
13237 EOF
13238 if { (eval echo configure:13239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13239   rm -rf conftest*
13240   eval "ac_cv_func_openlog=yes"
13241 else
13242   echo "configure: failed program was:" >&5
13243   cat conftest.$ac_ext >&5
13244   rm -rf conftest*
13245   eval "ac_cv_func_openlog=no"
13246 fi
13247 rm -f conftest*
13248 fi
13249
13250 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13251   echo "$ac_t""yes" 1>&6
13252   :
13253 else
13254   echo "$ac_t""no" 1>&6
13255 fi
13256
13257         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13258                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13259         fi
13260         ol_enable_syslog=$ac_cv_func_openlog
13261 fi
13262
13263
13264 ol_link_sql=no
13265 if test $ol_enable_sql != no ; then
13266         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13267 echo "configure:13268: checking for SQLDriverConnect in -liodbc" >&5
13268 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13269 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13270   echo $ac_n "(cached) $ac_c" 1>&6
13271 else
13272   ac_save_LIBS="$LIBS"
13273 LIBS="-liodbc  $LIBS"
13274 cat > conftest.$ac_ext <<EOF
13275 #line 13276 "configure"
13276 #include "confdefs.h"
13277 /* Override any gcc2 internal prototype to avoid an error.  */
13278 /* We use char because int might match the return type of a gcc2
13279     builtin and then its argument prototype would still apply.  */
13280 char SQLDriverConnect();
13281
13282 int main() {
13283 SQLDriverConnect()
13284 ; return 0; }
13285 EOF
13286 if { (eval echo configure:13287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13287   rm -rf conftest*
13288   eval "ac_cv_lib_$ac_lib_var=yes"
13289 else
13290   echo "configure: failed program was:" >&5
13291   cat conftest.$ac_ext >&5
13292   rm -rf conftest*
13293   eval "ac_cv_lib_$ac_lib_var=no"
13294 fi
13295 rm -f conftest*
13296 LIBS="$ac_save_LIBS"
13297
13298 fi
13299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13300   echo "$ac_t""yes" 1>&6
13301   have_iodbc=yes
13302 else
13303   echo "$ac_t""no" 1>&6
13304 have_iodbc=no
13305 fi
13306
13307         if test $have_iodbc = yes ; then
13308                 ol_link_sql="-liodbc"
13309         else
13310                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13311 echo "configure:13312: checking for SQLDriverConnect in -lodbc" >&5
13312 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13313 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13314   echo $ac_n "(cached) $ac_c" 1>&6
13315 else
13316   ac_save_LIBS="$LIBS"
13317 LIBS="-lodbc  $LIBS"
13318 cat > conftest.$ac_ext <<EOF
13319 #line 13320 "configure"
13320 #include "confdefs.h"
13321 /* Override any gcc2 internal prototype to avoid an error.  */
13322 /* We use char because int might match the return type of a gcc2
13323     builtin and then its argument prototype would still apply.  */
13324 char SQLDriverConnect();
13325
13326 int main() {
13327 SQLDriverConnect()
13328 ; return 0; }
13329 EOF
13330 if { (eval echo configure:13331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13331   rm -rf conftest*
13332   eval "ac_cv_lib_$ac_lib_var=yes"
13333 else
13334   echo "configure: failed program was:" >&5
13335   cat conftest.$ac_ext >&5
13336   rm -rf conftest*
13337   eval "ac_cv_lib_$ac_lib_var=no"
13338 fi
13339 rm -f conftest*
13340 LIBS="$ac_save_LIBS"
13341
13342 fi
13343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13344   echo "$ac_t""yes" 1>&6
13345   have_odbc=yes
13346 else
13347   echo "$ac_t""no" 1>&6
13348 have_odbc=no
13349 fi
13350
13351                 if test $have_odbc = yes ; then
13352                         ol_link_sql="-lodbc"
13353                 fi
13354         fi
13355
13356         if test $ol_link_sql != no ; then
13357                 SLAPD_SQL_LIBS="$ol_link_sql"
13358
13359         elif test $ol_enable_sql != auto ; then
13360                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13361         fi
13362 fi
13363
13364 if test $ol_enable_tcl != no ; then
13365         for ac_hdr in tcl.h
13366 do
13367 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13368 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13369 echo "configure:13370: checking for $ac_hdr" >&5
13370 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13371   echo $ac_n "(cached) $ac_c" 1>&6
13372 else
13373   cat > conftest.$ac_ext <<EOF
13374 #line 13375 "configure"
13375 #include "confdefs.h"
13376 #include <$ac_hdr>
13377 EOF
13378 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13379 { (eval echo configure:13380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13380 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13381 if test -z "$ac_err"; then
13382   rm -rf conftest*
13383   eval "ac_cv_header_$ac_safe=yes"
13384 else
13385   echo "$ac_err" >&5
13386   echo "configure: failed program was:" >&5
13387   cat conftest.$ac_ext >&5
13388   rm -rf conftest*
13389   eval "ac_cv_header_$ac_safe=no"
13390 fi
13391 rm -f conftest*
13392 fi
13393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13394   echo "$ac_t""yes" 1>&6
13395     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13396   cat >> confdefs.h <<EOF
13397 #define $ac_tr_hdr 1
13398 EOF
13399  
13400 else
13401   echo "$ac_t""no" 1>&6
13402 fi
13403 done
13404
13405
13406         if test $ac_cv_header_tcl_h != yes ; then
13407                 have_tcl=no
13408         else
13409                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13410                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13411 echo "configure:13412: checking for main in -l$lib" >&5
13412 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13413 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13414   echo $ac_n "(cached) $ac_c" 1>&6
13415 else
13416   ac_save_LIBS="$LIBS"
13417 LIBS="-l$lib  $LIBS"
13418 cat > conftest.$ac_ext <<EOF
13419 #line 13420 "configure"
13420 #include "confdefs.h"
13421
13422 int main() {
13423 main()
13424 ; return 0; }
13425 EOF
13426 if { (eval echo configure:13427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13427   rm -rf conftest*
13428   eval "ac_cv_lib_$ac_lib_var=yes"
13429 else
13430   echo "configure: failed program was:" >&5
13431   cat conftest.$ac_ext >&5
13432   rm -rf conftest*
13433   eval "ac_cv_lib_$ac_lib_var=no"
13434 fi
13435 rm -f conftest*
13436 LIBS="$ac_save_LIBS"
13437
13438 fi
13439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13440   echo "$ac_t""yes" 1>&6
13441   have_tcl=yes
13442                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13443                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13444                            else
13445                                MOD_TCL_LIB="-l${lib}"
13446                            fi;break
13447 else
13448   echo "$ac_t""no" 1>&6
13449 have_tcl=no
13450 fi
13451
13452                 done
13453         fi
13454
13455         if test $have_tcl != yes ; then
13456                 echo "configure: warning: could not find -ltcl" 1>&2
13457                 if test $ol_enable_tcl = yes ; then
13458                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13459                 fi
13460
13461                 ol_enable_tcl=no
13462         fi
13463 fi
13464
13465 ol_link_termcap=no
13466 for ac_hdr in termcap.h ncurses.h
13467 do
13468 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13469 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13470 echo "configure:13471: checking for $ac_hdr" >&5
13471 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13472   echo $ac_n "(cached) $ac_c" 1>&6
13473 else
13474   cat > conftest.$ac_ext <<EOF
13475 #line 13476 "configure"
13476 #include "confdefs.h"
13477 #include <$ac_hdr>
13478 EOF
13479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13480 { (eval echo configure:13481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13482 if test -z "$ac_err"; then
13483   rm -rf conftest*
13484   eval "ac_cv_header_$ac_safe=yes"
13485 else
13486   echo "$ac_err" >&5
13487   echo "configure: failed program was:" >&5
13488   cat conftest.$ac_ext >&5
13489   rm -rf conftest*
13490   eval "ac_cv_header_$ac_safe=no"
13491 fi
13492 rm -f conftest*
13493 fi
13494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13495   echo "$ac_t""yes" 1>&6
13496     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13497   cat >> confdefs.h <<EOF
13498 #define $ac_tr_hdr 1
13499 EOF
13500  
13501 else
13502   echo "$ac_t""no" 1>&6
13503 fi
13504 done
13505
13506
13507 if test $ol_link_termcap = no ; then
13508         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13509 echo "configure:13510: checking for tputs in -ltermcap" >&5
13510 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13511 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13512   echo $ac_n "(cached) $ac_c" 1>&6
13513 else
13514   ac_save_LIBS="$LIBS"
13515 LIBS="-ltermcap  $LIBS"
13516 cat > conftest.$ac_ext <<EOF
13517 #line 13518 "configure"
13518 #include "confdefs.h"
13519 /* Override any gcc2 internal prototype to avoid an error.  */
13520 /* We use char because int might match the return type of a gcc2
13521     builtin and then its argument prototype would still apply.  */
13522 char tputs();
13523
13524 int main() {
13525 tputs()
13526 ; return 0; }
13527 EOF
13528 if { (eval echo configure:13529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13529   rm -rf conftest*
13530   eval "ac_cv_lib_$ac_lib_var=yes"
13531 else
13532   echo "configure: failed program was:" >&5
13533   cat conftest.$ac_ext >&5
13534   rm -rf conftest*
13535   eval "ac_cv_lib_$ac_lib_var=no"
13536 fi
13537 rm -f conftest*
13538 LIBS="$ac_save_LIBS"
13539
13540 fi
13541 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13542   echo "$ac_t""yes" 1>&6
13543   have_termcap=yes
13544 else
13545   echo "$ac_t""no" 1>&6
13546 have_termcap=no
13547 fi
13548
13549         if test $have_termcap = yes ; then
13550                 cat >> confdefs.h <<\EOF
13551 #define HAVE_TERMCAP 1
13552 EOF
13553
13554                 ol_link_termcap=yes
13555                 TERMCAP_LIBS=-ltermcap
13556         fi
13557 fi
13558
13559 if test $ol_link_termcap = no ; then
13560         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13561 echo "configure:13562: checking for initscr in -lncurses" >&5
13562 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13563 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13564   echo $ac_n "(cached) $ac_c" 1>&6
13565 else
13566   ac_save_LIBS="$LIBS"
13567 LIBS="-lncurses  $LIBS"
13568 cat > conftest.$ac_ext <<EOF
13569 #line 13570 "configure"
13570 #include "confdefs.h"
13571 /* Override any gcc2 internal prototype to avoid an error.  */
13572 /* We use char because int might match the return type of a gcc2
13573     builtin and then its argument prototype would still apply.  */
13574 char initscr();
13575
13576 int main() {
13577 initscr()
13578 ; return 0; }
13579 EOF
13580 if { (eval echo configure:13581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13581   rm -rf conftest*
13582   eval "ac_cv_lib_$ac_lib_var=yes"
13583 else
13584   echo "configure: failed program was:" >&5
13585   cat conftest.$ac_ext >&5
13586   rm -rf conftest*
13587   eval "ac_cv_lib_$ac_lib_var=no"
13588 fi
13589 rm -f conftest*
13590 LIBS="$ac_save_LIBS"
13591
13592 fi
13593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13594   echo "$ac_t""yes" 1>&6
13595   have_ncurses=yes
13596 else
13597   echo "$ac_t""no" 1>&6
13598 have_ncurses=no
13599 fi
13600
13601         if test $have_ncurses = yes ; then
13602                 cat >> confdefs.h <<\EOF
13603 #define HAVE_NCURSES 1
13604 EOF
13605
13606                 ol_link_termcap=yes
13607                 TERMCAP_LIBS=-lncurses
13608         fi
13609 fi
13610
13611 if test $ol_link_termcap = no ; then
13612         cat >> confdefs.h <<\EOF
13613 #define NO_TERMCAP 1
13614 EOF
13615
13616         TERMCAP_LIBS=
13617 fi
13618
13619 ol_link_sasl=no
13620 ol_link_spasswd=no
13621 if test $ol_with_cyrus_sasl != no ; then
13622         for ac_hdr in sasl.h
13623 do
13624 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13625 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13626 echo "configure:13627: checking for $ac_hdr" >&5
13627 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13628   echo $ac_n "(cached) $ac_c" 1>&6
13629 else
13630   cat > conftest.$ac_ext <<EOF
13631 #line 13632 "configure"
13632 #include "confdefs.h"
13633 #include <$ac_hdr>
13634 EOF
13635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13636 { (eval echo configure:13637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13638 if test -z "$ac_err"; then
13639   rm -rf conftest*
13640   eval "ac_cv_header_$ac_safe=yes"
13641 else
13642   echo "$ac_err" >&5
13643   echo "configure: failed program was:" >&5
13644   cat conftest.$ac_ext >&5
13645   rm -rf conftest*
13646   eval "ac_cv_header_$ac_safe=no"
13647 fi
13648 rm -f conftest*
13649 fi
13650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13651   echo "$ac_t""yes" 1>&6
13652     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13653   cat >> confdefs.h <<EOF
13654 #define $ac_tr_hdr 1
13655 EOF
13656  
13657 else
13658   echo "$ac_t""no" 1>&6
13659 fi
13660 done
13661
13662
13663         if test $ac_cv_header_sasl_h = yes ; then
13664                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13665 echo "configure:13666: checking for sasl_client_init in -lsasl" >&5
13666 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13667 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13668   echo $ac_n "(cached) $ac_c" 1>&6
13669 else
13670   ac_save_LIBS="$LIBS"
13671 LIBS="-lsasl  $LIBS"
13672 cat > conftest.$ac_ext <<EOF
13673 #line 13674 "configure"
13674 #include "confdefs.h"
13675 /* Override any gcc2 internal prototype to avoid an error.  */
13676 /* We use char because int might match the return type of a gcc2
13677     builtin and then its argument prototype would still apply.  */
13678 char sasl_client_init();
13679
13680 int main() {
13681 sasl_client_init()
13682 ; return 0; }
13683 EOF
13684 if { (eval echo configure:13685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13685   rm -rf conftest*
13686   eval "ac_cv_lib_$ac_lib_var=yes"
13687 else
13688   echo "configure: failed program was:" >&5
13689   cat conftest.$ac_ext >&5
13690   rm -rf conftest*
13691   eval "ac_cv_lib_$ac_lib_var=no"
13692 fi
13693 rm -f conftest*
13694 LIBS="$ac_save_LIBS"
13695
13696 fi
13697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13698   echo "$ac_t""yes" 1>&6
13699   have_cyrus_sasl=yes
13700 else
13701   echo "$ac_t""no" 1>&6
13702 have_cyrus_sasl=no
13703 fi
13704
13705
13706                 if test $have_cyrus_sasl != no ; then
13707                         SASL_LIBS="-lsasl"
13708                         cat >> confdefs.h <<\EOF
13709 #define HAVE_CYRUS_SASL 1
13710 EOF
13711
13712                         ol_link_sasl=yes
13713                 fi
13714         fi
13715
13716         if test $ol_link_sasl = no ; then
13717                 if test $ol_with_cyrus_sasl != auto ; then
13718                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13719                 else
13720                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13721                         echo "configure: warning: SASL authentication not supported!" 1>&2
13722                         if test $ol_link_tls = no ; then
13723                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13724                         fi
13725                 fi
13726
13727         elif test $ol_enable_spasswd != no ; then
13728                 ol_link_spasswd=yes
13729         fi
13730
13731 else
13732         echo "configure: warning: SASL authentication not supported!" 1>&2
13733         if test $ol_link_tls = no ; then
13734                 echo "configure: warning: Strong authentication not supported!" 1>&2
13735         fi
13736 fi
13737
13738 if test $cross_compiling != yes ; then
13739         dev=no
13740         if test -r /dev/urandom ; then
13741                 dev="/dev/urandom";
13742         elif test -r /idev/urandom ; then
13743                 dev="/idev/urandom";
13744         elif test -r /dev/srandom ; then
13745                 dev="/dev/srandom";
13746         elif test -r /dev/random ; then
13747                 dev="/dev/random";
13748         elif test -r /idev/random ; then
13749                 dev="/idev/random";
13750         fi
13751
13752         if test $dev != no ; then
13753                 cat >> confdefs.h <<EOF
13754 #define URANDOM_DEVICE "$dev"
13755 EOF
13756
13757         fi
13758 fi
13759
13760 ol_link_fetch=no
13761 if test $ol_with_fetch != no ; then
13762         ol_LIBS=$LIBS
13763 LIBS="-lfetch -lcom_err $LIBS"
13764 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13765 echo "configure:13766: checking fetch(3) library" >&5
13766 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13767   echo $ac_n "(cached) $ac_c" 1>&6
13768 else
13769   
13770         cat > conftest.$ac_ext <<EOF
13771 #line 13772 "configure"
13772 #include "confdefs.h"
13773
13774 #include <sys/param.h>
13775 #include <stdio.h>
13776 #include <fetch.h>
13777 int main() {
13778 struct url *u = fetchParseURL("file:///"); 
13779 ; return 0; }
13780 EOF
13781 if { (eval echo configure:13782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13782   rm -rf conftest*
13783   ol_cv_lib_fetch=yes
13784 else
13785   echo "configure: failed program was:" >&5
13786   cat conftest.$ac_ext >&5
13787   rm -rf conftest*
13788   ol_cv_lib_fetch=no
13789 fi
13790 rm -f conftest*
13791 fi
13792
13793 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13794 LIBS=$ol_LIBS
13795 if test $ol_cv_lib_fetch != no ; then
13796         ol_link_fetch="-lfetch -lcom_err"
13797         cat >> confdefs.h <<\EOF
13798 #define HAVE_FETCH 1
13799 EOF
13800
13801 fi
13802
13803
13804         if test $ol_cv_lib_fetch != no ; then
13805                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13806                 ol_link_fetch=freebsd
13807
13808         elif test $ol_with_fetch != auto ; then
13809                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13810         fi 
13811 fi
13812
13813 ol_link_readline=no
13814 if test $ol_with_readline != no ; then
13815         for ac_hdr in readline/readline.h readline/history.h
13816 do
13817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13819 echo "configure:13820: checking for $ac_hdr" >&5
13820 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13821   echo $ac_n "(cached) $ac_c" 1>&6
13822 else
13823   cat > conftest.$ac_ext <<EOF
13824 #line 13825 "configure"
13825 #include "confdefs.h"
13826 #include <$ac_hdr>
13827 EOF
13828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13829 { (eval echo configure:13830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13831 if test -z "$ac_err"; then
13832   rm -rf conftest*
13833   eval "ac_cv_header_$ac_safe=yes"
13834 else
13835   echo "$ac_err" >&5
13836   echo "configure: failed program was:" >&5
13837   cat conftest.$ac_ext >&5
13838   rm -rf conftest*
13839   eval "ac_cv_header_$ac_safe=no"
13840 fi
13841 rm -f conftest*
13842 fi
13843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13844   echo "$ac_t""yes" 1>&6
13845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13846   cat >> confdefs.h <<EOF
13847 #define $ac_tr_hdr 1
13848 EOF
13849  
13850 else
13851   echo "$ac_t""no" 1>&6
13852 fi
13853 done
13854
13855
13856         if test $ac_cv_header_readline_readline_h = yes ; then
13857                 save_LIBS="$LIBS"
13858                 LIBS="$TERMCAP_LIBS $LIBS"
13859                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13860 echo "configure:13861: checking for readline in -lreadline" >&5
13861 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13862 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13863   echo $ac_n "(cached) $ac_c" 1>&6
13864 else
13865   ac_save_LIBS="$LIBS"
13866 LIBS="-lreadline  $LIBS"
13867 cat > conftest.$ac_ext <<EOF
13868 #line 13869 "configure"
13869 #include "confdefs.h"
13870 /* Override any gcc2 internal prototype to avoid an error.  */
13871 /* We use char because int might match the return type of a gcc2
13872     builtin and then its argument prototype would still apply.  */
13873 char readline();
13874
13875 int main() {
13876 readline()
13877 ; return 0; }
13878 EOF
13879 if { (eval echo configure:13880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13880   rm -rf conftest*
13881   eval "ac_cv_lib_$ac_lib_var=yes"
13882 else
13883   echo "configure: failed program was:" >&5
13884   cat conftest.$ac_ext >&5
13885   rm -rf conftest*
13886   eval "ac_cv_lib_$ac_lib_var=no"
13887 fi
13888 rm -f conftest*
13889 LIBS="$ac_save_LIBS"
13890
13891 fi
13892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13893   echo "$ac_t""yes" 1>&6
13894   have_readline=yes
13895 else
13896   echo "$ac_t""no" 1>&6
13897 have_readline=no
13898 fi
13899
13900                 LIBS="$save_LIBS"
13901                         
13902                 if test $have_readline = yes ; then
13903                         ol_with_readline=found
13904                         ol_link_readline=yes
13905
13906                         READLINE_LIBS="-lreadline"
13907                 fi
13908         fi
13909 fi
13910
13911 if test $ol_link_readline = yes ; then
13912         cat >> confdefs.h <<\EOF
13913 #define HAVE_READLINE 1
13914 EOF
13915
13916 fi
13917
13918
13919 if test $ol_enable_crypt != no ; then
13920         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13921 echo "configure:13922: checking for crypt" >&5
13922 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13923   echo $ac_n "(cached) $ac_c" 1>&6
13924 else
13925   cat > conftest.$ac_ext <<EOF
13926 #line 13927 "configure"
13927 #include "confdefs.h"
13928 /* System header to define __stub macros and hopefully few prototypes,
13929     which can conflict with char crypt(); below.  */
13930 #include <assert.h>
13931 /* Override any gcc2 internal prototype to avoid an error.  */
13932 /* We use char because int might match the return type of a gcc2
13933     builtin and then its argument prototype would still apply.  */
13934 char crypt();
13935 char (*f)();
13936
13937 int main() {
13938
13939 /* The GNU C library defines this for functions which it implements
13940     to always fail with ENOSYS.  Some functions are actually named
13941     something starting with __ and the normal name is an alias.  */
13942 #if defined (__stub_crypt) || defined (__stub___crypt)
13943 choke me
13944 #else
13945 f = crypt;
13946 #endif
13947
13948 ; return 0; }
13949 EOF
13950 if { (eval echo configure:13951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13951   rm -rf conftest*
13952   eval "ac_cv_func_crypt=yes"
13953 else
13954   echo "configure: failed program was:" >&5
13955   cat conftest.$ac_ext >&5
13956   rm -rf conftest*
13957   eval "ac_cv_func_crypt=no"
13958 fi
13959 rm -f conftest*
13960 fi
13961
13962 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13963   echo "$ac_t""yes" 1>&6
13964   have_crypt=yes
13965 else
13966   echo "$ac_t""no" 1>&6
13967
13968                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13969 echo "configure:13970: checking for crypt in -lcrypt" >&5
13970 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13971 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13972   echo $ac_n "(cached) $ac_c" 1>&6
13973 else
13974   ac_save_LIBS="$LIBS"
13975 LIBS="-lcrypt  $LIBS"
13976 cat > conftest.$ac_ext <<EOF
13977 #line 13978 "configure"
13978 #include "confdefs.h"
13979 /* Override any gcc2 internal prototype to avoid an error.  */
13980 /* We use char because int might match the return type of a gcc2
13981     builtin and then its argument prototype would still apply.  */
13982 char crypt();
13983
13984 int main() {
13985 crypt()
13986 ; return 0; }
13987 EOF
13988 if { (eval echo configure:13989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13989   rm -rf conftest*
13990   eval "ac_cv_lib_$ac_lib_var=yes"
13991 else
13992   echo "configure: failed program was:" >&5
13993   cat conftest.$ac_ext >&5
13994   rm -rf conftest*
13995   eval "ac_cv_lib_$ac_lib_var=no"
13996 fi
13997 rm -f conftest*
13998 LIBS="$ac_save_LIBS"
13999
14000 fi
14001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14002   echo "$ac_t""yes" 1>&6
14003   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
14004                         have_crypt=yes
14005 else
14006   echo "$ac_t""no" 1>&6
14007 have_crypt=no
14008 fi
14009
14010 fi
14011
14012
14013         if test $have_crypt = yes ; then
14014                 cat >> confdefs.h <<\EOF
14015 #define HAVE_CRYPT 1
14016 EOF
14017
14018         else
14019                 echo "configure: warning: could not find crypt" 1>&2
14020                 if test $ol_enable_crypt = yes ; then
14021                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14022                 fi
14023
14024                 echo "configure: warning: disabling crypt support" 1>&2
14025                 ol_enable_crypt=no
14026         fi
14027 fi
14028
14029 if test $ol_enable_proctitle != no ; then
14030         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14031 echo "configure:14032: checking for setproctitle" >&5
14032 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14033   echo $ac_n "(cached) $ac_c" 1>&6
14034 else
14035   cat > conftest.$ac_ext <<EOF
14036 #line 14037 "configure"
14037 #include "confdefs.h"
14038 /* System header to define __stub macros and hopefully few prototypes,
14039     which can conflict with char setproctitle(); below.  */
14040 #include <assert.h>
14041 /* Override any gcc2 internal prototype to avoid an error.  */
14042 /* We use char because int might match the return type of a gcc2
14043     builtin and then its argument prototype would still apply.  */
14044 char setproctitle();
14045 char (*f)();
14046
14047 int main() {
14048
14049 /* The GNU C library defines this for functions which it implements
14050     to always fail with ENOSYS.  Some functions are actually named
14051     something starting with __ and the normal name is an alias.  */
14052 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14053 choke me
14054 #else
14055 f = setproctitle;
14056 #endif
14057
14058 ; return 0; }
14059 EOF
14060 if { (eval echo configure:14061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14061   rm -rf conftest*
14062   eval "ac_cv_func_setproctitle=yes"
14063 else
14064   echo "configure: failed program was:" >&5
14065   cat conftest.$ac_ext >&5
14066   rm -rf conftest*
14067   eval "ac_cv_func_setproctitle=no"
14068 fi
14069 rm -f conftest*
14070 fi
14071
14072 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14073   echo "$ac_t""yes" 1>&6
14074   have_setproctitle=yes
14075 else
14076   echo "$ac_t""no" 1>&6
14077
14078                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14079 echo "configure:14080: checking for setproctitle in -lutil" >&5
14080 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14081 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14082   echo $ac_n "(cached) $ac_c" 1>&6
14083 else
14084   ac_save_LIBS="$LIBS"
14085 LIBS="-lutil  $LIBS"
14086 cat > conftest.$ac_ext <<EOF
14087 #line 14088 "configure"
14088 #include "confdefs.h"
14089 /* Override any gcc2 internal prototype to avoid an error.  */
14090 /* We use char because int might match the return type of a gcc2
14091     builtin and then its argument prototype would still apply.  */
14092 char setproctitle();
14093
14094 int main() {
14095 setproctitle()
14096 ; return 0; }
14097 EOF
14098 if { (eval echo configure:14099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14099   rm -rf conftest*
14100   eval "ac_cv_lib_$ac_lib_var=yes"
14101 else
14102   echo "configure: failed program was:" >&5
14103   cat conftest.$ac_ext >&5
14104   rm -rf conftest*
14105   eval "ac_cv_lib_$ac_lib_var=no"
14106 fi
14107 rm -f conftest*
14108 LIBS="$ac_save_LIBS"
14109
14110 fi
14111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14112   echo "$ac_t""yes" 1>&6
14113   have_setproctitle=yes
14114                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14115 else
14116   echo "$ac_t""no" 1>&6
14117 have_setproctitle=no
14118                         LIBOBJS="$LIBOBJS setproctitle.o"
14119                         LIBSRCS="$LIBSRCS setproctitle.c"
14120 fi
14121
14122 fi
14123
14124
14125         if test $have_setproctitle = yes ; then
14126                 cat >> confdefs.h <<\EOF
14127 #define HAVE_SETPROCTITLE 1
14128 EOF
14129
14130         fi
14131 fi
14132
14133 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14134 echo "configure:14135: checking for ANSI C header files" >&5
14135 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14136   echo $ac_n "(cached) $ac_c" 1>&6
14137 else
14138   cat > conftest.$ac_ext <<EOF
14139 #line 14140 "configure"
14140 #include "confdefs.h"
14141 #include <stdlib.h>
14142 #include <stdarg.h>
14143 #include <string.h>
14144 #include <float.h>
14145 EOF
14146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14147 { (eval echo configure:14148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14149 if test -z "$ac_err"; then
14150   rm -rf conftest*
14151   ac_cv_header_stdc=yes
14152 else
14153   echo "$ac_err" >&5
14154   echo "configure: failed program was:" >&5
14155   cat conftest.$ac_ext >&5
14156   rm -rf conftest*
14157   ac_cv_header_stdc=no
14158 fi
14159 rm -f conftest*
14160
14161 if test $ac_cv_header_stdc = yes; then
14162   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14163 cat > conftest.$ac_ext <<EOF
14164 #line 14165 "configure"
14165 #include "confdefs.h"
14166 #include <string.h>
14167 EOF
14168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14169   egrep "memchr" >/dev/null 2>&1; then
14170   :
14171 else
14172   rm -rf conftest*
14173   ac_cv_header_stdc=no
14174 fi
14175 rm -f conftest*
14176
14177 fi
14178
14179 if test $ac_cv_header_stdc = yes; then
14180   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14181 cat > conftest.$ac_ext <<EOF
14182 #line 14183 "configure"
14183 #include "confdefs.h"
14184 #include <stdlib.h>
14185 EOF
14186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14187   egrep "free" >/dev/null 2>&1; then
14188   :
14189 else
14190   rm -rf conftest*
14191   ac_cv_header_stdc=no
14192 fi
14193 rm -f conftest*
14194
14195 fi
14196
14197 if test $ac_cv_header_stdc = yes; then
14198   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14199 if test "$cross_compiling" = yes; then
14200   :
14201 else
14202   cat > conftest.$ac_ext <<EOF
14203 #line 14204 "configure"
14204 #include "confdefs.h"
14205 #include <ctype.h>
14206 #if ((' ' & 0x0FF) == 0x020)
14207 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14208 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14209 #else
14210 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14211  || ('j' <= (c) && (c) <= 'r') \
14212  || ('s' <= (c) && (c) <= 'z'))
14213 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14214 #endif
14215 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14216 int main () { int i; for (i = 0; i < 256; i++)
14217 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14218 exit (0); }
14219
14220 EOF
14221 if { (eval echo configure:14222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14222 then
14223   :
14224 else
14225   echo "configure: failed program was:" >&5
14226   cat conftest.$ac_ext >&5
14227   rm -fr conftest*
14228   ac_cv_header_stdc=no
14229 fi
14230 rm -fr conftest*
14231 fi
14232
14233 fi
14234 fi
14235
14236 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14237 if test $ac_cv_header_stdc = yes; then
14238   cat >> confdefs.h <<\EOF
14239 #define STDC_HEADERS 1
14240 EOF
14241
14242 fi
14243
14244 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14245 echo "configure:14246: checking for mode_t" >&5
14246 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14247   echo $ac_n "(cached) $ac_c" 1>&6
14248 else
14249   cat > conftest.$ac_ext <<EOF
14250 #line 14251 "configure"
14251 #include "confdefs.h"
14252 #include <sys/types.h>
14253 #if STDC_HEADERS
14254 #include <stdlib.h>
14255 #include <stddef.h>
14256 #endif
14257
14258 EOF
14259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14260   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14261   rm -rf conftest*
14262   eval "ac_cv_type_mode_t=yes"
14263 else
14264   rm -rf conftest*
14265   eval "ac_cv_type_mode_t=no"
14266 fi
14267 rm -f conftest*
14268
14269 fi
14270 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14271   echo "$ac_t""yes" 1>&6
14272 else
14273   echo "$ac_t""no" 1>&6
14274   cat >> confdefs.h <<EOF
14275 #define mode_t int
14276 EOF
14277
14278 fi
14279
14280 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14281 echo "configure:14282: checking for off_t" >&5
14282 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14283   echo $ac_n "(cached) $ac_c" 1>&6
14284 else
14285   cat > conftest.$ac_ext <<EOF
14286 #line 14287 "configure"
14287 #include "confdefs.h"
14288 #include <sys/types.h>
14289 #if STDC_HEADERS
14290 #include <stdlib.h>
14291 #include <stddef.h>
14292 #endif
14293
14294 EOF
14295 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14296   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14297   rm -rf conftest*
14298   eval "ac_cv_type_off_t=yes"
14299 else
14300   rm -rf conftest*
14301   eval "ac_cv_type_off_t=no"
14302 fi
14303 rm -f conftest*
14304
14305 fi
14306 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14307   echo "$ac_t""yes" 1>&6
14308 else
14309   echo "$ac_t""no" 1>&6
14310   cat >> confdefs.h <<EOF
14311 #define off_t long
14312 EOF
14313
14314 fi
14315
14316 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14317 echo "configure:14318: checking for pid_t" >&5
14318 if eval "test \"\${ac_cv_type_pid_t+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 #if STDC_HEADERS
14326 #include <stdlib.h>
14327 #include <stddef.h>
14328 #endif
14329
14330 EOF
14331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14332   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14333   rm -rf conftest*
14334   eval "ac_cv_type_pid_t=yes"
14335 else
14336   rm -rf conftest*
14337   eval "ac_cv_type_pid_t=no"
14338 fi
14339 rm -f conftest*
14340
14341 fi
14342 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14343   echo "$ac_t""yes" 1>&6
14344 else
14345   echo "$ac_t""no" 1>&6
14346   cat >> confdefs.h <<EOF
14347 #define pid_t int
14348 EOF
14349
14350 fi
14351
14352 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14353 echo "configure:14354: checking for ptrdiff_t" >&5
14354 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14355   echo $ac_n "(cached) $ac_c" 1>&6
14356 else
14357   cat > conftest.$ac_ext <<EOF
14358 #line 14359 "configure"
14359 #include "confdefs.h"
14360 #include <stddef.h>
14361 int main() {
14362 ptrdiff_t p
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   am_cv_type_ptrdiff_t=yes
14368 else
14369   echo "configure: failed program was:" >&5
14370   cat conftest.$ac_ext >&5
14371   rm -rf conftest*
14372   am_cv_type_ptrdiff_t=no
14373 fi
14374 rm -f conftest*
14375 fi
14376
14377 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14378    if test $am_cv_type_ptrdiff_t = yes; then
14379      cat >> confdefs.h <<\EOF
14380 #define HAVE_PTRDIFF_T 1
14381 EOF
14382
14383    fi
14384
14385 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14386 echo "configure:14387: checking return type of signal handlers" >&5
14387 if eval "test \"\${ac_cv_type_signal+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 #include <signal.h>
14395 #ifdef signal
14396 #undef signal
14397 #endif
14398 #ifdef __cplusplus
14399 extern "C" void (*signal (int, void (*)(int)))(int);
14400 #else
14401 void (*signal ()) ();
14402 #endif
14403
14404 int main() {
14405 int i;
14406 ; return 0; }
14407 EOF
14408 if { (eval echo configure:14409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14409   rm -rf conftest*
14410   ac_cv_type_signal=void
14411 else
14412   echo "configure: failed program was:" >&5
14413   cat conftest.$ac_ext >&5
14414   rm -rf conftest*
14415   ac_cv_type_signal=int
14416 fi
14417 rm -f conftest*
14418 fi
14419
14420 echo "$ac_t""$ac_cv_type_signal" 1>&6
14421 cat >> confdefs.h <<EOF
14422 #define RETSIGTYPE $ac_cv_type_signal
14423 EOF
14424
14425
14426 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14427 echo "configure:14428: checking for size_t" >&5
14428 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14429   echo $ac_n "(cached) $ac_c" 1>&6
14430 else
14431   cat > conftest.$ac_ext <<EOF
14432 #line 14433 "configure"
14433 #include "confdefs.h"
14434 #include <sys/types.h>
14435 #if STDC_HEADERS
14436 #include <stdlib.h>
14437 #include <stddef.h>
14438 #endif
14439
14440 EOF
14441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14442   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14443   rm -rf conftest*
14444   eval "ac_cv_type_size_t=yes"
14445 else
14446   rm -rf conftest*
14447   eval "ac_cv_type_size_t=no"
14448 fi
14449 rm -f conftest*
14450
14451 fi
14452 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14453   echo "$ac_t""yes" 1>&6
14454 else
14455   echo "$ac_t""no" 1>&6
14456   cat >> confdefs.h <<EOF
14457 #define size_t unsigned
14458 EOF
14459
14460 fi
14461
14462
14463 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14464 echo "configure:14465: checking for ssize_t" >&5
14465 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14466   echo $ac_n "(cached) $ac_c" 1>&6
14467 else
14468   cat > conftest.$ac_ext <<EOF
14469 #line 14470 "configure"
14470 #include "confdefs.h"
14471 #include <sys/types.h>
14472 #if STDC_HEADERS
14473 #include <stdlib.h>
14474 #include <stddef.h>
14475 #endif
14476
14477 EOF
14478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14479   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14480   rm -rf conftest*
14481   eval "ac_cv_type_ssize_t=yes"
14482 else
14483   rm -rf conftest*
14484   eval "ac_cv_type_ssize_t=no"
14485 fi
14486 rm -f conftest*
14487
14488 fi
14489 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14490   echo "$ac_t""yes" 1>&6
14491 else
14492   echo "$ac_t""no" 1>&6
14493   cat >> confdefs.h <<EOF
14494 #define ssize_t signed int
14495 EOF
14496
14497 fi
14498
14499 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14500 echo "configure:14501: checking for caddr_t" >&5
14501 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14502   echo $ac_n "(cached) $ac_c" 1>&6
14503 else
14504   cat > conftest.$ac_ext <<EOF
14505 #line 14506 "configure"
14506 #include "confdefs.h"
14507 #include <sys/types.h>
14508 #if STDC_HEADERS
14509 #include <stdlib.h>
14510 #include <stddef.h>
14511 #endif
14512
14513 EOF
14514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14515   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14516   rm -rf conftest*
14517   eval "ac_cv_type_caddr_t=yes"
14518 else
14519   rm -rf conftest*
14520   eval "ac_cv_type_caddr_t=no"
14521 fi
14522 rm -f conftest*
14523
14524 fi
14525 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14526   echo "$ac_t""yes" 1>&6
14527 else
14528   echo "$ac_t""no" 1>&6
14529   cat >> confdefs.h <<EOF
14530 #define caddr_t char *
14531 EOF
14532
14533 fi
14534
14535
14536 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14537 echo "configure:14538: checking for socklen_t" >&5
14538 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14539   echo $ac_n "(cached) $ac_c" 1>&6
14540 else
14541   cat > conftest.$ac_ext <<EOF
14542 #line 14543 "configure"
14543 #include "confdefs.h"
14544
14545 #ifdef HAVE_SYS_TYPES_H
14546 #include <sys/types.h>
14547 #endif
14548 #ifdef HAVE_SYS_SOCKET_H
14549 #include <sys/socket.h>
14550 #endif
14551
14552 int main() {
14553 socklen_t len;
14554 ; return 0; }
14555 EOF
14556 if { (eval echo configure:14557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14557   rm -rf conftest*
14558   ol_cv_type_socklen_t=yes
14559 else
14560   echo "configure: failed program was:" >&5
14561   cat conftest.$ac_ext >&5
14562   rm -rf conftest*
14563   ol_cv_type_socklen_t=no
14564 fi
14565 rm -f conftest*
14566 fi
14567
14568 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14569   if test $ol_cv_type_socklen_t = no; then
14570     cat >> confdefs.h <<\EOF
14571 #define socklen_t int
14572 EOF
14573
14574   fi
14575  
14576 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14577 echo "configure:14578: checking for member st_blksize in aggregate type struct stat" >&5
14578 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14579   echo $ac_n "(cached) $ac_c" 1>&6
14580 else
14581   cat > conftest.$ac_ext <<EOF
14582 #line 14583 "configure"
14583 #include "confdefs.h"
14584 #include <sys/types.h>
14585 #include <sys/stat.h>
14586 int main() {
14587 struct stat foo; foo.st_blksize;
14588 ; return 0; }
14589 EOF
14590 if { (eval echo configure:14591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14591   rm -rf conftest*
14592   ac_cv_c_struct_member_st_blksize=yes
14593 else
14594   echo "configure: failed program was:" >&5
14595   cat conftest.$ac_ext >&5
14596   rm -rf conftest*
14597   ac_cv_c_struct_member_st_blksize=no
14598 fi
14599 rm -f conftest*
14600 fi
14601
14602 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14603 st_blksize="$ac_cv_c_struct_member_st_blksize"
14604 if test $ac_cv_c_struct_member_st_blksize = yes; then
14605   cat >> confdefs.h <<\EOF
14606 #define HAVE_ST_BLKSIZE 1
14607 EOF
14608
14609 fi
14610
14611 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14612 echo "configure:14613: checking whether time.h and sys/time.h may both be included" >&5
14613 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14614   echo $ac_n "(cached) $ac_c" 1>&6
14615 else
14616   cat > conftest.$ac_ext <<EOF
14617 #line 14618 "configure"
14618 #include "confdefs.h"
14619 #include <sys/types.h>
14620 #include <sys/time.h>
14621 #include <time.h>
14622 int main() {
14623 struct tm *tp;
14624 ; return 0; }
14625 EOF
14626 if { (eval echo configure:14627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14627   rm -rf conftest*
14628   ac_cv_header_time=yes
14629 else
14630   echo "configure: failed program was:" >&5
14631   cat conftest.$ac_ext >&5
14632   rm -rf conftest*
14633   ac_cv_header_time=no
14634 fi
14635 rm -f conftest*
14636 fi
14637
14638 echo "$ac_t""$ac_cv_header_time" 1>&6
14639 if test $ac_cv_header_time = yes; then
14640   cat >> confdefs.h <<\EOF
14641 #define TIME_WITH_SYS_TIME 1
14642 EOF
14643
14644 fi
14645
14646 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14647 echo "configure:14648: checking whether struct tm is in sys/time.h or time.h" >&5
14648 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14649   echo $ac_n "(cached) $ac_c" 1>&6
14650 else
14651   cat > conftest.$ac_ext <<EOF
14652 #line 14653 "configure"
14653 #include "confdefs.h"
14654 #include <sys/types.h>
14655 #include <time.h>
14656 int main() {
14657 struct tm *tp; tp->tm_sec;
14658 ; return 0; }
14659 EOF
14660 if { (eval echo configure:14661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14661   rm -rf conftest*
14662   ac_cv_struct_tm=time.h
14663 else
14664   echo "configure: failed program was:" >&5
14665   cat conftest.$ac_ext >&5
14666   rm -rf conftest*
14667   ac_cv_struct_tm=sys/time.h
14668 fi
14669 rm -f conftest*
14670 fi
14671
14672 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14673 if test $ac_cv_struct_tm = sys/time.h; then
14674   cat >> confdefs.h <<\EOF
14675 #define TM_IN_SYS_TIME 1
14676 EOF
14677
14678 fi
14679
14680 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14681 echo "configure:14682: checking for uid_t in sys/types.h" >&5
14682 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14683   echo $ac_n "(cached) $ac_c" 1>&6
14684 else
14685   cat > conftest.$ac_ext <<EOF
14686 #line 14687 "configure"
14687 #include "confdefs.h"
14688 #include <sys/types.h>
14689 EOF
14690 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14691   egrep "uid_t" >/dev/null 2>&1; then
14692   rm -rf conftest*
14693   ac_cv_type_uid_t=yes
14694 else
14695   rm -rf conftest*
14696   ac_cv_type_uid_t=no
14697 fi
14698 rm -f conftest*
14699
14700 fi
14701
14702 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14703 if test $ac_cv_type_uid_t = no; then
14704   cat >> confdefs.h <<\EOF
14705 #define uid_t int
14706 EOF
14707
14708   cat >> confdefs.h <<\EOF
14709 #define gid_t int
14710 EOF
14711
14712 fi
14713
14714 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14715 echo "configure:14716: checking for sig_atomic_t" >&5
14716 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14717   echo $ac_n "(cached) $ac_c" 1>&6
14718 else
14719   cat > conftest.$ac_ext <<EOF
14720 #line 14721 "configure"
14721 #include "confdefs.h"
14722 #include <signal.h>
14723 int main() {
14724 sig_atomic_t atomic;
14725 ; return 0; }
14726 EOF
14727 if { (eval echo configure:14728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14728   rm -rf conftest*
14729   ol_cv_type_sig_atomic_t=yes
14730 else
14731   echo "configure: failed program was:" >&5
14732   cat conftest.$ac_ext >&5
14733   rm -rf conftest*
14734   ol_cv_type_sig_atomic_t=no
14735 fi
14736 rm -f conftest*
14737 fi
14738
14739 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14740   if test $ol_cv_type_sig_atomic_t = no; then
14741     cat >> confdefs.h <<\EOF
14742 #define sig_atomic_t int
14743 EOF
14744
14745   fi
14746  
14747
14748
14749 # test for pw_gecos in struct passwd
14750 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14751 echo "configure:14752: checking struct passwd for pw_gecos" >&5
14752 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14753   echo $ac_n "(cached) $ac_c" 1>&6
14754 else
14755   
14756         cat > conftest.$ac_ext <<EOF
14757 #line 14758 "configure"
14758 #include "confdefs.h"
14759 #include <pwd.h>
14760 int main() {
14761
14762         struct passwd pwd;
14763         pwd.pw_gecos = pwd.pw_name;
14764
14765 ; return 0; }
14766 EOF
14767 if { (eval echo configure:14768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14768   rm -rf conftest*
14769   ol_cv_struct_passwd_pw_gecos=yes
14770 else
14771   echo "configure: failed program was:" >&5
14772   cat conftest.$ac_ext >&5
14773   rm -rf conftest*
14774   ol_cv_struct_passwd_pw_gecos=no
14775 fi
14776 rm -f conftest*
14777 fi
14778
14779 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14780 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14781         cat >> confdefs.h <<\EOF
14782 #define HAVE_PW_GECOS 1
14783 EOF
14784
14785 fi
14786
14787 # test for pw_passwd in struct passwd
14788 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14789 echo "configure:14790: checking struct passwd for pw_passwd" >&5
14790 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14791   echo $ac_n "(cached) $ac_c" 1>&6
14792 else
14793   
14794         cat > conftest.$ac_ext <<EOF
14795 #line 14796 "configure"
14796 #include "confdefs.h"
14797 #include <pwd.h>
14798 int main() {
14799
14800         struct passwd pwd;
14801         pwd.pw_passwd = pwd.pw_name;
14802
14803 ; return 0; }
14804 EOF
14805 if { (eval echo configure:14806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14806   rm -rf conftest*
14807   ol_cv_struct_passwd_pw_passwd=yes
14808 else
14809   echo "configure: failed program was:" >&5
14810   cat conftest.$ac_ext >&5
14811   rm -rf conftest*
14812   ol_cv_struct_passwd_pw_passwd=no
14813 fi
14814 rm -f conftest*
14815 fi
14816
14817 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14818 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14819         cat >> confdefs.h <<\EOF
14820 #define HAVE_PW_PASSWD 1
14821 EOF
14822
14823 fi
14824
14825
14826 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14827 echo "configure:14828: checking if toupper() requires islower()" >&5
14828 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14829   echo $ac_n "(cached) $ac_c" 1>&6
14830 else
14831   
14832         if test "$cross_compiling" = yes; then
14833   ol_cv_c_upper_lower=safe
14834 else
14835   cat > conftest.$ac_ext <<EOF
14836 #line 14837 "configure"
14837 #include "confdefs.h"
14838
14839 #include <ctype.h>
14840 main()
14841 {
14842         if ('C' == toupper('C'))
14843                 exit(0);
14844         else
14845                 exit(1);
14846 }
14847 EOF
14848 if { (eval echo configure:14849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14849 then
14850   ol_cv_c_upper_lower=no
14851 else
14852   echo "configure: failed program was:" >&5
14853   cat conftest.$ac_ext >&5
14854   rm -fr conftest*
14855   ol_cv_c_upper_lower=yes
14856 fi
14857 rm -fr conftest*
14858 fi
14859
14860 fi
14861
14862 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14863 if test $ol_cv_c_upper_lower != no ; then
14864         cat >> confdefs.h <<\EOF
14865 #define C_UPPER_LOWER 1
14866 EOF
14867
14868 fi
14869
14870 echo $ac_n "checking for working const""... $ac_c" 1>&6
14871 echo "configure:14872: checking for working const" >&5
14872 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14873   echo $ac_n "(cached) $ac_c" 1>&6
14874 else
14875   cat > conftest.$ac_ext <<EOF
14876 #line 14877 "configure"
14877 #include "confdefs.h"
14878
14879 int main() {
14880
14881 /* Ultrix mips cc rejects this.  */
14882 typedef int charset[2]; const charset x;
14883 /* SunOS 4.1.1 cc rejects this.  */
14884 char const *const *ccp;
14885 char **p;
14886 /* NEC SVR4.0.2 mips cc rejects this.  */
14887 struct point {int x, y;};
14888 static struct point const zero = {0,0};
14889 /* AIX XL C 1.02.0.0 rejects this.
14890    It does not let you subtract one const X* pointer from another in an arm
14891    of an if-expression whose if-part is not a constant expression */
14892 const char *g = "string";
14893 ccp = &g + (g ? g-g : 0);
14894 /* HPUX 7.0 cc rejects these. */
14895 ++ccp;
14896 p = (char**) ccp;
14897 ccp = (char const *const *) p;
14898 { /* SCO 3.2v4 cc rejects this.  */
14899   char *t;
14900   char const *s = 0 ? (char *) 0 : (char const *) 0;
14901
14902   *t++ = 0;
14903 }
14904 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14905   int x[] = {25, 17};
14906   const int *foo = &x[0];
14907   ++foo;
14908 }
14909 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14910   typedef const int *iptr;
14911   iptr p = 0;
14912   ++p;
14913 }
14914 { /* AIX XL C 1.02.0.0 rejects this saying
14915      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14916   struct s { int j; const int *ap[3]; };
14917   struct s *b; b->j = 5;
14918 }
14919 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14920   const int foo = 10;
14921 }
14922
14923 ; return 0; }
14924 EOF
14925 if { (eval echo configure:14926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14926   rm -rf conftest*
14927   ac_cv_c_const=yes
14928 else
14929   echo "configure: failed program was:" >&5
14930   cat conftest.$ac_ext >&5
14931   rm -rf conftest*
14932   ac_cv_c_const=no
14933 fi
14934 rm -f conftest*
14935 fi
14936
14937 echo "$ac_t""$ac_cv_c_const" 1>&6
14938 if test $ac_cv_c_const = no; then
14939   cat >> confdefs.h <<\EOF
14940 #define const 
14941 EOF
14942
14943 fi
14944
14945 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14946 echo "configure:14947: checking if compiler understands volatile" >&5
14947 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14948   echo $ac_n "(cached) $ac_c" 1>&6
14949 else
14950   cat > conftest.$ac_ext <<EOF
14951 #line 14952 "configure"
14952 #include "confdefs.h"
14953 int x, y, z;
14954 int main() {
14955 volatile int a; int * volatile b = x ? &y : &z;
14956       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14957       *b = 0;
14958 ; return 0; }
14959 EOF
14960 if { (eval echo configure:14961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14961   rm -rf conftest*
14962   ol_cv_c_volatile=yes
14963 else
14964   echo "configure: failed program was:" >&5
14965   cat conftest.$ac_ext >&5
14966   rm -rf conftest*
14967   ol_cv_c_volatile=no
14968 fi
14969 rm -f conftest*
14970 fi
14971
14972 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14973   if test $ol_cv_c_volatile = yes; then
14974     : 
14975   else
14976     cat >> confdefs.h <<\EOF
14977 #define volatile 
14978 EOF
14979
14980   fi
14981  
14982
14983 if test $cross_compiling = yes ; then
14984         cat >> confdefs.h <<\EOF
14985 #define CROSS_COMPILING 1
14986 EOF
14987
14988 else
14989         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14990 echo "configure:14991: checking whether byte ordering is bigendian" >&5
14991 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14992   echo $ac_n "(cached) $ac_c" 1>&6
14993 else
14994   ac_cv_c_bigendian=unknown
14995 # See if sys/param.h defines the BYTE_ORDER macro.
14996 cat > conftest.$ac_ext <<EOF
14997 #line 14998 "configure"
14998 #include "confdefs.h"
14999 #include <sys/types.h>
15000 #include <sys/param.h>
15001 int main() {
15002
15003 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15004  bogus endian macros
15005 #endif
15006 ; return 0; }
15007 EOF
15008 if { (eval echo configure:15009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15009   rm -rf conftest*
15010   # It does; now see whether it defined to BIG_ENDIAN or not.
15011 cat > conftest.$ac_ext <<EOF
15012 #line 15013 "configure"
15013 #include "confdefs.h"
15014 #include <sys/types.h>
15015 #include <sys/param.h>
15016 int main() {
15017
15018 #if BYTE_ORDER != BIG_ENDIAN
15019  not big endian
15020 #endif
15021 ; return 0; }
15022 EOF
15023 if { (eval echo configure:15024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15024   rm -rf conftest*
15025   ac_cv_c_bigendian=yes
15026 else
15027   echo "configure: failed program was:" >&5
15028   cat conftest.$ac_ext >&5
15029   rm -rf conftest*
15030   ac_cv_c_bigendian=no
15031 fi
15032 rm -f conftest*
15033 else
15034   echo "configure: failed program was:" >&5
15035   cat conftest.$ac_ext >&5
15036 fi
15037 rm -f conftest*
15038 if test $ac_cv_c_bigendian = unknown; then
15039 if test "$cross_compiling" = yes; then
15040     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15041 else
15042   cat > conftest.$ac_ext <<EOF
15043 #line 15044 "configure"
15044 #include "confdefs.h"
15045 main () {
15046   /* Are we little or big endian?  From Harbison&Steele.  */
15047   union
15048   {
15049     long l;
15050     char c[sizeof (long)];
15051   } u;
15052   u.l = 1;
15053   exit (u.c[sizeof (long) - 1] == 1);
15054 }
15055 EOF
15056 if { (eval echo configure:15057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15057 then
15058   ac_cv_c_bigendian=no
15059 else
15060   echo "configure: failed program was:" >&5
15061   cat conftest.$ac_ext >&5
15062   rm -fr conftest*
15063   ac_cv_c_bigendian=yes
15064 fi
15065 rm -fr conftest*
15066 fi
15067
15068 fi
15069 fi
15070
15071 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15072 if test $ac_cv_c_bigendian = yes; then
15073   cat >> confdefs.h <<\EOF
15074 #define WORDS_BIGENDIAN 1
15075 EOF
15076
15077 fi
15078
15079 fi
15080
15081 echo $ac_n "checking size of short""... $ac_c" 1>&6
15082 echo "configure:15083: checking size of short" >&5 
15083 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15084   echo $ac_n "(cached) $ac_c" 1>&6
15085 else
15086   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15087   cat > conftest.$ac_ext <<EOF
15088 #line 15089 "configure"
15089 #include "confdefs.h"
15090 #include "confdefs.h" 
15091 #include <sys/types.h> 
15092  
15093
15094 int main() {
15095 switch (0) case 0: case (sizeof (short) == $ac_size):;
15096 ; return 0; }
15097 EOF
15098 if { (eval echo configure:15099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15099   rm -rf conftest*
15100   ac_cv_sizeof_short=$ac_size
15101 else
15102   echo "configure: failed program was:" >&5
15103   cat conftest.$ac_ext >&5
15104 fi
15105 rm -f conftest* 
15106   if test x$ac_cv_sizeof_short != x ; then break; fi 
15107 done 
15108
15109 fi
15110  
15111 if test x$ac_cv_sizeof_short = x ; then 
15112   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15113 fi 
15114 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15115 cat >> confdefs.h <<EOF
15116 #define SIZEOF_SHORT $ac_cv_sizeof_short
15117 EOF
15118  
15119  
15120 echo $ac_n "checking size of int""... $ac_c" 1>&6
15121 echo "configure:15122: checking size of int" >&5 
15122 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15123   echo $ac_n "(cached) $ac_c" 1>&6
15124 else
15125   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15126   cat > conftest.$ac_ext <<EOF
15127 #line 15128 "configure"
15128 #include "confdefs.h"
15129 #include "confdefs.h" 
15130 #include <sys/types.h> 
15131  
15132
15133 int main() {
15134 switch (0) case 0: case (sizeof (int) == $ac_size):;
15135 ; return 0; }
15136 EOF
15137 if { (eval echo configure:15138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15138   rm -rf conftest*
15139   ac_cv_sizeof_int=$ac_size
15140 else
15141   echo "configure: failed program was:" >&5
15142   cat conftest.$ac_ext >&5
15143 fi
15144 rm -f conftest* 
15145   if test x$ac_cv_sizeof_int != x ; then break; fi 
15146 done 
15147
15148 fi
15149  
15150 if test x$ac_cv_sizeof_int = x ; then 
15151   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15152 fi 
15153 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15154 cat >> confdefs.h <<EOF
15155 #define SIZEOF_INT $ac_cv_sizeof_int
15156 EOF
15157  
15158  
15159 echo $ac_n "checking size of long""... $ac_c" 1>&6
15160 echo "configure:15161: checking size of long" >&5 
15161 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15162   echo $ac_n "(cached) $ac_c" 1>&6
15163 else
15164   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15165   cat > conftest.$ac_ext <<EOF
15166 #line 15167 "configure"
15167 #include "confdefs.h"
15168 #include "confdefs.h" 
15169 #include <sys/types.h> 
15170  
15171
15172 int main() {
15173 switch (0) case 0: case (sizeof (long) == $ac_size):;
15174 ; return 0; }
15175 EOF
15176 if { (eval echo configure:15177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15177   rm -rf conftest*
15178   ac_cv_sizeof_long=$ac_size
15179 else
15180   echo "configure: failed program was:" >&5
15181   cat conftest.$ac_ext >&5
15182 fi
15183 rm -f conftest* 
15184   if test x$ac_cv_sizeof_long != x ; then break; fi 
15185 done 
15186
15187 fi
15188  
15189 if test x$ac_cv_sizeof_long = x ; then 
15190   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15191 fi 
15192 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15193 cat >> confdefs.h <<EOF
15194 #define SIZEOF_LONG $ac_cv_sizeof_long
15195 EOF
15196  
15197
15198
15199 if test "$ac_cv_sizeof_int" -lt 4 ; then
15200         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15201
15202         cat >> confdefs.h <<\EOF
15203 #define LBER_INT_T long
15204 EOF
15205
15206 else
15207         cat >> confdefs.h <<\EOF
15208 #define LBER_INT_T int
15209 EOF
15210
15211 fi
15212
15213 cat >> confdefs.h <<\EOF
15214 #define LBER_LEN_T long
15215 EOF
15216
15217 cat >> confdefs.h <<\EOF
15218 #define LBER_SOCKET_T int
15219 EOF
15220
15221 cat >> confdefs.h <<\EOF
15222 #define LBER_TAG_T long
15223 EOF
15224
15225
15226 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15227 echo "configure:15228: checking for 8-bit clean memcmp" >&5
15228 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15229   echo $ac_n "(cached) $ac_c" 1>&6
15230 else
15231   if test "$cross_compiling" = yes; then
15232   ac_cv_func_memcmp_clean=no
15233 else
15234   cat > conftest.$ac_ext <<EOF
15235 #line 15236 "configure"
15236 #include "confdefs.h"
15237
15238 main()
15239 {
15240   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15241   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15242 }
15243
15244 EOF
15245 if { (eval echo configure:15246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15246 then
15247   ac_cv_func_memcmp_clean=yes
15248 else
15249   echo "configure: failed program was:" >&5
15250   cat conftest.$ac_ext >&5
15251   rm -fr conftest*
15252   ac_cv_func_memcmp_clean=no
15253 fi
15254 rm -fr conftest*
15255 fi
15256
15257 fi
15258
15259 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15260 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15261
15262 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15263 echo "configure:15264: checking for strftime" >&5
15264 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15265   echo $ac_n "(cached) $ac_c" 1>&6
15266 else
15267   cat > conftest.$ac_ext <<EOF
15268 #line 15269 "configure"
15269 #include "confdefs.h"
15270 /* System header to define __stub macros and hopefully few prototypes,
15271     which can conflict with char strftime(); below.  */
15272 #include <assert.h>
15273 /* Override any gcc2 internal prototype to avoid an error.  */
15274 /* We use char because int might match the return type of a gcc2
15275     builtin and then its argument prototype would still apply.  */
15276 char strftime();
15277 char (*f)();
15278
15279 int main() {
15280
15281 /* The GNU C library defines this for functions which it implements
15282     to always fail with ENOSYS.  Some functions are actually named
15283     something starting with __ and the normal name is an alias.  */
15284 #if defined (__stub_strftime) || defined (__stub___strftime)
15285 choke me
15286 #else
15287 f = strftime;
15288 #endif
15289
15290 ; return 0; }
15291 EOF
15292 if { (eval echo configure:15293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15293   rm -rf conftest*
15294   eval "ac_cv_func_strftime=yes"
15295 else
15296   echo "configure: failed program was:" >&5
15297   cat conftest.$ac_ext >&5
15298   rm -rf conftest*
15299   eval "ac_cv_func_strftime=no"
15300 fi
15301 rm -f conftest*
15302 fi
15303
15304 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15305   echo "$ac_t""yes" 1>&6
15306   cat >> confdefs.h <<\EOF
15307 #define HAVE_STRFTIME 1
15308 EOF
15309
15310 else
15311   echo "$ac_t""no" 1>&6
15312 # strftime is in -lintl on SCO UNIX.
15313 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15314 echo "configure:15315: checking for strftime in -lintl" >&5
15315 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15316 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15317   echo $ac_n "(cached) $ac_c" 1>&6
15318 else
15319   ac_save_LIBS="$LIBS"
15320 LIBS="-lintl  $LIBS"
15321 cat > conftest.$ac_ext <<EOF
15322 #line 15323 "configure"
15323 #include "confdefs.h"
15324 /* Override any gcc2 internal prototype to avoid an error.  */
15325 /* We use char because int might match the return type of a gcc2
15326     builtin and then its argument prototype would still apply.  */
15327 char strftime();
15328
15329 int main() {
15330 strftime()
15331 ; return 0; }
15332 EOF
15333 if { (eval echo configure:15334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15334   rm -rf conftest*
15335   eval "ac_cv_lib_$ac_lib_var=yes"
15336 else
15337   echo "configure: failed program was:" >&5
15338   cat conftest.$ac_ext >&5
15339   rm -rf conftest*
15340   eval "ac_cv_lib_$ac_lib_var=no"
15341 fi
15342 rm -f conftest*
15343 LIBS="$ac_save_LIBS"
15344
15345 fi
15346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15347   echo "$ac_t""yes" 1>&6
15348   cat >> confdefs.h <<\EOF
15349 #define HAVE_STRFTIME 1
15350 EOF
15351
15352 LIBS="-lintl $LIBS"
15353 else
15354   echo "$ac_t""no" 1>&6
15355 fi
15356
15357 fi
15358
15359
15360 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15361 echo "configure:15362: checking for inet_aton()" >&5
15362 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15363   echo $ac_n "(cached) $ac_c" 1>&6
15364 else
15365   cat > conftest.$ac_ext <<EOF
15366 #line 15367 "configure"
15367 #include "confdefs.h"
15368
15369 #ifdef HAVE_SYS_TYPES_H
15370 #       include <sys/types.h>
15371 #endif
15372 #ifdef HAVE_SYS_SOCKET_H
15373 #       include <sys/socket.h>
15374 #       ifdef HAVE_SYS_SELECT_H
15375 #               include <sys/select.h>
15376 #       endif
15377 #       include <netinet/in.h>
15378 #       ifdef HAVE_ARPA_INET_H
15379 #               include <arpa/inet.h>
15380 #       endif
15381 #endif
15382
15383 int main() {
15384 struct in_addr in;
15385 int rc = inet_aton( "255.255.255.255", &in );
15386 ; return 0; }
15387 EOF
15388 if { (eval echo configure:15389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15389   rm -rf conftest*
15390   ol_cv_func_inet_aton=yes
15391 else
15392   echo "configure: failed program was:" >&5
15393   cat conftest.$ac_ext >&5
15394   rm -rf conftest*
15395   ol_cv_func_inet_aton=no
15396 fi
15397 rm -f conftest*
15398 fi
15399
15400 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15401   if test $ol_cv_func_inet_aton != no; then
15402     cat >> confdefs.h <<\EOF
15403 #define HAVE_INET_ATON 1
15404 EOF
15405
15406   fi
15407  
15408
15409 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15410 echo "configure:15411: checking for _spawnlp" >&5
15411 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15412   echo $ac_n "(cached) $ac_c" 1>&6
15413 else
15414   cat > conftest.$ac_ext <<EOF
15415 #line 15416 "configure"
15416 #include "confdefs.h"
15417 /* System header to define __stub macros and hopefully few prototypes,
15418     which can conflict with char _spawnlp(); below.  */
15419 #include <assert.h>
15420 /* Override any gcc2 internal prototype to avoid an error.  */
15421 /* We use char because int might match the return type of a gcc2
15422     builtin and then its argument prototype would still apply.  */
15423 char _spawnlp();
15424 char (*f)();
15425
15426 int main() {
15427
15428 /* The GNU C library defines this for functions which it implements
15429     to always fail with ENOSYS.  Some functions are actually named
15430     something starting with __ and the normal name is an alias.  */
15431 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15432 choke me
15433 #else
15434 f = _spawnlp;
15435 #endif
15436
15437 ; return 0; }
15438 EOF
15439 if { (eval echo configure:15440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15440   rm -rf conftest*
15441   eval "ac_cv_func__spawnlp=yes"
15442 else
15443   echo "configure: failed program was:" >&5
15444   cat conftest.$ac_ext >&5
15445   rm -rf conftest*
15446   eval "ac_cv_func__spawnlp=no"
15447 fi
15448 rm -f conftest*
15449 fi
15450
15451 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15452   echo "$ac_t""yes" 1>&6
15453   cat >> confdefs.h <<\EOF
15454 #define HAVE_SPAWNLP 1
15455 EOF
15456
15457 else
15458   echo "$ac_t""no" 1>&6
15459 fi
15460
15461
15462 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15463 echo "configure:15464: checking for _snprintf" >&5
15464 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15465   echo $ac_n "(cached) $ac_c" 1>&6
15466 else
15467   cat > conftest.$ac_ext <<EOF
15468 #line 15469 "configure"
15469 #include "confdefs.h"
15470 /* System header to define __stub macros and hopefully few prototypes,
15471     which can conflict with char _snprintf(); below.  */
15472 #include <assert.h>
15473 /* Override any gcc2 internal prototype to avoid an error.  */
15474 /* We use char because int might match the return type of a gcc2
15475     builtin and then its argument prototype would still apply.  */
15476 char _snprintf();
15477 char (*f)();
15478
15479 int main() {
15480
15481 /* The GNU C library defines this for functions which it implements
15482     to always fail with ENOSYS.  Some functions are actually named
15483     something starting with __ and the normal name is an alias.  */
15484 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15485 choke me
15486 #else
15487 f = _snprintf;
15488 #endif
15489
15490 ; return 0; }
15491 EOF
15492 if { (eval echo configure:15493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15493   rm -rf conftest*
15494   eval "ac_cv_func__snprintf=yes"
15495 else
15496   echo "configure: failed program was:" >&5
15497   cat conftest.$ac_ext >&5
15498   rm -rf conftest*
15499   eval "ac_cv_func__snprintf=no"
15500 fi
15501 rm -f conftest*
15502 fi
15503
15504 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15505   echo "$ac_t""yes" 1>&6
15506   ac_cv_func_snprintf=yes
15507         cat >> confdefs.h <<\EOF
15508 #define snprintf _snprintf
15509 EOF
15510
15511
15512 else
15513   echo "$ac_t""no" 1>&6
15514 fi
15515
15516
15517 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15518 echo "configure:15519: checking for _vsnprintf" >&5
15519 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15520   echo $ac_n "(cached) $ac_c" 1>&6
15521 else
15522   cat > conftest.$ac_ext <<EOF
15523 #line 15524 "configure"
15524 #include "confdefs.h"
15525 /* System header to define __stub macros and hopefully few prototypes,
15526     which can conflict with char _vsnprintf(); below.  */
15527 #include <assert.h>
15528 /* Override any gcc2 internal prototype to avoid an error.  */
15529 /* We use char because int might match the return type of a gcc2
15530     builtin and then its argument prototype would still apply.  */
15531 char _vsnprintf();
15532 char (*f)();
15533
15534 int main() {
15535
15536 /* The GNU C library defines this for functions which it implements
15537     to always fail with ENOSYS.  Some functions are actually named
15538     something starting with __ and the normal name is an alias.  */
15539 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15540 choke me
15541 #else
15542 f = _vsnprintf;
15543 #endif
15544
15545 ; return 0; }
15546 EOF
15547 if { (eval echo configure:15548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15548   rm -rf conftest*
15549   eval "ac_cv_func__vsnprintf=yes"
15550 else
15551   echo "configure: failed program was:" >&5
15552   cat conftest.$ac_ext >&5
15553   rm -rf conftest*
15554   eval "ac_cv_func__vsnprintf=no"
15555 fi
15556 rm -f conftest*
15557 fi
15558
15559 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15560   echo "$ac_t""yes" 1>&6
15561   ac_cv_func_vsnprintf=yes
15562         cat >> confdefs.h <<\EOF
15563 #define vsnprintf _vsnprintf
15564 EOF
15565
15566
15567 else
15568   echo "$ac_t""no" 1>&6
15569 fi
15570
15571
15572 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15573 echo "configure:15574: checking for vprintf" >&5
15574 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15575   echo $ac_n "(cached) $ac_c" 1>&6
15576 else
15577   cat > conftest.$ac_ext <<EOF
15578 #line 15579 "configure"
15579 #include "confdefs.h"
15580 /* System header to define __stub macros and hopefully few prototypes,
15581     which can conflict with char vprintf(); below.  */
15582 #include <assert.h>
15583 /* Override any gcc2 internal prototype to avoid an error.  */
15584 /* We use char because int might match the return type of a gcc2
15585     builtin and then its argument prototype would still apply.  */
15586 char vprintf();
15587 char (*f)();
15588
15589 int main() {
15590
15591 /* The GNU C library defines this for functions which it implements
15592     to always fail with ENOSYS.  Some functions are actually named
15593     something starting with __ and the normal name is an alias.  */
15594 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15595 choke me
15596 #else
15597 f = vprintf;
15598 #endif
15599
15600 ; return 0; }
15601 EOF
15602 if { (eval echo configure:15603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15603   rm -rf conftest*
15604   eval "ac_cv_func_vprintf=yes"
15605 else
15606   echo "configure: failed program was:" >&5
15607   cat conftest.$ac_ext >&5
15608   rm -rf conftest*
15609   eval "ac_cv_func_vprintf=no"
15610 fi
15611 rm -f conftest*
15612 fi
15613
15614 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15615   echo "$ac_t""yes" 1>&6
15616   cat >> confdefs.h <<\EOF
15617 #define HAVE_VPRINTF 1
15618 EOF
15619
15620 else
15621   echo "$ac_t""no" 1>&6
15622 fi
15623
15624 if test "$ac_cv_func_vprintf" != yes; then
15625 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15626 echo "configure:15627: checking for _doprnt" >&5
15627 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15628   echo $ac_n "(cached) $ac_c" 1>&6
15629 else
15630   cat > conftest.$ac_ext <<EOF
15631 #line 15632 "configure"
15632 #include "confdefs.h"
15633 /* System header to define __stub macros and hopefully few prototypes,
15634     which can conflict with char _doprnt(); below.  */
15635 #include <assert.h>
15636 /* Override any gcc2 internal prototype to avoid an error.  */
15637 /* We use char because int might match the return type of a gcc2
15638     builtin and then its argument prototype would still apply.  */
15639 char _doprnt();
15640 char (*f)();
15641
15642 int main() {
15643
15644 /* The GNU C library defines this for functions which it implements
15645     to always fail with ENOSYS.  Some functions are actually named
15646     something starting with __ and the normal name is an alias.  */
15647 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15648 choke me
15649 #else
15650 f = _doprnt;
15651 #endif
15652
15653 ; return 0; }
15654 EOF
15655 if { (eval echo configure:15656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15656   rm -rf conftest*
15657   eval "ac_cv_func__doprnt=yes"
15658 else
15659   echo "configure: failed program was:" >&5
15660   cat conftest.$ac_ext >&5
15661   rm -rf conftest*
15662   eval "ac_cv_func__doprnt=no"
15663 fi
15664 rm -f conftest*
15665 fi
15666
15667 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15668   echo "$ac_t""yes" 1>&6
15669   cat >> confdefs.h <<\EOF
15670 #define HAVE_DOPRNT 1
15671 EOF
15672
15673 else
15674   echo "$ac_t""no" 1>&6
15675 fi
15676
15677 fi
15678
15679
15680 if test $ac_cv_func_vprintf = yes ; then
15681                 for ac_func in vsnprintf vsprintf
15682 do
15683 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15684 echo "configure:15685: checking for $ac_func" >&5
15685 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15686   echo $ac_n "(cached) $ac_c" 1>&6
15687 else
15688   cat > conftest.$ac_ext <<EOF
15689 #line 15690 "configure"
15690 #include "confdefs.h"
15691 /* System header to define __stub macros and hopefully few prototypes,
15692     which can conflict with char $ac_func(); below.  */
15693 #include <assert.h>
15694 /* Override any gcc2 internal prototype to avoid an error.  */
15695 /* We use char because int might match the return type of a gcc2
15696     builtin and then its argument prototype would still apply.  */
15697 char $ac_func();
15698 char (*f)();
15699
15700 int main() {
15701
15702 /* The GNU C library defines this for functions which it implements
15703     to always fail with ENOSYS.  Some functions are actually named
15704     something starting with __ and the normal name is an alias.  */
15705 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15706 choke me
15707 #else
15708 f = $ac_func;
15709 #endif
15710
15711 ; return 0; }
15712 EOF
15713 if { (eval echo configure:15714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15714   rm -rf conftest*
15715   eval "ac_cv_func_$ac_func=yes"
15716 else
15717   echo "configure: failed program was:" >&5
15718   cat conftest.$ac_ext >&5
15719   rm -rf conftest*
15720   eval "ac_cv_func_$ac_func=no"
15721 fi
15722 rm -f conftest*
15723 fi
15724
15725 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15726   echo "$ac_t""yes" 1>&6
15727     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15728   cat >> confdefs.h <<EOF
15729 #define $ac_tr_func 1
15730 EOF
15731  
15732 else
15733   echo "$ac_t""no" 1>&6
15734 fi
15735 done
15736
15737 fi
15738
15739 for ac_func in \
15740         bcopy                   \
15741         closesocket             \
15742         chroot                  \
15743         endgrent                \
15744         endpwent                \
15745         flock                   \
15746         getdtablesize   \
15747         getgrgid                \
15748         gethostname             \
15749         getpass                 \
15750         getpassphrase   \
15751         getpwuid                \
15752         getpwnam                \
15753         getspnam                \
15754         gettimeofday    \
15755         initgroups              \
15756         lockf                   \
15757         memcpy                  \
15758         memmove                 \
15759         mkstemp                 \
15760         pipe                    \
15761         read                    \
15762         recv                    \
15763         recvfrom                \
15764         setpwfile               \
15765         setgid                  \
15766         setegid                 \
15767         setsid                  \
15768         setuid                  \
15769         seteuid                 \
15770         sigaction               \
15771         signal                  \
15772         sigset                  \
15773         snprintf                \
15774         strdup                  \
15775         strerror                \
15776         strpbrk                 \
15777         strrchr                 \
15778         strsep                  \
15779         strstr                  \
15780         strtol                  \
15781         strtoul                 \
15782         strspn                  \
15783         sysconf                 \
15784         waitpid                 \
15785         wait4                   \
15786         write                   \
15787         send                    \
15788         sendto                  \
15789
15790 do
15791 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15792 echo "configure:15793: checking for $ac_func" >&5
15793 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15794   echo $ac_n "(cached) $ac_c" 1>&6
15795 else
15796   cat > conftest.$ac_ext <<EOF
15797 #line 15798 "configure"
15798 #include "confdefs.h"
15799 /* System header to define __stub macros and hopefully few prototypes,
15800     which can conflict with char $ac_func(); below.  */
15801 #include <assert.h>
15802 /* Override any gcc2 internal prototype to avoid an error.  */
15803 /* We use char because int might match the return type of a gcc2
15804     builtin and then its argument prototype would still apply.  */
15805 char $ac_func();
15806 char (*f)();
15807
15808 int main() {
15809
15810 /* The GNU C library defines this for functions which it implements
15811     to always fail with ENOSYS.  Some functions are actually named
15812     something starting with __ and the normal name is an alias.  */
15813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15814 choke me
15815 #else
15816 f = $ac_func;
15817 #endif
15818
15819 ; return 0; }
15820 EOF
15821 if { (eval echo configure:15822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15822   rm -rf conftest*
15823   eval "ac_cv_func_$ac_func=yes"
15824 else
15825   echo "configure: failed program was:" >&5
15826   cat conftest.$ac_ext >&5
15827   rm -rf conftest*
15828   eval "ac_cv_func_$ac_func=no"
15829 fi
15830 rm -f conftest*
15831 fi
15832
15833 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15834   echo "$ac_t""yes" 1>&6
15835     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15836   cat >> confdefs.h <<EOF
15837 #define $ac_tr_func 1
15838 EOF
15839  
15840 else
15841   echo "$ac_t""no" 1>&6
15842 fi
15843 done
15844
15845
15846 for ac_func in getopt tempnam
15847 do
15848 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15849 echo "configure:15850: checking for $ac_func" >&5
15850 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15851   echo $ac_n "(cached) $ac_c" 1>&6
15852 else
15853   cat > conftest.$ac_ext <<EOF
15854 #line 15855 "configure"
15855 #include "confdefs.h"
15856 /* System header to define __stub macros and hopefully few prototypes,
15857     which can conflict with char $ac_func(); below.  */
15858 #include <assert.h>
15859 /* Override any gcc2 internal prototype to avoid an error.  */
15860 /* We use char because int might match the return type of a gcc2
15861     builtin and then its argument prototype would still apply.  */
15862 char $ac_func();
15863 char (*f)();
15864
15865 int main() {
15866
15867 /* The GNU C library defines this for functions which it implements
15868     to always fail with ENOSYS.  Some functions are actually named
15869     something starting with __ and the normal name is an alias.  */
15870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15871 choke me
15872 #else
15873 f = $ac_func;
15874 #endif
15875
15876 ; return 0; }
15877 EOF
15878 if { (eval echo configure:15879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15879   rm -rf conftest*
15880   eval "ac_cv_func_$ac_func=yes"
15881 else
15882   echo "configure: failed program was:" >&5
15883   cat conftest.$ac_ext >&5
15884   rm -rf conftest*
15885   eval "ac_cv_func_$ac_func=no"
15886 fi
15887 rm -f conftest*
15888 fi
15889
15890 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15891   echo "$ac_t""yes" 1>&6
15892     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15893   cat >> confdefs.h <<EOF
15894 #define $ac_tr_func 1
15895 EOF
15896  
15897 else
15898   echo "$ac_t""no" 1>&6
15899 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15900 fi
15901 done
15902
15903
15904
15905 if test "$ac_cv_func_getopt" != yes; then
15906     LIBSRCS="$LIBSRCS getopt.c"
15907 fi
15908
15909 if test "$ac_cv_func_tempnam" != yes; then
15910     LIBSRCS="$LIBSRCS tempnam.c"
15911 fi
15912
15913 # Check Configuration
15914 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15915 echo "configure:15916: checking declaration of sys_errlist" >&5
15916 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15917   echo $ac_n "(cached) $ac_c" 1>&6
15918 else
15919   
15920         cat > conftest.$ac_ext <<EOF
15921 #line 15922 "configure"
15922 #include "confdefs.h"
15923
15924 #include <stdio.h>
15925 #include <sys/types.h>
15926 #include <errno.h>
15927 #ifdef WINNT
15928 #include <stdlib.h>
15929 #endif 
15930 int main() {
15931 char *c = (char *) *sys_errlist
15932 ; return 0; }
15933 EOF
15934 if { (eval echo configure:15935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15935   rm -rf conftest*
15936   ol_cv_dcl_sys_errlist=yes
15937         ol_cv_have_sys_errlist=yes
15938 else
15939   echo "configure: failed program was:" >&5
15940   cat conftest.$ac_ext >&5
15941   rm -rf conftest*
15942   ol_cv_dcl_sys_errlist=no
15943 fi
15944 rm -f conftest*
15945 fi
15946
15947 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15948 #
15949 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15950 if test $ol_cv_dcl_sys_errlist = no ; then
15951         cat >> confdefs.h <<\EOF
15952 #define DECL_SYS_ERRLIST 1
15953 EOF
15954
15955
15956         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15957 echo "configure:15958: checking existence of sys_errlist" >&5
15958 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15959   echo $ac_n "(cached) $ac_c" 1>&6
15960 else
15961   
15962                 cat > conftest.$ac_ext <<EOF
15963 #line 15964 "configure"
15964 #include "confdefs.h"
15965 #include <errno.h>
15966 int main() {
15967 char *c = (char *) *sys_errlist
15968 ; return 0; }
15969 EOF
15970 if { (eval echo configure:15971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15971   rm -rf conftest*
15972   ol_cv_have_sys_errlist=yes
15973 else
15974   echo "configure: failed program was:" >&5
15975   cat conftest.$ac_ext >&5
15976   rm -rf conftest*
15977   ol_cv_have_sys_errlist=no
15978 fi
15979 rm -f conftest*
15980 fi
15981
15982 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15983 fi
15984 if test $ol_cv_have_sys_errlist = yes ; then
15985         cat >> confdefs.h <<\EOF
15986 #define HAVE_SYS_ERRLIST 1
15987 EOF
15988
15989 fi
15990
15991
15992
15993 if test "$ol_enable_debug" != no ; then
15994         cat >> confdefs.h <<\EOF
15995 #define LDAP_DEBUG 1
15996 EOF
15997
15998 fi
15999 if test "$ol_enable_syslog" = yes ; then
16000         cat >> confdefs.h <<\EOF
16001 #define LDAP_SYSLOG 1
16002 EOF
16003
16004 fi
16005 if test "$ol_enable_cache" = no ; then
16006         cat >> confdefs.h <<\EOF
16007 #define LDAP_NOCACHE 1
16008 EOF
16009
16010 fi
16011 if test "$ol_link_kbind" != no ; then
16012         cat >> confdefs.h <<\EOF
16013 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16014 EOF
16015
16016 fi
16017 if test "$ol_enable_proctitle" != no ; then
16018         cat >> confdefs.h <<\EOF
16019 #define LDAP_PROCTITLE 1
16020 EOF
16021
16022 fi
16023 if test "$ol_enable_referrals" != no ; then
16024         cat >> confdefs.h <<\EOF
16025 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16026 EOF
16027
16028 fi
16029 if test "$ol_enable_local" != no; then
16030         cat >> confdefs.h <<\EOF
16031 #define LDAP_PF_LOCAL 1
16032 EOF
16033
16034 fi
16035 if test "$ol_link_ipv6" != no; then
16036         cat >> confdefs.h <<\EOF
16037 #define LDAP_PF_INET6 1
16038 EOF
16039
16040 fi
16041 if test "$ol_enable_cleartext" != no ; then
16042         cat >> confdefs.h <<\EOF
16043 #define SLAPD_CLEARTEXT 1
16044 EOF
16045
16046 fi
16047 if test "$ol_enable_crypt" != no ; then
16048         cat >> confdefs.h <<\EOF
16049 #define SLAPD_CRYPT 1
16050 EOF
16051
16052 fi
16053 if test "$ol_link_kpasswd" != no ; then
16054         cat >> confdefs.h <<\EOF
16055 #define SLAPD_KPASSWD 1
16056 EOF
16057
16058 fi
16059 if test "$ol_link_spasswd" != no ; then
16060         cat >> confdefs.h <<\EOF
16061 #define SLAPD_SPASSWD 1
16062 EOF
16063
16064 fi
16065 if test "$ol_enable_multimaster" != no ; then
16066         cat >> confdefs.h <<\EOF
16067 #define SLAPD_MULTIMASTER 1
16068 EOF
16069
16070 fi
16071 if test "$ol_enable_phonetic" != no ; then
16072         cat >> confdefs.h <<\EOF
16073 #define SLAPD_PHONETIC 1
16074 EOF
16075
16076 fi
16077 if test "$ol_enable_rlookups" != no ; then
16078         cat >> confdefs.h <<\EOF
16079 #define SLAPD_RLOOKUPS 1
16080 EOF
16081
16082 fi
16083 if test "$ol_enable_aci" != no ; then
16084         cat >> confdefs.h <<\EOF
16085 #define SLAPD_ACI_ENABLED 1
16086 EOF
16087
16088 fi
16089
16090 if test "$ol_link_modules" != no ; then
16091         cat >> confdefs.h <<\EOF
16092 #define SLAPD_MODULES 1
16093 EOF
16094
16095         BUILD_SLAPD=yes
16096         SLAPD_MODULES_LDFLAGS="-dlopen self"
16097 fi
16098
16099 if test "$ol_enable_bdb" != no ; then
16100         cat >> confdefs.h <<\EOF
16101 #define SLAPD_BDB 1
16102 EOF
16103
16104         BUILD_SLAPD=yes
16105         BUILD_BDB=yes
16106         if test "$ol_with_bdb_module" != static ; then
16107                 cat >> confdefs.h <<\EOF
16108 #define SLAPD_BDB_DYNAMIC 1
16109 EOF
16110
16111                 BUILD_BDB=mod
16112                 BUILD_BDB_DYNAMIC=shared
16113                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
16114         fi
16115 fi
16116
16117 if test "$ol_link_dnssrv" != no ; then
16118         cat >> confdefs.h <<\EOF
16119 #define SLAPD_DNSSRV 1
16120 EOF
16121
16122         BUILD_SLAPD=yes
16123         BUILD_DNSSRV=yes
16124         if test "$ol_with_dnssrv_module" != static ; then
16125                 cat >> confdefs.h <<\EOF
16126 #define SLAPD_DNSSRV_DYNAMIC 1
16127 EOF
16128
16129                 BUILD_DNSSRV=mod
16130                 BUILD_DNSSRV_DYNAMIC=shared
16131                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16132         fi
16133 fi
16134
16135 if test "$ol_enable_ldap" != no ; then
16136         cat >> confdefs.h <<\EOF
16137 #define SLAPD_LDAP 1
16138 EOF
16139
16140         BUILD_SLAPD=yes
16141         BUILD_LDAP=yes
16142         if test "$ol_with_ldap_module" != static ; then
16143                 cat >> confdefs.h <<\EOF
16144 #define SLAPD_LDAP_DYNAMIC 1
16145 EOF
16146
16147                 BUILD_LDAP=mod
16148                 BUILD_LDAP_DYNAMIC=shared
16149                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16150         fi
16151 fi
16152
16153 if test "$ol_link_ldbm" != no ; then
16154         cat >> confdefs.h <<\EOF
16155 #define SLAPD_LDBM 1
16156 EOF
16157
16158         BUILD_SLAPD=yes
16159         BUILD_LDBM=yes
16160         if test "$ol_with_ldbm_module" != static ; then
16161                 cat >> confdefs.h <<\EOF
16162 #define SLAPD_LDBM_DYNAMIC 1
16163 EOF
16164
16165                 BUILD_LDBM=mod
16166                 BUILD_LDBM_DYNAMIC=shared
16167                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16168         fi
16169 fi
16170
16171 if test "$ol_enable_passwd" != no ; then
16172         cat >> confdefs.h <<\EOF
16173 #define SLAPD_PASSWD 1
16174 EOF
16175
16176         BUILD_SLAPD=yes
16177         BUILD_PASSWD=yes
16178         if test "$ol_with_passwd_module" != static ; then
16179                 cat >> confdefs.h <<\EOF
16180 #define SLAPD_PASSWD_DYNAMIC 1
16181 EOF
16182
16183                 BUILD_PASSWD=mod
16184                 BUILD_PASSWD_DYNAMIC=shared
16185                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16186         fi
16187 fi
16188
16189 if test "$ol_link_perl" != no ; then
16190         cat >> confdefs.h <<\EOF
16191 #define SLAPD_PERL 1
16192 EOF
16193
16194         BUILD_SLAPD=yes
16195         BUILD_PERL=yes
16196         if test "$ol_with_perl_module" != static ; then
16197                 cat >> confdefs.h <<\EOF
16198 #define SLAPD_PERL_DYNAMIC 1
16199 EOF
16200
16201                 BUILD_PERL=mod
16202                 BUILD_PERL_DYNAMIC=shared
16203                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16204         fi
16205 fi
16206
16207 if test "$ol_enable_shell" != no ; then
16208         cat >> confdefs.h <<\EOF
16209 #define SLAPD_SHELL 1
16210 EOF
16211
16212         BUILD_SLAPD=yes
16213         BUILD_SHELL=yes
16214         if test "$ol_with_shell_module" != static ; then
16215                 cat >> confdefs.h <<\EOF
16216 #define SLAPD_SHELL_DYNAMIC 1
16217 EOF
16218
16219                 BUILD_SHELL=mod
16220                 BUILD_SHELL_DYNAMIC=shared
16221                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16222         fi
16223 fi
16224
16225 if test "$ol_enable_tcl" != no ; then
16226         cat >> confdefs.h <<\EOF
16227 #define SLAPD_TCL 1
16228 EOF
16229
16230         BUILD_SLAPD=yes
16231         BUILD_TCL=yes
16232         if test "$ol_with_tcl_module" != static; then
16233                 cat >> confdefs.h <<\EOF
16234 #define SLAPD_TCL_DYNAMIC 1
16235 EOF
16236
16237                 BUILD_TCL=mod
16238                 BUILD_TCL_DYNAMIC=shared
16239                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16240         fi
16241 fi
16242
16243 if test "$ol_link_sql" != no ; then
16244         cat >> confdefs.h <<\EOF
16245 #define SLAPD_SQL 1
16246 EOF
16247
16248         BUILD_SLAPD=yes
16249         BUILD_SQL=yes
16250         if test "$ol_with_sql_module" != static; then
16251                 cat >> confdefs.h <<\EOF
16252 #define SLAPD_SQL_DYNAMIC 1
16253 EOF
16254
16255                 BUILD_SQL=mod
16256                 BUILD_SQL_DYNAMIC=shared
16257                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16258         fi
16259 fi
16260
16261 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16262         $BUILD_SLAPD = yes ; then
16263         BUILD_SLURPD=yes
16264 fi
16265
16266
16267 if test "$LINK_BINS_DYNAMIC" = yes; then
16268     LIB_LINKAGE=DYN
16269     LT_LIB_LINKAGE=shared
16270 else
16271     LIB_LINKAGE=STAT
16272     LT_LIB_LINKAGE=static
16273 fi
16274
16275 if test "$ac_cv_mingw32" = yes ; then
16276     PLAT=NT
16277     DYN_EXT=dll
16278 else
16279     PLAT=UNIX
16280     DYN_EXT=so
16281 fi
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291   
16292   
16293   
16294   
16295   
16296   
16297   
16298   
16299   
16300   
16301   
16302   
16303   
16304   
16305   
16306   
16307   
16308   
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344 trap '' 1 2 15
16345
16346 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16347
16348 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16349 # Let make expand exec_prefix.
16350 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16351
16352 # Any assignment to VPATH causes Sun make to only execute
16353 # the first set of double-colon rules, so remove it if not needed.
16354 # If there is a colon in the path, we need to keep it.
16355 if test "x$srcdir" = x.; then
16356   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16357 fi
16358
16359 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16360
16361 DEFS=-DHAVE_CONFIG_H
16362
16363 # Without the "./", some shells look in PATH for config.status.
16364 : ${CONFIG_STATUS=./config.status}
16365
16366 echo creating $CONFIG_STATUS
16367 rm -f $CONFIG_STATUS
16368 cat > $CONFIG_STATUS <<EOF
16369 #! /bin/sh
16370 # Generated automatically by configure.
16371 # Run this file to recreate the current configuration.
16372 # This directory was configured as follows,
16373 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16374 #
16375 # $0 $ac_configure_args
16376 #
16377 # Compiler output produced by configure, useful for debugging
16378 # configure, is in ./config.log if it exists.
16379
16380 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16381 for ac_option
16382 do
16383   case "\$ac_option" in
16384   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16385     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16386     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16387   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16388     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16389     exit 0 ;;
16390   -help | --help | --hel | --he | --h)
16391     echo "\$ac_cs_usage"; exit 0 ;;
16392   *) echo "\$ac_cs_usage"; exit 1 ;;
16393   esac
16394 done
16395
16396 ac_given_srcdir=$srcdir
16397 ac_given_INSTALL="$INSTALL"
16398
16399 trap 'rm -fr `echo "\
16400 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16401 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16402 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16403 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16404 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16405 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16406 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16407 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16408 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16409 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16410 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16411 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16412 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16413 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16414 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16415 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16416 include/Makefile:build/top.mk:include/Makefile.in \
16417 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16418 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16419 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16420 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16421 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16422 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16423 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16424 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16425 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16426 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16427 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16428 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16429 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16430 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16431 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16432 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16433 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16434 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16435 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16436 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16437 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16438 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16439 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16440 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16441 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16442 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16443 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16444 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16445  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16446 EOF
16447 cat >> $CONFIG_STATUS <<EOF
16448
16449 # Protect against being on the right side of a sed subst in config.status.
16450 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16451  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16452 $ac_vpsub
16453 $extrasub
16454 s%@SHELL@%$SHELL%g
16455 s%@CFLAGS@%$CFLAGS%g
16456 s%@CPPFLAGS@%$CPPFLAGS%g
16457 s%@CXXFLAGS@%$CXXFLAGS%g
16458 s%@FFLAGS@%$FFLAGS%g
16459 s%@DEFS@%$DEFS%g
16460 s%@LDFLAGS@%$LDFLAGS%g
16461 s%@LIBS@%$LIBS%g
16462 s%@exec_prefix@%$exec_prefix%g
16463 s%@prefix@%$prefix%g
16464 s%@program_transform_name@%$program_transform_name%g
16465 s%@bindir@%$bindir%g
16466 s%@sbindir@%$sbindir%g
16467 s%@libexecdir@%$libexecdir%g
16468 s%@datadir@%$datadir%g
16469 s%@sysconfdir@%$sysconfdir%g
16470 s%@sharedstatedir@%$sharedstatedir%g
16471 s%@localstatedir@%$localstatedir%g
16472 s%@libdir@%$libdir%g
16473 s%@includedir@%$includedir%g
16474 s%@oldincludedir@%$oldincludedir%g
16475 s%@infodir@%$infodir%g
16476 s%@mandir@%$mandir%g
16477 s%@host@%$host%g
16478 s%@host_alias@%$host_alias%g
16479 s%@host_cpu@%$host_cpu%g
16480 s%@host_vendor@%$host_vendor%g
16481 s%@host_os@%$host_os%g
16482 s%@target@%$target%g
16483 s%@target_alias@%$target_alias%g
16484 s%@target_cpu@%$target_cpu%g
16485 s%@target_vendor@%$target_vendor%g
16486 s%@target_os@%$target_os%g
16487 s%@build@%$build%g
16488 s%@build_alias@%$build_alias%g
16489 s%@build_cpu@%$build_cpu%g
16490 s%@build_vendor@%$build_vendor%g
16491 s%@build_os@%$build_os%g
16492 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16493 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16494 s%@INSTALL_DATA@%$INSTALL_DATA%g
16495 s%@PACKAGE@%$PACKAGE%g
16496 s%@VERSION@%$VERSION%g
16497 s%@ACLOCAL@%$ACLOCAL%g
16498 s%@AUTOCONF@%$AUTOCONF%g
16499 s%@AUTOMAKE@%$AUTOMAKE%g
16500 s%@AUTOHEADER@%$AUTOHEADER%g
16501 s%@MAKEINFO@%$MAKEINFO%g
16502 s%@install_sh@%$install_sh%g
16503 s%@AMTAR@%$AMTAR%g
16504 s%@AWK@%$AWK%g
16505 s%@AMTARFLAGS@%$AMTARFLAGS%g
16506 s%@SET_MAKE@%$SET_MAKE%g
16507 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16508 s%@top_builddir@%$top_builddir%g
16509 s%@ldap_subdir@%$ldap_subdir%g
16510 s%@CC@%$CC%g
16511 s%@RANLIB@%$RANLIB%g
16512 s%@LN_S@%$LN_S%g
16513 s%@DLLTOOL@%$DLLTOOL%g
16514 s%@AS@%$AS%g
16515 s%@OBJDUMP@%$OBJDUMP%g
16516 s%@LIBTOOL@%$LIBTOOL%g
16517 s%@LN_H@%$LN_H%g
16518 s%@SENDMAIL@%$SENDMAIL%g
16519 s%@EDITOR@%$EDITOR%g
16520 s%@FINGER@%$FINGER%g
16521 s%@PERLBIN@%$PERLBIN%g
16522 s%@CPP@%$CPP%g
16523 s%@EXEEXT@%$EXEEXT%g
16524 s%@OBJEXT@%$OBJEXT%g
16525 s%@OL_MKDEP@%$OL_MKDEP%g
16526 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16527 s%@LIBOBJS@%$LIBOBJS%g
16528 s%@LIBSRCS@%$LIBSRCS%g
16529 s%@PLAT@%$PLAT%g
16530 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16531 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16532 s%@DYN_EXT@%$DYN_EXT%g
16533 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16534 s%@BUILD_BDB@%$BUILD_BDB%g
16535 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16536 s%@BUILD_LDAP@%$BUILD_LDAP%g
16537 s%@BUILD_LDBM@%$BUILD_LDBM%g
16538 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16539 s%@BUILD_PERL@%$BUILD_PERL%g
16540 s%@BUILD_SHELL@%$BUILD_SHELL%g
16541 s%@BUILD_SQL@%$BUILD_SQL%g
16542 s%@BUILD_TCL@%$BUILD_TCL%g
16543 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
16544 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16545 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16546 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16547 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16548 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16549 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16550 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16551 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16552 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16553 s%@LDAP_LIBS@%$LDAP_LIBS%g
16554 s%@LDIF_LIBS@%$LDIF_LIBS%g
16555 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16556 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16557 s%@LDBM_LIBS@%$LDBM_LIBS%g
16558 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16559 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16560 s%@WRAP_LIBS@%$WRAP_LIBS%g
16561 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16562 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16563 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16564 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16565 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16566 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16567 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16568 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16569 s%@KRB4_LIBS@%$KRB4_LIBS%g
16570 s%@KRB5_LIBS@%$KRB5_LIBS%g
16571 s%@READLINE_LIBS@%$READLINE_LIBS%g
16572 s%@SASL_LIBS@%$SASL_LIBS%g
16573 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16574 s%@TLS_LIBS@%$TLS_LIBS%g
16575 s%@MODULES_LIBS@%$MODULES_LIBS%g
16576 s%@AUTH_LIBS@%$AUTH_LIBS%g
16577 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16578 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16579 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16580
16581 CEOF
16582 EOF
16583
16584 cat >> $CONFIG_STATUS <<\EOF
16585
16586 # Split the substitutions into bite-sized pieces for seds with
16587 # small command number limits, like on Digital OSF/1 and HP-UX.
16588 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16589 ac_file=1 # Number of current file.
16590 ac_beg=1 # First line for current file.
16591 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16592 ac_more_lines=:
16593 ac_sed_cmds=""
16594 while $ac_more_lines; do
16595   if test $ac_beg -gt 1; then
16596     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16597   else
16598     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16599   fi
16600   if test ! -s conftest.s$ac_file; then
16601     ac_more_lines=false
16602     rm -f conftest.s$ac_file
16603   else
16604     if test -z "$ac_sed_cmds"; then
16605       ac_sed_cmds="sed -f conftest.s$ac_file"
16606     else
16607       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16608     fi
16609     ac_file=`expr $ac_file + 1`
16610     ac_beg=$ac_end
16611     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16612   fi
16613 done
16614 if test -z "$ac_sed_cmds"; then
16615   ac_sed_cmds=cat
16616 fi
16617 EOF
16618
16619 cat >> $CONFIG_STATUS <<EOF
16620
16621 CONFIG_FILES=\${CONFIG_FILES-"\
16622 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16623 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16624 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16625 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16626 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16627 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16628 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16629 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16630 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16631 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16632 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16633 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16634 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16635 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16636 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16637 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16638 include/Makefile:build/top.mk:include/Makefile.in \
16639 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16640 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16641 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16642 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16643 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16644 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16645 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16646 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16647 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16648 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16649 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16650 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16651 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16652 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16653 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16654 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16655 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16656 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16657 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16658 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16659 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16660 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16661 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16662 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16663 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16664 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16665 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16666 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16667 "}
16668 EOF
16669 cat >> $CONFIG_STATUS <<\EOF
16670 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16671   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16672   case "$ac_file" in
16673   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16674        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16675   *) ac_file_in="${ac_file}.in" ;;
16676   esac
16677
16678   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16679
16680   # Remove last slash and all that follows it.  Not all systems have dirname.
16681   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16682   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16683     # The file is in a subdirectory.
16684     test ! -d "$ac_dir" && mkdir "$ac_dir"
16685     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16686     # A "../" for each directory in $ac_dir_suffix.
16687     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16688   else
16689     ac_dir_suffix= ac_dots=
16690   fi
16691
16692   case "$ac_given_srcdir" in
16693   .)  srcdir=.
16694       if test -z "$ac_dots"; then top_srcdir=.
16695       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16696   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16697   *) # Relative path.
16698     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16699     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16700   esac
16701
16702   case "$ac_given_INSTALL" in
16703   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16704   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16705   esac
16706
16707   echo creating "$ac_file"
16708   rm -f "$ac_file"
16709   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16710   case "$ac_file" in
16711   *[Mm]akefile*) ac_comsub="1i\\
16712 # $configure_input" ;;
16713   *) ac_comsub= ;;
16714   esac
16715
16716   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16717   sed -e "$ac_comsub
16718 s%@configure_input@%$configure_input%g
16719 s%@srcdir@%$srcdir%g
16720 s%@top_srcdir@%$top_srcdir%g
16721 s%@INSTALL@%$INSTALL%g
16722 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16723 fi; done
16724 rm -f conftest.s*
16725
16726 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16727 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16728 #
16729 # ac_d sets the value in "#define NAME VALUE" lines.
16730 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16731 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16732 ac_dC='\3'
16733 ac_dD='%g'
16734 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16735 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16736 ac_uB='\([      ]\)%\1#\2define\3'
16737 ac_uC=' '
16738 ac_uD='\4%g'
16739 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16740 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16741 ac_eB='$%\1#\2define\3'
16742 ac_eC=' '
16743 ac_eD='%g'
16744
16745 if test "${CONFIG_HEADERS+set}" != set; then
16746 EOF
16747 cat >> $CONFIG_STATUS <<EOF
16748   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16749 EOF
16750 cat >> $CONFIG_STATUS <<\EOF
16751 fi
16752 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16753   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16754   case "$ac_file" in
16755   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16756        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16757   *) ac_file_in="${ac_file}.in" ;;
16758   esac
16759
16760   echo creating $ac_file
16761
16762   rm -f conftest.frag conftest.in conftest.out
16763   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16764   cat $ac_file_inputs > conftest.in
16765
16766 EOF
16767
16768 # Transform confdefs.h into a sed script conftest.vals that substitutes
16769 # the proper values into config.h.in to produce config.h.  And first:
16770 # Protect against being on the right side of a sed subst in config.status.
16771 # Protect against being in an unquoted here document in config.status.
16772 rm -f conftest.vals
16773 cat > conftest.hdr <<\EOF
16774 s/[\\&%]/\\&/g
16775 s%[\\$`]%\\&%g
16776 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16777 s%ac_d%ac_u%gp
16778 s%ac_u%ac_e%gp
16779 EOF
16780 sed -n -f conftest.hdr confdefs.h > conftest.vals
16781 rm -f conftest.hdr
16782
16783 # This sed command replaces #undef with comments.  This is necessary, for
16784 # example, in the case of _POSIX_SOURCE, which is predefined and required
16785 # on some systems where configure will not decide to define it.
16786 cat >> conftest.vals <<\EOF
16787 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16788 EOF
16789
16790 # Break up conftest.vals because some shells have a limit on
16791 # the size of here documents, and old seds have small limits too.
16792
16793 rm -f conftest.tail
16794 while :
16795 do
16796   ac_lines=`grep -c . conftest.vals`
16797   # grep -c gives empty output for an empty file on some AIX systems.
16798   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16799   # Write a limited-size here document to conftest.frag.
16800   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16801   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16802   echo 'CEOF
16803   sed -f conftest.frag conftest.in > conftest.out
16804   rm -f conftest.in
16805   mv conftest.out conftest.in
16806 ' >> $CONFIG_STATUS
16807   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16808   rm -f conftest.vals
16809   mv conftest.tail conftest.vals
16810 done
16811 rm -f conftest.vals
16812
16813 cat >> $CONFIG_STATUS <<\EOF
16814   rm -f conftest.frag conftest.h
16815   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16816   cat conftest.in >> conftest.h
16817   rm -f conftest.in
16818   if cmp -s $ac_file conftest.h 2>/dev/null; then
16819     echo "$ac_file is unchanged"
16820     rm -f conftest.h
16821   else
16822     # Remove last slash and all that follows it.  Not all systems have dirname.
16823       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16824       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16825       # The file is in a subdirectory.
16826       test ! -d "$ac_dir" && mkdir "$ac_dir"
16827     fi
16828     rm -f $ac_file
16829     mv conftest.h $ac_file
16830   fi
16831 fi; done
16832
16833 EOF
16834 cat >> $CONFIG_STATUS <<EOF
16835
16836 EOF
16837 cat >> $CONFIG_STATUS <<\EOF
16838
16839 date > stamp-h
16840 echo Please \"make depend\" to build dependencies
16841
16842 exit 0
16843 EOF
16844 chmod +x $CONFIG_STATUS
16845 rm -fr confdefs* $ac_clean_files
16846 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16847